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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
47,100 | mi_read_key_record | eloqsql/storage/myisam/mi_key.c | int _mi_read_key_record(MI_INFO *info, my_off_t filepos, uchar *buf)
{
fast_mi_writeinfo(info);
if (filepos != HA_OFFSET_ERROR)
{
if (info->lastinx >= 0)
{ /* Read only key */
if (_mi_put_key_in_record(info,(uint) info->lastinx, TRUE, buf))
{
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
return -1;
}
info->update|= HA_STATE_AKTIV; /* We should find a record */
return 0;
}
my_errno=HA_ERR_WRONG_INDEX;
}
return(-1); /* Wrong data to read */
} | O3 | c | mi_read_key_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rax
cmpl $0x0, 0x368(%rax)
jne 0x7e489
movq %r14, %rdi
xorl %esi, %esi
callq 0x7f672
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
cmpq $-0x1, %r12
je 0x7e4eb
movl 0x1d4(%r14), %esi
testl %esi, %esi
js 0x7e4d4
movq %r14, %rdi
movl $0x1, %edx
movq %r15, %rcx
callq 0x7e4f6
testl %eax, %eax
je 0x7e4e1
movq (%r14), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x7dcaa
callq 0xa8156
movl $0x7e, (%rax)
jmp 0x7e4eb
callq 0xa8156
movl $0x7c, (%rax)
jmp 0x7e4eb
orb $0x2, 0x1d0(%r14)
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _mi_read_key_record:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r15, rdx
mov r12, rsi
mov r14, rdi
mov rax, [rdi]
cmp dword ptr [rax+368h], 0
jnz short loc_7E489
mov rdi, r14
xor esi, esi
call _mi_writeinfo
loc_7E489:
mov ebx, 0FFFFFFFFh
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_7E4EB
mov esi, [r14+1D4h]
test esi, esi
js short loc_7E4D4
mov rdi, r14
mov edx, 1
mov rcx, r15
call _mi_put_key_in_record
test eax, eax
jz short loc_7E4E1
mov rax, [r14]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
jmp short loc_7E4EB
loc_7E4D4:
call _my_thread_var
mov dword ptr [rax], 7Ch ; '|'
jmp short loc_7E4EB
loc_7E4E1:
or byte ptr [r14+1D0h], 2
xor ebx, ebx
loc_7E4EB:
mov eax, ebx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long mi_read_key_record(unsigned int *a1, long long a2, long long a3)
{
unsigned int v4; // ebx
long long v5; // rsi
if ( !*(_DWORD *)(*(_QWORD *)a1 + 872LL) )
mi_writeinfo(a1, 0LL);
v4 = -1;
if ( a2 != -1 )
{
v5 = a1[117];
if ( (int)v5 < 0 )
{
*(_DWORD *)my_thread_var(a1) = 124;
}
else if ( (unsigned int)mi_put_key_in_record(a1, v5, 1LL, a3) )
{
mi_report_error(126, *(_QWORD *)(*(_QWORD *)a1 + 616LL));
*(_DWORD *)my_thread_var(126LL) = 126;
}
else
{
*((_BYTE *)a1 + 464) |= 2u;
return 0;
}
}
return v4;
}
| _mi_read_key_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x0017e489
MOV RDI,R14
XOR ESI,ESI
CALL 0x0017f672
LAB_0017e489:
MOV EBX,0xffffffff
CMP R12,-0x1
JZ 0x0017e4eb
MOV ESI,dword ptr [R14 + 0x1d4]
TEST ESI,ESI
JS 0x0017e4d4
MOV RDI,R14
MOV EDX,0x1
MOV RCX,R15
CALL 0x0017e4f6
TEST EAX,EAX
JZ 0x0017e4e1
MOV RAX,qword ptr [R14]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x0017dcaa
CALL 0x001a8156
MOV dword ptr [RAX],0x7e
JMP 0x0017e4eb
LAB_0017e4d4:
CALL 0x001a8156
MOV dword ptr [RAX],0x7c
JMP 0x0017e4eb
LAB_0017e4e1:
OR byte ptr [R14 + 0x1d0],0x2
XOR EBX,EBX
LAB_0017e4eb:
MOV EAX,EBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 _mi_read_key_record(long *param_1,long param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
int8 uVar3;
if (*(int *)(*param_1 + 0x368) == 0) {
_mi_writeinfo(param_1,0);
}
uVar3 = 0xffffffff;
if (param_2 != -1) {
if (*(int *)((long)param_1 + 0x1d4) < 0) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7c;
}
else {
iVar1 = _mi_put_key_in_record(param_1,*(int *)((long)param_1 + 0x1d4),1,param_3);
if (iVar1 == 0) {
*(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 2;
uVar3 = 0;
}
else {
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
}
}
}
return uVar3;
}
| |
47,101 | ma_bitmap_reset_full_page_bits | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_bitmap_reset_full_page_bits(MARIA_HA *info,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page,
uint page_count)
{
ulonglong bitmap_page;
uint offset, bit_start, bit_count, tmp, byte_offset;
uchar *data;
DBUG_ENTER("_ma_bitmap_reset_full_page_bits");
DBUG_PRINT("enter", ("page: %lu page_count: %u", (ulong) page, page_count));
mysql_mutex_assert_owner(&info->s->bitmap.bitmap_lock);
bitmap_page= page - page % bitmap->pages_covered;
DBUG_ASSERT(page != bitmap_page);
if (bitmap_page != bitmap->page &&
_ma_change_bitmap_page(info, bitmap, bitmap_page))
DBUG_RETURN(1);
/* Find page number from start of bitmap */
offset= (uint) (page - bitmap->page - 1);
/* Clear bits from 'page * 3' -> '(page + page_count) * 3' */
bit_start= offset * 3;
bit_count= page_count * 3;
byte_offset= bit_start/8;
data= bitmap->map + byte_offset;
offset= bit_start & 7;
tmp= (255 << offset); /* Bits to keep */
if (bit_count + offset < 8)
{
/* Only clear bits between 'offset' and 'offset+bit_count-1' */
tmp^= (255 << (offset + bit_count));
}
*data&= ~tmp;
set_if_smaller(bitmap->full_head_size, byte_offset);
set_if_smaller(bitmap->full_tail_size, byte_offset);
if ((int) (bit_count-= (8 - offset)) > 0)
{
uint fill;
data++;
/*
-1 is here to avoid one 'if' statement and to let the following code
handle the last byte
*/
if ((fill= (bit_count - 1) / 8))
{
bzero(data, fill);
data+= fill;
}
bit_count-= fill * 8; /* Bits left to clear */
tmp= (1 << bit_count) - 1;
*data&= ~tmp;
}
set_if_smaller(info->s->state.first_bitmap_with_space, bitmap_page);
bitmap->changed= 1;
DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap););
DBUG_RETURN(0);
} | O0 | c | ma_bitmap_reset_full_page_bits:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
jmp 0x43439
jmp 0x4343b
jmp 0x4343d
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
movq -0x60(%rbp), %rax
subq %rdx, %rax
movq %rax, -0x30(%rbp)
jmp 0x43463
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x43495
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x43160
movsbl %al, %eax
cmpl $0x0, %eax
je 0x43495
jmp 0x4348c
movb $0x1, -0x1(%rbp)
jmp 0x43603
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq 0x10(%rcx), %rax
subq $0x1, %rax
movl %eax, -0x34(%rbp)
imull $0x3, -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
imull $0x3, -0x24(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x38(%rbp), %eax
shrl $0x3, %eax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x44(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl -0x38(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %ecx
movl $0xff, %eax
shll %cl, %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
addl -0x34(%rbp), %eax
cmpl $0x8, %eax
jae 0x43505
movl -0x34(%rbp), %ecx
addl -0x3c(%rbp), %ecx
movl $0xff, %eax
shll %cl, %eax
xorl -0x40(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %edx
xorl $-0x1, %edx
movq -0x50(%rbp), %rax
movzbl (%rax), %ecx
andl %edx, %ecx
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
cmpl -0x44(%rbp), %eax
jbe 0x4352c
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x28(%rax)
jmp 0x4352e
jmp 0x43530
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
cmpl -0x44(%rbp), %eax
jbe 0x43546
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2c(%rax)
jmp 0x43548
movl $0x8, %ecx
subl -0x34(%rbp), %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
jle 0x435c9
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movl -0x3c(%rbp), %eax
subl $0x1, %eax
shrl $0x3, %eax
movl %eax, -0x54(%rbp)
cmpl $0x0, %eax
je 0x4359a
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movl -0x54(%rbp), %ecx
movq -0x50(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movl -0x54(%rbp), %ecx
shll $0x3, %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %edx
xorl $-0x1, %edx
movq -0x50(%rbp), %rax
movzbl (%rax), %ecx
andl %edx, %ecx
movb %cl, (%rax)
jmp 0x435cb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0xd0(%rax), %rax
cmpq -0x30(%rbp), %rax
jbe 0x435f1
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0xd0(%rax)
jmp 0x435f3
movq -0x18(%rbp), %rax
movb $0x1, 0x20(%rax)
jmp 0x435fd
jmp 0x435ff
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_bitmap_reset_full_page_bits:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
jmp short $+2
loc_43439:
jmp short $+2
loc_4343B:
jmp short $+2
loc_4343D:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
xor edx, edx
div qword ptr [rcx+138h]
mov rax, [rbp+var_60]
sub rax, rdx
mov [rbp+var_30], rax
jmp short $+2
loc_43463:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
cmp rax, [rcx+10h]
jz short loc_43495
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
call _ma_change_bitmap_page
movsx eax, al
cmp eax, 0
jz short loc_43495
jmp short $+2
loc_4348C:
mov [rbp+var_1], 1
jmp loc_43603
loc_43495:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, [rcx+10h]
sub rax, 1
mov [rbp+var_34], eax
imul eax, [rbp+var_34], 3
mov [rbp+var_38], eax
imul eax, [rbp+var_24], 3
mov [rbp+var_3C], eax
mov eax, [rbp+var_38]
shr eax, 3
mov [rbp+var_44], eax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov ecx, [rbp+var_44]
add rax, rcx
mov [rbp+var_50], rax
mov eax, [rbp+var_38]
and eax, 7
mov [rbp+var_34], eax
mov ecx, [rbp+var_34]
mov eax, 0FFh
shl eax, cl
mov [rbp+var_40], eax
mov eax, [rbp+var_3C]
add eax, [rbp+var_34]
cmp eax, 8
jnb short loc_43505
mov ecx, [rbp+var_34]
add ecx, [rbp+var_3C]
mov eax, 0FFh
shl eax, cl
xor eax, [rbp+var_40]
mov [rbp+var_40], eax
loc_43505:
mov edx, [rbp+var_40]
xor edx, 0FFFFFFFFh
mov rax, [rbp+var_50]
movzx ecx, byte ptr [rax]
and ecx, edx
mov [rax], cl
mov rax, [rbp+var_18]
mov eax, [rax+28h]
cmp eax, [rbp+var_44]
jbe short loc_4352C
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
mov [rax+28h], ecx
loc_4352C:
jmp short $+2
loc_4352E:
jmp short $+2
loc_43530:
mov rax, [rbp+var_18]
mov eax, [rax+2Ch]
cmp eax, [rbp+var_44]
jbe short loc_43546
mov ecx, [rbp+var_44]
mov rax, [rbp+var_18]
mov [rax+2Ch], ecx
loc_43546:
jmp short $+2
loc_43548:
mov ecx, 8
sub ecx, [rbp+var_34]
mov eax, [rbp+var_3C]
sub eax, ecx
mov [rbp+var_3C], eax
cmp eax, 0
jle short loc_435C9
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
mov eax, [rbp+var_3C]
sub eax, 1
shr eax, 3
mov [rbp+var_54], eax
cmp eax, 0
jz short loc_4359A
mov rdi, [rbp+var_50]
mov eax, [rbp+var_54]
mov edx, eax
xor esi, esi
call _memset
mov ecx, [rbp+var_54]
mov rax, [rbp+var_50]
mov ecx, ecx
add rax, rcx
mov [rbp+var_50], rax
loc_4359A:
mov ecx, [rbp+var_54]
shl ecx, 3
mov eax, [rbp+var_3C]
sub eax, ecx
mov [rbp+var_3C], eax
mov ecx, [rbp+var_3C]
mov eax, 1
shl eax, cl
sub eax, 1
mov [rbp+var_40], eax
mov edx, [rbp+var_40]
xor edx, 0FFFFFFFFh
mov rax, [rbp+var_50]
movzx ecx, byte ptr [rax]
and ecx, edx
mov [rax], cl
loc_435C9:
jmp short $+2
loc_435CB:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+0D0h]
cmp rax, [rbp+var_30]
jbe short loc_435F1
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+0D0h], rcx
loc_435F1:
jmp short $+2
loc_435F3:
mov rax, [rbp+var_18]
mov byte ptr [rax+20h], 1
jmp short $+2
loc_435FD:
jmp short $+2
loc_435FF:
mov [rbp+var_1], 0
loc_43603:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| char ma_bitmap_reset_full_page_bits(long long *a1, long long a2, unsigned long long a3, int a4)
{
unsigned int v5; // [rsp+Ch] [rbp-54h]
_BYTE *v6; // [rsp+10h] [rbp-50h]
_BYTE *v7; // [rsp+10h] [rbp-50h]
unsigned int v8; // [rsp+1Ch] [rbp-44h]
int v9; // [rsp+20h] [rbp-40h]
int v10; // [rsp+24h] [rbp-3Ch]
int v11; // [rsp+24h] [rbp-3Ch]
int v12; // [rsp+2Ch] [rbp-34h]
int v13; // [rsp+2Ch] [rbp-34h]
unsigned long long v14; // [rsp+30h] [rbp-30h]
int v16; // [rsp+40h] [rbp-20h]
v16 = a3;
v14 = a3 - a3 % *(_QWORD *)(a2 + 312);
if ( v14 != *(_QWORD *)(a2 + 16) && ma_change_bitmap_page(a1, a2, v14) )
return 1;
v12 = v16 - *(_DWORD *)(a2 + 16) - 1;
v10 = 3 * a4;
v8 = (unsigned int)(3 * v12) >> 3;
v6 = (_BYTE *)(v8 + *(_QWORD *)(a2 + 8));
v13 = (3 * (_BYTE)v12) & 7;
v9 = 255 << v13;
if ( (unsigned int)(v13 + 3 * a4) < 8 )
v9 ^= 255 << (v10 + v13);
*v6 &= ~(_BYTE)v9;
if ( *(_DWORD *)(a2 + 40) > v8 )
*(_DWORD *)(a2 + 40) = v8;
if ( *(_DWORD *)(a2 + 44) > v8 )
*(_DWORD *)(a2 + 44) = v8;
v11 = v10 - (8 - v13);
if ( v11 > 0 )
{
v7 = v6 + 1;
v5 = (unsigned int)(v11 - 1) >> 3;
if ( v5 )
{
memset(v7, 0LL, v5);
v7 += v5;
}
*v7 &= ~((1 << (v11 - 8 * v5)) - 1);
}
if ( *(_QWORD *)(*a1 + 208) > v14 )
*(_QWORD *)(*a1 + 208) = v14;
*(_BYTE *)(a2 + 32) = 1;
return 0;
}
| _ma_bitmap_reset_full_page_bits:
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 dword ptr [RBP + -0x24],ECX
JMP 0x00143439
LAB_00143439:
JMP 0x0014343b
LAB_0014343b:
JMP 0x0014343d
LAB_0014343d:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV qword ptr [RCX + 0x138]
MOV RAX,qword ptr [RBP + -0x60]
SUB RAX,RDX
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00143463
LAB_00143463:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x00143495
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00143160
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00143495
JMP 0x0014348c
LAB_0014348c:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00143603
LAB_00143495:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RCX + 0x10]
SUB RAX,0x1
MOV dword ptr [RBP + -0x34],EAX
IMUL EAX,dword ptr [RBP + -0x34],0x3
MOV dword ptr [RBP + -0x38],EAX
IMUL EAX,dword ptr [RBP + -0x24],0x3
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x38]
SHR EAX,0x3
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x38]
AND EAX,0x7
MOV dword ptr [RBP + -0x34],EAX
MOV ECX,dword ptr [RBP + -0x34]
MOV EAX,0xff
SHL EAX,CL
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,dword ptr [RBP + -0x34]
CMP EAX,0x8
JNC 0x00143505
MOV ECX,dword ptr [RBP + -0x34]
ADD ECX,dword ptr [RBP + -0x3c]
MOV EAX,0xff
SHL EAX,CL
XOR EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x40],EAX
LAB_00143505:
MOV EDX,dword ptr [RBP + -0x40]
XOR EDX,0xffffffff
MOV RAX,qword ptr [RBP + -0x50]
MOVZX ECX,byte ptr [RAX]
AND ECX,EDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x0014352c
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x28],ECX
LAB_0014352c:
JMP 0x0014352e
LAB_0014352e:
JMP 0x00143530
LAB_00143530:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x2c]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x00143546
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2c],ECX
LAB_00143546:
JMP 0x00143548
LAB_00143548:
MOV ECX,0x8
SUB ECX,dword ptr [RBP + -0x34]
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
JLE 0x001435c9
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x1
SHR EAX,0x3
MOV dword ptr [RBP + -0x54],EAX
CMP EAX,0x0
JZ 0x0014359a
MOV RDI,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x54]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV ECX,dword ptr [RBP + -0x54]
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
LAB_0014359a:
MOV ECX,dword ptr [RBP + -0x54]
SHL ECX,0x3
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
MOV ECX,dword ptr [RBP + -0x3c]
MOV EAX,0x1
SHL EAX,CL
SUB EAX,0x1
MOV dword ptr [RBP + -0x40],EAX
MOV EDX,dword ptr [RBP + -0x40]
XOR EDX,0xffffffff
MOV RAX,qword ptr [RBP + -0x50]
MOVZX ECX,byte ptr [RAX]
AND ECX,EDX
MOV byte ptr [RAX],CL
LAB_001435c9:
JMP 0x001435cb
LAB_001435cb:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xd0]
CMP RAX,qword ptr [RBP + -0x30]
JBE 0x001435f1
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0xd0],RCX
LAB_001435f1:
JMP 0x001435f3
LAB_001435f3:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x20],0x1
JMP 0x001435fd
LAB_001435fd:
JMP 0x001435ff
LAB_001435ff:
MOV byte ptr [RBP + -0x1],0x0
LAB_00143603:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int1 _ma_bitmap_reset_full_page_bits(long *param_1,long param_2,ulong param_3,int param_4)
{
char cVar1;
uint uVar2;
uint uVar3;
ulong uVar4;
byte *local_58;
byte local_48;
uVar4 = param_3 - param_3 % *(ulong *)(param_2 + 0x138);
if ((uVar4 != *(ulong *)(param_2 + 0x10)) &&
(cVar1 = _ma_change_bitmap_page(param_1,param_2,uVar4), cVar1 != '\0')) {
return 1;
}
uVar2 = (((int)param_3 - (int)*(int8 *)(param_2 + 0x10)) + -1) * 3;
param_4 = param_4 * 3;
uVar3 = uVar2 >> 3;
local_58 = (byte *)(*(long *)(param_2 + 8) + (ulong)uVar3);
uVar2 = uVar2 & 7;
local_48 = (byte)(0xff << (sbyte)uVar2);
if (param_4 + uVar2 < 8) {
local_48 = (byte)(0xff << ((sbyte)uVar2 + (char)param_4 & 0x1fU)) ^ local_48;
}
*local_58 = *local_58 & (local_48 ^ 0xff);
if (uVar3 < *(uint *)(param_2 + 0x28)) {
*(uint *)(param_2 + 0x28) = uVar3;
}
if (uVar3 < *(uint *)(param_2 + 0x2c)) {
*(uint *)(param_2 + 0x2c) = uVar3;
}
param_4 = param_4 - (8 - uVar2);
if (0 < param_4) {
local_58 = local_58 + 1;
uVar3 = param_4 - 1U >> 3;
if (uVar3 != 0) {
memset(local_58,0,(ulong)uVar3);
local_58 = local_58 + uVar3;
}
*local_58 = *local_58 & ((char)(1 << ((char)param_4 + (char)uVar3 * -8 & 0x1fU)) - 1U ^ 0xff);
}
if (uVar4 < *(ulong *)(*param_1 + 0xd0)) {
*(ulong *)(*param_1 + 0xd0) = uVar4;
}
*(int1 *)(param_2 + 0x20) = 1;
return 0;
}
| |
47,102 | js_std_open | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_open(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *filename, *mode = NULL;
FILE *f;
int err;
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
goto fail;
mode = JS_ToCString(ctx, argv[1]);
if (!mode)
goto fail;
if (mode[strspn(mode, "rwa+bx")] != '\0') {
JS_ThrowTypeError(ctx, "invalid file mode");
goto fail;
}
f = fopen(filename, mode);
if (!f)
err = errno;
else
err = 0;
if (argc >= 3)
js_set_error_object(ctx, argv[2], err);
JS_FreeCString(ctx, filename);
JS_FreeCString(ctx, mode);
if (!f)
return JS_NULL;
return js_new_std_file(ctx, f, FALSE);
fail:
JS_FreeCString(ctx, filename);
JS_FreeCString(ctx, mode);
return JS_EXCEPTION;
} | O0 | c | js_std_open:
subq $0x78, %rsp
movq %rsi, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq %rdi, 0x50(%rsp)
movl %ecx, 0x4c(%rsp)
movq %r8, 0x40(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x147e0
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x15fcd
jmp 0x160ed
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
callq 0x147e0
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x15ff6
jmp 0x160ed
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
leaq 0xf3e16(%rip), %rsi # 0x109e22
callq 0xe3f0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x16044
movq 0x50(%rsp), %rdi
leaq 0xf3dfb(%rip), %rsi # 0x109e29
movb $0x0, %al
callq 0x2d300
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
jmp 0x160ed
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0xe7c0
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x1606d
callq 0xe0b0
movl (%rax), %eax
movl %eax, 0x24(%rsp)
jmp 0x16075
movl $0x0, 0x24(%rsp)
cmpl $0x3, 0x4c(%rsp)
jl 0x16097
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rax
movl 0x24(%rsp), %ecx
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
callq 0x16870
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x29e50
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x29e50
cmpq $0x0, 0x28(%rsp)
jne 0x160d0
movl $0x0, 0x68(%rsp)
movq $0x2, 0x70(%rsp)
jmp 0x1611c
movq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rsi
xorl %edx, %edx
callq 0x126c0
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
jmp 0x1611c
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x29e50
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x29e50
movl $0x0, 0x68(%rsp)
movq $0x6, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
nopl (%rax,%rax)
| js_std_open:
sub rsp, 78h
mov [rsp+78h+var_20], rsi
mov [rsp+78h+var_18], rdx
mov [rsp+78h+var_28], rdi
mov [rsp+78h+var_2C], ecx
mov [rsp+78h+var_38], r8
mov [rsp+78h+var_48], 0
mov rdi, [rsp+78h+var_28]
mov rax, [rsp+78h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+78h+var_40], rax
cmp [rsp+78h+var_40], 0
jnz short loc_15FCD
jmp loc_160ED
loc_15FCD:
mov rdi, [rsp+78h+var_28]
mov rax, [rsp+78h+var_38]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
call JS_ToCString
mov [rsp+78h+var_48], rax
cmp [rsp+78h+var_48], 0
jnz short loc_15FF6
jmp loc_160ED
loc_15FF6:
mov rax, [rsp+78h+var_48]
mov [rsp+78h+var_70], rax
mov rdi, [rsp+78h+var_48]
lea rsi, aRwaBx; "rwa+bx"
call _strspn
mov rcx, rax
mov rax, [rsp+78h+var_70]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0
jz short loc_16044
mov rdi, [rsp+78h+var_28]
lea rsi, aInvalidFileMod; "invalid file mode"
mov al, 0
call JS_ThrowTypeError
mov [rsp+78h+var_68], rax
mov [rsp+78h+var_60], rdx
jmp loc_160ED
loc_16044:
mov rdi, [rsp+78h+var_40]
mov rsi, [rsp+78h+var_48]
call _fopen
mov [rsp+78h+var_50], rax
cmp [rsp+78h+var_50], 0
jnz short loc_1606D
call ___errno_location
mov eax, [rax]
mov [rsp+78h+var_54], eax
jmp short loc_16075
loc_1606D:
mov [rsp+78h+var_54], 0
loc_16075:
cmp [rsp+78h+var_2C], 3
jl short loc_16097
mov rdi, [rsp+78h+var_28]
mov rax, [rsp+78h+var_38]
mov ecx, [rsp+78h+var_54]
mov rsi, [rax+20h]
mov rdx, [rax+28h]
call js_set_error_object
loc_16097:
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_40]
call JS_FreeCString
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_48]
call JS_FreeCString
cmp [rsp+78h+var_50], 0
jnz short loc_160D0
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 2
jmp short loc_1611C
loc_160D0:
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_50]
xor edx, edx
call js_new_std_file
mov [rsp+78h+var_10], rax
mov [rsp+78h+var_8], rdx
jmp short loc_1611C
loc_160ED:
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_40]
call JS_FreeCString
mov rdi, [rsp+78h+var_28]
mov rsi, [rsp+78h+var_48]
call JS_FreeCString
mov dword ptr [rsp+78h+var_10], 0
mov [rsp+78h+var_8], 6
loc_1611C:
mov rax, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_8]
add rsp, 78h
retn
| long long js_std_open(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v5; // rax
int v6; // edx
int v7; // r8d
int v8; // r9d
_BYTE v10[12]; // [rsp+24h] [rbp-54h]
long long v11; // [rsp+30h] [rbp-48h]
long long v12; // [rsp+38h] [rbp-40h]
long long v15; // [rsp+68h] [rbp-10h]
v11 = 0LL;
v12 = JS_ToCString(a1, *a5, a5[1]);
if ( !v12 )
goto LABEL_13;
v11 = JS_ToCString(a1, a5[2], a5[3]);
if ( !v11 )
goto LABEL_13;
v5 = strspn(v11, "rwa+bx");
if ( *(_BYTE *)(v11 + v5) )
{
JS_ThrowTypeError(a1, (unsigned int)"invalid file mode", v6, v5, v7, v8);
LABEL_13:
JS_FreeCString(a1, v12);
JS_FreeCString(a1, v11);
LODWORD(v15) = 0;
return v15;
}
*(_QWORD *)&v10[4] = fopen(v12, v11);
if ( *(_QWORD *)&v10[4] )
*(_DWORD *)v10 = 0;
else
*(_QWORD *)v10 = *(unsigned int *)__errno_location();
if ( a4 >= 3 )
js_set_error_object(a1, a5[4], a5[5], *(unsigned int *)v10);
JS_FreeCString(a1, v12);
JS_FreeCString(a1, v11);
if ( *(_QWORD *)&v10[4] )
return js_new_std_file(a1, *(long long *)&v10[4], 0);
LODWORD(v15) = 0;
return v15;
}
| js_std_open:
SUB RSP,0x78
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x50],RDI
MOV dword ptr [RSP + 0x4c],ECX
MOV qword ptr [RSP + 0x40],R8
MOV qword ptr [RSP + 0x30],0x0
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001147e0
MOV qword ptr [RSP + 0x38],RAX
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x00115fcd
JMP 0x001160ed
LAB_00115fcd:
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x001147e0
MOV qword ptr [RSP + 0x30],RAX
CMP qword ptr [RSP + 0x30],0x0
JNZ 0x00115ff6
JMP 0x001160ed
LAB_00115ff6:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[0x209e22]
CALL 0x0010e3f0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x0
JZ 0x00116044
MOV RDI,qword ptr [RSP + 0x50]
LEA RSI,[0x209e29]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
JMP 0x001160ed
LAB_00116044:
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x0010e7c0
MOV qword ptr [RSP + 0x28],RAX
CMP qword ptr [RSP + 0x28],0x0
JNZ 0x0011606d
CALL 0x0010e0b0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x24],EAX
JMP 0x00116075
LAB_0011606d:
MOV dword ptr [RSP + 0x24],0x0
LAB_00116075:
CMP dword ptr [RSP + 0x4c],0x3
JL 0x00116097
MOV RDI,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x40]
MOV ECX,dword ptr [RSP + 0x24]
MOV RSI,qword ptr [RAX + 0x20]
MOV RDX,qword ptr [RAX + 0x28]
CALL 0x00116870
LAB_00116097:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00129e50
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00129e50
CMP qword ptr [RSP + 0x28],0x0
JNZ 0x001160d0
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x2
JMP 0x0011611c
LAB_001160d0:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x28]
XOR EDX,EDX
CALL 0x001126c0
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
JMP 0x0011611c
LAB_001160ed:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00129e50
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00129e50
MOV dword ptr [RSP + 0x68],0x0
MOV qword ptr [RSP + 0x70],0x6
LAB_0011611c:
MOV RAX,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
ADD RSP,0x78
RET
|
int1 [16]
js_std_open(int8 param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5
)
{
char *__filename;
size_t sVar1;
FILE *pFVar2;
int *piVar3;
int1 auVar4 [16];
int local_54;
char *local_48;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_48 = (char *)0x0;
__filename = (char *)JS_ToCString(param_1,*param_5,param_5[1]);
if ((__filename != (char *)0x0) &&
(local_48 = (char *)JS_ToCString(param_1,param_5[2],param_5[3]), local_48 != (char *)0x0)) {
sVar1 = strspn(local_48,"rwa+bx");
if (local_48[sVar1] == '\0') {
pFVar2 = fopen(__filename,local_48);
if (pFVar2 == (FILE *)0x0) {
piVar3 = __errno_location();
local_54 = *piVar3;
}
else {
local_54 = 0;
}
if (2 < param_4) {
js_set_error_object(param_1,param_5[4],param_5[5],local_54);
}
JS_FreeCString(param_1,__filename);
JS_FreeCString(param_1,local_48);
if (pFVar2 == (FILE *)0x0) {
local_10 = 0;
local_8 = 2;
}
else {
auVar4 = js_new_std_file(param_1,pFVar2,0);
local_8 = auVar4._8_8_;
local_10 = auVar4._0_4_;
uStack_c = auVar4._4_4_;
}
goto LAB_0011611c;
}
JS_ThrowTypeError(param_1,"invalid file mode");
}
JS_FreeCString(param_1,__filename);
JS_FreeCString(param_1,local_48);
local_10 = 0;
local_8 = 6;
LAB_0011611c:
auVar4._4_4_ = uStack_c;
auVar4._0_4_ = local_10;
auVar4._8_8_ = local_8;
return auVar4;
}
| |
47,103 | js_std_open | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_open(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
const char *filename, *mode = NULL;
FILE *f;
int err;
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
goto fail;
mode = JS_ToCString(ctx, argv[1]);
if (!mode)
goto fail;
if (mode[strspn(mode, "rwa+bx")] != '\0') {
JS_ThrowTypeError(ctx, "invalid file mode");
goto fail;
}
f = fopen(filename, mode);
if (!f)
err = errno;
else
err = 0;
if (argc >= 3)
js_set_error_object(ctx, argv[2], err);
JS_FreeCString(ctx, filename);
JS_FreeCString(ctx, mode);
if (!f)
return JS_NULL;
return js_new_std_file(ctx, f, FALSE);
fail:
JS_FreeCString(ctx, filename);
JS_FreeCString(ctx, mode);
return JS_EXCEPTION;
} | O2 | c | js_std_open:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movl %ecx, %ebp
movq %rdi, %rbx
movq (%r8), %rsi
movq 0x8(%r8), %rdx
callq 0x11a6c
movq %rax, %r14
testq %rax, %rax
je 0x1270a
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
movq %rbx, %rdi
callq 0x11a6c
testq %rax, %rax
je 0x1270a
movq %rax, %r15
leaq 0x705cb(%rip), %rsi # 0x82cb3
movq %rax, %rdi
callq 0xe400
cmpb $0x0, (%r15,%rax)
je 0x1273c
leaq 0x705bc(%rip), %rsi # 0x82cba
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1c64d
jmp 0x1270d
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1b057
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b057
pushq $0x6
popq %rdx
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %r15, %rsi
callq 0xe7f0
movq %rax, %r13
xorl %ecx, %ecx
testq %rax, %rax
jne 0x12758
callq 0xe0b0
movl (%rax), %ecx
cmpl $0x3, %ebp
jl 0x1276f
movq 0x20(%r12), %rsi
movq 0x28(%r12), %rdx
movq %rbx, %rdi
callq 0x12b1d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1b057
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b057
testq %r13, %r13
je 0x127a8
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x10c2a
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %eax
jmp 0x1272a
xorl %eax, %eax
pushq $0x2
popq %rdx
jmp 0x12728
| js_std_open:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, r8
mov ebp, ecx
mov rbx, rdi
mov rsi, [r8]
mov rdx, [r8+8]
call JS_ToCString
mov r14, rax
test rax, rax
jz short loc_1270A
mov rsi, [r12+10h]
mov rdx, [r12+18h]
mov rdi, rbx
call JS_ToCString
test rax, rax
jz short loc_1270A
mov r15, rax
lea rsi, aRwaBx; "rwa+bx"
mov rdi, rax
call _strspn
cmp byte ptr [r15+rax], 0
jz short loc_1273C
lea rsi, aInvalidFileMod; "invalid file mode"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
jmp short loc_1270D
loc_1270A:
xor r15d, r15d
loc_1270D:
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
mov rdi, rbx
mov rsi, r15
call JS_FreeCString
push 6
pop rdx
xor eax, eax
loc_12728:
xor ecx, ecx
loc_1272A:
or rax, rcx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1273C:
mov rdi, r14
mov rsi, r15
call _fopen
mov r13, rax
xor ecx, ecx
test rax, rax
jnz short loc_12758
call ___errno_location
mov ecx, [rax]
loc_12758:
cmp ebp, 3
jl short loc_1276F
mov rsi, [r12+20h]
mov rdx, [r12+28h]
mov rdi, rbx
call js_set_error_object
loc_1276F:
mov rdi, rbx
mov rsi, r14
call JS_FreeCString
mov rdi, rbx
mov rsi, r15
call JS_FreeCString
test r13, r13
jz short loc_127A8
mov rdi, rbx
mov rsi, r13
xor edx, edx
call js_new_std_file
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov eax, eax
jmp short loc_1272A
loc_127A8:
xor eax, eax
push 2
pop rdx
jmp loc_12728
| unsigned long long js_std_open(long long a1, long long a2, long long a3, int a4, long long *a5)
{
long long v7; // r14
long long v8; // rax
long long v9; // r15
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
unsigned long long v14; // rax
unsigned long long v15; // rcx
long long v17; // r13
long long v18; // rcx
v7 = JS_ToCString(a1, *a5, a5[1]);
if ( !v7 || (v8 = JS_ToCString(a1, a5[2], a5[3])) == 0 )
{
v9 = 0LL;
goto LABEL_6;
}
v9 = v8;
if ( *(_BYTE *)(v8 + strspn(v8, "rwa+bx")) )
{
JS_ThrowTypeError(a1, (unsigned int)"invalid file mode", v10, v11, v12, v13);
LABEL_6:
JS_FreeCString(a1, v7);
JS_FreeCString(a1, v9);
v14 = 0LL;
goto LABEL_7;
}
v17 = fopen(v7, v9);
v18 = 0LL;
if ( !v17 )
v18 = *(unsigned int *)__errno_location(v7);
if ( a4 >= 3 )
js_set_error_object(a1, a5[4], a5[5], v18);
JS_FreeCString(a1, v7);
JS_FreeCString(a1, v9);
if ( v17 )
{
v14 = js_new_std_file(a1, v17, 0);
v15 = v14 & 0xFFFFFFFF00000000LL;
v14 = (unsigned int)v14;
return v15 | v14;
}
v14 = 0LL;
LABEL_7:
v15 = 0LL;
return v15 | v14;
}
| js_std_open:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,R8
MOV EBP,ECX
MOV RBX,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
CALL 0x00111a6c
MOV R14,RAX
TEST RAX,RAX
JZ 0x0011270a
MOV RSI,qword ptr [R12 + 0x10]
MOV RDX,qword ptr [R12 + 0x18]
MOV RDI,RBX
CALL 0x00111a6c
TEST RAX,RAX
JZ 0x0011270a
MOV R15,RAX
LEA RSI,[0x182cb3]
MOV RDI,RAX
CALL 0x0010e400
CMP byte ptr [R15 + RAX*0x1],0x0
JZ 0x0011273c
LEA RSI,[0x182cba]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011c64d
JMP 0x0011270d
LAB_0011270a:
XOR R15D,R15D
LAB_0011270d:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011b057
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011b057
PUSH 0x6
POP RDX
XOR EAX,EAX
LAB_00112728:
XOR ECX,ECX
LAB_0011272a:
OR RAX,RCX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011273c:
MOV RDI,R14
MOV RSI,R15
CALL 0x0010e7f0
MOV R13,RAX
XOR ECX,ECX
TEST RAX,RAX
JNZ 0x00112758
CALL 0x0010e0b0
MOV ECX,dword ptr [RAX]
LAB_00112758:
CMP EBP,0x3
JL 0x0011276f
MOV RSI,qword ptr [R12 + 0x20]
MOV RDX,qword ptr [R12 + 0x28]
MOV RDI,RBX
CALL 0x00112b1d
LAB_0011276f:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011b057
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011b057
TEST R13,R13
JZ 0x001127a8
MOV RDI,RBX
MOV RSI,R13
XOR EDX,EDX
CALL 0x00110c2a
MOV RCX,-0x100000000
AND RCX,RAX
MOV EAX,EAX
JMP 0x0011272a
LAB_001127a8:
XOR EAX,EAX
PUSH 0x2
POP RDX
JMP 0x00112728
|
ulong js_std_open(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
char *__filename;
char *__s;
size_t sVar1;
FILE *pFVar2;
int *piVar3;
ulong uVar4;
int iVar5;
ulong uVar6;
__filename = (char *)JS_ToCString(param_1,*param_5,param_5[1]);
if ((__filename == (char *)0x0) ||
(__s = (char *)JS_ToCString(param_1,param_5[2],param_5[3]), __s == (char *)0x0)) {
__s = (char *)0x0;
LAB_0011270d:
JS_FreeCString(param_1,__filename);
JS_FreeCString(param_1,__s);
}
else {
sVar1 = strspn(__s,"rwa+bx");
if (__s[sVar1] != '\0') {
JS_ThrowTypeError(param_1,"invalid file mode");
goto LAB_0011270d;
}
pFVar2 = fopen(__filename,__s);
iVar5 = 0;
if (pFVar2 == (FILE *)0x0) {
piVar3 = __errno_location();
iVar5 = *piVar3;
}
if (2 < param_4) {
js_set_error_object(param_1,param_5[4],param_5[5],iVar5);
}
JS_FreeCString(param_1,__filename);
JS_FreeCString(param_1,__s);
if (pFVar2 != (FILE *)0x0) {
uVar4 = js_new_std_file(param_1,pFVar2,0);
uVar6 = uVar4 & 0xffffffff00000000;
uVar4 = uVar4 & 0xffffffff;
goto LAB_0011272a;
}
}
uVar4 = 0;
uVar6 = 0;
LAB_0011272a:
return uVar4 | uVar6;
}
| |
47,104 | parameter_create | tsotchke[P]eshkol/src/frontend/ast/parameter.c | Parameter* parameter_create(Arena* arena, StringId name, Type* type, size_t line, size_t column) {
assert(arena != NULL);
assert(name != NULL);
Parameter* param = arena_alloc(arena, sizeof(Parameter));
if (!param) {
return NULL;
}
param->name = name;
param->type = type; // Can be NULL for untyped parameters
param->line = line;
param->column = column;
return param;
} | O0 | c | parameter_create:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xaee5
jmp 0xaf04
leaq 0x442f(%rip), %rdi # 0xf31b
leaq 0x6de1(%rip), %rsi # 0x11cd4
movl $0x14, %edx
leaq 0x6e2c(%rip), %rcx # 0x11d2b
callq 0x10a0
cmpq $0x0, -0x18(%rbp)
je 0xaf0d
jmp 0xaf2c
leaq 0x6e5e(%rip), %rdi # 0x11d72
leaq 0x6db9(%rip), %rsi # 0x11cd4
movl $0x15, %edx
leaq 0x6e04(%rip), %rcx # 0x11d2b
callq 0x10a0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
callq 0x3a90
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xaf4f
movq $0x0, -0x8(%rbp)
jmp 0xaf86
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
| parameter_create:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
cmp [rbp+var_10], 0
jz short loc_AEE5
jmp short loc_AF04
loc_AEE5:
lea rdi, aArenaNull+1; "arena != NULL"
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov edx, 14h
lea rcx, aParameterParam; "Parameter *parameter_create(Arena *, St"...
call ___assert_fail
loc_AF04:
cmp [rbp+var_18], 0
jz short loc_AF0D
jmp short loc_AF2C
loc_AF0D:
lea rdi, aNameNull; "name != NULL"
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov edx, 15h
lea rcx, aParameterParam; "Parameter *parameter_create(Arena *, St"...
call ___assert_fail
loc_AF2C:
mov rdi, [rbp+var_10]
mov esi, 20h ; ' '
call arena_alloc
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_AF4F
mov [rbp+var_8], 0
jmp short loc_AF86
loc_AF4F:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_38]
mov [rax], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_38]
mov [rax+8], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_38]
mov [rax+10h], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_38]
mov [rax+18h], rcx
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_AF86:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| _QWORD * parameter_create(long long a1, long long a2, long long a3, long long a4, long long a5)
{
_QWORD *v6; // [rsp+8h] [rbp-38h]
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/ast/parameter.c",
20LL,
"Parameter *parameter_create(Arena *, StringId, Type *, size_t, size_t)");
if ( !a2 )
__assert_fail(
"name != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/ast/parameter.c",
21LL,
"Parameter *parameter_create(Arena *, StringId, Type *, size_t, size_t)");
v6 = (_QWORD *)arena_alloc(a1, 32LL);
if ( !v6 )
return 0LL;
*v6 = a2;
v6[1] = a3;
v6[2] = a4;
v6[3] = a5;
return v6;
}
| parameter_create:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0010aee5
JMP 0x0010af04
LAB_0010aee5:
LEA RDI,[0x10f31b]
LEA RSI,[0x111cd4]
MOV EDX,0x14
LEA RCX,[0x111d2b]
CALL 0x001010a0
LAB_0010af04:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0010af0d
JMP 0x0010af2c
LAB_0010af0d:
LEA RDI,[0x111d72]
LEA RSI,[0x111cd4]
MOV EDX,0x15
LEA RCX,[0x111d2b]
CALL 0x001010a0
LAB_0010af2c:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x20
CALL 0x00103a90
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0010af4f
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010af86
LAB_0010af4f:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_0010af86:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long * parameter_create(long param_1,long param_2,long param_3,long param_4,long param_5)
{
long *local_10;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/ast/parameter.c"
,0x14,"Parameter *parameter_create(Arena *, StringId, Type *, size_t, size_t)");
}
if (param_2 != 0) {
local_10 = (long *)arena_alloc(param_1,0x20);
if (local_10 == (long *)0x0) {
local_10 = (long *)0x0;
}
else {
*local_10 = param_2;
local_10[1] = param_3;
local_10[2] = param_4;
local_10[3] = param_5;
}
return local_10;
}
/* WARNING: Subroutine does not return */
__assert_fail("name != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/ast/parameter.c"
,0x15,"Parameter *parameter_create(Arena *, StringId, Type *, size_t, size_t)");
}
| |
47,105 | blst_sk_to_pk2_in_g1 | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e1.c | void blst_sk_to_pk2_in_g1(unsigned char out[96], POINTonE1_affine *PK,
const pow256 SK)
{
POINTonE1 P[1];
POINTonE1_sign(P, &BLS12_381_G1, SK);
if (PK != NULL)
vec_copy(PK, P, sizeof(*PK));
if (out != NULL) {
limb_t sgn0_pty = POINTonE1_Serialize_BE(out, P);
out[0] |= (sgn0_pty & 2) << 4; /* pre-decorate */
out[0] |= vec_is_zero(P->Z, sizeof(P->Z)) << 6;
}
} | O0 | c | blst_sk_to_pk2_in_g1:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0xb0(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x3d727(%rip), %rsi # 0xe80f0
callq 0xaa8a0
cmpq $0x0, -0x10(%rbp)
je 0xaa9ea
movq -0x10(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x60, %edx
callq 0xa8ad0
cmpq $0x0, -0x8(%rbp)
je 0xaaa4b
movq -0x8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xaaa60
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdx
andq $0x2, %rdx
shlq $0x4, %rdx
movq -0x8(%rbp), %rax
movzbl (%rax), %ecx
orq %rdx, %rcx
movb %cl, (%rax)
leaq -0xb0(%rbp), %rdi
addq $0x60, %rdi
movl $0x30, %esi
callq 0xa8cd0
movq %rax, %rdx
shlq $0x6, %rdx
movq -0x8(%rbp), %rax
movzbl (%rax), %ecx
orq %rdx, %rcx
movb %cl, (%rax)
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| blst_sk_to_pk2_in_g1:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rdi, [rbp+var_B0]
mov rdx, [rbp+var_18]
lea rsi, BLS12_381_G1
call POINTonE1_sign
cmp [rbp+var_10], 0
jz short loc_AA9EA
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_B0]
mov edx, 60h ; '`'
call vec_copy
loc_AA9EA:
cmp [rbp+var_8], 0
jz short loc_AAA4B
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_B0]
call POINTonE1_Serialize_BE
mov [rbp+var_B8], rax
mov rdx, [rbp+var_B8]
and rdx, 2
shl rdx, 4
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax]
or rcx, rdx
mov [rax], cl
lea rdi, [rbp+var_B0]
add rdi, 60h ; '`'
mov esi, 30h ; '0'
call vec_is_zero
mov rdx, rax
shl rdx, 6
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax]
or rcx, rdx
mov [rax], cl
loc_AAA4B:
add rsp, 0C0h
pop rbp
retn
| unsigned long long blst_sk_to_pk2_in_g1(_BYTE *a1, long long a2, long long a3)
{
unsigned long long result; // rax
char v4; // dl
char v5; // [rsp+8h] [rbp-B8h]
_BYTE v6[96]; // [rsp+10h] [rbp-B0h] BYREF
_QWORD v7[8]; // [rsp+70h] [rbp-50h] BYREF
long long v8; // [rsp+B0h] [rbp-10h]
_BYTE *v9; // [rsp+B8h] [rbp-8h]
v9 = a1;
v8 = a2;
v7[7] = a3;
result = POINTonE1_sign((long long)v6, (long long)&BLS12_381_G1, a3);
if ( v8 )
result = vec_copy(v8, (long long)v6, 0x60uLL);
if ( v9 )
{
v5 = POINTonE1_Serialize_BE(v9, v6);
*v9 |= 16 * (v5 & 2);
v4 = (unsigned __int8)vec_is_zero((long long)v7, 0x30uLL) << 6;
result = (unsigned long long)v9;
*v9 |= v4;
}
return result;
}
| blst_sk_to_pk2_in_g1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RDI,[RBP + -0xb0]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x1e80f0]
CALL 0x001aa8a0
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001aa9ea
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0xb0]
MOV EDX,0x60
CALL 0x001a8ad0
LAB_001aa9ea:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001aaa4b
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0xb0]
CALL 0x001aaa60
MOV qword ptr [RBP + -0xb8],RAX
MOV RDX,qword ptr [RBP + -0xb8]
AND RDX,0x2
SHL RDX,0x4
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX]
OR RCX,RDX
MOV byte ptr [RAX],CL
LEA RDI,[RBP + -0xb0]
ADD RDI,0x60
MOV ESI,0x30
CALL 0x001a8cd0
MOV RDX,RAX
SHL RDX,0x6
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX]
OR RCX,RDX
MOV byte ptr [RAX],CL
LAB_001aaa4b:
ADD RSP,0xc0
POP RBP
RET
|
void blst_sk_to_pk2_in_g1(byte *param_1,long param_2,int8 param_3)
{
ulong uVar1;
long lVar2;
int1 local_b8 [96];
int1 auStack_58 [56];
int8 local_20;
long local_18;
byte *local_10;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
POINTonE1_sign(local_b8,BLS12_381_G1,param_3);
if (local_18 != 0) {
vec_copy(local_18,local_b8,0x60);
}
if (local_10 != (byte *)0x0) {
uVar1 = POINTonE1_Serialize_BE(local_10,local_b8);
*local_10 = *local_10 | (byte)((uVar1 & 2) << 4);
lVar2 = vec_is_zero(auStack_58,0x30);
*local_10 = *local_10 | (byte)(lVar2 << 6);
}
return;
}
| |
47,106 | strmake | eloqsql/strings/strmake.c | char *strmake(register char *dst, register const char *src, size_t length)
{
while (length--)
{
if (! (*dst++ = *src++))
{
#ifdef EXTRA_DEBUG
/*
'length' is the maximum length of the string; the buffer needs
to be one character larger to accommodate the terminating
'\0'. This is easy to get wrong, so we make sure we write to
the entire length of the buffer to identify incorrect
buffer-sizes. We only initialism the "unused" part of the
buffer here, a) for efficiency, and b) because dst==src is
allowed, so initializing the entire buffer would overwrite the
source-string. Also, we write a character rather than '\0' as
this makes spotting these problems in the results easier.
If we are using purify/valgrind, we only set one character at
end to be able to detect also wrong accesses after the end of
dst.
*/
if (length)
{
#ifdef HAVE_valgrind
dst[length-1]= 'Z';
#else
bfill(dst, length-1, (int) 'Z');
#endif /* HAVE_valgrind */
}
#endif /* EXTRA_DEBUG */
return dst-1;
}
}
*dst=0;
return dst;
} | O0 | c | strmake:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x20(%rbp)
cmpq $0x0, %rax
je 0x8bc5b
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %al
movq -0x10(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %al, (%rcx)
cmpb $0x0, %al
jne 0x8bc59
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x8bc6a
jmp 0x8bc10
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
| strmake:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
loc_8BC10:
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rcx
cmp rax, 0
jz short loc_8BC5B
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov al, [rax]
mov rcx, [rbp+var_10]
mov rdx, rcx
add rdx, 1
mov [rbp+var_10], rdx
mov [rcx], al
cmp al, 0
jnz short loc_8BC59
mov rax, [rbp+var_10]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_8], rax
jmp short loc_8BC6A
loc_8BC59:
jmp short loc_8BC10
loc_8BC5B:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_8BC6A:
mov rax, [rbp+var_8]
pop rbp
retn
| _BYTE * strmake(_BYTE *a1, _BYTE *a2, long long a3)
{
_BYTE *v4; // rax
_BYTE *v5; // rcx
while ( a3-- )
{
v4 = a2++;
LOBYTE(v4) = *v4;
v5 = a1++;
*v5 = (_BYTE)v4;
if ( !(_BYTE)v4 )
return a1 - 1;
}
*a1 = 0;
return a1;
}
| strmake:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
LAB_0018bc10:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x20],RCX
CMP RAX,0x0
JZ 0x0018bc5b
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RCX],AL
CMP AL,0x0
JNZ 0x0018bc59
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0018bc6a
LAB_0018bc59:
JMP 0x0018bc10
LAB_0018bc5b:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_0018bc6a:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
char * strmake(char *param_1,char *param_2,long param_3)
{
char cVar1;
char *pcVar2;
long local_28;
char *local_20;
char *local_18;
local_28 = param_3;
local_20 = param_2;
pcVar2 = param_1;
do {
local_18 = pcVar2;
if (local_28 == 0) {
*local_18 = '\0';
return local_18;
}
cVar1 = *local_20;
*local_18 = cVar1;
local_28 = local_28 + -1;
local_20 = local_20 + 1;
pcVar2 = local_18 + 1;
} while (cVar1 != '\0');
return local_18;
}
| |
47,107 | my_var_user::set(THD*, Item*) | eloqsql/sql/sql_class.cc | bool my_var_user::set(THD *thd, Item *item)
{
Item_func_set_user_var *suv= new (thd->mem_root) Item_func_set_user_var(thd, &name, item);
suv->save_item_result(item);
return suv->fix_fields(thd, 0) || suv->update();
} | O0 | cpp | my_var_user::set(THD*, Item*):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
movq %rsi, -0x50(%rbp)
movl $0x140, %edi # imm = 0x140
callq 0x7ee3b0
movq %rax, %rcx
movq %rcx, -0x48(%rbp)
movb $0x0, -0x21(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x40(%rbp)
je 0x888732
movq -0x48(%rbp), %rdi
movq -0x58(%rbp), %rdx
movb $0x1, -0x21(%rbp)
movq -0x10(%rbp), %rsi
addq $0x8, %rdx
movq -0x18(%rbp), %rcx
callq 0x8921a0
jmp 0x888728
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x888732
movq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xca0570
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %edx
callq *0x48(%rax)
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x59(%rbp)
jne 0x888771
movq -0x20(%rbp), %rdi
callq 0xca0660
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x888790
jmp 0x88879d
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x7ee470
jmp 0x88879f
movq -0x30(%rbp), %rdi
callq 0x7589b0
nopl (%rax,%rax)
| _ZN11my_var_user3setEP3THDP4Item:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov [rbp+var_58], rax
mov rax, [rbp+var_10]
mov rsi, [rax+28h]
mov [rbp+var_50], rsi
mov edi, 140h
call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_48], rcx
mov [rbp+var_21], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_40], rax
jz short loc_888732
mov rdi, [rbp+var_48]
mov rdx, [rbp+var_58]
mov [rbp+var_21], 1
mov rsi, [rbp+var_10]
add rdx, 8
mov rcx, [rbp+var_18]
call _ZN22Item_func_set_user_varC2EP3THDPK25st_mysql_const_lex_stringP4Item; Item_func_set_user_var::Item_func_set_user_var(THD *,st_mysql_const_lex_string const*,Item *)
jmp short $+2
loc_888728:
mov rax, [rbp+var_48]
mov [rbp+var_40], rax
jmp short $+2
loc_888732:
mov rax, [rbp+var_40]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]; this
mov rsi, [rbp+var_18]; Item *
call _ZN22Item_func_set_user_var16save_item_resultEP4Item; Item_func_set_user_var::save_item_result(Item *)
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rax, [rdi]
xor ecx, ecx
mov edx, ecx
call qword ptr [rax+48h]
mov cl, al
mov al, 1
test cl, 1
mov [rbp+var_59], al
jnz short loc_888771
mov rdi, [rbp+var_20]; this
call _ZN22Item_func_set_user_var6updateEv; Item_func_set_user_var::update(void)
mov [rbp+var_59], al
loc_888771:
mov al, [rbp+var_59]
and al, 1
add rsp, 60h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
test [rbp+var_21], 1
jnz short loc_888790
jmp short loc_88879D
loc_888790:
mov rsi, [rbp+var_50]
mov rdi, [rbp+var_48]
call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *)
loc_88879D:
jmp short $+2
loc_88879F:
mov rdi, [rbp+var_30]
call __Unwind_Resume
| char my_var_user::set(my_var_user *this, THD *a2, Item *a3)
{
char v4; // [rsp+7h] [rbp-59h]
long long v5; // [rsp+18h] [rbp-48h]
Item_func_set_user_var *v6; // [rsp+20h] [rbp-40h]
v5 = Item::operator new(320LL, *((_QWORD *)a2 + 5));
v6 = 0LL;
if ( v5 )
{
Item_func_set_user_var::Item_func_set_user_var(v5, a2, (char *)this + 8, a3);
v6 = (Item_func_set_user_var *)v5;
}
Item_func_set_user_var::save_item_result(v6, a3);
v4 = 1;
if ( ((*(long long ( **)(Item_func_set_user_var *, THD *, _QWORD))(*(_QWORD *)v6 + 72LL))(v6, a2, 0LL) & 1) == 0 )
v4 = Item_func_set_user_var::update(v6);
return v4 & 1;
}
| __cxx_global_var_init.1098:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
LEA RDI,[RBP + -0x8]
XOR ESI,ESI
MOV EDX,0xffffffff
CALL 0x00b74e50
MOV RAX,qword ptr [RBP + -0x8]
LEA RDI,[0x1df2578]
LEA RSI,[0x14b0c7e]
LEA RDX,[0x14b0c8e]
MOV ECX,0x400
LEA R8,[0x1dcf848]
LEA R9,[0x1dc9580]
SUB R8,R9
MOV R9D,0x8
XOR R10D,R10D
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],0x0
CALL 0x00b759e0
LEA RDI,[0xb75aa0]
LEA RSI,[0x1df2578]
LEA RDX,[0x1bc5008]
CALL 0x00858cf0
ADD RSP,0x40
POP RBP
RET
|
void __cxx_global_var_init_1098(void)
{
int8 local_10;
CMD_LINE::CMD_LINE((CMD_LINE *)&local_10,0,0xffffffff);
Sys_var_charptr_fscs::Sys_var_charptr
((Sys_var_charptr_fscs *)Sys_relay_log_index,"relay_log_index",
"The location and name to use for the file that keeps a list of the last relay logs.",
0x400,0x62c8,8,local_10,0,0,0,0,0,0);
__cxa_atexit(Sys_var_charptr_fscs::~Sys_var_charptr_fscs,Sys_relay_log_index,&__dso_handle);
return;
}
| |
47,108 | ggml_backend_tensor_alloc | monkey531[P]llama/ggml/src/ggml-backend.cpp | void ggml_backend_tensor_alloc(ggml_backend_buffer_t buffer, struct ggml_tensor * tensor, void * addr) {
GGML_ASSERT(tensor->buffer == NULL);
GGML_ASSERT(tensor->data == NULL);
GGML_ASSERT(tensor->view_src == NULL);
GGML_ASSERT(addr >= ggml_backend_buffer_get_base(buffer));
GGML_ASSERT((char *)addr + ggml_backend_buffer_get_alloc_size(buffer, tensor) <=
(char *)ggml_backend_buffer_get_base(buffer) + ggml_backend_buffer_get_size(buffer));
tensor->buffer = buffer;
tensor->data = addr;
ggml_backend_buffer_init_tensor(buffer, tensor);
} | O3 | cpp | ggml_backend_tensor_alloc:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x8(%rsi)
jne 0x27cd8
movq %rsi, %rbx
cmpq $0x0, 0xf8(%rsi)
jne 0x27cf4
cmpq $0x0, 0xe8(%rbx)
jne 0x27d10
movq %rdx, %r15
movq %rdi, %r14
callq 0x174e0
cmpq %r15, %rax
ja 0x27d2c
movq 0x48(%r14), %rdi
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x27c82
movq %rbx, %rsi
callq *%rax
jmp 0x27c8a
movq %rbx, %rdi
callq 0x161c0
movq %rax, %r12
addq %r15, %r12
movq %r14, %rdi
callq 0x174e0
addq 0x58(%r14), %rax
cmpq %rax, %r12
ja 0x27d48
movq %r14, 0x8(%rbx)
movq %r15, 0xf8(%rbx)
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x27ccc
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2559f(%rip), %rdi # 0x4d27e
leaq 0x22977(%rip), %rdx # 0x4a65d
leaq 0x25a89(%rip), %rcx # 0x4d776
movl $0x678, %esi # imm = 0x678
jmp 0x27d62
leaq 0x25583(%rip), %rdi # 0x4d27e
leaq 0x2295b(%rip), %rdx # 0x4a65d
leaq 0x25add(%rip), %rcx # 0x4d7e6
movl $0x679, %esi # imm = 0x679
jmp 0x27d62
leaq 0x25567(%rip), %rdi # 0x4d27e
leaq 0x2293f(%rip), %rdx # 0x4a65d
leaq 0x25ad6(%rip), %rcx # 0x4d7fb
movl $0x67a, %esi # imm = 0x67A
jmp 0x27d62
leaq 0x2554b(%rip), %rdi # 0x4d27e
leaq 0x22923(%rip), %rdx # 0x4a65d
leaq 0x25ad3(%rip), %rcx # 0x4d814
movl $0x67b, %esi # imm = 0x67B
jmp 0x27d62
leaq 0x2552f(%rip), %rdi # 0x4d27e
leaq 0x22907(%rip), %rdx # 0x4a65d
leaq 0x25ae4(%rip), %rcx # 0x4d841
movl $0x67d, %esi # imm = 0x67D
xorl %eax, %eax
callq 0x17c60
| ggml_backend_tensor_alloc:
push r15
push r14
push r12
push rbx
push rax
cmp qword ptr [rsi+8], 0
jnz loc_27CD8
mov rbx, rsi
cmp qword ptr [rsi+0F8h], 0
jnz loc_27CF4
cmp qword ptr [rbx+0E8h], 0
jnz loc_27D10
mov r15, rdx
mov r14, rdi
call _ggml_backend_buffer_get_base
cmp rax, r15
ja loc_27D2C
mov rdi, [r14+48h]
mov rax, [rdi+20h]
test rax, rax
jz short loc_27C82
mov rsi, rbx
call rax
jmp short loc_27C8A
loc_27C82:
mov rdi, rbx
call _ggml_nbytes
loc_27C8A:
mov r12, rax
add r12, r15
mov rdi, r14
call _ggml_backend_buffer_get_base
add rax, [r14+58h]
cmp r12, rax
ja loc_27D48
mov [rbx+8], r14
mov [rbx+0F8h], r15
mov rax, [r14+10h]
test rax, rax
jz short loc_27CCC
mov rdi, r14
mov rsi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp rax
loc_27CCC:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_27CD8:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorBufferNu; "tensor->buffer == NULL"
mov esi, 678h
jmp short loc_27D62
loc_27CF4:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorDataNull_0; "tensor->data == NULL"
mov esi, 679h
jmp short loc_27D62
loc_27D10:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorViewSrcN_0; "tensor->view_src == NULL"
mov esi, 67Ah
jmp short loc_27D62
loc_27D2C:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAddrGgmlBacken; "addr >= ggml_backend_buffer_get_base(bu"...
mov esi, 67Bh
jmp short loc_27D62
loc_27D48:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCharAddrGgmlBa; "(char *)addr + ggml_backend_buffer_get_"...
mov esi, 67Dh
loc_27D62:
xor eax, eax
call _ggml_abort
| long long ( * ggml_backend_tensor_alloc(
_QWORD *a1,
long long a2,
unsigned long long a3,
long long a4,
int a5,
int a6))(_QWORD *, long long)
{
long long v8; // rdi
long long ( *v9)(long long, long long); // rax
unsigned long long v10; // rax
long long ( *result)(_QWORD *, long long); // rax
const char *v12; // rcx
int v13; // esi
if ( *(_QWORD *)(a2 + 8) )
{
v12 = "tensor->buffer == NULL";
v13 = 1656;
goto LABEL_17;
}
if ( *(_QWORD *)(a2 + 248) )
{
v12 = "tensor->data == NULL";
v13 = 1657;
goto LABEL_17;
}
if ( *(_QWORD *)(a2 + 232) )
{
v12 = "tensor->view_src == NULL";
v13 = 1658;
goto LABEL_17;
}
if ( ggml_backend_buffer_get_base(a1) > a3 )
{
v12 = "addr >= ggml_backend_buffer_get_base(buffer)";
v13 = 1659;
goto LABEL_17;
}
v8 = a1[9];
v9 = *(long long ( **)(long long, long long))(v8 + 32);
if ( v9 )
v10 = v9(v8, a2);
else
v10 = ggml_nbytes((unsigned int *)a2);
if ( a3 + v10 > a1[11] + ggml_backend_buffer_get_base(a1) )
{
v12 = "(char *)addr + ggml_backend_buffer_get_alloc_size(buffer, tensor) <= (char *)ggml_backend_buffer_get_base(buff"
"er) + ggml_backend_buffer_get_size(buffer)";
v13 = 1661;
LABEL_17:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp",
v13,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v12,
a5,
a6);
}
*(_QWORD *)(a2 + 8) = a1;
*(_QWORD *)(a2 + 248) = a3;
result = (long long ( *)(_QWORD *, long long))a1[2];
if ( result )
return (long long ( *)(_QWORD *, long long))result(a1, a2);
return result;
}
| ggml_backend_tensor_alloc:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
CMP qword ptr [RSI + 0x8],0x0
JNZ 0x00127cd8
MOV RBX,RSI
CMP qword ptr [RSI + 0xf8],0x0
JNZ 0x00127cf4
CMP qword ptr [RBX + 0xe8],0x0
JNZ 0x00127d10
MOV R15,RDX
MOV R14,RDI
CALL 0x001174e0
CMP RAX,R15
JA 0x00127d2c
MOV RDI,qword ptr [R14 + 0x48]
MOV RAX,qword ptr [RDI + 0x20]
TEST RAX,RAX
JZ 0x00127c82
MOV RSI,RBX
CALL RAX
JMP 0x00127c8a
LAB_00127c82:
MOV RDI,RBX
CALL 0x001161c0
LAB_00127c8a:
MOV R12,RAX
ADD R12,R15
MOV RDI,R14
CALL 0x001174e0
ADD RAX,qword ptr [R14 + 0x58]
CMP R12,RAX
JA 0x00127d48
MOV qword ptr [RBX + 0x8],R14
MOV qword ptr [RBX + 0xf8],R15
MOV RAX,qword ptr [R14 + 0x10]
TEST RAX,RAX
JZ 0x00127ccc
MOV RDI,R14
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP RAX
LAB_00127ccc:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00127cd8:
LEA RDI,[0x14d27e]
LEA RDX,[0x14a65d]
LEA RCX,[0x14d776]
MOV ESI,0x678
JMP 0x00127d62
LAB_00127cf4:
LEA RDI,[0x14d27e]
LEA RDX,[0x14a65d]
LEA RCX,[0x14d7e6]
MOV ESI,0x679
JMP 0x00127d62
LAB_00127d10:
LEA RDI,[0x14d27e]
LEA RDX,[0x14a65d]
LEA RCX,[0x14d7fb]
MOV ESI,0x67a
JMP 0x00127d62
LAB_00127d2c:
LEA RDI,[0x14d27e]
LEA RDX,[0x14a65d]
LEA RCX,[0x14d814]
MOV ESI,0x67b
JMP 0x00127d62
LAB_00127d48:
LEA RDI,[0x14d27e]
LEA RDX,[0x14a65d]
LEA RCX,[0x14d841]
MOV ESI,0x67d
LAB_00127d62:
XOR EAX,EAX
CALL 0x00117c60
|
void ggml_backend_tensor_alloc(long param_1,long param_2,ulong param_3)
{
code *pcVar1;
ulong uVar2;
long lVar3;
long lVar4;
char *pcVar5;
int8 uVar6;
if (*(long *)(param_2 + 8) == 0) {
if (*(long *)(param_2 + 0xf8) == 0) {
if (*(long *)(param_2 + 0xe8) == 0) {
uVar2 = ggml_backend_buffer_get_base();
if (param_3 < uVar2) {
pcVar5 = "addr >= ggml_backend_buffer_get_base(buffer)";
uVar6 = 0x67b;
}
else {
pcVar1 = *(code **)(*(long *)(param_1 + 0x48) + 0x20);
if (pcVar1 == (code *)0x0) {
lVar3 = ggml_nbytes(param_2);
}
else {
lVar3 = (*pcVar1)(*(long *)(param_1 + 0x48),param_2);
}
lVar4 = ggml_backend_buffer_get_base(param_1);
if (lVar3 + param_3 <= (ulong)(lVar4 + *(long *)(param_1 + 0x58))) {
*(long *)(param_2 + 8) = param_1;
*(ulong *)(param_2 + 0xf8) = param_3;
if (*(code **)(param_1 + 0x10) != (code *)0x0) {
/* WARNING: Could not recover jumptable at 0x00127cca. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))(param_1,param_2);
return;
}
return;
}
pcVar5 =
"(char *)addr + ggml_backend_buffer_get_alloc_size(buffer, tensor) <= (char *)ggml_backend_buffer_get_base(buffer) + ggml_backend_buffer_get_size(buffer)"
;
uVar6 = 0x67d;
}
}
else {
pcVar5 = "tensor->view_src == NULL";
uVar6 = 0x67a;
}
}
else {
pcVar5 = "tensor->data == NULL";
uVar6 = 0x679;
}
}
else {
pcVar5 = "tensor->buffer == NULL";
uVar6 = 0x678;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp",
uVar6,"GGML_ASSERT(%s) failed",pcVar5);
}
| |
47,109 | prepare_resize_simple_key_cache | eloqsql/mysys/mf_keycache.c | static
int prepare_resize_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache,
my_bool release_lock)
{
int res= 0;
DBUG_ENTER("prepare_resize_simple_key_cache");
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
We may need to wait for another thread which is doing a resize
already. This cannot happen in the MySQL server though. It allows
one resizer only. In set_var.cc keycache->in_init is used to block
multiple attempts.
*/
while (keycache->in_resize)
{
/* purecov: begin inspected */
wait_on_queue(&keycache->resize_queue, &keycache->cache_lock);
/* purecov: end */
}
/*
Mark the operation in progress. This blocks other threads from doing
a resize in parallel. It prohibits new blocks to enter the cache.
Read/write requests can bypass the cache during the flush phase.
*/
keycache->in_resize= 1;
/* Need to flush only if keycache is enabled. */
if (keycache->can_be_used && keycache->disk_blocks != -1)
{
/* Start the flush phase. */
keycache->resize_in_flush= 1;
if (flush_all_key_blocks(keycache))
{
/* TODO: if this happens, we should write a warning in the log file ! */
keycache->resize_in_flush= 0;
keycache->can_be_used= 0;
res= 1;
goto finish;
}
DBUG_SLOW_ASSERT(cache_empty(keycache));
/* End the flush phase. */
keycache->resize_in_flush= 0;
}
/*
Some direct read/write operations (bypassing the cache) may still be
unfinished. Wait until they are done. If the key cache can be used,
direct I/O is done in increments of key_cache_block_size. That is,
every block is checked if it is in the cache. We need to wait for
pending I/O before re-initializing the cache, because we may change
the block size. Otherwise they could check for blocks at file
positions where the new block division has none. We do also want to
wait for I/O done when (if) the cache was disabled. It must not
run in parallel with normal cache operation.
*/
while (keycache->cnt_for_resize_op)
wait_on_queue(&keycache->waiting_for_resize_cnt, &keycache->cache_lock);
end_simple_key_cache(keycache, 0);
finish:
if (release_lock)
keycache_pthread_mutex_unlock(&keycache->cache_lock);
DBUG_RETURN(res);
} | O0 | c | prepare_resize_simple_key_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x6d21f(%rip), %rsi # 0x15574a
movl $0x2a9, %edx # imm = 0x2A9
callq 0xe4d50
movq -0x8(%rbp), %rax
cmpb $0x0, 0x1(%rax)
je 0xe855c
movq -0x8(%rbp), %rdi
addq $0x108, %rdi # imm = 0x108
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
callq 0xe4dc0
jmp 0xe8535
movq -0x8(%rbp), %rax
movb $0x1, 0x1(%rax)
movq -0x8(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x0, %eax
je 0xe85b6
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x48(%rax)
je 0xe85b6
movq -0x8(%rbp), %rax
movb $0x1, 0x2(%rax)
movq -0x8(%rbp), %rdi
callq 0xe8660
cmpl $0x0, %eax
je 0xe85aa
movq -0x8(%rbp), %rax
movb $0x0, 0x2(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x3(%rax)
movl $0x1, -0x10(%rbp)
jmp 0xe85eb
jmp 0xe85ac
jmp 0xe85ae
movq -0x8(%rbp), %rax
movb $0x0, 0x2(%rax)
jmp 0xe85b8
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0xe85e0
movq -0x8(%rbp), %rdi
addq $0x110, %rdi # imm = 0x110
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
callq 0xe4dc0
jmp 0xe85b8
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0xe8250
cmpb $0x0, -0x9(%rbp)
je 0xe8601
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
callq 0xe5770
jmp 0xe8603
movl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| prepare_resize_simple_key_cache:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov [rbp+var_10], 0
mov rdi, [rbp+var_8]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 2A9h
call inline_mysql_mutex_lock_24
loc_E8535:
mov rax, [rbp+var_8]
cmp byte ptr [rax+1], 0
jz short loc_E855C
mov rdi, [rbp+var_8]
add rdi, 108h
mov rsi, [rbp+var_8]
add rsi, 0C0h
call wait_on_queue
jmp short loc_E8535
loc_E855C:
mov rax, [rbp+var_8]
mov byte ptr [rax+1], 1
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+3]
cmp eax, 0
jz short loc_E85B6
mov rax, [rbp+var_8]
cmp dword ptr [rax+48h], 0FFFFFFFFh
jz short loc_E85B6
mov rax, [rbp+var_8]
mov byte ptr [rax+2], 1
mov rdi, [rbp+var_8]
call flush_all_key_blocks
cmp eax, 0
jz short loc_E85AA
mov rax, [rbp+var_8]
mov byte ptr [rax+2], 0
mov rax, [rbp+var_8]
mov byte ptr [rax+3], 0
mov [rbp+var_10], 1
jmp short loc_E85EB
loc_E85AA:
jmp short $+2
loc_E85AC:
jmp short $+2
loc_E85AE:
mov rax, [rbp+var_8]
mov byte ptr [rax+2], 0
loc_E85B6:
jmp short $+2
loc_E85B8:
mov rax, [rbp+var_8]
cmp qword ptr [rax+70h], 0
jz short loc_E85E0
mov rdi, [rbp+var_8]
add rdi, 110h
mov rsi, [rbp+var_8]
add rsi, 0C0h
call wait_on_queue
jmp short loc_E85B8
loc_E85E0:
mov rdi, [rbp+var_8]
xor esi, esi
call end_simple_key_cache
loc_E85EB:
cmp [rbp+var_9], 0
jz short loc_E8601
mov rdi, [rbp+var_8]
add rdi, 0C0h
call inline_mysql_mutex_unlock_25
loc_E8601:
jmp short $+2
loc_E8603:
mov eax, [rbp+var_10]
mov [rbp+var_14], eax
mov eax, [rbp+var_14]
add rsp, 20h
pop rbp
retn
| long long prepare_resize_simple_key_cache(long long a1, char a2)
{
unsigned int v3; // [rsp+10h] [rbp-10h]
v3 = 0;
inline_mysql_mutex_lock_24(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x2A9u);
while ( *(_BYTE *)(a1 + 1) )
wait_on_queue((long long *)(a1 + 264), (const char *)(a1 + 192));
*(_BYTE *)(a1 + 1) = 1;
if ( !*(_BYTE *)(a1 + 3) || *(_DWORD *)(a1 + 72) == -1 )
{
LABEL_9:
while ( *(_QWORD *)(a1 + 112) )
wait_on_queue((long long *)(a1 + 272), (const char *)(a1 + 192));
end_simple_key_cache(a1, 0);
goto LABEL_12;
}
*(_BYTE *)(a1 + 2) = 1;
if ( !(unsigned int)flush_all_key_blocks(a1) )
{
*(_BYTE *)(a1 + 2) = 0;
goto LABEL_9;
}
*(_BYTE *)(a1 + 2) = 0;
*(_BYTE *)(a1 + 3) = 0;
v3 = 1;
LABEL_12:
if ( a2 )
inline_mysql_mutex_unlock_25(a1 + 192);
return v3;
}
| prepare_resize_simple_key_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV dword ptr [RBP + -0x10],0x0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
LEA RSI,[0x25574a]
MOV EDX,0x2a9
CALL 0x001e4d50
LAB_001e8535:
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x1],0x0
JZ 0x001e855c
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x108
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
CALL 0x001e4dc0
JMP 0x001e8535
LAB_001e855c:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x1],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x3]
CMP EAX,0x0
JZ 0x001e85b6
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x48],-0x1
JZ 0x001e85b6
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x2],0x1
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001e8660
CMP EAX,0x0
JZ 0x001e85aa
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x2],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x3],0x0
MOV dword ptr [RBP + -0x10],0x1
JMP 0x001e85eb
LAB_001e85aa:
JMP 0x001e85ac
LAB_001e85ac:
JMP 0x001e85ae
LAB_001e85ae:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x2],0x0
LAB_001e85b6:
JMP 0x001e85b8
LAB_001e85b8:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x70],0x0
JZ 0x001e85e0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x110
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
CALL 0x001e4dc0
JMP 0x001e85b8
LAB_001e85e0:
MOV RDI,qword ptr [RBP + -0x8]
XOR ESI,ESI
CALL 0x001e8250
LAB_001e85eb:
CMP byte ptr [RBP + -0x9],0x0
JZ 0x001e8601
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
CALL 0x001e5770
LAB_001e8601:
JMP 0x001e8603
LAB_001e8603:
MOV EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0x20
POP RBP
RET
|
int4 prepare_resize_simple_key_cache(long param_1,char param_2)
{
int iVar1;
int4 local_18;
local_18 = 0;
inline_mysql_mutex_lock
(param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x2a9);
while (*(char *)(param_1 + 1) != '\0') {
wait_on_queue(param_1 + 0x108);
}
*(int1 *)(param_1 + 1) = 1;
if ((*(char *)(param_1 + 3) != '\0') && (*(int *)(param_1 + 0x48) != -1)) {
*(int1 *)(param_1 + 2) = 1;
iVar1 = flush_all_key_blocks(param_1);
if (iVar1 != 0) {
*(int1 *)(param_1 + 2) = 0;
*(int1 *)(param_1 + 3) = 0;
local_18 = 1;
goto LAB_001e85eb;
}
*(int1 *)(param_1 + 2) = 0;
}
while (*(long *)(param_1 + 0x70) != 0) {
wait_on_queue(param_1 + 0x110);
}
end_simple_key_cache(param_1,0);
LAB_001e85eb:
if (param_2 != '\0') {
inline_mysql_mutex_unlock(param_1 + 0xc0);
}
return local_18;
}
| |
47,110 | ma_keydef_read | eloqsql/storage/maria/ma_open.c | uchar *_ma_keydef_read(uchar *ptr, MARIA_KEYDEF *keydef)
{
keydef->keysegs = (uint) *ptr++;
keydef->key_alg = *ptr++; /* Rtree or Btree */
keydef->flag = mi_uint2korr(ptr); ptr+= 2;
keydef->block_length = mi_uint2korr(ptr); ptr+= 2;
keydef->keylength = mi_uint2korr(ptr); ptr+= 2;
keydef->minlength = mi_uint2korr(ptr); ptr+= 2;
keydef->maxlength = mi_uint2korr(ptr); ptr+= 2;
keydef->version = 0; /* Not saved */
keydef->parser = &ft_default_parser;
keydef->ftkey_nr = 0;
return ptr;
} | O3 | c | ma_keydef_read:
pushq %rbp
movq %rsp, %rbp
movzbl (%rdi), %eax
movw %ax, 0xa0(%rsi)
movb 0x1(%rdi), %al
movb %al, 0xa4(%rsi)
movzwl 0x2(%rdi), %eax
rolw $0x8, %ax
movw %ax, 0xa2(%rsi)
movzwl 0x4(%rdi), %eax
rolw $0x8, %ax
movw %ax, 0xa6(%rsi)
movzwl 0x6(%rdi), %eax
rolw $0x8, %ax
movw %ax, 0xaa(%rsi)
movzwl 0x8(%rdi), %eax
rolw $0x8, %ax
movw %ax, 0xac(%rsi)
movzwl 0xa(%rdi), %eax
rolw $0x8, %ax
movw %ax, 0xae(%rsi)
leaq 0xc(%rdi), %rax
movq $0x0, 0xb8(%rsi)
leaq 0x35927b(%rip), %rcx # 0x390130
movq %rcx, 0xd0(%rsi)
popq %rbp
retq
| _ma_keydef_read:
push rbp
mov rbp, rsp
movzx eax, byte ptr [rdi]
mov [rsi+0A0h], ax
mov al, [rdi+1]
mov [rsi+0A4h], al
movzx eax, word ptr [rdi+2]
rol ax, 8
mov [rsi+0A2h], ax
movzx eax, word ptr [rdi+4]
rol ax, 8
mov [rsi+0A6h], ax
movzx eax, word ptr [rdi+6]
rol ax, 8
mov [rsi+0AAh], ax
movzx eax, word ptr [rdi+8]
rol ax, 8
mov [rsi+0ACh], ax
movzx eax, word ptr [rdi+0Ah]
rol ax, 8
mov [rsi+0AEh], ax
lea rax, [rdi+0Ch]
mov qword ptr [rsi+0B8h], 0
lea rcx, ft_default_parser
mov [rsi+0D0h], rcx
pop rbp
retn
| unsigned __int8 * ma_keydef_read(unsigned __int8 *a1, long long a2)
{
unsigned __int8 *result; // rax
*(_WORD *)(a2 + 160) = *a1;
*(_BYTE *)(a2 + 164) = a1[1];
*(_WORD *)(a2 + 162) = __ROL2__(*((_WORD *)a1 + 1), 8);
*(_WORD *)(a2 + 166) = __ROL2__(*((_WORD *)a1 + 2), 8);
*(_WORD *)(a2 + 170) = __ROL2__(*((_WORD *)a1 + 3), 8);
*(_WORD *)(a2 + 172) = __ROL2__(*((_WORD *)a1 + 4), 8);
*(_WORD *)(a2 + 174) = __ROL2__(*((_WORD *)a1 + 5), 8);
result = a1 + 12;
*(_QWORD *)(a2 + 184) = 0LL;
*(_QWORD *)(a2 + 208) = &ft_default_parser;
return result;
}
| _ma_keydef_read:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,byte ptr [RDI]
MOV word ptr [RSI + 0xa0],AX
MOV AL,byte ptr [RDI + 0x1]
MOV byte ptr [RSI + 0xa4],AL
MOVZX EAX,word ptr [RDI + 0x2]
ROL AX,0x8
MOV word ptr [RSI + 0xa2],AX
MOVZX EAX,word ptr [RDI + 0x4]
ROL AX,0x8
MOV word ptr [RSI + 0xa6],AX
MOVZX EAX,word ptr [RDI + 0x6]
ROL AX,0x8
MOV word ptr [RSI + 0xaa],AX
MOVZX EAX,word ptr [RDI + 0x8]
ROL AX,0x8
MOV word ptr [RSI + 0xac],AX
MOVZX EAX,word ptr [RDI + 0xa]
ROL AX,0x8
MOV word ptr [RSI + 0xae],AX
LEA RAX,[RDI + 0xc]
MOV qword ptr [RSI + 0xb8],0x0
LEA RCX,[0x490130]
MOV qword ptr [RSI + 0xd0],RCX
POP RBP
RET
|
byte * _ma_keydef_read(byte *param_1,long param_2)
{
*(ushort *)(param_2 + 0xa0) = (ushort)*param_1;
*(byte *)(param_2 + 0xa4) = param_1[1];
*(ushort *)(param_2 + 0xa2) = *(ushort *)(param_1 + 2) << 8 | *(ushort *)(param_1 + 2) >> 8;
*(ushort *)(param_2 + 0xa6) = *(ushort *)(param_1 + 4) << 8 | *(ushort *)(param_1 + 4) >> 8;
*(ushort *)(param_2 + 0xaa) = *(ushort *)(param_1 + 6) << 8 | *(ushort *)(param_1 + 6) >> 8;
*(ushort *)(param_2 + 0xac) = *(ushort *)(param_1 + 8) << 8 | *(ushort *)(param_1 + 8) >> 8;
*(ushort *)(param_2 + 0xae) = *(ushort *)(param_1 + 10) << 8 | *(ushort *)(param_1 + 10) >> 8;
*(int8 *)(param_2 + 0xb8) = 0;
*(int1 **)(param_2 + 0xd0) = ft_default_parser;
return param_1 + 0xc;
}
| |
47,111 | verify_col_data | eloqsql/libmariadb/unittest/libmariadb/my_test.h | int verify_col_data(MYSQL *mysql, const char *table, const char *col,
const char *exp_data)
{
static char query[MAX_TEST_QUERY_LENGTH];
MYSQL_RES *result;
MYSQL_ROW row;
int rc;
if (table && col)
{
sprintf(query, "SELECT %s FROM %s LIMIT 1", col, table);
rc= mysql_query(mysql, query);
check_mysql_rc(rc, mysql);
}
result= mysql_use_result(mysql);
FAIL_IF(!result, "Invalid result set");
if (!(row= mysql_fetch_row(result)) || !row[0]) {
diag("Failed to get the result");
goto error;
}
if(strcmp(row[0], exp_data)) {
diag("Expected %s, got %s", exp_data, row[0]);
goto error;
}
mysql_free_result(result);
return OK;
error:
mysql_free_result(result);
return FAIL;
} | O3 | c | verify_col_data:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdi, %r15
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
jne 0x13c7b
movq %rdx, %r8
movq %rsi, %r9
leaq 0x3a393(%rip), %r12 # 0x4dfa0
leaq 0x23627(%rip), %rcx # 0x3723b
movl $0x1, %r14d
movl $0x12c, %edx # imm = 0x12C
movq %r12, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x132a0
movq %r15, %rdi
movq %r12, %rsi
callq 0x1d541
testl %eax, %eax
je 0x13c7b
movl %eax, %r12d
movq %r15, %rdi
callq 0x1f5ba
movq %rax, %rbx
movq %r15, %rdi
callq 0x1f5a5
leaq 0x235fb(%rip), %rdi # 0x37255
leaq 0x234d7(%rip), %r8 # 0x37138
movl %r12d, %esi
movq %rbx, %rdx
movl %eax, %ecx
movl $0x17f, %r9d # imm = 0x17F
xorl %eax, %eax
callq 0x17e37
jmp 0x13d04
movq %r15, %rdi
callq 0x1c970
testq %rax, %rax
je 0x13cdd
movq %rax, %r14
movq %rax, %rdi
callq 0x1e63c
testq %rax, %rax
je 0x13cc5
movq (%rax), %r15
testq %r15, %r15
je 0x13cc5
movq %r15, %rdi
movq %rbx, %rsi
callq 0x13640
testl %eax, %eax
je 0x13d10
leaq 0x235ed(%rip), %rdi # 0x372a3
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x17e37
jmp 0x13cd3
leaq 0x235be(%rip), %rdi # 0x3728a
xorl %eax, %eax
callq 0x17e37
movq %r14, %rdi
callq 0x191ee
jmp 0x13cfe
leaq 0x2342c(%rip), %rdi # 0x37110
leaq 0x2358c(%rip), %rsi # 0x37277
leaq 0x23446(%rip), %rdx # 0x37138
movl $0x182, %ecx # imm = 0x182
xorl %eax, %eax
callq 0x17e37
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x191ee
xorl %r14d, %r14d
jmp 0x13d04
| verify_col_data:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rcx
mov r15, rdi
test rsi, rsi
setz al
test rdx, rdx
setz cl
or cl, al
jnz short loc_13C7B
mov r8, rdx
mov r9, rsi
lea r12, verify_col_data_query
lea rcx, aSelectSFromSLi; "SELECT %s FROM %s LIMIT 1"
mov r14d, 1
mov edx, 12Ch
mov rdi, r12
mov esi, 1
xor eax, eax
call ___sprintf_chk
mov rdi, r15
mov rsi, r12
call mysql_query
test eax, eax
jz short loc_13C7B
mov r12d, eax
mov rdi, r15
call mysql_error
mov rbx, rax
mov rdi, r15
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r12d
mov rdx, rbx
mov ecx, eax
mov r9d, 17Fh
xor eax, eax
call diag
jmp loc_13D04
loc_13C7B:
mov rdi, r15
call mysql_use_result
test rax, rax
jz short loc_13CDD
mov r14, rax
mov rdi, rax
call mysql_fetch_row
test rax, rax
jz short loc_13CC5
mov r15, [rax]
test r15, r15
jz short loc_13CC5
mov rdi, r15
mov rsi, rbx
call _strcmp
test eax, eax
jz short loc_13D10
lea rdi, aExpectedSGotS; "Expected %s, got %s"
mov rsi, rbx
mov rdx, r15
xor eax, eax
call diag
jmp short loc_13CD3
loc_13CC5:
lea rdi, aFailedToGetThe; "Failed to get the result"
xor eax, eax
call diag
loc_13CD3:
mov rdi, r14
call mysql_free_result
jmp short loc_13CFE
loc_13CDD:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aInvalidResultS; "Invalid result set"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 182h
xor eax, eax
call diag
loc_13CFE:
mov r14d, 1
loc_13D04:
mov eax, r14d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_13D10:
mov rdi, r14
call mysql_free_result
xor r14d, r14d
jmp short loc_13D04
| long long verify_col_data(long long a1, const char *a2, const char *a3, long long a4)
{
unsigned int v5; // r14d
int v6; // eax
int v7; // r12d
int v8; // ebx
int v9; // eax
long long v10; // rax
int v11; // r8d
int v12; // r9d
long long v13; // r14
_QWORD *row; // rax
int v15; // edx
int v16; // ecx
int v17; // r8d
int v18; // r9d
long long v19; // r15
int v20; // ecx
int v21; // r8d
int v22; // r9d
if ( a2 == 0LL
|| a3 == 0LL
|| (v5 = 1,
__sprintf_chk(&verify_col_data_query, 1LL, 300LL, "SELECT %s FROM %s LIMIT 1", a3, a2),
a2 = (const char *)&verify_col_data_query,
(v6 = mysql_query(a1, &verify_col_data_query)) == 0) )
{
v10 = mysql_use_result(a1);
if ( v10 )
{
v13 = v10;
row = (_QWORD *)mysql_fetch_row(v10);
if ( row && (v19 = *row) != 0 )
{
if ( !(unsigned int)strcmp(*row, a4) )
{
mysql_free_result(v13);
return 0;
}
diag((unsigned int)"Expected %s, got %s", a4, v19, v20, v21, v22);
}
else
{
diag((unsigned int)"Failed to get the result", (_DWORD)a2, v15, v16, v17, v18);
}
mysql_free_result(v13);
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Invalid result set",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
386,
v11,
v12);
}
return 1;
}
else
{
v7 = v6;
v8 = mysql_error(a1);
v9 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v7,
v8,
v9,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
383);
}
return v5;
}
| verify_col_data:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RCX
MOV R15,RDI
TEST RSI,RSI
SETZ AL
TEST RDX,RDX
SETZ CL
OR CL,AL
JNZ 0x00113c7b
MOV R8,RDX
MOV R9,RSI
LEA R12,[0x14dfa0]
LEA RCX,[0x13723b]
MOV R14D,0x1
MOV EDX,0x12c
MOV RDI,R12
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001132a0
MOV RDI,R15
MOV RSI,R12
CALL 0x0011d541
TEST EAX,EAX
JZ 0x00113c7b
MOV R12D,EAX
MOV RDI,R15
CALL 0x0011f5ba
MOV RBX,RAX
MOV RDI,R15
CALL 0x0011f5a5
LEA RDI,[0x137255]
LEA R8,[0x137138]
MOV ESI,R12D
MOV RDX,RBX
MOV ECX,EAX
MOV R9D,0x17f
XOR EAX,EAX
CALL 0x00117e37
JMP 0x00113d04
LAB_00113c7b:
MOV RDI,R15
CALL 0x0011c970
TEST RAX,RAX
JZ 0x00113cdd
MOV R14,RAX
MOV RDI,RAX
CALL 0x0011e63c
TEST RAX,RAX
JZ 0x00113cc5
MOV R15,qword ptr [RAX]
TEST R15,R15
JZ 0x00113cc5
MOV RDI,R15
MOV RSI,RBX
CALL 0x00113640
TEST EAX,EAX
JZ 0x00113d10
LEA RDI,[0x1372a3]
MOV RSI,RBX
MOV RDX,R15
XOR EAX,EAX
CALL 0x00117e37
JMP 0x00113cd3
LAB_00113cc5:
LEA RDI,[0x13728a]
XOR EAX,EAX
CALL 0x00117e37
LAB_00113cd3:
MOV RDI,R14
CALL 0x001191ee
JMP 0x00113cfe
LAB_00113cdd:
LEA RDI,[0x137110]
LEA RSI,[0x137277]
LEA RDX,[0x137138]
MOV ECX,0x182
XOR EAX,EAX
CALL 0x00117e37
LAB_00113cfe:
MOV R14D,0x1
LAB_00113d04:
MOV EAX,R14D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00113d10:
MOV RDI,R14
CALL 0x001191ee
XOR R14D,R14D
JMP 0x00113d04
|
int8 verify_col_data(int8 param_1,long param_2,long param_3,char *param_4)
{
char *__s1;
int iVar1;
int4 uVar2;
int8 uVar3;
long lVar4;
int8 *puVar5;
if (param_3 != 0 && param_2 != 0) {
__sprintf_chk(verify_col_data_query,1,300,"SELECT %s FROM %s LIMIT 1",param_3,param_2);
iVar1 = mysql_query(param_1,verify_col_data_query);
if (iVar1 != 0) {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x17f
);
return 1;
}
}
lVar4 = mysql_use_result(param_1);
if (lVar4 == 0) {
diag("Error: %s (%s: %d)","Invalid result set",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x182);
}
else {
puVar5 = (int8 *)mysql_fetch_row(lVar4);
if ((puVar5 == (int8 *)0x0) || (__s1 = (char *)*puVar5, __s1 == (char *)0x0)) {
diag("Failed to get the result");
}
else {
iVar1 = strcmp(__s1,param_4);
if (iVar1 == 0) {
mysql_free_result(lVar4);
return 0;
}
diag("Expected %s, got %s",param_4,__s1);
}
mysql_free_result(lVar4);
}
return 1;
}
| |
47,112 | OpenSubdiv::v3_6_0::Tmr::computeFvarRot(OpenSubdiv::v3_6_0::Tmr::SurfaceDescriptor, int, int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/../tmr/../tmr/surfaceDescriptor.h | constexpr uint8_t GetParametricRotation() const { return unpack(field0, 2, 1); } | O1 | c | OpenSubdiv::v3_6_0::Tmr::computeFvarRot(OpenSubdiv::v3_6_0::Tmr::SurfaceDescriptor, int, int):
shrl %edi
andl $0x3, %edi
subl %esi, %edi
movl %edi, %eax
sarl $0x1f, %eax
andl %edx, %eax
addl %edi, %eax
cmpl $0x4, %eax
jge 0xad0fd
retq
pushq %rax
leaq 0x187f0(%rip), %rdi # 0xc58f5
leaq 0x184a6(%rip), %rsi # 0xc55b2
leaq 0x187ef(%rip), %rcx # 0xc5902
movl $0x7a, %edx
callq 0x39560
nop
| _ZN10OpenSubdiv6v3_6_03Tmr14computeFvarRotENS1_17SurfaceDescriptorEii:
shr edi, 1
and edi, 3
sub edi, esi
mov eax, edi
sar eax, 1Fh
and eax, edx
add eax, edi
cmp eax, 4
jge short loc_AD0FD
retn
loc_AD0FD:
push rax
lea rdi, aRotation4; "rotation < 4"
lea rsi, aWorkspaceLlm4b_54; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aUint8TOpensubd_0; "uint8_t OpenSubdiv::v3_6_0::Tmr::comput"...
mov edx, 7Ah ; 'z'
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Tmr::computeFvarRot(unsigned int a1, int a2, int a3)
{
long long result; // rax
result = ((a1 >> 1) & 3) - a2 + (a3 & ((int)(((a1 >> 1) & 3) - a2) >> 31));
if ( (int)result >= 4 )
__assert_fail(
"rotation < 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/surfaceTableFactory.cpp",
122LL,
"uint8_t OpenSubdiv::v3_6_0::Tmr::computeFvarRot(SurfaceDescriptor, int, int)");
return result;
}
| computeFvarRot:
SHR EDI,0x1
AND EDI,0x3
SUB EDI,ESI
MOV EAX,EDI
SAR EAX,0x1f
AND EAX,EDX
ADD EAX,EDI
CMP EAX,0x4
JGE 0x001ad0fd
RET
LAB_001ad0fd:
PUSH RAX
LEA RDI,[0x1c58f5]
LEA RSI,[0x1c55b2]
LEA RCX,[0x1c5902]
MOV EDX,0x7a
CALL 0x00139560
|
/* OpenSubdiv::v3_6_0::Tmr::computeFvarRot(OpenSubdiv::v3_6_0::Tmr::SurfaceDescriptor, int, int) */
void OpenSubdiv::v3_6_0::Tmr::computeFvarRot(uint param_1,int param_2,uint param_3)
{
param_2 = (param_1 >> 1 & 3) - param_2;
if ((int)((param_2 >> 0x1f & param_3) + param_2) < 4) {
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("rotation < 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/surfaceTableFactory.cpp"
,0x7a,"uint8_t OpenSubdiv::v3_6_0::Tmr::computeFvarRot(SurfaceDescriptor, int, int)"
);
}
| |
47,113 | OpenSubdiv::v3_6_0::Tmr::computeFvarRot(OpenSubdiv::v3_6_0::Tmr::SurfaceDescriptor, int, int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/../tmr/../tmr/surfaceDescriptor.h | constexpr uint8_t GetParametricRotation() const { return unpack(field0, 2, 1); } | O3 | c | OpenSubdiv::v3_6_0::Tmr::computeFvarRot(OpenSubdiv::v3_6_0::Tmr::SurfaceDescriptor, int, int):
shrl %edi
andl $0x3, %edi
subl %esi, %edi
movl %edi, %eax
sarl $0x1f, %eax
andl %edx, %eax
addl %edi, %eax
cmpl $0x4, %eax
jge 0xb005c
retq
pushq %rax
leaq 0x19101(%rip), %rdi # 0xc9165
leaq 0x18db7(%rip), %rsi # 0xc8e22
leaq 0x19100(%rip), %rcx # 0xc9172
movl $0x7a, %edx
callq 0x39540
| _ZN10OpenSubdiv6v3_6_03Tmr14computeFvarRotENS1_17SurfaceDescriptorEii:
shr edi, 1
and edi, 3
sub edi, esi
mov eax, edi
sar eax, 1Fh
and eax, edx
add eax, edi
cmp eax, 4
jge short loc_B005C
retn
loc_B005C:
push rax
lea rdi, aRotation4; "rotation < 4"
lea rsi, aWorkspaceLlm4b_54; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aUint8TOpensubd_0; "uint8_t OpenSubdiv::v3_6_0::Tmr::comput"...
mov edx, 7Ah ; 'z'
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Tmr::computeFvarRot(unsigned int a1, int a2, int a3)
{
long long result; // rax
result = ((a1 >> 1) & 3) - a2 + (a3 & ((int)(((a1 >> 1) & 3) - a2) >> 31));
if ( (int)result >= 4 )
__assert_fail(
"rotation < 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/surfaceTableFactory.cpp",
122LL,
"uint8_t OpenSubdiv::v3_6_0::Tmr::computeFvarRot(SurfaceDescriptor, int, int)");
return result;
}
| computeFvarRot:
SHR EDI,0x1
AND EDI,0x3
SUB EDI,ESI
MOV EAX,EDI
SAR EAX,0x1f
AND EAX,EDX
ADD EAX,EDI
CMP EAX,0x4
JGE 0x001b005c
RET
LAB_001b005c:
PUSH RAX
LEA RDI,[0x1c9165]
LEA RSI,[0x1c8e22]
LEA RCX,[0x1c9172]
MOV EDX,0x7a
CALL 0x00139540
|
/* OpenSubdiv::v3_6_0::Tmr::computeFvarRot(OpenSubdiv::v3_6_0::Tmr::SurfaceDescriptor, int, int) */
void OpenSubdiv::v3_6_0::Tmr::computeFvarRot(uint param_1,int param_2,uint param_3)
{
param_2 = (param_1 >> 1 & 3) - param_2;
if ((int)((param_2 >> 0x1f & param_3) + param_2) < 4) {
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("rotation < 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/surfaceTableFactory.cpp"
,0x7a,"uint8_t OpenSubdiv::v3_6_0::Tmr::computeFvarRot(SurfaceDescriptor, int, int)"
);
}
| |
47,114 | js_typed_array_sort | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_sort(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSObject *p;
int len;
size_t elt_size;
struct TA_sort_context tsc;
int (*cmpfun)(const void *a, const void *b, void *opaque);
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (typed_array_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
tsc.ctx = ctx;
tsc.exception = 0;
tsc.arr = this_val;
tsc.cmp = argv[0];
if (!JS_IsUndefined(tsc.cmp) && check_function(ctx, tsc.cmp))
return JS_EXCEPTION;
len = p->u.array.count;
if (len > 1) {
switch (p->class_id) {
case JS_CLASS_INT8_ARRAY:
tsc.getfun = js_TA_get_int8;
cmpfun = js_TA_cmp_int8;
break;
case JS_CLASS_UINT8C_ARRAY:
case JS_CLASS_UINT8_ARRAY:
tsc.getfun = js_TA_get_uint8;
cmpfun = js_TA_cmp_uint8;
break;
case JS_CLASS_INT16_ARRAY:
tsc.getfun = js_TA_get_int16;
cmpfun = js_TA_cmp_int16;
break;
case JS_CLASS_UINT16_ARRAY:
tsc.getfun = js_TA_get_uint16;
cmpfun = js_TA_cmp_uint16;
break;
case JS_CLASS_INT32_ARRAY:
tsc.getfun = js_TA_get_int32;
cmpfun = js_TA_cmp_int32;
break;
case JS_CLASS_UINT32_ARRAY:
tsc.getfun = js_TA_get_uint32;
cmpfun = js_TA_cmp_uint32;
break;
case JS_CLASS_BIG_INT64_ARRAY:
tsc.getfun = js_TA_get_int64;
cmpfun = js_TA_cmp_int64;
break;
case JS_CLASS_BIG_UINT64_ARRAY:
tsc.getfun = js_TA_get_uint64;
cmpfun = js_TA_cmp_uint64;
break;
case JS_CLASS_FLOAT16_ARRAY:
tsc.getfun = js_TA_get_float16;
cmpfun = js_TA_cmp_float16;
break;
case JS_CLASS_FLOAT32_ARRAY:
tsc.getfun = js_TA_get_float32;
cmpfun = js_TA_cmp_float32;
break;
case JS_CLASS_FLOAT64_ARRAY:
tsc.getfun = js_TA_get_float64;
cmpfun = js_TA_cmp_float64;
break;
default:
abort();
}
elt_size = 1 << typed_array_size_log2(p->class_id);
if (!JS_IsUndefined(tsc.cmp)) {
uint32_t *array_idx;
void *array_tmp;
size_t i, j;
/* XXX: a stable sort would use less memory */
array_idx = js_malloc(ctx, len * sizeof(array_idx[0]));
if (!array_idx)
return JS_EXCEPTION;
for(i = 0; i < len; i++)
array_idx[i] = i;
tsc.elt_size = elt_size;
rqsort(array_idx, len, sizeof(array_idx[0]),
js_TA_cmp_generic, &tsc);
if (tsc.exception)
goto fail;
// per spec: typed array can be detached mid-iteration
if (typed_array_is_oob(p))
goto done;
len = min_int(len, p->u.array.count);
if (len == 0)
goto done;
array_tmp = js_malloc(ctx, len * elt_size);
if (!array_tmp) {
fail:
js_free(ctx, array_idx);
return JS_EXCEPTION;
}
memcpy(array_tmp, p->u.array.u.ptr, len * elt_size);
switch(elt_size) {
case 1:
for(i = 0; i < len; i++) {
j = array_idx[i];
p->u.array.u.uint8_ptr[i] = ((uint8_t *)array_tmp)[j];
}
break;
case 2:
for(i = 0; i < len; i++) {
j = array_idx[i];
p->u.array.u.uint16_ptr[i] = ((uint16_t *)array_tmp)[j];
}
break;
case 4:
for(i = 0; i < len; i++) {
j = array_idx[i];
p->u.array.u.uint32_ptr[i] = ((uint32_t *)array_tmp)[j];
}
break;
case 8:
for(i = 0; i < len; i++) {
j = array_idx[i];
p->u.array.u.uint64_ptr[i] = ((uint64_t *)array_tmp)[j];
}
break;
default:
abort();
}
js_free(ctx, array_tmp);
done:
js_free(ctx, array_idx);
} else {
rqsort(p->u.array.u.ptr, len, elt_size, cmpfun, &tsc);
if (tsc.exception)
return JS_EXCEPTION;
}
}
return js_dup(this_val);
} | O2 | c | js_typed_array_sort:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %rbp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x363bb
pushq $0x6
popq %r13
testq %rax, %rax
je 0x70db8
movq %rax, %r12
movq %rax, %rdi
callq 0x363e6
testl %eax, %eax
je 0x70dd1
movq %r15, %rdi
callq 0x3644b
xorl %eax, %eax
xorl %ecx, %ecx
orq %rcx, %rax
movq %r13, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, 0x28(%rsp)
andl $0x0, 0x30(%rsp)
movq %r14, 0x38(%rsp)
movq %rbx, 0x40(%rsp)
movups (%rbp), %xmm0
movups %xmm0, 0x48(%rsp)
movq 0x50(%rsp), %rdx
movl %edx, %edi
cmpq $0x3, %rdi
je 0x70e12
movq 0x48(%rsp), %rsi
movq %rdi, %rbp
movq %r15, %rdi
callq 0x3d04a
movq %rbp, %rdi
testl %eax, %eax
jne 0x70db8
movslq 0x40(%r12), %rbp
cmpq $0x2, %rbp
jl 0x70f22
movzwl 0x6(%r12), %eax
leal -0x15(%rax), %ecx
cmpw $0xc, %cx
jae 0x71054
movzwl %cx, %edx
leaq 0x16cb1(%rip), %rcx # 0x87aef
movb -0x15(%rax,%rcx), %cl
pushq $0x1
popq %rsi
shll %cl, %esi
shll $0x3, %edx
leaq 0x4dcef(%rip), %rax # 0xbeb40
movq (%rdx,%rax), %rax
leaq 0x4dd44(%rip), %rcx # 0xbeba0
movq (%rdx,%rcx), %rcx
movq %rax, 0x58(%rsp)
movslq %esi, %rdx
cmpl $0x3, %edi
jne 0x70e92
movq 0x38(%r12), %rdi
leaq 0x28(%rsp), %r15
movq %rbp, %rsi
movq %r15, %r8
callq 0x1a3ec
cmpl $0x0, 0x8(%r15)
jne 0x70db8
jmp 0x70f22
movq %rdx, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
leaq (,%rbp,4), %rsi
movq %r15, %rdi
callq 0x1adc4
testq %rax, %rax
je 0x70db8
movq %rax, %rdi
xorl %eax, %eax
movq 0x20(%rsp), %rcx
cmpq %rax, %rbp
je 0x70ecc
movl %eax, (%rdi,%rax,4)
incq %rax
jmp 0x70ebf
leaq 0x28(%rsp), %r8
movl %ecx, 0x38(%r8)
leaq 0xc0c(%rip), %rcx # 0x71ae8
pushq $0x4
popq %rdx
movq %rdi, 0x8(%rsp)
movq %rbp, %rsi
callq 0x1a3ec
movq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rax
cmpl $0x0, 0x8(%rax)
je 0x70f09
movq %r15, %rdi
callq 0x1ae1e
jmp 0x70db8
movq %r12, %rdi
callq 0x363e6
testl %eax, %eax
je 0x70f42
movq %r15, %rdi
movq 0x8(%rsp), %rsi
callq 0x1ae1e
cmpl $-0x9, %ebx
jb 0x70f2a
incl (%r14)
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r14, %rcx
movl %r14d, %eax
movq %rbx, %r13
jmp 0x70dbc
movl 0x40(%r12), %eax
testl %eax, %eax
je 0x70f15
cmpl %eax, %ebp
cmovll %ebp, %eax
movslq %eax, %rbp
movq 0x18(%rsp), %rsi
imulq %rbp, %rsi
movq %r15, %rdi
movq %rsi, 0x18(%rsp)
callq 0x1adc4
testq %rax, %rax
movq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rcx
je 0x70efc
movq 0x38(%r12), %rsi
movq %rax, 0x10(%rsp)
movq %rax, %rdi
movq 0x18(%rsp), %rdx
movq %rcx, %r13
callq 0xe630
decl %r13d
cmpl $0x7, %r13d
ja 0x71054
leaq 0x16a0e(%rip), %rax # 0x879b4
movslq (%rax,%r13,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %eax, %eax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
cmpq %rax, %rbp
je 0x71047
movl (%rdi,%rax,4), %ecx
movb (%rsi,%rcx), %cl
movq 0x38(%r12), %rdx
movb %cl, (%rdx,%rax)
incq %rax
jmp 0x70fbb
xorl %eax, %eax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
cmpq %rax, %rbp
je 0x71047
movl (%rdi,%rax,4), %ecx
movl (%rsi,%rcx,4), %ecx
movq 0x38(%r12), %rdx
movl %ecx, (%rdx,%rax,4)
incq %rax
jmp 0x70fe3
xorl %eax, %eax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
cmpq %rax, %rbp
je 0x71047
movl (%rdi,%rax,4), %ecx
movq (%rsi,%rcx,8), %rcx
movq 0x38(%r12), %rdx
movq %rcx, (%rdx,%rax,8)
incq %rax
jmp 0x71007
xorl %eax, %eax
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
cmpq %rax, %rbp
je 0x71047
movl (%rdi,%rax,4), %ecx
movzwl (%rsi,%rcx,2), %ecx
movq 0x38(%r12), %rdx
movw %cx, (%rdx,%rax,2)
incq %rax
jmp 0x7102d
movq %r15, %rdi
callq 0x1ae1e
jmp 0x70f15
callq 0xe090
| js_typed_array_sort:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbp, r8
mov rbx, rdx
mov r14, rsi
mov r15, rdi
call get_typed_array
push 6
pop r13
test rax, rax
jz short loc_70DB8
mov r12, rax
mov rdi, rax
call typed_array_is_oob
test eax, eax
jz short loc_70DD1
mov rdi, r15
call JS_ThrowTypeErrorArrayBufferOOB
loc_70DB8:
xor eax, eax
xor ecx, ecx
loc_70DBC:
or rax, rcx
mov rdx, r13
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_70DD1:
mov [rsp+98h+var_70], r15
and [rsp+98h+var_68], 0
mov [rsp+98h+var_60], r14
mov [rsp+98h+var_58], rbx
movups xmm0, xmmword ptr [rbp+0]
movups [rsp+98h+var_50], xmm0
mov rdx, qword ptr [rsp+98h+var_50+8]
mov edi, edx
cmp rdi, 3
jz short loc_70E12
mov rsi, qword ptr [rsp+98h+var_50]
mov rbp, rdi
mov rdi, r15
call check_function
mov rdi, rbp
test eax, eax
jnz short loc_70DB8
loc_70E12:
movsxd rbp, dword ptr [r12+40h]
cmp rbp, 2
jl loc_70F22
movzx eax, word ptr [r12+6]
lea ecx, [rax-15h]
cmp cx, 0Ch
jnb def_70FAD; jumptable 0000000000070FAD default case, cases 3,5-7
movzx edx, cx
lea rcx, typed_array_size_log2
mov cl, [rax+rcx-15h]
push 1
pop rsi
shl esi, cl
shl edx, 3
lea rax, off_BEB40
mov rax, [rdx+rax]
lea rcx, off_BEBA0
mov rcx, [rdx+rcx]
mov [rsp+98h+var_40], rax
movsxd rdx, esi
cmp edi, 3
jnz short loc_70E92
mov rdi, [r12+38h]
lea r15, [rsp+98h+var_70]
mov rsi, rbp
mov r8, r15
call rqsort
cmp dword ptr [r15+8], 0
jnz loc_70DB8
jmp loc_70F22
loc_70E92:
mov [rsp+98h+var_80], rdx
mov [rsp+98h+var_78], rsi
lea rsi, ds:0[rbp*4]
mov rdi, r15
call js_malloc
test rax, rax
jz loc_70DB8
mov rdi, rax
xor eax, eax
mov rcx, [rsp+98h+var_78]
loc_70EBF:
cmp rbp, rax
jz short loc_70ECC
mov [rdi+rax*4], eax
inc rax
jmp short loc_70EBF
loc_70ECC:
lea r8, [rsp+98h+var_70]
mov [r8+38h], ecx
lea rcx, js_TA_cmp_generic
push 4
pop rdx
mov [rsp+98h+var_90], rdi
mov rsi, rbp
call rqsort
mov rsi, [rsp+98h+var_90]
lea rax, [rsp+98h+var_70]
cmp dword ptr [rax+8], 0
jz short loc_70F09
loc_70EFC:
mov rdi, r15
call js_free
jmp loc_70DB8
loc_70F09:
mov rdi, r12
call typed_array_is_oob
test eax, eax
jz short loc_70F42
loc_70F15:
mov rdi, r15
mov rsi, [rsp+98h+var_90]
call js_free
loc_70F22:
cmp ebx, 0FFFFFFF7h
jb short loc_70F2A
inc dword ptr [r14]
loc_70F2A:
mov rcx, 0FFFFFFFF00000000h
and rcx, r14
mov eax, r14d
mov r13, rbx
jmp loc_70DBC
loc_70F42:
mov eax, [r12+40h]
test eax, eax
jz short loc_70F15
cmp ebp, eax
cmovl eax, ebp
movsxd rbp, eax
mov rsi, [rsp+98h+var_80]
imul rsi, rbp
mov rdi, r15
mov [rsp+98h+var_80], rsi
call js_malloc
test rax, rax
mov rsi, [rsp+98h+var_90]
mov rcx, [rsp+98h+var_78]
jz short loc_70EFC
mov rsi, [r12+38h]
mov [rsp+98h+var_88], rax
mov rdi, rax
mov rdx, [rsp+98h+var_80]
mov r13, rcx
call _memcpy
dec r13d; switch 8 cases
cmp r13d, 7
ja def_70FAD; jumptable 0000000000070FAD default case, cases 3,5-7
lea rax, jpt_70FAD
movsxd rcx, ds:(jpt_70FAD - 879B4h)[rax+r13*4]
add rcx, rax
jmp rcx; switch jump
loc_70FAF:
xor eax, eax; jumptable 0000000000070FAD case 1
mov rdi, [rsp+98h+var_90]
mov rsi, [rsp+98h+var_88]
loc_70FBB:
cmp rbp, rax
jz loc_71047
mov ecx, [rdi+rax*4]
mov cl, [rsi+rcx]
mov rdx, [r12+38h]
mov [rdx+rax], cl
inc rax
jmp short loc_70FBB
loc_70FD7:
xor eax, eax; jumptable 0000000000070FAD case 4
mov rdi, [rsp+98h+var_90]
mov rsi, [rsp+98h+var_88]
loc_70FE3:
cmp rbp, rax
jz short loc_71047
mov ecx, [rdi+rax*4]
mov ecx, [rsi+rcx*4]
mov rdx, [r12+38h]
mov [rdx+rax*4], ecx
inc rax
jmp short loc_70FE3
loc_70FFB:
xor eax, eax; jumptable 0000000000070FAD case 8
mov rdi, [rsp+98h+var_90]
mov rsi, [rsp+98h+var_88]
loc_71007:
cmp rbp, rax
jz short loc_71047
mov ecx, [rdi+rax*4]
mov rcx, [rsi+rcx*8]
mov rdx, [r12+38h]
mov [rdx+rax*8], rcx
inc rax
jmp short loc_71007
loc_71021:
xor eax, eax; jumptable 0000000000070FAD case 2
mov rdi, [rsp+98h+var_90]
mov rsi, [rsp+98h+var_88]
loc_7102D:
cmp rbp, rax
jz short loc_71047
mov ecx, [rdi+rax*4]
movzx ecx, word ptr [rsi+rcx*2]
mov rdx, [r12+38h]
mov [rdx+rax*2], cx
inc rax
jmp short loc_7102D
loc_71047:
mov rdi, r15
call js_free
jmp loc_70F15
def_70FAD:
call _abort; jumptable 0000000000070FAD default case, cases 3,5-7
| unsigned long long js_typed_array_sort(
long long a1,
long long a2,
long long a3,
long long a4,
__m128 *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long typed_array; // rax
long long v19; // r12
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
long long v26; // rax
unsigned long long v27; // rcx
__m128 v29; // xmm0
const char *v30; // rdi
signed long long v31; // rbp
long long v32; // rax
int v33; // esi
long long v34; // rdx
long long ( *v35)(unsigned long long, unsigned long long, long long); // rcx
long long v36; // rax
long long v37; // rdi
long long i; // rax
long long v39; // rsi
int v40; // eax
long long v41; // rbp
long long v42; // rax
long long v43; // rax
long long v44; // rsi
long long v45; // rax
long long v46; // rax
long long v47; // rax
char v48; // [rsp+0h] [rbp-98h]
long long v49; // [rsp+8h] [rbp-90h]
long long v50; // [rsp+10h] [rbp-88h]
long long v51; // [rsp+18h] [rbp-80h]
long long v52; // [rsp+18h] [rbp-80h]
int v53; // [rsp+20h] [rbp-78h]
long long v54; // [rsp+28h] [rbp-70h] BYREF
int v55; // [rsp+30h] [rbp-68h]
long long v56; // [rsp+38h] [rbp-60h]
long long v57; // [rsp+40h] [rbp-58h]
__m128 v58; // [rsp+48h] [rbp-50h]
long long ( *v59)(); // [rsp+58h] [rbp-40h]
int v60; // [rsp+60h] [rbp-38h]
typed_array = get_typed_array(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( !typed_array )
goto LABEL_4;
v19 = typed_array;
if ( typed_array_is_oob(typed_array) )
{
JS_ThrowTypeErrorArrayBufferOOB(a1, a7, a8, a9, a10, v24, v25, a13, a14, a2, v20, v21, v22, v23, v48);
LABEL_4:
v26 = 0LL;
v27 = 0LL;
return v27 | v26;
}
v54 = a1;
v55 = 0;
v56 = a2;
v57 = a3;
v29 = *a5;
v58 = *a5;
v30 = (const char *)v58.m128_u32[2];
if ( v58.m128_u32[2] != 3LL )
{
v30 = (const char *)v58.m128_u32[2];
if ( (unsigned int)check_function(
a1,
v58.m128_i64[0],
v58.m128_i32[2],
v29,
a8,
a9,
a10,
*(double *)v24.m128_u64,
*(double *)v25.m128_u64,
a13,
a14) )
goto LABEL_4;
}
v31 = *(int *)(v19 + 64);
if ( v31 >= 2 )
{
v32 = *(unsigned __int16 *)(v19 + 6);
if ( (unsigned __int16)(v32 - 21) >= 0xCu )
LABEL_42:
abort(v30);
v33 = 1 << typed_array_size_log2[v32 - 21];
v34 = (unsigned __int16)(v32 - 21);
v35 = (long long ( *)(unsigned long long, unsigned long long, long long))off_BEBA0[v34];
v59 = off_BEB40[v34];
if ( (_DWORD)v30 != 3 )
{
v51 = v33;
v53 = v33;
v36 = js_malloc(a1, 4 * v31);
if ( !v36 )
goto LABEL_4;
v37 = v36;
for ( i = 0LL; v31 != i; ++i )
*(_DWORD *)(v37 + 4 * i) = i;
v60 = v33;
v49 = v37;
rqsort(
v37,
v31,
4LL,
(long long ( *)(unsigned long long, unsigned long long, long long))js_TA_cmp_generic,
(long long)&v54);
v39 = v37;
if ( !v55 )
{
if ( typed_array_is_oob(v19) || (v40 = *(_DWORD *)(v19 + 64)) == 0 )
{
LABEL_20:
js_free(a1, v49);
goto LABEL_21;
}
if ( (int)v31 < v40 )
v40 = v31;
v41 = v40;
v52 = v40 * v51;
v42 = js_malloc(a1, v52);
v39 = v37;
if ( v42 )
{
v50 = v42;
v30 = (const char *)v42;
memcpy(v42, *(_QWORD *)(v19 + 56), v52);
switch ( v53 )
{
case 1:
v43 = 0LL;
v44 = v50;
while ( v41 != v43 )
{
*(_BYTE *)(*(_QWORD *)(v19 + 56) + v43) = *(_BYTE *)(v50 + *(unsigned int *)(v49 + 4 * v43));
++v43;
}
goto LABEL_41;
case 2:
v47 = 0LL;
v44 = v50;
while ( v41 != v47 )
{
*(_WORD *)(*(_QWORD *)(v19 + 56) + 2 * v47) = *(_WORD *)(v50 + 2LL * *(unsigned int *)(v49 + 4 * v47));
++v47;
}
goto LABEL_41;
case 4:
v45 = 0LL;
v44 = v50;
while ( v41 != v45 )
{
*(_DWORD *)(*(_QWORD *)(v19 + 56) + 4 * v45) = *(_DWORD *)(v50 + 4LL * *(unsigned int *)(v49 + 4 * v45));
++v45;
}
goto LABEL_41;
case 8:
v46 = 0LL;
v44 = v50;
while ( v41 != v46 )
{
*(_QWORD *)(*(_QWORD *)(v19 + 56) + 8 * v46) = *(_QWORD *)(v50 + 8LL * *(unsigned int *)(v49 + 4 * v46));
++v46;
}
LABEL_41:
js_free(a1, v44);
goto LABEL_20;
default:
goto LABEL_42;
}
}
}
js_free(a1, v39);
goto LABEL_4;
}
rqsort(*(_QWORD *)(v19 + 56), v31, v33, v35, (long long)&v54);
if ( v55 )
goto LABEL_4;
}
LABEL_21:
if ( (unsigned int)a3 >= 0xFFFFFFF7 )
++*(_DWORD *)a2;
v27 = a2 & 0xFFFFFFFF00000000LL;
v26 = (unsigned int)a2;
return v27 | v26;
}
| js_typed_array_sort:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBP,R8
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CALL 0x001363bb
PUSH 0x6
POP R13
TEST RAX,RAX
JZ 0x00170db8
MOV R12,RAX
MOV RDI,RAX
CALL 0x001363e6
TEST EAX,EAX
JZ 0x00170dd1
MOV RDI,R15
CALL 0x0013644b
LAB_00170db8:
XOR EAX,EAX
XOR ECX,ECX
LAB_00170dbc:
OR RAX,RCX
MOV RDX,R13
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00170dd1:
MOV qword ptr [RSP + 0x28],R15
AND dword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],R14
MOV qword ptr [RSP + 0x40],RBX
MOVUPS XMM0,xmmword ptr [RBP]
MOVUPS xmmword ptr [RSP + 0x48],XMM0
MOV RDX,qword ptr [RSP + 0x50]
MOV EDI,EDX
CMP RDI,0x3
JZ 0x00170e12
MOV RSI,qword ptr [RSP + 0x48]
MOV RBP,RDI
MOV RDI,R15
CALL 0x0013d04a
MOV RDI,RBP
TEST EAX,EAX
JNZ 0x00170db8
LAB_00170e12:
MOVSXD RBP,dword ptr [R12 + 0x40]
CMP RBP,0x2
JL 0x00170f22
MOVZX EAX,word ptr [R12 + 0x6]
LEA ECX,[RAX + -0x15]
CMP CX,0xc
JNC 0x00171054
MOVZX EDX,CX
LEA RCX,[0x187aef]
MOV CL,byte ptr [RAX + RCX*0x1 + -0x15]
PUSH 0x1
POP RSI
SHL ESI,CL
SHL EDX,0x3
LEA RAX,[0x1beb40]
MOV RAX,qword ptr [RDX + RAX*0x1]
LEA RCX,[0x1beba0]
MOV RCX,qword ptr [RDX + RCX*0x1]
MOV qword ptr [RSP + 0x58],RAX
MOVSXD RDX,ESI
CMP EDI,0x3
JNZ 0x00170e92
MOV RDI,qword ptr [R12 + 0x38]
LEA R15,[RSP + 0x28]
MOV RSI,RBP
MOV R8,R15
CALL 0x0011a3ec
CMP dword ptr [R15 + 0x8],0x0
JNZ 0x00170db8
JMP 0x00170f22
LAB_00170e92:
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x20],RSI
LEA RSI,[RBP*0x4]
MOV RDI,R15
CALL 0x0011adc4
TEST RAX,RAX
JZ 0x00170db8
MOV RDI,RAX
XOR EAX,EAX
MOV RCX,qword ptr [RSP + 0x20]
LAB_00170ebf:
CMP RBP,RAX
JZ 0x00170ecc
MOV dword ptr [RDI + RAX*0x4],EAX
INC RAX
JMP 0x00170ebf
LAB_00170ecc:
LEA R8,[RSP + 0x28]
MOV dword ptr [R8 + 0x38],ECX
LEA RCX,[0x171ae8]
PUSH 0x4
POP RDX
MOV qword ptr [RSP + 0x8],RDI
MOV RSI,RBP
CALL 0x0011a3ec
MOV RSI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x28]
CMP dword ptr [RAX + 0x8],0x0
JZ 0x00170f09
LAB_00170efc:
MOV RDI,R15
CALL 0x0011ae1e
JMP 0x00170db8
LAB_00170f09:
MOV RDI,R12
CALL 0x001363e6
TEST EAX,EAX
JZ 0x00170f42
LAB_00170f15:
MOV RDI,R15
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0011ae1e
LAB_00170f22:
CMP EBX,-0x9
JC 0x00170f2a
INC dword ptr [R14]
LAB_00170f2a:
MOV RCX,-0x100000000
AND RCX,R14
MOV EAX,R14D
MOV R13,RBX
JMP 0x00170dbc
LAB_00170f42:
MOV EAX,dword ptr [R12 + 0x40]
TEST EAX,EAX
JZ 0x00170f15
CMP EBP,EAX
CMOVL EAX,EBP
MOVSXD RBP,EAX
MOV RSI,qword ptr [RSP + 0x18]
IMUL RSI,RBP
MOV RDI,R15
MOV qword ptr [RSP + 0x18],RSI
CALL 0x0011adc4
TEST RAX,RAX
MOV RSI,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x20]
JZ 0x00170efc
MOV RSI,qword ptr [R12 + 0x38]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,RAX
MOV RDX,qword ptr [RSP + 0x18]
MOV R13,RCX
CALL 0x0010e630
DEC R13D
CMP R13D,0x7
JA 0x00171054
LEA RAX,[0x1879b4]
MOVSXD RCX,dword ptr [RAX + R13*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_1:
XOR EAX,EAX
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
LAB_00170fbb:
CMP RBP,RAX
JZ 0x00171047
MOV ECX,dword ptr [RDI + RAX*0x4]
MOV CL,byte ptr [RSI + RCX*0x1]
MOV RDX,qword ptr [R12 + 0x38]
MOV byte ptr [RDX + RAX*0x1],CL
INC RAX
JMP 0x00170fbb
caseD_4:
XOR EAX,EAX
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
LAB_00170fe3:
CMP RBP,RAX
JZ 0x00171047
MOV ECX,dword ptr [RDI + RAX*0x4]
MOV ECX,dword ptr [RSI + RCX*0x4]
MOV RDX,qword ptr [R12 + 0x38]
MOV dword ptr [RDX + RAX*0x4],ECX
INC RAX
JMP 0x00170fe3
caseD_8:
XOR EAX,EAX
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
LAB_00171007:
CMP RBP,RAX
JZ 0x00171047
MOV ECX,dword ptr [RDI + RAX*0x4]
MOV RCX,qword ptr [RSI + RCX*0x8]
MOV RDX,qword ptr [R12 + 0x38]
MOV qword ptr [RDX + RAX*0x8],RCX
INC RAX
JMP 0x00171007
caseD_2:
XOR EAX,EAX
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
LAB_0017102d:
CMP RBP,RAX
JZ 0x00171047
MOV ECX,dword ptr [RDI + RAX*0x4]
MOVZX ECX,word ptr [RSI + RCX*0x2]
MOV RDX,qword ptr [R12 + 0x38]
MOV word ptr [RDX + RAX*0x2],CX
INC RAX
JMP 0x0017102d
LAB_00171047:
MOV RDI,R15
CALL 0x0011ae1e
JMP 0x00170f15
caseD_3:
CALL 0x0010e090
|
int1 [16]
js_typed_array_sort(int8 param_1,int *param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
int iVar2;
long lVar3;
ulong uVar4;
long lVar5;
long lVar6;
void *__dest;
ushort uVar7;
ulong uVar8;
long lVar9;
long lVar10;
int iVar11;
int1 auVar12 [16];
int8 local_70;
int local_68;
int *local_60;
int8 local_58;
int4 local_50;
int4 uStack_4c;
int iStack_48;
int4 uStack_44;
int *local_40;
int local_38;
lVar3 = get_typed_array();
if (lVar3 != 0) {
iVar1 = typed_array_is_oob(lVar3);
if (iVar1 == 0) {
local_68 = 0;
local_50 = *(int4 *)param_5;
uStack_4c = *(int4 *)((long)param_5 + 4);
iVar1 = *(int *)(param_5 + 1);
uStack_44 = *(int4 *)((long)param_5 + 0xc);
local_70 = param_1;
local_60 = param_2;
local_58 = param_3;
iStack_48 = iVar1;
if ((iVar1 == 3) || (iVar2 = check_function(param_1,*param_5), iVar2 == 0)) {
iVar2 = *(int *)(lVar3 + 0x40);
lVar10 = (long)iVar2;
if (lVar10 < 2) {
LAB_00170f22:
if (0xfffffff6 < (uint)param_3) {
*param_2 = *param_2 + 1;
}
uVar8 = (ulong)param_2 & 0xffffffff00000000;
uVar4 = (ulong)param_2 & 0xffffffff;
goto LAB_00170dbc;
}
uVar7 = *(ushort *)(lVar3 + 6) - 0x15;
if (0xb < uVar7) {
switchD_00170fad_caseD_3:
/* WARNING: Subroutine does not return */
abort();
}
iVar11 = 1 << ("toSorted"[(ulong)*(ushort *)(lVar3 + 6) + 6] & 0x1fU);
local_40 = (&PTR_js_TA_get_uint8_001beb40)[uVar7];
lVar9 = (long)iVar11;
if (iVar1 == 3) {
rqsort(*(int8 *)(lVar3 + 0x38),lVar10,lVar9,(&PTR_js_TA_cmp_uint8_001beba0)[uVar7],
&local_70);
if (local_68 == 0) goto LAB_00170f22;
}
else {
lVar5 = js_malloc(param_1,lVar10 * 4,lVar9,(&PTR_js_TA_cmp_uint8_001beba0)[uVar7]);
if (lVar5 != 0) {
for (lVar6 = 0; lVar10 != lVar6; lVar6 = lVar6 + 1) {
*(int *)(lVar5 + lVar6 * 4) = (int)lVar6;
}
local_38 = iVar11;
rqsort(lVar5,lVar10,4,js_TA_cmp_generic);
if (local_68 == 0) {
iVar1 = typed_array_is_oob(lVar3,lVar5);
if ((iVar1 == 0) && (iVar1 = *(int *)(lVar3 + 0x40), iVar1 != 0)) {
if (iVar2 < iVar1) {
iVar1 = iVar2;
}
lVar10 = (long)iVar1;
__dest = (void *)js_malloc(param_1);
if (__dest == (void *)0x0) goto LAB_00170efc;
memcpy(__dest,*(void **)(lVar3 + 0x38),lVar9 * lVar10);
switch(iVar11) {
case 1:
for (lVar9 = 0; lVar10 != lVar9; lVar9 = lVar9 + 1) {
*(int1 *)(*(long *)(lVar3 + 0x38) + lVar9) =
*(int1 *)((long)__dest + (ulong)*(uint *)(lVar5 + lVar9 * 4));
}
break;
case 2:
for (lVar9 = 0; lVar10 != lVar9; lVar9 = lVar9 + 1) {
*(int2 *)(*(long *)(lVar3 + 0x38) + lVar9 * 2) =
*(int2 *)((long)__dest + (ulong)*(uint *)(lVar5 + lVar9 * 4) * 2);
}
break;
default:
goto switchD_00170fad_caseD_3;
case 4:
for (lVar9 = 0; lVar10 != lVar9; lVar9 = lVar9 + 1) {
*(int4 *)(*(long *)(lVar3 + 0x38) + lVar9 * 4) =
*(int4 *)((long)__dest + (ulong)*(uint *)(lVar5 + lVar9 * 4) * 4);
}
break;
case 8:
for (lVar9 = 0; lVar10 != lVar9; lVar9 = lVar9 + 1) {
*(int8 *)(*(long *)(lVar3 + 0x38) + lVar9 * 8) =
*(int8 *)((long)__dest + (ulong)*(uint *)(lVar5 + lVar9 * 4) * 8);
}
}
js_free(param_1);
}
js_free(param_1,lVar5);
goto LAB_00170f22;
}
LAB_00170efc:
js_free(param_1,lVar5);
}
}
}
}
else {
JS_ThrowTypeErrorArrayBufferOOB(param_1);
}
}
uVar4 = 0;
uVar8 = 0;
param_3 = 6;
LAB_00170dbc:
auVar12._0_8_ = uVar4 | uVar8;
auVar12._8_8_ = param_3;
return auVar12;
}
| |
47,115 | LefDefParser::defiPin::addPolygon(char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPinCap.cpp | void defiPin::addPolygon(const char* layerName) {
int *pms, *pdw, *pm;
int i;
if (numPolys_ == polysAllocated_) {
char** newn;
struct defiPoints** poly;
polysAllocated_ = (polysAllocated_ == 0) ?
2 : polysAllocated_ * 2;
newn = (char**)malloc(sizeof(char*) * polysAllocated_);
poly = (struct defiPoints**)malloc(sizeof(struct defiPoints*) *
polysAllocated_);
pms = (int*)malloc(polysAllocated_ * sizeof(int));
pdw = (int*)malloc(polysAllocated_ * sizeof(int));
pm = (int*)malloc(polysAllocated_ * sizeof(int));
for (i = 0; i < numPolys_; i++) {
newn[i] = polygonNames_[i];
poly[i] = polygons_[i];
pms[i] = polyMinSpacing_[i];
pdw[i] = polyEffectiveWidth_[i];
pm[i] = polyMask_[i];
}
if (numPolys_ > 0) {
free((char*)(polygons_));
free((char*)(polygonNames_));
free((char*)(polyMinSpacing_));
free((char*)(polyEffectiveWidth_));
free((char*)(polyMask_));
}
polygonNames_ = newn;
polygons_ = poly;
polyMinSpacing_ = pms;
polyEffectiveWidth_ = pdw;
polyMask_= pm;
}
polygonNames_[numPolys_] = strdup(layerName);
polygons_[numPolys_] = 0;
polyMinSpacing_[numPolys_] = -1;
polyEffectiveWidth_[numPolys_] = -1;
polyMask_[numPolys_] = 0;
numPolys_ += 1;
} | O3 | cpp | LefDefParser::defiPin::addPolygon(char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0xa8(%rdi), %r14d
cmpl 0xac(%rdi), %r14d
jne 0x1eaa8
movq %rsi, 0x10(%rsp)
leal (%r14,%r14), %eax
testl %r14d, %r14d
movl $0x2, %ecx
cmovnel %eax, %ecx
movl %ecx, 0xac(%rbx)
movq %r14, 0x8(%rsp)
movslq %ecx, %r14
leaq (,%r14,8), %r12
movq %r12, %rdi
callq 0x7270
movq %rax, %r15
movq %r12, %rdi
callq 0x7270
movq %rax, %r12
shlq $0x2, %r14
movq %r14, %rdi
callq 0x7270
movq %rax, %r13
movq %r14, %rdi
callq 0x7270
movq %rax, %rbp
movq %r14, %rdi
callq 0x7270
movq 0x8(%rsp), %r8
movq %rax, %r14
testl %r8d, %r8d
jle 0x1eab1
movq 0x88(%rbx), %rax
movq 0x90(%rbx), %rcx
movq 0xb0(%rbx), %rdx
movq 0x98(%rbx), %rsi
movq 0xa0(%rbx), %rdi
movq %r8, %r11
leaq (,%r8,4), %r8
xorl %r9d, %r9d
movq (%rax,%r9,2), %r10
movq %r10, (%r15,%r9,2)
movq (%rdx,%r9,2), %r10
movq %r10, (%r12,%r9,2)
movl (%rcx,%r9), %r10d
movl %r10d, (%r13,%r9)
movl (%rsi,%r9), %r10d
movl %r10d, (%rbp,%r9)
movl (%rdi,%r9), %r10d
movl %r10d, (%r14,%r9)
addq $0x4, %r9
cmpq %r9, %r8
jne 0x1ea2b
testl %r11d, %r11d
jle 0x1eab4
movq 0xb0(%rbx), %rdi
callq 0x7220
movq 0x88(%rbx), %rdi
callq 0x7220
movq 0x90(%rbx), %rdi
callq 0x7220
movq 0x98(%rbx), %rdi
callq 0x7220
movq 0xa0(%rbx), %rdi
callq 0x7220
movl 0xa8(%rbx), %r11d
jmp 0x1eab4
movq 0x88(%rbx), %r15
jmp 0x1eadf
movq %r8, %r11
movq %r15, 0x88(%rbx)
movq %r12, 0xb0(%rbx)
movq %r13, 0x90(%rbx)
movq %rbp, 0x98(%rbx)
movq %r14, 0xa0(%rbx)
movq 0x10(%rsp), %rsi
movq %r11, %r14
movq %rsi, %rdi
callq 0x7320
movslq %r14d, %rcx
movq %rax, (%r15,%rcx,8)
movq 0xb0(%rbx), %rax
movq $0x0, (%rax,%rcx,8)
movq 0x90(%rbx), %rax
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl %edx, (%rax,%rcx,4)
movq 0x98(%rbx), %rax
movslq 0xa8(%rbx), %rcx
movl %edx, (%rax,%rcx,4)
movq 0xa0(%rbx), %rax
movslq 0xa8(%rbx), %rcx
movl $0x0, (%rax,%rcx,4)
incl 0xa8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN12LefDefParser7defiPin10addPolygonEPKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r14d, [rdi+0A8h]
cmp r14d, [rdi+0ACh]
jnz loc_1EAA8
mov [rsp+48h+var_38], rsi
lea eax, [r14+r14]
test r14d, r14d
mov ecx, 2
cmovnz ecx, eax
mov [rbx+0ACh], ecx
mov [rsp+48h+var_40], r14
movsxd r14, ecx
lea r12, ds:0[r14*8]
mov rdi, r12
call _malloc
mov r15, rax
mov rdi, r12
call _malloc
mov r12, rax
shl r14, 2
mov rdi, r14
call _malloc
mov r13, rax
mov rdi, r14
call _malloc
mov rbp, rax
mov rdi, r14
call _malloc
mov r8, [rsp+48h+var_40]
mov r14, rax
test r8d, r8d
jle loc_1EAB1
mov rax, [rbx+88h]
mov rcx, [rbx+90h]
mov rdx, [rbx+0B0h]
mov rsi, [rbx+98h]
mov rdi, [rbx+0A0h]
mov r11, r8
lea r8, ds:0[r8*4]
xor r9d, r9d
loc_1EA2B:
mov r10, [rax+r9*2]
mov [r15+r9*2], r10
mov r10, [rdx+r9*2]
mov [r12+r9*2], r10
mov r10d, [rcx+r9]
mov [r13+r9+0], r10d
mov r10d, [rsi+r9]
mov [rbp+r9+0], r10d
mov r10d, [rdi+r9]
mov [r14+r9], r10d
add r9, 4
cmp r8, r9
jnz short loc_1EA2B
test r11d, r11d
jle short loc_1EAB4
mov rdi, [rbx+0B0h]
call _free
mov rdi, [rbx+88h]
call _free
mov rdi, [rbx+90h]
call _free
mov rdi, [rbx+98h]
call _free
mov rdi, [rbx+0A0h]
call _free
mov r11d, [rbx+0A8h]
jmp short loc_1EAB4
loc_1EAA8:
mov r15, [rbx+88h]
jmp short loc_1EADF
loc_1EAB1:
mov r11, r8
loc_1EAB4:
mov [rbx+88h], r15
mov [rbx+0B0h], r12
mov [rbx+90h], r13
mov [rbx+98h], rbp
mov [rbx+0A0h], r14
mov rsi, [rsp+48h+var_38]
mov r14, r11
loc_1EADF:
mov rdi, rsi
call _strdup
movsxd rcx, r14d
mov [r15+rcx*8], rax
mov rax, [rbx+0B0h]
mov qword ptr [rax+rcx*8], 0
mov rax, [rbx+90h]
mov edx, 0FFFFFFFFh
mov [rax+rcx*4], edx
mov rax, [rbx+98h]
movsxd rcx, dword ptr [rbx+0A8h]
mov [rax+rcx*4], edx
mov rax, [rbx+0A0h]
movsxd rcx, dword ptr [rbx+0A8h]
mov dword ptr [rax+rcx*4], 0
inc dword ptr [rbx+0A8h]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::defiPin::addPolygon(LefDefParser::defiPin *this, const char *a2)
{
long long v3; // r14
int v4; // ecx
unsigned long long v5; // r14
unsigned long long v6; // r12
long long v7; // r15
long long v8; // r12
long long v9; // r13
long long v10; // rbp
long long v11; // rax
long long v12; // rcx
long long v13; // rdx
long long v14; // rsi
long long v15; // rdi
long long v16; // r9
int v17; // r11d
long long result; // rax
long long v19; // [rsp+8h] [rbp-40h]
const char *v20; // [rsp+10h] [rbp-38h]
v3 = *((unsigned int *)this + 42);
if ( (_DWORD)v3 == *((_DWORD *)this + 43) )
{
v20 = a2;
v4 = 2;
if ( (_DWORD)v3 )
v4 = 2 * v3;
*((_DWORD *)this + 43) = v4;
v19 = v3;
v5 = v4;
v6 = 8LL * v4;
v7 = malloc(v6);
v8 = malloc(v6);
v5 *= 4LL;
v9 = malloc(v5);
v10 = malloc(v5);
v3 = malloc(v5);
if ( (int)v19 <= 0 )
{
v17 = v19;
}
else
{
v11 = *((_QWORD *)this + 17);
v12 = *((_QWORD *)this + 18);
v13 = *((_QWORD *)this + 22);
v14 = *((_QWORD *)this + 19);
v15 = *((_QWORD *)this + 20);
v16 = 0LL;
do
{
*(_QWORD *)(v7 + 2 * v16) = *(_QWORD *)(v11 + 2 * v16);
*(_QWORD *)(v8 + 2 * v16) = *(_QWORD *)(v13 + 2 * v16);
*(_DWORD *)(v9 + v16) = *(_DWORD *)(v12 + v16);
*(_DWORD *)(v10 + v16) = *(_DWORD *)(v14 + v16);
*(_DWORD *)(v3 + v16) = *(_DWORD *)(v15 + v16);
v16 += 4LL;
}
while ( 4 * v19 != v16 );
free(*((void **)this + 22));
free(*((void **)this + 17));
free(*((void **)this + 18));
free(*((void **)this + 19));
free(*((void **)this + 20));
v17 = *((_DWORD *)this + 42);
}
*((_QWORD *)this + 17) = v7;
*((_QWORD *)this + 22) = v8;
*((_QWORD *)this + 18) = v9;
*((_QWORD *)this + 19) = v10;
*((_QWORD *)this + 20) = v3;
a2 = v20;
LODWORD(v3) = v17;
}
else
{
v7 = *((_QWORD *)this + 17);
}
*(_QWORD *)(v7 + 8LL * (int)v3) = strdup(a2);
*(_QWORD *)(*((_QWORD *)this + 22) + 8LL * (int)v3) = 0LL;
*(_DWORD *)(*((_QWORD *)this + 18) + 4LL * (int)v3) = -1;
*(_DWORD *)(*((_QWORD *)this + 19) + 4LL * *((int *)this + 42)) = -1;
result = *((_QWORD *)this + 20);
*(_DWORD *)(result + 4LL * (int)(*((_DWORD *)this + 42))++) = 0;
return result;
}
| addPolygon:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV R14D,dword ptr [RDI + 0xa8]
CMP R14D,dword ptr [RDI + 0xac]
JNZ 0x0011eaa8
MOV qword ptr [RSP + 0x10],RSI
LEA EAX,[R14 + R14*0x1]
TEST R14D,R14D
MOV ECX,0x2
CMOVNZ ECX,EAX
MOV dword ptr [RBX + 0xac],ECX
MOV qword ptr [RSP + 0x8],R14
MOVSXD R14,ECX
LEA R12,[R14*0x8]
MOV RDI,R12
CALL 0x00107270
MOV R15,RAX
MOV RDI,R12
CALL 0x00107270
MOV R12,RAX
SHL R14,0x2
MOV RDI,R14
CALL 0x00107270
MOV R13,RAX
MOV RDI,R14
CALL 0x00107270
MOV RBP,RAX
MOV RDI,R14
CALL 0x00107270
MOV R8,qword ptr [RSP + 0x8]
MOV R14,RAX
TEST R8D,R8D
JLE 0x0011eab1
MOV RAX,qword ptr [RBX + 0x88]
MOV RCX,qword ptr [RBX + 0x90]
MOV RDX,qword ptr [RBX + 0xb0]
MOV RSI,qword ptr [RBX + 0x98]
MOV RDI,qword ptr [RBX + 0xa0]
MOV R11,R8
LEA R8,[R8*0x4]
XOR R9D,R9D
LAB_0011ea2b:
MOV R10,qword ptr [RAX + R9*0x2]
MOV qword ptr [R15 + R9*0x2],R10
MOV R10,qword ptr [RDX + R9*0x2]
MOV qword ptr [R12 + R9*0x2],R10
MOV R10D,dword ptr [RCX + R9*0x1]
MOV dword ptr [R13 + R9*0x1],R10D
MOV R10D,dword ptr [RSI + R9*0x1]
MOV dword ptr [RBP + R9*0x1],R10D
MOV R10D,dword ptr [RDI + R9*0x1]
MOV dword ptr [R14 + R9*0x1],R10D
ADD R9,0x4
CMP R8,R9
JNZ 0x0011ea2b
TEST R11D,R11D
JLE 0x0011eab4
MOV RDI,qword ptr [RBX + 0xb0]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x88]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x90]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0x98]
CALL 0x00107220
MOV RDI,qword ptr [RBX + 0xa0]
CALL 0x00107220
MOV R11D,dword ptr [RBX + 0xa8]
JMP 0x0011eab4
LAB_0011eaa8:
MOV R15,qword ptr [RBX + 0x88]
JMP 0x0011eadf
LAB_0011eab1:
MOV R11,R8
LAB_0011eab4:
MOV qword ptr [RBX + 0x88],R15
MOV qword ptr [RBX + 0xb0],R12
MOV qword ptr [RBX + 0x90],R13
MOV qword ptr [RBX + 0x98],RBP
MOV qword ptr [RBX + 0xa0],R14
MOV RSI,qword ptr [RSP + 0x10]
MOV R14,R11
LAB_0011eadf:
MOV RDI,RSI
CALL 0x00107320
MOVSXD RCX,R14D
MOV qword ptr [R15 + RCX*0x8],RAX
MOV RAX,qword ptr [RBX + 0xb0]
MOV qword ptr [RAX + RCX*0x8],0x0
MOV RAX,qword ptr [RBX + 0x90]
MOV EDX,0xffffffff
MOV dword ptr [RAX + RCX*0x4],EDX
MOV RAX,qword ptr [RBX + 0x98]
MOVSXD RCX,dword ptr [RBX + 0xa8]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV RAX,qword ptr [RBX + 0xa0]
MOVSXD RCX,dword ptr [RBX + 0xa8]
MOV dword ptr [RAX + RCX*0x4],0x0
INC dword ptr [RBX + 0xa8]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defiPin::addPolygon(char const*) */
void __thiscall LefDefParser::defiPin::addPolygon(defiPin *this,char *param_1)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
void *pvVar5;
void *pvVar6;
void *pvVar7;
void *pvVar8;
void *pvVar9;
char *pcVar10;
int iVar11;
long lVar12;
long lVar13;
uint uVar14;
size_t sVar15;
uVar14 = *(uint *)(this + 0xa8);
if (uVar14 == *(uint *)(this + 0xac)) {
iVar11 = 2;
if (uVar14 != 0) {
iVar11 = uVar14 * 2;
}
*(int *)(this + 0xac) = iVar11;
sVar15 = (long)iVar11 * 8;
pvVar5 = malloc(sVar15);
pvVar6 = malloc(sVar15);
sVar15 = (long)iVar11 << 2;
pvVar7 = malloc(sVar15);
pvVar8 = malloc(sVar15);
pvVar9 = malloc(sVar15);
if (0 < (int)uVar14) {
lVar12 = *(long *)(this + 0x88);
lVar1 = *(long *)(this + 0x90);
lVar2 = *(long *)(this + 0xb0);
lVar3 = *(long *)(this + 0x98);
lVar4 = *(long *)(this + 0xa0);
lVar13 = 0;
do {
*(int8 *)((long)pvVar5 + lVar13 * 2) = *(int8 *)(lVar12 + lVar13 * 2);
*(int8 *)((long)pvVar6 + lVar13 * 2) = *(int8 *)(lVar2 + lVar13 * 2);
*(int4 *)((long)pvVar7 + lVar13) = *(int4 *)(lVar1 + lVar13);
*(int4 *)((long)pvVar8 + lVar13) = *(int4 *)(lVar3 + lVar13);
*(int4 *)((long)pvVar9 + lVar13) = *(int4 *)(lVar4 + lVar13);
lVar13 = lVar13 + 4;
} while ((ulong)uVar14 * 4 - lVar13 != 0);
if (0 < (int)uVar14) {
free(*(void **)(this + 0xb0));
free(*(void **)(this + 0x88));
free(*(void **)(this + 0x90));
free(*(void **)(this + 0x98));
free(*(void **)(this + 0xa0));
uVar14 = *(uint *)(this + 0xa8);
}
}
*(void **)(this + 0x88) = pvVar5;
*(void **)(this + 0xb0) = pvVar6;
*(void **)(this + 0x90) = pvVar7;
*(void **)(this + 0x98) = pvVar8;
*(void **)(this + 0xa0) = pvVar9;
}
else {
pvVar5 = *(void **)(this + 0x88);
}
pcVar10 = strdup(param_1);
lVar12 = (long)(int)uVar14;
*(char **)((long)pvVar5 + lVar12 * 8) = pcVar10;
*(int8 *)(*(long *)(this + 0xb0) + lVar12 * 8) = 0;
*(int4 *)(*(long *)(this + 0x90) + lVar12 * 4) = 0xffffffff;
*(int4 *)(*(long *)(this + 0x98) + (long)*(int *)(this + 0xa8) * 4) = 0xffffffff;
*(int4 *)(*(long *)(this + 0xa0) + (long)*(int *)(this + 0xa8) * 4) = 0;
*(int *)(this + 0xa8) = *(int *)(this + 0xa8) + 1;
return;
}
| |
47,116 | MNN::TfQuantizedConv2D::UnPackTo(MNN::TfQuantizedConv2DT*, std::__1::function<void (void**, unsigned long)> const*) const | mnn-tts/MNN/schema/current/TFQuantizeOp_generated.h | inline void TfQuantizedConv2D::UnPackTo(TfQuantizedConv2DT *_o, const flatbuffers::resolver_function_t *_resolver) const {
(void)_o;
(void)_resolver;
{ auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } };
{ auto _e = biasflag(); _o->biasflag = _e; };
{ auto _e = common(); if (_e) _o->common = std::unique_ptr<Convolution2DCommonT>(_e->UnPack(_resolver)); };
{ auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } };
{ auto _e = activationType(); _o->activationType = _e; };
{ auto _e = multiplier(); _o->multiplier = _e; };
{ auto _e = outMax(); _o->outMax = _e; };
{ auto _e = outMin(); _o->outMin = _e; };
{ auto _e = shift(); _o->shift = _e; };
{ auto _e = biasQuantizedParam(); if (_e) _o->biasQuantizedParam = std::unique_ptr<QuantizedParamT>(_e->UnPack(_resolver)); };
{ auto _e = depthMultiplier(); _o->depthMultiplier = _e; };
{ auto _e = filterQuantizedParam(); if (_e) _o->filterQuantizedParam = std::unique_ptr<QuantizedParamT>(_e->UnPack(_resolver)); };
{ auto _e = inputQuantizedParam(); if (_e) _o->inputQuantizedParam = std::unique_ptr<QuantizedParamT>(_e->UnPack(_resolver)); };
{ auto _e = modelFormat(); _o->modelFormat = _e; };
{ auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr<QuantizedParamT>(_e->UnPack(_resolver)); };
} | O0 | c | MNN::TfQuantizedConv2D::UnPackTo(MNN::TfQuantizedConv2DT*, std::__1::function<void (void**, unsigned long)> const*) const:
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xc0(%rsp)
movq 0xd0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x25510
movq %rax, 0xb8(%rsp)
cmpq $0x0, 0xb8(%rsp)
je 0x25166
movq 0xc8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xb8(%rsp), %rdi
callq 0xb480
movq 0x20(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0xb410
movl $0x0, 0xb4(%rsp)
movl 0xb4(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0xb8(%rsp), %rdi
callq 0xb480
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jae 0x25164
movq 0xb8(%rsp), %rdi
movl 0xb4(%rsp), %esi
callq 0xb4a0
movl %eax, 0x18(%rsp)
movq 0xc8(%rsp), %rdi
movl 0xb4(%rsp), %eax
movl %eax, %esi
callq 0xb510
movl 0x18(%rsp), %ecx
movl %ecx, (%rax)
movl 0xb4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb4(%rsp)
jmp 0x250fb
jmp 0x25166
movq 0x28(%rsp), %rdi
callq 0x25530
movq 0x28(%rsp), %rdi
andb $0x1, %al
movb %al, 0xb3(%rsp)
movb 0xb3(%rsp), %cl
movq 0xc8(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x18(%rax)
callq 0x25560
movq %rax, 0xa8(%rsp)
cmpq $0x0, 0xa8(%rsp)
je 0x251f6
movq 0xa8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x17b00
movq %rax, %rsi
leaq 0xa0(%rsp), %rdi
callq 0x17b60
movq 0xc8(%rsp), %rdi
addq $0x20, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x17b80
leaq 0xa0(%rsp), %rdi
callq 0x17bc0
movq 0x28(%rsp), %rdi
callq 0x25580
movq %rax, 0x98(%rsp)
cmpq $0x0, 0x98(%rsp)
je 0x252bd
movq 0xc8(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x10(%rsp)
movq 0x98(%rsp), %rdi
callq 0xb600
movq 0x10(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0xb590
movl $0x0, 0x94(%rsp)
movl 0x94(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x98(%rsp), %rdi
callq 0xb600
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jae 0x252bb
movq 0x98(%rsp), %rdi
movl 0x94(%rsp), %esi
callq 0xb620
movb %al, 0xb(%rsp)
movq 0xc8(%rsp), %rdi
addq $0x28, %rdi
movl 0x94(%rsp), %eax
movl %eax, %esi
callq 0xb690
movb 0xb(%rsp), %cl
movb %cl, (%rax)
movl 0x94(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x94(%rsp)
jmp 0x2524e
jmp 0x252bd
movq 0x28(%rsp), %rdi
callq 0x255a0
movq 0x28(%rsp), %rdi
movl %eax, 0x90(%rsp)
movl 0x90(%rsp), %ecx
movq 0xc8(%rsp), %rax
movl %ecx, 0x40(%rax)
callq 0x255c0
movq 0x28(%rsp), %rdi
movl %eax, 0x8c(%rsp)
movl 0x8c(%rsp), %ecx
movq 0xc8(%rsp), %rax
movl %ecx, 0x44(%rax)
callq 0x255e0
movq 0x28(%rsp), %rdi
movl %eax, 0x88(%rsp)
movl 0x88(%rsp), %ecx
movq 0xc8(%rsp), %rax
movl %ecx, 0x48(%rax)
callq 0x25600
movq 0x28(%rsp), %rdi
movl %eax, 0x84(%rsp)
movl 0x84(%rsp), %ecx
movq 0xc8(%rsp), %rax
movl %ecx, 0x4c(%rax)
callq 0x25620
movq 0x28(%rsp), %rdi
movl %eax, 0x80(%rsp)
movl 0x80(%rsp), %ecx
movq 0xc8(%rsp), %rax
movl %ecx, 0x50(%rax)
callq 0x25640
movq %rax, 0x78(%rsp)
cmpq $0x0, 0x78(%rsp)
je 0x253c2
movq 0x78(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x166a0
movq %rax, %rsi
leaq 0x70(%rsp), %rdi
callq 0x16700
movq 0xc8(%rsp), %rdi
addq $0x58, %rdi
leaq 0x70(%rsp), %rsi
callq 0x16720
leaq 0x70(%rsp), %rdi
callq 0x16760
movq 0x28(%rsp), %rdi
callq 0x25660
movq 0x28(%rsp), %rdi
movl %eax, 0x6c(%rsp)
movl 0x6c(%rsp), %ecx
movq 0xc8(%rsp), %rax
movl %ecx, 0x60(%rax)
callq 0x25680
movq %rax, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x25435
movq 0x60(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x166a0
movq %rax, %rsi
leaq 0x58(%rsp), %rdi
callq 0x16700
movq 0xc8(%rsp), %rdi
addq $0x68, %rdi
leaq 0x58(%rsp), %rsi
callq 0x16720
leaq 0x58(%rsp), %rdi
callq 0x16760
movq 0x28(%rsp), %rdi
callq 0x256a0
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x2548b
movq 0x50(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x166a0
movq %rax, %rsi
leaq 0x48(%rsp), %rdi
callq 0x16700
movq 0xc8(%rsp), %rdi
addq $0x70, %rdi
leaq 0x48(%rsp), %rsi
callq 0x16720
leaq 0x48(%rsp), %rdi
callq 0x16760
movq 0x28(%rsp), %rdi
callq 0x256c0
movq 0x28(%rsp), %rdi
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %ecx
movq 0xc8(%rsp), %rax
movl %ecx, 0x78(%rax)
callq 0x256e0
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x25501
movq 0x38(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x166a0
movq %rax, %rsi
leaq 0x30(%rsp), %rdi
callq 0x16700
movq 0xc8(%rsp), %rdi
addq $0x80, %rdi
leaq 0x30(%rsp), %rsi
callq 0x16720
leaq 0x30(%rsp), %rdi
callq 0x16760
addq $0xd8, %rsp
retq
nopl (%rax)
| _ZNK3MNN17TfQuantizedConv2D8UnPackToEPNS_18TfQuantizedConv2DTEPKNSt3__18functionIFvPPvmEEE:
sub rsp, 0D8h
mov [rsp+0D8h+var_8], rdi
mov [rsp+0D8h+var_10], rsi
mov [rsp+0D8h+var_18], rdx
mov rdi, [rsp+0D8h+var_8]; this
mov [rsp+0D8h+var_B0], rdi
call _ZNK3MNN17TfQuantizedConv2D4biasEv; MNN::TfQuantizedConv2D::bias(void)
mov [rsp+0D8h+var_20], rax
cmp [rsp+0D8h+var_20], 0
jz loc_25166
mov rax, [rsp+0D8h+var_10]
mov [rsp+0D8h+var_B8], rax
mov rdi, [rsp+0D8h+var_20]
call _ZNK11flatbuffers6VectorIiE4sizeEv; flatbuffers::Vector<int>::size(void)
mov rdi, [rsp+0D8h+var_B8]
mov eax, eax
mov esi, eax
call _ZNSt3__16vectorIiNS_9allocatorIiEEE6resizeEm; std::vector<int>::resize(ulong)
mov [rsp+0D8h+var_24], 0
loc_250FB:
mov eax, [rsp+0D8h+var_24]
mov [rsp+0D8h+var_BC], eax
mov rdi, [rsp+0D8h+var_20]
call _ZNK11flatbuffers6VectorIiE4sizeEv; flatbuffers::Vector<int>::size(void)
mov ecx, eax
mov eax, [rsp+0D8h+var_BC]
cmp eax, ecx
jnb short loc_25164
mov rdi, [rsp+0D8h+var_20]
mov esi, [rsp+0D8h+var_24]
call _ZNK11flatbuffers6VectorIiE3GetEj; flatbuffers::Vector<int>::Get(uint)
mov [rsp+0D8h+var_C0], eax
mov rdi, [rsp+0D8h+var_10]
mov eax, [rsp+0D8h+var_24]
mov esi, eax
call _ZNSt3__16vectorIiNS_9allocatorIiEEEixB8nn200100Em; std::vector<int>::operator[](ulong)
mov ecx, [rsp+0D8h+var_C0]
mov [rax], ecx
mov eax, [rsp+0D8h+var_24]
add eax, 1
mov [rsp+0D8h+var_24], eax
jmp short loc_250FB
loc_25164:
jmp short $+2
loc_25166:
mov rdi, [rsp+0D8h+var_B0]; this
call _ZNK3MNN17TfQuantizedConv2D8biasflagEv; MNN::TfQuantizedConv2D::biasflag(void)
mov rdi, [rsp+0D8h+var_B0]; this
and al, 1
mov [rsp+0D8h+var_25], al
mov cl, [rsp+0D8h+var_25]
mov rax, [rsp+0D8h+var_10]
and cl, 1
mov [rax+18h], cl
call _ZNK3MNN17TfQuantizedConv2D6commonEv; MNN::TfQuantizedConv2D::common(void)
mov [rsp+0D8h+var_30], rax
cmp [rsp+0D8h+var_30], 0
jz short loc_251F6
mov rdi, [rsp+0D8h+var_30]
mov rsi, [rsp+0D8h+var_18]
call _ZNK3MNN19Convolution2DCommon6UnPackEPKNSt3__18functionIFvPPvmEEE; MNN::Convolution2DCommon::UnPack(std::function<void ()(void **,ulong)> const*)
mov rsi, rax
lea rdi, [rsp+0D8h+var_38]
call _ZNSt3__110unique_ptrIN3MNN20Convolution2DCommonTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_; std::unique_ptr<MNN::Convolution2DCommonT>::unique_ptr<true,void>(MNN::Convolution2DCommonT*)
mov rdi, [rsp+0D8h+var_10]
add rdi, 20h ; ' '
lea rsi, [rsp+0D8h+var_38]
call _ZNSt3__110unique_ptrIN3MNN20Convolution2DCommonTENS_14default_deleteIS2_EEEaSB8nn200100EOS5_; std::unique_ptr<MNN::Convolution2DCommonT>::operator=(std::unique_ptr<MNN::Convolution2DCommonT>&&)
lea rdi, [rsp+0D8h+var_38]
call _ZNSt3__110unique_ptrIN3MNN20Convolution2DCommonTENS_14default_deleteIS2_EEED2B8nn200100Ev; std::unique_ptr<MNN::Convolution2DCommonT>::~unique_ptr()
loc_251F6:
mov rdi, [rsp+0D8h+var_B0]; this
call _ZNK3MNN17TfQuantizedConv2D6weightEv; MNN::TfQuantizedConv2D::weight(void)
mov [rsp+0D8h+var_40], rax
cmp [rsp+0D8h+var_40], 0
jz loc_252BD
mov rax, [rsp+0D8h+var_10]
add rax, 28h ; '('
mov [rsp+0D8h+var_C8], rax
mov rdi, [rsp+0D8h+var_40]
call _ZNK11flatbuffers6VectorIhE4sizeEv; flatbuffers::Vector<uchar>::size(void)
mov rdi, [rsp+0D8h+var_C8]
mov eax, eax
mov esi, eax
call _ZNSt3__16vectorIhNS_9allocatorIhEEE6resizeEm; std::vector<uchar>::resize(ulong)
mov [rsp+0D8h+var_44], 0
loc_2524E:
mov eax, [rsp+0D8h+var_44]
mov [rsp+0D8h+var_CC], eax
mov rdi, [rsp+0D8h+var_40]
call _ZNK11flatbuffers6VectorIhE4sizeEv; flatbuffers::Vector<uchar>::size(void)
mov ecx, eax
mov eax, [rsp+0D8h+var_CC]
cmp eax, ecx
jnb short loc_252BB
mov rdi, [rsp+0D8h+var_40]
mov esi, [rsp+0D8h+var_44]
call _ZNK11flatbuffers6VectorIhE3GetEj; flatbuffers::Vector<uchar>::Get(uint)
mov [rsp+0D8h+var_CD], al
mov rdi, [rsp+0D8h+var_10]
add rdi, 28h ; '('
mov eax, [rsp+0D8h+var_44]
mov esi, eax
call _ZNSt3__16vectorIhNS_9allocatorIhEEEixB8nn200100Em; std::vector<uchar>::operator[](ulong)
mov cl, [rsp+0D8h+var_CD]
mov [rax], cl
mov eax, [rsp+0D8h+var_44]
add eax, 1
mov [rsp+0D8h+var_44], eax
jmp short loc_2524E
loc_252BB:
jmp short $+2
loc_252BD:
mov rdi, [rsp+0D8h+var_B0]; this
call _ZNK3MNN17TfQuantizedConv2D14activationTypeEv; MNN::TfQuantizedConv2D::activationType(void)
mov rdi, [rsp+0D8h+var_B0]; this
mov [rsp+0D8h+var_48], eax
mov ecx, [rsp+0D8h+var_48]
mov rax, [rsp+0D8h+var_10]
mov [rax+40h], ecx
call _ZNK3MNN17TfQuantizedConv2D10multiplierEv; MNN::TfQuantizedConv2D::multiplier(void)
mov rdi, [rsp+0D8h+var_B0]; this
mov [rsp+0D8h+var_4C], eax
mov ecx, [rsp+0D8h+var_4C]
mov rax, [rsp+0D8h+var_10]
mov [rax+44h], ecx
call _ZNK3MNN17TfQuantizedConv2D6outMaxEv; MNN::TfQuantizedConv2D::outMax(void)
mov rdi, [rsp+0D8h+var_B0]; this
mov [rsp+0D8h+var_50], eax
mov ecx, [rsp+0D8h+var_50]
mov rax, [rsp+0D8h+var_10]
mov [rax+48h], ecx
call _ZNK3MNN17TfQuantizedConv2D6outMinEv; MNN::TfQuantizedConv2D::outMin(void)
mov rdi, [rsp+0D8h+var_B0]; this
mov [rsp+0D8h+var_54], eax
mov ecx, [rsp+0D8h+var_54]
mov rax, [rsp+0D8h+var_10]
mov [rax+4Ch], ecx
call _ZNK3MNN17TfQuantizedConv2D5shiftEv; MNN::TfQuantizedConv2D::shift(void)
mov rdi, [rsp+0D8h+var_B0]; this
mov [rsp+0D8h+var_58], eax
mov ecx, [rsp+0D8h+var_58]
mov rax, [rsp+0D8h+var_10]
mov [rax+50h], ecx
call _ZNK3MNN17TfQuantizedConv2D18biasQuantizedParamEv; MNN::TfQuantizedConv2D::biasQuantizedParam(void)
mov [rsp+0D8h+var_60], rax
cmp [rsp+0D8h+var_60], 0
jz short loc_253C2
mov rdi, [rsp+0D8h+var_60]
mov rsi, [rsp+0D8h+var_18]
call _ZNK3MNN14QuantizedParam6UnPackEPKNSt3__18functionIFvPPvmEEE; MNN::QuantizedParam::UnPack(std::function<void ()(void **,ulong)> const*)
mov rsi, rax
lea rdi, [rsp+0D8h+var_68]
call _ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_; std::unique_ptr<MNN::QuantizedParamT>::unique_ptr<true,void>(MNN::QuantizedParamT*)
mov rdi, [rsp+0D8h+var_10]
add rdi, 58h ; 'X'
lea rsi, [rsp+0D8h+var_68]
call _ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEEaSB8nn200100EOS5_; std::unique_ptr<MNN::QuantizedParamT>::operator=(std::unique_ptr<MNN::QuantizedParamT>&&)
lea rdi, [rsp+0D8h+var_68]
call _ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEED2B8nn200100Ev; std::unique_ptr<MNN::QuantizedParamT>::~unique_ptr()
loc_253C2:
mov rdi, [rsp+0D8h+var_B0]; this
call _ZNK3MNN17TfQuantizedConv2D15depthMultiplierEv; MNN::TfQuantizedConv2D::depthMultiplier(void)
mov rdi, [rsp+0D8h+var_B0]; this
mov [rsp+0D8h+var_6C], eax
mov ecx, [rsp+0D8h+var_6C]
mov rax, [rsp+0D8h+var_10]
mov [rax+60h], ecx
call _ZNK3MNN17TfQuantizedConv2D20filterQuantizedParamEv; MNN::TfQuantizedConv2D::filterQuantizedParam(void)
mov [rsp+0D8h+var_78], rax
cmp [rsp+0D8h+var_78], 0
jz short loc_25435
mov rdi, [rsp+0D8h+var_78]
mov rsi, [rsp+0D8h+var_18]
call _ZNK3MNN14QuantizedParam6UnPackEPKNSt3__18functionIFvPPvmEEE; MNN::QuantizedParam::UnPack(std::function<void ()(void **,ulong)> const*)
mov rsi, rax
lea rdi, [rsp+0D8h+var_80]
call _ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_; std::unique_ptr<MNN::QuantizedParamT>::unique_ptr<true,void>(MNN::QuantizedParamT*)
mov rdi, [rsp+0D8h+var_10]
add rdi, 68h ; 'h'
lea rsi, [rsp+0D8h+var_80]
call _ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEEaSB8nn200100EOS5_; std::unique_ptr<MNN::QuantizedParamT>::operator=(std::unique_ptr<MNN::QuantizedParamT>&&)
lea rdi, [rsp+0D8h+var_80]
call _ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEED2B8nn200100Ev; std::unique_ptr<MNN::QuantizedParamT>::~unique_ptr()
loc_25435:
mov rdi, [rsp+0D8h+var_B0]; this
call _ZNK3MNN17TfQuantizedConv2D19inputQuantizedParamEv; MNN::TfQuantizedConv2D::inputQuantizedParam(void)
mov [rsp+0D8h+var_88], rax
cmp [rsp+0D8h+var_88], 0
jz short loc_2548B
mov rdi, [rsp+0D8h+var_88]
mov rsi, [rsp+0D8h+var_18]
call _ZNK3MNN14QuantizedParam6UnPackEPKNSt3__18functionIFvPPvmEEE; MNN::QuantizedParam::UnPack(std::function<void ()(void **,ulong)> const*)
mov rsi, rax
lea rdi, [rsp+0D8h+var_90]
call _ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_; std::unique_ptr<MNN::QuantizedParamT>::unique_ptr<true,void>(MNN::QuantizedParamT*)
mov rdi, [rsp+0D8h+var_10]
add rdi, 70h ; 'p'
lea rsi, [rsp+0D8h+var_90]
call _ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEEaSB8nn200100EOS5_; std::unique_ptr<MNN::QuantizedParamT>::operator=(std::unique_ptr<MNN::QuantizedParamT>&&)
lea rdi, [rsp+0D8h+var_90]
call _ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEED2B8nn200100Ev; std::unique_ptr<MNN::QuantizedParamT>::~unique_ptr()
loc_2548B:
mov rdi, [rsp+0D8h+var_B0]; this
call _ZNK3MNN17TfQuantizedConv2D11modelFormatEv; MNN::TfQuantizedConv2D::modelFormat(void)
mov rdi, [rsp+0D8h+var_B0]; this
mov [rsp+0D8h+var_94], eax
mov ecx, [rsp+0D8h+var_94]
mov rax, [rsp+0D8h+var_10]
mov [rax+78h], ecx
call _ZNK3MNN17TfQuantizedConv2D20outputQuantizedParamEv; MNN::TfQuantizedConv2D::outputQuantizedParam(void)
mov [rsp+0D8h+var_A0], rax
cmp [rsp+0D8h+var_A0], 0
jz short loc_25501
mov rdi, [rsp+0D8h+var_A0]
mov rsi, [rsp+0D8h+var_18]
call _ZNK3MNN14QuantizedParam6UnPackEPKNSt3__18functionIFvPPvmEEE; MNN::QuantizedParam::UnPack(std::function<void ()(void **,ulong)> const*)
mov rsi, rax
lea rdi, [rsp+0D8h+var_A8]
call _ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_; std::unique_ptr<MNN::QuantizedParamT>::unique_ptr<true,void>(MNN::QuantizedParamT*)
mov rdi, [rsp+0D8h+var_10]
add rdi, 80h
lea rsi, [rsp+0D8h+var_A8]
call _ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEEaSB8nn200100EOS5_; std::unique_ptr<MNN::QuantizedParamT>::operator=(std::unique_ptr<MNN::QuantizedParamT>&&)
lea rdi, [rsp+0D8h+var_A8]
call _ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEED2B8nn200100Ev; std::unique_ptr<MNN::QuantizedParamT>::~unique_ptr()
loc_25501:
add rsp, 0D8h
retn
| long long MNN::TfQuantizedConv2D::UnPackTo(MNN::TfQuantizedConv2D *a1, _QWORD *a2, long long a3)
{
unsigned int v3; // eax
MNN::Convolution2DCommonT *v4; // rax
unsigned int v5; // eax
MNN::QuantizedParamT *v6; // rax
MNN::QuantizedParamT *v7; // rax
MNN::QuantizedParamT *v8; // rax
long long result; // rax
MNN::QuantizedParamT *v10; // rax
char v11; // [rsp+Bh] [rbp-CDh]
_QWORD *v12; // [rsp+10h] [rbp-C8h]
int v13; // [rsp+18h] [rbp-C0h]
long long v14; // [rsp+30h] [rbp-A8h] BYREF
long long v15; // [rsp+38h] [rbp-A0h]
int v16; // [rsp+44h] [rbp-94h]
long long v17; // [rsp+48h] [rbp-90h] BYREF
long long v18; // [rsp+50h] [rbp-88h]
long long v19; // [rsp+58h] [rbp-80h] BYREF
long long v20; // [rsp+60h] [rbp-78h]
int v21; // [rsp+6Ch] [rbp-6Ch]
long long v22; // [rsp+70h] [rbp-68h] BYREF
long long v23; // [rsp+78h] [rbp-60h]
int v24; // [rsp+80h] [rbp-58h]
int v25; // [rsp+84h] [rbp-54h]
int v26; // [rsp+88h] [rbp-50h]
int v27; // [rsp+8Ch] [rbp-4Ch]
int v28; // [rsp+90h] [rbp-48h]
unsigned int j; // [rsp+94h] [rbp-44h]
unsigned int *v30; // [rsp+98h] [rbp-40h]
long long v31; // [rsp+A0h] [rbp-38h] BYREF
long long v32; // [rsp+A8h] [rbp-30h]
char v33; // [rsp+B3h] [rbp-25h]
unsigned int i; // [rsp+B4h] [rbp-24h]
unsigned int *v35; // [rsp+B8h] [rbp-20h]
long long v36; // [rsp+C0h] [rbp-18h]
_QWORD *v37; // [rsp+C8h] [rbp-10h]
MNN::TfQuantizedConv2D *v38; // [rsp+D0h] [rbp-8h]
v38 = a1;
v37 = a2;
v36 = a3;
v35 = (unsigned int *)MNN::TfQuantizedConv2D::bias(a1);
if ( v35 )
{
v3 = flatbuffers::Vector<int>::size(v35);
std::vector<int>::resize(v37, v3);
for ( i = 0; i < (unsigned int)flatbuffers::Vector<int>::size(v35); ++i )
{
v13 = flatbuffers::Vector<int>::Get(v35, i);
*(_DWORD *)std::vector<int>::operator[][abi:nn200100](v37, i) = v13;
}
}
v33 = MNN::TfQuantizedConv2D::biasflag(a1) & 1;
*((_BYTE *)v37 + 24) = v33;
v32 = MNN::TfQuantizedConv2D::common(a1);
if ( v32 )
{
v4 = MNN::Convolution2DCommon::UnPack(v32, v36);
std::unique_ptr<MNN::Convolution2DCommonT>::unique_ptr[abi:nn200100]<true,void>(&v31, (long long)v4);
std::unique_ptr<MNN::Convolution2DCommonT>::operator=[abi:nn200100]((long long)(v37 + 4), (long long)&v31);
std::unique_ptr<MNN::Convolution2DCommonT>::~unique_ptr[abi:nn200100]((long long)&v31);
}
v30 = (unsigned int *)MNN::TfQuantizedConv2D::weight(a1);
if ( v30 )
{
v12 = v37 + 5;
v5 = flatbuffers::Vector<unsigned char>::size(v30);
std::vector<unsigned char>::resize(v12, v5);
for ( j = 0; j < (unsigned int)flatbuffers::Vector<unsigned char>::size(v30); ++j )
{
v11 = flatbuffers::Vector<unsigned char>::Get(v30, j);
*(_BYTE *)std::vector<unsigned char>::operator[][abi:nn200100](v37 + 5, j) = v11;
}
}
v28 = MNN::TfQuantizedConv2D::activationType(a1);
*((_DWORD *)v37 + 16) = v28;
v27 = MNN::TfQuantizedConv2D::multiplier(a1);
*((_DWORD *)v37 + 17) = v27;
v26 = MNN::TfQuantizedConv2D::outMax(a1);
*((_DWORD *)v37 + 18) = v26;
v25 = MNN::TfQuantizedConv2D::outMin(a1);
*((_DWORD *)v37 + 19) = v25;
v24 = MNN::TfQuantizedConv2D::shift(a1);
*((_DWORD *)v37 + 20) = v24;
v23 = MNN::TfQuantizedConv2D::biasQuantizedParam(a1);
if ( v23 )
{
v6 = MNN::QuantizedParam::UnPack(v23, v36);
std::unique_ptr<MNN::QuantizedParamT>::unique_ptr[abi:nn200100]<true,void>(&v22, (long long)v6);
std::unique_ptr<MNN::QuantizedParamT>::operator=[abi:nn200100]((long long)(v37 + 11), (long long)&v22);
std::unique_ptr<MNN::QuantizedParamT>::~unique_ptr[abi:nn200100]((long long)&v22);
}
v21 = MNN::TfQuantizedConv2D::depthMultiplier(a1);
*((_DWORD *)v37 + 24) = v21;
v20 = MNN::TfQuantizedConv2D::filterQuantizedParam(a1);
if ( v20 )
{
v7 = MNN::QuantizedParam::UnPack(v20, v36);
std::unique_ptr<MNN::QuantizedParamT>::unique_ptr[abi:nn200100]<true,void>(&v19, (long long)v7);
std::unique_ptr<MNN::QuantizedParamT>::operator=[abi:nn200100]((long long)(v37 + 13), (long long)&v19);
std::unique_ptr<MNN::QuantizedParamT>::~unique_ptr[abi:nn200100]((long long)&v19);
}
v18 = MNN::TfQuantizedConv2D::inputQuantizedParam(a1);
if ( v18 )
{
v8 = MNN::QuantizedParam::UnPack(v18, v36);
std::unique_ptr<MNN::QuantizedParamT>::unique_ptr[abi:nn200100]<true,void>(&v17, (long long)v8);
std::unique_ptr<MNN::QuantizedParamT>::operator=[abi:nn200100]((long long)(v37 + 14), (long long)&v17);
std::unique_ptr<MNN::QuantizedParamT>::~unique_ptr[abi:nn200100]((long long)&v17);
}
v16 = MNN::TfQuantizedConv2D::modelFormat(a1);
*((_DWORD *)v37 + 30) = v16;
result = MNN::TfQuantizedConv2D::outputQuantizedParam(a1);
v15 = result;
if ( result )
{
v10 = MNN::QuantizedParam::UnPack(v15, v36);
std::unique_ptr<MNN::QuantizedParamT>::unique_ptr[abi:nn200100]<true,void>(&v14, (long long)v10);
std::unique_ptr<MNN::QuantizedParamT>::operator=[abi:nn200100]((long long)(v37 + 16), (long long)&v14);
return std::unique_ptr<MNN::QuantizedParamT>::~unique_ptr[abi:nn200100]((long long)&v14);
}
return result;
}
| UnPackTo:
SUB RSP,0xd8
MOV qword ptr [RSP + 0xd0],RDI
MOV qword ptr [RSP + 0xc8],RSI
MOV qword ptr [RSP + 0xc0],RDX
MOV RDI,qword ptr [RSP + 0xd0]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x00125510
MOV qword ptr [RSP + 0xb8],RAX
CMP qword ptr [RSP + 0xb8],0x0
JZ 0x00125166
MOV RAX,qword ptr [RSP + 0xc8]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0xb8]
CALL 0x0010b480
MOV RDI,qword ptr [RSP + 0x20]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0010b410
MOV dword ptr [RSP + 0xb4],0x0
LAB_001250fb:
MOV EAX,dword ptr [RSP + 0xb4]
MOV dword ptr [RSP + 0x1c],EAX
MOV RDI,qword ptr [RSP + 0xb8]
CALL 0x0010b480
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,ECX
JNC 0x00125164
MOV RDI,qword ptr [RSP + 0xb8]
MOV ESI,dword ptr [RSP + 0xb4]
CALL 0x0010b4a0
MOV dword ptr [RSP + 0x18],EAX
MOV RDI,qword ptr [RSP + 0xc8]
MOV EAX,dword ptr [RSP + 0xb4]
MOV ESI,EAX
CALL 0x0010b510
MOV ECX,dword ptr [RSP + 0x18]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RSP + 0xb4]
ADD EAX,0x1
MOV dword ptr [RSP + 0xb4],EAX
JMP 0x001250fb
LAB_00125164:
JMP 0x00125166
LAB_00125166:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00125530
MOV RDI,qword ptr [RSP + 0x28]
AND AL,0x1
MOV byte ptr [RSP + 0xb3],AL
MOV CL,byte ptr [RSP + 0xb3]
MOV RAX,qword ptr [RSP + 0xc8]
AND CL,0x1
MOV byte ptr [RAX + 0x18],CL
CALL 0x00125560
MOV qword ptr [RSP + 0xa8],RAX
CMP qword ptr [RSP + 0xa8],0x0
JZ 0x001251f6
MOV RDI,qword ptr [RSP + 0xa8]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x00117b00
MOV RSI,RAX
LEA RDI,[RSP + 0xa0]
CALL 0x00117b60
MOV RDI,qword ptr [RSP + 0xc8]
ADD RDI,0x20
LEA RSI,[RSP + 0xa0]
CALL 0x00117b80
LEA RDI,[RSP + 0xa0]
CALL 0x00117bc0
LAB_001251f6:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00125580
MOV qword ptr [RSP + 0x98],RAX
CMP qword ptr [RSP + 0x98],0x0
JZ 0x001252bd
MOV RAX,qword ptr [RSP + 0xc8]
ADD RAX,0x28
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x0010b600
MOV RDI,qword ptr [RSP + 0x10]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0010b590
MOV dword ptr [RSP + 0x94],0x0
LAB_0012524e:
MOV EAX,dword ptr [RSP + 0x94]
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x0010b600
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,ECX
JNC 0x001252bb
MOV RDI,qword ptr [RSP + 0x98]
MOV ESI,dword ptr [RSP + 0x94]
CALL 0x0010b620
MOV byte ptr [RSP + 0xb],AL
MOV RDI,qword ptr [RSP + 0xc8]
ADD RDI,0x28
MOV EAX,dword ptr [RSP + 0x94]
MOV ESI,EAX
CALL 0x0010b690
MOV CL,byte ptr [RSP + 0xb]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RSP + 0x94]
ADD EAX,0x1
MOV dword ptr [RSP + 0x94],EAX
JMP 0x0012524e
LAB_001252bb:
JMP 0x001252bd
LAB_001252bd:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001255a0
MOV RDI,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x90],EAX
MOV ECX,dword ptr [RSP + 0x90]
MOV RAX,qword ptr [RSP + 0xc8]
MOV dword ptr [RAX + 0x40],ECX
CALL 0x001255c0
MOV RDI,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x8c],EAX
MOV ECX,dword ptr [RSP + 0x8c]
MOV RAX,qword ptr [RSP + 0xc8]
MOV dword ptr [RAX + 0x44],ECX
CALL 0x001255e0
MOV RDI,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x88],EAX
MOV ECX,dword ptr [RSP + 0x88]
MOV RAX,qword ptr [RSP + 0xc8]
MOV dword ptr [RAX + 0x48],ECX
CALL 0x00125600
MOV RDI,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x84],EAX
MOV ECX,dword ptr [RSP + 0x84]
MOV RAX,qword ptr [RSP + 0xc8]
MOV dword ptr [RAX + 0x4c],ECX
CALL 0x00125620
MOV RDI,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x80],EAX
MOV ECX,dword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0xc8]
MOV dword ptr [RAX + 0x50],ECX
CALL 0x00125640
MOV qword ptr [RSP + 0x78],RAX
CMP qword ptr [RSP + 0x78],0x0
JZ 0x001253c2
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x001166a0
MOV RSI,RAX
LEA RDI,[RSP + 0x70]
CALL 0x00116700
MOV RDI,qword ptr [RSP + 0xc8]
ADD RDI,0x58
LEA RSI,[RSP + 0x70]
CALL 0x00116720
LEA RDI,[RSP + 0x70]
CALL 0x00116760
LAB_001253c2:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00125660
MOV RDI,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x6c],EAX
MOV ECX,dword ptr [RSP + 0x6c]
MOV RAX,qword ptr [RSP + 0xc8]
MOV dword ptr [RAX + 0x60],ECX
CALL 0x00125680
MOV qword ptr [RSP + 0x60],RAX
CMP qword ptr [RSP + 0x60],0x0
JZ 0x00125435
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x001166a0
MOV RSI,RAX
LEA RDI,[RSP + 0x58]
CALL 0x00116700
MOV RDI,qword ptr [RSP + 0xc8]
ADD RDI,0x68
LEA RSI,[RSP + 0x58]
CALL 0x00116720
LEA RDI,[RSP + 0x58]
CALL 0x00116760
LAB_00125435:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001256a0
MOV qword ptr [RSP + 0x50],RAX
CMP qword ptr [RSP + 0x50],0x0
JZ 0x0012548b
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x001166a0
MOV RSI,RAX
LEA RDI,[RSP + 0x48]
CALL 0x00116700
MOV RDI,qword ptr [RSP + 0xc8]
ADD RDI,0x70
LEA RSI,[RSP + 0x48]
CALL 0x00116720
LEA RDI,[RSP + 0x48]
CALL 0x00116760
LAB_0012548b:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001256c0
MOV RDI,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x44],EAX
MOV ECX,dword ptr [RSP + 0x44]
MOV RAX,qword ptr [RSP + 0xc8]
MOV dword ptr [RAX + 0x78],ECX
CALL 0x001256e0
MOV qword ptr [RSP + 0x38],RAX
CMP qword ptr [RSP + 0x38],0x0
JZ 0x00125501
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x001166a0
MOV RSI,RAX
LEA RDI,[RSP + 0x30]
CALL 0x00116700
MOV RDI,qword ptr [RSP + 0xc8]
ADD RDI,0x80
LEA RSI,[RSP + 0x30]
CALL 0x00116720
LEA RDI,[RSP + 0x30]
CALL 0x00116760
LAB_00125501:
ADD RSP,0xd8
RET
|
/* MNN::TfQuantizedConv2D::UnPackTo(MNN::TfQuantizedConv2DT*, std::function<void (void**, unsigned
long)> const*) const */
void __thiscall
MNN::TfQuantizedConv2D::UnPackTo
(TfQuantizedConv2D *this,TfQuantizedConv2DT *param_1,function *param_2)
{
vector<int,std::allocator<int>> *this_00;
byte bVar1;
int1 uVar2;
uint uVar3;
uint uVar4;
int4 uVar5;
int4 *puVar6;
int8 uVar7;
vector<unsigned_char,std::allocator<unsigned_char>> *this_01;
int1 *puVar8;
unique_ptr local_a8 [8];
function *local_a0;
int4 local_94;
unique_ptr local_90 [8];
function *local_88;
unique_ptr local_80 [8];
function *local_78;
int4 local_6c;
unique_ptr local_68 [8];
function *local_60;
int4 local_58;
int4 local_54;
int4 local_50;
int4 local_4c;
int4 local_48;
uint local_44;
Vector<unsigned_char> *local_40;
unique_ptr local_38 [8];
function *local_30;
vector<int,std::allocator<int>> local_25;
uint local_24;
Vector<int> *local_20;
function *local_18;
vector<int,std::allocator<int>> *local_10;
TfQuantizedConv2D *local_8;
local_18 = param_2;
local_10 = (vector<int,std::allocator<int>> *)param_1;
local_8 = this;
local_20 = (Vector<int> *)bias(this);
this_00 = local_10;
if (local_20 != (Vector<int> *)0x0) {
uVar3 = flatbuffers::Vector<int>::size(local_20);
std::vector<int,std::allocator<int>>::resize(this_00,(ulong)uVar3);
for (local_24 = 0; uVar3 = local_24, uVar4 = flatbuffers::Vector<int>::size(local_20),
uVar3 < uVar4; local_24 = local_24 + 1) {
uVar5 = flatbuffers::Vector<int>::Get(local_20,local_24);
puVar6 = (int4 *)
std::vector<int,std::allocator<int>>::operator[][abi_nn200100_
(local_10,(ulong)local_24);
*puVar6 = uVar5;
}
}
bVar1 = biasflag(this);
local_25 = (vector<int,std::allocator<int>>)(bVar1 & 1);
local_10[0x18] = local_25;
local_30 = (function *)common(this);
if (local_30 != (function *)0x0) {
uVar7 = Convolution2DCommon::UnPack(local_30);
_ZNSt3__110unique_ptrIN3MNN20Convolution2DCommonTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_
(local_38,uVar7);
std::unique_ptr<MNN::Convolution2DCommonT,std::default_delete<MNN::Convolution2DCommonT>>::
operator=[abi_nn200100_
((unique_ptr<MNN::Convolution2DCommonT,std::default_delete<MNN::Convolution2DCommonT>>
*)(local_10 + 0x20),local_38);
std::unique_ptr<MNN::Convolution2DCommonT,std::default_delete<MNN::Convolution2DCommonT>>::
~unique_ptr_abi_nn200100_
((unique_ptr<MNN::Convolution2DCommonT,std::default_delete<MNN::Convolution2DCommonT>>
*)local_38);
}
local_40 = (Vector<unsigned_char> *)weight(this);
if (local_40 != (Vector<unsigned_char> *)0x0) {
this_01 = (vector<unsigned_char,std::allocator<unsigned_char>> *)(local_10 + 0x28);
uVar3 = flatbuffers::Vector<unsigned_char>::size(local_40);
std::vector<unsigned_char,std::allocator<unsigned_char>>::resize(this_01,(ulong)uVar3);
for (local_44 = 0; uVar3 = local_44, uVar4 = flatbuffers::Vector<unsigned_char>::size(local_40),
uVar3 < uVar4; local_44 = local_44 + 1) {
uVar2 = flatbuffers::Vector<unsigned_char>::Get(local_40,local_44);
puVar8 = (int1 *)
std::vector<unsigned_char,std::allocator<unsigned_char>>::operator[][abi_nn200100_
((vector<unsigned_char,std::allocator<unsigned_char>> *)(local_10 + 0x28),
(ulong)local_44);
*puVar8 = uVar2;
}
}
local_48 = activationType(this);
*(int4 *)(local_10 + 0x40) = local_48;
local_4c = multiplier(this);
*(int4 *)(local_10 + 0x44) = local_4c;
local_50 = outMax(this);
*(int4 *)(local_10 + 0x48) = local_50;
local_54 = outMin(this);
*(int4 *)(local_10 + 0x4c) = local_54;
local_58 = shift(this);
*(int4 *)(local_10 + 0x50) = local_58;
local_60 = (function *)biasQuantizedParam(this);
if (local_60 != (function *)0x0) {
uVar7 = QuantizedParam::UnPack(local_60);
_ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_
(local_68,uVar7);
std::unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>>::
operator=[abi_nn200100_
((unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>> *)
(local_10 + 0x58),local_68);
std::unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>>::
~unique_ptr_abi_nn200100_
((unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>> *)
local_68);
}
local_6c = depthMultiplier(this);
*(int4 *)(local_10 + 0x60) = local_6c;
local_78 = (function *)filterQuantizedParam(this);
if (local_78 != (function *)0x0) {
uVar7 = QuantizedParam::UnPack(local_78);
_ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_
(local_80,uVar7);
std::unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>>::
operator=[abi_nn200100_
((unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>> *)
(local_10 + 0x68),local_80);
std::unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>>::
~unique_ptr_abi_nn200100_
((unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>> *)
local_80);
}
local_88 = (function *)inputQuantizedParam(this);
if (local_88 != (function *)0x0) {
uVar7 = QuantizedParam::UnPack(local_88);
_ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_
(local_90,uVar7);
std::unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>>::
operator=[abi_nn200100_
((unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>> *)
(local_10 + 0x70),local_90);
std::unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>>::
~unique_ptr_abi_nn200100_
((unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>> *)
local_90);
}
local_94 = modelFormat(this);
*(int4 *)(local_10 + 0x78) = local_94;
local_a0 = (function *)outputQuantizedParam(this);
if (local_a0 != (function *)0x0) {
uVar7 = QuantizedParam::UnPack(local_a0);
_ZNSt3__110unique_ptrIN3MNN15QuantizedParamTENS_14default_deleteIS2_EEEC2B8nn200100ILb1EvEEPS2_
(local_a8,uVar7);
std::unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>>::
operator=[abi_nn200100_
((unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>> *)
(local_10 + 0x80),local_a8);
std::unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>>::
~unique_ptr_abi_nn200100_
((unique_ptr<MNN::QuantizedParamT,std::default_delete<MNN::QuantizedParamT>> *)
local_a8);
}
return;
}
| |
47,117 | CLI::ArgumentMismatch::ArgumentMismatch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Error.hpp | ArgumentMismatch(std::string name, int expected, std::size_t received)
: ArgumentMismatch(expected > 0 ? ("Expected exactly " + std::to_string(expected) + " arguments to " + name +
", got " + std::to_string(received))
: ("Expected at least " + std::to_string(-expected) + " arguments to " + name +
", got " + std::to_string(received)),
ExitCodes::ArgumentMismatch) {} | O1 | cpp | CLI::ArgumentMismatch::ArgumentMismatch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1fbc9(%rip), %rsi # 0x3753a
leaq 0x1fbd2(%rip), %rdx # 0x3754a
leaq 0x28(%rsp), %rdi
callq 0x12040
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x178c0
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x72, %ecx
callq 0x17a9c
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x179ce
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x179e5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7430
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x17a10
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x17a10
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x17a27
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rdi
callq 0x7780
| _ZN3CLI16ArgumentMismatchC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+68h+var_30]
mov [r15-10h], r15
lea rsi, aArgumentmismat; "ArgumentMismatch"
lea rdx, aArgumentmismat+10h; ""
lea rdi, [rsp+68h+var_40]
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 r12, [rsp+68h+var_50]
mov [r12-10h], r12
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
lea rdi, [rsp+68h+var_60]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; int
mov ecx, 72h ; 'r'
call _ZN3CLI16ArgumentMismatchC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_NS_9ExitCodesE; CLI::ArgumentMismatch::ArgumentMismatch(std::string,std::string,CLI::ExitCodes)
mov rdi, [rsp+68h+var_60]; void *
cmp rdi, r12
jz short loc_179CE
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_179CE:
mov rdi, [rsp+68h+var_40]; void *
cmp rdi, r15
jz short loc_179E5
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_179E5:
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_17A10
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_17A10
mov rbx, rax
loc_17A10:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r15
jz short loc_17A27
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_17A27:
mov rdi, rbx
call __Unwind_Resume
| void CLI::ArgumentMismatch::ArgumentMismatch(int a1, long long a2)
{
int v2; // [rsp+0h] [rbp-68h]
void *v3; // [rsp+8h] [rbp-60h] BYREF
int v4; // [rsp+10h] [rbp-58h]
char v5[16]; // [rsp+18h] [rbp-50h] BYREF
void *v6; // [rsp+28h] [rbp-40h] BYREF
_QWORD v7[6]; // [rsp+38h] [rbp-30h] BYREF
v6 = v7;
std::string::_M_construct<char const*>(&v6, "ArgumentMismatch", (long long)"");
v3 = v5;
std::string::_M_construct<char *>(&v3, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
CLI::ArgumentMismatch::ArgumentMismatch(a1, v2, (long long)v3, v4, v5[0]);
if ( v3 != v5 )
operator delete(v3, *(_QWORD *)v5 + 1LL);
if ( v6 != v7 )
operator delete(v6, v7[0] + 1LL);
}
| ArgumentMismatch:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
LEA RSI,[0x13753a]
LEA RDX,[0x13754a]
LEA RDI,[RSP + 0x28]
CALL 0x00112040
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LAB_00117996:
LEA RDI,[RSP + 0x8]
CALL 0x001178c0
LAB_001179a0:
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ECX,0x72
CALL 0x00117a9c
LAB_001179b7:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x001179ce
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00107430
LAB_001179ce:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R15
JZ 0x001179e5
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00107430
LAB_001179e5:
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* CLI::ArgumentMismatch::ArgumentMismatch(std::__cxx11::string) */
void __thiscall CLI::ArgumentMismatch::ArgumentMismatch(ArgumentMismatch *this,long *param_2)
{
long *local_60 [2];
long local_50 [2];
long *local_40 [2];
long local_30 [2];
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char_const*>(local_40,"ArgumentMismatch","");
/* try { // try from 00117996 to 0011799f has its CatchHandler @ 00117a0d */
local_60[0] = local_50;
std::__cxx11::string::_M_construct<char*>(local_60,*param_2,param_2[1] + *param_2);
/* try { // try from 001179a0 to 001179b6 has its CatchHandler @ 001179f1 */
ArgumentMismatch(this,local_40,local_60,0x72);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return;
}
| |
47,118 | my_append_fix_badly_formed_tail | eloqsql/strings/ctype-mb.c | static size_t
my_append_fix_badly_formed_tail(CHARSET_INFO *cs,
char *to, char *to_end,
const char *from, const char *from_end,
size_t nchars,
MY_STRCOPY_STATUS *status)
{
char *to0= to;
for ( ; nchars; nchars--)
{
int chlen;
if ((chlen= my_ci_charlen(cs, (const uchar*) from,
(const uchar *) from_end)) > 0)
{
/* Found a valid character */ /* chlen == 1..MBMAXLEN */
DBUG_ASSERT(chlen <= (int) cs->mbmaxlen);
if (to + chlen > to_end)
goto end; /* Does not fit to "to" */
memcpy(to, from, (size_t) chlen);
from+= chlen;
to+= chlen;
continue;
}
if (chlen == MY_CS_ILSEQ) /* chlen == 0 */
{
DBUG_ASSERT(from < from_end); /* Shouldn't get MY_CS_ILSEQ if empty */
goto bad;
}
/* Got an incomplete character */ /* chlen == MY_CS_TOOSMALLXXX */
DBUG_ASSERT(chlen >= MY_CS_TOOSMALL6);
DBUG_ASSERT(chlen <= MY_CS_TOOSMALL);
if (from >= from_end)
break; /* End of the source string */
bad:
/* Bad byte sequence, or incomplete character found */
if (!status->m_well_formed_error_pos)
status->m_well_formed_error_pos= from;
if ((chlen= my_ci_wc_mb(cs, '?', (uchar*) to, (uchar *) to_end)) <= 0)
break; /* Question mark does not fit into the destination */
to+= chlen;
from++;
}
end:
status->m_source_end_pos= from;
return to - to0;
} | O0 | c | my_append_fix_badly_formed_tail:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x778b5
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x76ec0
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
jle 0x77822
jmp 0x777d2
jmp 0x777d4
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
addq %rcx, %rax
cmpq -0x18(%rbp), %rax
jbe 0x777ea
jmp 0x778b7
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movslq -0x3c(%rbp), %rdx
callq 0x26280
movl -0x3c(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x778a4
cmpl $0x0, -0x3c(%rbp)
jne 0x7782e
jmp 0x7782a
jmp 0x7782c
jmp 0x77844
jmp 0x77830
jmp 0x77832
jmp 0x77834
jmp 0x77836
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x77842
jmp 0x778b5
jmp 0x77844
movq 0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x7785b
movq -0x20(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x3f, %esi
callq *%rax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
jg 0x77887
jmp 0x778b5
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x777ac
jmp 0x778b7
movq -0x20(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_append_fix_badly_formed_tail:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
loc_777AC:
cmp [rbp+var_30], 0
jz loc_778B5
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call my_ci_charlen_2
mov [rbp+var_3C], eax
cmp eax, 0
jle short loc_77822
jmp short $+2
loc_777D2:
jmp short $+2
loc_777D4:
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_3C]
add rax, rcx
cmp rax, [rbp+var_18]
jbe short loc_777EA
jmp loc_778B7
loc_777EA:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
movsxd rdx, [rbp+var_3C]
call _memcpy
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp loc_778A4
loc_77822:
cmp [rbp+var_3C], 0
jnz short loc_7782E
jmp short $+2
loc_7782A:
jmp short $+2
loc_7782C:
jmp short loc_77844
loc_7782E:
jmp short $+2
loc_77830:
jmp short $+2
loc_77832:
jmp short $+2
loc_77834:
jmp short $+2
loc_77836:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_77842
jmp short loc_778B5
loc_77842:
jmp short $+2
loc_77844:
mov rax, [rbp+arg_0]
cmp qword ptr [rax+8], 0
jnz short loc_7785B
mov rcx, [rbp+var_20]
mov rax, [rbp+arg_0]
mov [rax+8], rcx
loc_7785B:
mov rax, [rbp+var_8]
mov rax, [rax+0B8h]
mov rax, [rax+30h]
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_18]
mov esi, 3Fh ; '?'
call rax
mov [rbp+var_3C], eax
cmp eax, 0
jg short loc_77887
jmp short loc_778B5
loc_77887:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
loc_778A4:
mov rax, [rbp+var_30]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], rax
jmp loc_777AC
loc_778B5:
jmp short $+2
loc_778B7:
mov rcx, [rbp+var_20]
mov rax, [rbp+arg_0]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
sub rax, rcx
add rsp, 40h
pop rbp
retn
| long long my_append_fix_badly_formed_tail(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
unsigned long long a5,
long long a6,
unsigned long long *a7)
{
int v8; // [rsp+4h] [rbp-3Ch]
int v9; // [rsp+4h] [rbp-3Ch]
long long v14; // [rsp+30h] [rbp-10h]
v14 = a2;
while ( a6 )
{
v8 = my_ci_charlen_2(a1, a4, a5);
if ( v8 <= 0 )
{
if ( v8 && a4 >= a5 )
break;
if ( !a7[1] )
a7[1] = a4;
v9 = (*(long long ( **)(long long, long long, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
63LL,
v14,
a3);
if ( v9 <= 0 )
break;
v14 += v9;
++a4;
}
else
{
if ( v8 + v14 > a3 )
break;
memcpy(v14, a4, v8);
a4 += v8;
v14 += v8;
}
--a6;
}
*a7 = a4;
return v14 - a2;
}
| my_append_fix_badly_formed_tail:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
LAB_001777ac:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001778b5
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00176ec0
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
JLE 0x00177822
JMP 0x001777d2
LAB_001777d2:
JMP 0x001777d4
LAB_001777d4:
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x3c]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x001777ea
JMP 0x001778b7
LAB_001777ea:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOVSXD RDX,dword ptr [RBP + -0x3c]
CALL 0x00126280
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001778a4
LAB_00177822:
CMP dword ptr [RBP + -0x3c],0x0
JNZ 0x0017782e
JMP 0x0017782a
LAB_0017782a:
JMP 0x0017782c
LAB_0017782c:
JMP 0x00177844
LAB_0017782e:
JMP 0x00177830
LAB_00177830:
JMP 0x00177832
LAB_00177832:
JMP 0x00177834
LAB_00177834:
JMP 0x00177836
LAB_00177836:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00177842
JMP 0x001778b5
LAB_00177842:
JMP 0x00177844
LAB_00177844:
MOV RAX,qword ptr [RBP + 0x10]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x0017785b
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
LAB_0017785b:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV ESI,0x3f
CALL RAX
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
JG 0x00177887
JMP 0x001778b5
LAB_00177887:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
LAB_001778a4:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001777ac
LAB_001778b5:
JMP 0x001778b7
LAB_001778b7:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
ADD RSP,0x40
POP RBP
RET
|
long my_append_fix_badly_formed_tail
(long param_1,void *param_2,ulong param_3,void *param_4,void *param_5,long param_6,
int8 *param_7)
{
int iVar1;
long local_38;
void *local_28;
void *local_18;
local_28 = param_4;
local_18 = param_2;
for (local_38 = param_6; local_38 != 0; local_38 = local_38 + -1) {
iVar1 = my_ci_charlen(param_1,local_28,param_5);
if (iVar1 < 1) {
if ((iVar1 != 0) && (param_5 <= local_28)) break;
if (param_7[1] == 0) {
param_7[1] = local_28;
}
iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,0x3f,local_18,param_3);
if (iVar1 < 1) break;
local_28 = (void *)((long)local_28 + 1);
}
else {
if (param_3 < (ulong)((long)local_18 + (long)iVar1)) break;
memcpy(local_18,local_28,(long)iVar1);
local_28 = (void *)((long)local_28 + (long)iVar1);
}
local_18 = (void *)((long)local_18 + (long)iVar1);
}
*param_7 = local_28;
return (long)local_18 - (long)param_2;
}
| |
47,119 | bool fmt::v10::detail::basic_fp<unsigned __int128>::assign<float, 0>(float) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR auto assign(Float n) -> bool {
static_assert(std::numeric_limits<Float>::digits <= 113, "unsupported FP");
// Assume Float is in the format [sign][exponent][significand].
using carrier_uint = typename dragonbox::float_info<Float>::carrier_uint;
const auto num_float_significand_bits =
detail::num_significand_bits<Float>();
const auto implicit_bit = carrier_uint(1) << num_float_significand_bits;
const auto significand_mask = implicit_bit - 1;
auto u = bit_cast<carrier_uint>(n);
f = static_cast<F>(u & significand_mask);
auto biased_e = static_cast<int>((u & exponent_mask<Float>()) >>
num_float_significand_bits);
// The predecessor is closer if n is a normalized power of 2 (f == 0)
// other than the smallest normalized number (biased_e > 1).
auto is_predecessor_closer = f == 0 && biased_e > 1;
if (biased_e == 0)
biased_e = 1; // Subnormals use biased exponent 1 (min exponent).
else if (has_implicit_bit<Float>())
f += static_cast<F>(implicit_bit);
e = biased_e - exponent_bias<Float>() - num_float_significand_bits;
if (!has_implicit_bit<Float>()) ++e;
return is_predecessor_closer;
} | O0 | c | bool fmt::v10::detail::basic_fp<unsigned __int128>::assign<float, 0>(float):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movsd %xmm0, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x34, 0x44(%rsp)
movabsq $0x10000000000000, %rax # imm = 0x10000000000000
movq %rax, 0x38(%rsp)
movabsq $0xfffffffffffff, %rax # imm = 0xFFFFFFFFFFFFF
movq %rax, 0x30(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x8b2e0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x28(%rsp)
movabsq $0xfffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFF
andq 0x28(%rsp), %rcx
movq %rcx, (%rax)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0x8b310
movq 0x10(%rsp), %rcx
movq %rax, %rdx
movq 0x18(%rsp), %rax
andq %rdx, %rax
shrq $0x34, %rax
movl %eax, 0x24(%rsp)
xorl %eax, %eax
cmpq $0x0, (%rcx)
movb %al, 0x22(%rsp)
jne 0xab517
cmpl $0x1, 0x24(%rsp)
setg %al
movb %al, 0x22(%rsp)
movb 0x22(%rsp), %al
andb $0x1, %al
movb %al, 0x23(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0xab532
movl $0x1, 0x24(%rsp)
jmp 0xab547
movq 0x10(%rsp), %rax
movabsq $0x10000000000000, %rcx # imm = 0x10000000000000
addq (%rax), %rcx
movq %rcx, (%rax)
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x8b340
movl 0xc(%rsp), %ecx
movl %eax, %edx
movq 0x10(%rsp), %rax
subl %edx, %ecx
subl $0x34, %ecx
movl %ecx, 0x8(%rax)
movb 0x23(%rsp), %al
andb $0x1, %al
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN3fmt3v106detail8basic_fpImE6assignIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
movsd [rsp+58h+var_10], xmm0
mov rax, [rsp+58h+var_8]
mov [rsp+58h+var_48], rax
mov [rsp+58h+var_14], 34h ; '4'
mov rax, 10000000000000h
mov [rsp+58h+var_20], rax
mov rax, 0FFFFFFFFFFFFFh
mov [rsp+58h+var_28], rax
lea rdi, [rsp+58h+var_10]
call _ZN3fmt3v106detail8bit_castImdTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_
mov rcx, rax
mov rax, [rsp+58h+var_48]
mov [rsp+58h+var_30], rcx
mov rcx, 0FFFFFFFFFFFFFh
and rcx, [rsp+58h+var_30]
mov [rax], rcx
mov rax, [rsp+58h+var_30]
mov [rsp+58h+var_40], rax
call _ZN3fmt3v106detail13exponent_maskIdEENS1_9dragonbox10float_infoIT_vE12carrier_uintEv; fmt::v10::detail::exponent_mask<double>(void)
mov rcx, [rsp+58h+var_48]
mov rdx, rax
mov rax, [rsp+58h+var_40]
and rax, rdx
shr rax, 34h
mov [rsp+58h+var_34], eax
xor eax, eax
cmp qword ptr [rcx], 0
mov [rsp+58h+var_36], al
jnz short loc_AB517
cmp [rsp+58h+var_34], 1
setnle al
mov [rsp+58h+var_36], al
loc_AB517:
mov al, [rsp+58h+var_36]
and al, 1
mov [rsp+58h+var_35], al
cmp [rsp+58h+var_34], 0
jnz short loc_AB532
mov [rsp+58h+var_34], 1
jmp short loc_AB547
loc_AB532:
mov rax, [rsp+58h+var_48]
mov rcx, 10000000000000h
add rcx, [rax]
mov [rax], rcx
loc_AB547:
mov eax, [rsp+58h+var_34]
mov [rsp+58h+var_4C], eax
call _ZN3fmt3v106detail13exponent_biasIdEEiv; fmt::v10::detail::exponent_bias<double>(void)
mov ecx, [rsp+58h+var_4C]
mov edx, eax
mov rax, [rsp+58h+var_48]
sub ecx, edx
sub ecx, 34h ; '4'
mov [rax+8], ecx
mov al, [rsp+58h+var_35]
and al, 1
add rsp, 58h
retn
| bool ZN3fmt3v106detail8basic_fpImE6assignIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_(
long long a1,
double a2)
{
bool v3; // [rsp+22h] [rbp-36h]
int v4; // [rsp+24h] [rbp-34h]
long long v5; // [rsp+28h] [rbp-30h]
_QWORD v6[2]; // [rsp+48h] [rbp-10h] BYREF
v6[1] = a1;
*(double *)v6 = a2;
v5 = ZN3fmt3v106detail8bit_castImdTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_((long long)v6);
*(_QWORD *)a1 = v5 & 0xFFFFFFFFFFFFFLL;
v4 = (fmt::v10::detail::exponent_mask<double>((long long)v6) & (unsigned long long)v5) >> 52;
v3 = 0;
if ( !*(_QWORD *)a1 )
v3 = v4 > 1;
if ( v4 )
*(_QWORD *)a1 += 0x10000000000000LL;
else
v4 = 1;
*(_DWORD *)(a1 + 8) = v4 - fmt::v10::detail::exponent_bias<double>() - 52;
return v3;
}
| _ZN3fmt3v106detail8basic_fpImE6assignIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOVSD qword ptr [RSP + 0x48],XMM0
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x44],0x34
MOV RAX,0x10000000000000
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,0xfffffffffffff
MOV qword ptr [RSP + 0x30],RAX
LEA RDI,[RSP + 0x48]
CALL 0x0018b2e0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RCX
MOV RCX,0xfffffffffffff
AND RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x18],RAX
CALL 0x0018b310
MOV RCX,qword ptr [RSP + 0x10]
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x18]
AND RAX,RDX
SHR RAX,0x34
MOV dword ptr [RSP + 0x24],EAX
XOR EAX,EAX
CMP qword ptr [RCX],0x0
MOV byte ptr [RSP + 0x22],AL
JNZ 0x001ab517
CMP dword ptr [RSP + 0x24],0x1
SETG AL
MOV byte ptr [RSP + 0x22],AL
LAB_001ab517:
MOV AL,byte ptr [RSP + 0x22]
AND AL,0x1
MOV byte ptr [RSP + 0x23],AL
CMP dword ptr [RSP + 0x24],0x0
JNZ 0x001ab532
MOV dword ptr [RSP + 0x24],0x1
JMP 0x001ab547
LAB_001ab532:
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,0x10000000000000
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
LAB_001ab547:
MOV EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RSP + 0xc],EAX
CALL 0x0018b340
MOV ECX,dword ptr [RSP + 0xc]
MOV EDX,EAX
MOV RAX,qword ptr [RSP + 0x10]
SUB ECX,EDX
SUB ECX,0x34
MOV dword ptr [RAX + 0x8],ECX
MOV AL,byte ptr [RSP + 0x23]
AND AL,0x1
ADD RSP,0x58
RET
|
bool _ZN3fmt3v106detail8basic_fpImE6assignIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_
(int8 param_1,ulong *param_2)
{
int iVar1;
ulong uVar2;
uint extraout_var;
bool local_36;
uint local_34;
int8 local_10;
ulong *local_8;
local_10 = param_1;
local_8 = param_2;
uVar2 = _ZN3fmt3v106detail8bit_castImdTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_
(&local_10);
*param_2 = uVar2 & 0xfffffffffffff;
fmt::v10::detail::exponent_mask<double>();
local_34 = ((uint)(uVar2 >> 0x20) & extraout_var) >> 0x14;
local_36 = *param_2 == 0 && 1 < local_34;
if (local_34 == 0) {
local_34 = 1;
}
else {
*param_2 = *param_2 + 0x10000000000000;
}
iVar1 = fmt::v10::detail::exponent_bias<double>();
*(uint *)(param_2 + 1) = (local_34 - iVar1) + -0x34;
return local_36;
}
| |
47,120 | google::protobuf::compiler::objectivec::PrimitiveFieldGenerator::SetExtraRuntimeHasBitsBase(int) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc | void PrimitiveFieldGenerator::SetExtraRuntimeHasBitsBase(int has_base) {
if (GetObjectiveCType(descriptor_) == OBJECTIVECTYPE_BOOLEAN) {
// Set into the offset the has bit to use for the actual value.
variables_["storage_offset_value"] = StrCat(has_base);
variables_["storage_offset_comment"] =
" // Stored in _has_storage_ to save space.";
}
} | O3 | cpp | google::protobuf::compiler::objectivec::PrimitiveFieldGenerator::SetExtraRuntimeHasBitsBase(int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movl %esi, %ebp
movq %rdi, %r14
movq 0x8(%rdi), %rbx
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xf199e
leaq 0x482a9(%rip), %rax # 0x139c34
leaq 0x40(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdx
movq %rbx, (%rdx)
callq 0x2f19d
movzbl 0x2(%rbx), %edi
callq 0x4ce97
cmpl $0x6, %eax
jne 0xf1a90
leaq 0x50(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movl %ebp, %edi
movq %rbx, %rsi
callq 0x10a7e0
subq %rbx, %rax
movq %rax, -0x8(%rbx)
movq -0x10(%rbx), %rsi
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq (%rax,%rsi), %rdx
movq %rsp, %rdi
callq 0x250b2
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xf4fc2(%rip), %rsi # 0x1e69b6
leaq 0xf4fcf(%rip), %rdx # 0x1e69ca
leaq 0x20(%rsp), %rdi
callq 0x250b2
addq $0x10, %r14
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x2e310
movq %rsp, %rsi
movq %rax, %rdi
callq 0x1f5d0
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xf1a30
callq 0x1f4a0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xf1a3e
callq 0x1f4a0
leaq 0x40(%rsp), %rdi
movq %rbx, (%rdi)
leaq 0xf4f7e(%rip), %rsi # 0x1e69cb
leaq 0xf4f8d(%rip), %rdx # 0x1e69e1
callq 0x250b2
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x2e310
movq 0x8(%rax), %rdx
leaq 0xf5277(%rip), %rcx # 0x1e6ce8
movl $0x2b, %r8d
movq %rax, %rdi
xorl %esi, %esi
callq 0x1f760
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
je 0xf1a90
callq 0x1f4a0
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0xf1ac7
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xf1ab9
callq 0x1f4a0
jmp 0xf1ab9
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xf1ac7
callq 0x1f4a0
movq %r14, %rdi
callq 0x1f860
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
jne 0xf1ac2
jmp 0xf1ac7
| _ZN6google8protobuf8compiler10objectivec23PrimitiveFieldGenerator26SetExtraRuntimeHasBitsBaseEi:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 70h
mov ebp, esi
mov r14, rdi
mov rbx, [rdi+8]
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_F199E
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+98h+var_58]
mov [rsi], rax
mov rdx, rsp
mov [rdx], rbx
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
loc_F199E:
movzx edi, byte ptr [rbx+2]
call _ZN6google8protobuf8compiler10objectivec17GetObjectiveCTypeENS0_15FieldDescriptor4TypeE; google::protobuf::compiler::objectivec::GetObjectiveCType(google::protobuf::FieldDescriptor::Type)
cmp eax, 6
jnz loc_F1A90
lea rbx, [rsp+98h+var_48]
mov [rbx-10h], rbx
mov edi, ebp; this
mov rsi, rbx; int
call _ZN6google8protobuf21FastInt32ToBufferLeftEiPc; google::protobuf::FastInt32ToBufferLeft(int,char *)
sub rax, rbx
mov [rbx-8], rax
mov rsi, [rbx-10h]
lea r15, [rsp+98h+var_88]
mov [r15-10h], r15
lea rdx, [rax+rsi]
mov rdi, rsp
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 r12, [rsp+98h+var_68]
mov [r12-10h], r12
lea rsi, xmmword_1E69B6
lea rdx, aAlue+4; ""
lea rdi, [rsp+98h+var_78]
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)
add r14, 10h
lea rsi, [rsp+98h+var_78]
mov rdi, r14
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&)
mov rsi, rsp
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rsp+98h+var_78]; void *
cmp rdi, r12
jz short loc_F1A30
call __ZdlPv; operator delete(void *)
loc_F1A30:
mov rdi, [rsp+98h+var_98]; void *
cmp rdi, r15
jz short loc_F1A3E
call __ZdlPv; operator delete(void *)
loc_F1A3E:
lea rdi, [rsp+98h+var_58]
mov [rdi], rbx
lea rsi, xmmword_1E69CB
lea rdx, aOmment+6; ""
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+98h+var_58]
mov rdi, r14
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&)
mov rdx, [rax+8]
lea rcx, aStoredInHasSto; " // Stored in _has_storage_ to save sp"...
mov r8d, 2Bh ; '+'
mov rdi, rax
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov rdi, [rsp+98h+var_58]; void *
cmp rdi, rbx
jz short loc_F1A90
call __ZdlPv; operator delete(void *)
loc_F1A90:
add rsp, 70h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov r14, rax
jmp short loc_F1AC7
mov r14, rax
mov rdi, [rsp+arg_18]; void *
cmp rdi, r12
jz short loc_F1AB9
call __ZdlPv; operator delete(void *)
jmp short loc_F1AB9
mov r14, rax
loc_F1AB9:
mov rdi, [rsp+0]; void *
cmp rdi, r15
jz short loc_F1AC7
loc_F1AC2:
call __ZdlPv; operator delete(void *)
loc_F1AC7:
mov rdi, r14
call __Unwind_Resume
mov r14, rax
mov rdi, [rsp+arg_38]
cmp rdi, rbx
jnz short loc_F1AC2
jmp short loc_F1AC7
| void google::protobuf::compiler::objectivec::PrimitiveFieldGenerator::SetExtraRuntimeHasBitsBase(
google::protobuf::compiler::objectivec::PrimitiveFieldGenerator *this,
unsigned int a2)
{
long long v3; // rbx
long long v4; // rdi
char *v5; // rdx
char *v6; // r14
long long v7; // rax
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-98h] BYREF
_BYTE v10[16]; // [rsp+10h] [rbp-88h] BYREF
void *v11[2]; // [rsp+20h] [rbp-78h] BYREF
_BYTE v12[16]; // [rsp+30h] [rbp-68h] BYREF
void *v13; // [rsp+40h] [rbp-58h] BYREF
long long v14; // [rsp+48h] [rbp-50h]
int v15[18]; // [rsp+50h] [rbp-48h] BYREF
v3 = *((_QWORD *)this + 1);
v4 = *(_QWORD *)(v3 + 24);
if ( v4 )
{
v13 = google::protobuf::FieldDescriptor::TypeOnceInit;
v9[0] = (void *)v3;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v4,
(long long)&v13,
(long long)v9);
}
if ( (unsigned int)google::protobuf::compiler::objectivec::GetObjectiveCType(*(unsigned __int8 *)(v3 + 2)) == 6 )
{
v13 = v15;
v14 = google::protobuf::FastInt32ToBufferLeft((google::protobuf *)a2, (int)v15, v5) - (_QWORD)v15;
v9[0] = v10;
std::string::_M_construct<char const*>((long long)v9, v13, (long long)v13 + v14);
v11[0] = v12;
std::string::_M_construct<char const*>((long long)v11, &xmmword_1E69B6, (long long)"");
v6 = (char *)this + 16;
v7 = std::map<std::string,std::string>::operator[]((long long)v6, (long long)v11);
std::string::operator=(v7, v9);
if ( v11[0] != v12 )
operator delete(v11[0]);
if ( v9[0] != v10 )
operator delete(v9[0]);
v13 = v15;
std::string::_M_construct<char const*>((long long)&v13, &xmmword_1E69CB, (long long)"");
v8 = std::map<std::string,std::string>::operator[]((long long)v6, (long long)&v13);
std::string::_M_replace(v8, 0LL, *(_QWORD *)(v8 + 8), " // Stored in _has_storage_ to save space.", 43LL);
if ( v13 != v15 )
operator delete(v13);
}
}
| SetExtraRuntimeHasBitsBase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x70
MOV EBP,ESI
MOV R14,RDI
MOV RBX,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x001f199e
LEA RAX,[0x239c34]
LEA RSI,[RSP + 0x40]
MOV qword ptr [RSI],RAX
MOV RDX,RSP
MOV qword ptr [RDX],RBX
CALL 0x0012f19d
LAB_001f199e:
MOVZX EDI,byte ptr [RBX + 0x2]
CALL 0x0014ce97
CMP EAX,0x6
JNZ 0x001f1a90
LEA RBX,[RSP + 0x50]
MOV qword ptr [RBX + -0x10],RBX
MOV EDI,EBP
MOV RSI,RBX
CALL 0x0020a7e0
SUB RAX,RBX
MOV qword ptr [RBX + -0x8],RAX
MOV RSI,qword ptr [RBX + -0x10]
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
LEA RDX,[RAX + RSI*0x1]
MOV RDI,RSP
CALL 0x001250b2
LEA R12,[RSP + 0x30]
MOV qword ptr [R12 + -0x10],R12
LAB_001f19ed:
LEA RSI,[0x2e69b6]
LEA RDX,[0x2e69ca]
LEA RDI,[RSP + 0x20]
CALL 0x001250b2
LAB_001f1a05:
ADD R14,0x10
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0012e310
MOV RSI,RSP
MOV RDI,RAX
CALL 0x0011f5d0
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R12
JZ 0x001f1a30
CALL 0x0011f4a0
LAB_001f1a30:
MOV RDI,qword ptr [RSP]
CMP RDI,R15
JZ 0x001f1a3e
CALL 0x0011f4a0
LAB_001f1a3e:
LEA RDI,[RSP + 0x40]
MOV qword ptr [RDI],RBX
LAB_001f1a46:
LEA RSI,[0x2e69cb]
LEA RDX,[0x2e69e1]
CALL 0x001250b2
LAB_001f1a59:
LEA RSI,[RSP + 0x40]
MOV RDI,R14
CALL 0x0012e310
MOV RDX,qword ptr [RAX + 0x8]
LEA RCX,[0x2e6ce8]
MOV R8D,0x2b
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0011f760
LAB_001f1a81:
MOV RDI,qword ptr [RSP + 0x40]
CMP RDI,RBX
JZ 0x001f1a90
CALL 0x0011f4a0
LAB_001f1a90:
ADD RSP,0x70
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::compiler::objectivec::PrimitiveFieldGenerator::SetExtraRuntimeHasBitsBase(int)
*/
void __thiscall
google::protobuf::compiler::objectivec::PrimitiveFieldGenerator::SetExtraRuntimeHasBitsBase
(PrimitiveFieldGenerator *this,int param_1)
{
FieldDescriptor *pFVar1;
int iVar2;
string *this_00;
ulong uVar3;
FieldDescriptor *local_98 [2];
FieldDescriptor local_88 [16];
int1 *local_78 [2];
int1 local_68 [16];
code *local_58;
long local_50;
int1 local_48 [32];
pFVar1 = *(FieldDescriptor **)(this + 8);
if (*(once_flag **)(pFVar1 + 0x18) != (once_flag *)0x0) {
local_58 = FieldDescriptor::TypeOnceInit;
local_98[0] = pFVar1;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(pFVar1 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_58,local_98);
}
iVar2 = GetObjectiveCType(pFVar1[2]);
if (iVar2 == 6) {
local_58 = (code *)local_48;
local_50 = FastInt32ToBufferLeft(param_1,local_48);
local_50 = local_50 - (long)local_48;
local_98[0] = local_88;
std::__cxx11::string::_M_construct<char_const*>(local_98,local_58,local_58 + local_50);
/* try { // try from 001f19ed to 001f1a04 has its CatchHandler @ 001f1ab6 */
local_78[0] = local_68;
std::__cxx11::string::_M_construct<char_const*>(local_78,"storage_offset_value","");
/* try { // try from 001f1a05 to 001f1a15 has its CatchHandler @ 001f1aa2 */
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 + 0x10),(string *)local_78);
std::__cxx11::string::operator=(this_00,(string *)local_98);
if (local_78[0] != local_68) {
operator_delete(local_78[0]);
}
if (local_98[0] != local_88) {
operator_delete(local_98[0]);
}
local_58 = (code *)local_48;
/* try { // try from 001f1a46 to 001f1a58 has its CatchHandler @ 001f1a9d */
std::__cxx11::string::_M_construct<char_const*>(&local_58,"storage_offset_comment","");
/* try { // try from 001f1a59 to 001f1a80 has its CatchHandler @ 001f1acf */
uVar3 = 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 + 0x10),(string *)&local_58);
std::__cxx11::string::_M_replace(uVar3,0,*(char **)(uVar3 + 8),0x2e6ce8);
if (local_58 != (code *)local_48) {
operator_delete(local_58);
}
}
return;
}
| |
47,121 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>>::start_array(unsigned long) | hkr04[P]cpp-mcp/common/json.hpp | bool start_array(std::size_t len)
{
ref_stack.push_back(handle_value(BasicJsonType::value_t::array));
if (JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()))
{
JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back()));
}
return true;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>>::start_array(unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
leaq 0x8(%rsp), %rsi
movb $0x2, (%rsi)
callq 0x17426
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x174de
cmpq $-0x1, %r15
je 0x172db
movq 0x10(%r14), %rax
movq -0x8(%rax), %rdi
callq 0x15662
cmpq %r15, %rax
jb 0x172e8
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x5220
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0xa0bb
leaq 0x67a5(%rip), %rsi # 0x1daac
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1603d
movq 0x10(%r14), %rax
movq -0x8(%rax), %rcx
movb $0x1, %bpl
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
movl $0x198, %esi # imm = 0x198
callq 0x1568a
xorl %ebp, %ebp
leaq 0x1481c(%rip), %rsi # 0x2bb58
leaq -0xf109(%rip), %rdx # 0x823a
movq %rbx, %rdi
callq 0x5730
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x51d0
jmp 0x17360
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x51d0
testb %bpl, %bpl
jne 0x17374
jmp 0x1737c
movq %rax, %r14
movq %rbx, %rdi
callq 0x5330
movq %r14, %rdi
callq 0x5750
| _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11start_arrayEm:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r15, rsi
mov r14, rdi
lea rbx, [rdi+8]
lea rsi, [rsp+68h+var_60]
mov byte ptr [rsi], 2
call _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEEPSF_OT_; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<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>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&)
lea rsi, [rsp+68h+var_40]
mov [rsi], rax
mov rdi, rbx
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE12emplace_backIJSE_EEERSE_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> *,std::allocator<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> * &&)
cmp r15, 0FFFFFFFFFFFFFFFFh
jz short loc_172DB
mov rax, [r14+10h]
mov rdi, [rax-8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::max_size(void)
cmp rax, r15
jb short loc_172E8
loc_172DB:
mov al, 1
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_172E8:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]; this
mov rsi, r15; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rsi, aExcessiveArray; "excessive array size: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA23_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(char const(&)[23],std::string &&)
mov rax, [r14+10h]
mov rcx, [rax-8]
mov bpl, 1
lea rdx, [rsp+68h+var_40]
mov rdi, rbx; this
mov esi, 198h; int
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+68h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_17360
mov r14, rax
mov bpl, 1
loc_17360:
lea rdi, [rsp+68h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_17374
jmp short loc_1737C
mov r14, rax
loc_17374:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_1737C:
mov rdi, r14
call __Unwind_Resume
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>>::start_array(
long long a1,
unsigned long long a2)
{
nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // rbx
_BYTE v4[32]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v5[8]; // [rsp+28h] [rbp-40h] BYREF
v4[0] = 2;
v5[0] = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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<nlohmann::json_abi_v3_11_3::detail::value_t>(
a1,
v4);
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> *,std::allocator<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> *>(a1 + 8);
if ( a2 != -1LL
&& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size(*(unsigned __int8 **)(*(_QWORD *)(a1 + 16) - 8LL)) < a2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::to_string((std::__cxx11 *)v4, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(
(long long)v5,
(long long)"excessive array size: ",
(long long)v4);
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
408,
(long long)v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return 1;
}
| start_array:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R15,RSI
MOV R14,RDI
LEA RBX,[RDI + 0x8]
LEA RSI,[RSP + 0x8]
MOV byte ptr [RSI],0x2
CALL 0x00117426
LEA RSI,[RSP + 0x28]
MOV qword ptr [RSI],RAX
MOV RDI,RBX
CALL 0x001174de
CMP R15,-0x1
JZ 0x001172db
MOV RAX,qword ptr [R14 + 0x10]
MOV RDI,qword ptr [RAX + -0x8]
CALL 0x00115662
CMP RAX,R15
JC 0x001172e8
LAB_001172db:
MOV AL,0x1
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001172e8:
PUSH 0x20
POP RDI
CALL 0x00105220
MOV RBX,RAX
LAB_001172f3:
LEA RDI,[RSP + 0x8]
MOV RSI,R15
CALL 0x0010a0bb
LAB_00117300:
LEA RSI,[0x11daac]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0011603d
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [RAX + -0x8]
MOV BPL,0x1
LAB_00117321:
LEA RDX,[RSP + 0x28]
MOV RDI,RBX
MOV ESI,0x198
CALL 0x0011568a
XOR EBP,EBP
LEA RSI,[0x12bb58]
LEA RDX,[0x10823a]
MOV RDI,RBX
CALL 0x00105730
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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> >::start_array(unsigned long) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_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>>
::start_array(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong param_1)
{
ulong uVar1;
int8 uVar2;
__cxx11 local_60 [32];
basic_json *local_40 [4];
local_60[0] = (__cxx11)0x2;
local_40[0] = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,local_60);
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>
((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8),local_40);
if (param_1 != 0xffffffffffffffff) {
uVar1 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::max_size(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(*(long *)(this + 0x10) + -8));
if (uVar1 < param_1) {
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 001172f3 to 001172ff has its CatchHandler @ 00117371 */
std::__cxx11::to_string(local_60,param_1);
/* try { // try from 00117300 to 00117315 has its CatchHandler @ 0011735a */
concat<std::__cxx11::string,char_const(&)[23],std::__cxx11::string>
((detail *)local_40,"excessive array size: ",(string *)local_60);
/* try { // try from 00117321 to 0011734a has its CatchHandler @ 0011734b */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x198,local_40,*(int8 *)(*(long *)(this + 0x10) + -8));
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&out_of_range::typeinfo,exception::~exception);
}
}
return 1;
}
| |
47,122 | JS_ReadObjectAtoms | bluesky950520[P]quickjs/quickjs.c | static int JS_ReadObjectAtoms(BCReaderState *s)
{
uint8_t v8, type;
JSString *p;
int i;
JSAtom atom;
if (bc_get_u8(s, &v8))
return -1;
if (v8 != BC_VERSION) {
JS_ThrowSyntaxError(s->ctx, "invalid version (%d expected=%d)",
v8, BC_VERSION);
return -1;
}
if (bc_get_leb128(s, &s->idx_to_atom_count))
return -1;
if (s->idx_to_atom_count > 1000*1000) {
JS_ThrowInternalError(s->ctx, "unreasonable atom count: %u",
s->idx_to_atom_count);
return -1;
}
bc_read_trace(s, "%u atom indexes {\n", s->idx_to_atom_count);
if (s->idx_to_atom_count != 0) {
s->idx_to_atom = js_mallocz(s->ctx, s->idx_to_atom_count *
sizeof(s->idx_to_atom[0]));
if (!s->idx_to_atom)
return s->error_state = -1;
}
for(i = 0; i < s->idx_to_atom_count; i++) {
if (bc_get_u8(s, &type)) {
return -1;
}
if (type == 0) {
if (bc_get_u32(s, &atom))
return -1;
if (!__JS_AtomIsConst(atom)) {
JS_ThrowInternalError(s->ctx, "out of range atom");
return -1;
}
} else {
if (type < JS_ATOM_TYPE_STRING || type >= JS_ATOM_TYPE_PRIVATE) {
JS_ThrowInternalError(s->ctx, "invalid symbol type %d", type);
return -1;
}
p = JS_ReadString(s);
if (!p)
return -1;
atom = __JS_NewAtom(s->ctx->rt, p, type);
}
if (atom == JS_ATOM_NULL)
return s->error_state = -1;
s->idx_to_atom[i] = atom;
}
bc_read_trace(s, "}\n");
return 0;
} | O0 | c | JS_ReadObjectAtoms:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq 0x58(%rsp), %rdi
leaq 0x57(%rsp), %rsi
callq 0x80450
cmpl $0x0, %eax
je 0x5210a
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x52381
movzbl 0x57(%rsp), %eax
cmpl $0x13, %eax
je 0x5214b
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movzbl 0x57(%rsp), %edx
leaq 0xc2a04(%rip), %rsi # 0x114b2c
movl $0x13, %ecx
movb $0x0, %al
callq 0x33500
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x52381
movq 0x58(%rsp), %rdi
movq 0x58(%rsp), %rsi
addq $0x24, %rsi
callq 0x804d0
cmpl $0x0, %eax
je 0x52170
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x52381
movq 0x58(%rsp), %rax
cmpl $0xf4240, 0x24(%rax) # imm = 0xF4240
jbe 0x521b3
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movq 0x58(%rsp), %rax
movl 0x24(%rax), %edx
leaq 0xc29b8(%rip), %rsi # 0x114b4d
movb $0x0, %al
callq 0x337d0
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x52381
movq 0x58(%rsp), %rax
cmpl $0x0, 0x24(%rax)
je 0x5220c
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movq 0x58(%rsp), %rax
movl 0x24(%rax), %eax
movl %eax, %esi
shlq $0x2, %rsi
callq 0x28020
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x58(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x5220a
movq 0x58(%rsp), %rax
movl $0xffffffff, 0x30(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x52381
jmp 0x5220c
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
movq 0x58(%rsp), %rcx
cmpl 0x24(%rcx), %eax
jae 0x52379
movq 0x58(%rsp), %rdi
leaq 0x56(%rsp), %rsi
callq 0x80450
cmpl $0x0, %eax
je 0x52247
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x52381
movzbl 0x56(%rsp), %eax
cmpl $0x0, %eax
jne 0x522b2
movq 0x58(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x80550
cmpl $0x0, %eax
je 0x52272
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x52381
movl 0x40(%rsp), %edi
callq 0x2e2f0
cmpl $0x0, %eax
jne 0x522ad
movq 0x58(%rsp), %rax
movq (%rax), %rdi
leaq 0xc28da(%rip), %rsi # 0x114b69
movb $0x0, %al
callq 0x337d0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x52381
jmp 0x52337
movzbl 0x56(%rsp), %eax
cmpl $0x1, %eax
jl 0x522c6
movzbl 0x56(%rsp), %eax
cmpl $0x4, %eax
jl 0x522f7
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movzbl 0x56(%rsp), %edx
leaq 0xc28a1(%rip), %rsi # 0x114b7b
movb $0x0, %al
callq 0x337d0
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x52381
movq 0x58(%rsp), %rdi
callq 0x80600
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x52318
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x52381
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
movq 0x48(%rsp), %rsi
movzbl 0x56(%rsp), %edx
callq 0x2e940
movl %eax, 0x40(%rsp)
cmpl $0x0, 0x40(%rsp)
jne 0x52354
movq 0x58(%rsp), %rax
movl $0xffffffff, 0x30(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x52381
movl 0x40(%rsp), %edx
movq 0x58(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0x44(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x52214
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw (%rax,%rax)
| JS_ReadObjectAtoms:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov rdi, [rsp+68h+var_10]
lea rsi, [rsp+68h+var_11]
call bc_get_u8
cmp eax, 0
jz short loc_5210A
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_52381
loc_5210A:
movzx eax, [rsp+68h+var_11]
cmp eax, 13h
jz short loc_5214B
mov rax, [rsp+68h+var_10]
mov rdi, [rax]
movzx edx, [rsp+68h+var_11]
lea rsi, aInvalidVersion; "invalid version (%d expected=%d)"
mov ecx, 13h
mov al, 0
call JS_ThrowSyntaxError
mov [rsp+68h+var_38], rax
mov [rsp+68h+var_30], rdx
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_52381
loc_5214B:
mov rdi, [rsp+68h+var_10]
mov rsi, [rsp+68h+var_10]
add rsi, 24h ; '$'
call bc_get_leb128
cmp eax, 0
jz short loc_52170
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_52381
loc_52170:
mov rax, [rsp+68h+var_10]
cmp dword ptr [rax+24h], 0F4240h
jbe short loc_521B3
mov rax, [rsp+68h+var_10]
mov rdi, [rax]
mov rax, [rsp+68h+var_10]
mov edx, [rax+24h]
lea rsi, aUnreasonableAt; "unreasonable atom count: %u"
mov al, 0
call JS_ThrowInternalError
mov [rsp+68h+var_48], rax
mov [rsp+68h+var_40], rdx
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_52381
loc_521B3:
mov rax, [rsp+68h+var_10]
cmp dword ptr [rax+24h], 0
jz short loc_5220C
mov rax, [rsp+68h+var_10]
mov rdi, [rax]
mov rax, [rsp+68h+var_10]
mov eax, [rax+24h]
mov esi, eax
shl rsi, 2
call js_mallocz
mov rcx, rax
mov rax, [rsp+68h+var_10]
mov [rax+28h], rcx
mov rax, [rsp+68h+var_10]
cmp qword ptr [rax+28h], 0
jnz short loc_5220A
mov rax, [rsp+68h+var_10]
mov dword ptr [rax+30h], 0FFFFFFFFh
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_52381
loc_5220A:
jmp short $+2
loc_5220C:
mov [rsp+68h+var_24], 0
loc_52214:
mov eax, [rsp+68h+var_24]
mov rcx, [rsp+68h+var_10]
cmp eax, [rcx+24h]
jnb loc_52379
mov rdi, [rsp+68h+var_10]
lea rsi, [rsp+68h+var_12]
call bc_get_u8
cmp eax, 0
jz short loc_52247
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_52381
loc_52247:
movzx eax, [rsp+68h+var_12]
cmp eax, 0
jnz short loc_522B2
mov rdi, [rsp+68h+var_10]
lea rsi, [rsp+68h+var_28]
call bc_get_u32
cmp eax, 0
jz short loc_52272
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_52381
loc_52272:
mov edi, [rsp+68h+var_28]
call __JS_AtomIsConst
cmp eax, 0
jnz short loc_522AD
mov rax, [rsp+68h+var_10]
mov rdi, [rax]
lea rsi, aOutOfRangeAtom; "out of range atom"
mov al, 0
call JS_ThrowInternalError
mov [rsp+68h+var_58], rax
mov [rsp+68h+var_50], rdx
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_52381
loc_522AD:
jmp loc_52337
loc_522B2:
movzx eax, [rsp+68h+var_12]
cmp eax, 1
jl short loc_522C6
movzx eax, [rsp+68h+var_12]
cmp eax, 4
jl short loc_522F7
loc_522C6:
mov rax, [rsp+68h+var_10]
mov rdi, [rax]
movzx edx, [rsp+68h+var_12]
lea rsi, aInvalidSymbolT; "invalid symbol type %d"
mov al, 0
call JS_ThrowInternalError
mov [rsp+68h+var_68], rax
mov [rsp+68h+var_60], rdx
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp loc_52381
loc_522F7:
mov rdi, [rsp+68h+var_10]
call JS_ReadString
mov [rsp+68h+var_20], rax
cmp [rsp+68h+var_20], 0
jnz short loc_52318
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp short loc_52381
loc_52318:
mov rax, [rsp+68h+var_10]
mov rax, [rax]
mov rdi, [rax+18h]
mov rsi, [rsp+68h+var_20]
movzx edx, [rsp+68h+var_12]
call __JS_NewAtom
mov [rsp+68h+var_28], eax
loc_52337:
cmp [rsp+68h+var_28], 0
jnz short loc_52354
mov rax, [rsp+68h+var_10]
mov dword ptr [rax+30h], 0FFFFFFFFh
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp short loc_52381
loc_52354:
mov edx, [rsp+68h+var_28]
mov rax, [rsp+68h+var_10]
mov rax, [rax+28h]
movsxd rcx, [rsp+68h+var_24]
mov [rax+rcx*4], edx
mov eax, [rsp+68h+var_24]
add eax, 1
mov [rsp+68h+var_24], eax
jmp loc_52214
loc_52379:
mov [rsp+68h+var_4], 0
loc_52381:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
| long long JS_ReadObjectAtoms(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9)
{
long long v9; // r8
long long v10; // r9
__m128 v11; // xmm4
__m128 v12; // xmm5
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
long long v18; // rax
long long v19; // rcx
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
long long v24; // rdx
long long v25; // rcx
long long v26; // r8
long long v27; // r9
__m128 v28; // xmm4
__m128 v29; // xmm5
char v31; // [rsp+0h] [rbp-68h]
int v32; // [rsp+40h] [rbp-28h] BYREF
unsigned int i; // [rsp+44h] [rbp-24h]
long long String; // [rsp+48h] [rbp-20h]
unsigned __int8 v35; // [rsp+56h] [rbp-12h] BYREF
unsigned __int8 v36; // [rsp+57h] [rbp-11h] BYREF
long long v37; // [rsp+58h] [rbp-10h]
v37 = a1;
if ( (unsigned int)bc_get_u8(a1, &v36) )
{
return (unsigned int)-1;
}
else if ( v36 == 19 )
{
if ( (unsigned int)bc_get_leb128(v37, v37 + 36) )
{
return (unsigned int)-1;
}
else if ( *(_DWORD *)(v37 + 36) <= 0xF4240u )
{
if ( !*(_DWORD *)(v37 + 36)
|| (v18 = js_mallocz(*(_QWORD *)v37, 4LL * *(unsigned int *)(v37 + 36)), (*(_QWORD *)(v37 + 40) = v18) != 0LL) )
{
for ( i = 0; i < *(_DWORD *)(v37 + 36); ++i )
{
if ( (unsigned int)bc_get_u8(v37, &v35) )
return (unsigned int)-1;
if ( v35 )
{
if ( v35 >= 4u )
{
JS_ThrowInternalError(
*(_QWORD *)v37,
(long long)"invalid symbol type %d",
v35,
v19,
v20,
v21,
a2,
a3,
a4,
a5,
v22,
v23,
a8,
a9,
v31);
return (unsigned int)-1;
}
String = JS_ReadString(v37);
if ( !String )
return (unsigned int)-1;
v32 = _JS_NewAtom(*(_QWORD *)(*(_QWORD *)v37 + 24LL), String, v35);
}
else
{
if ( (unsigned int)bc_get_u32(v37, &v32) )
return (unsigned int)-1;
if ( !_JS_AtomIsConst(v32) )
{
JS_ThrowInternalError(
*(_QWORD *)v37,
(long long)"out of range atom",
v24,
v25,
v26,
v27,
a2,
a3,
a4,
a5,
v28,
v29,
a8,
a9,
v31);
return (unsigned int)-1;
}
}
if ( !v32 )
{
*(_DWORD *)(v37 + 48) = -1;
return (unsigned int)-1;
}
*(_DWORD *)(*(_QWORD *)(v37 + 40) + 4LL * (int)i) = v32;
}
return 0;
}
else
{
*(_DWORD *)(v37 + 48) = -1;
return (unsigned int)-1;
}
}
else
{
JS_ThrowInternalError(
*(_QWORD *)v37,
(long long)"unreasonable atom count: %u",
*(unsigned int *)(v37 + 36),
v13,
v14,
v15,
a2,
a3,
a4,
a5,
v16,
v17,
a8,
a9,
v31);
return (unsigned int)-1;
}
}
else
{
JS_ThrowSyntaxError(
*(_QWORD *)v37,
(long long)"invalid version (%d expected=%d)",
v36,
19LL,
v9,
v10,
a2,
a3,
a4,
a5,
v11,
v12,
a8,
a9,
v31);
return (unsigned int)-1;
}
}
| JS_ReadObjectAtoms:
SUB RSP,0x68
MOV qword ptr [RSP + 0x58],RDI
MOV RDI,qword ptr [RSP + 0x58]
LEA RSI,[RSP + 0x57]
CALL 0x00180450
CMP EAX,0x0
JZ 0x0015210a
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00152381
LAB_0015210a:
MOVZX EAX,byte ptr [RSP + 0x57]
CMP EAX,0x13
JZ 0x0015214b
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX]
MOVZX EDX,byte ptr [RSP + 0x57]
LEA RSI,[0x214b2c]
MOV ECX,0x13
MOV AL,0x0
CALL 0x00133500
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00152381
LAB_0015214b:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x58]
ADD RSI,0x24
CALL 0x001804d0
CMP EAX,0x0
JZ 0x00152170
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00152381
LAB_00152170:
MOV RAX,qword ptr [RSP + 0x58]
CMP dword ptr [RAX + 0x24],0xf4240
JBE 0x001521b3
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x58]
MOV EDX,dword ptr [RAX + 0x24]
LEA RSI,[0x214b4d]
MOV AL,0x0
CALL 0x001337d0
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00152381
LAB_001521b3:
MOV RAX,qword ptr [RSP + 0x58]
CMP dword ptr [RAX + 0x24],0x0
JZ 0x0015220c
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RSP + 0x58]
MOV EAX,dword ptr [RAX + 0x24]
MOV ESI,EAX
SHL RSI,0x2
CALL 0x00128020
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RSP + 0x58]
CMP qword ptr [RAX + 0x28],0x0
JNZ 0x0015220a
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX + 0x30],0xffffffff
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00152381
LAB_0015220a:
JMP 0x0015220c
LAB_0015220c:
MOV dword ptr [RSP + 0x44],0x0
LAB_00152214:
MOV EAX,dword ptr [RSP + 0x44]
MOV RCX,qword ptr [RSP + 0x58]
CMP EAX,dword ptr [RCX + 0x24]
JNC 0x00152379
MOV RDI,qword ptr [RSP + 0x58]
LEA RSI,[RSP + 0x56]
CALL 0x00180450
CMP EAX,0x0
JZ 0x00152247
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00152381
LAB_00152247:
MOVZX EAX,byte ptr [RSP + 0x56]
CMP EAX,0x0
JNZ 0x001522b2
MOV RDI,qword ptr [RSP + 0x58]
LEA RSI,[RSP + 0x40]
CALL 0x00180550
CMP EAX,0x0
JZ 0x00152272
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00152381
LAB_00152272:
MOV EDI,dword ptr [RSP + 0x40]
CALL 0x0012e2f0
CMP EAX,0x0
JNZ 0x001522ad
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x214b69]
MOV AL,0x0
CALL 0x001337d0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00152381
LAB_001522ad:
JMP 0x00152337
LAB_001522b2:
MOVZX EAX,byte ptr [RSP + 0x56]
CMP EAX,0x1
JL 0x001522c6
MOVZX EAX,byte ptr [RSP + 0x56]
CMP EAX,0x4
JL 0x001522f7
LAB_001522c6:
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX]
MOVZX EDX,byte ptr [RSP + 0x56]
LEA RSI,[0x214b7b]
MOV AL,0x0
CALL 0x001337d0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00152381
LAB_001522f7:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00180600
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
JNZ 0x00152318
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00152381
LAB_00152318:
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x48]
MOVZX EDX,byte ptr [RSP + 0x56]
CALL 0x0012e940
MOV dword ptr [RSP + 0x40],EAX
LAB_00152337:
CMP dword ptr [RSP + 0x40],0x0
JNZ 0x00152354
MOV RAX,qword ptr [RSP + 0x58]
MOV dword ptr [RAX + 0x30],0xffffffff
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x00152381
LAB_00152354:
MOV EDX,dword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x28]
MOVSXD RCX,dword ptr [RSP + 0x44]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RSP + 0x44]
ADD EAX,0x1
MOV dword ptr [RSP + 0x44],EAX
JMP 0x00152214
LAB_00152379:
MOV dword ptr [RSP + 0x64],0x0
LAB_00152381:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
int4 JS_ReadObjectAtoms(long *param_1)
{
int iVar1;
long lVar2;
int local_28;
uint local_24;
long local_20;
byte local_12;
char local_11;
long *local_10;
int4 local_4;
local_10 = param_1;
iVar1 = bc_get_u8(param_1,&local_11);
if (iVar1 == 0) {
if (local_11 == '\x13') {
iVar1 = bc_get_leb128(local_10,(long)local_10 + 0x24);
if (iVar1 == 0) {
if (*(uint *)((long)local_10 + 0x24) < 0xf4241) {
if (*(int *)((long)local_10 + 0x24) != 0) {
lVar2 = js_mallocz(*local_10,(ulong)*(uint *)((long)local_10 + 0x24) << 2);
local_10[5] = lVar2;
if (local_10[5] == 0) {
*(int4 *)(local_10 + 6) = 0xffffffff;
return 0xffffffff;
}
}
for (local_24 = 0; local_24 < *(uint *)((long)local_10 + 0x24); local_24 = local_24 + 1) {
iVar1 = bc_get_u8(local_10,&local_12);
if (iVar1 != 0) {
return 0xffffffff;
}
if (local_12 == 0) {
iVar1 = bc_get_u32(local_10,&local_28);
if (iVar1 != 0) {
return 0xffffffff;
}
iVar1 = __JS_AtomIsConst(local_28);
if (iVar1 == 0) {
JS_ThrowInternalError(*local_10,"out of range atom");
return 0xffffffff;
}
}
else {
if ((local_12 == 0) || (3 < local_12)) {
JS_ThrowInternalError(*local_10,"invalid symbol type %d",local_12);
return 0xffffffff;
}
local_20 = JS_ReadString(local_10);
if (local_20 == 0) {
return 0xffffffff;
}
local_28 = __JS_NewAtom(*(int8 *)(*local_10 + 0x18),local_20,local_12);
}
if (local_28 == 0) {
*(int4 *)(local_10 + 6) = 0xffffffff;
return 0xffffffff;
}
*(int *)(local_10[5] + (long)(int)local_24 * 4) = local_28;
}
local_4 = 0;
}
else {
JS_ThrowInternalError
(*local_10,"unreasonable atom count: %u",*(int4 *)((long)local_10 + 0x24))
;
local_4 = 0xffffffff;
}
}
else {
local_4 = 0xffffffff;
}
}
else {
JS_ThrowSyntaxError(*local_10,"invalid version (%d expected=%d)",local_11,0x13);
local_4 = 0xffffffff;
}
}
else {
local_4 = 0xffffffff;
}
return local_4;
}
| |
47,123 | json_next_value | corpus-core[P]colibri-stateless/src/util/json.c | json_t json_next_value(json_t val, bytes_t* property_name, json_next_t type) {
if (val.type == JSON_TYPE_INVALID || val.type == JSON_TYPE_NOT_FOUND) return val;
const char* start = next_non_whitespace_token(val.start + (type == JSON_NEXT_FIRST ? 1 : val.len));
if (!start) return json(JSON_TYPE_INVALID, start, 0);
if (type != JSON_NEXT_FIRST) {
if (*start == ',') {
start++;
start = next_non_whitespace_token(start);
if (!start) return json(JSON_TYPE_INVALID, val.start, 0);
}
}
else
type = val.type == JSON_TYPE_OBJECT ? JSON_NEXT_PROPERTY : JSON_NEXT_VALUE;
if (*start == '}' || *start == ']') return json(JSON_TYPE_NOT_FOUND, start, 0);
if (type == JSON_NEXT_PROPERTY) {
if (*start != '"') return json(JSON_TYPE_INVALID, start, 0);
const char* end_name = find_end(start + 1, '"', '"');
if (!end_name) return json(JSON_TYPE_INVALID, start, 0);
if (property_name) {
property_name->data = (uint8_t*) start + 1;
property_name->len = end_name - start - 1;
}
start = next_non_whitespace_token(end_name + 1);
if (!start || *start != ':') return json(JSON_TYPE_INVALID, start, 0);
start = next_non_whitespace_token(start + 1);
}
return json_parse(start);
} | O3 | c | json_next_value:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x40(%rsp), %rax
movl 0x10(%rax), %r13d
leal 0x1(%r13), %ecx
cmpl $0x1, %ecx
ja 0x16c46
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movups (%rax), %xmm0
movups %xmm0, (%rbx)
jmp 0x16d47
movl %edx, %ebp
movq %rsi, %r14
movq (%rax), %r12
movl $0x1, %edi
testl %edx, %edx
je 0x16c5b
movq 0x8(%rax), %rdi
addq %r12, %rdi
callq 0x16b57
testq %rax, %rax
je 0x16c91
movq %rax, %r15
testl %ebp, %ebp
je 0x16c9c
movb (%r15), %al
cmpb $0x2c, %al
jne 0x16cab
incq %r15
movq %r15, %rdi
callq 0x16b57
movq %rax, %r15
testq %rax, %rax
jne 0x16ca8
movq %r12, (%rbx)
jmp 0x16d38
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x16d40
xorl %ebp, %ebp
cmpl $0x3, %r13d
setne %bpl
incl %ebp
movb (%r15), %al
movzbl %al, %ecx
orl $0x20, %ecx
cmpl $0x7d, %ecx
jne 0x16cca
movq %r15, (%rbx)
movq $0x0, 0x8(%rbx)
movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF
jmp 0x16d47
cmpl $0x1, %ebp
jne 0x16d23
cmpb $0x22, %al
jne 0x16d30
leaq 0x1(%r15), %r12
movq %r12, %rdi
movl $0x22, %esi
movl $0x22, %edx
callq 0x16b90
testq %rax, %rax
je 0x16d30
testq %r14, %r14
je 0x16d00
movq %r12, 0x8(%r14)
notl %r15d
addl %eax, %r15d
movl %r15d, (%r14)
incq %rax
movq %rax, %rdi
callq 0x16b57
testq %rax, %rax
je 0x16d35
cmpb $0x3a, (%rax)
jne 0x16d35
incq %rax
movq %rax, %rdi
callq 0x16b57
movq %rax, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16948
jmp 0x16d47
movq %r15, (%rbx)
jmp 0x16d38
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movl $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| json_next_value:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
lea rax, [rsp+38h+arg_0]
mov r13d, [rax+10h]
lea ecx, [r13+1]
cmp ecx, 1
ja short loc_16C46
mov rcx, [rax+10h]
mov [rbx+10h], rcx
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rbx], xmm0
jmp loc_16D47
loc_16C46:
mov ebp, edx
mov r14, rsi
mov r12, [rax]
mov edi, 1
test edx, edx
jz short loc_16C5B
mov rdi, [rax+8]
loc_16C5B:
add rdi, r12
call next_non_whitespace_token
test rax, rax
jz short loc_16C91
mov r15, rax
test ebp, ebp
jz short loc_16C9C
mov al, [r15]
cmp al, 2Ch ; ','
jnz short loc_16CAB
inc r15
mov rdi, r15
call next_non_whitespace_token
mov r15, rax
test rax, rax
jnz short loc_16CA8
mov [rbx], r12
jmp loc_16D38
loc_16C91:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
jmp loc_16D40
loc_16C9C:
xor ebp, ebp
cmp r13d, 3
setnz bpl
inc ebp
loc_16CA8:
mov al, [r15]
loc_16CAB:
movzx ecx, al
or ecx, 20h
cmp ecx, 7Dh ; '}'
jnz short loc_16CCA
mov [rbx], r15
mov qword ptr [rbx+8], 0
mov dword ptr [rbx+10h], 0FFFFFFFFh
jmp short loc_16D47
loc_16CCA:
cmp ebp, 1
jnz short loc_16D23
cmp al, 22h ; '"'
jnz short loc_16D30
lea r12, [r15+1]
mov rdi, r12
mov esi, 22h ; '"'
mov edx, 22h ; '"'
call find_end
test rax, rax
jz short loc_16D30
test r14, r14
jz short loc_16D00
mov [r14+8], r12
not r15d
add r15d, eax
mov [r14], r15d
loc_16D00:
inc rax
mov rdi, rax
call next_non_whitespace_token
test rax, rax
jz short loc_16D35
cmp byte ptr [rax], 3Ah ; ':'
jnz short loc_16D35
inc rax
mov rdi, rax
call next_non_whitespace_token
mov r15, rax
loc_16D23:
mov rdi, rbx
mov rsi, r15
call json_parse
jmp short loc_16D47
loc_16D30:
mov [rbx], r15
jmp short loc_16D38
loc_16D35:
mov [rbx], rax
loc_16D38:
mov qword ptr [rbx+8], 0
loc_16D40:
mov dword ptr [rbx+10h], 0
loc_16D47:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long json_next_value(
long long a1,
long long a2,
int a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
__int128 a7,
long long a8)
{
int v9; // ebp
long long v10; // rdi
unsigned __int8 *non_whitespace_token; // rax
unsigned __int8 *v12; // r15
unsigned __int8 v13; // al
_BYTE *end; // rax
_BYTE *v15; // rax
if ( (unsigned int)(a8 + 1) > 1 )
{
v9 = a3;
v10 = 1LL;
if ( a3 )
v10 = *((_QWORD *)&a7 + 1);
non_whitespace_token = next_non_whitespace_token((_BYTE *)(a7 + v10));
if ( !non_whitespace_token )
{
*(_OWORD *)a1 = 0LL;
LABEL_27:
*(_DWORD *)(a1 + 16) = 0;
return a1;
}
v12 = non_whitespace_token;
if ( v9 )
{
v13 = *non_whitespace_token;
if ( *v12 != 44 )
goto LABEL_13;
v12 = next_non_whitespace_token(v12 + 1);
if ( !v12 )
{
*(_QWORD *)a1 = a7;
LABEL_26:
*(_QWORD *)(a1 + 8) = 0LL;
goto LABEL_27;
}
}
else
{
v9 = ((_DWORD)a8 != 3) + 1;
}
v13 = *v12;
LABEL_13:
if ( (v13 | 0x20) == 0x7D )
{
*(_QWORD *)a1 = v12;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = -1;
return a1;
}
if ( v9 == 1 )
{
if ( v13 != 34 || (end = find_end(v12 + 1, 34, 34)) == 0LL )
{
*(_QWORD *)a1 = v12;
goto LABEL_26;
}
if ( a2 )
{
*(_QWORD *)(a2 + 8) = v12 + 1;
*(_DWORD *)a2 = (_DWORD)end + ~(_DWORD)v12;
}
v15 = next_non_whitespace_token(end + 1);
if ( !v15 || *v15 != 58 )
{
*(_QWORD *)a1 = v15;
goto LABEL_26;
}
v12 = next_non_whitespace_token(v15 + 1);
}
json_parse(a1, (long long)v12);
return a1;
}
*(_QWORD *)(a1 + 16) = a8;
*(_OWORD *)a1 = a7;
return a1;
}
| json_next_value:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[RSP + 0x40]
MOV R13D,dword ptr [RAX + 0x10]
LEA ECX,[R13 + 0x1]
CMP ECX,0x1
JA 0x00116c46
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RBX + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x00116d47
LAB_00116c46:
MOV EBP,EDX
MOV R14,RSI
MOV R12,qword ptr [RAX]
MOV EDI,0x1
TEST EDX,EDX
JZ 0x00116c5b
MOV RDI,qword ptr [RAX + 0x8]
LAB_00116c5b:
ADD RDI,R12
CALL 0x00116b57
TEST RAX,RAX
JZ 0x00116c91
MOV R15,RAX
TEST EBP,EBP
JZ 0x00116c9c
MOV AL,byte ptr [R15]
CMP AL,0x2c
JNZ 0x00116cab
INC R15
MOV RDI,R15
CALL 0x00116b57
MOV R15,RAX
TEST RAX,RAX
JNZ 0x00116ca8
MOV qword ptr [RBX],R12
JMP 0x00116d38
LAB_00116c91:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x00116d40
LAB_00116c9c:
XOR EBP,EBP
CMP R13D,0x3
SETNZ BPL
INC EBP
LAB_00116ca8:
MOV AL,byte ptr [R15]
LAB_00116cab:
MOVZX ECX,AL
OR ECX,0x20
CMP ECX,0x7d
JNZ 0x00116cca
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],0x0
MOV dword ptr [RBX + 0x10],0xffffffff
JMP 0x00116d47
LAB_00116cca:
CMP EBP,0x1
JNZ 0x00116d23
CMP AL,0x22
JNZ 0x00116d30
LEA R12,[R15 + 0x1]
MOV RDI,R12
MOV ESI,0x22
MOV EDX,0x22
CALL 0x00116b90
TEST RAX,RAX
JZ 0x00116d30
TEST R14,R14
JZ 0x00116d00
MOV qword ptr [R14 + 0x8],R12
NOT R15D
ADD R15D,EAX
MOV dword ptr [R14],R15D
LAB_00116d00:
INC RAX
MOV RDI,RAX
CALL 0x00116b57
TEST RAX,RAX
JZ 0x00116d35
CMP byte ptr [RAX],0x3a
JNZ 0x00116d35
INC RAX
MOV RDI,RAX
CALL 0x00116b57
MOV R15,RAX
LAB_00116d23:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00116948
JMP 0x00116d47
LAB_00116d30:
MOV qword ptr [RBX],R15
JMP 0x00116d38
LAB_00116d35:
MOV qword ptr [RBX],RAX
LAB_00116d38:
MOV qword ptr [RBX + 0x8],0x0
LAB_00116d40:
MOV dword ptr [RBX + 0x10],0x0
LAB_00116d47:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long * json_next_value(long *param_1,int *param_2,int param_3)
{
byte bVar1;
byte *pbVar2;
long lVar3;
char *pcVar4;
long in_stack_00000008;
long in_stack_00000010;
int iStack0000000000000018;
if (iStack0000000000000018 + 1U < 2) {
param_1[2] = _iStack0000000000000018;
*param_1 = in_stack_00000008;
param_1[1] = in_stack_00000010;
return param_1;
}
lVar3 = 1;
if (param_3 != 0) {
lVar3 = in_stack_00000010;
}
pbVar2 = (byte *)next_non_whitespace_token(lVar3 + in_stack_00000008);
if (pbVar2 == (byte *)0x0) {
*param_1 = 0;
param_1[1] = 0;
goto LAB_00116d40;
}
if (param_3 == 0) {
param_3 = (iStack0000000000000018 != 3) + 1;
LAB_00116ca8:
bVar1 = *pbVar2;
LAB_00116cab:
if ((bVar1 | 0x20) == 0x7d) {
*param_1 = (long)pbVar2;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0xffffffff;
return param_1;
}
if (param_3 != 1) {
LAB_00116d23:
json_parse(param_1,pbVar2);
return param_1;
}
if (bVar1 == 0x22) {
lVar3 = find_end(pbVar2 + 1,0x22,0x22);
if (lVar3 != 0) {
if (param_2 != (int *)0x0) {
*(byte **)(param_2 + 2) = pbVar2 + 1;
*param_2 = ~(uint)pbVar2 + (int)lVar3;
}
pcVar4 = (char *)next_non_whitespace_token(lVar3 + 1);
if ((pcVar4 != (char *)0x0) && (*pcVar4 == ':')) {
pbVar2 = (byte *)next_non_whitespace_token(pcVar4 + 1);
goto LAB_00116d23;
}
*param_1 = (long)pcVar4;
goto LAB_00116d38;
}
}
*param_1 = (long)pbVar2;
}
else {
bVar1 = *pbVar2;
if (bVar1 != 0x2c) goto LAB_00116cab;
pbVar2 = (byte *)next_non_whitespace_token(pbVar2 + 1);
if (pbVar2 != (byte *)0x0) goto LAB_00116ca8;
*param_1 = in_stack_00000008;
}
LAB_00116d38:
param_1[1] = 0;
LAB_00116d40:
*(int4 *)(param_1 + 2) = 0;
return param_1;
}
| |
47,124 | 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>::set_parents() | monkey531[P]llama/common/./json.hpp | void set_parents()
{
#if JSON_DIAGNOSTICS
switch (m_data.m_type)
{
case value_t::array:
{
for (auto& element : *m_data.m_value.array)
{
element.m_parent = this;
}
break;
}
case value_t::object:
{
for (auto& element : *m_data.m_value.object)
{
element.second.m_parent = this;
}
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
break;
}
#endif
} | O0 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::set_parents():
movq %rdi, -0x8(%rsp)
retq
nopw %cs:(%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv:
mov [rsp+var_8], rdi
retn
| void 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>::set_parents()
{
;
}
| set_parents:
MOV qword ptr [RSP + -0x8],RDI
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::set_parents() */
void nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::set_parents(void)
{
return;
}
| |
47,125 | testing::ValidateTestPropertyName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc | static bool ValidateTestPropertyName(
const std::string& property_name,
const std::vector<std::string>& reserved_names) {
if (std::find(reserved_names.begin(), reserved_names.end(), property_name) !=
reserved_names.end()) {
ADD_FAILURE() << "Reserved key used in RecordProperty(): " << property_name
<< " (" << FormatWordList(reserved_names)
<< " are reserved by " << GTEST_NAME_ << ")";
return false;
}
return true;
} | O0 | cpp | testing::ValidateTestPropertyName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&):
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
callq 0xec680
movq %rax, 0x90(%rsp)
movq 0xa0(%rsp), %rdi
callq 0xec6b0
movq %rax, 0x88(%rsp)
movq 0xa8(%rsp), %rdx
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0xf1d90
movq %rax, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
callq 0xec6b0
movq %rax, 0x80(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0xf1d50
xorb $-0x1, %al
testb $0x1, %al
jne 0xcdbbb
jmp 0xcdd2e
leaq 0x78(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xc8d80
movq 0x30(%rsp), %rdi
leaq 0x50aa8(%rip), %rsi # 0x11e67e
callq 0xf59a0
movq %rax, 0x38(%rsp)
jmp 0xcdbe2
movq 0x38(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0x32aa0
movq %rax, 0x28(%rsp)
jmp 0xcdbfb
movq 0x28(%rsp), %rdi
leaq 0x48648(%rip), %rsi # 0x11624f
callq 0x32a60
movq %rax, 0x20(%rsp)
jmp 0xcdc13
movq 0xa0(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0xe6830
jmp 0xcdc27
movq 0x20(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x32aa0
movq %rax, 0x18(%rsp)
jmp 0xcdc3d
movq 0x18(%rsp), %rdi
leaq 0x50a5d(%rip), %rsi # 0x11e6a6
callq 0xf0290
movq %rax, 0x10(%rsp)
jmp 0xcdc55
movq 0x10(%rsp), %rdi
leaq 0x4faf6(%rip), %rsi # 0x11d757
callq 0x324d0
movq %rax, 0x8(%rsp)
jmp 0xcdc6d
movq 0x8(%rsp), %rdi
leaq 0x4fa62(%rip), %rsi # 0x11d6db
callq 0xeb120
movq %rax, (%rsp)
jmp 0xcdc84
leaq 0x4f03b(%rip), %rdx # 0x11ccc6
leaq 0x4f75a(%rip), %r8 # 0x11d3ec
leaq 0x40(%rsp), %rdi
movl $0x1, %esi
movl $0x969, %ecx # imm = 0x969
callq 0xc4b10
jmp 0xcdca8
movq (%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0xc1250
jmp 0xcdcb8
leaq 0x40(%rsp), %rdi
callq 0xc4ba0
leaq 0x48(%rsp), %rdi
callq 0x1dfd0
leaq 0x78(%rsp), %rdi
callq 0x1e080
movb $0x0, 0xb7(%rsp)
jmp 0xcdd36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0xcdd22
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0xcdd18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x40(%rsp), %rdi
callq 0xc4ba0
leaq 0x48(%rsp), %rdi
callq 0x1dfd0
leaq 0x78(%rsp), %rdi
callq 0x1e080
jmp 0xcdd47
movb $0x1, 0xb7(%rsp)
movb 0xb7(%rsp), %al
andb $0x1, %al
addq $0xb8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x16cf0
nopw %cs:(%rax,%rax)
| _ZN7testingL24ValidateTestPropertyNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EE:
sub rsp, 0B8h
mov [rsp+0B8h+var_10], rdi
mov [rsp+0B8h+var_18], rsi
mov rdi, [rsp+0B8h+var_18]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov [rsp+0B8h+var_28], rax
mov rdi, [rsp+0B8h+var_18]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rsp+0B8h+var_30], rax
mov rdx, [rsp+0B8h+var_10]
mov rdi, [rsp+0B8h+var_28]
mov rsi, [rsp+0B8h+var_30]
call _ZSt4findIN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEES7_ET_SE_SE_RKT0_; std::find<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,std::string>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,std::string const&)
mov [rsp+0B8h+var_20], rax
mov rdi, [rsp+0B8h+var_18]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rsp+0B8h+var_38], rax
lea rdi, [rsp+0B8h+var_20]
lea rsi, [rsp+0B8h+var_38]
call _ZN9__gnu_cxxeqIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_CDBBB
jmp loc_CDD2E
loc_CDBBB:
lea rdi, [rsp+0B8h+var_40]; this
mov qword ptr [rsp+0B8h+var_88], rdi; int
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rdi, qword ptr [rsp+0B8h+var_88]
lea rsi, aReservedKeyUse; "Reserved key used in RecordProperty(): "
call _ZN7testing7MessagelsIA40_cEERS0_RKT_; testing::Message::operator<<<char [40]>(char [40] const&)
mov qword ptr [rsp+0B8h+var_80], rax; int
jmp short $+2
loc_CDBE2:
mov rdi, qword ptr [rsp+0B8h+var_80]
mov rsi, [rsp+0B8h+var_10]
call _ZN7testing7MessagelsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::Message::operator<<<std::string>(std::string const&)
mov qword ptr [rsp+0B8h+var_90], rax; int
jmp short $+2
loc_CDBFB:
mov rdi, qword ptr [rsp+0B8h+var_90]
lea rsi, aExpected+9; " ("
call _ZN7testing7MessagelsIA3_cEERS0_RKT_; testing::Message::operator<<<char [3]>(char [3] const&)
mov qword ptr [rsp+0B8h+var_98], rax; int
jmp short $+2
loc_CDC13:
mov rsi, [rsp+0B8h+var_18]
lea rdi, [rsp+0B8h+var_70]
call _ZN7testingL14FormatWordListERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE; testing::FormatWordList(std::vector<std::string> const&)
jmp short $+2
loc_CDC27:
mov rdi, qword ptr [rsp+0B8h+var_98]
lea rsi, [rsp+0B8h+var_70]
call _ZN7testing7MessagelsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::Message::operator<<<std::string>(std::string const&)
mov qword ptr [rsp+0B8h+var_A0], rax; int
jmp short $+2
loc_CDC3D:
mov rdi, qword ptr [rsp+0B8h+var_A0]
lea rsi, aAreReservedBy; " are reserved by "
call _ZN7testing7MessagelsIA18_cEERS0_RKT_; testing::Message::operator<<<char [18]>(char [18] const&)
mov [rsp+0B8h+var_A8], rax; int
jmp short $+2
loc_CDC55:
mov rdi, [rsp+0B8h+var_A8]
lea rsi, aGoogleTest; "Google Test"
call _ZN7testing7MessagelsIA12_cEERS0_RKT_; testing::Message::operator<<<char [12]>(char [12] const&)
mov qword ptr [rsp+0B8h+var_B0], rax; int
jmp short $+2
loc_CDC6D:
mov rdi, qword ptr [rsp+0B8h+var_B0]
lea rsi, aTeardowntestsu+12h; ")"
call _ZN7testing7MessagelsIA2_cEERS0_RKT_; testing::Message::operator<<<char [2]>(char [2] const&)
mov [rsp+0B8h+var_B8], rax; int
jmp short $+2
loc_CDC84:
lea rdx, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/AlayaL"...
lea r8, aFailed; "Failed"
lea rdi, [rsp+0B8h+var_78]; int
mov esi, 1; int
mov ecx, 969h; int
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
jmp short $+2
loc_CDCA8:
mov rsi, [rsp+0B8h+var_B8]; int
lea rdi, [rsp+0B8h+var_78]; char
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
jmp short $+2
loc_CDCB8:
lea rdi, [rsp+0B8h+var_78]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
lea rdi, [rsp+0B8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0B8h+var_40]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
mov [rsp+0B8h+var_1], 0
jmp short loc_CDD36
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
jmp short loc_CDD22
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
jmp short loc_CDD18
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
lea rdi, [rsp+arg_38]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
loc_CDD18:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_CDD22:
lea rdi, [rsp+arg_70]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
jmp short loc_CDD47
loc_CDD2E:
mov [rsp+0B8h+var_1], 1
loc_CDD36:
mov al, [rsp+0B8h+var_1]
and al, 1
add rsp, 0B8h
retn
loc_CDD47:
mov rdi, [rsp+arg_68]
call __Unwind_Resume
| char testing::ValidateTestPropertyName(long long a1, long long a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v7; // [rsp+0h] [rbp-B8h]
long long v8; // [rsp+8h] [rbp-B0h]
long long v9; // [rsp+10h] [rbp-A8h]
long long v10; // [rsp+18h] [rbp-A0h]
long long v11; // [rsp+20h] [rbp-98h]
long long v12; // [rsp+28h] [rbp-90h]
long long v13; // [rsp+38h] [rbp-80h]
testing::internal::AssertHelper::AssertHelperData *v14; // [rsp+40h] [rbp-78h] BYREF
long long v15; // [rsp+48h] [rbp-70h] BYREF
char v16; // [rsp+50h] [rbp-68h]
int v17; // [rsp+58h] [rbp-60h]
int v18; // [rsp+60h] [rbp-58h]
int v19; // [rsp+68h] [rbp-50h]
char v20; // [rsp+70h] [rbp-48h]
int v21; // [rsp+78h] [rbp-40h] BYREF
long long v22; // [rsp+80h] [rbp-38h] BYREF
long long v23; // [rsp+88h] [rbp-30h]
long long v24; // [rsp+90h] [rbp-28h]
long long v25; // [rsp+98h] [rbp-20h] BYREF
long long v26; // [rsp+A0h] [rbp-18h]
long long v27; // [rsp+A8h] [rbp-10h]
v27 = a1;
v26 = a2;
v24 = std::vector<std::string>::begin(a2);
v23 = std::vector<std::string>::end(a2);
v25 = std::find<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,std::string>(v24, v23, a1);
v22 = std::vector<std::string>::end(a2);
if ( (__gnu_cxx::operator==<std::string const*,std::vector<std::string>>(&v25, &v22) & 1) != 0 )
return 1;
testing::Message::Message((testing::Message *)&v21);
v13 = testing::Message::operator<<<char [40]>(&v21, "Reserved key used in RecordProperty(): ");
v12 = testing::Message::operator<<<std::string>(v13, v27);
v11 = testing::Message::operator<<<char [3]>(v12, (long long)" (");
testing::FormatWordList((unsigned int)&v15, v26, v2, v3, v4, v5);
v10 = testing::Message::operator<<<std::string>(v11, (long long)&v15);
v9 = testing::Message::operator<<<char [18]>(v10, " are reserved by ");
v8 = testing::Message::operator<<<char [12]>(v9, (long long)"Google Test");
v7 = testing::Message::operator<<<char [2]>(v8, ")");
testing::internal::AssertHelper::AssertHelper(
(int)&v14,
1,
(int)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc",
2409,
(int)"Failed");
testing::internal::AssertHelper::operator=(
(char)&v14,
v7,
v7,
v8,
v9,
v10,
v11,
v12,
(int)&v21,
v13,
(__int16)v14,
v15,
v16,
v17,
v18,
v19,
v20);
testing::internal::AssertHelper::~AssertHelper(&v14);
std::string::~string(&v15);
testing::Message::~Message((testing::Message *)&v21);
return 0;
}
| ValidateTestPropertyName:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xa8],RDI
MOV qword ptr [RSP + 0xa0],RSI
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001ec680
MOV qword ptr [RSP + 0x90],RAX
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001ec6b0
MOV qword ptr [RSP + 0x88],RAX
MOV RDX,qword ptr [RSP + 0xa8]
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x88]
CALL 0x001f1d90
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001ec6b0
MOV qword ptr [RSP + 0x80],RAX
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x80]
CALL 0x001f1d50
XOR AL,0xff
TEST AL,0x1
JNZ 0x001cdbbb
JMP 0x001cdd2e
LAB_001cdbbb:
LEA RDI,[RSP + 0x78]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x001c8d80
MOV RDI,qword ptr [RSP + 0x30]
LAB_001cdbcf:
LEA RSI,[0x21e67e]
CALL 0x001f59a0
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001cdbe2
LAB_001cdbe2:
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0xa8]
CALL 0x00132aa0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001cdbfb
LAB_001cdbfb:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[0x21624f]
CALL 0x00132a60
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001cdc13
LAB_001cdc13:
MOV RSI,qword ptr [RSP + 0xa0]
LEA RDI,[RSP + 0x48]
CALL 0x001e6830
JMP 0x001cdc27
LAB_001cdc27:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[RSP + 0x48]
CALL 0x00132aa0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001cdc3d
LAB_001cdc3d:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x21e6a6]
CALL 0x001f0290
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001cdc55
LAB_001cdc55:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[0x21d757]
CALL 0x001324d0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001cdc6d
LAB_001cdc6d:
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[0x21d6db]
CALL 0x001eb120
MOV qword ptr [RSP],RAX
JMP 0x001cdc84
LAB_001cdc84:
LEA RDX,[0x21ccc6]
LEA R8,[0x21d3ec]
LEA RDI,[RSP + 0x40]
MOV ESI,0x1
MOV ECX,0x969
CALL 0x001c4b10
JMP 0x001cdca8
LAB_001cdca8:
MOV RSI,qword ptr [RSP]
LEA RDI,[RSP + 0x40]
CALL 0x001c1250
LAB_001cdcb6:
JMP 0x001cdcb8
LAB_001cdcb8:
LEA RDI,[RSP + 0x40]
CALL 0x001c4ba0
LEA RDI,[RSP + 0x48]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x78]
CALL 0x0011e080
MOV byte ptr [RSP + 0xb7],0x0
JMP 0x001cdd36
LAB_001cdd2e:
MOV byte ptr [RSP + 0xb7],0x1
LAB_001cdd36:
MOV AL,byte ptr [RSP + 0xb7]
AND AL,0x1
ADD RSP,0xb8
RET
|
/* testing::ValidateTestPropertyName(std::__cxx11::string const&, std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&) */
bool testing::ValidateTestPropertyName(string *param_1,vector *param_2)
{
ulong uVar1;
Message *pMVar2;
AssertHelper local_78 [8];
testing local_70 [48];
Message local_40 [8];
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_18;
string *local_10;
bool local_1;
local_18 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_2;
local_10 = param_1;
local_28 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_2
);
local_30 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_18);
local_20 = std::
find<__gnu_cxx::__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::__cxx11::string>
(local_28,local_30,local_10);
local_38 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_18);
uVar1 = _ZN9__gnu_cxxeqIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_20,&local_38);
local_1 = ((uVar1 ^ 0xff) & 1) != 0;
if (local_1) {
Message::Message(local_40);
/* try { // try from 001cdbcf to 001cdc24 has its CatchHandler @ 001cdce0 */
pMVar2 = Message::operator<<(local_40,"Reserved key used in RecordProperty(): ");
pMVar2 = Message::operator<<(pMVar2,local_10);
pMVar2 = Message::operator<<(pMVar2," (");
FormatWordList(local_70,(vector *)local_18);
/* try { // try from 001cdc27 to 001cdca5 has its CatchHandler @ 001cdcf0 */
pMVar2 = Message::operator<<(pMVar2,(string *)local_70);
pMVar2 = Message::operator<<(pMVar2," are reserved by ");
pMVar2 = Message::operator<<(pMVar2,"Google Test");
pMVar2 = Message::operator<<(pMVar2,")");
internal::AssertHelper::AssertHelper
(local_78,1,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc"
,0x969,"Failed");
/* try { // try from 001cdca8 to 001cdcb5 has its CatchHandler @ 001cdd00 */
internal::AssertHelper::operator=(local_78,pMVar2);
internal::AssertHelper::~AssertHelper(local_78);
std::__cxx11::string::~string((string *)local_70);
Message::~Message(local_40);
}
local_1 = !local_1;
return local_1;
}
| |
47,126 | r3d_frustum_is_point_in | r3d/src/details/r3d_frustum.c | bool r3d_frustum_is_point_in(const r3d_frustum_t* frustum, Vector3 position)
{
for (int i = 0; i < R3D_PLANE_COUNT; i++) {
if (r3d_frustum_distance_to_plane(frustum->planes[i], position) <= 0) {
return false;
}
}
return true;
} | O3 | c | r3d_frustum_is_point_in:
movsd (%rdi), %xmm2
movsd 0x8(%rdi), %xmm3
movaps %xmm2, %xmm4
mulps %xmm0, %xmm4
shufps $0x55, %xmm4, %xmm4 # xmm4 = xmm4[1,1,1,1]
mulss %xmm0, %xmm2
addss %xmm4, %xmm2
movaps %xmm3, %xmm4
mulss %xmm1, %xmm4
addss %xmm2, %xmm4
shufps $0x55, %xmm3, %xmm3 # xmm3 = xmm3[1,1,1,1]
addss %xmm4, %xmm3
xorps %xmm2, %xmm2
ucomiss %xmm3, %xmm2
jae 0xdfd49
pushq %rbp
movq %rsp, %rbp
addq $0x18, %rdi
xorl %ecx, %ecx
movq %rcx, %rax
cmpq $0x5, %rcx
je 0xdfd40
movsd -0x8(%rdi), %xmm3
movsd (%rdi), %xmm4
movaps %xmm3, %xmm5
mulps %xmm0, %xmm5
shufps $0x55, %xmm5, %xmm5 # xmm5 = xmm5[1,1,1,1]
mulss %xmm0, %xmm3
addss %xmm5, %xmm3
movaps %xmm4, %xmm5
mulss %xmm1, %xmm5
addss %xmm3, %xmm5
shufps $0x55, %xmm4, %xmm4 # xmm4 = xmm4[1,1,1,1]
addss %xmm5, %xmm4
addq $0x10, %rdi
leaq 0x1(%rax), %rcx
ucomiss %xmm4, %xmm2
jb 0xdfcfc
cmpq $0x5, %rax
setae %al
popq %rbp
retq
xorl %eax, %eax
retq
| r3d_frustum_is_point_in:
movsd xmm2, qword ptr [rdi]
movsd xmm3, qword ptr [rdi+8]
movaps xmm4, xmm2
mulps xmm4, xmm0
shufps xmm4, xmm4, 55h ; 'U'
mulss xmm2, xmm0
addss xmm2, xmm4
movaps xmm4, xmm3
mulss xmm4, xmm1
addss xmm4, xmm2
shufps xmm3, xmm3, 55h ; 'U'
addss xmm3, xmm4
xorps xmm2, xmm2
ucomiss xmm2, xmm3
jnb short loc_DFD49
push rbp
mov rbp, rsp
add rdi, 18h
xor ecx, ecx
loc_DFCFC:
mov rax, rcx
cmp rcx, 5
jz short loc_DFD40
movsd xmm3, qword ptr [rdi-8]
movsd xmm4, qword ptr [rdi]
movaps xmm5, xmm3
mulps xmm5, xmm0
shufps xmm5, xmm5, 55h ; 'U'
mulss xmm3, xmm0
addss xmm3, xmm5
movaps xmm5, xmm4
mulss xmm5, xmm1
addss xmm5, xmm3
shufps xmm4, xmm4, 55h ; 'U'
addss xmm4, xmm5
add rdi, 10h
lea rcx, [rax+1]
ucomiss xmm2, xmm4
jb short loc_DFCFC
loc_DFD40:
cmp rax, 5
setnb al
pop rbp
retn
loc_DFD49:
xor eax, eax
retn
| bool r3d_frustum_is_point_in(unsigned long long *a1, __m128 a2, float a3)
{
__m128 v3; // xmm4
unsigned long long *v4; // rdi
unsigned long long v5; // rcx
unsigned long long v6; // rax
__m128 v7; // xmm5
float v8; // xmm4_4
v3 = _mm_mul_ps((__m128)*a1, a2);
if ( (float)(_mm_shuffle_ps((__m128)a1[1], (__m128)a1[1], 85).m128_f32[0]
+ (float)((float)(COERCE_FLOAT(a1[1]) * a3)
+ (float)((float)(COERCE_FLOAT(*a1) * a2.m128_f32[0]) + _mm_shuffle_ps(v3, v3, 85).m128_f32[0]))) <= 0.0 )
return 0;
v4 = a1 + 3;
v5 = 0LL;
do
{
v6 = v5;
if ( v5 == 5 )
break;
v7 = _mm_mul_ps((__m128)*(v4 - 1), a2);
v8 = _mm_shuffle_ps((__m128)*v4, (__m128)*v4, 85).m128_f32[0]
+ (float)((float)(COERCE_FLOAT(*v4) * a3)
+ (float)((float)(COERCE_FLOAT(*(v4 - 1)) * a2.m128_f32[0]) + _mm_shuffle_ps(v7, v7, 85).m128_f32[0]));
v4 += 2;
++v5;
}
while ( v8 > 0.0 );
return v6 >= 5;
}
| r3d_frustum_is_point_in:
MOVSD XMM2,qword ptr [RDI]
MOVSD XMM3,qword ptr [RDI + 0x8]
MOVAPS XMM4,XMM2
MULPS XMM4,XMM0
SHUFPS XMM4,XMM4,0x55
MULSS XMM2,XMM0
ADDSS XMM2,XMM4
MOVAPS XMM4,XMM3
MULSS XMM4,XMM1
ADDSS XMM4,XMM2
SHUFPS XMM3,XMM3,0x55
ADDSS XMM3,XMM4
XORPS XMM2,XMM2
UCOMISS XMM2,XMM3
JNC 0x001dfd49
PUSH RBP
MOV RBP,RSP
ADD RDI,0x18
XOR ECX,ECX
LAB_001dfcfc:
MOV RAX,RCX
CMP RCX,0x5
JZ 0x001dfd40
MOVSD XMM3,qword ptr [RDI + -0x8]
MOVSD XMM4,qword ptr [RDI]
MOVAPS XMM5,XMM3
MULPS XMM5,XMM0
SHUFPS XMM5,XMM5,0x55
MULSS XMM3,XMM0
ADDSS XMM3,XMM5
MOVAPS XMM5,XMM4
MULSS XMM5,XMM1
ADDSS XMM5,XMM3
SHUFPS XMM4,XMM4,0x55
ADDSS XMM4,XMM5
ADD RDI,0x10
LEA RCX,[RAX + 0x1]
UCOMISS XMM2,XMM4
JC 0x001dfcfc
LAB_001dfd40:
CMP RAX,0x5
SETNC AL
POP RBP
RET
LAB_001dfd49:
XOR EAX,EAX
RET
|
int8 r3d_frustum_is_point_in(int8 param_1,float param_2,int8 *param_3)
{
int8 *puVar1;
int8 uVar2;
ulong uVar3;
ulong uVar4;
float fVar5;
fVar5 = (float)((ulong)param_1 >> 0x20);
if ((float)((ulong)param_3[1] >> 0x20) +
(float)param_3[1] * param_2 +
(float)*param_3 * (float)param_1 + (float)((ulong)*param_3 >> 0x20) * fVar5 <= 0.0) {
return 0;
}
param_3 = param_3 + 3;
uVar3 = 0;
do {
uVar4 = uVar3;
if (uVar4 == 5) break;
puVar1 = param_3 + -1;
uVar2 = *param_3;
param_3 = param_3 + 2;
uVar3 = uVar4 + 1;
} while (0.0 < (float)((ulong)uVar2 >> 0x20) +
(float)uVar2 * param_2 +
(float)*puVar1 * (float)param_1 + (float)((ulong)*puVar1 >> 0x20) * fVar5);
return CONCAT71((int7)(uVar4 >> 8),4 < uVar4);
}
| |
47,127 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) | monkey531[P]llama/common/json.hpp | inline void grisu2(char* buf, int& len, int& decimal_exponent,
diyfp m_minus, diyfp v, diyfp m_plus)
{
JSON_ASSERT(m_plus.e == m_minus.e);
JSON_ASSERT(m_plus.e == v.e);
// --------(-----------------------+-----------------------)-------- (A)
// m- v m+
//
// --------------------(-----------+-----------------------)-------- (B)
// m- v m+
//
// First scale v (and m- and m+) such that the exponent is in the range
// [alpha, gamma].
const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e);
const diyfp c_minus_k(cached.f, cached.e); // = c ~= 10^-k
// The exponent of the products is = v.e + c_minus_k.e + q and is in the range [alpha,gamma]
const diyfp w = diyfp::mul(v, c_minus_k);
const diyfp w_minus = diyfp::mul(m_minus, c_minus_k);
const diyfp w_plus = diyfp::mul(m_plus, c_minus_k);
// ----(---+---)---------------(---+---)---------------(---+---)----
// w- w w+
// = c*m- = c*v = c*m+
//
// diyfp::mul rounds its result and c_minus_k is approximated too. w, w- and
// w+ are now off by a small amount.
// In fact:
//
// w - v * 10^k < 1 ulp
//
// To account for this inaccuracy, add resp. subtract 1 ulp.
//
// --------+---[---------------(---+---)---------------]---+--------
// w- M- w M+ w+
//
// Now any number in [M-, M+] (bounds included) will round to w when input,
// regardless of how the input rounding algorithm breaks ties.
//
// And digit_gen generates the shortest possible such number in [M-, M+].
// Note that this does not mean that Grisu2 always generates the shortest
// possible number in the interval (m-, m+).
const diyfp M_minus(w_minus.f + 1, w_minus.e);
const diyfp M_plus (w_plus.f - 1, w_plus.e );
decimal_exponent = -cached.k; // = -(-k) = k
grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus);
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, 0x58(%rsp)
movl %r8d, 0x60(%rsp)
cmpl %r8d, 0xc8(%rsp)
jne 0x93a48
movq %rdi, 0x20(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
leaq 0xb0(%rsp), %r13
cmpl %r8d, 0x8(%r13)
jne 0x93a64
movl %r8d, %edi
callq 0x93b1d
movq %rdx, %r12
leaq 0x68(%rsp), %r14
movq %rax, (%r14)
movl %r12d, 0x8(%r14)
movq %r13, %rdi
movq %r14, %rsi
callq 0x93c52
movq %rax, %r15
movl %edx, %ebx
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x93c52
movq %rax, %r13
movl %edx, %ebp
leaq 0xc0(%rsp), %rdi
movq %r14, %rsi
callq 0x93c52
incq %r13
decq %rax
shrq $0x20, %r12
negl %r12d
movq 0x30(%rsp), %rcx
movl %r12d, (%rcx)
movq %r15, 0x48(%rsp)
movl %ebx, 0x50(%rsp)
movq %rax, 0x38(%rsp)
movl %edx, 0x40(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movups 0x48(%rsp), %xmm0
movups %xmm0, (%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rcx, %rdx
movq %r13, %rcx
movl %ebp, %r8d
callq 0x93cae
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28508(%rip), %rdi # 0xbbf57
leaq 0x2209a(%rip), %rdx # 0xb5af0
leaq 0x2dc9a(%rip), %rcx # 0xc16f7
movl $0x454b, %esi # imm = 0x454B
jmp 0x93a7e
leaq 0x284ec(%rip), %rdi # 0xbbf57
leaq 0x2207e(%rip), %rdx # 0xb5af0
leaq 0x2dc94(%rip), %rcx # 0xc170d
movl $0x454c, %esi # imm = 0x454C
xorl %eax, %eax
callq 0x24f20
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov [rsp+0A8h+var_50], rcx
mov [rsp+0A8h+var_48], r8d
cmp [rsp+0A8h+arg_18], r8d
jnz loc_93A48
mov [rsp+0A8h+var_88], rdi
mov [rsp+0A8h+var_80], rsi
mov [rsp+0A8h+var_78], rdx
lea r13, [rsp+0A8h+arg_0]
cmp [r13+8], r8d
jnz loc_93A64
mov edi, r8d; this
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)
mov r12, rdx
lea r14, [rsp+0A8h+var_40]
mov [r14], rax
mov [r14+8], r12d
mov rdi, r13
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
mov r15, rax
mov ebx, edx
lea rdi, [rsp+0A8h+var_50]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
mov r13, rax
mov ebp, edx
lea rdi, [rsp+0A8h+arg_10]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
inc r13
dec rax
shr r12, 20h
neg r12d
mov rcx, [rsp+0A8h+var_78]
mov [rcx], r12d
mov qword ptr [rsp+0A8h+var_60], r15
mov dword ptr [rsp+0A8h+var_60+8], ebx
mov qword ptr [rsp+0A8h+var_70], rax
mov dword ptr [rsp+0A8h+var_70+8], edx
movups xmm0, [rsp+0A8h+var_70]
movups [rsp+0A8h+var_98], xmm0
movups xmm0, [rsp+0A8h+var_60]
movups [rsp+0A8h+var_A8], xmm0
mov rdi, [rsp+0A8h+var_88]
mov rsi, [rsp+0A8h+var_80]
mov rdx, rcx
mov rcx, r13
mov r8d, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl16grisu2_digit_genEPcRiS4_NS2_5diyfpES5_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char *,int &,int &,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_93A48:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMPlusEMMinusE; "m_plus.e == m_minus.e"
mov esi, 454Bh
jmp short loc_93A7E
loc_93A64:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMPlusEVE; "m_plus.e == v.e"
mov esi, 454Ch
loc_93A7E:
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(
int a1,
int a2,
_DWORD *a3,
long long a4,
unsigned int a5,
long long a6,
char a7,
int a8,
char a9,
int a10)
{
long long cached_power_for_binary_exponent; // rax
int v11; // rdx^4
int v12; // r12^4
int v13; // edx
char v14; // r15
int v15; // edx
int v16; // ebx
int v17; // r13d
int v18; // edx
int v19; // ebp
char v20; // al
int v21; // edx
int v22; // r9d
long long v25; // [rsp+58h] [rbp-50h] BYREF
unsigned int v26; // [rsp+60h] [rbp-48h]
long long v27; // [rsp+68h] [rbp-40h] BYREF
int v28; // [rsp+70h] [rbp-38h]
v25 = a4;
v26 = a5;
if ( a10 == a5 )
{
if ( a8 == a5 )
{
cached_power_for_binary_exponent = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(
(nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)a5,
a2);
v12 = v11;
v27 = cached_power_for_binary_exponent;
v28 = v13;
v14 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a7, &v27);
v16 = v15;
v17 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&v25, &v27);
v19 = v18;
v20 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a9, &v27);
*a3 = -v12;
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(
a1,
a2,
(_DWORD)a3,
v17 + 1,
v19,
v22,
v14,
v16,
v20 - 1,
v21);
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17740LL,
"GGML_ASSERT(%s) failed",
"m_plus.e == v.e");
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17739LL,
"GGML_ASSERT(%s) failed",
"m_plus.e == m_minus.e");
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
| grisu2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RSP + 0x58],RCX
MOV dword ptr [RSP + 0x60],R8D
CMP dword ptr [RSP + 0xc8],R8D
JNZ 0x00193a48
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
LEA R13,[RSP + 0xb0]
CMP dword ptr [R13 + 0x8],R8D
JNZ 0x00193a64
MOV EDI,R8D
CALL 0x00193b1d
MOV R12,RDX
LEA R14,[RSP + 0x68]
MOV qword ptr [R14],RAX
MOV dword ptr [R14 + 0x8],R12D
MOV RDI,R13
MOV RSI,R14
CALL 0x00193c52
MOV R15,RAX
MOV EBX,EDX
LEA RDI,[RSP + 0x58]
MOV RSI,R14
CALL 0x00193c52
MOV R13,RAX
MOV EBP,EDX
LEA RDI,[RSP + 0xc0]
MOV RSI,R14
CALL 0x00193c52
INC R13
DEC RAX
SHR R12,0x20
NEG R12D
MOV RCX,qword ptr [RSP + 0x30]
MOV dword ptr [RCX],R12D
MOV qword ptr [RSP + 0x48],R15
MOV dword ptr [RSP + 0x50],EBX
MOV qword ptr [RSP + 0x38],RAX
MOV dword ptr [RSP + 0x40],EDX
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [RSP + 0x48]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,RCX
MOV RCX,R13
MOV R8D,EBP
CALL 0x00193cae
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00193a48:
LEA RDI,[0x1bbf57]
LEA RDX,[0x1b5af0]
LEA RCX,[0x1c16f7]
MOV ESI,0x454b
JMP 0x00193a7e
LAB_00193a64:
LEA RDI,[0x1bbf57]
LEA RDX,[0x1b5af0]
LEA RCX,[0x1c170d]
MOV ESI,0x454c
LAB_00193a7e:
XOR EAX,EAX
CALL 0x00124f20
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&,
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2
(int8 param_1,int8 param_2,int *param_3,int8 param_4,int param_5,
int8 param_6,int8 param_7,int param_8,int8 param_9,int param_10)
{
int4 uVar1;
char *pcVar2;
int4 extraout_EDX;
int8 uVar3;
int1 auVar4 [16];
int1 auVar5 [12];
int1 auVar6 [12];
int4 uStack_64;
int8 local_50;
int local_48;
int8 local_40;
int4 local_38;
local_50 = param_4;
local_48 = param_5;
if (param_10 == param_5) {
if (param_8 == param_5) {
auVar4 = get_cached_power_for_binary_exponent(param_5);
local_40 = auVar4._0_8_;
local_38 = auVar4._8_4_;
uVar1 = diyfp::mul((diyfp *)¶m_7,(diyfp *)&local_40);
auVar5 = diyfp::mul((diyfp *)&local_50,(diyfp *)&local_40);
auVar6 = diyfp::mul((diyfp *)¶m_9,(diyfp *)&local_40);
*param_3 = -auVar4._12_4_;
grisu2_digit_gen(param_1,param_2,param_3,auVar5._0_8_ + 1,auVar5._8_4_,param_6,uVar1,
extraout_EDX,auVar6._0_8_ + -1,CONCAT44(uStack_64,auVar6._8_4_));
return;
}
pcVar2 = "m_plus.e == v.e";
uVar3 = 0x454c;
}
else {
pcVar2 = "m_plus.e == m_minus.e";
uVar3 = 0x454b;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
| |
47,128 | my_stat | eloqsql/mysys/my_lib.c | MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags)
{
int m_used;
DBUG_ENTER("my_stat");
DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path,
stat_area, my_flags));
if ((m_used= (stat_area == NULL)))
if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT),
my_flags)))
goto error;
#ifndef _WIN32
if (!stat((char *) path, (struct stat *) stat_area))
{
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(stat_area);
}
#else
if (!my_win_stat(path, stat_area))
DBUG_RETURN(stat_area);
#endif
DBUG_PRINT("error",("Got errno: %d from stat", errno));
my_errno= errno;
if (m_used) /* Free if new area */
my_free(stat_area);
error:
if (my_flags & (MY_FAE+MY_WME))
{
my_error(EE_STAT, MYF(ME_BELL), path, my_errno);
DBUG_RETURN((MY_STAT *) NULL);
}
DBUG_RETURN((MY_STAT *) NULL);
} | O3 | c | my_stat:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %r14
testq %rsi, %rsi
jne 0x2b430
leaq 0x33b31f(%rip), %rax # 0x366738
movl (%rax), %edi
movl $0x90, %esi
movq %r15, %rdx
callq 0x2b4d5
movq %rax, %r14
testq %rax, %rax
je 0x2b45c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24570
testl %eax, %eax
je 0x2b485
callq 0x24050
movl (%rax), %r13d
callq 0x2686a
movl %r13d, (%rax)
testq %r12, %r12
jne 0x2b45c
movq %r14, %rdi
callq 0x2b702
testb $0x18, %r15b
je 0x2b482
callq 0x2686a
movl (%rax), %ecx
xorl %r14d, %r14d
movl $0x4, %esi
movl $0xd, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2ab8f
jmp 0x2b485
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_stat:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov r14, rsi
test rsi, rsi
jnz short loc_2B430
lea rax, key_memory_MY_STAT
mov edi, [rax]
mov esi, 90h
mov rdx, r15
call my_malloc
mov r14, rax
test rax, rax
jz short loc_2B45C
loc_2B430:
mov rdi, rbx
mov rsi, r14
call _stat64
test eax, eax
jz short loc_2B485
call ___errno_location
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r12, r12
jnz short loc_2B45C
mov rdi, r14
call my_free
loc_2B45C:
test r15b, 18h
jz short loc_2B482
call _my_thread_var
mov ecx, [rax]
xor r14d, r14d
mov esi, 4
mov edi, 0Dh
mov rdx, rbx
xor eax, eax
call my_error
jmp short loc_2B485
loc_2B482:
xor r14d, r14d
loc_2B485:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_stat(long long a1, long long a2, long long a3)
{
char v3; // r15
long long v4; // r14
int v5; // r13d
unsigned int *v6; // rax
v3 = a3;
v4 = a2;
if ( a2 || (v4 = my_malloc(key_memory_MY_STAT, 144LL, a3)) != 0 )
{
if ( !(unsigned int)stat64(a1, v4) )
return v4;
v5 = *(_DWORD *)__errno_location(a1, v4);
*(_DWORD *)my_thread_var() = v5;
if ( !a2 )
my_free(v4);
}
if ( (v3 & 0x18) == 0 )
return 0LL;
v6 = (unsigned int *)my_thread_var();
v4 = 0LL;
my_error(0xDu, 4, a1, *v6);
return v4;
}
| my_stat:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R14,RSI
TEST RSI,RSI
JNZ 0x0012b430
LEA RAX,[0x466738]
MOV EDI,dword ptr [RAX]
MOV ESI,0x90
MOV RDX,R15
CALL 0x0012b4d5
MOV R14,RAX
TEST RAX,RAX
JZ 0x0012b45c
LAB_0012b430:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00124570
TEST EAX,EAX
JZ 0x0012b485
CALL 0x00124050
MOV R13D,dword ptr [RAX]
CALL 0x0012686a
MOV dword ptr [RAX],R13D
TEST R12,R12
JNZ 0x0012b45c
MOV RDI,R14
CALL 0x0012b702
LAB_0012b45c:
TEST R15B,0x18
JZ 0x0012b482
CALL 0x0012686a
MOV ECX,dword ptr [RAX]
XOR R14D,R14D
MOV ESI,0x4
MOV EDI,0xd
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0012ab8f
JMP 0x0012b485
LAB_0012b482:
XOR R14D,R14D
LAB_0012b485:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3)
{
int iVar1;
stat64 *__buf;
int *piVar2;
int4 *puVar3;
__buf = param_2;
if ((param_2 != (stat64 *)0x0) ||
(__buf = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), __buf != (stat64 *)0x0)) {
iVar1 = stat64(param_1,__buf);
if (iVar1 == 0) {
return __buf;
}
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if (param_2 == (stat64 *)0x0) {
my_free(__buf);
}
}
if ((param_3 & 0x18) != 0) {
puVar3 = (int4 *)_my_thread_var();
my_error(0xd,4,param_1,*puVar3);
}
return (stat64 *)0x0;
}
| |
47,129 | my_rw_wrlock | eloqsql/mysys/thr_rwlock.c | int my_rw_wrlock(my_rw_lock_t *rwp)
{
pthread_mutex_lock(&rwp->lock);
rwp->waiters++; /* another writer queued */
my_rw_lock_assert_not_write_owner(rwp);
while (rwp->state)
pthread_cond_wait(&rwp->writers, &rwp->lock);
rwp->state = -1;
rwp->waiters--;
#ifdef SAFE_MUTEX
rwp->write_thread= pthread_self();
#endif
pthread_mutex_unlock(&rwp->lock);
return(0);
} | O3 | c | my_rw_wrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x29200
movl 0x8c(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbx)
cmpl $0x0, 0x88(%rbx)
je 0xa4578
leaq 0x58(%rbx), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29420
cmpl $0x0, 0x88(%rbx)
jne 0xa455c
movl 0x8c(%rbx), %eax
decl %eax
movl $0xffffffff, 0x88(%rbx) # imm = 0xFFFFFFFF
movl %eax, 0x8c(%rbx)
movq %rbx, %rdi
callq 0x291c0
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| my_rw_wrlock:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call _pthread_mutex_lock
mov eax, [rbx+8Ch]
lea ecx, [rax+1]
mov [rbx+8Ch], ecx
cmp dword ptr [rbx+88h], 0
jz short loc_A4578
lea r14, [rbx+58h]
loc_A455C:
mov rdi, r14
mov rsi, rbx
call _pthread_cond_wait
cmp dword ptr [rbx+88h], 0
jnz short loc_A455C
mov eax, [rbx+8Ch]
dec eax
loc_A4578:
mov dword ptr [rbx+88h], 0FFFFFFFFh
mov [rbx+8Ch], eax
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
pop rbx
pop r14
pop rbp
retn
| long long my_rw_wrlock(long long a1)
{
int v1; // eax
pthread_mutex_lock(a1);
v1 = *(_DWORD *)(a1 + 140);
*(_DWORD *)(a1 + 140) = v1 + 1;
if ( *(_DWORD *)(a1 + 136) )
{
do
pthread_cond_wait(a1 + 88, a1);
while ( *(_DWORD *)(a1 + 136) );
v1 = *(_DWORD *)(a1 + 140) - 1;
}
*(_DWORD *)(a1 + 136) = -1;
*(_DWORD *)(a1 + 140) = v1;
pthread_mutex_unlock(a1);
return 0LL;
}
| my_rw_wrlock:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x00129200
MOV EAX,dword ptr [RBX + 0x8c]
LEA ECX,[RAX + 0x1]
MOV dword ptr [RBX + 0x8c],ECX
CMP dword ptr [RBX + 0x88],0x0
JZ 0x001a4578
LEA R14,[RBX + 0x58]
LAB_001a455c:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00129420
CMP dword ptr [RBX + 0x88],0x0
JNZ 0x001a455c
MOV EAX,dword ptr [RBX + 0x8c]
DEC EAX
LAB_001a4578:
MOV dword ptr [RBX + 0x88],0xffffffff
MOV dword ptr [RBX + 0x8c],EAX
MOV RDI,RBX
CALL 0x001291c0
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 my_rw_wrlock(pthread_mutex_t *param_1)
{
int iVar1;
pthread_mutex_lock(param_1);
iVar1 = *(int *)((long)param_1 + 0x8c);
*(int *)((long)param_1 + 0x8c) = iVar1 + 1;
if (*(int *)((long)param_1 + 0x88) != 0) {
do {
pthread_cond_wait((pthread_cond_t *)((long)param_1 + 0x58),param_1);
} while (*(int *)((long)param_1 + 0x88) != 0);
iVar1 = *(int *)((long)param_1 + 0x8c) + -1;
}
*(int4 *)((long)param_1 + 0x88) = 0xffffffff;
*(int *)((long)param_1 + 0x8c) = iVar1;
pthread_mutex_unlock(param_1);
return 0;
}
| |
47,130 | my_snprintf_8bit | eloqsql/strings/ctype-simple.c | size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n __attribute__((unused)),
const char* fmt, ...)
{
va_list args;
size_t result;
va_start(args,fmt);
result= my_vsnprintf(to, n, fmt, args);
va_end(args);
return result;
} | O3 | c | my_snprintf_8bit:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rsi, %rdi
leaq -0xd0(%rbp), %rsi
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0xb5069
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
leaq -0x20(%rbp), %rax
movq %rsi, 0x10(%rax)
leaq 0x10(%rbp), %rsi
movq %rsi, 0x8(%rax)
movabsq $0x3000000020, %rsi # imm = 0x3000000020
movq %rsi, (%rax)
movq %rdx, %rsi
movq %rcx, %rdx
movq %rax, %rcx
callq 0xd6d1d
addq $0xd0, %rsp
popq %rbp
retq
| my_snprintf_8bit:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov rdi, rsi
lea rsi, [rbp+var_D0]
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_B5069
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm1
movaps [rbp+var_80], xmm2
movaps [rbp+var_70], xmm3
movaps [rbp+var_60], xmm4
movaps [rbp+var_50], xmm5
movaps [rbp+var_40], xmm6
movaps [rbp+var_30], xmm7
loc_B5069:
lea rax, [rbp+var_20]
mov [rax+10h], rsi
lea rsi, [rbp+arg_0]
mov [rax+8], rsi
mov rsi, 3000000020h
mov [rax], rsi
mov rsi, rdx
mov rdx, rcx
mov rcx, rax
call my_vsnprintf
add rsp, 0D0h
pop rbp
retn
| long long my_snprintf_8bit(
__m128 a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
long long a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14,
char a15)
{
char v16; // [rsp+0h] [rbp-D0h] BYREF
long long v17; // [rsp+20h] [rbp-B0h]
long long v18; // [rsp+28h] [rbp-A8h]
__m128 v19; // [rsp+30h] [rbp-A0h]
__m128 v20; // [rsp+40h] [rbp-90h]
__m128 v21; // [rsp+50h] [rbp-80h]
__m128 v22; // [rsp+60h] [rbp-70h]
__m128 v23; // [rsp+70h] [rbp-60h]
__m128 v24; // [rsp+80h] [rbp-50h]
__m128 v25; // [rsp+90h] [rbp-40h]
__m128 v26; // [rsp+A0h] [rbp-30h]
long long v27; // [rsp+B0h] [rbp-20h]
char *v28; // [rsp+B8h] [rbp-18h]
char *v29; // [rsp+C0h] [rbp-10h]
v19 = a1;
v20 = a2;
v21 = a3;
v22 = a4;
v23 = a5;
v24 = a6;
v25 = a7;
v26 = a8;
v17 = a13;
v18 = a14;
v29 = &v16;
v28 = &a15;
v27 = 0x3000000020LL;
return my_vsnprintf(a10, a11, a12);
}
| my_snprintf_8bit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV RDI,RSI
LEA RSI,[RBP + -0xd0]
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x001b5069
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM1
MOVAPS xmmword ptr [RBP + -0x80],XMM2
MOVAPS xmmword ptr [RBP + -0x70],XMM3
MOVAPS xmmword ptr [RBP + -0x60],XMM4
MOVAPS xmmword ptr [RBP + -0x50],XMM5
MOVAPS xmmword ptr [RBP + -0x40],XMM6
MOVAPS xmmword ptr [RBP + -0x30],XMM7
LAB_001b5069:
LEA RAX,[RBP + -0x20]
MOV qword ptr [RAX + 0x10],RSI
LEA RSI,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RSI
MOV RSI,0x3000000020
MOV qword ptr [RAX],RSI
MOV RSI,RDX
MOV RDX,RCX
MOV RCX,RAX
CALL 0x001d6d1d
ADD RSP,0xd0
POP RBP
RET
|
void my_snprintf_8bit(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 local_d8 [32];
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int8 local_28;
int1 *local_20;
int1 *local_18;
local_18 = local_d8;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
local_20 = &stack0x00000008;
local_28 = 0x3000000020;
local_b8 = param_13;
local_b0 = param_14;
my_vsnprintf(param_10,param_11,param_12,&local_28);
return;
}
| |
47,131 | minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/./minja.hpp | SetTemplateNode(const Location & location, const std::string & name, std::shared_ptr<TemplateNode> && tv)
: TemplateNode(location), name(name), template_value(std::move(tv)) {} | O3 | cpp | minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdi, %rbx
leaq 0x8cca8(%rip), %r15 # 0xeefe8
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x6236c
movq 0x8dc42(%rip), %rcx # 0xeffa0
cmpb $0x0, (%rcx)
je 0x62368
incl 0x8(%rax)
jmp 0x6236c
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x8d06d(%rip), %rax # 0xef3e8
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
callq 0x2bdf8
xorl %eax, %eax
movq %rax, 0x48(%rbx)
movups (%r14), %xmm0
movq %rax, 0x8(%r14)
movups %xmm0, 0x40(%rbx)
movq %rax, (%r14)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x623c8
callq 0x2f80e
movq %r14, %rdi
callq 0x18b90
| _ZN5minja15SetTemplateNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOSt10shared_ptrINS_12TemplateNodeEE:
push r15
push r14
push rbx
mov r14, rcx
mov rbx, rdi
lea r15, off_EEFE8
mov [rdi], r15
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_6236C
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_62368
inc dword ptr [rax+8]
jmp short loc_6236C
loc_62368:
lock inc dword ptr [rax+8]
loc_6236C:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, off_EF3E8
mov [rbx], rax
lea rdi, [rbx+20h]
lea rax, [rbx+30h]
mov [rbx+20h], rax
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
xor eax, eax
mov [rbx+48h], rax
movups xmm0, xmmword ptr [r14]
mov [r14+8], rax
movups xmmword ptr [rbx+40h], xmm0
mov [r14], rax
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_623C8
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_623C8:
mov rdi, r14
call __Unwind_Resume
| long long minja::SetTemplateNode::SetTemplateNode(long long a1, _QWORD *a2, long long a3, __int128 *a4)
{
long long v5; // rax
long long result; // rax
__int128 v7; // xmm0
*(_QWORD *)a1 = &off_EEFE8;
*(_QWORD *)(a1 + 8) = *a2;
v5 = a2[1];
*(_QWORD *)(a1 + 16) = v5;
if ( v5 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v5 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &off_EF3E8;
*(_QWORD *)(a1 + 32) = a1 + 48;
std::string::_M_construct<char *>(a1 + 32, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
result = 0LL;
*(_QWORD *)(a1 + 72) = 0LL;
v7 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 64) = v7;
*(_QWORD *)a4 = 0LL;
return result;
}
| SetTemplateNode:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RCX
MOV RBX,RDI
LEA R15,[0x1eefe8]
MOV qword ptr [RDI],R15
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0016236c
MOV RCX,qword ptr [0x001effa0]
CMP byte ptr [RCX],0x0
JZ 0x00162368
INC dword ptr [RAX + 0x8]
JMP 0x0016236c
LAB_00162368:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0016236c:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x1ef3e8]
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LEA RAX,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RAX
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
LAB_00162394:
CALL 0x0012bdf8
LAB_00162399:
XOR EAX,EAX
MOV qword ptr [RBX + 0x48],RAX
MOVUPS XMM0,xmmword ptr [R14]
MOV qword ptr [R14 + 0x8],RAX
MOVUPS xmmword ptr [RBX + 0x40],XMM0
MOV qword ptr [R14],RAX
POP RBX
POP R14
POP R15
RET
|
/* minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::string const&,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::SetTemplateNode::SetTemplateNode
(SetTemplateNode *this,Location *param_1,string *param_2,shared_ptr *param_3)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_001eefe8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_001ef3e8;
*(SetTemplateNode **)(this + 0x20) = this + 0x30;
/* try { // try from 00162394 to 00162398 has its CatchHandler @ 001623b4 */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
*(int8 *)(this + 0x48) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x40) = *(int8 *)param_3;
*(int8 *)(this + 0x48) = uVar2;
*(int8 *)param_3 = 0;
return;
}
| |
47,132 | ac_psr_sequence | alca/libalca/parser.c | ac_statement *ac_psr_sequence(ac_parser *parser)
{
ac_statement *seq = NULL;
uint32_t maxSpan = 0;
if (!ac_psr_consume(parser, TOKEN_IDENTIFIER, ERROR_UNEXPECTED_TOKEN, "expected sequence identifier"))
return NULL;
ac_token *id = ac_psr_previous_token(parser);
// optional maxSpan (if none or 0 specified, do not do a maxSpan check in VM)
if (ac_psr_check(parser, TOKEN_COLON))
{
ac_psr_advance(parser);
if (!ac_psr_consume(parser, TOKEN_NUMBER, ERROR_UNEXPECTED_TOKEN, "expected number"))
return NULL;
maxSpan = *(uint32_t *) ac_psr_previous_token(parser)->value;
const char *unit_error = "expected time unit (s = seconds, m = minutes)";
if (!ac_psr_consume(parser, TOKEN_IDENTIFIER, ERROR_UNEXPECTED_TOKEN, unit_error))
return NULL;
ac_token *unit = ac_psr_previous_token(parser);
char *uval = ac_psr_previous_token(parser)->value;
if (strlen(uval) != 1 || (uval[0] != 's' && uval[0] != 'm')) // require verbosity with seconds (must have 's')
{
ac_psr_set_error(parser, unit, ERROR_UNEXPECTED_TOKEN, unit_error);
return NULL;
}
if (*uval == 'm')
maxSpan *= SPAN_MINUTE;
}
if (!ac_psr_consume(parser, TOKEN_LBRACKET, ERROR_UNEXPECTED_TOKEN, "expected '['"))
return NULL;
seq = ac_expr_new_sequence(id, maxSpan);
// accept rule body '{', scope indicator ':', or rule identifier only. Identifier is checked for type later.
while (ac_psr_check(parser, TOKEN_IDENTIFIER) || ac_psr_check(parser, TOKEN_LBRACE) || ac_psr_check(
parser, TOKEN_COLON))
{
ac_statement *rule = NULL;
int isExternRule = FALSE;
if (ac_psr_check(parser, TOKEN_IDENTIFIER))
isExternRule = TRUE;
if (!isExternRule)
{
ac_token *event_type = NULL;
ac_token *ph = ac_psr_current_token(parser);
if (MATCH(parser, TOKEN_COLON))
{
if (!ac_psr_consume(parser, TOKEN_IDENTIFIER, ERROR_UNEXPECTED_TOKEN, "expected event type"))
{
ac_expr_free_sequence(seq);
return NULL;
}
event_type = ac_psr_previous_token(parser);
}
ac_expr *cond = ac_psr_rule_body(parser);
if (!cond)
{
ac_expr_free_sequence(seq);
return NULL;
}
// create with token for debugging
rule = ac_expr_new_rule(ph, event_type, cond, isExternRule, TRUE);
} else
{
ac_token *name = ac_psr_advance(parser);
rule = ac_expr_new_rule(name, NULL, NULL, isExternRule, TRUE);
}
ac_expr_sequence_append_rule(seq, rule);
MATCH(parser, TOKEN_COMMA); // advance if comma
}
if (!ac_psr_consume(parser,
TOKEN_RBRACKET,
ERROR_INVALID_SYNTAX,
"invalid syntax"))
{
ac_expr_free_sequence(seq);
return NULL;
}
return seq;
} | O0 | c | ac_psr_sequence:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movl $0x29, %esi
movl $0x3, %edx
leaq 0x53873(%rip), %rcx # 0x5e636
callq 0x7440
cmpq $0x0, %rax
jne 0xaddb
movq $0x0, -0x8(%rbp)
jmp 0xb108
movq -0x10(%rbp), %rdi
callq 0x7370
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl $0x13, %esi
callq 0x75f0
cmpl $0x0, %eax
je 0xaef9
movq -0x10(%rbp), %rdi
callq 0x7d20
movq -0x10(%rbp), %rdi
movl $0x26, %esi
movl $0x3, %edx
leaq 0x53836(%rip), %rcx # 0x5e653
callq 0x7440
cmpq $0x0, %rax
jne 0xae35
movq $0x0, -0x8(%rbp)
jmp 0xb108
movq -0x10(%rbp), %rdi
callq 0x7370
movq 0x8(%rax), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
leaq 0x53815(%rip), %rax # 0x5e663
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rcx
movl $0x29, %esi
movl $0x3, %edx
callq 0x7440
cmpq $0x0, %rax
jne 0xae7c
movq $0x0, -0x8(%rbp)
jmp 0xb108
movq -0x10(%rbp), %rdi
callq 0x7370
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7370
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x7400
cmpq $0x1, %rax
jne 0xaec1
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x73, %eax
je 0xaee4
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x6d, %eax
je 0xaee4
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rcx
movl $0x3, %edx
callq 0x72e0
movq $0x0, -0x8(%rbp)
jmp 0xb108
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x6d, %eax
jne 0xaef7
imull $0x3c, -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0xaef9
movq -0x10(%rbp), %rdi
movl $0x5, %esi
movl $0x3, %edx
leaq 0x53783(%rip), %rcx # 0x5e691
callq 0x7440
cmpq $0x0, %rax
jne 0xaf26
movq $0x0, -0x8(%rbp)
jmp 0xb108
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x7740
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x29, %esi
callq 0x75f0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x71(%rbp)
jne 0xaf81
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x75f0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x71(%rbp)
jne 0xaf81
movq -0x10(%rbp), %rdi
movl $0x13, %esi
callq 0x75f0
cmpl $0x0, %eax
setne %al
movb %al, -0x71(%rbp)
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0xaf8d
jmp 0xb0cd
movq $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x10(%rbp), %rdi
movl $0x29, %esi
callq 0x75f0
cmpl $0x0, %eax
je 0xafb6
movl $0x1, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
jne 0xb07c
movq $0x0, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7cc0
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movl $0x13, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movb $0x0, %al
callq 0x7700
cmpl $0x0, %eax
je 0xb032
movq -0x10(%rbp), %rdi
movl $0x29, %esi
movl $0x3, %edx
leaq 0x5361e(%rip), %rcx # 0x5e622
callq 0x7440
cmpq $0x0, %rax
jne 0xb025
movq -0x18(%rbp), %rdi
callq 0x7a50
movq $0x0, -0x8(%rbp)
jmp 0xb108
movq -0x10(%rbp), %rdi
callq 0x7370
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7bd0
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0xb05c
movq -0x18(%rbp), %rdi
callq 0x7a50
movq $0x0, -0x8(%rbp)
jmp 0xb108
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x68(%rbp), %rdx
movl -0x4c(%rbp), %ecx
movl $0x1, %r8d
callq 0x7d10
movq %rax, -0x48(%rbp)
jmp 0xb0a6
movq -0x10(%rbp), %rdi
callq 0x7d20
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movl -0x4c(%rbp), %ecx
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %r8d
movq %rdx, %rsi
callq 0x7d10
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x7cf0
movq -0x10(%rbp), %rdi
movl $0x7, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movb $0x0, %al
callq 0x7700
jmp 0xaf36
movq -0x10(%rbp), %rdi
movl $0x6, %esi
movl $0x2, %edx
leaq 0x53421(%rip), %rcx # 0x5e503
callq 0x7440
cmpq $0x0, %rax
jne 0xb100
movq -0x18(%rbp), %rdi
callq 0x7a50
movq $0x0, -0x8(%rbp)
jmp 0xb108
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ac_psr_sequence:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_18], 0
mov [rbp+var_1C], 0
mov rdi, [rbp+var_10]
mov esi, 29h ; ')'
mov edx, 3
lea rcx, aExpectedSequen; "expected sequence identifier"
call _ac_psr_consume
cmp rax, 0
jnz short loc_ADDB
mov [rbp+var_8], 0
jmp loc_B108
loc_ADDB:
mov rdi, [rbp+var_10]
call _ac_psr_previous_token
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
mov esi, 13h
call _ac_psr_check
cmp eax, 0
jz loc_AEF9
mov rdi, [rbp+var_10]
call _ac_psr_advance
mov rdi, [rbp+var_10]
mov esi, 26h ; '&'
mov edx, 3
lea rcx, aExpectedNumber_0; "expected number"
call _ac_psr_consume
cmp rax, 0
jnz short loc_AE35
mov [rbp+var_8], 0
jmp loc_B108
loc_AE35:
mov rdi, [rbp+var_10]
call _ac_psr_previous_token
mov rax, [rax+8]
mov eax, [rax]
mov [rbp+var_1C], eax
lea rax, aExpectedTimeUn; "expected time unit (s = seconds, m = mi"...
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
mov rcx, [rbp+var_30]
mov esi, 29h ; ')'
mov edx, 3
call _ac_psr_consume
cmp rax, 0
jnz short loc_AE7C
mov [rbp+var_8], 0
jmp loc_B108
loc_AE7C:
mov rdi, [rbp+var_10]
call _ac_psr_previous_token
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
call _ac_psr_previous_token
mov rax, [rax+8]
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
call _strlen
cmp rax, 1
jnz short loc_AEC1
mov rax, [rbp+var_40]
movsx eax, byte ptr [rax]
cmp eax, 73h ; 's'
jz short loc_AEE4
mov rax, [rbp+var_40]
movsx eax, byte ptr [rax]
cmp eax, 6Dh ; 'm'
jz short loc_AEE4
loc_AEC1:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov rcx, [rbp+var_30]
mov edx, 3
call _ac_psr_set_error
mov [rbp+var_8], 0
jmp loc_B108
loc_AEE4:
mov rax, [rbp+var_40]
movsx eax, byte ptr [rax]
cmp eax, 6Dh ; 'm'
jnz short loc_AEF7
imul eax, [rbp+var_1C], 3Ch ; '<'
mov [rbp+var_1C], eax
loc_AEF7:
jmp short $+2
loc_AEF9:
mov rdi, [rbp+var_10]
mov esi, 5
mov edx, 3
lea rcx, aExpected_3; "expected '['"
call _ac_psr_consume
cmp rax, 0
jnz short loc_AF26
mov [rbp+var_8], 0
jmp loc_B108
loc_AF26:
mov rdi, [rbp+var_28]
mov esi, [rbp+var_1C]
call _ac_expr_new_sequence
mov [rbp+var_18], rax
loc_AF36:
mov rdi, [rbp+var_10]
mov esi, 29h ; ')'
call _ac_psr_check
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_71], al
jnz short loc_AF81
mov rdi, [rbp+var_10]
mov esi, 2
call _ac_psr_check
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_71], al
jnz short loc_AF81
mov rdi, [rbp+var_10]
mov esi, 13h
call _ac_psr_check
cmp eax, 0
setnz al
mov [rbp+var_71], al
loc_AF81:
mov al, [rbp+var_71]
test al, 1
jnz short loc_AF8D
jmp loc_B0CD
loc_AF8D:
mov [rbp+var_48], 0
mov [rbp+var_4C], 0
mov rdi, [rbp+var_10]
mov esi, 29h ; ')'
call _ac_psr_check
cmp eax, 0
jz short loc_AFB6
mov [rbp+var_4C], 1
loc_AFB6:
cmp [rbp+var_4C], 0
jnz loc_B07C
mov [rbp+var_58], 0
mov rdi, [rbp+var_10]
call _ac_psr_current_token
mov [rbp+var_60], rax
mov rdi, [rbp+var_10]
mov esi, 13h
mov edx, 0FFFFFFFFh
mov al, 0
call _ac_psr_match
cmp eax, 0
jz short loc_B032
mov rdi, [rbp+var_10]
mov esi, 29h ; ')'
mov edx, 3
lea rcx, aExpectedEventT; "expected event type"
call _ac_psr_consume
cmp rax, 0
jnz short loc_B025
mov rdi, [rbp+var_18]
call _ac_expr_free_sequence
mov [rbp+var_8], 0
jmp loc_B108
loc_B025:
mov rdi, [rbp+var_10]
call _ac_psr_previous_token
mov [rbp+var_58], rax
loc_B032:
mov rdi, [rbp+var_10]
call _ac_psr_rule_body
mov [rbp+var_68], rax
cmp [rbp+var_68], 0
jnz short loc_B05C
mov rdi, [rbp+var_18]
call _ac_expr_free_sequence
mov [rbp+var_8], 0
jmp loc_B108
loc_B05C:
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_68]
mov ecx, [rbp+var_4C]
mov r8d, 1
call _ac_expr_new_rule
mov [rbp+var_48], rax
jmp short loc_B0A6
loc_B07C:
mov rdi, [rbp+var_10]
call _ac_psr_advance
mov [rbp+var_70], rax
mov rdi, [rbp+var_70]
mov ecx, [rbp+var_4C]
xor eax, eax
mov edx, eax
mov r8d, 1
mov rsi, rdx
call _ac_expr_new_rule
mov [rbp+var_48], rax
loc_B0A6:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_48]
call _ac_expr_sequence_append_rule
mov rdi, [rbp+var_10]
mov esi, 7
mov edx, 0FFFFFFFFh
mov al, 0
call _ac_psr_match
jmp loc_AF36
loc_B0CD:
mov rdi, [rbp+var_10]
mov esi, 6
mov edx, 2
lea rcx, aInvalidSyntax; "invalid syntax"
call _ac_psr_consume
cmp rax, 0
jnz short loc_B100
mov rdi, [rbp+var_18]
call _ac_expr_free_sequence
mov [rbp+var_8], 0
jmp short loc_B108
loc_B100:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_B108:
mov rax, [rbp+var_8]
add rsp, 80h
pop rbp
retn
| long long ac_psr_sequence(
const char **a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9)
{
long long v9; // rcx
long long v10; // r8
long long v11; // r9
__m128 v12; // xmm4
__m128 v13; // xmm5
long long v14; // rcx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
char v20; // [rsp+0h] [rbp-80h]
bool v21; // [rsp+Fh] [rbp-71h]
long long v22; // [rsp+10h] [rbp-70h]
long long v23; // [rsp+18h] [rbp-68h]
long long v24; // [rsp+20h] [rbp-60h]
long long v25; // [rsp+28h] [rbp-58h]
_BOOL8 v26; // [rsp+34h] [rbp-4Ch]
long long v27; // [rsp+38h] [rbp-48h]
long long v28; // [rsp+38h] [rbp-48h]
_BYTE *v29; // [rsp+40h] [rbp-40h]
long long v30; // [rsp+48h] [rbp-38h]
long long v31; // [rsp+58h] [rbp-28h]
unsigned int v32; // [rsp+64h] [rbp-1Ch]
long long v33; // [rsp+68h] [rbp-18h]
v32 = 0;
if ( !ac_psr_consume(a1, 41, 3, "expected sequence identifier") )
return 0LL;
v31 = ac_psr_previous_token((long long)a1);
if ( ac_psr_check((long long)a1, 19) )
{
ac_psr_advance((long long)a1);
if ( !ac_psr_consume(a1, 38, 3, "expected number") )
return 0LL;
v32 = **(_DWORD **)(ac_psr_previous_token((long long)a1) + 8);
if ( !ac_psr_consume(a1, 41, 3, "expected time unit (s = seconds, m = minutes)") )
return 0LL;
v30 = ac_psr_previous_token((long long)a1);
v29 = *(_BYTE **)(ac_psr_previous_token((long long)a1) + 8);
if ( strlen(v29) != 1 || *v29 != 115 && *v29 != 109 )
{
ac_psr_set_error(a1, v30, 3, "expected time unit (s = seconds, m = minutes)");
return 0LL;
}
if ( *v29 == 109 )
v32 *= 60;
}
if ( !ac_psr_consume(a1, 5, 3, "expected '['") )
return 0LL;
v33 = ac_expr_new_sequence(v31, v32);
while ( 1 )
{
v21 = 1;
if ( !ac_psr_check((long long)a1, 41) )
{
v21 = 1;
if ( !ac_psr_check((long long)a1, 2) )
v21 = ac_psr_check((long long)a1, 19);
}
if ( !v21 )
break;
v26 = ac_psr_check((long long)a1, 41);
if ( v26 )
{
v22 = ac_psr_advance((long long)a1);
v28 = ac_expr_new_rule(v22, 0LL, 0LL, v26, 1LL);
*(double *)a2.m128_u64 = ac_expr_sequence_append_rule(v33, v28);
}
else
{
v25 = 0LL;
v24 = ac_psr_current_token((long long)a1);
if ( (unsigned int)ac_psr_match(
(long long)a1,
19LL,
0xFFFFFFFFLL,
v9,
v10,
v11,
a2,
a3,
a4,
a5,
v12,
v13,
a8,
a9,
v20) )
{
if ( !ac_psr_consume(a1, 41, 3, "expected event type") )
goto LABEL_27;
v25 = ac_psr_previous_token((long long)a1);
}
v23 = ac_psr_rule_body(a1);
if ( !v23 )
goto LABEL_27;
v27 = ac_expr_new_rule(v24, v25, v23, 0LL, 1LL);
*(double *)a2.m128_u64 = ac_expr_sequence_append_rule(v33, v27);
}
ac_psr_match((long long)a1, 7LL, 0xFFFFFFFFLL, v14, v15, v16, a2, a3, a4, a5, v17, v18, a8, a9, v20);
}
if ( !ac_psr_consume(a1, 6, 2, "invalid syntax") )
{
LABEL_27:
ac_expr_free_sequence(v33);
return 0LL;
}
return v33;
}
| ac_psr_sequence:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x1c],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x29
MOV EDX,0x3
LEA RCX,[0x15e636]
CALL 0x00107440
CMP RAX,0x0
JNZ 0x0010addb
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010b108
LAB_0010addb:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00107370
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x13
CALL 0x001075f0
CMP EAX,0x0
JZ 0x0010aef9
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00107d20
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x26
MOV EDX,0x3
LEA RCX,[0x15e653]
CALL 0x00107440
CMP RAX,0x0
JNZ 0x0010ae35
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010b108
LAB_0010ae35:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00107370
MOV RAX,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x1c],EAX
LEA RAX,[0x15e663]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x30]
MOV ESI,0x29
MOV EDX,0x3
CALL 0x00107440
CMP RAX,0x0
JNZ 0x0010ae7c
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010b108
LAB_0010ae7c:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00107370
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00107370
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00107400
CMP RAX,0x1
JNZ 0x0010aec1
MOV RAX,qword ptr [RBP + -0x40]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x73
JZ 0x0010aee4
MOV RAX,qword ptr [RBP + -0x40]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x6d
JZ 0x0010aee4
LAB_0010aec1:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x30]
MOV EDX,0x3
CALL 0x001072e0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010b108
LAB_0010aee4:
MOV RAX,qword ptr [RBP + -0x40]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x6d
JNZ 0x0010aef7
IMUL EAX,dword ptr [RBP + -0x1c],0x3c
MOV dword ptr [RBP + -0x1c],EAX
LAB_0010aef7:
JMP 0x0010aef9
LAB_0010aef9:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x5
MOV EDX,0x3
LEA RCX,[0x15e691]
CALL 0x00107440
CMP RAX,0x0
JNZ 0x0010af26
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010b108
LAB_0010af26:
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0x1c]
CALL 0x00107740
MOV qword ptr [RBP + -0x18],RAX
LAB_0010af36:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x29
CALL 0x001075f0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x71],AL
JNZ 0x0010af81
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x2
CALL 0x001075f0
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x71],AL
JNZ 0x0010af81
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x13
CALL 0x001075f0
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x71],AL
LAB_0010af81:
MOV AL,byte ptr [RBP + -0x71]
TEST AL,0x1
JNZ 0x0010af8d
JMP 0x0010b0cd
LAB_0010af8d:
MOV qword ptr [RBP + -0x48],0x0
MOV dword ptr [RBP + -0x4c],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x29
CALL 0x001075f0
CMP EAX,0x0
JZ 0x0010afb6
MOV dword ptr [RBP + -0x4c],0x1
LAB_0010afb6:
CMP dword ptr [RBP + -0x4c],0x0
JNZ 0x0010b07c
MOV qword ptr [RBP + -0x58],0x0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00107cc0
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x13
MOV EDX,0xffffffff
MOV AL,0x0
CALL 0x00107700
CMP EAX,0x0
JZ 0x0010b032
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x29
MOV EDX,0x3
LEA RCX,[0x15e622]
CALL 0x00107440
CMP RAX,0x0
JNZ 0x0010b025
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00107a50
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010b108
LAB_0010b025:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00107370
MOV qword ptr [RBP + -0x58],RAX
LAB_0010b032:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00107bd0
MOV qword ptr [RBP + -0x68],RAX
CMP qword ptr [RBP + -0x68],0x0
JNZ 0x0010b05c
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00107a50
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010b108
LAB_0010b05c:
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x68]
MOV ECX,dword ptr [RBP + -0x4c]
MOV R8D,0x1
CALL 0x00107d10
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0010b0a6
LAB_0010b07c:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00107d20
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x70]
MOV ECX,dword ptr [RBP + -0x4c]
XOR EAX,EAX
MOV EDX,EAX
MOV R8D,0x1
MOV RSI,RDX
CALL 0x00107d10
MOV qword ptr [RBP + -0x48],RAX
LAB_0010b0a6:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x48]
CALL 0x00107cf0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x7
MOV EDX,0xffffffff
MOV AL,0x0
CALL 0x00107700
JMP 0x0010af36
LAB_0010b0cd:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x6
MOV EDX,0x2
LEA RCX,[0x15e503]
CALL 0x00107440
CMP RAX,0x0
JNZ 0x0010b100
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00107a50
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010b108
LAB_0010b100:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_0010b108:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x80
POP RBP
RET
|
int8 ac_psr_sequence(int8 param_1)
{
char *__s;
int iVar1;
long lVar2;
int8 uVar3;
int8 uVar4;
size_t sVar5;
bool bVar6;
int8 local_60;
int8 local_50;
int local_24;
local_24 = 0;
lVar2 = ac_psr_consume(param_1,0x29,3,"expected sequence identifier");
if (lVar2 == 0) {
return 0;
}
uVar3 = ac_psr_previous_token(param_1);
iVar1 = ac_psr_check(param_1,0x13);
if (iVar1 != 0) {
ac_psr_advance(param_1);
lVar2 = ac_psr_consume(param_1,0x26,3,"expected number");
if (lVar2 == 0) {
return 0;
}
lVar2 = ac_psr_previous_token(param_1);
local_24 = **(int **)(lVar2 + 8);
lVar2 = ac_psr_consume(param_1,0x29,3,"expected time unit (s = seconds, m = minutes)");
if (lVar2 == 0) {
return 0;
}
uVar4 = ac_psr_previous_token(param_1);
lVar2 = ac_psr_previous_token(param_1);
__s = *(char **)(lVar2 + 8);
sVar5 = strlen(__s);
if ((sVar5 != 1) || ((*__s != 's' && (*__s != 'm')))) {
ac_psr_set_error(param_1,uVar4,3,"expected time unit (s = seconds, m = minutes)");
return 0;
}
if (*__s == 'm') {
local_24 = local_24 * 0x3c;
}
}
lVar2 = ac_psr_consume(param_1,5,3,"expected \'[\'");
if (lVar2 == 0) {
return 0;
}
uVar3 = ac_expr_new_sequence(uVar3,local_24);
do {
iVar1 = ac_psr_check(param_1,0x29);
bVar6 = true;
if (iVar1 == 0) {
iVar1 = ac_psr_check(param_1,2);
bVar6 = true;
if (iVar1 == 0) {
iVar1 = ac_psr_check(param_1,0x13);
bVar6 = iVar1 != 0;
}
}
if (!bVar6) {
lVar2 = ac_psr_consume(param_1,6,2,"invalid syntax");
if (lVar2 != 0) {
return uVar3;
}
ac_expr_free_sequence(uVar3);
return 0;
}
iVar1 = ac_psr_check(param_1,0x29);
if (iVar1 != 0) {
uVar4 = ac_psr_advance(param_1);
local_50 = ac_expr_new_rule(uVar4,0,0,iVar1 != 0,1);
}
else {
local_60 = 0;
uVar4 = ac_psr_current_token(param_1);
iVar1 = ac_psr_match(param_1,0x13,0xffffffff);
if (iVar1 != 0) {
lVar2 = ac_psr_consume(param_1,0x29,3,"expected event type");
if (lVar2 == 0) {
ac_expr_free_sequence(uVar3);
return 0;
}
local_60 = ac_psr_previous_token(param_1);
}
lVar2 = ac_psr_rule_body(param_1);
if (lVar2 == 0) {
ac_expr_free_sequence(uVar3);
return 0;
}
local_50 = ac_expr_new_rule(uVar4,local_60,lVar2,0,1);
}
ac_expr_sequence_append_rule(uVar3,local_50);
ac_psr_match(param_1,7,0xffffffff);
} while( true );
}
| |
47,133 | google::protobuf::FileDescriptorProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | void FileDescriptorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
auto* const _this = static_cast<FileDescriptorProto*>(&to_msg);
auto& from = static_cast<const FileDescriptorProto&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FileDescriptorProto)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.dependency_.MergeFrom(from._impl_.dependency_);
_this->_impl_.message_type_.MergeFrom(from._impl_.message_type_);
_this->_impl_.enum_type_.MergeFrom(from._impl_.enum_type_);
_this->_impl_.service_.MergeFrom(from._impl_.service_);
_this->_impl_.extension_.MergeFrom(from._impl_.extension_);
_this->_impl_.public_dependency_.MergeFrom(from._impl_.public_dependency_);
_this->_impl_.weak_dependency_.MergeFrom(from._impl_.weak_dependency_);
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
if (cached_has_bits & 0x00000001u) {
_this->_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
_this->_internal_set_package(from._internal_package());
}
if (cached_has_bits & 0x00000004u) {
_this->_internal_set_syntax(from._internal_syntax());
}
if (cached_has_bits & 0x00000008u) {
_this->_internal_mutable_options()->::PROTOBUF_NAMESPACE_ID::FileOptions::MergeFrom(
from._internal_options());
}
if (cached_has_bits & 0x00000010u) {
_this->_internal_mutable_source_code_info()->::PROTOBUF_NAMESPACE_ID::SourceCodeInfo::MergeFrom(
from._internal_source_code_info());
}
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
} | O3 | cpp | google::protobuf::FileDescriptorProto::MergeImpl(google::protobuf::Message&, google::protobuf::Message const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0x20(%rsi)
je 0x1464c7
leaq 0x18(%r14), %rsi
leaq 0x18(%rbx), %rdi
leaq -0xe10a8(%rip), %rdx # 0x65418
xorl %ecx, %ecx
callq 0x653ac
cmpl $0x0, 0x38(%r14)
je 0x1464e4
leaq 0x30(%r14), %rsi
leaq 0x30(%rbx), %rdi
leaq 0x1009f(%rip), %rdx # 0x15657c
xorl %ecx, %ecx
callq 0x653ac
cmpl $0x0, 0x50(%r14)
je 0x146501
leaq 0x48(%r14), %rsi
leaq 0x48(%rbx), %rdi
leaq 0x10100(%rip), %rdx # 0x1565fa
xorl %ecx, %ecx
callq 0x653ac
cmpl $0x0, 0x68(%r14)
je 0x14651e
leaq 0x60(%r14), %rsi
leaq 0x60(%rbx), %rdi
leaq 0x10161(%rip), %rdx # 0x156678
xorl %ecx, %ecx
callq 0x653ac
cmpl $0x0, 0x80(%r14)
je 0x14653e
leaq 0x78(%r14), %rsi
leaq 0x78(%rbx), %rdi
leaq 0x101bf(%rip), %rdx # 0x1566f6
xorl %ecx, %ecx
callq 0x653ac
movl 0x90(%r14), %esi
testl %esi, %esi
je 0x146591
leaq 0x90(%rbx), %rdi
movslq 0x90(%rbx), %r15
addl %r15d, %esi
callq 0x10108c
movl 0x90(%r14), %eax
addl %eax, 0x90(%rbx)
shlq $0x2, %r15
addq 0x98(%rbx), %r15
movq 0x98(%r14), %rsi
movslq 0x90(%r14), %rdx
shlq $0x2, %rdx
movq %r15, %rdi
callq 0x1f400
movl 0xa0(%r14), %esi
testl %esi, %esi
je 0x1465e4
leaq 0xa0(%rbx), %rdi
movslq 0xa0(%rbx), %r15
addl %r15d, %esi
callq 0x10108c
movl 0xa0(%r14), %eax
addl %eax, 0xa0(%rbx)
shlq $0x2, %r15
addq 0xa8(%rbx), %r15
movq 0xa8(%r14), %rsi
movslq 0xa0(%r14), %rdx
shlq $0x2, %rdx
movq %r15, %rdi
callq 0x1f400
movl 0x10(%r14), %ebp
testb $0x1f, %bpl
je 0x14672e
testb $0x1, %bpl
je 0x146626
movq 0xb0(%r14), %rsi
andq $-0x4, %rsi
orl $0x1, 0x10(%rbx)
leaq 0xb0(%rbx), %rdi
movq 0x8(%rbx), %rax
movq %rax, %rdx
andq $-0x4, %rdx
testb $0x1, %al
jne 0x146761
callq 0xf980e
testb $0x2, %bpl
je 0x14665a
movq 0xb8(%r14), %rsi
andq $-0x4, %rsi
orl $0x2, 0x10(%rbx)
leaq 0xb8(%rbx), %rdi
movq 0x8(%rbx), %rax
movq %rax, %rdx
andq $-0x4, %rdx
testb $0x1, %al
jne 0x146769
callq 0xf980e
testb $0x4, %bpl
je 0x14668e
movq 0xc0(%r14), %rsi
andq $-0x4, %rsi
orl $0x4, 0x10(%rbx)
leaq 0xc0(%rbx), %rdi
movq 0x8(%rbx), %rax
movq %rax, %rdx
andq $-0x4, %rdx
testb $0x1, %al
jne 0x146771
callq 0xf980e
testb $0x8, %bpl
je 0x1466e0
orb $0x8, 0x10(%rbx)
movq 0xc8(%rbx), %rdi
testq %rdi, %rdi
jne 0x1466c6
movq 0x8(%rbx), %rax
movq %rax, %rdi
andq $-0x4, %rdi
testb $0x1, %al
jne 0x146779
callq 0x1559de
movq %rax, %rdi
movq %rax, 0xc8(%rbx)
movq 0xc8(%r14), %rax
testq %rax, %rax
leaq 0x1394b9(%rip), %rsi # 0x27fb90
cmovneq %rax, %rsi
callq 0x14eafa
testb $0x10, %bpl
je 0x14672e
orb $0x10, 0x10(%rbx)
movq 0xd0(%rbx), %rdi
testq %rdi, %rdi
jne 0x146714
movq 0x8(%rbx), %rax
movq %rax, %rdi
andq $-0x4, %rdi
testb $0x1, %al
jne 0x146781
callq 0x155e7e
movq %rax, %rdi
movq %rax, 0xd0(%rbx)
movq 0xd0(%r14), %rax
testq %rax, %rax
leaq 0x13983b(%rip), %rsi # 0x27ff60
cmovneq %rax, %rsi
callq 0x154588
movq 0x8(%r14), %rsi
testb $0x1, %sil
jne 0x146743
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
addq $0x8, %rbx
andq $-0x4, %rsi
addq $0x8, %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x652cc
movq (%rdx), %rdx
jmp 0x146621
movq (%rdx), %rdx
jmp 0x146655
movq (%rdx), %rdx
jmp 0x146689
movq (%rdi), %rdi
jmp 0x1466b7
movq (%rdi), %rdi
jmp 0x146705
nop
| _ZN6google8protobuf19FileDescriptorProto9MergeImplERNS0_7MessageERKS2_:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
cmp dword ptr [rsi+20h], 0
jz short loc_1464C7
lea rsi, [r14+18h]
lea rdi, [rbx+18h]
lea rdx, _ZN6google8protobuf8internal20RepeatedPtrFieldBase18MergeFromInnerLoopINS0_16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11TypeHandlerEEEvPPvSE_ii; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<std::string>::TypeHandler>(void **,void **,int,int)
xor ecx, ecx
call _ZN6google8protobuf8internal20RepeatedPtrFieldBase17MergeFromInternalERKS2_MS2_FvPPvS6_iiE; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(google::protobuf::internal::RepeatedPtrFieldBase const&,void (google::protobuf::internal::RepeatedPtrFieldBase::*)(void **,void **,int,int))
loc_1464C7:
cmp dword ptr [r14+38h], 0
jz short loc_1464E4
lea rsi, [r14+30h]
lea rdi, [rbx+30h]
lea rdx, _ZN6google8protobuf8internal20RepeatedPtrFieldBase18MergeFromInnerLoopINS0_16RepeatedPtrFieldINS0_15DescriptorProtoEE11TypeHandlerEEEvPPvS9_ii; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::TypeHandler>(void **,void **,int,int)
xor ecx, ecx
call _ZN6google8protobuf8internal20RepeatedPtrFieldBase17MergeFromInternalERKS2_MS2_FvPPvS6_iiE; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(google::protobuf::internal::RepeatedPtrFieldBase const&,void (google::protobuf::internal::RepeatedPtrFieldBase::*)(void **,void **,int,int))
loc_1464E4:
cmp dword ptr [r14+50h], 0
jz short loc_146501
lea rsi, [r14+48h]
lea rdi, [rbx+48h]
lea rdx, _ZN6google8protobuf8internal20RepeatedPtrFieldBase18MergeFromInnerLoopINS0_16RepeatedPtrFieldINS0_19EnumDescriptorProtoEE11TypeHandlerEEEvPPvS9_ii; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto>::TypeHandler>(void **,void **,int,int)
xor ecx, ecx
call _ZN6google8protobuf8internal20RepeatedPtrFieldBase17MergeFromInternalERKS2_MS2_FvPPvS6_iiE; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(google::protobuf::internal::RepeatedPtrFieldBase const&,void (google::protobuf::internal::RepeatedPtrFieldBase::*)(void **,void **,int,int))
loc_146501:
cmp dword ptr [r14+68h], 0
jz short loc_14651E
lea rsi, [r14+60h]
lea rdi, [rbx+60h]
lea rdx, _ZN6google8protobuf8internal20RepeatedPtrFieldBase18MergeFromInnerLoopINS0_16RepeatedPtrFieldINS0_22ServiceDescriptorProtoEE11TypeHandlerEEEvPPvS9_ii; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::ServiceDescriptorProto>::TypeHandler>(void **,void **,int,int)
xor ecx, ecx
call _ZN6google8protobuf8internal20RepeatedPtrFieldBase17MergeFromInternalERKS2_MS2_FvPPvS6_iiE; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(google::protobuf::internal::RepeatedPtrFieldBase const&,void (google::protobuf::internal::RepeatedPtrFieldBase::*)(void **,void **,int,int))
loc_14651E:
cmp dword ptr [r14+80h], 0
jz short loc_14653E
lea rsi, [r14+78h]
lea rdi, [rbx+78h]
lea rdx, _ZN6google8protobuf8internal20RepeatedPtrFieldBase18MergeFromInnerLoopINS0_16RepeatedPtrFieldINS0_20FieldDescriptorProtoEE11TypeHandlerEEEvPPvS9_ii; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto>::TypeHandler>(void **,void **,int,int)
xor ecx, ecx
call _ZN6google8protobuf8internal20RepeatedPtrFieldBase17MergeFromInternalERKS2_MS2_FvPPvS6_iiE; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(google::protobuf::internal::RepeatedPtrFieldBase const&,void (google::protobuf::internal::RepeatedPtrFieldBase::*)(void **,void **,int,int))
loc_14653E:
mov esi, [r14+90h]
test esi, esi
jz short loc_146591
lea rdi, [rbx+90h]
movsxd r15, dword ptr [rbx+90h]
add esi, r15d
call _ZN6google8protobuf13RepeatedFieldIiE7ReserveEi; google::protobuf::RepeatedField<int>::Reserve(int)
mov eax, [r14+90h]
add [rbx+90h], eax
shl r15, 2
add r15, [rbx+98h]
mov rsi, [r14+98h]
movsxd rdx, dword ptr [r14+90h]
shl rdx, 2
mov rdi, r15
call _memcpy
loc_146591:
mov esi, [r14+0A0h]
test esi, esi
jz short loc_1465E4
lea rdi, [rbx+0A0h]
movsxd r15, dword ptr [rbx+0A0h]
add esi, r15d
call _ZN6google8protobuf13RepeatedFieldIiE7ReserveEi; google::protobuf::RepeatedField<int>::Reserve(int)
mov eax, [r14+0A0h]
add [rbx+0A0h], eax
shl r15, 2
add r15, [rbx+0A8h]
mov rsi, [r14+0A8h]
movsxd rdx, dword ptr [r14+0A0h]
shl rdx, 2
mov rdi, r15
call _memcpy
loc_1465E4:
mov ebp, [r14+10h]
test bpl, 1Fh
jz loc_14672E
test bpl, 1
jz short loc_146626
mov rsi, [r14+0B0h]
and rsi, 0FFFFFFFFFFFFFFFCh
or dword ptr [rbx+10h], 1
lea rdi, [rbx+0B0h]
mov rax, [rbx+8]
mov rdx, rax
and rdx, 0FFFFFFFFFFFFFFFCh
test al, 1
jnz loc_146761
loc_146621:
call _ZN6google8protobuf8internal14ArenaStringPtr3SetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS0_5ArenaE; google::protobuf::internal::ArenaStringPtr::Set(std::string const&,google::protobuf::Arena *)
loc_146626:
test bpl, 2
jz short loc_14665A
mov rsi, [r14+0B8h]
and rsi, 0FFFFFFFFFFFFFFFCh
or dword ptr [rbx+10h], 2
lea rdi, [rbx+0B8h]
mov rax, [rbx+8]
mov rdx, rax
and rdx, 0FFFFFFFFFFFFFFFCh
test al, 1
jnz loc_146769
loc_146655:
call _ZN6google8protobuf8internal14ArenaStringPtr3SetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS0_5ArenaE; google::protobuf::internal::ArenaStringPtr::Set(std::string const&,google::protobuf::Arena *)
loc_14665A:
test bpl, 4
jz short loc_14668E
mov rsi, [r14+0C0h]
and rsi, 0FFFFFFFFFFFFFFFCh
or dword ptr [rbx+10h], 4
lea rdi, [rbx+0C0h]
mov rax, [rbx+8]
mov rdx, rax
and rdx, 0FFFFFFFFFFFFFFFCh
test al, 1
jnz loc_146771
loc_146689:
call _ZN6google8protobuf8internal14ArenaStringPtr3SetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS0_5ArenaE; google::protobuf::internal::ArenaStringPtr::Set(std::string const&,google::protobuf::Arena *)
loc_14668E:
test bpl, 8
jz short loc_1466E0
or byte ptr [rbx+10h], 8
mov rdi, [rbx+0C8h]
test rdi, rdi
jnz short loc_1466C6
mov rax, [rbx+8]
mov rdi, rax
and rdi, 0FFFFFFFFFFFFFFFCh
test al, 1
jnz loc_146779
loc_1466B7:
call _ZN6google8protobuf5Arena18CreateMaybeMessageINS0_11FileOptionsEJEEEPT_PS1_DpOT0_; google::protobuf::Arena::CreateMaybeMessage<google::protobuf::FileOptions>(google::protobuf::Arena*)
mov rdi, rax; this
mov [rbx+0C8h], rax
loc_1466C6:
mov rax, [r14+0C8h]
test rax, rax
lea rsi, _ZN6google8protobuf30_FileOptions_default_instance_E; google::protobuf::_FileOptions_default_instance_
cmovnz rsi, rax; google::protobuf::Message *
call _ZN6google8protobuf11FileOptions9MergeImplERNS0_7MessageERKS2_; google::protobuf::FileOptions::MergeImpl(google::protobuf::Message &,google::protobuf::Message const&)
loc_1466E0:
test bpl, 10h
jz short loc_14672E
or byte ptr [rbx+10h], 10h
mov rdi, [rbx+0D0h]
test rdi, rdi
jnz short loc_146714
mov rax, [rbx+8]
mov rdi, rax
and rdi, 0FFFFFFFFFFFFFFFCh
test al, 1
jnz short loc_146781
loc_146705:
call _ZN6google8protobuf5Arena18CreateMaybeMessageINS0_14SourceCodeInfoEJEEEPT_PS1_DpOT0_; google::protobuf::Arena::CreateMaybeMessage<google::protobuf::SourceCodeInfo>(google::protobuf::Arena*)
mov rdi, rax; this
mov [rbx+0D0h], rax
loc_146714:
mov rax, [r14+0D0h]
test rax, rax
lea rsi, _ZN6google8protobuf33_SourceCodeInfo_default_instance_E; google::protobuf::_SourceCodeInfo_default_instance_
cmovnz rsi, rax; google::protobuf::Message *
call _ZN6google8protobuf14SourceCodeInfo9MergeImplERNS0_7MessageERKS2_; google::protobuf::SourceCodeInfo::MergeImpl(google::protobuf::Message &,google::protobuf::Message const&)
loc_14672E:
mov rsi, [r14+8]
test sil, 1
jnz short loc_146743
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_146743:
add rbx, 8
and rsi, 0FFFFFFFFFFFFFFFCh
add rsi, 8
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&)
loc_146761:
mov rdx, [rdx]
jmp loc_146621
loc_146769:
mov rdx, [rdx]
jmp loc_146655
loc_146771:
mov rdx, [rdx]
jmp loc_146689
loc_146779:
mov rdi, [rdi]
jmp loc_1466B7
loc_146781:
mov rdi, [rdi]
jmp loc_146705
| long long google::protobuf::FileDescriptorProto::MergeImpl(
google::protobuf::FileDescriptorProto *this,
google::protobuf::Message *a2,
const google::protobuf::Message *a3)
{
long long result; // rax
int v6; // esi
long long v7; // r15
int v8; // esi
long long v9; // r15
int v10; // ebp
unsigned long long v11; // rsi
google::protobuf::Arena *v12; // rdx
unsigned long long v13; // rsi
google::protobuf::Arena *v14; // rdx
unsigned long long v15; // rsi
google::protobuf::Arena *v16; // rdx
google::protobuf::FileOptions *v17; // rdi
_QWORD *v18; // rdi
google::protobuf::Message *v19; // rsi
google::protobuf::SourceCodeInfo *v20; // rdi
_QWORD *v21; // rdi
google::protobuf::Message *v22; // rsi
long long v23; // rsi
if ( *((_DWORD *)a2 + 8) )
result = (long long)google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(
(long long)this + 24,
(long long)a2 + 24,
(char *)google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<std::string>::TypeHandler>,
0LL);
if ( *((_DWORD *)a2 + 14) )
result = (long long)google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(
(long long)this + 48,
(long long)a2 + 48,
(char *)google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::TypeHandler>,
0LL);
if ( *((_DWORD *)a2 + 20) )
result = (long long)google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(
(long long)this + 72,
(long long)a2 + 72,
(char *)google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto>::TypeHandler>,
0LL);
if ( *((_DWORD *)a2 + 26) )
result = (long long)google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(
(long long)this + 96,
(long long)a2 + 96,
(char *)google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::ServiceDescriptorProto>::TypeHandler>,
0LL);
if ( *((_DWORD *)a2 + 32) )
result = (long long)google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(
(long long)this + 120,
(long long)a2 + 120,
(char *)google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto>::TypeHandler>,
0LL);
v6 = *((_DWORD *)a2 + 36);
if ( v6 )
{
v7 = *((int *)this + 36);
google::protobuf::RepeatedField<int>::Reserve((int *)this + 36, v7 + v6);
*((_DWORD *)this + 36) += *((_DWORD *)a2 + 36);
result = memcpy(*((_QWORD *)this + 19) + 4 * v7, *((_QWORD *)a2 + 19), 4LL * *((int *)a2 + 36));
}
v8 = *((_DWORD *)a2 + 40);
if ( v8 )
{
v9 = *((int *)this + 40);
google::protobuf::RepeatedField<int>::Reserve((int *)this + 40, v9 + v8);
*((_DWORD *)this + 40) += *((_DWORD *)a2 + 40);
result = memcpy(*((_QWORD *)this + 21) + 4 * v9, *((_QWORD *)a2 + 21), 4LL * *((int *)a2 + 40));
}
v10 = *((_DWORD *)a2 + 4);
if ( (v10 & 0x1F) != 0 )
{
if ( (v10 & 1) != 0 )
{
v11 = *((_QWORD *)a2 + 22) & 0xFFFFFFFFFFFFFFFCLL;
*((_DWORD *)this + 4) |= 1u;
v12 = (google::protobuf::Arena *)(*((_QWORD *)this + 1) & 0xFFFFFFFFFFFFFFFCLL);
if ( (*((_QWORD *)this + 1) & 1) != 0 )
v12 = *(google::protobuf::Arena **)v12;
result = google::protobuf::internal::ArenaStringPtr::Set((long long *)this + 22, v11, v12);
}
if ( (v10 & 2) != 0 )
{
v13 = *((_QWORD *)a2 + 23) & 0xFFFFFFFFFFFFFFFCLL;
*((_DWORD *)this + 4) |= 2u;
v14 = (google::protobuf::Arena *)(*((_QWORD *)this + 1) & 0xFFFFFFFFFFFFFFFCLL);
if ( (*((_QWORD *)this + 1) & 1) != 0 )
v14 = *(google::protobuf::Arena **)v14;
result = google::protobuf::internal::ArenaStringPtr::Set((long long *)this + 23, v13, v14);
}
if ( (v10 & 4) != 0 )
{
v15 = *((_QWORD *)a2 + 24) & 0xFFFFFFFFFFFFFFFCLL;
*((_DWORD *)this + 4) |= 4u;
v16 = (google::protobuf::Arena *)(*((_QWORD *)this + 1) & 0xFFFFFFFFFFFFFFFCLL);
if ( (*((_QWORD *)this + 1) & 1) != 0 )
v16 = *(google::protobuf::Arena **)v16;
result = google::protobuf::internal::ArenaStringPtr::Set((long long *)this + 24, v15, v16);
}
if ( (v10 & 8) != 0 )
{
*((_BYTE *)this + 16) |= 8u;
v17 = (google::protobuf::FileOptions *)*((_QWORD *)this + 25);
if ( !v17 )
{
v18 = (_QWORD *)(*((_QWORD *)this + 1) & 0xFFFFFFFFFFFFFFFCLL);
if ( (*((_QWORD *)this + 1) & 1) != 0 )
v18 = (_QWORD *)*v18;
v17 = (google::protobuf::FileOptions *)google::protobuf::Arena::CreateMaybeMessage<google::protobuf::FileOptions>(v18);
*((_QWORD *)this + 25) = v17;
}
v19 = (google::protobuf::Message *)&google::protobuf::_FileOptions_default_instance_;
if ( *((_QWORD *)a2 + 25) )
v19 = (google::protobuf::Message *)*((_QWORD *)a2 + 25);
result = google::protobuf::FileOptions::MergeImpl(v17, v19, a3);
}
if ( (v10 & 0x10) != 0 )
{
*((_BYTE *)this + 16) |= 0x10u;
v20 = (google::protobuf::SourceCodeInfo *)*((_QWORD *)this + 26);
if ( !v20 )
{
v21 = (_QWORD *)(*((_QWORD *)this + 1) & 0xFFFFFFFFFFFFFFFCLL);
if ( (*((_QWORD *)this + 1) & 1) != 0 )
v21 = (_QWORD *)*v21;
v20 = (google::protobuf::SourceCodeInfo *)google::protobuf::Arena::CreateMaybeMessage<google::protobuf::SourceCodeInfo>(v21);
*((_QWORD *)this + 26) = v20;
}
v22 = (google::protobuf::Message *)&google::protobuf::_SourceCodeInfo_default_instance_;
if ( *((_QWORD *)a2 + 26) )
v22 = (google::protobuf::Message *)*((_QWORD *)a2 + 26);
result = google::protobuf::SourceCodeInfo::MergeImpl(v20, v22, a3);
}
}
v23 = *((_QWORD *)a2 + 1);
if ( (v23 & 1) != 0 )
return google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(
(long long *)this + 1,
(const google::protobuf::UnknownFieldSet *)((v23 & 0xFFFFFFFFFFFFFFFCLL) + 8));
return result;
}
| __sort_heap<google::protobuf::FieldDescriptor_const**,__gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::compiler::java::FieldOrderingByNumber>>:
PUSH R15
PUSH R14
PUSH RBX
MOV R15,RSI
SUB R15,RDI
CMP R15,0x9
JL 0x001464e1
MOV RBX,RSI
MOV R14,RDI
ADD RBX,-0x8
LAB_001464b9:
MOV RCX,qword ptr [RBX]
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX],RAX
ADD R15,-0x8
MOV RDX,R15
SAR RDX,0x3
MOV RDI,R14
XOR ESI,ESI
CALL 0x00146524
ADD RBX,-0x8
CMP R15,0x8
JG 0x001464b9
LAB_001464e1:
POP RBX
POP R14
POP R15
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* void std::__sort_heap<google::protobuf::FieldDescriptor const**,
__gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::compiler::java::FieldOrderingByNumber>
>(google::protobuf::FieldDescriptor const**, google::protobuf::FieldDescriptor const**,
__gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::compiler::java::FieldOrderingByNumber>&) */
void std::
__sort_heap<google::protobuf::FieldDescriptor_const**,__gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::compiler::java::FieldOrderingByNumber>>
(FieldDescriptor **param_1,FieldDescriptor **param_2,_Iter_comp_iter *param_3)
{
FieldDescriptor *pFVar1;
FieldDescriptor **ppFVar2;
long lVar3;
lVar3 = (long)param_2 - (long)param_1;
if (8 < lVar3) {
ppFVar2 = param_2 + -1;
do {
pFVar1 = *ppFVar2;
*ppFVar2 = *param_1;
lVar3 = lVar3 + -8;
__adjust_heap<google::protobuf::FieldDescriptor_const**,long,google::protobuf::FieldDescriptor_const*,__gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::compiler::java::FieldOrderingByNumber>>
(param_1,0,lVar3 >> 3,pFVar1);
ppFVar2 = ppFVar2 + -1;
} while (8 < lVar3);
}
return;
}
| |
47,134 | my_tosort_utf32 | eloqsql/strings/ctype-ucs2.c | static inline void
my_tosort_utf32(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
{
if (*wc <= uni_plane->maxchar)
{
MY_UNICASE_CHARACTER *page;
if ((page= uni_plane->page[*wc >> 8]))
*wc= page[*wc & 0xFF].sort;
}
else
{
*wc= MY_CS_REPLACEMENT_CHARACTER;
}
} | O0 | c | my_tosort_utf32:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x137134
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x137132
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
andq $0xff, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x13713f
movq -0x10(%rbp), %rax
movq $0xfffd, (%rax) # imm = 0xFFFD
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_tosort_utf32:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_8]
cmp rax, [rcx]
ja short loc_137134
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
shr rcx, 8
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_137132
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
and rcx, 0FFh
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+8]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
loc_137132:
jmp short loc_13713F
loc_137134:
mov rax, [rbp+var_10]
mov qword ptr [rax], 0FFFDh
loc_13713F:
pop rbp
retn
| _QWORD * my_tosort_utf32(_QWORD *a1, _QWORD *a2)
{
_QWORD *result; // rax
_QWORD *v3; // [rsp+0h] [rbp-18h]
if ( *a2 > *a1 )
{
result = a2;
*a2 = 65533LL;
}
else
{
result = *(_QWORD **)(a1[1] + 8LL * (*a2 >> 8));
v3 = result;
if ( result )
{
result = a2;
*a2 = *((unsigned int *)v3 + 3 * (unsigned __int8)*a2 + 2);
}
}
return result;
}
| inline_mysql_file_create:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV dword ptr [RBP + -0x28],R9D
LEA RAX,[0x3c0248]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV ESI,dword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x80]
XOR EDX,EDX
LEA R8,[RBP + -0x38]
CALL RAX
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00137193
LEA RAX,[0x3c0248]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1f0]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x24]
MOV EDX,dword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + 0x10]
CALL 0x001ef5c0
MOV dword ptr [RBP + -0x2c],EAX
LEA RAX,[0x3c0248]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x200]
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,dword ptr [RBP + -0x2c]
CALL RAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001371af
LAB_00137193:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x24]
MOV EDX,dword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + 0x10]
CALL 0x001ef5c0
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001371af:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_create
(int4 param_1,int8 param_2,int4 param_3,int8 param_4,
int4 param_5,int4 param_6,int8 param_7)
{
int1 local_88 [72];
long local_40;
int4 local_34;
int4 local_30;
int4 local_2c;
int8 local_28;
int4 local_1c;
int8 local_18;
int4 local_10;
int4 local_c;
local_30 = param_6;
local_2c = param_5;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
local_40 = (**(code **)(PSI_server + 0x148))(local_88,param_1,0,param_4,&local_40);
if (local_40 == 0) {
local_c = my_create(local_28,local_2c,local_30,param_7);
}
else {
(**(code **)(PSI_server + 0x1f0))(local_40,local_18,local_1c);
local_34 = my_create(local_28,local_2c,local_30,param_7);
(**(code **)(PSI_server + 0x200))(local_40,local_34);
local_c = local_34;
}
return local_c;
}
| |
47,135 | ma_free_root | eloqsql/libmariadb/libmariadb/ma_alloc.c | void ma_free_root(MA_MEM_ROOT *root, myf MyFlags)
{
reg1 MA_USED_MEM *next,*old;
if (!root)
return; /* purecov: inspected */
if (!(MyFlags & MY_KEEP_PREALLOC))
root->pre_alloc=0;
for ( next=root->used; next ;)
{
old=next; next= next->next ;
if (old != root->pre_alloc)
free(old);
}
for (next= root->free ; next ; )
{
old=next; next= next->next ;
if (old != root->pre_alloc)
free(old);
}
root->used=root->free=0;
if (root->pre_alloc)
{
root->free=root->pre_alloc;
root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(MA_USED_MEM));
root->free->next=0;
}
} | O0 | c | ma_free_root:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x28d3b
jmp 0x28e29
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x28d52
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x28d91
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x28d8f
movq -0x20(%rbp), %rdi
callq 0x13520
jmp 0x28d5e
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x28dcf
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x28dcd
movq -0x20(%rbp), %rdi
callq 0x13520
jmp 0x28d9c
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x28e29
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rcx
subq $0x18, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
| ma_free_root:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
cmp [rbp+var_8], 0
jnz short loc_28D3B
jmp loc_28E29
loc_28D3B:
mov eax, [rbp+var_C]
and eax, 1
cmp eax, 0
jnz short loc_28D52
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
loc_28D52:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_18], rax
loc_28D5E:
cmp [rbp+var_18], 0
jz short loc_28D91
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jz short loc_28D8F
mov rdi, [rbp+var_20]
call _free
loc_28D8F:
jmp short loc_28D5E
loc_28D91:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
loc_28D9C:
cmp [rbp+var_18], 0
jz short loc_28DCF
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jz short loc_28DCD
mov rdi, [rbp+var_20]
call _free
loc_28DCD:
jmp short loc_28D9C
loc_28DCF:
mov rax, [rbp+var_8]
mov qword ptr [rax], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+10h], 0
jz short loc_28E29
mov rax, [rbp+var_8]
mov rcx, [rax+10h]
mov rax, [rbp+var_8]
mov [rax], rcx
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rcx, [rax+10h]
sub rcx, 18h
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rax+8], rcx
mov rax, [rbp+var_8]
mov rax, [rax]
mov qword ptr [rax], 0
loc_28E29:
add rsp, 20h
pop rbp
retn
| _QWORD * ma_free_root(_QWORD *a1, char a2)
{
_QWORD *result; // rax
_QWORD *v3; // [rsp+0h] [rbp-20h]
_QWORD *v4; // [rsp+0h] [rbp-20h]
_QWORD *v5; // [rsp+8h] [rbp-18h]
_QWORD *v6; // [rsp+8h] [rbp-18h]
if ( a1 )
{
if ( (a2 & 1) == 0 )
a1[2] = 0LL;
v5 = (_QWORD *)a1[1];
while ( v5 )
{
v3 = v5;
v5 = (_QWORD *)*v5;
if ( v3 != (_QWORD *)a1[2] )
free(v3);
}
v6 = (_QWORD *)*a1;
while ( v6 )
{
v4 = v6;
v6 = (_QWORD *)*v6;
if ( v4 != (_QWORD *)a1[2] )
free(v4);
}
*a1 = 0LL;
a1[1] = 0LL;
result = a1;
if ( a1[2] )
{
*a1 = a1[2];
*(_QWORD *)(*a1 + 8LL) = *(_QWORD *)(a1[2] + 16LL) - 24LL;
result = (_QWORD *)*a1;
*(_QWORD *)*a1 = 0LL;
}
}
return result;
}
| ma_free_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x00128d3b
JMP 0x00128e29
LAB_00128d3b:
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x00128d52
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
LAB_00128d52:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
LAB_00128d5e:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00128d91
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x00128d8f
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00113520
LAB_00128d8f:
JMP 0x00128d5e
LAB_00128d91:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_00128d9c:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00128dcf
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x00128dcd
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00113520
LAB_00128dcd:
JMP 0x00128d9c
LAB_00128dcf:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00128e29
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],0x0
LAB_00128e29:
ADD RSP,0x20
POP RBP
RET
|
void ma_free_root(long *param_1,uint param_2)
{
int8 *puVar1;
int8 *local_20;
if (param_1 != (long *)0x0) {
if ((param_2 & 1) == 0) {
param_1[2] = 0;
}
puVar1 = (int8 *)param_1[1];
while (local_20 = puVar1, local_20 != (int8 *)0x0) {
puVar1 = (int8 *)*local_20;
if (local_20 != (int8 *)param_1[2]) {
free(local_20);
}
}
puVar1 = (int8 *)*param_1;
while (local_20 = puVar1, local_20 != (int8 *)0x0) {
puVar1 = (int8 *)*local_20;
if (local_20 != (int8 *)param_1[2]) {
free(local_20);
}
}
*param_1 = 0;
param_1[1] = 0;
if (param_1[2] != 0) {
*param_1 = param_1[2];
*(long *)(*param_1 + 8) = *(long *)(param_1[2] + 0x10) + -0x18;
*(int8 *)*param_1 = 0;
}
}
return;
}
| |
47,136 | ma_read_block_record | eloqsql/storage/maria/ma_blockrec.c | int _ma_read_block_record(MARIA_HA *info, uchar *record,
MARIA_RECORD_POS record_pos)
{
MARIA_SHARE *share= info->s;
uchar *data, *end_of_data, *buff;
uint offset;
int ret;
DBUG_ENTER("_ma_read_block_record");
DBUG_PRINT("enter", ("rowid: %lu page: %lu rownr: %u",
(ulong) record_pos,
(ulong) ma_recordpos_to_page(record_pos),
ma_recordpos_to_dir_entry(record_pos)));
offset= ma_recordpos_to_dir_entry(record_pos);
if (!(buff= pagecache_read(share->pagecache,
&info->dfile, ma_recordpos_to_page(record_pos), 0,
info->buff, share->page_type,
PAGECACHE_LOCK_LEFT_UNLOCKED, 0)))
DBUG_RETURN(my_errno);
/*
Unallocated page access can happen if this is an access to a page where
all rows where deleted as part of this statement.
*/
DBUG_ASSERT((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == HEAD_PAGE ||
(buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == UNALLOCATED_PAGE);
if (((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == UNALLOCATED_PAGE) ||
!(data= get_record_position(share, buff, offset, &end_of_data)))
{
DBUG_ASSERT(!maria_assert_if_crashed_table);
DBUG_PRINT("warning", ("Wrong directory entry in data block"));
my_errno= HA_ERR_RECORD_DELETED; /* File crashed */
DBUG_RETURN(HA_ERR_RECORD_DELETED);
}
ret= _ma_read_block_record2(info, record, data, end_of_data);
DBUG_RETURN(ret);
} | O3 | c | ma_read_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
movq 0x600(%r15), %rdi
leaq 0x470(%r14), %rsi
shrq $0x8, %rdx
movq 0x378(%r14), %r8
movl 0x7d4(%r15), %r9d
xorl %ecx, %ecx
pushq $0x0
pushq $0x0
callq 0x70a2e
addq $0x10, %rsp
testq %rax, %rax
je 0x4b302
testb $0x7, 0x7(%rax)
je 0x4b2f0
movzbl %r12b, %edx
leaq -0x28(%rbp), %rcx
movq %r15, %rdi
movq %rax, %rsi
callq 0x4b316
testq %rax, %rax
je 0x4b2f0
movq -0x28(%rbp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4a7b9
callq 0xa8dda
movl $0x86, (%rax)
movl $0x86, %eax
jmp 0x4b309
callq 0xa8dda
movl (%rax), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ma_read_block_record:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r12, rdx
mov rbx, rsi
mov r14, rdi
mov r15, [rdi]
mov rdi, [r15+600h]
lea rsi, [r14+470h]
shr rdx, 8
mov r8, [r14+378h]
mov r9d, [r15+7D4h]
xor ecx, ecx
push 0
push 0
call pagecache_read
add rsp, 10h
test rax, rax
jz short loc_4B302
test byte ptr [rax+7], 7
jz short loc_4B2F0
movzx edx, r12b
lea rcx, [rbp+var_28]
mov rdi, r15
mov rsi, rax
call get_record_position
test rax, rax
jz short loc_4B2F0
mov rcx, [rbp+var_28]
mov rdi, r14
mov rsi, rbx
mov rdx, rax
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _ma_read_block_record2
loc_4B2F0:
call _my_thread_var
mov dword ptr [rax], 86h
mov eax, 86h
jmp short loc_4B309
loc_4B302:
call _my_thread_var
mov eax, [rax]
loc_4B309:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ma_read_block_record(long long **a1, long long a2, unsigned long long a3)
{
unsigned __int8 v3; // r12
long long *v6; // r15
long long v7; // rdi
const char *v8; // rsi
long long v9; // rax
long long record_position; // rax
long long v11; // r8
unsigned int *v12; // r9
unsigned long long v14[5]; // [rsp+8h] [rbp-28h] BYREF
v3 = a3;
v6 = *a1;
v7 = (*a1)[192];
v8 = (const char *)(a1 + 142);
v9 = pagecache_read(v7, (int)a1 + 1136, a3 >> 8, 0, (unsigned int)a1[111], *((_DWORD *)v6 + 501), 0, 0LL);
if ( !v9 )
return *(unsigned int *)my_thread_var(v7, v8);
if ( (*(_BYTE *)(v9 + 7) & 7) != 0 )
{
v7 = (long long)v6;
v8 = (const char *)v9;
record_position = get_record_position(v6, v9, v3, v14);
if ( record_position )
return ma_read_block_record2(a1, a2, record_position, v14[0], v11, v12);
}
*(_DWORD *)my_thread_var(v7, v8) = 134;
return 134LL;
}
| _ma_read_block_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R12,RDX
MOV RBX,RSI
MOV R14,RDI
MOV R15,qword ptr [RDI]
MOV RDI,qword ptr [R15 + 0x600]
LEA RSI,[R14 + 0x470]
SHR RDX,0x8
MOV R8,qword ptr [R14 + 0x378]
MOV R9D,dword ptr [R15 + 0x7d4]
XOR ECX,ECX
PUSH 0x0
PUSH 0x0
CALL 0x00170a2e
ADD RSP,0x10
TEST RAX,RAX
JZ 0x0014b302
TEST byte ptr [RAX + 0x7],0x7
JZ 0x0014b2f0
MOVZX EDX,R12B
LEA RCX,[RBP + -0x28]
MOV RDI,R15
MOV RSI,RAX
CALL 0x0014b316
TEST RAX,RAX
JZ 0x0014b2f0
MOV RCX,qword ptr [RBP + -0x28]
MOV RDI,R14
MOV RSI,RBX
MOV RDX,RAX
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0014a7b9
LAB_0014b2f0:
CALL 0x001a8dda
MOV dword ptr [RAX],0x86
MOV EAX,0x86
JMP 0x0014b309
LAB_0014b302:
CALL 0x001a8dda
MOV EAX,dword ptr [RAX]
LAB_0014b309:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
ulong _ma_read_block_record(long *param_1,int8 param_2,ulong param_3)
{
long lVar1;
long lVar2;
ulong uVar3;
int4 *puVar4;
uint *puVar5;
int8 local_30;
lVar2 = *param_1;
lVar1 = pagecache_read(*(int8 *)(lVar2 + 0x600),param_1 + 0x8e,param_3 >> 8,0,param_1[0x6f],
*(int4 *)(lVar2 + 0x7d4),0,0);
if (lVar1 == 0) {
puVar5 = (uint *)_my_thread_var();
uVar3 = (ulong)*puVar5;
}
else {
if ((*(byte *)(lVar1 + 7) & 7) != 0) {
lVar2 = get_record_position(lVar2,lVar1,param_3 & 0xff,&local_30);
if (lVar2 != 0) {
uVar3 = _ma_read_block_record2(param_1,param_2,lVar2,local_30);
return uVar3;
}
}
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x86;
uVar3 = 0x86;
}
return uVar3;
}
| |
47,137 | lo0bits | eloqsql/strings/dtoa.c | static int lo0bits(ULong *y)
{
register int k;
register ULong x= *y;
if (x & 7)
{
if (x & 1)
return 0;
if (x & 2)
{
*y= x >> 1;
return 1;
}
*y= x >> 2;
return 2;
}
k= 0;
if (!(x & 0xffff))
{
k= 16;
x>>= 16;
}
if (!(x & 0xff))
{
k+= 8;
x>>= 8;
}
if (!(x & 0xf))
{
k+= 4;
x>>= 4;
}
if (!(x & 0x3))
{
k+= 2;
x>>= 2;
}
if (!(x & 1))
{
k++;
x>>= 1;
if (!x)
return 32;
}
*y= x;
return k;
} | O3 | c | lo0bits:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %ecx
testb $0x7, %cl
je 0xd4dda
xorl %eax, %eax
testb $0x1, %cl
jne 0xd4e41
testb $0x2, %cl
jne 0xd4e38
shrl $0x2, %ecx
movl $0x2, %eax
jmp 0xd4e3f
movl %ecx, %eax
shrl $0x10, %eax
xorl %edx, %edx
testl $0xfff8, %ecx # imm = 0xFFF8
cmovnel %ecx, %eax
sete %dl
shll $0x4, %edx
leal 0x8(%rdx), %ecx
movl %eax, %esi
shrl $0x8, %esi
testb %al, %al
cmovnel %edx, %ecx
cmovnel %eax, %esi
leal 0x4(%rcx), %edx
movl %esi, %r8d
shrl $0x4, %r8d
testb $0xf, %sil
cmovnel %ecx, %edx
cmovnel %esi, %r8d
leal 0x2(%rdx), %eax
movl %r8d, %ecx
shrl $0x2, %ecx
testb $0x3, %r8b
cmovnel %edx, %eax
cmovnel %r8d, %ecx
testb $0x1, %cl
jne 0xd4e3f
testl %ecx, %ecx
je 0xd4e43
incl %eax
shrl %ecx
jmp 0xd4e3f
shrl %ecx
movl $0x1, %eax
movl %ecx, (%rdi)
popq %rbp
retq
movl $0x20, %eax
jmp 0xd4e41
| lo0bits:
push rbp
mov rbp, rsp
mov ecx, [rdi]
test cl, 7
jz short loc_D4DDA
xor eax, eax
test cl, 1
jnz short loc_D4E41
test cl, 2
jnz short loc_D4E38
shr ecx, 2
mov eax, 2
jmp short loc_D4E3F
loc_D4DDA:
mov eax, ecx
shr eax, 10h
xor edx, edx
test ecx, 0FFF8h
cmovnz eax, ecx
setz dl
shl edx, 4
lea ecx, [rdx+8]
mov esi, eax
shr esi, 8
test al, al
cmovnz ecx, edx
cmovnz esi, eax
lea edx, [rcx+4]
mov r8d, esi
shr r8d, 4
test sil, 0Fh
cmovnz edx, ecx
cmovnz r8d, esi
lea eax, [rdx+2]
mov ecx, r8d
shr ecx, 2
test r8b, 3
cmovnz eax, edx
cmovnz ecx, r8d
test cl, 1
jnz short loc_D4E3F
test ecx, ecx
jz short loc_D4E43
inc eax
shr ecx, 1
jmp short loc_D4E3F
loc_D4E38:
shr ecx, 1
mov eax, 1
loc_D4E3F:
mov [rdi], ecx
loc_D4E41:
pop rbp
retn
loc_D4E43:
mov eax, 20h ; ' '
jmp short loc_D4E41
| long long lo0bits(unsigned int *a1)
{
unsigned int v1; // ecx
long long result; // rax
unsigned int v3; // ecx
unsigned int v4; // eax
int v5; // edx
int v6; // edx
int v7; // ecx
unsigned int v8; // esi
unsigned int v9; // edx
unsigned int v10; // r8d
v1 = *a1;
if ( (*a1 & 7) != 0 )
{
result = 0LL;
if ( (v1 & 1) != 0 )
return result;
if ( (v1 & 2) != 0 )
{
v3 = v1 >> 1;
result = 1LL;
}
else
{
v3 = v1 >> 2;
result = 2LL;
}
}
else
{
v4 = HIWORD(v1);
v5 = 0;
if ( (v1 & 0xFFF8) != 0 )
v4 = *a1;
LOBYTE(v5) = (*a1 & 0xFFF8) == 0;
v6 = 16 * v5;
v7 = v6 + 8;
v8 = v4 >> 8;
if ( (_BYTE)v4 )
{
v7 = v6;
v8 = v4;
}
v9 = v7 + 4;
v10 = v8 >> 4;
if ( (v8 & 0xF) != 0 )
{
v9 = v7;
v10 = v8;
}
result = v9 + 2;
v3 = v10 >> 2;
if ( (v10 & 3) != 0 )
{
result = v9;
v3 = v10;
}
if ( (v3 & 1) == 0 )
{
if ( !v3 )
return 32LL;
result = (unsigned int)(result + 1);
v3 >>= 1;
}
}
*a1 = v3;
return result;
}
| lo0bits:
PUSH RBP
MOV RBP,RSP
MOV ECX,dword ptr [RDI]
TEST CL,0x7
JZ 0x001d4dda
XOR EAX,EAX
TEST CL,0x1
JNZ 0x001d4e41
TEST CL,0x2
JNZ 0x001d4e38
SHR ECX,0x2
MOV EAX,0x2
JMP 0x001d4e3f
LAB_001d4dda:
MOV EAX,ECX
SHR EAX,0x10
XOR EDX,EDX
TEST ECX,0xfff8
CMOVNZ EAX,ECX
SETZ DL
SHL EDX,0x4
LEA ECX,[RDX + 0x8]
MOV ESI,EAX
SHR ESI,0x8
TEST AL,AL
CMOVNZ ECX,EDX
CMOVNZ ESI,EAX
LEA EDX,[RCX + 0x4]
MOV R8D,ESI
SHR R8D,0x4
TEST SIL,0xf
CMOVNZ EDX,ECX
CMOVNZ R8D,ESI
LEA EAX,[RDX + 0x2]
MOV ECX,R8D
SHR ECX,0x2
TEST R8B,0x3
CMOVNZ EAX,EDX
CMOVNZ ECX,R8D
TEST CL,0x1
JNZ 0x001d4e3f
TEST ECX,ECX
JZ 0x001d4e43
INC EAX
SHR ECX,0x1
JMP 0x001d4e3f
LAB_001d4e38:
SHR ECX,0x1
MOV EAX,0x1
LAB_001d4e3f:
MOV dword ptr [RDI],ECX
LAB_001d4e41:
POP RBP
RET
LAB_001d4e43:
MOV EAX,0x20
JMP 0x001d4e41
|
int lo0bits(uint *param_1)
{
uint uVar1;
int iVar2;
uint uVar3;
int iVar4;
bool bVar5;
uVar3 = *param_1;
if ((uVar3 & 7) == 0) {
bVar5 = (uVar3 & 0xfff8) == 0;
uVar1 = uVar3 >> 0x10;
if (!bVar5) {
uVar1 = uVar3;
}
iVar4 = (uint)bVar5 * 0x10;
uVar3 = uVar1 >> 8;
iVar2 = iVar4 + 8;
if ((char)uVar1 != '\0') {
uVar3 = uVar1;
iVar2 = iVar4;
}
uVar1 = uVar3 >> 4;
iVar4 = iVar2 + 4;
if ((uVar3 & 0xf) != 0) {
uVar1 = uVar3;
iVar4 = iVar2;
}
uVar3 = uVar1 >> 2;
iVar2 = iVar4 + 2;
if ((uVar1 & 3) != 0) {
uVar3 = uVar1;
iVar2 = iVar4;
}
if ((uVar3 & 1) == 0) {
if (uVar3 == 0) {
return 0x20;
}
iVar2 = iVar2 + 1;
uVar3 = uVar3 >> 1;
}
}
else {
if ((uVar3 & 1) != 0) {
return 0;
}
if ((uVar3 & 2) == 0) {
uVar3 = uVar3 >> 2;
iVar2 = 2;
}
else {
uVar3 = uVar3 >> 1;
iVar2 = 1;
}
}
*param_1 = uVar3;
return iVar2;
}
| |
47,138 | my_parse_charset_xml | eloqsql/strings/ctype.c | my_bool
my_parse_charset_xml(MY_CHARSET_LOADER *loader, const char *buf, size_t len)
{
MY_XML_PARSER p;
struct my_cs_file_info info;
my_bool rc;
my_charset_file_init(&info);
my_xml_parser_create(&p);
my_xml_set_enter_handler(&p,cs_enter);
my_xml_set_value_handler(&p,cs_value);
my_xml_set_leave_handler(&p,cs_leave);
info.loader= loader;
my_xml_set_user_data(&p, (void *) &info);
rc= (my_xml_parse(&p,buf,len) == MY_XML_OK) ? FALSE : TRUE;
my_xml_parser_free(&p);
my_charset_file_free(&info);
if (rc != MY_XML_OK)
{
const char *errstr= my_xml_error_string(&p);
if (sizeof(loader->error) > 32 + strlen(errstr))
{
/* We cannot use my_snprintf() here. See previous comment. */
sprintf(loader->error, "at line %d pos %d: %s",
my_xml_error_lineno(&p)+1,
(int) my_xml_error_pos(&p),
my_xml_error_string(&p));
}
}
return rc;
} | O3 | c | my_parse_charset_xml:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x928, %rsp # imm = 0x928
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0x260(%rbp), %r15
movl $0xc8, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x24160
xorps %xmm0, %xmm0
movups %xmm0, -0x58(%r15)
movups %xmm0, -0x4f(%r15)
leaq -0x190(%rbp), %r13
movq %r13, %rdi
callq 0x59f9c
leaq 0x10e(%rip), %rsi # 0x52eb9
movq %r13, %rdi
callq 0x5a011
leaq 0x1ec(%rip), %rsi # 0x52fa6
movq %r13, %rdi
callq 0x5a004
leaq 0x9e5(%rip), %rsi # 0x537ae
movq %r13, %rdi
callq 0x5a01e
movq %rbx, -0x948(%rbp)
movq %rbx, 0xc8(%r15)
leaq -0x940(%rbp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5a02b
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x594fc
movl %eax, %r14d
movq %r13, %rdi
callq 0x59fd8
movq -0x58(%r15), %rdi
movq 0x7a8(%rbx), %rax
callq *0x98(%rax)
testl %r14d, %r14d
je 0x52e8d
leaq -0x190(%rbp), %rdi
callq 0x5a038
movq %rax, %rdi
callq 0x24100
addq $0x20, %rax
cmpq $0x7f, %rax
ja 0x52e8d
leaq -0x190(%rbp), %rbx
movq %rbx, %rdi
callq 0x5a075
leal 0x1(%rax), %r15d
movq %rbx, %rdi
callq 0x5a042
movq %rax, %r12
movq %rbx, %rdi
callq 0x5a038
movq %rax, (%rsp)
leaq 0xaed1(%rip), %rcx # 0x5dd40
movl $0x80, %edx
movq -0x948(%rbp), %rdi
movl $0x1, %esi
movl %r15d, %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0x241a0
testl %r14d, %r14d
setne %al
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x52eb4
addq $0x928, %rsp # imm = 0x928
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x242e0
| my_parse_charset_xml:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 928h
mov r14, rdx
mov r12, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea r15, [rbp+var_260]
mov edx, 0C8h
mov rdi, r15
xor esi, esi
call _memset
xorps xmm0, xmm0
movups xmmword ptr [r15-58h], xmm0
movups xmmword ptr [r15-4Fh], xmm0
lea r13, [rbp+var_190]
mov rdi, r13
call my_xml_parser_create
lea rsi, cs_enter
mov rdi, r13
call my_xml_set_enter_handler
lea rsi, cs_value
mov rdi, r13
call my_xml_set_value_handler
lea rsi, cs_leave
mov rdi, r13
call my_xml_set_leave_handler
mov [rbp+var_948], rbx
mov [r15+0C8h], rbx
lea rbx, [rbp+var_940]
mov rdi, r13
mov rsi, rbx
call my_xml_set_user_data
mov rdi, r13
mov rsi, r12
mov rdx, r14
call my_xml_parse
mov r14d, eax
mov rdi, r13
call my_xml_parser_free
mov rdi, [r15-58h]
mov rax, [rbx+7A8h]
call qword ptr [rax+98h]
test r14d, r14d
jz short loc_52E8D
lea rdi, [rbp+var_190]
call my_xml_error_string
mov rdi, rax
call _strlen
add rax, 20h ; ' '
cmp rax, 7Fh
ja short loc_52E8D
lea rbx, [rbp+var_190]
mov rdi, rbx
call my_xml_error_lineno
lea r15d, [rax+1]
mov rdi, rbx
call my_xml_error_pos
mov r12, rax
mov rdi, rbx
call my_xml_error_string
mov [rsp+950h+var_950], rax
lea rcx, aAtLineDPosDS; "at line %d pos %d: %s"
mov edx, 80h
mov rdi, [rbp+var_948]
mov esi, 1
mov r8d, r15d
mov r9d, r12d
xor eax, eax
call ___sprintf_chk
loc_52E8D:
test r14d, r14d
setnz al
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_52EB4
add rsp, 928h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_52EB4:
call ___stack_chk_fail
| bool my_parse_charset_xml(long long a1, long long a2, long long a3)
{
int v4; // r14d
long long v5; // rax
int v6; // r15d
int v7; // r12d
const char *v8; // rax
_QWORD v10[220]; // [rsp+10h] [rbp-940h] BYREF
_BYTE v11[200]; // [rsp+6F0h] [rbp-260h] BYREF
long long v12; // [rsp+7B8h] [rbp-198h]
_BYTE v13[352]; // [rsp+7C0h] [rbp-190h] BYREF
unsigned long long v14; // [rsp+920h] [rbp-30h]
v14 = __readfsqword(0x28u);
memset(v11, 0LL, sizeof(v11));
memset(&v10[209], 0, 25);
my_xml_parser_create(v13);
my_xml_set_enter_handler(v13, cs_enter);
my_xml_set_value_handler(v13, cs_value);
my_xml_set_leave_handler(v13, cs_leave);
v12 = a1;
my_xml_set_user_data(v13, v10);
v4 = my_xml_parse(v13, a2, a3);
my_xml_parser_free(v13);
(*(void ( **)(_QWORD))(v12 + 152))(v10[209]);
if ( v4 )
{
v5 = my_xml_error_string(v13);
if ( (unsigned long long)(strlen(v5) + 32) <= 0x7F )
{
v6 = my_xml_error_lineno(v13) + 1;
v7 = my_xml_error_pos(v13);
v8 = (const char *)my_xml_error_string(v13);
__sprintf_chk(a1, 1LL, 128LL, "at line %d pos %d: %s", v6, v7, v8);
}
}
return v4 != 0;
}
| my_parse_charset_xml:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x928
MOV R14,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA R15,[RBP + -0x260]
MOV EDX,0xc8
MOV RDI,R15
XOR ESI,ESI
CALL 0x00124160
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + -0x58],XMM0
MOVUPS xmmword ptr [R15 + -0x4f],XMM0
LEA R13,[RBP + -0x190]
MOV RDI,R13
CALL 0x00159f9c
LEA RSI,[0x152eb9]
MOV RDI,R13
CALL 0x0015a011
LEA RSI,[0x152fa6]
MOV RDI,R13
CALL 0x0015a004
LEA RSI,[0x1537ae]
MOV RDI,R13
CALL 0x0015a01e
MOV qword ptr [RBP + -0x948],RBX
MOV qword ptr [R15 + 0xc8],RBX
LEA RBX,[RBP + -0x940]
MOV RDI,R13
MOV RSI,RBX
CALL 0x0015a02b
MOV RDI,R13
MOV RSI,R12
MOV RDX,R14
CALL 0x001594fc
MOV R14D,EAX
MOV RDI,R13
CALL 0x00159fd8
MOV RDI,qword ptr [R15 + -0x58]
MOV RAX,qword ptr [RBX + 0x7a8]
CALL qword ptr [RAX + 0x98]
TEST R14D,R14D
JZ 0x00152e8d
LEA RDI,[RBP + -0x190]
CALL 0x0015a038
MOV RDI,RAX
CALL 0x00124100
ADD RAX,0x20
CMP RAX,0x7f
JA 0x00152e8d
LEA RBX,[RBP + -0x190]
MOV RDI,RBX
CALL 0x0015a075
LEA R15D,[RAX + 0x1]
MOV RDI,RBX
CALL 0x0015a042
MOV R12,RAX
MOV RDI,RBX
CALL 0x0015a038
MOV qword ptr [RSP],RAX
LEA RCX,[0x15dd40]
MOV EDX,0x80
MOV RDI,qword ptr [RBP + -0x948]
MOV ESI,0x1
MOV R8D,R15D
MOV R9D,R12D
XOR EAX,EAX
CALL 0x001241a0
LAB_00152e8d:
TEST R14D,R14D
SETNZ AL
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00152eb4
ADD RSP,0x928
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00152eb4:
CALL 0x001242e0
|
bool my_parse_charset_xml(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
int iVar2;
int4 uVar3;
char *__s;
size_t sVar4;
int8 uVar5;
long in_FS_OFFSET;
int1 local_948 [1672];
int8 local_2c0;
int1 uStack_2b8;
int7 uStack_2b7;
int1 uStack_2b0;
int8 uStack_2af;
int1 local_268 [200];
long local_1a0;
int1 local_198 [352];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
memset(local_268,0,200);
local_2c0 = 0;
uStack_2b8 = 0;
uStack_2b7 = 0;
uStack_2b0 = 0;
uStack_2af = 0;
my_xml_parser_create(local_198);
my_xml_set_enter_handler(local_198,cs_enter);
my_xml_set_value_handler(local_198,cs_value);
my_xml_set_leave_handler(local_198,cs_leave);
local_1a0 = param_1;
my_xml_set_user_data(local_198,local_948);
iVar1 = my_xml_parse(local_198,param_2,param_3);
my_xml_parser_free(local_198);
(**(code **)(local_1a0 + 0x98))(local_2c0);
if (iVar1 != 0) {
__s = (char *)my_xml_error_string(local_198);
sVar4 = strlen(__s);
if (sVar4 + 0x20 < 0x80) {
iVar2 = my_xml_error_lineno(local_198);
uVar3 = my_xml_error_pos(local_198);
uVar5 = my_xml_error_string(local_198);
__sprintf_chk(param_1,1,0x80,"at line %d pos %d: %s",iVar2 + 1,uVar3,uVar5);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return iVar1 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
47,139 | sort_locks | eloqsql/mysys/thr_lock.c | static void sort_locks(THR_LOCK_DATA **data,uint count)
{
THR_LOCK_DATA **pos,**end,**prev,*tmp;
/* Sort locks with insertion sort (fast because almost always few locks) */
for (pos=data+1,end=data+count; pos < end ; pos++)
{
tmp= *pos;
if (LOCK_CMP(tmp,pos[-1]))
{
prev=pos;
do {
prev[0]=prev[-1];
} while (--prev != data && LOCK_CMP(tmp,prev[-1]));
prev[0]=tmp;
}
}
} | O0 | c | sort_locks:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xf78e9
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movq -0x8(%rax), %rsi
callq 0xf9130
cmpl $0x0, %eax
je 0xf78d6
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
addq $-0x8, %rcx
movq %rcx, -0x28(%rbp)
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x31(%rbp)
je 0xf78c4
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rax
movq -0x8(%rax), %rsi
callq 0xf9130
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xf7884
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0xf78d8
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0xf784d
addq $0x40, %rsp
popq %rbp
retq
nop
| sort_locks:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
shl rcx, 3
add rax, rcx
mov [rbp+var_20], rax
loc_F784D:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb loc_F78E9
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
mov rax, [rbp+var_18]
mov rsi, [rax-8]
call LOCK_CMP
cmp eax, 0
jz short loc_F78D6
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
loc_F7884:
mov rax, [rbp+var_28]
mov rcx, [rax-8]
mov rax, [rbp+var_28]
mov [rax], rcx
mov rcx, [rbp+var_28]
add rcx, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_28], rcx
xor eax, eax
cmp rcx, [rbp+var_8]
mov [rbp+var_31], al
jz short loc_F78C4
mov rdi, [rbp+var_30]
mov rax, [rbp+var_28]
mov rsi, [rax-8]
call LOCK_CMP
cmp eax, 0
setnz al
mov [rbp+var_31], al
loc_F78C4:
mov al, [rbp+var_31]
test al, 1
jnz short loc_F7884
mov rcx, [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax], rcx
loc_F78D6:
jmp short $+2
loc_F78D8:
mov rax, [rbp+var_18]
add rax, 8
mov [rbp+var_18], rax
jmp loc_F784D
loc_F78E9:
add rsp, 40h
pop rbp
retn
| _QWORD * sort_locks(_QWORD *a1, int a2)
{
_QWORD *result; // rax
bool v3; // [rsp+Fh] [rbp-31h]
long long v4; // [rsp+10h] [rbp-30h]
_QWORD *v5; // [rsp+18h] [rbp-28h]
_QWORD *i; // [rsp+28h] [rbp-18h]
for ( i = a1 + 1; ; ++i )
{
result = i;
if ( i >= &a1[a2] )
break;
v4 = *i;
if ( (unsigned int)LOCK_CMP(*i, *(i - 1)) )
{
v5 = i;
do
{
*v5 = *(v5 - 1);
--v5;
v3 = 0;
if ( v5 != a1 )
v3 = (unsigned int)LOCK_CMP(v4, *(v5 - 1)) != 0;
}
while ( v3 );
*v5 = v4;
}
}
return result;
}
| sort_locks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001f784d:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001f78e9
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + -0x8]
CALL 0x001f9130
CMP EAX,0x0
JZ 0x001f78d6
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
LAB_001f7884:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,-0x8
MOV qword ptr [RBP + -0x28],RCX
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RBP + -0x31],AL
JZ 0x001f78c4
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + -0x8]
CALL 0x001f9130
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_001f78c4:
MOV AL,byte ptr [RBP + -0x31]
TEST AL,0x1
JNZ 0x001f7884
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
LAB_001f78d6:
JMP 0x001f78d8
LAB_001f78d8:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001f784d
LAB_001f78e9:
ADD RSP,0x40
POP RBP
RET
|
void sort_locks(int8 *param_1,uint param_2)
{
int8 uVar1;
int iVar2;
int8 *puVar3;
bool bVar4;
int8 *local_30;
int8 *local_20;
for (local_20 = param_1 + 1; local_20 < param_1 + param_2; local_20 = local_20 + 1) {
uVar1 = *local_20;
iVar2 = LOCK_CMP(uVar1,local_20[-1]);
if (iVar2 != 0) {
local_30 = local_20;
do {
*local_30 = local_30[-1];
puVar3 = local_30 + -1;
bVar4 = false;
if (puVar3 != param_1) {
iVar2 = LOCK_CMP(uVar1,local_30[-2]);
bVar4 = iVar2 != 0;
}
local_30 = puVar3;
} while (bVar4);
*puVar3 = uVar1;
}
}
return;
}
| |
47,140 | js_promise_resolve | bluesky950520[P]quickjs/quickjs.c | static JSValue js_promise_resolve(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
JSValue result_promise, resolving_funcs[2], ret;
BOOL is_reject = magic;
if (!JS_IsObject(this_val))
return JS_ThrowTypeErrorNotAnObject(ctx);
if (!is_reject && JS_GetOpaque(argv[0], JS_CLASS_PROMISE)) {
JSValue ctor;
BOOL is_same;
ctor = JS_GetProperty(ctx, argv[0], JS_ATOM_constructor);
if (JS_IsException(ctor))
return ctor;
is_same = js_same_value(ctx, ctor, this_val);
JS_FreeValue(ctx, ctor);
if (is_same)
return js_dup(argv[0]);
}
result_promise = js_new_promise_capability(ctx, resolving_funcs, this_val);
if (JS_IsException(result_promise))
return result_promise;
ret = JS_Call(ctx, resolving_funcs[is_reject], JS_UNDEFINED, 1, argv);
JS_FreeValue(ctx, resolving_funcs[0]);
JS_FreeValue(ctx, resolving_funcs[1]);
if (JS_IsException(ret)) {
JS_FreeValue(ctx, result_promise);
return ret;
}
JS_FreeValue(ctx, ret);
return result_promise;
} | O2 | c | js_promise_resolve:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r13
movq %rdi, %rbx
cmpl $-0x1, %r13d
jne 0x47766
movl %r9d, %ebp
movq %r8, %r12
movq %rsi, %r14
testl %r9d, %r9d
jne 0x4777a
movq 0x8(%r12), %rdx
cmpl $-0x1, %edx
jne 0x4777a
movq (%r12), %rsi
cmpw $0x31, 0x6(%rsi)
jne 0x4777a
cmpq $0x0, 0x30(%rsi)
je 0x4777a
movq %r12, 0x18(%rsp)
pushq $0x3d
popq %rcx
movq %rbx, %rdi
callq 0x1b043
movq %rax, %r15
movq %rdx, %r12
cmpl $0x6, %r12d
je 0x47811
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %r13, %r8
callq 0x1ff32
movl %eax, 0x14(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1801e
cmpl $0x0, 0x14(%rsp)
movq 0x18(%rsp), %r12
je 0x4777a
movq (%r12), %r15
movq 0x8(%r12), %r12
cmpl $-0x9, %r12d
jb 0x47811
incl (%r15)
jmp 0x47811
movq %rbx, %rdi
callq 0x1d5e1
pushq $0x6
popq %r12
xorl %r15d, %r15d
jmp 0x47811
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
movq %r13, %rcx
callq 0x2f970
movq %rax, %r14
movq %rdx, %r13
cmpl $0x6, %r13d
je 0x4780b
movslq %ebp, %rax
shlq $0x4, %rax
movq 0x20(%rsp,%rax), %rsi
movq 0x28(%rsp,%rax), %rdx
movq %r12, (%rsp)
pushq $0x3
popq %r8
pushq $0x1
popq %r9
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x21eb6
movq %rax, %r15
movq %rdx, %r12
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
movq %rbx, %rdi
cmpl $0x6, %r12d
jne 0x47800
movq %r14, %rsi
movq %r13, %rdx
callq 0x1801e
jmp 0x47811
movq %r15, %rsi
movq %r12, %rdx
callq 0x1801e
movq %r14, %r15
movq %r13, %r12
movq %r15, %rax
movq %r12, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_promise_resolve:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r13, rdx
mov rbx, rdi
cmp r13d, 0FFFFFFFFh
jnz loc_47766
mov ebp, r9d
mov r12, r8
mov r14, rsi
test r9d, r9d
jnz loc_4777A
mov rdx, [r12+8]
cmp edx, 0FFFFFFFFh
jnz loc_4777A
mov rsi, [r12]
cmp word ptr [rsi+6], 31h ; '1'
jnz loc_4777A
cmp qword ptr [rsi+30h], 0
jz loc_4777A
mov [rsp+78h+var_60], r12
push 3Dh ; '='
pop rcx
mov rdi, rbx
call JS_GetProperty
mov r15, rax
mov r12, rdx
cmp r12d, 6
jz loc_47811
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov rcx, r14
mov r8, r13
call js_same_value
mov [rsp+78h+var_64], eax
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call JS_FreeValue
cmp [rsp+78h+var_64], 0
mov r12, [rsp+78h+var_60]
jz short loc_4777A
mov r15, [r12]
mov r12, [r12+8]
cmp r12d, 0FFFFFFF7h
jb loc_47811
inc dword ptr [r15]
jmp loc_47811
loc_47766:
mov rdi, rbx
call JS_ThrowTypeErrorNotAnObject
push 6
pop r12
xor r15d, r15d
jmp loc_47811
loc_4777A:
lea rsi, [rsp+78h+var_58]
mov rdi, rbx
mov rdx, r14
mov rcx, r13
call js_new_promise_capability
mov r14, rax
mov r13, rdx
cmp r13d, 6
jz short loc_4780B
movsxd rax, ebp
shl rax, 4
mov rsi, [rsp+rax+78h+var_58]
mov rdx, [rsp+rax+78h+var_50]
mov [rsp+78h+var_78], r12
push 3
pop r8
push 1
pop r9
mov rdi, rbx
xor ecx, ecx
call JS_Call
mov r15, rax
mov r12, rdx
mov rsi, [rsp+78h+var_58]
mov rdx, [rsp+78h+var_50]
mov rdi, rbx
call JS_FreeValue
mov rsi, [rsp+78h+var_48]
mov rdx, [rsp+78h+var_40]
mov rdi, rbx
call JS_FreeValue
mov rdi, rbx
cmp r12d, 6
jnz short loc_47800
mov rsi, r14
mov rdx, r13
call JS_FreeValue
jmp short loc_47811
loc_47800:
mov rsi, r15
mov rdx, r12
call JS_FreeValue
loc_4780B:
mov r15, r14
mov r12, r13
loc_47811:
mov rax, r15
mov rdx, r12
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _DWORD * js_promise_resolve(
long long a1,
_DWORD *a2,
unsigned long long a3,
long long a4,
_QWORD *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v15; // ebp
long long v16; // r12
long long v18; // rsi
_DWORD *Property; // rax
long long v20; // rdx
_DWORD *v21; // r15
long long v22; // r12
unsigned long long v23; // r14
long long v24; // rdx
long long v25; // r13
long long v26; // rdx
long long v27; // r12
char v29; // [rsp+0h] [rbp-78h]
int v30; // [rsp+14h] [rbp-64h]
long long v32; // [rsp+20h] [rbp-58h] BYREF
long long v33[10]; // [rsp+28h] [rbp-50h]
if ( (_DWORD)a3 != -1 )
{
JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, (long long)a2, a3, a4, (long long)a5, a6, v29);
return 0LL;
}
v15 = a6;
v16 = (long long)a5;
if ( (_DWORD)a6 )
goto LABEL_11;
if ( (unsigned int)a5[1] != -1 )
goto LABEL_11;
v18 = *a5;
if ( *(_WORD *)(*a5 + 6LL) != 49 || !*(_QWORD *)(v18 + 48) )
goto LABEL_11;
Property = (_DWORD *)JS_GetProperty(a1, v18, -1, 61);
v21 = Property;
v22 = v20;
if ( (_DWORD)v20 == 6 )
return v21;
v30 = js_same_value(a1, Property, v20, a2, a3);
JS_FreeValue(a1, (long long)v21, v22);
v16 = (long long)a5;
if ( !v30 )
{
LABEL_11:
v23 = js_new_promise_capability(
a1,
(long long)&v32,
(unsigned long long)a2,
a3,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14);
v25 = v24;
if ( (_DWORD)v24 != 6 )
{
v21 = (_DWORD *)JS_Call(a1, v33[2 * v15 - 1], v33[2 * v15], 0, 3, 1, v16);
v27 = v26;
JS_FreeValue(a1, v32, v33[0]);
JS_FreeValue(a1, v33[1], v33[2]);
if ( (_DWORD)v27 == 6 )
{
JS_FreeValue(a1, v23, v25);
return v21;
}
JS_FreeValue(a1, (long long)v21, v27);
}
return (_DWORD *)v23;
}
v21 = (_DWORD *)*a5;
if ( (unsigned int)a5[1] >= 0xFFFFFFF7 )
++*v21;
return v21;
}
| js_promise_resolve:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R13,RDX
MOV RBX,RDI
CMP R13D,-0x1
JNZ 0x00147766
MOV EBP,R9D
MOV R12,R8
MOV R14,RSI
TEST R9D,R9D
JNZ 0x0014777a
MOV RDX,qword ptr [R12 + 0x8]
CMP EDX,-0x1
JNZ 0x0014777a
MOV RSI,qword ptr [R12]
CMP word ptr [RSI + 0x6],0x31
JNZ 0x0014777a
CMP qword ptr [RSI + 0x30],0x0
JZ 0x0014777a
MOV qword ptr [RSP + 0x18],R12
PUSH 0x3d
POP RCX
MOV RDI,RBX
CALL 0x0011b043
MOV R15,RAX
MOV R12,RDX
CMP R12D,0x6
JZ 0x00147811
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV RCX,R14
MOV R8,R13
CALL 0x0011ff32
MOV dword ptr [RSP + 0x14],EAX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0011801e
CMP dword ptr [RSP + 0x14],0x0
MOV R12,qword ptr [RSP + 0x18]
JZ 0x0014777a
MOV R15,qword ptr [R12]
MOV R12,qword ptr [R12 + 0x8]
CMP R12D,-0x9
JC 0x00147811
INC dword ptr [R15]
JMP 0x00147811
LAB_00147766:
MOV RDI,RBX
CALL 0x0011d5e1
PUSH 0x6
POP R12
XOR R15D,R15D
JMP 0x00147811
LAB_0014777a:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
MOV RDX,R14
MOV RCX,R13
CALL 0x0012f970
MOV R14,RAX
MOV R13,RDX
CMP R13D,0x6
JZ 0x0014780b
MOVSXD RAX,EBP
SHL RAX,0x4
MOV RSI,qword ptr [RSP + RAX*0x1 + 0x20]
MOV RDX,qword ptr [RSP + RAX*0x1 + 0x28]
MOV qword ptr [RSP],R12
PUSH 0x3
POP R8
PUSH 0x1
POP R9
MOV RDI,RBX
XOR ECX,ECX
CALL 0x00121eb6
MOV R15,RAX
MOV R12,RDX
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV RDI,RBX
CALL 0x0011801e
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV RDI,RBX
CALL 0x0011801e
MOV RDI,RBX
CMP R12D,0x6
JNZ 0x00147800
MOV RSI,R14
MOV RDX,R13
CALL 0x0011801e
JMP 0x00147811
LAB_00147800:
MOV RSI,R15
MOV RDX,R12
CALL 0x0011801e
LAB_0014780b:
MOV R15,R14
MOV R12,R13
LAB_00147811:
MOV RAX,R15
MOV RDX,R12
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_promise_resolve(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int1 (*param_5) [16],int param_6)
{
long lVar1;
int iVar2;
int1 auVar3 [16];
int1 auVar4 [16];
int8 local_58 [5];
if ((int)param_3 != -1) {
JS_ThrowTypeErrorNotAnObject(param_1);
return ZEXT816(6) << 0x40;
}
if ((((param_6 == 0) && ((int)*(int8 *)(*param_5 + 8) == -1)) &&
(lVar1 = *(long *)*param_5, *(short *)(lVar1 + 6) == 0x31)) && (*(long *)(lVar1 + 0x30) != 0))
{
auVar3 = JS_GetProperty(param_1,lVar1,*(int8 *)(*param_5 + 8),0x3d);
if (auVar3._8_4_ == 6) {
return auVar3;
}
iVar2 = js_same_value(param_1,auVar3._0_8_,auVar3._8_8_,param_2,param_3);
JS_FreeValue(param_1,auVar3._0_8_,auVar3._8_8_);
if (iVar2 != 0) {
auVar3 = *param_5;
if ((uint)*(int8 *)(*param_5 + 8) < 0xfffffff7) {
return *param_5;
}
**(int **)*param_5 = **(int **)*param_5 + 1;
return auVar3;
}
}
auVar3 = js_new_promise_capability(param_1,local_58,param_2,param_3);
if (auVar3._8_4_ != 6) {
auVar4 = JS_Call(param_1,local_58[(long)param_6 * 2],local_58[(long)param_6 * 2 + 1],0,3,1,
param_5);
JS_FreeValue(param_1,local_58[0],local_58[1]);
JS_FreeValue(param_1,local_58[2],local_58[3]);
if (auVar4._8_4_ == 6) {
JS_FreeValue(param_1,auVar3._0_8_,auVar3._8_8_);
auVar3 = auVar4;
}
else {
JS_FreeValue(param_1,auVar4._0_8_,auVar4._8_8_);
}
}
return auVar3;
}
| |
47,141 | my_freopen | eloqsql/mysys/my_fopen.c | FILE *my_freopen(const char *path, const char *mode, FILE *stream)
{
FILE *result;
#if defined(_WIN32)
result= my_win_freopen(path, mode, stream);
#else
result= freopen(path, mode, stream);
#endif
return result;
} | O3 | c | my_freopen:
pushq %rbp
movq %rsp, %rbp
popq %rbp
jmp 0x24320
| my_freopen:
push rbp
mov rbp, rsp
pop rbp
jmp _freopen64
| long long my_freopen()
{
return freopen64();
}
| my_freopen:
PUSH RBP
MOV RBP,RSP
POP RBP
JMP 0x00124320
|
void my_freopen(char *param_1,char *param_2,FILE *param_3)
{
freopen64(param_1,param_2,param_3);
return;
}
| |
47,142 | ma_scramble_323 | eloqsql/libmariadb/libmariadb/ma_password.c | char *ma_scramble_323(char *to, const char *message, const char *password)
{
struct rand_struct rand_st;
ulong hash_pass[2], hash_message[2];
if (password && password[0])
{
char extra, *to_start=to;
const char *end_scramble323= message + SCRAMBLE_LENGTH_323;
ma_hash_password(hash_pass,password, (uint) strlen(password));
/* Don't use strlen, could be > SCRAMBLE_LENGTH_323 ! */
ma_hash_password(hash_message, message, SCRAMBLE_LENGTH_323);
ma_randominit(&rand_st, hash_pass[0] ^ hash_message[0],
hash_pass[1] ^ hash_message[1]);
for (; message < end_scramble323; message++)
*to++= (char) (floor(rnd(&rand_st) * 31) + 64);
extra=(char) (floor(rnd(&rand_st) * 31));
while (to_start != to)
*(to_start++)^= extra;
}
*to= 0;
return to;
} | O0 | c | ma_scramble_323:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x304ef
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x304ef
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x78(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
callq 0x17250
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movl %eax, %eax
movl %eax, %edx
callq 0x300a0
leaq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0x300a0
movq -0x50(%rbp), %rsi
xorq -0x60(%rbp), %rsi
movq -0x48(%rbp), %rdx
xorq -0x58(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x2ff80
movq -0x10(%rbp), %rax
cmpq -0x78(%rbp), %rax
jae 0x304a6
leaq -0x38(%rbp), %rdi
callq 0x30000
movsd 0x22f6c(%rip), %xmm1 # 0x533d8
mulsd %xmm1, %xmm0
callq 0x179d0
movsd 0x22f63(%rip), %xmm1 # 0x533e0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x30451
leaq -0x38(%rbp), %rdi
callq 0x30000
movsd 0x22f21(%rip), %xmm1 # 0x533d8
mulsd %xmm1, %xmm0
callq 0x179d0
cvttsd2si %xmm0, %eax
movb %al, -0x61(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x304ed
movsbl -0x61(%rbp), %edx
movq -0x70(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x70(%rbp)
movsbl (%rax), %ecx
xorl %edx, %ecx
movb %cl, (%rax)
jmp 0x304c7
jmp 0x304ef
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| ma_scramble_323:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
cmp [rbp+var_18], 0
jz loc_304EF
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 0
jz loc_304EF
mov rax, [rbp+var_8]
mov [rbp+var_70], rax
mov rax, [rbp+var_10]
add rax, 8
mov [rbp+var_78], rax
lea rax, [rbp+var_50]
mov [rbp+var_88], rax
mov rax, [rbp+var_18]
mov [rbp+var_80], rax
mov rdi, [rbp+var_18]
call _strlen
mov rdi, [rbp+var_88]
mov rsi, [rbp+var_80]
mov eax, eax
mov edx, eax
call ma_hash_password
lea rdi, [rbp+var_60]
mov rsi, [rbp+var_10]
mov edx, 8
call ma_hash_password
mov rsi, [rbp+var_50]
xor rsi, [rbp+var_60]
mov rdx, [rbp+var_48]
xor rdx, [rbp+var_58]
lea rdi, [rbp+var_38]
call ma_randominit
loc_30451:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_78]
jnb short loc_304A6
lea rdi, [rbp+var_38]
call rnd
movsd xmm1, cs:qword_533D8
mulsd xmm0, xmm1
call _floor
movsd xmm1, cs:qword_533E0
addsd xmm0, xmm1
cvttsd2si eax, xmm0
mov cl, al
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_30451
loc_304A6:
lea rdi, [rbp+var_38]
call rnd
movsd xmm1, cs:qword_533D8
mulsd xmm0, xmm1
call _floor
cvttsd2si eax, xmm0
mov [rbp+var_61], al
loc_304C7:
mov rax, [rbp+var_70]
cmp rax, [rbp+var_8]
jz short loc_304ED
movsx edx, [rbp+var_61]
mov rax, [rbp+var_70]
mov rcx, rax
add rcx, 1
mov [rbp+var_70], rcx
movsx ecx, byte ptr [rax]
xor ecx, edx
mov [rax], cl
jmp short loc_304C7
loc_304ED:
jmp short $+2
loc_304EF:
mov rax, [rbp+var_8]
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
| _BYTE * ma_scramble_323(_BYTE *a1, _BYTE *a2, _BYTE *a3)
{
unsigned int v3; // eax
double v4; // xmm0_8
double v5; // xmm0_8
_BYTE *v6; // rax
double v7; // xmm0_8
_BYTE *v8; // rax
_BYTE *v10; // [rsp+10h] [rbp-80h]
_BYTE *v11; // [rsp+18h] [rbp-78h]
_BYTE *v12; // [rsp+20h] [rbp-70h]
char v13; // [rsp+2Fh] [rbp-61h]
_QWORD v14[2]; // [rsp+30h] [rbp-60h] BYREF
_QWORD v15[3]; // [rsp+40h] [rbp-50h] BYREF
_BYTE v16[32]; // [rsp+58h] [rbp-38h] BYREF
_BYTE *v17; // [rsp+78h] [rbp-18h]
_BYTE *v18; // [rsp+80h] [rbp-10h]
_BYTE *v19; // [rsp+88h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
if ( a3 && *v17 )
{
v12 = v19;
v11 = v18 + 8;
v10 = v17;
v3 = strlen(v17);
ma_hash_password(v15, v10, v3);
ma_hash_password(v14, v18, 8LL);
ma_randominit((long long)v16, v14[0] ^ v15[0], v14[1] ^ v15[1]);
while ( v18 < v11 )
{
v4 = rnd((long long)v16);
v5 = floor(v4 * 31.0);
v6 = v19++;
*v6 = (int)(v5 + 64.0);
++v18;
}
v7 = rnd((long long)v16);
v13 = (int)floor(v7 * 31.0);
while ( v12 != v19 )
{
v8 = v12++;
*v8 ^= v13;
}
}
*v19 = 0;
return v19;
}
| ma_scramble_323:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001304ef
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001304ef
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x8
MOV qword ptr [RBP + -0x78],RAX
LEA RAX,[RBP + -0x50]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x80],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00117250
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x80]
MOV EAX,EAX
MOV EDX,EAX
CALL 0x001300a0
LEA RDI,[RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0x8
CALL 0x001300a0
MOV RSI,qword ptr [RBP + -0x50]
XOR RSI,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x48]
XOR RDX,qword ptr [RBP + -0x58]
LEA RDI,[RBP + -0x38]
CALL 0x0012ff80
LAB_00130451:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x78]
JNC 0x001304a6
LEA RDI,[RBP + -0x38]
CALL 0x00130000
MOVSD XMM1,qword ptr [0x001533d8]
MULSD XMM0,XMM1
CALL 0x001179d0
MOVSD XMM1,qword ptr [0x001533e0]
ADDSD XMM0,XMM1
CVTTSD2SI EAX,XMM0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00130451
LAB_001304a6:
LEA RDI,[RBP + -0x38]
CALL 0x00130000
MOVSD XMM1,qword ptr [0x001533d8]
MULSD XMM0,XMM1
CALL 0x001179d0
CVTTSD2SI EAX,XMM0
MOV byte ptr [RBP + -0x61],AL
LAB_001304c7:
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x8]
JZ 0x001304ed
MOVSX EDX,byte ptr [RBP + -0x61]
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x70],RCX
MOVSX ECX,byte ptr [RAX]
XOR ECX,EDX
MOV byte ptr [RAX],CL
JMP 0x001304c7
LAB_001304ed:
JMP 0x001304ef
LAB_001304ef:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
byte * ma_scramble_323(byte *param_1,ulong param_2,char *param_3)
{
size_t sVar1;
double dVar2;
byte *local_78;
ulong local_68;
ulong local_60;
ulong local_58;
ulong local_50;
int1 local_40 [32];
char *local_20;
ulong local_18;
byte *local_10;
local_10 = param_1;
if ((param_3 != (char *)0x0) && (*param_3 != '\0')) {
local_20 = param_3;
local_18 = param_2;
sVar1 = strlen(param_3);
ma_hash_password(&local_58,param_3,sVar1 & 0xffffffff);
ma_hash_password(&local_68,local_18,8);
ma_randominit(local_40,local_58 ^ local_68,local_50 ^ local_60);
for (; local_18 < param_2 + 8; local_18 = local_18 + 1) {
dVar2 = (double)rnd(local_40);
dVar2 = floor(dVar2 * DAT_001533d8);
*local_10 = (byte)(int)(dVar2 + DAT_001533e0);
local_10 = local_10 + 1;
}
dVar2 = (double)rnd(local_40);
dVar2 = floor(dVar2 * DAT_001533d8);
local_78 = param_1;
while (local_78 != local_10) {
*local_78 = *local_78 ^ (byte)(int)dVar2;
local_78 = local_78 + 1;
}
}
*local_10 = 0;
return local_10;
}
| |
47,143 | gguf_set_val_str | monkey531[P]llama/ggml/src/gguf.cpp | void gguf_set_val_str(struct gguf_context * ctx, const char * key, const char * val) {
gguf_check_reserved_keys(key, val);
gguf_remove_key(ctx, key);
ctx->kv.emplace_back(key, std::string(val));
} | O0 | cpp | gguf_set_val_str:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x6f(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x46d60
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x70(%rsp), %rdi
callq 0x46980
jmp 0x90831
movq 0x90(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x90960
jmp 0x90845
leaq 0x70(%rsp), %rdi
callq 0x42530
leaq 0x6f(%rsp), %rdi
callq 0x44190
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x451b0
movq 0xa0(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x46d60
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x46980
jmp 0x908b1
movq 0x8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x467b0
jmp 0x908ca
leaq 0x38(%rsp), %rdi
callq 0x42530
leaq 0x37(%rsp), %rdi
callq 0x44190
addq $0xa8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0x9090e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x42530
leaq 0x6f(%rsp), %rdi
callq 0x44190
jmp 0x9094c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0x90942
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x42530
leaq 0x37(%rsp), %rdi
callq 0x44190
movq 0x60(%rsp), %rdi
callq 0x46d10
nopw %cs:(%rax,%rax)
| gguf_set_val_str:
sub rsp, 0A8h
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov [rsp+0A8h+var_18], rdx
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_88], rax
lea rdi, [rsp+0A8h+var_39]
mov [rsp+0A8h+var_80], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+0A8h+var_88]
mov rdx, [rsp+0A8h+var_80]
lea rdi, [rsp+0A8h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_90831:
mov rsi, [rsp+0A8h+var_18]
lea rdi, [rsp+0A8h+var_38]
call _ZL24gguf_check_reserved_keysIPKcEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_; gguf_check_reserved_keys<char const*>(std::string const&,char const*)
jmp short $+2
loc_90845:
lea rdi, [rsp+0A8h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_39]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rsp+0A8h+var_8]
mov rsi, [rsp+0A8h+var_10]
call _gguf_remove_key
mov rax, [rsp+0A8h+var_8]
add rax, 8
mov [rsp+0A8h+var_A0], rax
mov rax, [rsp+0A8h+var_18]
mov [rsp+0A8h+var_98], rax
lea rdi, [rsp+0A8h+var_71]
mov [rsp+0A8h+var_90], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+0A8h+var_98]
mov rdx, [rsp+0A8h+var_90]
lea rdi, [rsp+0A8h+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_908B1:
mov rdi, [rsp+0A8h+var_A0]
lea rsi, [rsp+0A8h+var_10]
lea rdx, [rsp+0A8h+var_70]
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,std::string>(char const*&,std::string &&)
jmp short $+2
loc_908CA:
lea rdi, [rsp+0A8h+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_71]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
add rsp, 0A8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_9090E
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_9090E:
lea rdi, [rsp+arg_67]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_9094C
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_90942
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_90942:
lea rdi, [rsp+arg_2F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_9094C:
mov rdi, [rsp+arg_58]
call __Unwind_Resume
| long long gguf_set_val_str(long long a1, long long a2, long long a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v6; // ecx
int v7; // r8d
int v8; // r9d
long long v10; // [rsp+8h] [rbp-A0h]
int v11; // [rsp+10h] [rbp-98h]
char v12; // [rsp+37h] [rbp-71h] BYREF
_BYTE v13[55]; // [rsp+38h] [rbp-70h] BYREF
char v14; // [rsp+6Fh] [rbp-39h] BYREF
_BYTE v15[32]; // [rsp+70h] [rbp-38h] BYREF
long long v16; // [rsp+90h] [rbp-18h]
long long v17; // [rsp+98h] [rbp-10h] BYREF
long long v18; // [rsp+A0h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((unsigned int)v15, a2, (unsigned int)&v14, v3, v4, v5);
gguf_check_reserved_keys<char const*>(v15, v16);
std::string::~string(v15);
std::allocator<char>::~allocator(&v14);
gguf_remove_key(v18, v17);
v10 = v18 + 8;
v11 = v16;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((unsigned int)v13, v11, (unsigned int)&v12, v6, v7, v8);
std::vector<gguf_kv>::emplace_back<char const*&,std::string>(v10, &v17, v13);
std::string::~string(v13);
return std::allocator<char>::~allocator(&v12);
}
| gguf_set_val_str:
SUB RSP,0xa8
MOV qword ptr [RSP + 0xa0],RDI
MOV qword ptr [RSP + 0x98],RSI
MOV qword ptr [RSP + 0x90],RDX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x20],RAX
LEA RDI,[RSP + 0x6f]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x00146d60
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
LAB_00190825:
LEA RDI,[RSP + 0x70]
CALL 0x00146980
JMP 0x00190831
LAB_00190831:
MOV RSI,qword ptr [RSP + 0x90]
LAB_00190839:
LEA RDI,[RSP + 0x70]
CALL 0x00190960
LAB_00190843:
JMP 0x00190845
LAB_00190845:
LEA RDI,[RSP + 0x70]
CALL 0x00142530
LEA RDI,[RSP + 0x6f]
CALL 0x00144190
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x98]
CALL 0x001451b0
MOV RAX,qword ptr [RSP + 0xa0]
ADD RAX,0x8
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x37]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00146d60
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
LAB_001908a5:
LEA RDI,[RSP + 0x38]
CALL 0x00146980
JMP 0x001908b1
LAB_001908b1:
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x98]
LEA RDX,[RSP + 0x38]
CALL 0x001467b0
LAB_001908c8:
JMP 0x001908ca
LAB_001908ca:
LEA RDI,[RSP + 0x38]
CALL 0x00142530
LEA RDI,[RSP + 0x37]
CALL 0x00144190
ADD RSP,0xa8
RET
|
void gguf_set_val_str(long param_1,char *param_2,char *param_3)
{
char *pcVar1;
vector<gguf_kv,std::allocator<gguf_kv>> *this;
allocator local_71;
string local_70 [55];
allocator local_39;
string local_38 [32];
char *local_18;
char *local_10;
long local_8;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
std::allocator<char>::allocator();
/* try { // try from 00190825 to 0019082e has its CatchHandler @ 001908e6 */
std::__cxx11::string::string<std::allocator<char>>(local_38,param_2,&local_39);
/* try { // try from 00190839 to 00190842 has its CatchHandler @ 001908f6 */
gguf_check_reserved_keys<char_const*>(local_38,local_18);
std::__cxx11::string::~string(local_38);
std::allocator<char>::~allocator((allocator<char> *)&local_39);
gguf_remove_key(local_8,local_10);
pcVar1 = local_18;
this = (vector<gguf_kv,std::allocator<gguf_kv>> *)(local_8 + 8);
std::allocator<char>::allocator();
/* try { // try from 001908a5 to 001908ae has its CatchHandler @ 0019091a */
std::__cxx11::string::string<std::allocator<char>>(local_70,pcVar1,&local_71);
/* try { // try from 001908b1 to 001908c7 has its CatchHandler @ 0019092a */
std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,std::__cxx11::string>
(this,&local_10,local_70);
std::__cxx11::string::~string(local_70);
std::allocator<char>::~allocator((allocator<char> *)&local_71);
return;
}
| |
47,144 | get_record_position | eloqsql/storage/maria/ma_blockrec.c | static uchar *get_record_position(MARIA_SHARE *share, uchar *buff,
uint record_number, uchar **end_of_data)
{
uint block_size= share->block_size;
uint number_of_records= (uint) buff[DIR_COUNT_OFFSET];
uchar *dir;
uchar *data;
uint offset, length;
#ifdef SANITY_CHECKS
if (record_number >= number_of_records ||
record_number > ((block_size - PAGE_HEADER_SIZE(share) - PAGE_SUFFIX_SIZE)
/ DIR_ENTRY_SIZE))
{
DBUG_PRINT("error",
("Wrong row number: record_number: %u number_of_records: %u",
record_number, number_of_records));
return 0;
}
#endif
dir= dir_entry_pos(buff, block_size, record_number);
offset= uint2korr(dir);
length= uint2korr(dir + 2);
#ifdef SANITY_CHECKS
if (offset < PAGE_HEADER_SIZE(share) ||
offset + length > (block_size -
number_of_records * DIR_ENTRY_SIZE -
PAGE_SUFFIX_SIZE))
{
DBUG_PRINT("error",
("Wrong row position: record_number: %u offset: %u "
"length: %u number_of_records: %u",
record_number, offset, length, number_of_records));
return 0;
}
#endif
data= buff + offset;
*end_of_data= data + length;
return data;
} | O0 | c | get_record_position:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x8(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jae 0x786c6
movl -0x1c(%rbp), %eax
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rdx
movl 0xc18(%rdx), %edx
addl $0xc, %edx
subl %edx, %ecx
subl $0x4, %ecx
shrl $0x2, %ecx
cmpl %ecx, %eax
jbe 0x786d7
jmp 0x786c8
jmp 0x786ca
movq $0x0, -0x8(%rbp)
jmp 0x78760
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x75000
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movzwl 0x2(%rax), %eax
movl %eax, -0x48(%rbp)
movl -0x44(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0xc18(%rcx), %ecx
addl $0xc, %ecx
cmpl %ecx, %eax
jb 0x7872b
movl -0x44(%rbp), %eax
addl -0x48(%rbp), %eax
movl -0x2c(%rbp), %ecx
movl -0x30(%rbp), %edx
shll $0x2, %edx
subl %edx, %ecx
subl $0x4, %ecx
cmpl %ecx, %eax
jbe 0x78739
jmp 0x7872d
jmp 0x7872f
movq $0x0, -0x8(%rbp)
jmp 0x78760
movq -0x18(%rbp), %rax
movl -0x44(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rcx
movl -0x48(%rbp), %eax
addq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| get_record_position:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov eax, [rax+7BCh]
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+8]
mov [rbp+var_30], eax
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_30]
jnb short loc_786C6
mov eax, [rbp+var_1C]
mov ecx, [rbp+var_2C]
mov rdx, [rbp+var_10]
mov edx, [rdx+0C18h]
add edx, 0Ch
sub ecx, edx
sub ecx, 4
shr ecx, 2
cmp eax, ecx
jbe short loc_786D7
loc_786C6:
jmp short $+2
loc_786C8:
jmp short $+2
loc_786CA:
mov [rbp+var_8], 0
jmp loc_78760
loc_786D7:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_2C]
mov edx, [rbp+var_1C]
call dir_entry_pos
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
movzx eax, word ptr [rax]
mov [rbp+var_44], eax
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+2]
mov [rbp+var_48], eax
mov eax, [rbp+var_44]
mov rcx, [rbp+var_10]
mov ecx, [rcx+0C18h]
add ecx, 0Ch
cmp eax, ecx
jb short loc_7872B
mov eax, [rbp+var_44]
add eax, [rbp+var_48]
mov ecx, [rbp+var_2C]
mov edx, [rbp+var_30]
shl edx, 2
sub ecx, edx
sub ecx, 4
cmp eax, ecx
jbe short loc_78739
loc_7872B:
jmp short $+2
loc_7872D:
jmp short $+2
loc_7872F:
mov [rbp+var_8], 0
jmp short loc_78760
loc_78739:
mov rax, [rbp+var_18]
mov ecx, [rbp+var_44]
add rax, rcx
mov [rbp+var_40], rax
mov rcx, [rbp+var_40]
mov eax, [rbp+var_48]
add rcx, rax
mov rax, [rbp+var_28]
mov [rax], rcx
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_78760:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long get_record_position(long long a1, long long a2, unsigned int a3, _QWORD *a4)
{
unsigned int v5; // [rsp+Ch] [rbp-44h]
unsigned __int16 *v6; // [rsp+18h] [rbp-38h]
unsigned int v7; // [rsp+20h] [rbp-30h]
unsigned int v8; // [rsp+24h] [rbp-2Ch]
v8 = *(_DWORD *)(a1 + 1980);
v7 = *(unsigned __int8 *)(a2 + 8);
if ( a3 >= v7 || a3 > (v8 - (*(_DWORD *)(a1 + 3096) + 12) - 4) >> 2 )
return 0LL;
v6 = (unsigned __int16 *)dir_entry_pos(a2, v8, a3);
v5 = *v6;
if ( v5 < *(_DWORD *)(a1 + 3096) + 12 || v6[1] + v5 > v8 - 4 * v7 - 4 )
return 0LL;
*a4 = v6[1] + *v6 + a2;
return v5 + a2;
}
| get_record_position:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x30]
JNC 0x001786c6
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,dword ptr [RBP + -0x2c]
MOV RDX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RDX + 0xc18]
ADD EDX,0xc
SUB ECX,EDX
SUB ECX,0x4
SHR ECX,0x2
CMP EAX,ECX
JBE 0x001786d7
LAB_001786c6:
JMP 0x001786c8
LAB_001786c8:
JMP 0x001786ca
LAB_001786ca:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00178760
LAB_001786d7:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x2c]
MOV EDX,dword ptr [RBP + -0x1c]
CALL 0x00175000
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0x2]
MOV dword ptr [RBP + -0x48],EAX
MOV EAX,dword ptr [RBP + -0x44]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0xc18]
ADD ECX,0xc
CMP EAX,ECX
JC 0x0017872b
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,dword ptr [RBP + -0x48]
MOV ECX,dword ptr [RBP + -0x2c]
MOV EDX,dword ptr [RBP + -0x30]
SHL EDX,0x2
SUB ECX,EDX
SUB ECX,0x4
CMP EAX,ECX
JBE 0x00178739
LAB_0017872b:
JMP 0x0017872d
LAB_0017872d:
JMP 0x0017872f
LAB_0017872f:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00178760
LAB_00178739:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x44]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RCX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x48]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_00178760:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long get_record_position(long param_1,long param_2,uint param_3,long *param_4)
{
byte bVar1;
int iVar2;
uint uVar3;
ushort *puVar4;
long local_10;
iVar2 = *(int *)(param_1 + 0x7bc);
bVar1 = *(byte *)(param_2 + 8);
if ((param_3 < bVar1) && (param_3 <= (iVar2 - (*(int *)(param_1 + 0xc18) + 0xc)) - 4U >> 2)) {
puVar4 = (ushort *)dir_entry_pos(param_2,iVar2,param_3);
uVar3 = (uint)*puVar4;
if ((uVar3 < *(int *)(param_1 + 0xc18) + 0xcU) ||
((iVar2 + (uint)bVar1 * -4) - 4 < uVar3 + puVar4[1])) {
local_10 = 0;
}
else {
local_10 = param_2 + (ulong)uVar3;
*param_4 = local_10 + (ulong)(uint)puVar4[1];
}
}
else {
local_10 = 0;
}
return local_10;
}
| |
47,145 | bother::update_late() | untodesu[P]voxelius/game/client/bother.cc | void bother::update_late(void)
{
unsigned int free_peers = 0U;
// Figure out how much times we can call
// enet_host_connect and reallistically succeed
for(unsigned int i = 0U; i < bother_host->peerCount; ++i) {
if(bother_host->peers[i].state != ENET_PEER_STATE_DISCONNECTED)
continue;
free_peers += 1U;
}
for(unsigned int i = 0U; (i < free_peers) && bother_queue.size(); ++i) {
const auto &item = bother_queue.front();
ENetAddress address;
enet_address_set_host(&address, item.hostname.c_str());
address.port = enet_uint16(item.port);
if(auto peer = enet_host_connect(bother_host, &address, 1, 0)) {
peer->data = reinterpret_cast<void *>(static_cast<std::uintptr_t>(item.identity));
bother_set.insert(item.identity);
enet_host_flush(bother_host);
}
bother_queue.pop_front();
}
ENetEvent enet_event;
if(0 < enet_host_service(bother_host, &enet_event, 0)) {
if(enet_event.type == ENET_EVENT_TYPE_CONNECT) {
protocol::StatusRequest packet;
packet.version = protocol::VERSION;
protocol::send(enet_event.peer, protocol::encode(packet));
return;
}
if(enet_event.type == ENET_EVENT_TYPE_RECEIVE) {
protocol::decode(bother_dispatcher, enet_event.packet, enet_event.peer);
enet_packet_destroy(enet_event.packet);
return;
}
if(enet_event.type == ENET_EVENT_TYPE_DISCONNECT) {
auto identity = static_cast<unsigned int>(reinterpret_cast<std::uintptr_t>(enet_event.peer->data));
if(bother_set.count(identity)) {
BotherResponseEvent event;
event.identity = identity;
event.is_server_unreachable = true;
globals::dispatcher.trigger(event);
}
bother_set.erase(identity);
return;
}
}
} | O1 | cpp | bother::update_late():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq 0x22dbfb(%rip), %rcx # 0x25d5a8
movq 0x30(%rcx), %rax
testq %rax, %rax
je 0x2f9dd
movq 0x28(%rcx), %rcx
addq $0x38, %rcx
xorl %ebp, %ebp
movl $0x1, %edx
cmpl $0x1, (%rcx)
adcl $0x0, %ebp
movl %edx, %esi
addq $0x1c8, %rcx # imm = 0x1C8
incl %edx
cmpq %rsi, %rax
ja 0x2f9c5
jmp 0x2f9df
xorl %ebp, %ebp
testl %ebp, %ebp
je 0x2fad1
movabsq $0x5555555555555555, %r12 # imm = 0x5555555555555555
leaq 0x8(%rsp), %rbx
leaq 0x22db5b(%rip), %r14 # 0x25d558
leaq 0x22db1c(%rip), %r15 # 0x25d520
movq 0x22db95(%rip), %rax # 0x25d5a0
movq %rax, %rcx
subq 0x22db6b(%rip), %rcx # 0x25d580
sarq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
leaq (%rcx,%rcx,4), %rax
movq 0x22db5c(%rip), %rcx # 0x25d588
subq 0x22db5d(%rip), %rcx # 0x25d590
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
leaq (%rcx,%rax,2), %rax
movq 0x22db28(%rip), %rcx # 0x25d578
movq 0x22db11(%rip), %r13 # 0x25d568
subq %r13, %rcx
sarq $0x4, %rcx
imulq %r12, %rcx
cmpq %rcx, %rax
je 0x2fad1
movq 0x8(%r13), %rsi
movq %rbx, %rdi
callq 0x183629
movzwl 0x28(%r13), %eax
movw %ax, 0xc(%rsp)
movq 0x22db24(%rip), %rdi # 0x25d5a8
movl $0x1, %edx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x17f5f1
testq %rax, %rax
je 0x2fac1
movl (%r13), %ecx
movq %rcx, 0x30(%rax)
movq %r15, 0x28(%rsp)
movq %r15, %rdi
movq %r13, %rsi
leaq 0x28(%rsp), %rdx
callq 0x317c6
movq 0x22daec(%rip), %rdi # 0x25d5a8
callq 0x180e5f
movq %r14, %rdi
callq 0x2ffd2
decl %ebp
jne 0x2fa04
movq 0x22dad0(%rip), %rdi # 0x25d5a8
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x18162b
testl %eax, %eax
jle 0x2fbe6
movl 0x8(%rsp), %eax
cmpl $0x3, %eax
je 0x2fbc6
cmpl $0x2, %eax
je 0x2fb44
cmpl $0x1, %eax
jne 0x2fbe6
leaq 0x28(%rsp), %rdi
movq $0x0, 0x8(%rdi)
leaq 0x221f15(%rip), %rax # 0x251a30
movq %rax, (%rdi)
movl $0xf, 0x10(%rdi)
movq 0x10(%rsp), %rbx
movl $0x1, %esi
callq 0x7b38c
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7bd5d
jmp 0x2fbe6
movq 0x10(%rsp), %rax
movl 0x30(%rax), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x22d9c6(%rip), %rdi # 0x25d520
callq 0x31ab0
testq %rax, %rax
je 0x2fbb3
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movl 0x4(%rsp), %eax
movl %eax, -0x20(%r14)
movb $0x1, -0x1c(%r14)
leaq 0x230c83(%rip), %rdi # 0x260810
leaq 0x28(%rsp), %rdx
movl $0xc0d311da, %esi # imm = 0xC0D311DA
callq 0x31140
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x2fbb3
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x268d0
leaq 0x22d966(%rip), %rdi # 0x25d520
leaq 0x4(%rsp), %rsi
callq 0x31014
jmp 0x2fbe6
movq 0x10(%rsp), %rdx
movq 0x20(%rsp), %rsi
leaq 0x22d911(%rip), %rdi # 0x25d4e8
callq 0x7bd6d
movq 0x20(%rsp), %rdi
callq 0x17fd17
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x2fc0f
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x268d0
movq %rbx, %rdi
callq 0x26fe0
| _ZN6bother11update_lateEv:
push rbp; int
push r15; int
push r14; int
push r13; __int64
push r12; int
push rbx; void *
sub rsp, 58h
mov rcx, cs:_ZL11bother_host; bother_host
mov rax, [rcx+30h]
test rax, rax
jz short loc_2F9DD
mov rcx, [rcx+28h]
add rcx, 38h ; '8'
xor ebp, ebp
mov edx, 1
loc_2F9C5:
cmp dword ptr [rcx], 1
adc ebp, 0
mov esi, edx
add rcx, 1C8h
inc edx
cmp rax, rsi
ja short loc_2F9C5
jmp short loc_2F9DF
loc_2F9DD:
xor ebp, ebp
loc_2F9DF:
test ebp, ebp
jz loc_2FAD1
mov r12, 5555555555555555h
lea rbx, [rsp+88h+var_80]
lea r14, _ZL12bother_queue; bother_queue
lea r15, _ZL10bother_set; bother_set
loc_2FA04:
mov rax, qword ptr cs:xmmword_25D598+8
mov rcx, rax
sub rcx, qword ptr cs:xmmword_25D578+8
sar rcx, 3
cmp rax, 1
adc rcx, 0FFFFFFFFFFFFFFFFh
lea rax, [rcx+rcx*4]
mov rcx, qword ptr cs:xmmword_25D588
sub rcx, qword ptr cs:xmmword_25D588+8
sar rcx, 4
mov rdx, 0AAAAAAAAAAAAAAABh
imul rcx, rdx
lea rax, [rcx+rax*2]
mov rcx, qword ptr cs:xmmword_25D578
mov r13, qword ptr cs:xmmword_25D568
sub rcx, r13
sar rcx, 4
imul rcx, r12
cmp rax, rcx
jz short loc_2FAD1
mov rsi, [r13+8]
mov rdi, rbx
call enet_address_set_host
movzx eax, word ptr [r13+28h]
mov [rsp+88h+var_7C], ax
mov rdi, cs:_ZL11bother_host; bother_host
mov edx, 1
mov rsi, rbx
xor ecx, ecx
call enet_host_connect
test rax, rax
jz short loc_2FAC1
mov ecx, [r13+0]
mov [rax+30h], rcx
mov qword ptr [rsp+88h+var_60], r15; char
mov rdi, r15
mov rsi, r13
lea rdx, [rsp+88h+var_60]
call _ZNSt10_HashtableIjjSaIjENSt8__detail9_IdentityESt8equal_toIjESt4hashIjENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE9_M_insertIRKjNS1_10_AllocNodeISaINS1_10_Hash_nodeIjLb0EEEEEEEESt4pairINS1_14_Node_iteratorIjLb1ELb0EEEbEOT_RKT0_St17integral_constantIbLb1EE; std::_Hashtable<uint,uint,std::allocator<uint>,std::__detail::_Identity,std::equal_to<uint>,std::hash<uint>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::_M_insert<uint const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<uint,false>>>>(uint const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<uint,false>>> const&,std::integral_constant<bool,true>)
mov rdi, cs:_ZL11bother_host; bother_host
call enet_host_flush
loc_2FAC1:
mov rdi, r14
call _ZNSt5dequeI15BotherQueueItemSaIS0_EE9pop_frontEv; std::deque<BotherQueueItem>::pop_front(void)
dec ebp
jnz loc_2FA04
loc_2FAD1:
mov rdi, cs:_ZL11bother_host; bother_host
lea rsi, [rsp+88h+var_80]
xor edx, edx
call enet_host_service
test eax, eax
jle loc_2FBE6
mov eax, [rsp+88h+var_80]
cmp eax, 3
jz loc_2FBC6
cmp eax, 2
jz short loc_2FB44
cmp eax, 1
jnz loc_2FBE6
lea rdi, [rsp+88h+var_60]; this
mov qword ptr [rdi+8], 0
lea rax, off_251A30
mov [rdi], rax
mov dword ptr [rdi+10h], 0Fh
mov rbx, [rsp+88h+var_78]
mov esi, (offset dword_0+1); protocol::StatusRequest *
call _ZN8protocol6encodeERKNS_13StatusRequestEj; protocol::encode(protocol::StatusRequest const&,uint)
mov rdi, rbx
mov rsi, rax
call _ZN8protocol4sendEP9_ENetPeerP11_ENetPacket; protocol::send(_ENetPeer *,_ENetPacket *)
jmp loc_2FBE6
loc_2FB44:
mov rax, [rsp+88h+var_78]
mov eax, [rax+30h]
lea rsi, [rsp+88h+var_84]
mov [rsi], eax
lea rdi, _ZL10bother_set; bother_set
call _ZNKSt10_HashtableIjjSaIjENSt8__detail9_IdentityESt8equal_toIjESt4hashIjENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE5countERKj; std::_Hashtable<uint,uint,std::allocator<uint>,std::__detail::_Identity,std::equal_to<uint>,std::hash<uint>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::count(uint const&)
test rax, rax
jz short loc_2FBB3
lea r14, [rsp+88h+var_40]
mov [r14-10h], r14
mov qword ptr [r14-8], 0
mov byte ptr [r14], 0
mov eax, [rsp+88h+var_84]
mov [r14-20h], eax
mov byte ptr [r14-1Ch], 1
lea rdi, _ZN7globals10dispatcherE; int
lea rdx, [rsp+88h+var_60]; int
mov esi, 0C0D311DAh; int
call _ZN4entt16basic_dispatcherISaIvEE7triggerIR19BotherResponseEventEEvjOT_; entt::basic_dispatcher<std::allocator<void>>::trigger<BotherResponseEvent &>(uint,BotherResponseEvent &)
mov rdi, [rsp+88h+var_50]; void *
cmp rdi, r14
jz short loc_2FBB3
mov rsi, [rsp+88h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2FBB3:
lea rdi, _ZL10bother_set; bother_set
lea rsi, [rsp+88h+var_84]
call _ZNSt10_HashtableIjjSaIjENSt8__detail9_IdentityESt8equal_toIjESt4hashIjENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE8_M_eraseESt17integral_constantIbLb1EERKj; std::_Hashtable<uint,uint,std::allocator<uint>,std::__detail::_Identity,std::equal_to<uint>,std::hash<uint>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::_M_erase(std::integral_constant<bool,true>,uint const&)
jmp short loc_2FBE6
loc_2FBC6:
mov rdx, [rsp+88h+var_78]
mov rsi, [rsp+88h+var_68]
lea rdi, _ZL17bother_dispatcher; int
call _ZN8protocol6decodeERN4entt16basic_dispatcherISaIvEEEPK11_ENetPacketP9_ENetPeer; protocol::decode(entt::basic_dispatcher<std::allocator<void>> &,_ENetPacket const*,_ENetPeer *)
mov rdi, [rsp+88h+var_68]
call enet_packet_destroy
loc_2FBE6:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_30]; void *
cmp rdi, r14
jz short loc_2FC0F
mov rsi, [rsp+arg_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2FC0F:
mov rdi, rbx
call __Unwind_Resume
| update_late:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RCX,qword ptr [0x0035d5a8]
MOV RAX,qword ptr [RCX + 0x30]
TEST RAX,RAX
JZ 0x0012f9dd
MOV RCX,qword ptr [RCX + 0x28]
ADD RCX,0x38
XOR EBP,EBP
MOV EDX,0x1
LAB_0012f9c5:
CMP dword ptr [RCX],0x1
ADC EBP,0x0
MOV ESI,EDX
ADD RCX,0x1c8
INC EDX
CMP RAX,RSI
JA 0x0012f9c5
JMP 0x0012f9df
LAB_0012f9dd:
XOR EBP,EBP
LAB_0012f9df:
TEST EBP,EBP
JZ 0x0012fad1
MOV R12,0x5555555555555555
LEA RBX,[RSP + 0x8]
LEA R14,[0x35d558]
LEA R15,[0x35d520]
LAB_0012fa04:
MOV RAX,qword ptr [0x0035d5a0]
MOV RCX,RAX
SUB RCX,qword ptr [0x0035d580]
SAR RCX,0x3
CMP RAX,0x1
ADC RCX,-0x1
LEA RAX,[RCX + RCX*0x4]
MOV RCX,qword ptr [0x0035d588]
SUB RCX,qword ptr [0x0035d590]
SAR RCX,0x4
MOV RDX,-0x5555555555555555
IMUL RCX,RDX
LEA RAX,[RCX + RAX*0x2]
MOV RCX,qword ptr [0x0035d578]
MOV R13,qword ptr [0x0035d568]
SUB RCX,R13
SAR RCX,0x4
IMUL RCX,R12
CMP RAX,RCX
JZ 0x0012fad1
MOV RSI,qword ptr [R13 + 0x8]
MOV RDI,RBX
CALL 0x00283629
MOVZX EAX,word ptr [R13 + 0x28]
MOV word ptr [RSP + 0xc],AX
MOV RDI,qword ptr [0x0035d5a8]
MOV EDX,0x1
MOV RSI,RBX
XOR ECX,ECX
CALL 0x0027f5f1
TEST RAX,RAX
JZ 0x0012fac1
MOV ECX,dword ptr [R13]
MOV qword ptr [RAX + 0x30],RCX
MOV qword ptr [RSP + 0x28],R15
MOV RDI,R15
MOV RSI,R13
LEA RDX,[RSP + 0x28]
CALL 0x001317c6
MOV RDI,qword ptr [0x0035d5a8]
CALL 0x00280e5f
LAB_0012fac1:
MOV RDI,R14
CALL 0x0012ffd2
DEC EBP
JNZ 0x0012fa04
LAB_0012fad1:
MOV RDI,qword ptr [0x0035d5a8]
LEA RSI,[RSP + 0x8]
XOR EDX,EDX
CALL 0x0028162b
TEST EAX,EAX
JLE 0x0012fbe6
MOV EAX,dword ptr [RSP + 0x8]
CMP EAX,0x3
JZ 0x0012fbc6
CMP EAX,0x2
JZ 0x0012fb44
CMP EAX,0x1
JNZ 0x0012fbe6
LEA RDI,[RSP + 0x28]
MOV qword ptr [RDI + 0x8],0x0
LEA RAX,[0x351a30]
MOV qword ptr [RDI],RAX
MOV dword ptr [RDI + 0x10],0xf
MOV RBX,qword ptr [RSP + 0x10]
MOV ESI,0x1
CALL 0x0017b38c
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0017bd5d
JMP 0x0012fbe6
LAB_0012fb44:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX + 0x30]
LEA RSI,[RSP + 0x4]
MOV dword ptr [RSI],EAX
LEA RDI,[0x35d520]
CALL 0x00131ab0
TEST RAX,RAX
JZ 0x0012fbb3
LEA R14,[RSP + 0x48]
MOV qword ptr [R14 + -0x10],R14
MOV qword ptr [R14 + -0x8],0x0
MOV byte ptr [R14],0x0
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R14 + -0x20],EAX
MOV byte ptr [R14 + -0x1c],0x1
LAB_0012fb86:
LEA RDI,[0x360810]
LEA RDX,[RSP + 0x28]
MOV ESI,0xc0d311da
CALL 0x00131140
LAB_0012fb9c:
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R14
JZ 0x0012fbb3
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001268d0
LAB_0012fbb3:
LEA RDI,[0x35d520]
LEA RSI,[RSP + 0x4]
CALL 0x00131014
JMP 0x0012fbe6
LAB_0012fbc6:
MOV RDX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x20]
LEA RDI,[0x35d4e8]
CALL 0x0017bd6d
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x0027fd17
LAB_0012fbe6:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* bother::update_late() */
void bother::update_late(void)
{
bool bVar1;
int8 uVar2;
long lVar3;
_ENetPacket *p_Var4;
int *piVar5;
ulong uVar6;
int iVar7;
uint local_84;
int local_80;
int2 local_7c;
_ENetPeer *local_78;
_ENetPacket *local_68;
int8 local_60;
int8 local_58;
int1 *local_50;
int8 local_48;
int1 local_40;
int7 uStack_3f;
if (*(ulong *)(bother_host + 0x30) == 0) {
iVar7 = 0;
}
else {
piVar5 = (int *)(*(long *)(bother_host + 0x28) + 0x38);
iVar7 = 0;
uVar6 = 1;
do {
iVar7 = iVar7 + (uint)(*piVar5 == 0);
piVar5 = piVar5 + 0x72;
bVar1 = uVar6 < *(ulong *)(bother_host + 0x30);
uVar6 = (ulong)((int)uVar6 + 1);
} while (bVar1);
}
if (iVar7 != 0) {
do {
uVar2 = bother_queue._16_8_;
if (((long)(bother_queue._48_8_ - bother_queue._56_8_) >> 4) * -0x5555555555555555 +
(((long)(bother_queue._72_8_ - bother_queue._40_8_) >> 3) + -1 +
(ulong)(bother_queue._72_8_ == 0)) * 10 ==
((long)(bother_queue._32_8_ - bother_queue._16_8_) >> 4) * 0x5555555555555555) break;
enet_address_set_host(&local_80,*(int8 *)(bother_queue._16_8_ + 8));
local_7c = *(int2 *)(uVar2 + 0x28);
lVar3 = enet_host_connect(bother_host,&local_80,1,0);
if (lVar3 != 0) {
*(ulong *)(lVar3 + 0x30) = (ulong)*(uint *)uVar2;
local_60 = (int **)bother_set;
std::
_Hashtable<unsigned_int,unsigned_int,std::allocator<unsigned_int>,std::__detail::_Identity,std::equal_to<unsigned_int>,std::hash<unsigned_int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
::
_M_insert<unsigned_int_const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<unsigned_int,false>>>>
(bother_set,uVar2,&local_60);
enet_host_flush(bother_host);
}
std::deque<BotherQueueItem,std::allocator<BotherQueueItem>>::pop_front
((deque<BotherQueueItem,std::allocator<BotherQueueItem>> *)bother_queue);
iVar7 = iVar7 + -1;
} while (iVar7 != 0);
}
iVar7 = enet_host_service(bother_host,&local_80,0);
if (0 < iVar7) {
if (local_80 == 3) {
protocol::decode((basic_dispatcher *)bother_dispatcher,local_68,local_78);
enet_packet_destroy(local_68);
}
else if (local_80 == 2) {
local_84 = *(uint *)(local_78 + 0x30);
lVar3 = std::
_Hashtable<unsigned_int,unsigned_int,std::allocator<unsigned_int>,std::__detail::_Identity,std::equal_to<unsigned_int>,std::hash<unsigned_int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
::count((_Hashtable<unsigned_int,unsigned_int,std::allocator<unsigned_int>,std::__detail::_Identity,std::equal_to<unsigned_int>,std::hash<unsigned_int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
*)bother_set,&local_84);
if (lVar3 != 0) {
local_48 = 0;
local_40 = 0;
local_60._0_5_ = CONCAT14(1,local_84);
/* try { // try from 0012fb86 to 0012fb9b has its CatchHandler @ 0012fbf5 */
local_50 = &local_40;
entt::basic_dispatcher<std::allocator<void>>::trigger<BotherResponseEvent&>
((basic_dispatcher<std::allocator<void>> *)globals::dispatcher,0xc0d311da,
(BotherResponseEvent *)&local_60);
if (local_50 != &local_40) {
operator_delete(local_50,CONCAT71(uStack_3f,local_40) + 1);
}
}
std::
_Hashtable<unsigned_int,unsigned_int,std::allocator<unsigned_int>,std::__detail::_Identity,std::equal_to<unsigned_int>,std::hash<unsigned_int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>
::_M_erase(bother_set,&local_84);
}
else if (local_80 == 1) {
local_58 = 0;
local_60 = &PTR__Base_00351a30;
local_50 = (int1 *)CONCAT44(local_50._4_4_,0xf);
p_Var4 = (_ENetPacket *)protocol::encode((StatusRequest *)&local_60,1);
protocol::send(local_78,p_Var4);
}
}
return;
}
| ||
47,146 | my_mb_wc_gbk | eloqsql/strings/ctype-gbk.c | static int
my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
hi=s[0];
if (hi<0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_gbk_uni_onechar( (hi<<8) + s[1])))
return -2;
return 2;
} | O3 | c | my_mb_wc_gbk:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xb1569
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0xb14ed
movq %rdi, (%rsi)
movl $0x1, %eax
jmp 0xb1569
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0xb1569
movzbl %dil, %ecx
xorl %eax, %eax
cmpl $0x80, %ecx
je 0xb1569
cmpl $0xff, %ecx
je 0xb1569
movzbl 0x1(%rdx), %edx
leal -0x7f(%rdx), %edi
cmpb $-0x3f, %dil
setb %dil
cmpb $-0x1, %dl
setge %r8b
testb %dil, %r8b
jne 0xb1569
shll $0x8, %ecx
leal (%rcx,%rdx), %eax
addl $0xffff7ec0, %eax # imm = 0xFFFF7EC0
cmpl $0x7d10, %eax # imm = 0x7D10
jae 0xb155d
movl %eax, %eax
leaq 0x14b6d9(%rip), %rcx # 0x1fcc20
movzwl (%rcx,%rax,2), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0xb1569
jmp 0xb1564
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
| my_mb_wc_gbk:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb loc_B1569
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_B14ED
mov [rsi], rdi
mov eax, 1
jmp short loc_B1569
loc_B14ED:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_B1569
movzx ecx, dil
xor eax, eax
cmp ecx, 80h
jz short loc_B1569
cmp ecx, 0FFh
jz short loc_B1569
movzx edx, byte ptr [rdx+1]
lea edi, [rdx-7Fh]
cmp dil, 0C1h
setb dil
cmp dl, 0FFh
setnl r8b
test r8b, dil
jnz short loc_B1569
shl ecx, 8
lea eax, [rcx+rdx]
add eax, 0FFFF7EC0h
cmp eax, 7D10h
jnb short loc_B155D
mov eax, eax
lea rcx, tab_gbk_uni0
movzx eax, word ptr [rcx+rax*2]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_B1569
jmp short loc_B1564
loc_B155D:
mov qword ptr [rsi], 0
loc_B1564:
mov eax, 0FFFFFFFEh
loc_B1569:
pop rbp
retn
| long long my_mb_wc_gbk(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
int v6; // edx
unsigned int v7; // eax
long long v8; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)v5 != 128 && (unsigned __int8)v5 != 255 )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 - 127) >= 0xC1u || (char)v6 < -1 )
{
v7 = ((unsigned __int8)v5 << 8) + v6 - 33088;
if ( v7 >= 0x7D10 )
{
*a2 = 0LL;
}
else
{
v8 = tab_gbk_uni0[v7];
*a2 = v8;
result = 2LL;
if ( (_WORD)v8 )
return result;
}
return 4294967294LL;
}
}
}
}
return result;
}
| my_mb_wc_gbk:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001b1569
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x001b14ed
MOV qword ptr [RSI],RDI
MOV EAX,0x1
JMP 0x001b1569
LAB_001b14ed:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001b1569
MOVZX ECX,DIL
XOR EAX,EAX
CMP ECX,0x80
JZ 0x001b1569
CMP ECX,0xff
JZ 0x001b1569
MOVZX EDX,byte ptr [RDX + 0x1]
LEA EDI,[RDX + -0x7f]
CMP DIL,0xc1
SETC DIL
CMP DL,0xff
SETGE R8B
TEST R8B,DIL
JNZ 0x001b1569
SHL ECX,0x8
LEA EAX,[RCX + RDX*0x1]
ADD EAX,0xffff7ec0
CMP EAX,0x7d10
JNC 0x001b155d
MOV EAX,EAX
LEA RCX,[0x2fcc20]
MOVZX EAX,word ptr [RCX + RAX*0x2]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x001b1569
JMP 0x001b1564
LAB_001b155d:
MOV qword ptr [RSI],0x0
LAB_001b1564:
MOV EAX,0xfffffffe
LAB_001b1569:
POP RBP
RET
|
int8 my_mb_wc_gbk(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
uint uVar4;
int8 uVar5;
uVar5 = 0xffffff9b;
if (param_3 < param_4) {
bVar1 = *param_3;
if ((long)(char)bVar1 < 0) {
uVar5 = 0xffffff9a;
if ((((param_3 + 2 <= param_4) && (uVar5 = 0, bVar1 != 0x80)) && (bVar1 != 0xff)) &&
(bVar2 = param_3[1], (char)bVar2 < -1 || 0xc0 < (byte)(bVar2 + 0x81))) {
uVar4 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0x8140;
if (uVar4 < 0x7d10) {
uVar3 = *(ushort *)(&tab_gbk_uni0 + (ulong)uVar4 * 2);
*param_2 = (ulong)uVar3;
if (uVar3 != 0) {
return 2;
}
}
else {
*param_2 = 0;
}
uVar5 = 0xfffffffe;
}
}
else {
*param_2 = (long)(char)bVar1;
uVar5 = 1;
}
}
return uVar5;
}
| |
47,147 | nglog::SetVLOGLevel(char const*, int) | ng-log[P]ng-log/src/vlog_is_on.cc | int SetVLOGLevel(const char* module_pattern, int log_level) {
int result = FLAGS_v;
size_t const pattern_len = strlen(module_pattern);
bool found = false;
{
std::lock_guard<std::mutex> l(
vmodule_mutex); // protect whole read-modify-write
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (info->module_pattern == module_pattern) {
if (!found) {
result = info->vlog_level;
found = true;
}
info->vlog_level = log_level;
} else if (!found && SafeFNMatch_(info->module_pattern.c_str(),
info->module_pattern.size(),
module_pattern, pattern_len)) {
result = info->vlog_level;
found = true;
}
}
if (!found) {
auto* info = new VModuleInfo;
info->module_pattern = module_pattern;
info->vlog_level = log_level;
info->next = vmodule_list;
vmodule_list = info;
SiteFlag** item_ptr = &cached_site_list;
SiteFlag* item = cached_site_list;
// We traverse the list fully because the pattern can match several items
// from the list.
while (item) {
if (SafeFNMatch_(module_pattern, pattern_len, item->base_name,
item->base_len)) {
// Redirect the cached value to its module override.
item->level = &info->vlog_level;
*item_ptr = item->next; // Remove the item from the list.
} else {
item_ptr = &item->next;
}
item = *item_ptr;
}
}
}
RAW_VLOG(1, "Set VLOG level for \"%s\" to %d", module_pattern, log_level);
return result;
} | O0 | cpp | nglog::SetVLOGLevel(char const*, int):
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x3088b(%rip), %rax # 0x9c3b4
movl (%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa370
movq %rax, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
leaq -0x28(%rbp), %rdi
leaq 0x40866(%rip), %rsi # 0xac3b0
callq 0x2e340
movq 0x40822(%rip), %rax # 0xac378
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x6bc1d
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x27f10
movb %al, -0x5e(%rbp)
jmp 0x6bb77
movb -0x5e(%rbp), %al
testb $0x1, %al
jne 0x6bb80
jmp 0x6bbbc
testb $0x1, -0x19(%rbp)
jne 0x6bbb0
movq -0x30(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x10(%rbp)
movb $0x1, -0x19(%rbp)
jmp 0x6bbb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x2e370
jmp 0x6bd88
movl -0xc(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x20(%rax)
jmp 0x6bc0a
testb $0x1, -0x19(%rbp)
jne 0x6bc08
movq -0x30(%rbp), %rdi
callq 0xa340
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rdi
callq 0xa5a0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
movq -0x8(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x6b990
movb %al, -0x5f(%rbp)
jmp 0x6bbf1
movb -0x5f(%rbp), %al
testb $0x1, %al
jne 0x6bbfa
jmp 0x6bc08
movq -0x30(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x10(%rbp)
movb $0x1, -0x19(%rbp)
jmp 0x6bc0a
jmp 0x6bc0c
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x6bb5a
testb $0x1, -0x19(%rbp)
jne 0x6bcfa
movl $0x30, %edi
callq 0xcee0
movq %rax, -0x70(%rbp)
jmp 0x6bc37
movq -0x70(%rbp), %rdi
callq 0x6c240
movq -0x70(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0xaba0
jmp 0x6bc57
movl -0xc(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x20(%rax)
movq 0x40710(%rip), %rcx # 0xac378
movq -0x48(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x48(%rbp), %rax
movq %rax, 0x406fd(%rip) # 0xac378
leaq 0x406fe(%rip), %rax # 0xac380
movq %rax, -0x50(%rbp)
movq 0x406f3(%rip), %rax # 0xac380
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x6bcf8
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rcx
callq 0x6b990
movb %al, -0x71(%rbp)
jmp 0x6bcb6
movb -0x71(%rbp), %al
testb $0x1, %al
jne 0x6bcbf
jmp 0x6bcdf
movq -0x48(%rbp), %rcx
addq $0x20, %rcx
movq -0x58(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
jmp 0x6bceb
movq -0x58(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x6bc91
jmp 0x6bcfa
leaq -0x28(%rbp), %rdi
callq 0x2e370
movl $0x1, -0x5c(%rbp)
cmpq $0x0, 0x40676(%rip) # 0xac388
jne 0x6bd36
movl -0x5c(%rbp), %ecx
leaq 0x4066a(%rip), %rdi # 0xac388
leaq 0x3068f(%rip), %rsi # 0x9c3b4
leaq 0x5867(%rip), %rdx # 0x71593
callq 0x6bda0
movb %al, -0x72(%rbp)
jmp 0x6bd48
movq 0x4064b(%rip), %rax # 0xac388
movl (%rax), %eax
cmpl -0x5c(%rbp), %eax
setge %al
movb %al, -0x72(%rbp)
movb -0x72(%rbp), %al
andb $0x1, %al
movb %al, -0x5d(%rbp)
testb $0x1, -0x5d(%rbp)
je 0x6bd7a
movq -0x8(%rbp), %r8
movl -0xc(%rbp), %r9d
xorl %edi, %edi
leaq 0x582c(%rip), %rsi # 0x71593
movl $0xc5, %edx
leaq 0x586a(%rip), %rcx # 0x715dd
movb $0x0, %al
callq 0x67490
jmp 0x6bd7c
movl -0x10(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0xaf50
nopw %cs:(%rax,%rax)
| _ZN5nglog12SetVLOGLevelEPKci:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
lea rax, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
mov eax, [rax]
mov [rbp+var_10], eax
mov rdi, [rbp+var_8]
call _strlen
mov [rbp+var_18], rax
mov [rbp+var_19], 0
lea rdi, [rbp+var_28]
lea rsi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [rbp+var_30], rax
loc_6BB5A:
cmp [rbp+var_30], 0
jz loc_6BC1D
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_8]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rbp+var_5E], al
jmp short $+2
loc_6BB77:
mov al, [rbp+var_5E]
test al, 1
jnz short loc_6BB80
jmp short loc_6BBBC
loc_6BB80:
test [rbp+var_19], 1
jnz short loc_6BBB0
mov rax, [rbp+var_30]
mov eax, [rax+20h]
mov [rbp+var_10], eax
mov [rbp+var_19], 1
jmp short loc_6BBB0
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_28]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
jmp loc_6BD88
loc_6BBB0:
mov ecx, [rbp+var_C]
mov rax, [rbp+var_30]
mov [rax+20h], ecx
jmp short loc_6BC0A
loc_6BBBC:
test [rbp+var_19], 1
jnz short loc_6BC08
mov rdi, [rbp+var_30]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_68], rax
mov rdi, [rbp+var_30]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rbp+var_68]; this
mov rsi, rax; char *
mov rdx, [rbp+var_8]; unsigned __int64
mov rcx, [rbp+var_18]; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
mov [rbp+var_5F], al
jmp short $+2
loc_6BBF1:
mov al, [rbp+var_5F]
test al, 1
jnz short loc_6BBFA
jmp short loc_6BC08
loc_6BBFA:
mov rax, [rbp+var_30]
mov eax, [rax+20h]
mov [rbp+var_10], eax
mov [rbp+var_19], 1
loc_6BC08:
jmp short $+2
loc_6BC0A:
jmp short $+2
loc_6BC0C:
mov rax, [rbp+var_30]
mov rax, [rax+28h]
mov [rbp+var_30], rax
jmp loc_6BB5A
loc_6BC1D:
test [rbp+var_19], 1
jnz loc_6BCFA
mov edi, 30h ; '0'; unsigned __int64
call _Znwm; operator new(ulong)
mov [rbp+var_70], rax
jmp short $+2
loc_6BC37:
mov rdi, [rbp+var_70]; this
call _ZN5nglog11VModuleInfoC2Ev; nglog::VModuleInfo::VModuleInfo(void)
mov rax, [rbp+var_70]
mov [rbp+var_48], rax
mov rsi, [rbp+var_8]
mov rdi, [rbp+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_6BC57:
mov ecx, [rbp+var_C]
mov rax, [rbp+var_48]
mov [rax+20h], ecx
mov rcx, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov rax, [rbp+var_48]
mov [rax+28h], rcx
mov rax, [rbp+var_48]
mov cs:_ZN5nglogL12vmodule_listE, rax; nglog::vmodule_list
lea rax, _ZN5nglogL16cached_site_listE; nglog::cached_site_list
mov [rbp+var_50], rax
mov rax, cs:_ZN5nglogL16cached_site_listE; nglog::cached_site_list
mov [rbp+var_58], rax
loc_6BC91:
cmp [rbp+var_58], 0
jz short loc_6BCF8
mov rdi, [rbp+var_8]; this
mov rsi, [rbp+var_18]; char *
mov rax, [rbp+var_58]
mov rdx, [rax+8]; unsigned __int64
mov rcx, [rax+10h]; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
mov [rbp+var_71], al
jmp short $+2
loc_6BCB6:
mov al, [rbp+var_71]
test al, 1
jnz short loc_6BCBF
jmp short loc_6BCDF
loc_6BCBF:
mov rcx, [rbp+var_48]
add rcx, 20h ; ' '
mov rax, [rbp+var_58]
mov [rax], rcx
mov rax, [rbp+var_58]
mov rcx, [rax+18h]
mov rax, [rbp+var_50]
mov [rax], rcx
jmp short loc_6BCEB
loc_6BCDF:
mov rax, [rbp+var_58]
add rax, 18h
mov [rbp+var_50], rax
loc_6BCEB:
mov rax, [rbp+var_50]
mov rax, [rax]
mov [rbp+var_58], rax
jmp short loc_6BC91
loc_6BCF8:
jmp short $+2
loc_6BCFA:
lea rdi, [rbp+var_28]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
mov [rbp+var_5C], 1
cmp cs:_ZZN5nglog12SetVLOGLevelEPKciE8vlocal__, 0; nglog::SetVLOGLevel(char const*,int)::vlocal__
jnz short loc_6BD36
mov ecx, [rbp+var_5C]
lea rdi, _ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
lea rsi, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
lea rdx, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
call _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci; nglog::InitializeVLOG3(nglog::SiteFlag *,int *,char const*,int)
mov [rbp+var_72], al
jmp short loc_6BD48
loc_6BD36:
mov rax, cs:_ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
mov eax, [rax]
cmp eax, [rbp+var_5C]
setnl al
mov [rbp+var_72], al
loc_6BD48:
mov al, [rbp+var_72]
and al, 1
mov [rbp+var_5D], al
test [rbp+var_5D], 1
jz short loc_6BD7A
mov r8, [rbp+var_8]
mov r9d, [rbp+var_C]
xor edi, edi
lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
mov edx, 0C5h
lea rcx, aSetVlogLevelFo; "Set VLOG level for \"%s\" to %d"
mov al, 0
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
loc_6BD7A:
jmp short $+2
loc_6BD7C:
mov eax, [rbp+var_10]
add rsp, 80h
pop rbp
retn
loc_6BD88:
mov rdi, [rbp+var_38]
call __Unwind_Resume
| long long nglog::SetVLOGLevel(nglog *this, const char *a2)
{
const char *v2; // rax
unsigned long long v3; // r8
unsigned long long v4; // r8
char v6; // [rsp+Eh] [rbp-72h]
nglog::VModuleInfo *v7; // [rsp+10h] [rbp-70h]
nglog::tools *v8; // [rsp+18h] [rbp-68h]
long long j; // [rsp+28h] [rbp-58h]
long long *v10; // [rsp+30h] [rbp-50h]
long long i; // [rsp+50h] [rbp-30h]
std::mutex *v12; // [rsp+58h] [rbp-28h] BYREF
char v13; // [rsp+67h] [rbp-19h]
char *v14; // [rsp+68h] [rbp-18h]
unsigned int v15; // [rsp+70h] [rbp-10h]
int v16; // [rsp+74h] [rbp-Ch]
nglog::tools *v17; // [rsp+78h] [rbp-8h]
v17 = this;
v16 = (int)a2;
v15 = fLI::FLAGS_v;
v14 = (char *)strlen(this);
v13 = 0;
std::lock_guard<std::mutex>::lock_guard(&v12, (std::mutex *)&nglog::vmodule_mutex);
for ( i = nglog::vmodule_list; i; i = *(_QWORD *)(i + 40) )
{
if ( std::operator==<char>(i, (long long)v17) )
{
if ( (v13 & 1) == 0 )
{
v15 = *(_DWORD *)(i + 32);
v13 = 1;
}
*(_DWORD *)(i + 32) = v16;
}
else if ( (v13 & 1) == 0 )
{
v8 = (nglog::tools *)std::string::c_str(i);
v2 = (const char *)std::string::size(i);
if ( (nglog::tools::SafeFNMatch_(v8, v2, (long long)v17, v14, v3) & 1) != 0 )
{
v15 = *(_DWORD *)(i + 32);
v13 = 1;
}
}
}
if ( (v13 & 1) == 0 )
{
v7 = (nglog::VModuleInfo *)operator new(48LL);
nglog::VModuleInfo::VModuleInfo(v7);
std::string::operator=(v7, v17);
*((_DWORD *)v7 + 8) = v16;
*((_QWORD *)v7 + 5) = nglog::vmodule_list;
nglog::vmodule_list = (long long)v7;
v10 = &nglog::cached_site_list;
for ( j = nglog::cached_site_list; j; j = *v10 )
{
if ( (nglog::tools::SafeFNMatch_(v17, v14, *(_QWORD *)(j + 8), *(const char **)(j + 16), v4) & 1) != 0 )
{
*(_QWORD *)j = (char *)v7 + 32;
*v10 = *(_QWORD *)(j + 24);
}
else
{
v10 = (long long *)(j + 24);
}
}
}
std::lock_guard<std::mutex>::~lock_guard(&v12);
if ( nglog::SetVLOGLevel(char const*,int)::vlocal__ )
v6 = *(_DWORD *)nglog::SetVLOGLevel(char const*,int)::vlocal__ >= 1;
else
v6 = nglog::InitializeVLOG3(
&nglog::SetVLOGLevel(char const*,int)::vlocal__,
&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
1LL);
if ( (v6 & 1) != 0 )
nglog::RawLog(
0LL,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
197,
(unsigned long long *)"Set VLOG level for \"%s\" to %d",
(const char *)v17,
v16);
return v15;
}
| SetVLOGLevel:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
LEA RAX,[0x19c3b4]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x10],EAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0010a370
MOV qword ptr [RBP + -0x18],RAX
MOV byte ptr [RBP + -0x19],0x0
LEA RDI,[RBP + -0x28]
LEA RSI,[0x1ac3b0]
CALL 0x0012e340
MOV RAX,qword ptr [0x001ac378]
MOV qword ptr [RBP + -0x30],RAX
LAB_0016bb5a:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0016bc1d
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x8]
LAB_0016bb6d:
CALL 0x00127f10
MOV byte ptr [RBP + -0x5e],AL
JMP 0x0016bb77
LAB_0016bb77:
MOV AL,byte ptr [RBP + -0x5e]
TEST AL,0x1
JNZ 0x0016bb80
JMP 0x0016bbbc
LAB_0016bb80:
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x0016bbb0
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RBP + -0x10],EAX
MOV byte ptr [RBP + -0x19],0x1
JMP 0x0016bbb0
LAB_0016bbb0:
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x20],ECX
JMP 0x0016bc0a
LAB_0016bbbc:
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x0016bc08
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0010a340
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0010a5a0
MOV RDI,qword ptr [RBP + -0x68]
MOV RSI,RAX
MOV RDX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x18]
CALL 0x0016b990
MOV byte ptr [RBP + -0x5f],AL
JMP 0x0016bbf1
LAB_0016bbf1:
MOV AL,byte ptr [RBP + -0x5f]
TEST AL,0x1
JNZ 0x0016bbfa
JMP 0x0016bc08
LAB_0016bbfa:
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RBP + -0x10],EAX
MOV byte ptr [RBP + -0x19],0x1
LAB_0016bc08:
JMP 0x0016bc0a
LAB_0016bc0a:
JMP 0x0016bc0c
LAB_0016bc0c:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0016bb5a
LAB_0016bc1d:
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x0016bcfa
MOV EDI,0x30
CALL 0x0010cee0
MOV qword ptr [RBP + -0x70],RAX
JMP 0x0016bc37
LAB_0016bc37:
MOV RDI,qword ptr [RBP + -0x70]
CALL 0x0016c240
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x48],RAX
MOV RSI,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0010aba0
JMP 0x0016bc57
LAB_0016bc57:
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x20],ECX
MOV RCX,qword ptr [0x001ac378]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [0x001ac378],RAX
LEA RAX,[0x1ac380]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [0x001ac380]
MOV qword ptr [RBP + -0x58],RAX
LAB_0016bc91:
CMP qword ptr [RBP + -0x58],0x0
JZ 0x0016bcf8
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x10]
CALL 0x0016b990
LAB_0016bcb1:
MOV byte ptr [RBP + -0x71],AL
JMP 0x0016bcb6
LAB_0016bcb6:
MOV AL,byte ptr [RBP + -0x71]
TEST AL,0x1
JNZ 0x0016bcbf
JMP 0x0016bcdf
LAB_0016bcbf:
MOV RCX,qword ptr [RBP + -0x48]
ADD RCX,0x20
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX],RCX
JMP 0x0016bceb
LAB_0016bcdf:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x18
MOV qword ptr [RBP + -0x50],RAX
LAB_0016bceb:
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0016bc91
LAB_0016bcf8:
JMP 0x0016bcfa
LAB_0016bcfa:
LEA RDI,[RBP + -0x28]
CALL 0x0012e370
MOV dword ptr [RBP + -0x5c],0x1
CMP qword ptr [0x001ac388],0x0
JNZ 0x0016bd36
MOV ECX,dword ptr [RBP + -0x5c]
LEA RDI,[0x1ac388]
LEA RSI,[0x19c3b4]
LEA RDX,[0x171593]
CALL 0x0016bda0
MOV byte ptr [RBP + -0x72],AL
JMP 0x0016bd48
LAB_0016bd36:
MOV RAX,qword ptr [0x001ac388]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0x5c]
SETGE AL
MOV byte ptr [RBP + -0x72],AL
LAB_0016bd48:
MOV AL,byte ptr [RBP + -0x72]
AND AL,0x1
MOV byte ptr [RBP + -0x5d],AL
TEST byte ptr [RBP + -0x5d],0x1
JZ 0x0016bd7a
MOV R8,qword ptr [RBP + -0x8]
MOV R9D,dword ptr [RBP + -0xc]
XOR EDI,EDI
LEA RSI,[0x171593]
MOV EDX,0xc5
LEA RCX,[0x1715dd]
MOV AL,0x0
CALL 0x00167490
LAB_0016bd7a:
JMP 0x0016bd7c
LAB_0016bd7c:
MOV EAX,dword ptr [RBP + -0x10]
ADD RSP,0x80
POP RBP
RET
|
/* nglog::SetVLOGLevel(char const*, int) */
int4 nglog::SetVLOGLevel(char *param_1,int param_2)
{
bool bVar1;
byte bVar2;
char *pcVar3;
ulong uVar4;
VModuleInfo *this;
byte local_7a;
int8 *local_60;
int8 *local_58;
VModuleInfo *local_38;
lock_guard<std::mutex> local_30 [15];
byte local_21;
size_t local_20;
int4 local_18;
int local_14;
char *local_10;
local_18 = fLI::FLAGS_v;
local_14 = param_2;
local_10 = param_1;
local_20 = strlen(param_1);
local_21 = 0;
std::lock_guard<std::mutex>::lock_guard(local_30,(mutex *)vmodule_mutex);
for (local_38 = vmodule_list; local_38 != (VModuleInfo *)0x0;
local_38 = *(VModuleInfo **)(local_38 + 0x28)) {
/* try { // try from 0016bb6d to 0016bcb0 has its CatchHandler @ 0016bb96 */
bVar1 = std::operator==((string *)local_38,local_10);
if (bVar1) {
if ((local_21 & 1) == 0) {
local_18 = *(int4 *)(local_38 + 0x20);
local_21 = 1;
}
*(int *)(local_38 + 0x20) = local_14;
}
else if ((local_21 & 1) == 0) {
pcVar3 = (char *)std::__cxx11::string::c_str();
uVar4 = std::__cxx11::string::size();
bVar2 = tools::SafeFNMatch_(pcVar3,uVar4,local_10,local_20);
if ((bVar2 & 1) != 0) {
local_18 = *(int4 *)(local_38 + 0x20);
local_21 = 1;
}
}
}
if ((local_21 & 1) == 0) {
this = (VModuleInfo *)operator_new(0x30);
VModuleInfo::VModuleInfo(this);
std::__cxx11::string::operator=((string *)this,local_10);
*(int *)(this + 0x20) = local_14;
*(VModuleInfo **)(this + 0x28) = vmodule_list;
local_58 = &cached_site_list;
local_60 = cached_site_list;
vmodule_list = this;
while (local_60 != (int8 *)0x0) {
bVar2 = tools::SafeFNMatch_(local_10,local_20,(char *)local_60[1],local_60[2]);
if ((bVar2 & 1) == 0) {
local_58 = local_60 + 3;
}
else {
*local_60 = this + 0x20;
*local_58 = local_60[3];
}
local_60 = (int8 *)*local_58;
}
}
std::lock_guard<std::mutex>::~lock_guard(local_30);
if (SetVLOGLevel(char_const*,int)::vlocal__ == (int *)0x0) {
local_7a = InitializeVLOG3((SiteFlag *)&SetVLOGLevel(char_const*,int)::vlocal__,&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc"
,1);
}
else {
local_7a = 0 < *SetVLOGLevel(char_const*,int)::vlocal__;
}
if ((local_7a & 1) != 0) {
RawLog(0,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",0xc5,
"Set VLOG level for \"%s\" to %d",local_10,local_14);
}
return local_18;
}
| |
47,148 | nglog::SetVLOGLevel(char const*, int) | ng-log[P]ng-log/src/vlog_is_on.cc | int SetVLOGLevel(const char* module_pattern, int log_level) {
int result = FLAGS_v;
size_t const pattern_len = strlen(module_pattern);
bool found = false;
{
std::lock_guard<std::mutex> l(
vmodule_mutex); // protect whole read-modify-write
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (info->module_pattern == module_pattern) {
if (!found) {
result = info->vlog_level;
found = true;
}
info->vlog_level = log_level;
} else if (!found && SafeFNMatch_(info->module_pattern.c_str(),
info->module_pattern.size(),
module_pattern, pattern_len)) {
result = info->vlog_level;
found = true;
}
}
if (!found) {
auto* info = new VModuleInfo;
info->module_pattern = module_pattern;
info->vlog_level = log_level;
info->next = vmodule_list;
vmodule_list = info;
SiteFlag** item_ptr = &cached_site_list;
SiteFlag* item = cached_site_list;
// We traverse the list fully because the pattern can match several items
// from the list.
while (item) {
if (SafeFNMatch_(module_pattern, pattern_len, item->base_name,
item->base_len)) {
// Redirect the cached value to its module override.
item->level = &info->vlog_level;
*item_ptr = item->next; // Remove the item from the list.
} else {
item_ptr = &item->next;
}
item = *item_ptr;
}
}
}
RAW_VLOG(1, "Set VLOG level for \"%s\" to %d", module_pattern, log_level);
return result;
} | O1 | cpp | nglog::SetVLOGLevel(char const*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x158d7(%rip), %rax # 0x470fc
movl (%rax), %ebp
callq 0x8270
movq %rax, %r15
leaq 0x258ba(%rip), %rdi # 0x570f0
callq 0x89e0
testl %eax, %eax
jne 0x319d9
movq 0x2586e(%rip), %r12 # 0x570b8
testq %r12, %r12
je 0x318ac
xorl %r13d, %r13d
movq %r12, %rdi
movq %r14, %rsi
callq 0x8150
testl %eax, %eax
je 0x31889
testb $0x1, %r13b
jne 0x3189c
movq (%r12), %rdi
movq 0x8(%r12), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x31754
testb %al, %al
je 0x3189c
movl 0x20(%r12), %ebp
movb $0x1, %r13b
jmp 0x3189c
testb $0x1, %r13b
jne 0x31897
movl 0x20(%r12), %ebp
movb $0x1, %r13b
movl %ebx, 0x20(%r12)
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x31852
movl %ebp, 0x4(%rsp)
jmp 0x318b3
movl %ebp, 0x4(%rsp)
xorl %r13d, %r13d
testb $0x1, %r13b
jne 0x3195f
movl $0x30, %edi
callq 0xa980
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
movq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
movq %r14, %rdi
callq 0x8270
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rax, %r8
callq 0x8a80
movl %ebx, 0x20(%r12)
movq 0x257b1(%rip), %rax # 0x570b8
movq %rax, 0x28(%r12)
movq %r12, 0x257a5(%rip) # 0x570b8
movq 0x257a6(%rip), %r13 # 0x570c0
testq %r13, %r13
je 0x3195f
addq $0x20, %r12
leaq 0x25796(%rip), %rbp # 0x570c0
movq 0x8(%r13), %rdx
movq 0x10(%r13), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x31754
testb %al, %al
je 0x3194f
movq %r12, (%r13)
movq 0x18(%r13), %rax
movq %rax, (%rbp)
jmp 0x31956
addq $0x18, %r13
movq %r13, %rbp
movq (%rbp), %r13
testq %r13, %r13
jne 0x3192a
leaq 0x2578a(%rip), %rdi # 0x570f0
callq 0x8490
movq 0x25756(%rip), %rax # 0x570c8
testq %rax, %rax
je 0x3197f
cmpl $0x0, (%rax)
setg %al
jmp 0x3199e
leaq 0x25742(%rip), %rdi # 0x570c8
leaq 0x1576f(%rip), %rsi # 0x470fc
leaq 0x49bd(%rip), %rdx # 0x36351
movl $0x1, %ecx
callq 0x319f7
movl 0x4(%rsp), %ebp
testb %al, %al
je 0x319c8
leaq 0x49a4(%rip), %rsi # 0x36351
leaq 0x49e7(%rip), %rcx # 0x3639b
xorl %edi, %edi
movl $0xc5, %edx
movq %r14, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0x2f4ec
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x83f0
movq %rax, %rbx
leaq 0x25706(%rip), %rdi # 0x570f0
callq 0x8490
movq %rbx, %rdi
callq 0x8bb0
| _ZN5nglog12SetVLOGLevelEPKci:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, esi
mov r14, rdi
lea rax, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
mov ebp, [rax]
call _strlen
mov r15, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_319D9
mov r12, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
test r12, r12
jz short loc_318AC
xor r13d, r13d
loc_31852:
mov rdi, r12
mov rsi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_31889
test r13b, 1
jnz short loc_3189C
mov rdi, [r12]; this
mov rsi, [r12+8]; char *
mov rdx, r14; unsigned __int64
mov rcx, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_3189C
mov ebp, [r12+20h]
mov r13b, 1
jmp short loc_3189C
loc_31889:
test r13b, 1
jnz short loc_31897
mov ebp, [r12+20h]
mov r13b, 1
loc_31897:
mov [r12+20h], ebx
loc_3189C:
mov r12, [r12+28h]
test r12, r12
jnz short loc_31852
mov [rsp+38h+var_34], ebp
jmp short loc_318B3
loc_318AC:
mov [rsp+38h+var_34], ebp
xor r13d, r13d
loc_318B3:
test r13b, 1
jnz loc_3195F
mov edi, 30h ; '0'; unsigned __int64
call _Znwm; operator new(ulong)
mov r12, rax
add rax, 10h
mov [r12], rax
mov qword ptr [r12+8], 0
mov byte ptr [r12+10h], 0
mov rdi, r14
call _strlen
mov rdi, r12
xor esi, esi
xor edx, edx
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov [r12+20h], ebx
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [r12+28h], rax
mov cs:_ZN5nglogL12vmodule_listE, r12; nglog::vmodule_list
mov r13, cs:_ZN5nglogL16cached_site_listE; nglog::cached_site_list
test r13, r13
jz short loc_3195F
add r12, 20h ; ' '
lea rbp, _ZN5nglogL16cached_site_listE; nglog::cached_site_list
loc_3192A:
mov rdx, [r13+8]; unsigned __int64
mov rcx, [r13+10h]; char *
mov rdi, r14; this
mov rsi, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_3194F
mov [r13+0], r12
mov rax, [r13+18h]
mov [rbp+0], rax
jmp short loc_31956
loc_3194F:
add r13, 18h
mov rbp, r13
loc_31956:
mov r13, [rbp+0]
test r13, r13
jnz short loc_3192A
loc_3195F:
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rax, cs:_ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
test rax, rax
jz short loc_3197F
cmp dword ptr [rax], 0
setnle al
jmp short loc_3199E
loc_3197F:
lea rdi, _ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
lea rsi, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
lea rdx, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 1
call _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci; nglog::InitializeVLOG3(nglog::SiteFlag *,int *,char const*,int)
loc_3199E:
mov ebp, [rsp+38h+var_34]
test al, al
jz short loc_319C8
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSetVlogLevelFo; "Set VLOG level for \"%s\" to %d"
xor edi, edi
mov edx, 0C5h
mov r8, r14
mov r9d, ebx
xor eax, eax
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
loc_319C8:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_319D9:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::SetVLOGLevel(
nglog *this,
const char *a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
char v10; // al
unsigned int v11; // ebp
const char *v12; // r15
int v13; // eax
long long v14; // r12
char v15; // r13
unsigned long long v16; // r8
long long v17; // r12
long long v18; // rax
unsigned long long v19; // r8
long long v20; // r13
long long v21; // r12
long long *v22; // rbp
__m128 v23; // xmm4
__m128 v24; // xmm5
char v25; // al
unsigned int v26; // ebp
char v28; // [rsp-4h] [rbp-38h]
unsigned int v29; // [rsp+0h] [rbp-34h]
v28 = v10;
v11 = fLI::FLAGS_v;
v12 = (const char *)strlen(this);
v13 = pthread_mutex_lock(&nglog::vmodule_mutex);
if ( v13 )
std::__throw_system_error(v13);
v14 = nglog::vmodule_list;
if ( nglog::vmodule_list )
{
v15 = 0;
do
{
if ( !(unsigned int)std::string::compare(v14, this) )
{
if ( (v15 & 1) == 0 )
{
v11 = *(_DWORD *)(v14 + 32);
v15 = 1;
}
*(_DWORD *)(v14 + 32) = (_DWORD)a2;
}
else if ( (v15 & 1) == 0
&& nglog::tools::SafeFNMatch_(*(nglog::tools **)v14, *(const char **)(v14 + 8), (long long)this, v12, v16) )
{
v11 = *(_DWORD *)(v14 + 32);
v15 = 1;
}
v14 = *(_QWORD *)(v14 + 40);
}
while ( v14 );
v29 = v11;
}
else
{
v29 = v11;
v15 = 0;
}
if ( (v15 & 1) == 0 )
{
v17 = operator new(48LL);
*(_QWORD *)v17 = v17 + 16;
*(_QWORD *)(v17 + 8) = 0LL;
*(_BYTE *)(v17 + 16) = 0;
v18 = strlen(this);
std::string::_M_replace(v17, 0LL, 0LL, this, v18);
*(_DWORD *)(v17 + 32) = (_DWORD)a2;
*(_QWORD *)(v17 + 40) = nglog::vmodule_list;
nglog::vmodule_list = v17;
v20 = nglog::cached_site_list;
if ( nglog::cached_site_list )
{
v21 = v17 + 32;
v22 = &nglog::cached_site_list;
do
{
if ( nglog::tools::SafeFNMatch_(this, v12, *(_QWORD *)(v20 + 8), *(const char **)(v20 + 16), v19) )
{
*(_QWORD *)v20 = v21;
*v22 = *(_QWORD *)(v20 + 24);
}
else
{
v22 = (long long *)(v20 + 24);
}
v20 = *v22;
}
while ( *v22 );
}
}
pthread_mutex_unlock(&nglog::vmodule_mutex);
if ( nglog::SetVLOGLevel(char const*,int)::vlocal__ )
v25 = *(_DWORD *)nglog::SetVLOGLevel(char const*,int)::vlocal__ > 0;
else
v25 = nglog::InitializeVLOG3(
&nglog::SetVLOGLevel(char const*,int)::vlocal__,
&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
1LL);
v26 = v29;
if ( v25 )
nglog::RawLog(
0LL,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
197,
(long long)"Set VLOG level for \"%s\" to %d",
(long long)this,
(unsigned int)a2,
a3,
a4,
a5,
a6,
v23,
v24,
a9,
a10,
v28);
return v26;
}
| SetVLOGLevel:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
LEA RAX,[0x1470fc]
MOV EBP,dword ptr [RAX]
CALL 0x00108270
MOV R15,RAX
LEA RDI,[0x1570f0]
CALL 0x001089e0
TEST EAX,EAX
JNZ 0x001319d9
MOV R12,qword ptr [0x001570b8]
TEST R12,R12
JZ 0x001318ac
XOR R13D,R13D
LAB_00131852:
MOV RDI,R12
MOV RSI,R14
CALL 0x00108150
TEST EAX,EAX
JZ 0x00131889
TEST R13B,0x1
JNZ 0x0013189c
MOV RDI,qword ptr [R12]
MOV RSI,qword ptr [R12 + 0x8]
MOV RDX,R14
MOV RCX,R15
CALL 0x00131754
TEST AL,AL
JZ 0x0013189c
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
JMP 0x0013189c
LAB_00131889:
TEST R13B,0x1
JNZ 0x00131897
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
LAB_00131897:
MOV dword ptr [R12 + 0x20],EBX
LAB_0013189c:
MOV R12,qword ptr [R12 + 0x28]
TEST R12,R12
JNZ 0x00131852
MOV dword ptr [RSP + 0x4],EBP
JMP 0x001318b3
LAB_001318ac:
MOV dword ptr [RSP + 0x4],EBP
XOR R13D,R13D
LAB_001318b3:
TEST R13B,0x1
JNZ 0x0013195f
LAB_001318bd:
MOV EDI,0x30
CALL 0x0010a980
MOV R12,RAX
ADD RAX,0x10
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],0x0
MOV byte ptr [R12 + 0x10],0x0
MOV RDI,R14
CALL 0x00108270
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
MOV RCX,R14
MOV R8,RAX
CALL 0x00108a80
LAB_001318fb:
MOV dword ptr [R12 + 0x20],EBX
MOV RAX,qword ptr [0x001570b8]
MOV qword ptr [R12 + 0x28],RAX
MOV qword ptr [0x001570b8],R12
MOV R13,qword ptr [0x001570c0]
TEST R13,R13
JZ 0x0013195f
ADD R12,0x20
LEA RBP,[0x1570c0]
LAB_0013192a:
MOV RDX,qword ptr [R13 + 0x8]
MOV RCX,qword ptr [R13 + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x00131754
TEST AL,AL
JZ 0x0013194f
MOV qword ptr [R13],R12
MOV RAX,qword ptr [R13 + 0x18]
MOV qword ptr [RBP],RAX
JMP 0x00131956
LAB_0013194f:
ADD R13,0x18
MOV RBP,R13
LAB_00131956:
MOV R13,qword ptr [RBP]
TEST R13,R13
JNZ 0x0013192a
LAB_0013195f:
LEA RDI,[0x1570f0]
CALL 0x00108490
MOV RAX,qword ptr [0x001570c8]
TEST RAX,RAX
JZ 0x0013197f
CMP dword ptr [RAX],0x0
SETG AL
JMP 0x0013199e
LAB_0013197f:
LEA RDI,[0x1570c8]
LEA RSI,[0x1470fc]
LEA RDX,[0x136351]
MOV ECX,0x1
CALL 0x001319f7
LAB_0013199e:
MOV EBP,dword ptr [RSP + 0x4]
TEST AL,AL
JZ 0x001319c8
LEA RSI,[0x136351]
LEA RCX,[0x13639b]
XOR EDI,EDI
MOV EDX,0xc5
MOV R8,R14
MOV R9D,EBX
XOR EAX,EAX
CALL 0x0012f4ec
LAB_001319c8:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001319d9:
MOV EDI,EAX
CALL 0x001083f0
|
/* nglog::SetVLOGLevel(char const*, int) */
int4 nglog::SetVLOGLevel(char *param_1,int param_2)
{
bool bVar1;
char cVar2;
int iVar3;
size_t sVar4;
long *plVar5;
long *plVar6;
int8 *puVar7;
int4 local_34;
local_34 = fLI::FLAGS_v;
sVar4 = strlen(param_1);
iVar3 = pthread_mutex_lock((pthread_mutex_t *)vmodule_mutex);
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
if (vmodule_list == (long *)0x0) {
bVar1 = false;
}
else {
bVar1 = false;
plVar5 = vmodule_list;
do {
iVar3 = std::__cxx11::string::compare((char *)plVar5);
if (iVar3 == 0) {
if (!bVar1) {
local_34 = (int4)plVar5[4];
bVar1 = true;
}
*(int *)(plVar5 + 4) = param_2;
}
else if ((!bVar1) &&
(cVar2 = tools::SafeFNMatch_((char *)*plVar5,plVar5[1],param_1,sVar4), cVar2 != '\0'))
{
local_34 = (int4)plVar5[4];
bVar1 = true;
}
plVar5 = (long *)plVar5[5];
} while (plVar5 != (long *)0x0);
}
if (!bVar1) {
/* try { // try from 001318bd to 001318fa has its CatchHandler @ 001319e0 */
plVar5 = (long *)operator_new(0x30);
*plVar5 = (long)(plVar5 + 2);
plVar5[1] = 0;
*(int1 *)(plVar5 + 2) = 0;
strlen(param_1);
std::__cxx11::string::_M_replace((ulong)plVar5,0,(char *)0x0,(ulong)param_1);
*(int *)(plVar5 + 4) = param_2;
plVar5[5] = (long)vmodule_list;
vmodule_list = plVar5;
if (cached_site_list != (int8 *)0x0) {
plVar6 = (long *)&cached_site_list;
puVar7 = cached_site_list;
do {
cVar2 = tools::SafeFNMatch_(param_1,sVar4,(char *)puVar7[1],puVar7[2]);
if (cVar2 == '\0') {
plVar6 = puVar7 + 3;
}
else {
*puVar7 = plVar5 + 4;
*plVar6 = puVar7[3];
}
puVar7 = (int8 *)*plVar6;
} while (puVar7 != (int8 *)0x0);
}
}
pthread_mutex_unlock((pthread_mutex_t *)vmodule_mutex);
if (SetVLOGLevel(char_const*,int)::vlocal__ == (int *)0x0) {
cVar2 = InitializeVLOG3((SiteFlag *)&SetVLOGLevel(char_const*,int)::vlocal__,&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc"
,1);
}
else {
cVar2 = 0 < *SetVLOGLevel(char_const*,int)::vlocal__;
}
if (cVar2 != '\0') {
RawLog(0,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",0xc5,
"Set VLOG level for \"%s\" to %d",param_1,param_2);
}
return local_34;
}
| |
47,149 | nglog::SetVLOGLevel(char const*, int) | ng-log[P]ng-log/src/vlog_is_on.cc | int SetVLOGLevel(const char* module_pattern, int log_level) {
int result = FLAGS_v;
size_t const pattern_len = strlen(module_pattern);
bool found = false;
{
std::lock_guard<std::mutex> l(
vmodule_mutex); // protect whole read-modify-write
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (info->module_pattern == module_pattern) {
if (!found) {
result = info->vlog_level;
found = true;
}
info->vlog_level = log_level;
} else if (!found && SafeFNMatch_(info->module_pattern.c_str(),
info->module_pattern.size(),
module_pattern, pattern_len)) {
result = info->vlog_level;
found = true;
}
}
if (!found) {
auto* info = new VModuleInfo;
info->module_pattern = module_pattern;
info->vlog_level = log_level;
info->next = vmodule_list;
vmodule_list = info;
SiteFlag** item_ptr = &cached_site_list;
SiteFlag* item = cached_site_list;
// We traverse the list fully because the pattern can match several items
// from the list.
while (item) {
if (SafeFNMatch_(module_pattern, pattern_len, item->base_name,
item->base_len)) {
// Redirect the cached value to its module override.
item->level = &info->vlog_level;
*item_ptr = item->next; // Remove the item from the list.
} else {
item_ptr = &item->next;
}
item = *item_ptr;
}
}
}
RAW_VLOG(1, "Set VLOG level for \"%s\" to %d", module_pattern, log_level);
return result;
} | O2 | cpp | nglog::SetVLOGLevel(char const*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x186af(%rip), %rax # 0x4316c
movl (%rax), %ebp
callq 0x82c0
movq %rax, %r15
leaq 0x28692(%rip), %rdi # 0x53160
callq 0x169e6
leaq 0x2864e(%rip), %r12 # 0x53128
xorl %r13d, %r13d
movq (%r12), %r12
testq %r12, %r12
je 0x2ab36
movq %r12, %rdi
movq %r14, %rsi
callq 0x1577a
testb %al, %al
je 0x2ab0a
testb $0x1, %r13b
jne 0x2ab03
movl 0x20(%r12), %ebp
movb $0x1, %r13b
movl %ebx, 0x20(%r12)
jmp 0x2ab30
testb $0x1, %r13b
jne 0x2ab30
movq (%r12), %rdi
movq 0x8(%r12), %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x2aa0c
testb %al, %al
je 0x2ab30
movl 0x20(%r12), %ebp
movb $0x1, %r13b
addq $0x28, %r12
jmp 0x2aadd
movl %ebp, 0x4(%rsp)
testb $0x1, %r13b
je 0x2ab98
leaq 0x28619(%rip), %rdi # 0x53160
callq 0x8510
movq 0x285e5(%rip), %rax # 0x53138
testq %rax, %rax
je 0x2ac26
cmpl $0x0, (%rax)
movl 0x4(%rsp), %ebp
jle 0x2ab87
leaq 0x4869(%rip), %rsi # 0x2f3d5
leaq 0x48ac(%rip), %rcx # 0x2f41f
xorl %edi, %edi
movl $0xc5, %edx
movq %r14, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq 0x28c7c
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0x9e60
movq %rax, %r12
addq $0x10, %rax
movq %rax, (%r12)
andq $0x0, 0x8(%r12)
movb $0x0, 0x10(%r12)
movq %r12, %rdi
movq %r14, %rsi
callq 0x8cd0
movq %r12, %r13
addq $0x20, %r13
movl %ebx, 0x20(%r12)
movq 0x28553(%rip), %rax # 0x53128
movq %rax, 0x28(%r12)
movq %r12, 0x28547(%rip) # 0x53128
leaq 0x28548(%rip), %rbp # 0x53130
movq (%rbp), %r12
testq %r12, %r12
je 0x2ab40
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2aa0c
testb %al, %al
je 0x2ac1d
movq %r13, (%r12)
movq 0x18(%r12), %rax
movq %rax, (%rbp)
jmp 0x2abe8
addq $0x18, %r12
movq %r12, %rbp
jmp 0x2abe8
leaq 0x2850b(%rip), %rdi # 0x53138
leaq 0x18538(%rip), %rsi # 0x4316c
leaq 0x479a(%rip), %rdx # 0x2f3d5
pushq $0x1
popq %rcx
callq 0x2ac6b
testb %al, %al
movl 0x4(%rsp), %ebp
jne 0x2ab65
jmp 0x2ab87
movq %rax, %rbx
leaq 0x28502(%rip), %rdi # 0x53160
callq 0x8510
movq %rbx, %rdi
callq 0x8c30
| _ZN5nglog12SetVLOGLevelEPKci:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, esi
mov r14, rdi
lea rax, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
mov ebp, [rax]
call _strlen
mov r15, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; this
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
lea r12, _ZN5nglogL12vmodule_listE; nglog::vmodule_list
xor r13d, r13d
loc_2AADD:
mov r12, [r12]
test r12, r12
jz short loc_2AB36
mov rdi, r12
mov rsi, r14
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_2AB0A
test r13b, 1
jnz short loc_2AB03
mov ebp, [r12+20h]
mov r13b, 1
loc_2AB03:
mov [r12+20h], ebx
jmp short loc_2AB30
loc_2AB0A:
test r13b, 1
jnz short loc_2AB30
mov rdi, [r12]; this
mov rsi, [r12+8]; char *
mov rdx, r14; unsigned __int64
mov rcx, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_2AB30
mov ebp, [r12+20h]
mov r13b, 1
loc_2AB30:
add r12, 28h ; '('
jmp short loc_2AADD
loc_2AB36:
mov [rsp+38h+var_34], ebp
test r13b, 1
jz short loc_2AB98
loc_2AB40:
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rax, cs:_ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
test rax, rax
jz loc_2AC26
cmp dword ptr [rax], 0
mov ebp, [rsp+38h+var_34]
jle short loc_2AB87
loc_2AB65:
lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSetVlogLevelFo; "Set VLOG level for \"%s\" to %d"
xor edi, edi
mov edx, 0C5h
mov r8, r14
mov r9d, ebx
xor eax, eax
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
loc_2AB87:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2AB98:
push 30h ; '0'
pop rdi; unsigned __int64
call _Znwm; operator new(ulong)
mov r12, rax
add rax, 10h
mov [r12], rax
and qword ptr [r12+8], 0
mov byte ptr [r12+10h], 0
mov rdi, r12
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
mov r13, r12
add r13, 20h ; ' '
mov [r12+20h], ebx
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [r12+28h], rax
mov cs:_ZN5nglogL12vmodule_listE, r12; nglog::vmodule_list
lea rbp, _ZN5nglogL16cached_site_listE; nglog::cached_site_list
loc_2ABE8:
mov r12, [rbp+0]
test r12, r12
jz loc_2AB40
mov rdx, [r12+8]; unsigned __int64
mov rcx, [r12+10h]; char *
mov rdi, r14; this
mov rsi, r15; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jz short loc_2AC1D
mov [r12], r13
mov rax, [r12+18h]
mov [rbp+0], rax
jmp short loc_2ABE8
loc_2AC1D:
add r12, 18h
mov rbp, r12
jmp short loc_2ABE8
loc_2AC26:
lea rdi, _ZZN5nglog12SetVLOGLevelEPKciE8vlocal__; nglog::SetVLOGLevel(char const*,int)::vlocal__
lea rsi, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v
lea rdx, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
push 1
pop rcx
call _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci; nglog::InitializeVLOG3(nglog::SiteFlag *,int *,char const*,int)
test al, al
mov ebp, [rsp+38h+var_34]
jnz loc_2AB65
jmp loc_2AB87
mov rbx, rax
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::SetVLOGLevel(nglog *this, const char *a2)
{
unsigned int v2; // ebp
const char *v3; // r15
long long *v4; // r12
char v5; // r13
long long v6; // r12
unsigned long long v7; // r8
unsigned int v8; // ebp
long long v10; // r12
unsigned long long v11; // r8
long long v12; // r13
long long *v13; // rbp
long long v14; // r12
unsigned int v15; // [rsp+0h] [rbp-34h]
v2 = fLI::FLAGS_v;
v3 = (const char *)strlen(this);
std::mutex::lock((std::mutex *)&nglog::vmodule_mutex);
v4 = &nglog::vmodule_list;
v5 = 0;
while ( 1 )
{
v6 = *v4;
if ( !v6 )
break;
if ( std::operator==<char>(v6) )
{
if ( (v5 & 1) == 0 )
{
v2 = *(_DWORD *)(v6 + 32);
v5 = 1;
}
*(_DWORD *)(v6 + 32) = (_DWORD)a2;
}
else if ( (v5 & 1) == 0
&& nglog::tools::SafeFNMatch_(*(nglog::tools **)v6, *(const char **)(v6 + 8), (long long)this, v3, v7) )
{
v2 = *(_DWORD *)(v6 + 32);
v5 = 1;
}
v4 = (long long *)(v6 + 40);
}
v15 = v2;
if ( (v5 & 1) == 0 )
{
v10 = operator new(48LL);
*(_QWORD *)v10 = v10 + 16;
*(_QWORD *)(v10 + 8) = 0LL;
*(_BYTE *)(v10 + 16) = 0;
std::string::assign(v10, this);
v12 = v10 + 32;
*(_DWORD *)(v10 + 32) = (_DWORD)a2;
*(_QWORD *)(v10 + 40) = nglog::vmodule_list;
nglog::vmodule_list = v10;
v13 = &nglog::cached_site_list;
while ( 1 )
{
v14 = *v13;
if ( !*v13 )
break;
if ( nglog::tools::SafeFNMatch_(this, v3, *(_QWORD *)(v14 + 8), *(const char **)(v14 + 16), v11) )
{
*(_QWORD *)v14 = v12;
*v13 = *(_QWORD *)(v14 + 24);
}
else
{
v13 = (long long *)(v14 + 24);
}
}
}
pthread_mutex_unlock(&nglog::vmodule_mutex);
if ( !nglog::SetVLOGLevel(char const*,int)::vlocal__ )
{
v8 = v15;
if ( !(unsigned __int8)nglog::InitializeVLOG3(
&nglog::SetVLOGLevel(char const*,int)::vlocal__,
&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
1LL) )
return v8;
goto LABEL_14;
}
v8 = v15;
if ( *(int *)nglog::SetVLOGLevel(char const*,int)::vlocal__ > 0 )
LABEL_14:
nglog::RawLog(
0LL,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",
197,
"Set VLOG level for \"%s\" to %d",
(const char *)this,
(_DWORD)a2);
return v8;
}
| SetVLOGLevel:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
LEA RAX,[0x14316c]
MOV EBP,dword ptr [RAX]
CALL 0x001082c0
MOV R15,RAX
LEA RDI,[0x153160]
CALL 0x001169e6
LEA R12,[0x153128]
XOR R13D,R13D
LAB_0012aadd:
MOV R12,qword ptr [R12]
TEST R12,R12
JZ 0x0012ab36
MOV RDI,R12
MOV RSI,R14
CALL 0x0011577a
TEST AL,AL
JZ 0x0012ab0a
TEST R13B,0x1
JNZ 0x0012ab03
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
LAB_0012ab03:
MOV dword ptr [R12 + 0x20],EBX
JMP 0x0012ab30
LAB_0012ab0a:
TEST R13B,0x1
JNZ 0x0012ab30
MOV RDI,qword ptr [R12]
MOV RSI,qword ptr [R12 + 0x8]
MOV RDX,R14
MOV RCX,R15
CALL 0x0012aa0c
TEST AL,AL
JZ 0x0012ab30
MOV EBP,dword ptr [R12 + 0x20]
MOV R13B,0x1
LAB_0012ab30:
ADD R12,0x28
JMP 0x0012aadd
LAB_0012ab36:
MOV dword ptr [RSP + 0x4],EBP
TEST R13B,0x1
JZ 0x0012ab98
LAB_0012ab40:
LEA RDI,[0x153160]
CALL 0x00108510
MOV RAX,qword ptr [0x00153138]
TEST RAX,RAX
JZ 0x0012ac26
CMP dword ptr [RAX],0x0
MOV EBP,dword ptr [RSP + 0x4]
JLE 0x0012ab87
LAB_0012ab65:
LEA RSI,[0x12f3d5]
LEA RCX,[0x12f41f]
XOR EDI,EDI
MOV EDX,0xc5
MOV R8,R14
MOV R9D,EBX
XOR EAX,EAX
CALL 0x00128c7c
LAB_0012ab87:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012ab98:
PUSH 0x30
POP RDI
CALL 0x00109e60
MOV R12,RAX
ADD RAX,0x10
MOV qword ptr [R12],RAX
AND qword ptr [R12 + 0x8],0x0
MOV byte ptr [R12 + 0x10],0x0
MOV RDI,R12
MOV RSI,R14
CALL 0x00108cd0
LAB_0012abc2:
MOV R13,R12
ADD R13,0x20
MOV dword ptr [R12 + 0x20],EBX
MOV RAX,qword ptr [0x00153128]
MOV qword ptr [R12 + 0x28],RAX
MOV qword ptr [0x00153128],R12
LEA RBP,[0x153130]
LAB_0012abe8:
MOV R12,qword ptr [RBP]
TEST R12,R12
JZ 0x0012ab40
MOV RDX,qword ptr [R12 + 0x8]
MOV RCX,qword ptr [R12 + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x0012aa0c
TEST AL,AL
JZ 0x0012ac1d
MOV qword ptr [R12],R13
MOV RAX,qword ptr [R12 + 0x18]
MOV qword ptr [RBP],RAX
JMP 0x0012abe8
LAB_0012ac1d:
ADD R12,0x18
MOV RBP,R12
JMP 0x0012abe8
LAB_0012ac26:
LEA RDI,[0x153138]
LEA RSI,[0x14316c]
LEA RDX,[0x12f3d5]
PUSH 0x1
POP RCX
CALL 0x0012ac6b
TEST AL,AL
MOV EBP,dword ptr [RSP + 0x4]
JNZ 0x0012ab65
JMP 0x0012ab87
|
/* nglog::SetVLOGLevel(char const*, int) */
int4 nglog::SetVLOGLevel(char *param_1,int param_2)
{
int8 *puVar1;
bool bVar2;
bool bVar3;
char cVar4;
size_t sVar5;
char *pcVar6;
int4 uVar7;
long *plVar8;
string *psVar9;
uVar7 = fLI::FLAGS_v;
sVar5 = strlen(param_1);
std::mutex::lock((mutex *)vmodule_mutex);
bVar2 = false;
for (psVar9 = (string *)&vmodule_list; psVar9 = *(string **)psVar9, psVar9 != (string *)0x0;
psVar9 = psVar9 + 0x28) {
bVar3 = std::operator==(psVar9,param_1);
if (bVar3) {
if (!bVar2) {
uVar7 = *(int4 *)(psVar9 + 0x20);
bVar2 = true;
}
*(int *)(psVar9 + 0x20) = param_2;
}
else if ((!bVar2) &&
(cVar4 = tools::SafeFNMatch_(*(char **)psVar9,*(ulong *)(psVar9 + 8),param_1,sVar5),
cVar4 != '\0')) {
uVar7 = *(int4 *)(psVar9 + 0x20);
bVar2 = true;
}
}
if (!bVar2) {
/* try { // try from 0012ab98 to 0012abc1 has its CatchHandler @ 0012ac54 */
pcVar6 = (char *)operator_new(0x30);
*(char **)pcVar6 = pcVar6 + 0x10;
pcVar6[8] = '\0';
pcVar6[9] = '\0';
pcVar6[10] = '\0';
pcVar6[0xb] = '\0';
pcVar6[0xc] = '\0';
pcVar6[0xd] = '\0';
pcVar6[0xe] = '\0';
pcVar6[0xf] = '\0';
pcVar6[0x10] = '\0';
std::__cxx11::string::assign(pcVar6);
*(int *)(pcVar6 + 0x20) = param_2;
*(char **)(pcVar6 + 0x28) = vmodule_list;
plVar8 = &cached_site_list;
vmodule_list = pcVar6;
while (puVar1 = (int8 *)*plVar8, puVar1 != (int8 *)0x0) {
cVar4 = tools::SafeFNMatch_(param_1,sVar5,(char *)puVar1[1],puVar1[2]);
if (cVar4 == '\0') {
plVar8 = puVar1 + 3;
}
else {
*puVar1 = pcVar6 + 0x20;
*plVar8 = puVar1[3];
}
}
}
pthread_mutex_unlock((pthread_mutex_t *)vmodule_mutex);
if (SetVLOGLevel(char_const*,int)::vlocal__ == (int *)0x0) {
cVar4 = InitializeVLOG3((SiteFlag *)&SetVLOGLevel(char_const*,int)::vlocal__,&fLI::FLAGS_v,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc"
,1);
if (cVar4 == '\0') {
return uVar7;
}
}
else if (*SetVLOGLevel(char_const*,int)::vlocal__ < 1) {
return uVar7;
}
RawLog(0,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/vlog_is_on.cc",0xc5,
"Set VLOG level for \"%s\" to %d",param_1,param_2);
return uVar7;
}
| |
47,150 | ImPlot::BeginDragDropSourcePlot(int) | zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp | bool BeginDragDropSourcePlot(ImGuiDragDropFlags flags) {
SetupLock();
ImPlotContext& gp = *GImPlot;
ImPlotPlot* plot = gp.CurrentPlot;
if (GImGui->IO.KeyMods == gp.InputMap.OverrideMod || GImGui->DragDropPayload.SourceId == plot->ID)
return ImGui::ItemAdd(plot->PlotRect, plot->ID) && ImGui::BeginDragDropSource(flags);
return false;
} | O1 | cpp | ImPlot::BeginDragDropSourcePlot(int):
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x273d5e(%rip), %r14 # 0x336ca0
movq 0x50(%r14), %rax
cmpb $0x0, 0x9de(%rax)
jne 0xc2f54
callq 0xb930f
movq 0x50(%r14), %rax
movb $0x1, 0x9de(%rax)
movq 0x273d3a(%rip), %rcx # 0x336ca0
movq 0x50(%rcx), %rdi
leaq 0x2740bf(%rip), %rax # 0x337030
movq (%rax), %rax
movl 0x108(%rax), %edx
cmpl 0x5dc(%rcx), %edx
je 0xc2f8c
movl 0x20d4(%rax), %eax
cmpl (%rdi), %eax
jne 0xc2fb0
movl (%rdi), %esi
addq $0x9a0, %rdi # imm = 0x9A0
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2268b6
testb %al, %al
je 0xc2fb0
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x22e7cc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZN6ImPlot23BeginDragDropSourcePlotEi:
push r14
push rbx
push rax
mov ebx, edi
mov r14, cs:GImPlot
mov rax, [r14+50h]
cmp byte ptr [rax+9DEh], 0
jnz short loc_C2F54
call _ZN6ImPlot11SetupFinishEv; ImPlot::SetupFinish(void)
loc_C2F54:
mov rax, [r14+50h]
mov byte ptr [rax+9DEh], 1
mov rcx, cs:GImPlot
mov rdi, [rcx+50h]
lea rax, GImGui
mov rax, [rax]
mov edx, [rax+108h]
cmp edx, [rcx+5DCh]
jz short loc_C2F8C
mov eax, [rax+20D4h]
cmp eax, [rdi]
jnz short loc_C2FB0
loc_C2F8C:
mov esi, [rdi]; int
add rdi, 9A0h
xor edx, edx
xor ecx, ecx
call _ZN5ImGui7ItemAddERK6ImRectjPS1_i; ImGui::ItemAdd(ImRect const&,uint,ImRect const*,int)
test al, al
jz short loc_C2FB0
mov edi, ebx; this
add rsp, 8
pop rbx
pop r14
jmp _ZN5ImGui19BeginDragDropSourceEi; ImGui::BeginDragDropSource(int)
loc_C2FB0:
xor eax, eax
add rsp, 8
pop rbx
pop r14
retn
| long long ImPlot::BeginDragDropSourcePlot(ImPlot *this, const char *a2)
{
unsigned int v2; // ebx
ImGui *v3; // r14
_DWORD *v4; // rdi
long long v5; // rsi
v2 = (unsigned int)this;
v3 = GImPlot;
if ( !*(_BYTE *)(*((_QWORD *)GImPlot + 10) + 2526LL) )
ImPlot::SetupFinish(this, a2);
*(_BYTE *)(*((_QWORD *)v3 + 10) + 2526LL) = 1;
v4 = (_DWORD *)*((_QWORD *)GImPlot + 10);
if ( (*((_DWORD *)GImGui + 66) == *((_DWORD *)GImPlot + 375) || *((_DWORD *)GImGui + 2101) == *v4)
&& (v5 = (unsigned int)*v4, (unsigned __int8)ImGui::ItemAdd(v4 + 616, v5, 0LL, 0LL)) )
{
return ImGui::BeginDragDropSource((ImGui *)v2, v5);
}
else
{
return 0LL;
}
}
| BeginDragDropSourcePlot:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDI
MOV R14,qword ptr [0x00436ca0]
MOV RAX,qword ptr [R14 + 0x50]
CMP byte ptr [RAX + 0x9de],0x0
JNZ 0x001c2f54
CALL 0x001b930f
LAB_001c2f54:
MOV RAX,qword ptr [R14 + 0x50]
MOV byte ptr [RAX + 0x9de],0x1
MOV RCX,qword ptr [0x00436ca0]
MOV RDI,qword ptr [RCX + 0x50]
LEA RAX,[0x437030]
MOV RAX,qword ptr [RAX]
MOV EDX,dword ptr [RAX + 0x108]
CMP EDX,dword ptr [RCX + 0x5dc]
JZ 0x001c2f8c
MOV EAX,dword ptr [RAX + 0x20d4]
CMP EAX,dword ptr [RDI]
JNZ 0x001c2fb0
LAB_001c2f8c:
MOV ESI,dword ptr [RDI]
ADD RDI,0x9a0
XOR EDX,EDX
XOR ECX,ECX
CALL 0x003268b6
TEST AL,AL
JZ 0x001c2fb0
MOV EDI,EBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0032e7cc
LAB_001c2fb0:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* ImPlot::BeginDragDropSourcePlot(int) */
int8 ImPlot::BeginDragDropSourcePlot(int param_1)
{
uint *puVar1;
long lVar2;
char cVar3;
int8 uVar4;
lVar2 = GImPlot;
if (*(char *)(*(long *)(GImPlot + 0x50) + 0x9de) == '\0') {
SetupFinish();
}
*(int1 *)(*(long *)(lVar2 + 0x50) + 0x9de) = 1;
puVar1 = *(uint **)(GImPlot + 0x50);
if ((*(int *)(GImGui + 0x108) == *(int *)(GImPlot + 0x5dc)) ||
(*(uint *)(GImGui + 0x20d4) == *puVar1)) {
cVar3 = ImGui::ItemAdd((ImRect *)(puVar1 + 0x268),*puVar1,(ImRect *)0x0,0);
if (cVar3 != '\0') {
uVar4 = ImGui::BeginDragDropSource(param_1);
return uVar4;
}
}
return 0;
}
| |
47,151 | mysql_refresh_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_refresh_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_refresh,
(parms->mysql, parms->refresh_options),
parms->mysql,
int,
r_int)
} | O3 | c | mysql_refresh_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %rbx
movl 0x8(%rdi), %esi
movq %rax, %rdi
callq 0x1c530
movl %eax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_refresh_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi]
mov rcx, [rax+480h]
mov rbx, [rcx+28h]
mov esi, [rdi+8]
mov rdi, rax
call mysql_refresh
mov [rbx+8], eax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_refresh_start_internal(long long a1)
{
_DWORD *v1; // rbx
long long result; // rax
v1 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
result = mysql_refresh(*(_QWORD *)a1, *(_DWORD *)(a1 + 8));
v1[2] = result;
*v1 = 0;
return result;
}
| mysql_refresh_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RCX + 0x28]
MOV ESI,dword ptr [RDI + 0x8]
MOV RDI,RAX
CALL 0x0011c530
MOV dword ptr [RBX + 0x8],EAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_refresh_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_refresh(*param_1,(int)param_1[1]);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
| |
47,152 | pvio_socket_fast_send | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | int pvio_socket_fast_send(MARIADB_PVIO *pvio)
{
int r= 0;
struct st_pvio_socket *csock= NULL;
if (!pvio || !pvio->data)
return 1;
csock= (struct st_pvio_socket *)pvio->data;
/* Setting IP_TOS is not recommended on Windows. See
http://msdn.microsoft.com/en-us/library/windows/desktop/ms738586(v=vs.85).aspx
*/
#if !defined(_WIN32) && defined(IPTOS_THROUGHPUT)
{
int tos = IPTOS_THROUGHPUT;
r= setsockopt(csock->socket, IPPROTO_IP, IP_TOS,
(const void *)&tos, sizeof(tos));
}
#endif /* !_WIN32 && IPTOS_THROUGHPUT */
if (!r)
{
int opt = 1;
/* turn off nagle algorithm */
r= setsockopt(csock->socket, IPPROTO_TCP, TCP_NODELAY,
#ifdef _WIN32
(const char *)&opt, (int)sizeof(opt));
#else
(const void *)&opt, sizeof(opt));
#endif
}
return r;
} | O3 | c | pvio_socket_fast_send:
movl $0x1, %eax
testq %rdi, %rdi
je 0x318ce
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x318c8
leaq -0x10(%rbp), %rcx
movl $0x8, (%rcx)
movl (%rbx), %edi
xorl %esi, %esi
movl $0x1, %edx
movl $0x4, %r8d
callq 0x137b0
testl %eax, %eax
jne 0x318c8
leaq -0xc(%rbp), %rcx
movl $0x1, (%rcx)
movl (%rbx), %edi
movl $0x6, %esi
movl $0x1, %edx
movl $0x4, %r8d
callq 0x137b0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| pvio_socket_fast_send:
mov eax, 1
test rdi, rdi
jz short locret_318CE
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, [rdi]
test rbx, rbx
jz short loc_318C8
lea rcx, [rbp-10h]
mov dword ptr [rcx], 8
mov edi, [rbx]
xor esi, esi
mov edx, 1
mov r8d, 4
call _setsockopt
test eax, eax
jnz short loc_318C8
lea rcx, [rbp-0Ch]
mov dword ptr [rcx], 1
mov edi, [rbx]
mov esi, 6
mov edx, 1
mov r8d, 4
call _setsockopt
loc_318C8:
add rsp, 8
pop rbx
pop rbp
locret_318CE:
retn
| long long pvio_socket_fast_send(unsigned int **a1)
{
long long result; // rax
unsigned int *v2; // rbx
_QWORD v3[3]; // [rsp-18h] [rbp-18h] BYREF
result = 1LL;
if ( a1 )
{
v3[0] = 1LL;
v2 = *a1;
if ( *a1 )
{
LODWORD(v3[0]) = 8;
result = setsockopt(*v2, 0LL, 1LL, v3, 4LL);
if ( !(_DWORD)result )
{
HIDWORD(v3[0]) = 1;
return setsockopt(*v2, 6LL, 1LL, (char *)v3 + 4, 4LL);
}
}
}
return result;
}
| pvio_socket_fast_send:
MOV EAX,0x1
TEST RDI,RDI
JZ 0x001318ce
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,qword ptr [RDI]
TEST RBX,RBX
JZ 0x001318c8
LEA RCX,[RBP + -0x10]
MOV dword ptr [RCX],0x8
MOV EDI,dword ptr [RBX]
XOR ESI,ESI
MOV EDX,0x1
MOV R8D,0x4
CALL 0x001137b0
TEST EAX,EAX
JNZ 0x001318c8
LEA RCX,[RBP + -0xc]
MOV dword ptr [RCX],0x1
MOV EDI,dword ptr [RBX]
MOV ESI,0x6
MOV EDX,0x1
MOV R8D,0x4
CALL 0x001137b0
LAB_001318c8:
ADD RSP,0x8
POP RBX
POP RBP
LAB_001318ce:
RET
|
void pvio_socket_fast_send(int8 *param_1)
{
int *piVar1;
int iVar2;
int8 local_18;
if ((param_1 != (int8 *)0x0) && (piVar1 = (int *)*param_1, piVar1 != (int *)0x0)) {
local_18 = 8;
iVar2 = setsockopt(*piVar1,0,1,&local_18,4);
if (iVar2 == 0) {
local_18 = CONCAT44(1,(int4)local_18);
setsockopt(*piVar1,6,1,(void *)((long)&local_18 + 4),4);
}
}
return;
}
| |
47,153 | GAParameterZ80Cond::GAParameterZ80Cond(char const*) | goodasm/galangz80.cpp | GAParameterZ80Cond::GAParameterZ80Cond(const char* mask){
setMask(mask);
} | O0 | cpp | GAParameterZ80Cond::GAParameterZ80Cond(char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x10b090
movq -0x38(%rbp), %rdi
leaq 0x80930(%rip), %rax # 0x14b578
addq $0x10, %rax
movq %rax, (%rdi)
addq $0xb0, %rdi
movq %rdi, -0x30(%rbp)
movq %rdi, -0x18(%rbp)
leaq 0x4d18e(%rip), %rsi # 0x117df3
callq 0xe710
jmp 0xcac6c
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
movq %rdi, -0x18(%rbp)
leaq 0x4753a(%rip), %rsi # 0x1121b9
callq 0xe710
jmp 0xcac86
movq -0x30(%rbp), %rdi
addq $0x30, %rdi
movq %rdi, -0x18(%rbp)
leaq 0x514cc(%rip), %rsi # 0x11c165
callq 0xe710
jmp 0xcaca0
movq -0x30(%rbp), %rdi
addq $0x48, %rdi
movq %rdi, -0x18(%rbp)
leaq 0x4be3d(%rip), %rsi # 0x116af0
callq 0xe710
jmp 0xcacba
movq -0x30(%rbp), %rdi
addq $0x60, %rdi
movq %rdi, -0x18(%rbp)
leaq 0x5154a(%rip), %rsi # 0x11c217
callq 0xe710
jmp 0xcacd4
movq -0x30(%rbp), %rdi
addq $0x78, %rdi
movq %rdi, -0x18(%rbp)
leaq 0x5150c(%rip), %rsi # 0x11c1f3
callq 0xe710
jmp 0xcacee
movq -0x30(%rbp), %rdi
addq $0x90, %rdi
movq %rdi, -0x18(%rbp)
leaq 0x52dca(%rip), %rsi # 0x11dace
callq 0xe710
jmp 0xcad0b
movq -0x30(%rbp), %rdi
addq $0xa8, %rdi
movq %rdi, -0x18(%rbp)
leaq 0x50b1e(%rip), %rsi # 0x11b83f
callq 0xe710
jmp 0xcad28
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x109170
jmp 0xcad37
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rcx
movq %rdx, -0x48(%rbp)
movq %rax, %rdx
movq -0x48(%rbp), %rax
movq %rdx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
cmpq %rax, %rcx
movq %rax, -0x40(%rbp)
je 0xcad82
movq -0x40(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x50(%rbp)
callq 0xe770
movq -0x30(%rbp), %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x40(%rbp)
jne 0xcad60
jmp 0xcadc3
movq %rdx, %rcx
movq %rax, %rdx
movq -0x30(%rbp), %rax
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
addq $0xc0, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x60(%rbp)
callq 0xe770
movq -0x30(%rbp), %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x58(%rbp)
jne 0xcad9f
jmp 0xcadc3
movq -0x38(%rbp), %rdi
callq 0x1091b0
movq -0x20(%rbp), %rdi
callq 0x7210
nopw %cs:(%rax,%rax)
| _ZN18GAParameterZ80CondC2EPKc:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; this
mov [rbp+var_38], rdi
call _ZN11GAParameterC2Ev; GAParameter::GAParameter(void)
mov rdi, [rbp+var_38]
lea rax, _ZTV18GAParameterZ80Cond; `vtable for'GAParameterZ80Cond
add rax, 10h
mov [rdi], rax
add rdi, 0B0h; this
mov [rbp+var_30], rdi
mov [rbp+var_18], rdi
lea rsi, aRetNz+4; char *
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_CAC6C:
mov rdi, [rbp+var_30]
add rdi, 18h; this
mov [rbp+var_18], rdi
lea rsi, aTaz+2; char *
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_CAC86:
mov rdi, [rbp+var_30]
add rdi, 30h ; '0'; this
mov [rbp+var_18], rdi
lea rsi, aCnc+1; char *
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_CACA0:
mov rdi, [rbp+var_30]
add rdi, 48h ; 'H'; this
mov [rbp+var_18], rdi
lea rsi, aMov0xffC+0Ah; char *
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_CACBA:
mov rdi, [rbp+var_30]
add rdi, 60h ; '`'; this
mov [rbp+var_18], rdi
lea rsi, aCpo+1; char *
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_CACD4:
mov rdi, [rbp+var_30]
add rdi, 78h ; 'x'; this
mov [rbp+var_18], rdi
lea rsi, aCpe+1; char *
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_CACEE:
mov rdi, [rbp+var_30]
add rdi, 90h; this
mov [rbp+var_18], rdi
lea rsi, aP_2+1; char *
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_CAD0B:
mov rdi, [rbp+var_30]
add rdi, 0A8h; this
mov [rbp+var_18], rdi
lea rsi, aAam+2; char *
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_CAD28:
mov rdi, [rbp+var_38]; this
mov rsi, [rbp+var_10]; char *
call _ZN11GAParameter7setMaskEPKc; GAParameter::setMask(char const*)
jmp short $+2
loc_CAD37:
add rsp, 60h
pop rbp
retn
mov rcx, [rbp+var_30]
mov [rbp+var_48], rdx
mov rdx, rax
mov rax, [rbp+var_48]
mov [rbp+var_20], rdx
mov [rbp+var_24], eax
mov rax, [rbp+var_18]
cmp rcx, rax
mov [rbp+var_40], rax
jz short loc_CAD82
loc_CAD60:
mov rdi, [rbp+var_40]
add rdi, 0FFFFFFFFFFFFFFE8h; this
mov [rbp+var_50], rdi
call _ZN7QStringD2Ev; QString::~QString()
mov rcx, [rbp+var_30]
mov rax, [rbp+var_50]
cmp rax, rcx
mov [rbp+var_40], rax
jnz short loc_CAD60
loc_CAD82:
jmp short loc_CADC3
mov rcx, rdx
mov rdx, rax
mov rax, [rbp+var_30]
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
add rax, 0C0h
mov [rbp+var_58], rax
loc_CAD9F:
mov rdi, [rbp+var_58]
add rdi, 0FFFFFFFFFFFFFFE8h; this
mov [rbp+var_60], rdi
call _ZN7QStringD2Ev; QString::~QString()
mov rcx, [rbp+var_30]
mov rax, [rbp+var_60]
cmp rax, rcx
mov [rbp+var_58], rax
jnz short loc_CAD9F
jmp short $+2
loc_CADC3:
mov rdi, [rbp+var_38]; this
call _ZN11GAParameterD2Ev; GAParameter::~GAParameter()
mov rdi, [rbp+var_20]
call __Unwind_Resume
| void GAParameterZ80Cond::GAParameterZ80Cond(GAParameterZ80Cond *this, const char *a2)
{
GAParameter::GAParameter(this);
*(_QWORD *)this = &`vtable for'GAParameterZ80Cond + 2;
QString::QString((GAParameterZ80Cond *)((char *)this + 176), "nz");
QString::QString((GAParameterZ80Cond *)((char *)this + 200), "z");
QString::QString((GAParameterZ80Cond *)((char *)this + 224), "nc");
QString::QString((GAParameterZ80Cond *)((char *)this + 248), "c");
QString::QString((GAParameterZ80Cond *)((char *)this + 272), "po");
QString::QString((GAParameterZ80Cond *)((char *)this + 296), "pe");
QString::QString((GAParameterZ80Cond *)((char *)this + 320), "p");
QString::QString((GAParameterZ80Cond *)((char *)this + 344), "m");
GAParameter::setMask(this, a2);
}
| GAParameterZ80Cond:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RDI
CALL 0x0020b090
MOV RDI,qword ptr [RBP + -0x38]
LEA RAX,[0x24b578]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
ADD RDI,0xb0
MOV qword ptr [RBP + -0x30],RDI
MOV qword ptr [RBP + -0x18],RDI
LAB_001cac5e:
LEA RSI,[0x217df3]
CALL 0x0010e710
JMP 0x001cac6c
LAB_001cac6c:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x18
MOV qword ptr [RBP + -0x18],RDI
LEA RSI,[0x2121b9]
CALL 0x0010e710
JMP 0x001cac86
LAB_001cac86:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x30
MOV qword ptr [RBP + -0x18],RDI
LEA RSI,[0x21c165]
CALL 0x0010e710
JMP 0x001caca0
LAB_001caca0:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x48
MOV qword ptr [RBP + -0x18],RDI
LEA RSI,[0x216af0]
CALL 0x0010e710
JMP 0x001cacba
LAB_001cacba:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x60
MOV qword ptr [RBP + -0x18],RDI
LEA RSI,[0x21c217]
CALL 0x0010e710
JMP 0x001cacd4
LAB_001cacd4:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x78
MOV qword ptr [RBP + -0x18],RDI
LEA RSI,[0x21c1f3]
CALL 0x0010e710
JMP 0x001cacee
LAB_001cacee:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x90
MOV qword ptr [RBP + -0x18],RDI
LEA RSI,[0x21dace]
CALL 0x0010e710
JMP 0x001cad0b
LAB_001cad0b:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0xa8
MOV qword ptr [RBP + -0x18],RDI
LEA RSI,[0x21b83f]
CALL 0x0010e710
JMP 0x001cad28
LAB_001cad28:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
LAB_001cad30:
CALL 0x00209170
LAB_001cad35:
JMP 0x001cad37
LAB_001cad37:
ADD RSP,0x60
POP RBP
RET
|
/* GAParameterZ80Cond::GAParameterZ80Cond(char const*) */
void __thiscall GAParameterZ80Cond::GAParameterZ80Cond(GAParameterZ80Cond *this,char *param_1)
{
GAParameter::GAParameter((GAParameter *)this);
*(int ***)this = &PTR_decode_0024b588;
/* try { // try from 001cac5e to 001cad25 has its CatchHandler @ 001cad3d */
QString::QString((QString *)(this + 0xb0),"nz");
QString::QString((QString *)(this + 200),"z");
QString::QString((QString *)(this + 0xe0),"nc");
QString::QString((QString *)(this + 0xf8),"c");
QString::QString((QString *)(this + 0x110),"po");
QString::QString((QString *)(this + 0x128),"pe");
QString::QString((QString *)(this + 0x140),"p");
QString::QString((QString *)(this + 0x158),"m");
/* try { // try from 001cad30 to 001cad34 has its CatchHandler @ 001cad84 */
GAParameter::setMask((GAParameter *)this,param_1);
return;
}
| |
47,154 | httplib::Response::set_content(char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | nickolajgrishuk[P]metricz-cpp/build_O1/_deps/httplib-src/httplib.h | inline void Response::set_content(const char *s, size_t n,
const std::string &content_type) {
body.assign(s, n);
auto rng = headers.equal_range("Content-Type");
headers.erase(rng.first, rng.second);
set_header("Content-Type", content_type);
} | O1 | c | httplib::Response::set_content(char const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movq %rdx, %r8
movq %rsi, %rcx
movq %rdi, %r14
addq $0x78, %rdi
movq 0x80(%r14), %rdx
xorl %esi, %esi
callq 0x8870
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x172a2(%rip), %rsi # 0x2de7b
leaq 0x172a7(%rip), %rdx # 0x2de87
movq %rsp, %rdi
callq 0x107fc
addq $0x48, %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x16d4c
movq %rax, %r15
movq %rdx, %r12
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x16c0b
callq 0x8520
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x16f1c
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0x17255(%rip), %rsi # 0x2de7b
leaq 0x1725a(%rip), %rdx # 0x2de87
callq 0x107fc
movq (%rsp), %rax
movb (%rax), %dl
testb %dl, %dl
setne %cl
je 0x16c5b
incq %rax
cmpb $0xa, %dl
je 0x16c5b
movzbl %dl, %edx
cmpl $0xd, %edx
je 0x16c5b
movb (%rax), %dl
incq %rax
testb %dl, %dl
setne %cl
jne 0x16c42
testb $0x1, %cl
jne 0x16c9b
movq (%rbx), %rax
movb (%rax), %dl
testb %dl, %dl
setne %cl
je 0x16c88
incq %rax
cmpb $0xa, %dl
je 0x16c88
movzbl %dl, %edx
cmpl $0xd, %edx
je 0x16c88
movb (%rax), %dl
incq %rax
testb %dl, %dl
setne %cl
jne 0x16c6f
testb $0x1, %cl
jne 0x16c9b
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x16fea
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x16ca9
callq 0x8520
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x16cbb
jmp 0x16cce
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x16cd1
callq 0x8520
jmp 0x16cd1
movq %rax, %rbx
movq %rbx, %rdi
callq 0x8990
nop
| _ZN7httplib8Response11set_contentEPKcmRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov rbx, rcx
mov r8, rdx
mov rcx, rsi
mov r14, rdi
add rdi, 78h ; 'x'
mov rdx, [r14+80h]
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
lea r13, [rsp+48h+var_38]
mov [r13-10h], r13
lea rsi, aContentType; "Content-Type"
lea rdx, aContentType+0Ch; ""
mov rdi, rsp
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)
add r14, 48h ; 'H'
mov rsi, rsp
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN7httplib6detail2ciESaIS8_EE11equal_rangeERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>>::equal_range(std::string const&)
mov r15, rax
mov r12, rdx
mov rdi, [rsp+48h+var_48]; void *
cmp rdi, r13
jz short loc_16C0B
call __ZdlPv; operator delete(void *)
loc_16C0B:
mov rdi, r14
mov rsi, r15
mov rdx, r12
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN7httplib6detail2ciESaIS8_EE12_M_erase_auxESt23_Rb_tree_const_iteratorIS8_ESH_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>>::_M_erase_aux(std::_Rb_tree_const_iterator<std::pair<std::string const,std::string>>,std::_Rb_tree_const_iterator<std::pair<std::string const,std::string>>)
mov rdi, rsp
mov [rdi], r13
lea rsi, aContentType; "Content-Type"
lea rdx, aContentType+0Ch; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, [rsp+48h+var_48]
mov dl, [rax]
test dl, dl
setnz cl
jz short loc_16C5B
inc rax
loc_16C42:
cmp dl, 0Ah
jz short loc_16C5B
movzx edx, dl
cmp edx, 0Dh
jz short loc_16C5B
mov dl, [rax]
inc rax
test dl, dl
setnz cl
jnz short loc_16C42
loc_16C5B:
test cl, 1
jnz short loc_16C9B
mov rax, [rbx]
mov dl, [rax]
test dl, dl
setnz cl
jz short loc_16C88
inc rax
loc_16C6F:
cmp dl, 0Ah
jz short loc_16C88
movzx edx, dl
cmp edx, 0Dh
jz short loc_16C88
mov dl, [rax]
inc rax
test dl, dl
setnz cl
jnz short loc_16C6F
loc_16C88:
test cl, 1
jnz short loc_16C9B
mov rsi, rsp
mov rdi, r14
mov rdx, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_EN7httplib6detail2ciESaIS8_EE16_M_emplace_equalIJRS7_SH_EEESt17_Rb_tree_iteratorIS8_EDpOT_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>>::_M_emplace_equal<std::string const&,std::string const&>(std::string const&,std::string const&)
loc_16C9B:
mov rdi, [rsp+48h+var_48]; void *
cmp rdi, r13
jz short loc_16CA9
call __ZdlPv; operator delete(void *)
loc_16CA9:
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short loc_16CBB
jmp short loc_16CCE
loc_16CBB:
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r13
jz short loc_16CD1
call __ZdlPv; operator delete(void *)
jmp short loc_16CD1
loc_16CCE:
mov rbx, rax
loc_16CD1:
mov rdi, rbx
call __Unwind_Resume
| void httplib::Response::set_content(long long a1, long long a2, long long a3, char **a4)
{
long long v5; // r14
long long v6; // r15
long long v7; // rdx
long long v8; // r12
char v9; // dl
bool v10; // cl
char *v11; // rax
char v12; // dl
bool v13; // cl
char *v14; // rax
void *v15[2]; // [rsp+0h] [rbp-48h] BYREF
_BYTE v16[56]; // [rsp+10h] [rbp-38h] BYREF
std::string::_M_replace(a1 + 120, 0LL, *(_QWORD *)(a1 + 128), a2, a3);
v15[0] = v16;
std::string::_M_construct<char const*>(v15, "Content-Type", (long long)"");
v5 = a1 + 72;
v6 = std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>>::equal_range(
a1 + 72,
v15);
v8 = v7;
if ( v15[0] != v16 )
operator delete(v15[0]);
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>>::_M_erase_aux(
v5,
v6,
v8);
v15[0] = v16;
std::string::_M_construct<char const*>(v15, "Content-Type", (long long)"");
v9 = *(_BYTE *)v15[0];
v10 = *(_BYTE *)v15[0] != 0;
if ( *(_BYTE *)v15[0] )
{
v11 = (char *)v15[0] + 1;
do
{
if ( v9 == 10 )
break;
if ( v9 == 13 )
break;
v9 = *v11++;
v10 = v9 != 0;
}
while ( v9 );
}
if ( !v10 )
{
v12 = **a4;
v13 = v12 != 0;
if ( v12 )
{
v14 = *a4 + 1;
do
{
if ( v12 == 10 )
break;
if ( v12 == 13 )
break;
v12 = *v14++;
v13 = v12 != 0;
}
while ( v12 );
}
if ( !v13 )
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>>::_M_emplace_equal<std::string const&,std::string const&>(
v5,
v15,
a4);
}
if ( v15[0] != v16 )
operator delete(v15[0]);
}
| set_content:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RBX,RCX
MOV R8,RDX
MOV RCX,RSI
MOV R14,RDI
ADD RDI,0x78
MOV RDX,qword ptr [R14 + 0x80]
XOR ESI,ESI
CALL 0x00108870
LEA R13,[RSP + 0x10]
MOV qword ptr [R13 + -0x10],R13
LAB_00116bd2:
LEA RSI,[0x12de7b]
LEA RDX,[0x12de87]
MOV RDI,RSP
CALL 0x001107fc
ADD R14,0x48
LAB_00116bec:
MOV RSI,RSP
MOV RDI,R14
CALL 0x00116d4c
LAB_00116bf7:
MOV R15,RAX
MOV R12,RDX
MOV RDI,qword ptr [RSP]
CMP RDI,R13
JZ 0x00116c0b
CALL 0x00108520
LAB_00116c0b:
MOV RDI,R14
MOV RSI,R15
MOV RDX,R12
CALL 0x00116f1c
MOV RDI,RSP
MOV qword ptr [RDI],R13
LAB_00116c1f:
LEA RSI,[0x12de7b]
LEA RDX,[0x12de87]
CALL 0x001107fc
MOV RAX,qword ptr [RSP]
MOV DL,byte ptr [RAX]
TEST DL,DL
SETNZ CL
JZ 0x00116c5b
INC RAX
LAB_00116c42:
CMP DL,0xa
JZ 0x00116c5b
MOVZX EDX,DL
CMP EDX,0xd
JZ 0x00116c5b
MOV DL,byte ptr [RAX]
INC RAX
TEST DL,DL
SETNZ CL
JNZ 0x00116c42
LAB_00116c5b:
TEST CL,0x1
JNZ 0x00116c9b
MOV RAX,qword ptr [RBX]
MOV DL,byte ptr [RAX]
TEST DL,DL
SETNZ CL
JZ 0x00116c88
INC RAX
LAB_00116c6f:
CMP DL,0xa
JZ 0x00116c88
MOVZX EDX,DL
CMP EDX,0xd
JZ 0x00116c88
MOV DL,byte ptr [RAX]
INC RAX
TEST DL,DL
SETNZ CL
JNZ 0x00116c6f
LAB_00116c88:
TEST CL,0x1
JNZ 0x00116c9b
LAB_00116c8d:
MOV RSI,RSP
MOV RDI,R14
MOV RDX,RBX
CALL 0x00116fea
LAB_00116c9b:
MOV RDI,qword ptr [RSP]
CMP RDI,R13
JZ 0x00116ca9
CALL 0x00108520
LAB_00116ca9:
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* httplib::Response::set_content(char const*, unsigned long, std::__cxx11::string const&) */
void __thiscall
httplib::Response::set_content(Response *this,char *param_1,ulong param_2,string *param_3)
{
char cVar1;
char *pcVar2;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*this_00;
int1 auVar3 [16];
char *local_48 [2];
char local_38 [16];
std::__cxx11::string::_M_replace((ulong)(this + 0x78),0,*(char **)(this + 0x80),(ulong)param_1);
local_48[0] = local_38;
/* try { // try from 00116bd2 to 00116be7 has its CatchHandler @ 00116cce */
std::__cxx11::string::_M_construct<char_const*>(local_48,"Content-Type","");
this_00 = (_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)(this + 0x48);
/* try { // try from 00116bec to 00116bf6 has its CatchHandler @ 00116cbb */
auVar3 = std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::equal_range(this_00,(string *)local_48);
if (local_48[0] != local_38) {
operator_delete(local_48[0]);
}
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::_M_erase_aux(this_00,auVar3._0_8_,auVar3._8_8_);
local_48[0] = local_38;
/* try { // try from 00116c1f to 00116c31 has its CatchHandler @ 00116cb9 */
std::__cxx11::string::_M_construct<char_const*>(local_48,"Content-Type","");
cVar1 = *local_48[0];
pcVar2 = local_48[0];
while (((cVar1 != '\0' && (pcVar2 = pcVar2 + 1, cVar1 != '\n')) && (cVar1 != '\r'))) {
cVar1 = *pcVar2;
}
if (cVar1 == '\0') {
pcVar2 = *(char **)param_3;
cVar1 = *pcVar2;
while (((cVar1 != '\0' && (pcVar2 = pcVar2 + 1, cVar1 != '\n')) && (cVar1 != '\r'))) {
cVar1 = *pcVar2;
}
if (cVar1 == '\0') {
/* try { // try from 00116c8d to 00116c9a has its CatchHandler @ 00116cb7 */
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::_M_emplace_equal<std::__cxx11::string_const&,std::__cxx11::string_const&>
(this_00,(string *)local_48,param_3);
}
}
if (local_48[0] != local_38) {
operator_delete(local_48[0]);
}
return;
}
| |
47,155 | common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override)
{
auto vocab = llama_model_get_vocab(model);
std::string default_template_src = chat_template_override;
std::string template_tool_use_src = chat_template_override;
bool has_explicit_template = !chat_template_override.empty();
if (chat_template_override.empty()) {
auto str = llama_model_chat_template(model, /* name */ nullptr);
if (str) {
default_template_src = str;
has_explicit_template = true;
}
str = llama_model_chat_template(model, /* name */ "tool_use");
if (str) {
template_tool_use_src = str;
has_explicit_template = true;
}
}
if (default_template_src.empty() || default_template_src == "chatml") {
if (!template_tool_use_src.empty()) {
default_template_src = template_tool_use_src;
} else {
default_template_src = R"(
{%- for message in messages -%}
{{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{- "<|im_start|>assistant\n" -}}
{%- endif -%}
)";
}
}
const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) {
if (token == LLAMA_TOKEN_NULL) {
if (default_template_src.find(jinja_variable_name) != std::string::npos
|| template_tool_use_src.find(jinja_variable_name) != std::string::npos) {
LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name);
}
return std::string();
} else {
return common_token_to_piece(vocab, token, true);
}
};
auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token");
auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token");
return {
has_explicit_template,
std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos),
template_tool_use_src.empty()
? nullptr
: std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos)
};
} | O0 | cpp | common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x118, %rsp # imm = 0x118
movq %rdi, 0x38(%rsp)
movq %rdi, %rax
movq %rax, 0x40(%rsp)
movq %rdi, 0x110(%rsp)
movq %rsi, 0x108(%rsp)
movq %rdx, 0x100(%rsp)
movq 0x108(%rsp), %rdi
callq 0x52ec0
movq %rax, 0xf8(%rsp)
movq 0x100(%rsp), %rsi
leaq 0xd8(%rsp), %rdi
callq 0x521b0
movq 0x100(%rsp), %rsi
leaq 0xb8(%rsp), %rdi
callq 0x521b0
jmp 0xe271d
movq 0x100(%rsp), %rdi
callq 0x523f0
xorb $-0x1, %al
andb $0x1, %al
movb %al, 0xab(%rsp)
movq 0x100(%rsp), %rdi
callq 0x523f0
testb $0x1, %al
jne 0xe274b
jmp 0xe2822
movq 0x108(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x52b10
movq %rax, 0x30(%rsp)
jmp 0xe2763
movq 0x30(%rsp), %rax
movq %rax, 0xa0(%rsp)
cmpq $0x0, 0xa0(%rsp)
je 0xe27ce
movq 0xa0(%rsp), %rsi
leaq 0xd8(%rsp), %rdi
callq 0x525c0
jmp 0xe2792
movb $0x1, 0xab(%rsp)
jmp 0xe27ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0xe2a66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0xe2a59
movq 0x108(%rsp), %rdi
leaq 0xeaf1b(%rip), %rsi # 0x1cd6f8
callq 0x52b10
movq %rax, 0x28(%rsp)
jmp 0xe27e9
movq 0x28(%rsp), %rax
movq %rax, 0xa0(%rsp)
cmpq $0x0, 0xa0(%rsp)
je 0xe2820
movq 0xa0(%rsp), %rsi
leaq 0xb8(%rsp), %rdi
callq 0x525c0
jmp 0xe2818
movb $0x1, 0xab(%rsp)
jmp 0xe2822
leaq 0xd8(%rsp), %rdi
callq 0x523f0
testb $0x1, %al
jne 0xe2857
leaq 0xeaec7(%rip), %rsi # 0x1cd701
leaq 0xd8(%rsp), %rdi
callq 0x68270
movb %al, 0x27(%rsp)
jmp 0xe284d
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0xe2857
jmp 0xe289b
leaq 0xb8(%rsp), %rdi
callq 0x523f0
testb $0x1, %al
jne 0xe2881
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x53050
jmp 0xe287f
jmp 0xe2899
leaq 0xeae80(%rip), %rsi # 0x1cd708
leaq 0xd8(%rsp), %rdi
callq 0x525c0
jmp 0xe2897
jmp 0xe2899
jmp 0xe289b
leaq 0xd8(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0xb8(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0xf8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0xf8(%rsp), %rdi
callq 0x530d0
movl %eax, 0x20(%rsp)
jmp 0xe28de
movl 0x20(%rsp), %edx
leaq 0xeaf65(%rip), %rcx # 0x1cd84e
leaq 0xeaf62(%rip), %r8 # 0x1cd852
leaq 0x68(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xe2a80
jmp 0xe2904
movq 0xf8(%rsp), %rdi
callq 0x52c80
movl %eax, 0x1c(%rsp)
jmp 0xe2917
movl 0x1c(%rsp), %edx
leaq 0xeaf3a(%rip), %rcx # 0x1cd85c
leaq 0xeaf37(%rip), %r8 # 0x1cd860
leaq 0x48(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xe2a80
jmp 0xe293d
movq 0x38(%rsp), %rdi
movb 0xab(%rsp), %al
andb $0x1, %al
movb %al, (%rdi)
addq $0x8, %rdi
movq %rdi, 0x10(%rsp)
leaq 0xd8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
leaq 0x48(%rsp), %rcx
callq 0xf10f0
jmp 0xe296f
movq 0x38(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x8(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x523f0
testb $0x1, %al
jne 0xe2990
jmp 0xe29a0
movq 0x8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf1180
jmp 0xe29c0
movq 0x8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
leaq 0x48(%rsp), %rcx
callq 0xf10f0
jmp 0xe29be
jmp 0xe29c0
leaq 0x48(%rsp), %rdi
callq 0x53140
leaq 0x68(%rsp), %rdi
callq 0x53140
leaq 0xb8(%rsp), %rdi
callq 0x53140
leaq 0xd8(%rsp), %rdi
callq 0x53140
movq 0x40(%rsp), %rax
addq $0x118, %rsp # imm = 0x118
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0xe2a4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0xe2a45
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
callq 0xf11c0
leaq 0x48(%rsp), %rdi
callq 0x53140
leaq 0x68(%rsp), %rdi
callq 0x53140
leaq 0xb8(%rsp), %rdi
callq 0x53140
leaq 0xd8(%rsp), %rdi
callq 0x53140
movq 0xb0(%rsp), %rdi
callq 0x52990
| _Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 118h
mov [rsp+118h+var_E0], rdi
mov rax, rdi
mov [rsp+118h+var_D8], rax
mov [rsp+118h+var_8], rdi
mov [rsp+118h+var_10], rsi
mov [rsp+118h+var_18], rdx
mov rdi, [rsp+118h+var_10]
call _llama_model_get_vocab
mov [rsp+118h+var_20], rax
mov rsi, [rsp+118h+var_18]
lea rdi, [rsp+118h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
mov rsi, [rsp+118h+var_18]
lea rdi, [rsp+118h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_E271D:
mov rdi, [rsp+118h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
xor al, 0FFh
and al, 1
mov [rsp+118h+var_6D], al
mov rdi, [rsp+118h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_E274B
jmp loc_E2822
loc_E274B:
mov rdi, [rsp+118h+var_10]
xor eax, eax
mov esi, eax
call _llama_model_chat_template
mov [rsp+118h+var_E8], rax
jmp short $+2
loc_E2763:
mov rax, [rsp+118h+var_E8]
mov [rsp+118h+var_78], rax
cmp [rsp+118h+var_78], 0
jz short loc_E27CE
mov rsi, [rsp+118h+var_78]
lea rdi, [rsp+118h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_E2792:
mov [rsp+118h+var_6D], 1
jmp short loc_E27CE
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp loc_E2A66
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp loc_E2A59
loc_E27CE:
mov rdi, [rsp+118h+var_10]
lea rsi, aToolUse; "tool_use"
call _llama_model_chat_template
mov [rsp+118h+var_F0], rax
jmp short $+2
loc_E27E9:
mov rax, [rsp+118h+var_F0]
mov [rsp+118h+var_78], rax
cmp [rsp+118h+var_78], 0
jz short loc_E2820
mov rsi, [rsp+118h+var_78]
lea rdi, [rsp+118h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_E2818:
mov [rsp+118h+var_6D], 1
loc_E2820:
jmp short $+2
loc_E2822:
lea rdi, [rsp+118h+var_40]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_E2857
lea rsi, aChatml; "chatml"
lea rdi, [rsp+118h+var_40]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
mov [rsp+118h+var_F1], al
jmp short $+2
loc_E284D:
mov al, [rsp+118h+var_F1]
test al, 1
jnz short loc_E2857
jmp short loc_E289B
loc_E2857:
lea rdi, [rsp+118h+var_60]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_E2881
lea rdi, [rsp+118h+var_40]
lea rsi, [rsp+118h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_E287F:
jmp short loc_E2899
loc_E2881:
lea rsi, aForMessageInMe; "\n {%- for message in me"...
lea rdi, [rsp+118h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_E2897:
jmp short $+2
loc_E2899:
jmp short $+2
loc_E289B:
lea rax, [rsp+118h+var_40]
mov [rsp+118h+var_90], rax
lea rax, [rsp+118h+var_60]
mov [rsp+118h+var_88], rax
lea rax, [rsp+118h+var_20]
mov [rsp+118h+var_80], rax
mov rdi, [rsp+118h+var_20]
call _llama_vocab_bos
mov [rsp+118h+var_F8], eax
jmp short $+2
loc_E28DE:
mov edx, [rsp+118h+var_F8]
lea rcx, aBos; "BOS"
lea r8, aBosToken; "bos_token"
lea rdi, [rsp+118h+var_B0]
lea rsi, [rsp+118h+var_90]
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
jmp short $+2
loc_E2904:
mov rdi, [rsp+118h+var_20]
call _llama_vocab_eos
mov [rsp+118h+var_FC], eax
jmp short $+2
loc_E2917:
mov edx, [rsp+118h+var_FC]
lea rcx, aEos; "EOS"
lea r8, aEosToken; "eos_token"
lea rdi, [rsp+118h+var_D0]
lea rsi, [rsp+118h+var_90]
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
jmp short $+2
loc_E293D:
mov rdi, [rsp+118h+var_E0]
mov al, [rsp+118h+var_6D]
and al, 1
mov [rdi], al
add rdi, 8; int
mov qword ptr [rsp+118h+var_108], rdi; int
lea rsi, [rsp+118h+var_40]; int
lea rdx, [rsp+118h+var_B0]; int
lea rcx, [rsp+118h+var_D0]; int
call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &)
jmp short $+2
loc_E296F:
mov rax, [rsp+118h+var_E0]
add rax, 10h
mov [rsp+118h+var_110], rax; void *
lea rdi, [rsp+118h+var_60]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_E2990
jmp short loc_E29A0
loc_E2990:
mov rdi, [rsp+118h+var_110]
xor eax, eax
mov esi, eax
call _ZNSt10unique_ptrIN5minja13chat_templateESt14default_deleteIS1_EEC2IS3_vEEDn; std::unique_ptr<minja::chat_template>::unique_ptr<std::default_delete<minja::chat_template>,void>(decltype(nullptr))
jmp short loc_E29C0
loc_E29A0:
mov rdi, [rsp+118h+var_110]; int
lea rsi, [rsp+118h+var_60]; int
lea rdx, [rsp+118h+var_B0]; int
lea rcx, [rsp+118h+var_D0]; int
call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &)
jmp short $+2
loc_E29BE:
jmp short $+2
loc_E29C0:
lea rdi, [rsp+118h+var_D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+118h+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+118h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+118h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rsp+118h+var_D8]
add rsp, 118h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp short loc_E2A4F
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp short loc_E2A45
mov rdi, [rsp+arg_8]
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
call _ZNSt10unique_ptrIN5minja13chat_templateESt14default_deleteIS1_EED2Ev; std::unique_ptr<minja::chat_template>::~unique_ptr()
loc_E2A45:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_E2A4F:
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_E2A59:
lea rdi, [rsp+arg_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_E2A66:
lea rdi, [rsp+arg_D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+arg_A8]
call __Unwind_Resume
| bool * common_chat_templates_from_model(bool *a1, long long a2, long long a3)
{
int v3; // r8d
int v4; // r9d
int v5; // r8d
int v6; // r9d
int v8; // [rsp+0h] [rbp-118h]
int v9; // [rsp+0h] [rbp-118h]
void *v10; // [rsp+8h] [rbp-110h]
void *v11; // [rsp+8h] [rbp-110h]
int v12; // [rsp+10h] [rbp-108h]
long long v13; // [rsp+18h] [rbp-100h]
long long v14; // [rsp+18h] [rbp-100h]
unsigned int v15; // [rsp+20h] [rbp-F8h]
int v16[8]; // [rsp+48h] [rbp-D0h] BYREF
int v17[8]; // [rsp+68h] [rbp-B0h] BYREF
_QWORD v18[3]; // [rsp+88h] [rbp-90h] BYREF
const char *v19; // [rsp+A0h] [rbp-78h]
bool v20; // [rsp+ABh] [rbp-6Dh]
int v21[8]; // [rsp+B8h] [rbp-60h] BYREF
int v22[8]; // [rsp+D8h] [rbp-40h] BYREF
long long vocab; // [rsp+F8h] [rbp-20h] BYREF
long long v24; // [rsp+100h] [rbp-18h]
long long v25; // [rsp+108h] [rbp-10h]
bool *v26; // [rsp+110h] [rbp-8h]
v26 = a1;
v25 = a2;
v24 = a3;
vocab = llama_model_get_vocab(a2);
std::string::basic_string(v22, v24);
std::string::basic_string(v21, v24);
v20 = (std::string::empty(v24) & 1) == 0;
if ( (std::string::empty(v24) & 1) != 0 )
{
v19 = (const char *)llama_model_chat_template(v25, 0LL);
if ( v19 )
{
std::string::operator=(v22, v19);
v20 = 1;
}
v19 = (const char *)llama_model_chat_template(v25, "tool_use");
if ( v19 )
{
std::string::operator=(v21, v19);
v20 = 1;
}
}
if ( (std::string::empty(v22) & 1) != 0 || std::operator==<char>((long long)v22, (long long)"chatml") )
{
if ( (std::string::empty(v21) & 1) != 0 )
std::string::operator=(
v22,
"\n"
" {%- for message in messages -%}\n"
" {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n"
" {%- endfor -%}\n"
" {%- if add_generation_prompt -%}\n"
" {{- \"<|im_start|>assistant\\n\" -}}\n"
" {%- endif -%}\n"
" ");
else
std::string::operator=(v22, v21);
}
v18[0] = v22;
v18[1] = v21;
v18[2] = &vocab;
v15 = llama_vocab_bos(vocab);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](
v17,
v18,
v15,
"BOS",
"bos_token");
HIDWORD(v13) = llama_vocab_eos(vocab);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](
v16,
v18,
HIDWORD(v13),
"EOS",
"eos_token");
*a1 = v20;
std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(
(_DWORD)a1 + 8,
(int)v22,
(int)v17,
(int)v16,
v3,
v4,
v8,
v10,
(_DWORD)a1 + 8,
v13);
v11 = a1 + 16;
if ( (std::string::empty(v21) & 1) != 0 )
std::unique_ptr<minja::chat_template>::unique_ptr<std::default_delete<minja::chat_template>,void>(v11, 0LL);
else
std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(
(int)v11,
(int)v21,
(int)v17,
(int)v16,
v5,
v6,
v9,
v11,
v12,
v14);
std::string::~string(v16);
std::string::~string(v17);
std::string::~string(v21);
std::string::~string(v22);
return a1;
}
| common_chat_templates_from_model:
SUB RSP,0x118
MOV qword ptr [RSP + 0x38],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x110],RDI
MOV qword ptr [RSP + 0x108],RSI
MOV qword ptr [RSP + 0x100],RDX
MOV RDI,qword ptr [RSP + 0x108]
CALL 0x00152ec0
MOV qword ptr [RSP + 0xf8],RAX
MOV RSI,qword ptr [RSP + 0x100]
LEA RDI,[RSP + 0xd8]
CALL 0x001521b0
MOV RSI,qword ptr [RSP + 0x100]
LAB_001e270e:
LEA RDI,[RSP + 0xb8]
CALL 0x001521b0
JMP 0x001e271d
LAB_001e271d:
MOV RDI,qword ptr [RSP + 0x100]
CALL 0x001523f0
XOR AL,0xff
AND AL,0x1
MOV byte ptr [RSP + 0xab],AL
MOV RDI,qword ptr [RSP + 0x100]
CALL 0x001523f0
TEST AL,0x1
JNZ 0x001e274b
JMP 0x001e2822
LAB_001e274b:
MOV RDI,qword ptr [RSP + 0x108]
LAB_001e2753:
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00152b10
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001e2763
LAB_001e2763:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0xa0],RAX
CMP qword ptr [RSP + 0xa0],0x0
JZ 0x001e27ce
MOV RSI,qword ptr [RSP + 0xa0]
LEA RDI,[RSP + 0xd8]
CALL 0x001525c0
JMP 0x001e2792
LAB_001e2792:
MOV byte ptr [RSP + 0xab],0x1
JMP 0x001e27ce
LAB_001e27ce:
MOV RDI,qword ptr [RSP + 0x108]
LEA RSI,[0x2cd6f8]
CALL 0x00152b10
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001e27e9
LAB_001e27e9:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0xa0],RAX
CMP qword ptr [RSP + 0xa0],0x0
JZ 0x001e2820
MOV RSI,qword ptr [RSP + 0xa0]
LEA RDI,[RSP + 0xb8]
CALL 0x001525c0
JMP 0x001e2818
LAB_001e2818:
MOV byte ptr [RSP + 0xab],0x1
LAB_001e2820:
JMP 0x001e2822
LAB_001e2822:
LEA RDI,[RSP + 0xd8]
CALL 0x001523f0
TEST AL,0x1
JNZ 0x001e2857
LEA RSI,[0x2cd701]
LEA RDI,[RSP + 0xd8]
CALL 0x00168270
MOV byte ptr [RSP + 0x27],AL
JMP 0x001e284d
LAB_001e284d:
MOV AL,byte ptr [RSP + 0x27]
TEST AL,0x1
JNZ 0x001e2857
JMP 0x001e289b
LAB_001e2857:
LEA RDI,[RSP + 0xb8]
CALL 0x001523f0
TEST AL,0x1
JNZ 0x001e2881
LEA RDI,[RSP + 0xd8]
LEA RSI,[RSP + 0xb8]
CALL 0x00153050
JMP 0x001e287f
LAB_001e287f:
JMP 0x001e2899
LAB_001e2881:
LEA RSI,[0x2cd708]
LEA RDI,[RSP + 0xd8]
CALL 0x001525c0
JMP 0x001e2897
LAB_001e2897:
JMP 0x001e2899
LAB_001e2899:
JMP 0x001e289b
LAB_001e289b:
LEA RAX,[RSP + 0xd8]
MOV qword ptr [RSP + 0x88],RAX
LEA RAX,[RSP + 0xb8]
MOV qword ptr [RSP + 0x90],RAX
LEA RAX,[RSP + 0xf8]
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0xf8]
CALL 0x001530d0
MOV dword ptr [RSP + 0x20],EAX
JMP 0x001e28de
LAB_001e28de:
MOV EDX,dword ptr [RSP + 0x20]
LEA RCX,[0x2cd84e]
LEA R8,[0x2cd852]
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x88]
CALL 0x001e2a80
JMP 0x001e2904
LAB_001e2904:
MOV RDI,qword ptr [RSP + 0xf8]
LAB_001e290c:
CALL 0x00152c80
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x001e2917
LAB_001e2917:
MOV EDX,dword ptr [RSP + 0x1c]
LEA RCX,[0x2cd85c]
LEA R8,[0x2cd860]
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x88]
CALL 0x001e2a80
JMP 0x001e293d
LAB_001e293d:
MOV RDI,qword ptr [RSP + 0x38]
MOV AL,byte ptr [RSP + 0xab]
AND AL,0x1
MOV byte ptr [RDI],AL
ADD RDI,0x8
MOV qword ptr [RSP + 0x10],RDI
LAB_001e2956:
LEA RSI,[RSP + 0xd8]
LEA RDX,[RSP + 0x68]
LEA RCX,[RSP + 0x48]
CALL 0x001f10f0
JMP 0x001e296f
LAB_001e296f:
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,0x10
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0xb8]
CALL 0x001523f0
TEST AL,0x1
JNZ 0x001e2990
JMP 0x001e29a0
LAB_001e2990:
MOV RDI,qword ptr [RSP + 0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001f1180
JMP 0x001e29c0
LAB_001e29a0:
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0xb8]
LEA RDX,[RSP + 0x68]
LEA RCX,[RSP + 0x48]
CALL 0x001f10f0
LAB_001e29bc:
JMP 0x001e29be
LAB_001e29be:
JMP 0x001e29c0
LAB_001e29c0:
LEA RDI,[RSP + 0x48]
CALL 0x00153140
LEA RDI,[RSP + 0x68]
CALL 0x00153140
LEA RDI,[RSP + 0xb8]
CALL 0x00153140
LEA RDI,[RSP + 0xd8]
CALL 0x00153140
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x118
RET
|
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */
llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2)
{
byte bVar1;
bool bVar2;
uint uVar3;
ulong uVar4;
string *in_RDX;
string local_d0 [32];
string local_b0 [32];
string *local_90;
string *local_88;
int8 *local_80;
char *local_78;
byte local_6d;
string local_60 [32];
string local_40 [32];
int8 local_20;
string *local_18;
string *local_10;
llama_model *local_8;
local_18 = in_RDX;
local_10 = param_2;
local_8 = param_1;
local_20 = llama_model_get_vocab(param_2);
std::__cxx11::string::string(local_40,local_18);
/* try { // try from 001e270e to 001e271a has its CatchHandler @ 001e279c */
std::__cxx11::string::string(local_60,local_18);
bVar1 = std::__cxx11::string::empty();
local_6d = (bVar1 ^ 0xff) & 1;
uVar4 = std::__cxx11::string::empty();
if ((uVar4 & 1) != 0) {
/* try { // try from 001e2753 to 001e2901 has its CatchHandler @ 001e27b5 */
local_78 = (char *)llama_model_chat_template(local_10,0);
if (local_78 != (char *)0x0) {
std::__cxx11::string::operator=(local_40,local_78);
local_6d = 1;
}
local_78 = (char *)llama_model_chat_template(local_10,"tool_use");
if (local_78 != (char *)0x0) {
std::__cxx11::string::operator=(local_60,local_78);
local_6d = 1;
}
}
uVar4 = std::__cxx11::string::empty();
if (((uVar4 & 1) != 0) || (bVar2 = std::operator==(local_40,"chatml"), bVar2)) {
uVar4 = std::__cxx11::string::empty();
if ((uVar4 & 1) == 0) {
std::__cxx11::string::operator=(local_40,local_60);
}
else {
std::__cxx11::string::operator=
(local_40,
"\n {%- for message in messages -%}\n {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n {%- endfor -%}\n {%- if add_generation_prompt -%}\n {{- \"<|im_start|>assistant\\n\" -}}\n {%- endif -%}\n "
);
}
}
local_90 = local_40;
local_88 = local_60;
local_80 = &local_20;
uVar3 = llama_vocab_bos(local_20);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_b0,(char *)&local_90,(char *)(ulong)uVar3);
/* try { // try from 001e290c to 001e293a has its CatchHandler @ 001e29fb */
uVar3 = llama_vocab_eos(local_20);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_d0,(char *)&local_90,(char *)(ulong)uVar3);
*param_1 = (llama_model)(local_6d & 1);
/* try { // try from 001e2956 to 001e296c has its CatchHandler @ 001e2a11 */
std::
make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&>
((string *)(param_1 + 8),local_40,local_b0);
uVar4 = std::__cxx11::string::empty();
if ((uVar4 & 1) == 0) {
/* try { // try from 001e29a0 to 001e29bb has its CatchHandler @ 001e2a27 */
std::
make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&>
((string *)(param_1 + 0x10),local_60,local_b0);
}
else {
std::unique_ptr<minja::chat_template,std::default_delete<minja::chat_template>>::
unique_ptr<std::default_delete<minja::chat_template>,void>
((_func_decltype_nullptr *)(param_1 + 0x10));
}
std::__cxx11::string::~string(local_d0);
std::__cxx11::string::~string(local_b0);
std::__cxx11::string::~string(local_60);
std::__cxx11::string::~string(local_40);
return param_1;
}
| |
47,156 | common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override)
{
auto vocab = llama_model_get_vocab(model);
std::string default_template_src = chat_template_override;
std::string template_tool_use_src = chat_template_override;
bool has_explicit_template = !chat_template_override.empty();
if (chat_template_override.empty()) {
auto str = llama_model_chat_template(model, /* name */ nullptr);
if (str) {
default_template_src = str;
has_explicit_template = true;
}
str = llama_model_chat_template(model, /* name */ "tool_use");
if (str) {
template_tool_use_src = str;
has_explicit_template = true;
}
}
if (default_template_src.empty() || default_template_src == "chatml") {
if (!template_tool_use_src.empty()) {
default_template_src = template_tool_use_src;
} else {
default_template_src = R"(
{%- for message in messages -%}
{{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{- "<|im_start|>assistant\n" -}}
{%- endif -%}
)";
}
}
const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) {
if (token == LLAMA_TOKEN_NULL) {
if (default_template_src.find(jinja_variable_name) != std::string::npos
|| template_tool_use_src.find(jinja_variable_name) != std::string::npos) {
LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name);
}
return std::string();
} else {
return common_token_to_piece(vocab, token, true);
}
};
auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token");
auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token");
return {
has_explicit_template,
std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos),
template_tool_use_src.empty()
? nullptr
: std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos)
};
} | O1 | cpp | common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x19d80
movq %rax, 0x48(%rsp)
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x23264
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x23264
cmpq $0x0, 0x8(%r13)
setne %r15b
jne 0x57998
movq %r12, %rdi
xorl %esi, %esi
callq 0x19310
movq %rax, %r13
testq %rax, %rax
je 0x57958
leaq 0x28(%rsp), %rbp
movq 0x8(%rbp), %r14
movq %r13, %rdi
callq 0x19320
movb $0x1, %r15b
movq %rbp, %rdi
leaq 0x38(%rsp), %rbp
xorl %esi, %esi
movq %r14, %rdx
leaq 0x28(%rsp), %r14
movq %r13, %rcx
movq %rax, %r8
callq 0x19a80
leaq 0x6528d(%rip), %rsi # 0xbcbec
movq %r12, %rdi
callq 0x19310
movq %rax, %r12
testq %rax, %rax
je 0x57998
leaq 0x8(%rsp), %rax
movq 0x8(%rax), %r13
movq %r12, %rdi
callq 0x19320
movb $0x1, %r15b
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %rax, %r8
callq 0x19a80
cmpq $0x0, 0x30(%rsp)
je 0x579b5
leaq 0x6524e(%rip), %rsi # 0xbcbf5
leaq 0x28(%rsp), %rdi
callq 0x191b0
testl %eax, %eax
jne 0x579eb
cmpq $0x0, 0x10(%rsp)
je 0x579ce
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x193d0
jmp 0x579eb
leaq 0x28(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x6521e(%rip), %rcx # 0xbcbfc
movl $0x145, %r8d # imm = 0x145
xorl %esi, %esi
callq 0x19a80
movq %r14, 0x90(%rsp)
leaq 0x8(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq (%rax), %rdi
callq 0x195e0
leaq 0x65326(%rip), %rcx # 0xbcd42
leaq 0x65323(%rip), %r8 # 0xbcd46
leaq 0x70(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movl %eax, %edx
callq 0x57c24
movq 0x48(%rsp), %rdi
callq 0x190a0
leaq 0x65308(%rip), %rcx # 0xbcd50
leaq 0x65305(%rip), %r8 # 0xbcd54
leaq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movl %eax, %edx
callq 0x57c24
movb %r15b, (%rbx)
movl $0x80, %edi
callq 0x196c0
movq %rax, %r15
leaq 0x28(%rsp), %rsi
leaq 0x70(%rsp), %rdx
leaq 0x50(%rsp), %rcx
movq %rax, %rdi
callq 0x59990
movq %r15, 0x8(%rbx)
cmpq $0x0, 0x10(%rsp)
je 0x57abc
movl $0x80, %edi
callq 0x196c0
movq %rax, %r15
leaq 0x8(%rsp), %rsi
leaq 0x70(%rsp), %rdx
leaq 0x50(%rsp), %rcx
movq %rax, %rdi
callq 0x59990
jmp 0x57ac7
movq $0x0, 0x10(%rbx)
xorl %r15d, %r15d
movq %r15, 0x10(%rbx)
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x57ae6
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x196d0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x57b07
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x196d0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x57b23
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196d0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x57b3a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x196d0
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x57be5
movq %rax, %r14
movl $0x80, %esi
movq %r15, %rdi
callq 0x196d0
jmp 0x57b69
movq %rax, %r14
addq $0x8, %rbx
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x57b7d
movq %rbx, %rdi
callq 0x96dba
movq $0x0, (%rbx)
jmp 0x57b9b
movq %rax, %r14
movl $0x80, %esi
movq %r15, %rdi
callq 0x196d0
jmp 0x57b9b
movq %rax, %r14
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x57bc2
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x196d0
jmp 0x57bc2
movq %rax, %r14
jmp 0x57c04
jmp 0x57be5
movq %rax, %r14
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x57be8
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x196d0
jmp 0x57be8
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x57c04
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196d0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x57c1b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x196d0
movq %r14, %rdi
callq 0x19c00
nop
| _Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp; int
push r15; __int64
push r14; int
push r13; void *
push r12; int
push rbx; int
sub rsp, 0A8h
mov r13, rdx
mov r12, rsi
mov rbx, rdi
mov rdi, rsi
call _llama_model_get_vocab
mov qword ptr [rsp+0D8h+var_90], rax; int
lea rbp, [rsp+0D8h+var_A0]
mov [rbp-10h], rbp
mov rsi, [r13+0]
mov rdx, [r13+8]
add rdx, rsi
lea r14, [rsp+0D8h+var_B0]
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rax, [rsp+0D8h+var_C0]
mov [rax-10h], rax
mov rsi, [r13+0]
mov rdx, [r13+8]
add rdx, rsi
lea rdi, [rsp+0D8h+var_D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
cmp qword ptr [r13+8], 0
setnz r15b
jnz loc_57998
mov rdi, r12
xor esi, esi
call _llama_model_chat_template
mov r13, rax
test rax, rax
jz short loc_57958
lea rbp, [rsp+0D8h+var_B0]
mov r14, [rbp+8]
mov rdi, r13
call _strlen
mov r15b, 1
mov rdi, rbp
lea rbp, [rsp+0D8h+var_A0]
xor esi, esi
mov rdx, r14
lea r14, [rsp+0D8h+var_B0]
mov rcx, r13
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
loc_57958:
lea rsi, aToolUse; "tool_use"
mov rdi, r12
call _llama_model_chat_template
mov r12, rax
test rax, rax
jz short loc_57998
lea rax, [rsp+0D8h+var_D0]
mov r13, [rax+8]
mov rdi, r12
call _strlen
mov r15b, 1
lea rdi, [rsp+0D8h+var_D0]
xor esi, esi
mov rdx, r13
mov rcx, r12
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
loc_57998:
cmp [rsp+0D8h+var_A8], 0
jz short loc_579B5
lea rsi, aChatml; "chatml"
lea rdi, [rsp+0D8h+var_B0]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz short loc_579EB
loc_579B5:
cmp [rsp+0D8h+var_C8], 0
jz short loc_579CE
lea rdi, [rsp+0D8h+var_B0]
lea rsi, [rsp+0D8h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
jmp short loc_579EB
loc_579CE:
lea rdi, [rsp+0D8h+var_B0]
mov rdx, [rdi+8]
lea rcx, aForMessageInMe; "\n {%- for message in me"...
mov r8d, 145h
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
loc_579EB:
mov qword ptr [rsp+0D8h+var_48], r14; int
lea rax, [rsp+0D8h+var_D0]
mov qword ptr [rsp+0D8h+var_40], rax; int
lea rax, [rsp+0D8h+var_90]
mov qword ptr [rsp+0D8h+var_38], rax; int
mov rdi, [rax]
call _llama_vocab_bos
lea rcx, aBos; "BOS"
lea r8, aBosToken; "bos_token"
lea rdi, [rsp+0D8h+var_68]
lea rsi, [rsp+0D8h+var_48]
mov edx, eax
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
mov rdi, qword ptr [rsp+0D8h+var_90]
call _llama_vocab_eos
lea rcx, aEos; "EOS"
lea r8, aEosToken; "eos_token"
lea rdi, [rsp+0D8h+var_88]
lea rsi, [rsp+0D8h+var_48]
mov edx, eax
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
mov [rbx], r15b
mov edi, 80h; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
lea rsi, [rsp+0D8h+var_B0]; int
lea rdx, [rsp+0D8h+var_68]; int
lea rcx, [rsp+0D8h+var_88]; int
mov rdi, rax; int
call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&)
mov [rbx+8], r15
cmp [rsp+0D8h+var_C8], 0
jz short loc_57ABC
mov edi, 80h; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
lea rsi, [rsp+0D8h+var_D0]; int
lea rdx, [rsp+0D8h+var_68]; int
lea rcx, [rsp+0D8h+var_88]; int
mov rdi, rax; int
call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&)
jmp short loc_57AC7
loc_57ABC:
mov qword ptr [rbx+10h], 0
xor r15d, r15d
loc_57AC7:
mov [rbx+10h], r15
lea rax, [rsp+0D8h+var_78]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_57AE6
mov rsi, [rsp+0D8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_57AE6:
lea rax, [rsp+0D8h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_57B07
mov rsi, [rsp+0D8h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_57B07:
mov rdi, [rsp+0D8h+var_D0]; void *
lea rax, [rsp+0D8h+var_C0]
cmp rdi, rax
jz short loc_57B23
mov rsi, [rsp+0D8h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_57B23:
mov rdi, [rsp+0D8h+var_B0]; void *
cmp rdi, rbp
jz short loc_57B3A
mov rsi, [rsp+0D8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_57B3A:
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp loc_57BE5
mov r14, rax
mov esi, 80h; unsigned __int64
mov rdi, r15; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_57B69
mov r14, rax
loc_57B69:
add rbx, 8
mov rsi, [rbx]
test rsi, rsi
jz short loc_57B7D
mov rdi, rbx
call _ZNKSt14default_deleteIN5minja13chat_templateEEclEPS1_; std::default_delete<minja::chat_template>::operator()(minja::chat_template*)
loc_57B7D:
mov qword ptr [rbx], 0
jmp short loc_57B9B
mov r14, rax
mov esi, 80h; unsigned __int64
mov rdi, r15; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_57B9B
mov r14, rax
loc_57B9B:
lea rax, [rsp+arg_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_57BC2
mov rsi, [rsp+arg_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_57BC2
mov r14, rax
jmp short loc_57C04
jmp short loc_57BE5
mov r14, rax
loc_57BC2:
lea rax, [rsp+arg_78]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_57BE8
mov rsi, [rsp+arg_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_57BE8
loc_57BE5:
mov r14, rax
loc_57BE8:
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_57C04
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_57C04:
mov rdi, [rsp+arg_20]; void *
cmp rdi, rbp
jz short loc_57C1B
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_57C1B:
mov rdi, r14
call __Unwind_Resume
| long long common_chat_templates_from_model(long long a1, long long a2, _BYTE **a3)
{
bool v4; // r15
long long v5; // rax
long long v6; // r13
long long v7; // r14
long long v8; // rax
long long v9; // r12
long long v10; // r13
long long v11; // rax
unsigned int v12; // eax
unsigned int v13; // eax
long long v14; // r15
long long v15; // r15
void *v17; // [rsp+8h] [rbp-D0h] BYREF
long long v18; // [rsp+10h] [rbp-C8h]
_QWORD v19[2]; // [rsp+18h] [rbp-C0h] BYREF
void *v20; // [rsp+28h] [rbp-B0h] BYREF
long long v21; // [rsp+30h] [rbp-A8h]
_QWORD v22[2]; // [rsp+38h] [rbp-A0h] BYREF
int v23[2]; // [rsp+48h] [rbp-90h] BYREF
int v24[4]; // [rsp+50h] [rbp-88h] BYREF
long long v25; // [rsp+60h] [rbp-78h] BYREF
int v26[4]; // [rsp+70h] [rbp-68h] BYREF
long long v27; // [rsp+80h] [rbp-58h] BYREF
int v28[2]; // [rsp+90h] [rbp-48h] BYREF
int v29[2]; // [rsp+98h] [rbp-40h]
int v30[2]; // [rsp+A0h] [rbp-38h]
*(_QWORD *)v23 = llama_model_get_vocab(a2);
v20 = v22;
std::string::_M_construct<char *>(&v20, *a3, (long long)&a3[1][(_QWORD)*a3]);
v17 = v19;
std::string::_M_construct<char *>(&v17, *a3, (long long)&a3[1][(_QWORD)*a3]);
v4 = a3[1] != 0LL;
if ( !a3[1] )
{
v5 = llama_model_chat_template(a2, 0LL);
v6 = v5;
if ( v5 )
{
v7 = v21;
v8 = strlen(v5);
v4 = 1;
std::string::_M_replace(&v20, 0LL, v7, v6, v8);
}
v9 = llama_model_chat_template(a2, "tool_use");
if ( v9 )
{
v10 = v18;
v11 = strlen(v9);
v4 = 1;
std::string::_M_replace(&v17, 0LL, v10, v9, v11);
}
}
if ( !v21 || !(unsigned int)std::string::compare(&v20, "chatml") )
{
if ( v18 )
std::string::_M_assign(&v20, &v17);
else
std::string::_M_replace(
&v20,
0LL,
v21,
"\n"
" {%- for message in messages -%}\n"
" {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n"
" {%- endfor -%}\n"
" {%- if add_generation_prompt -%}\n"
" {{- \"<|im_start|>assistant\\n\" -}}\n"
" {%- endif -%}\n"
" ",
325LL);
}
*(_QWORD *)v28 = &v20;
*(_QWORD *)v29 = &v17;
*(_QWORD *)v30 = v23;
v12 = llama_vocab_bos(*(_QWORD *)v23);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](
v26,
v28,
v12,
"BOS",
"bos_token");
v13 = llama_vocab_eos(*(_QWORD *)v23);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](
v24,
v28,
v13,
"EOS",
"eos_token");
*(_BYTE *)a1 = v4;
v14 = operator new(0x80uLL);
minja::chat_template::chat_template(v14, &v20, v26, v24);
*(_QWORD *)(a1 + 8) = v14;
if ( v18 )
{
v15 = operator new(0x80uLL);
minja::chat_template::chat_template(v15, &v17, v26, v24);
}
else
{
*(_QWORD *)(a1 + 16) = 0LL;
v15 = 0LL;
}
*(_QWORD *)(a1 + 16) = v15;
if ( *(long long **)v24 != &v25 )
operator delete(*(void **)v24, v25 + 1);
if ( *(long long **)v26 != &v27 )
operator delete(*(void **)v26, v27 + 1);
if ( v17 != v19 )
operator delete(v17, v19[0] + 1LL);
if ( v20 != v22 )
operator delete(v20, v22[0] + 1LL);
return a1;
}
| common_chat_templates_from_model:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x00119d80
MOV qword ptr [RSP + 0x48],RAX
LEA RBP,[RSP + 0x38]
MOV qword ptr [RBP + -0x10],RBP
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
ADD RDX,RSI
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x00123264
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
ADD RDX,RSI
LAB_001578fc:
LEA RDI,[RSP + 0x8]
CALL 0x00123264
CMP qword ptr [R13 + 0x8],0x0
SETNZ R15B
JNZ 0x00157998
LAB_00157915:
MOV RDI,R12
XOR ESI,ESI
CALL 0x00119310
MOV R13,RAX
TEST RAX,RAX
JZ 0x00157958
LEA RBP,[RSP + 0x28]
MOV R14,qword ptr [RBP + 0x8]
MOV RDI,R13
CALL 0x00119320
MOV R15B,0x1
MOV RDI,RBP
LEA RBP,[RSP + 0x38]
XOR ESI,ESI
MOV RDX,R14
LEA R14,[RSP + 0x28]
MOV RCX,R13
MOV R8,RAX
CALL 0x00119a80
LAB_00157958:
LEA RSI,[0x1bcbec]
MOV RDI,R12
CALL 0x00119310
MOV R12,RAX
TEST RAX,RAX
JZ 0x00157998
LEA RAX,[RSP + 0x8]
MOV R13,qword ptr [RAX + 0x8]
MOV RDI,R12
CALL 0x00119320
MOV R15B,0x1
LEA RDI,[RSP + 0x8]
XOR ESI,ESI
MOV RDX,R13
MOV RCX,R12
MOV R8,RAX
CALL 0x00119a80
LAB_00157998:
CMP qword ptr [RSP + 0x30],0x0
JZ 0x001579b5
LEA RSI,[0x1bcbf5]
LEA RDI,[RSP + 0x28]
CALL 0x001191b0
TEST EAX,EAX
JNZ 0x001579eb
LAB_001579b5:
CMP qword ptr [RSP + 0x10],0x0
JZ 0x001579ce
LAB_001579bd:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
CALL 0x001193d0
JMP 0x001579eb
LAB_001579ce:
LEA RDI,[RSP + 0x28]
MOV RDX,qword ptr [RDI + 0x8]
LEA RCX,[0x1bcbfc]
MOV R8D,0x145
XOR ESI,ESI
CALL 0x00119a80
LAB_001579eb:
MOV qword ptr [RSP + 0x90],R14
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x98],RAX
LEA RAX,[RSP + 0x48]
MOV qword ptr [RSP + 0xa0],RAX
MOV RDI,qword ptr [RAX]
LAB_00157a10:
CALL 0x001195e0
LEA RCX,[0x1bcd42]
LEA R8,[0x1bcd46]
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x90]
MOV EDX,EAX
CALL 0x00157c24
MOV RDI,qword ptr [RSP + 0x48]
LAB_00157a3c:
CALL 0x001190a0
LEA RCX,[0x1bcd50]
LEA R8,[0x1bcd54]
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x90]
MOV EDX,EAX
CALL 0x00157c24
MOV byte ptr [RBX],R15B
LAB_00157a66:
MOV EDI,0x80
CALL 0x001196c0
LAB_00157a70:
MOV R15,RAX
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x70]
LEA RCX,[RSP + 0x50]
MOV RDI,RAX
CALL 0x00159990
MOV qword ptr [RBX + 0x8],R15
CMP qword ptr [RSP + 0x10],0x0
JZ 0x00157abc
LAB_00157a96:
MOV EDI,0x80
CALL 0x001196c0
LAB_00157aa0:
MOV R15,RAX
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x70]
LEA RCX,[RSP + 0x50]
MOV RDI,RAX
CALL 0x00159990
LAB_00157aba:
JMP 0x00157ac7
LAB_00157abc:
MOV qword ptr [RBX + 0x10],0x0
XOR R15D,R15D
LAB_00157ac7:
MOV qword ptr [RBX + 0x10],R15
LEA RAX,[RSP + 0x60]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00157ae6
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x001196d0
LAB_00157ae6:
LEA RAX,[RSP + 0x80]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00157b07
MOV RSI,qword ptr [RSP + 0x80]
INC RSI
CALL 0x001196d0
LAB_00157b07:
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x00157b23
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001196d0
LAB_00157b23:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,RBP
JZ 0x00157b3a
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001196d0
LAB_00157b3a:
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */
llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2)
{
char *pcVar1;
int iVar2;
uint uVar3;
char *pcVar4;
chat_template *pcVar5;
long *in_RDX;
llama_model lVar6;
long *local_d0;
char *local_c8;
long local_c0 [2];
long *local_b0;
char *local_a8;
long local_a0 [2];
int8 local_90;
long *local_88 [2];
long local_78 [2];
long *local_68 [2];
long local_58 [2];
int8 **local_48;
int8 **local_40;
int8 *local_38;
local_90 = llama_model_get_vocab(param_2);
local_b0 = local_a0;
std::__cxx11::string::_M_construct<char*>(&local_b0,*in_RDX,in_RDX[1] + *in_RDX);
local_d0 = local_c0;
/* try { // try from 001578fc to 00157905 has its CatchHandler @ 00157bb8 */
std::__cxx11::string::_M_construct<char*>(&local_d0,*in_RDX,in_RDX[1] + *in_RDX);
lVar6 = (llama_model)(in_RDX[1] != 0);
if (!(bool)lVar6) {
/* try { // try from 00157915 to 00157997 has its CatchHandler @ 00157bbd */
pcVar4 = (char *)llama_model_chat_template(param_2);
pcVar1 = local_a8;
if (pcVar4 != (char *)0x0) {
strlen(pcVar4);
std::__cxx11::string::_M_replace((ulong)&local_b0,0,pcVar1,(ulong)pcVar4);
}
lVar6 = (llama_model)(pcVar4 != (char *)0x0 || (bool)lVar6);
pcVar4 = (char *)llama_model_chat_template(param_2);
pcVar1 = local_c8;
if (pcVar4 != (char *)0x0) {
strlen(pcVar4);
lVar6 = (llama_model)0x1;
std::__cxx11::string::_M_replace((ulong)&local_d0,0,pcVar1,(ulong)pcVar4);
}
}
if (local_a8 != (char *)0x0) {
iVar2 = std::__cxx11::string::compare((char *)&local_b0);
if (iVar2 != 0) goto LAB_001579eb;
}
if (local_c8 == (char *)0x0) {
std::__cxx11::string::_M_replace((ulong)&local_b0,0,local_a8,0x1bcbfc);
}
else {
/* try { // try from 001579bd to 001579ea has its CatchHandler @ 00157b4f */
std::__cxx11::string::_M_assign((string *)&local_b0);
}
LAB_001579eb:
local_40 = &local_d0;
local_38 = &local_90;
local_48 = &local_b0;
/* try { // try from 00157a10 to 00157a36 has its CatchHandler @ 00157be5 */
uVar3 = llama_vocab_bos(local_90);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_68,(char *)&local_48,(char *)(ulong)uVar3);
/* try { // try from 00157a3c to 00157a62 has its CatchHandler @ 00157bbf */
uVar3 = llama_vocab_eos(local_90);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_88,(char *)&local_48,(char *)(ulong)uVar3);
*param_1 = lVar6;
/* try { // try from 00157a66 to 00157a6f has its CatchHandler @ 00157b98 */
pcVar5 = (chat_template *)operator_new(0x80);
/* try { // try from 00157a70 to 00157a89 has its CatchHandler @ 00157b86 */
minja::chat_template::chat_template
(pcVar5,(string *)&local_b0,(string *)local_68,(string *)local_88);
*(chat_template **)(param_1 + 8) = pcVar5;
if (local_c8 == (char *)0x0) {
*(int8 *)(param_1 + 0x10) = 0;
pcVar5 = (chat_template *)0x0;
}
else {
/* try { // try from 00157a96 to 00157a9f has its CatchHandler @ 00157b66 */
pcVar5 = (chat_template *)operator_new(0x80);
/* try { // try from 00157aa0 to 00157ab9 has its CatchHandler @ 00157b54 */
minja::chat_template::chat_template
(pcVar5,(string *)&local_d0,(string *)local_68,(string *)local_88);
}
*(chat_template **)(param_1 + 0x10) = pcVar5;
if (local_88[0] != local_78) {
operator_delete(local_88[0],local_78[0] + 1);
}
if (local_68[0] != local_58) {
operator_delete(local_68[0],local_58[0] + 1);
}
if (local_d0 != local_c0) {
operator_delete(local_d0,local_c0[0] + 1);
}
if (local_b0 != local_a0) {
operator_delete(local_b0,local_a0[0] + 1);
}
return param_1;
}
| |
47,157 | common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override)
{
auto vocab = llama_model_get_vocab(model);
std::string default_template_src = chat_template_override;
std::string template_tool_use_src = chat_template_override;
bool has_explicit_template = !chat_template_override.empty();
if (chat_template_override.empty()) {
auto str = llama_model_chat_template(model, /* name */ nullptr);
if (str) {
default_template_src = str;
has_explicit_template = true;
}
str = llama_model_chat_template(model, /* name */ "tool_use");
if (str) {
template_tool_use_src = str;
has_explicit_template = true;
}
}
if (default_template_src.empty() || default_template_src == "chatml") {
if (!template_tool_use_src.empty()) {
default_template_src = template_tool_use_src;
} else {
default_template_src = R"(
{%- for message in messages -%}
{{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{- "<|im_start|>assistant\n" -}}
{%- endif -%}
)";
}
}
const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) {
if (token == LLAMA_TOKEN_NULL) {
if (default_template_src.find(jinja_variable_name) != std::string::npos
|| template_tool_use_src.find(jinja_variable_name) != std::string::npos) {
LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name);
}
return std::string();
} else {
return common_token_to_piece(vocab, token, true);
}
};
auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token");
auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token");
return {
has_explicit_template,
std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos),
template_tool_use_src.empty()
? nullptr
: std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos)
};
} | O2 | cpp | common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x20dc0
movq %rax, %r14
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x20950
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x20950
movb $0x1, %r15b
cmpq $0x0, 0x8(%rbp)
jne 0x4e706
movq %r13, %rdi
xorl %esi, %esi
callq 0x20320
testq %rax, %rax
setne %r15b
je 0x4e6e2
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x20d40
leaq 0x4c4c3(%rip), %rsi # 0x9abac
movq %r13, %rdi
callq 0x20320
testq %rax, %rax
je 0x4e706
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x20d40
movb $0x1, %r15b
cmpq $0x0, 0x18(%rsp)
je 0x4e723
leaq 0x4c4a0(%rip), %rsi # 0x9abb5
leaq 0x10(%rsp), %rdi
callq 0x26bd3
testb %al, %al
je 0x4e74d
cmpq $0x0, 0x38(%rsp)
je 0x4e73c
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x203f0
jmp 0x4e74d
leaq 0x4c479(%rip), %rsi # 0x9abbc
leaq 0x10(%rsp), %rdi
callq 0x20d40
leaq 0x10(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r12, 0x58(%rsp)
leaq 0x8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq %r14, %rdi
callq 0x205f0
leaq 0x4c58d(%rip), %rcx # 0x9ad02
leaq 0x4c58a(%rip), %r8 # 0x9ad06
leaq 0x88(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x4e89a
movq 0x8(%rsp), %rdi
callq 0x20090
leaq 0x4c56f(%rip), %rcx # 0x9ad10
leaq 0x4c56c(%rip), %r8 # 0x9ad14
leaq 0x68(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x4e89a
movb %r15b, (%rbx)
leaq 0x8(%rbx), %r14
leaq 0x10(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r14, %rdi
callq 0x53794
leaq 0x10(%rbx), %rdi
cmpq $0x0, 0x38(%rsp)
je 0x4e7ff
leaq 0x30(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x68(%rsp), %rcx
callq 0x53794
jmp 0x4e803
andq $0x0, (%rdi)
leaq 0x68(%rsp), %rdi
callq 0x20de8
leaq 0x88(%rsp), %rdi
callq 0x20de8
leaq 0x30(%rsp), %rdi
callq 0x20de8
leaq 0x10(%rsp), %rdi
callq 0x20de8
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x537f0
jmp 0x4e855
jmp 0x4e87a
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x20de8
jmp 0x4e86b
movq %rax, %rbx
jmp 0x4e887
jmp 0x4e87a
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x20de8
jmp 0x4e87d
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20de8
leaq 0x10(%rsp), %rdi
callq 0x20de8
movq %rbx, %rdi
callq 0x20bf0
nop
| _Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov rbp, rdx
mov r13, rsi
mov rbx, rdi
mov rdi, rsi
call _llama_model_get_vocab
mov r14, rax
mov [rsp+0D8h+var_D0], rax
lea rdi, [rsp+0D8h+var_C8]
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
lea r12, [rsp+0D8h+var_A8]
mov rdi, r12
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov r15b, 1
cmp qword ptr [rbp+8], 0
jnz short loc_4E706
mov rdi, r13
xor esi, esi
call _llama_model_chat_template
test rax, rax
setnz r15b
jz short loc_4E6E2
lea rdi, [rsp+0D8h+var_C8]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
loc_4E6E2:
lea rsi, aToolUse; "tool_use"
mov rdi, r13
call _llama_model_chat_template
test rax, rax
jz short loc_4E706
lea rdi, [rsp+0D8h+var_A8]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
mov r15b, 1
loc_4E706:
cmp [rsp+0D8h+var_C0], 0
jz short loc_4E723
lea rsi, aChatml; "chatml"
lea rdi, [rsp+0D8h+var_C8]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_4E74D
loc_4E723:
cmp [rsp+0D8h+var_A0], 0
jz short loc_4E73C
lea rdi, [rsp+0D8h+var_C8]
lea rsi, [rsp+0D8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
jmp short loc_4E74D
loc_4E73C:
lea rsi, aForMessageInMe; "\n {%- for message in me"...
lea rdi, [rsp+0D8h+var_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
loc_4E74D:
lea rax, [rsp+0D8h+var_C8]
mov [rsp+0D8h+var_88], rax
mov [rsp+0D8h+var_80], r12
lea rax, [rsp+0D8h+var_D0]
mov [rsp+0D8h+var_78], rax
mov rdi, r14
call _llama_vocab_bos
lea rcx, aBos; "BOS"
lea r8, aBosToken; "bos_token"
lea rdi, [rsp+0D8h+var_50]; void *
lea rsi, [rsp+0D8h+var_88]
mov edx, eax
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
mov rdi, [rsp+0D8h+var_D0]
call _llama_vocab_eos
lea rcx, aEos; "EOS"
lea r8, aEosToken; "eos_token"
lea rdi, [rsp+0D8h+var_70]; void *
lea rsi, [rsp+0D8h+var_88]
mov edx, eax
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
mov [rbx], r15b
lea r14, [rbx+8]
lea rsi, [rsp+0D8h+var_C8]
lea rdx, [rsp+0D8h+var_50]
lea rcx, [rsp+0D8h+var_70]
mov rdi, r14
call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &)
lea rdi, [rbx+10h]
cmp [rsp+0D8h+var_A0], 0
jz short loc_4E7FF
lea rsi, [rsp+0D8h+var_A8]
lea rdx, [rsp+0D8h+var_50]
lea rcx, [rsp+0D8h+var_70]
call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &)
jmp short loc_4E803
loc_4E7FF:
and qword ptr [rdi], 0
loc_4E803:
lea rdi, [rsp+0D8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, r14
call _ZNSt10unique_ptrIN5minja13chat_templateESt14default_deleteIS1_EED2Ev; std::unique_ptr<minja::chat_template>::~unique_ptr()
jmp short loc_4E855
jmp short loc_4E87A
mov rbx, rax
loc_4E855:
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_4E86B
mov rbx, rax
jmp short loc_4E887
jmp short loc_4E87A
mov rbx, rax
loc_4E86B:
lea rdi, [rsp+arg_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_4E87D
loc_4E87A:
mov rbx, rax
loc_4E87D:
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_4E887:
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| bool * common_chat_templates_from_model(bool *a1, long long a2, long long a3)
{
long long vocab; // r14
bool v6; // r15
const char *v7; // rax
const char *v8; // rax
_QWORD *v9; // rdi
long long v11; // [rsp+8h] [rbp-D0h] BYREF
char v12[8]; // [rsp+10h] [rbp-C8h] BYREF
long long v13; // [rsp+18h] [rbp-C0h]
char v14[8]; // [rsp+30h] [rbp-A8h] BYREF
long long v15; // [rsp+38h] [rbp-A0h]
char *v16; // [rsp+50h] [rbp-88h]
char *v17; // [rsp+58h] [rbp-80h]
long long *v18; // [rsp+60h] [rbp-78h]
_BYTE v19[32]; // [rsp+68h] [rbp-70h] BYREF
_BYTE v20[80]; // [rsp+88h] [rbp-50h] BYREF
vocab = llama_model_get_vocab(a2);
v11 = vocab;
std::string::basic_string(v12);
std::string::basic_string(v14);
v6 = 1;
if ( !*(_QWORD *)(a3 + 8) )
{
v7 = (const char *)llama_model_chat_template(a2, 0LL);
v6 = v7 != 0LL;
if ( v7 )
std::string::assign(v12, v7);
v8 = (const char *)llama_model_chat_template(a2, "tool_use");
if ( v8 )
{
std::string::assign(v14, v8);
v6 = 1;
}
}
if ( !v13 || std::operator==<char>((long long)v12) )
{
if ( v15 )
std::string::_M_assign(v12, v14);
else
std::string::assign(
v12,
"\n"
" {%- for message in messages -%}\n"
" {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n"
" {%- endfor -%}\n"
" {%- if add_generation_prompt -%}\n"
" {{- \"<|im_start|>assistant\\n\" -}}\n"
" {%- endif -%}\n"
" ");
}
v16 = v12;
v17 = v14;
v18 = &v11;
llama_vocab_bos(vocab);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](v20);
llama_vocab_eos(v11);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](v19);
*a1 = v6;
std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(a1 + 8, v12, v20, v19);
v9 = a1 + 16;
if ( v15 )
std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(v9, v14, v20, v19);
else
*v9 = 0LL;
std::string::~string(v19);
std::string::~string(v20);
std::string::~string(v14);
std::string::~string(v12);
return a1;
}
| common_chat_templates_from_model:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV RBP,RDX
MOV R13,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x00120dc0
MOV R14,RAX
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x10]
MOV RSI,RBP
CALL 0x00120950
LAB_0014e6a8:
LEA R12,[RSP + 0x30]
MOV RDI,R12
MOV RSI,RBP
CALL 0x00120950
MOV R15B,0x1
CMP qword ptr [RBP + 0x8],0x0
JNZ 0x0014e706
LAB_0014e6c2:
MOV RDI,R13
XOR ESI,ESI
CALL 0x00120320
TEST RAX,RAX
SETNZ R15B
JZ 0x0014e6e2
LEA RDI,[RSP + 0x10]
MOV RSI,RAX
CALL 0x00120d40
LAB_0014e6e2:
LEA RSI,[0x19abac]
MOV RDI,R13
CALL 0x00120320
TEST RAX,RAX
JZ 0x0014e706
LEA RDI,[RSP + 0x30]
MOV RSI,RAX
CALL 0x00120d40
MOV R15B,0x1
LAB_0014e706:
CMP qword ptr [RSP + 0x18],0x0
JZ 0x0014e723
LEA RSI,[0x19abb5]
LEA RDI,[RSP + 0x10]
CALL 0x00126bd3
TEST AL,AL
JZ 0x0014e74d
LAB_0014e723:
CMP qword ptr [RSP + 0x38],0x0
JZ 0x0014e73c
LAB_0014e72b:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x30]
CALL 0x001203f0
JMP 0x0014e74d
LAB_0014e73c:
LEA RSI,[0x19abbc]
LEA RDI,[RSP + 0x10]
CALL 0x00120d40
LAB_0014e74d:
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],R12
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x60],RAX
LAB_0014e766:
MOV RDI,R14
CALL 0x001205f0
LEA RCX,[0x19ad02]
LEA R8,[0x19ad06]
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x50]
MOV EDX,EAX
CALL 0x0014e89a
MOV RDI,qword ptr [RSP + 0x8]
LAB_0014e795:
CALL 0x00120090
LEA RCX,[0x19ad10]
LEA R8,[0x19ad14]
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x50]
MOV EDX,EAX
CALL 0x0014e89a
MOV byte ptr [RBX],R15B
LEA R14,[RBX + 0x8]
LAB_0014e7c0:
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x88]
LEA RCX,[RSP + 0x68]
MOV RDI,R14
CALL 0x00153794
LEA RDI,[RBX + 0x10]
CMP qword ptr [RSP + 0x38],0x0
JZ 0x0014e7ff
LAB_0014e7e6:
LEA RSI,[RSP + 0x30]
LEA RDX,[RSP + 0x88]
LEA RCX,[RSP + 0x68]
CALL 0x00153794
LAB_0014e7fd:
JMP 0x0014e803
LAB_0014e7ff:
AND qword ptr [RDI],0x0
LAB_0014e803:
LEA RDI,[RSP + 0x68]
CALL 0x00120de8
LEA RDI,[RSP + 0x88]
CALL 0x00120de8
LEA RDI,[RSP + 0x30]
CALL 0x00120de8
LEA RDI,[RSP + 0x10]
CALL 0x00120de8
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */
llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2)
{
bool bVar1;
uint uVar2;
int8 uVar3;
long lVar4;
string *in_RDX;
llama_model lVar5;
int8 local_d0;
string local_c8 [8];
long local_c0;
string local_a8 [8];
long local_a0;
string *local_88;
string *local_80;
int8 *local_78;
string local_70 [32];
string local_50 [32];
uVar3 = llama_model_get_vocab(param_2);
local_d0 = uVar3;
std::__cxx11::string::string(local_c8,in_RDX);
/* try { // try from 0014e6a8 to 0014e6b7 has its CatchHandler @ 0014e861 */
std::__cxx11::string::string(local_a8,in_RDX);
lVar5 = (llama_model)0x1;
if (*(long *)(in_RDX + 8) == 0) {
/* try { // try from 0014e6c2 to 0014e702 has its CatchHandler @ 0014e866 */
lVar4 = llama_model_chat_template(param_2,0);
lVar5 = (llama_model)(lVar4 != 0);
if ((bool)lVar5) {
std::__cxx11::string::assign((char *)local_c8);
}
lVar4 = llama_model_chat_template(param_2,"tool_use");
if (lVar4 != 0) {
std::__cxx11::string::assign((char *)local_a8);
lVar5 = (llama_model)0x1;
}
}
if (local_c0 != 0) {
bVar1 = std::operator==(local_c8,"chatml");
if (!bVar1) goto LAB_0014e74d;
}
if (local_a0 == 0) {
std::__cxx11::string::assign((char *)local_c8);
}
else {
/* try { // try from 0014e72b to 0014e74c has its CatchHandler @ 0014e850 */
std::__cxx11::string::_M_assign(local_c8);
}
LAB_0014e74d:
local_88 = local_c8;
local_78 = &local_d0;
local_80 = local_a8;
/* try { // try from 0014e766 to 0014e78f has its CatchHandler @ 0014e87a */
uVar2 = llama_vocab_bos(uVar3);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_50,(char *)&local_88,(char *)(ulong)uVar2);
/* try { // try from 0014e795 to 0014e7b8 has its CatchHandler @ 0014e868 */
uVar2 = llama_vocab_eos(local_d0);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_70,(char *)&local_88,(char *)(ulong)uVar2);
*param_1 = lVar5;
/* try { // try from 0014e7c0 to 0014e7d9 has its CatchHandler @ 0014e852 */
std::
make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&>
((string *)(param_1 + 8),local_c8,local_50);
if (local_a0 == 0) {
*(int8 *)(param_1 + 0x10) = 0;
}
else {
/* try { // try from 0014e7e6 to 0014e7fc has its CatchHandler @ 0014e843 */
std::
make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&>
((string *)(param_1 + 0x10),local_a8,local_50);
}
std::__cxx11::string::~string(local_70);
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string(local_a8);
std::__cxx11::string::~string(local_c8);
return param_1;
}
| |
47,158 | stbi__convert_format(unsigned char*, int, int, unsigned int, unsigned int) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static unsigned char *stbi__convert_format(unsigned char *data, int img_n, int req_comp, unsigned int x, unsigned int y)
{
int i,j;
unsigned char *good;
if (req_comp == img_n) return data;
STBI_ASSERT(req_comp >= 1 && req_comp <= 4);
good = (unsigned char *) stbi__malloc_mad3(req_comp, x, y, 0);
if (good == NULL) {
STBI_FREE(data);
return stbi__errpuc("outofmem", "Out of memory");
}
for (j=0; j < (int) y; ++j) {
unsigned char *src = data + j * x * img_n ;
unsigned char *dest = good + j * x * req_comp;
#define STBI__COMBO(a,b) ((a)*8+(b))
#define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b)
// convert source image with img_n components to one with req_comp components;
// avoid switch per pixel, so use switch per scanline and massive macros
switch (STBI__COMBO(img_n, req_comp)) {
STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=255; } break;
STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break;
STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=255; } break;
STBI__CASE(2,1) { dest[0]=src[0]; } break;
STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break;
STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break;
STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=255; } break;
STBI__CASE(3,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break;
STBI__CASE(3,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = 255; } break;
STBI__CASE(4,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break;
STBI__CASE(4,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = src[3]; } break;
STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2]; } break;
default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion");
}
#undef STBI__CASE
}
STBI_FREE(data);
return good;
} | O2 | c | stbi__convert_format(unsigned char*, int, int, unsigned int, unsigned int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
movq %rsi, 0x20(%rsp)
cmpl %esi, %edx
jne 0x1506f
movq %r14, %rax
jmp 0x153db
movl %r8d, %ebp
movl %ecx, %r15d
movl %edx, %r13d
xorl %r12d, %r12d
movl %edx, %edi
movl %ecx, %esi
movl %r8d, %edx
xorl %ecx, %ecx
callq 0x1644a
testq %rax, %rax
je 0x153c1
movq %rax, %rsi
testl %ebp, %ebp
cmovlel %r12d, %ebp
movq %r15, %rcx
movq 0x20(%rsp), %rax
leal (%r13,%rax,8), %ebx
leal -0x1(%r15), %edx
movl %edx, 0x4(%rsp)
movl %ecx, %edx
imull %eax, %edx
movl %edx, 0x14(%rsp)
movq %r15, 0x30(%rsp)
movl %ecx, %eax
imull %r13d, %eax
movl %eax, 0x10(%rsp)
leaq 0x3(%rsi), %rax
movq %rax, 0x28(%rsp)
movq %rsi, 0x8(%rsp)
leaq 0x2(%rsi), %rax
movq %rax, 0x18(%rsp)
addl $-0xa, %ebx
xorl %r10d, %r10d
xorl %r11d, %r11d
cmpq %rbp, %r11
je 0x153b2
cmpl $0x19, %ebx
ja 0x153ea
movq %rbp, %rax
movl %r10d, %r9d
addq %r14, %r9
movl %r12d, %edx
movq 0x8(%rsp), %r15
leaq (%r15,%rdx), %rdi
movq 0x28(%rsp), %rcx
leaq (%rcx,%rdx), %rsi
movl %r11d, %ecx
imull 0x30(%rsp), %ecx
movl %ecx, %r8d
imull 0x20(%rsp), %r8d
addq %r14, %r8
imull %r13d, %ecx
addq %r15, %rcx
leaq 0x82046(%rip), %r15 # 0x97180
movslq (%r15,%rbx,4), %rbp
addq %r15, %rbp
jmpq *%rbp
xorl %ecx, %ecx
movl 0x4(%rsp), %edx
movq %rax, %rbp
testl %edx, %edx
js 0x153a0
movb (%r9,%rcx), %sil
movb %sil, (%rdi,%rcx,2)
movb $-0x1, 0x1(%rdi,%rcx,2)
decl %edx
incq %rcx
jmp 0x1514c
xorl %ecx, %ecx
movl 0x4(%rsp), %edx
movq %rax, %rbp
testl %edx, %edx
js 0x153a0
movzbl (%r9,%rcx,2), %eax
movzbl 0x1(%r9,%rcx,2), %esi
movzbl 0x2(%r9,%rcx,2), %r8d
imull $0x4d, %eax, %eax
imull $0x96, %esi, %esi
addl %eax, %esi
imull $0x1d, %r8d, %eax
addl %esi, %eax
movb %ah, (%rdi,%rcx)
movb 0x3(%r9,%rcx,2), %al
movb %al, 0x1(%rdi,%rcx)
decl %edx
addq $0x2, %rcx
jmp 0x15171
xorl %ecx, %ecx
movl 0x4(%rsp), %edx
movq %rax, %rbp
testl %edx, %edx
js 0x153a0
movb (%r9,%rcx), %dil
movb %dil, -0x1(%rsi,%rcx,2)
movb %dil, -0x2(%rsi,%rcx,2)
movb %dil, -0x3(%rsi,%rcx,2)
movb 0x1(%r9,%rcx), %dil
movb %dil, (%rsi,%rcx,2)
decl %edx
addq $0x2, %rcx
jmp 0x151b8
xorl %ecx, %ecx
movl 0x4(%rsp), %edx
movq %rax, %rbp
testl %edx, %edx
js 0x153a0
movb (%r9,%rcx), %dil
movb %dil, -0x1(%rsi,%rcx,4)
movb %dil, -0x2(%rsi,%rcx,4)
movb %dil, -0x3(%rsi,%rcx,4)
movb $-0x1, (%rsi,%rcx,4)
decl %edx
incq %rcx
jmp 0x151ed
addq 0x18(%rsp), %rdx
movl 0x4(%rsp), %ecx
movq %rax, %rbp
testl %ecx, %ecx
js 0x153a0
movb (%r8), %sil
movb %sil, (%rdx)
movb %sil, -0x1(%rdx)
movb %sil, -0x2(%rdx)
incq %r8
decl %ecx
addq $0x3, %rdx
jmp 0x1521f
movl 0x4(%rsp), %edx
movq %rax, %rbp
testl %edx, %edx
js 0x153a0
movb (%r8), %al
movb %al, (%rcx)
movb 0x1(%r8), %al
movb %al, 0x1(%rcx)
movb 0x2(%r8), %al
movb %al, 0x2(%rcx)
addq $0x4, %r8
addq $0x3, %rcx
decl %edx
jmp 0x15247
xorl %ecx, %ecx
movl 0x4(%rsp), %edx
movq %rax, %rbp
testl %edx, %edx
js 0x153a0
movb (%r9,%rcx,2), %sil
movb %sil, (%rdi,%rcx)
decl %edx
incq %rcx
jmp 0x15277
movl 0x4(%rsp), %edx
movq %rax, %rbp
testl %edx, %edx
js 0x153a0
movb (%r8), %sil
movb %sil, (%rcx)
movb 0x1(%r8), %sil
movb %sil, 0x1(%rcx)
movb 0x2(%r8), %sil
movb %sil, 0x2(%rcx)
movb $-0x1, 0x3(%rcx)
addq $0x3, %r8
addq $0x4, %rcx
decl %edx
jmp 0x15295
movl 0x4(%rsp), %edx
movq %rax, %rbp
testl %edx, %edx
js 0x153a0
movzbl (%r8), %esi
movzbl 0x1(%r8), %edi
movzbl 0x2(%r8), %r9d
imull $0x4d, %esi, %esi
imull $0x96, %edi, %edi
addl %esi, %edi
imull $0x1d, %r9d, %eax
addl %edi, %eax
movb %ah, (%rcx)
addq $0x3, %r8
incq %rcx
decl %edx
jmp 0x152ca
addq 0x18(%rsp), %rdx
movl 0x4(%rsp), %ecx
movq %rax, %rbp
testl %ecx, %ecx
js 0x153a0
movb (%r8), %sil
movb %sil, (%rdx)
movb %sil, -0x1(%rdx)
movb %sil, -0x2(%rdx)
addq $0x2, %r8
decl %ecx
addq $0x3, %rdx
jmp 0x1530a
xorl %ecx, %ecx
movl 0x4(%rsp), %edx
movq %rax, %rbp
testl %edx, %edx
js 0x153a0
movzbl (%r9,%rcx,4), %eax
movzbl 0x1(%r9,%rcx,4), %esi
movzbl 0x2(%r9,%rcx,4), %r8d
imull $0x4d, %eax, %eax
imull $0x96, %esi, %esi
addl %eax, %esi
imull $0x1d, %r8d, %eax
addl %esi, %eax
movb %ah, (%rdi,%rcx)
decl %edx
incq %rcx
jmp 0x15335
movl 0x4(%rsp), %edx
movq %rax, %rbp
testl %edx, %edx
js 0x153a0
movzbl (%r8), %eax
movzbl 0x1(%r8), %esi
movzbl 0x2(%r8), %edi
imull $0x4d, %eax, %eax
imull $0x96, %esi, %esi
addl %eax, %esi
imull $0x1d, %edi, %eax
addl %esi, %eax
movb %ah, (%rcx)
movb $-0x1, 0x1(%rcx)
addq $0x3, %r8
addq $0x2, %rcx
decl %edx
jmp 0x1536c
incq %r11
addl 0x14(%rsp), %r10d
addl 0x10(%rsp), %r12d
jmp 0x150e8
movq %r14, %rdi
callq 0xa710
movq 0x8(%rsp), %rax
jmp 0x153db
movq %r14, %rdi
callq 0xa710
leaq 0x83357(%rip), %rax # 0x98727
movq %rax, %fs:-0x20
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0xa710
movq 0x8(%rsp), %rdi
callq 0xa710
leaq 0x8336e(%rip), %rax # 0x98771
jmp 0x153d0
| _ZL20stbi__convert_formatPhiijj:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rdi
mov [rsp+68h+var_48], rsi
cmp edx, esi
jnz short loc_1506F
mov rax, r14
jmp loc_153DB
loc_1506F:
mov ebp, r8d
mov r15d, ecx
mov r13d, edx
xor r12d, r12d
mov edi, edx; int
mov esi, ecx; int
mov edx, r8d; int
xor ecx, ecx; int
call _ZL17stbi__malloc_mad3iiii; stbi__malloc_mad3(int,int,int,int)
test rax, rax
jz loc_153C1
mov rsi, rax
test ebp, ebp
cmovle ebp, r12d
mov rcx, r15
mov rax, [rsp+68h+var_48]
lea ebx, [r13+rax*8+0]
lea edx, [r15-1]
mov [rsp+68h+var_64], edx
mov edx, ecx
imul edx, eax
mov [rsp+68h+var_54], edx
mov [rsp+68h+var_38], r15
mov eax, ecx
imul eax, r13d
mov [rsp+68h+var_58], eax
lea rax, [rsi+3]
mov [rsp+68h+var_40], rax
mov [rsp+68h+var_60], rsi
lea rax, [rsi+2]
mov [rsp+68h+var_50], rax
add ebx, 0FFFFFFF6h
xor r10d, r10d
xor r11d, r11d
loc_150E8:
cmp r11, rbp
jz loc_153B2
cmp ebx, 19h; switch 26 cases
ja def_15141; jumptable 0000000000015141 default case, cases 3-6,8,11-14,17,19-22
mov rax, rbp
mov r9d, r10d
add r9, r14
mov edx, r12d
mov r15, [rsp+68h+var_60]
lea rdi, [r15+rdx]
mov rcx, [rsp+68h+var_40]
lea rsi, [rcx+rdx]
mov ecx, r11d
imul ecx, dword ptr [rsp+68h+var_38]
mov r8d, ecx
imul r8d, dword ptr [rsp+68h+var_48]
add r8, r14
imul ecx, r13d
add rcx, r15
lea r15, jpt_15141
movsxd rbp, ds:(jpt_15141 - 97180h)[r15+rbx*4]
add rbp, r15
jmp rbp; switch jump
loc_15143:
xor ecx, ecx; jumptable 0000000000015141 case 0
mov edx, [rsp+68h+var_64]
mov rbp, rax
loc_1514C:
test edx, edx
js loc_153A0
mov sil, [r9+rcx]
mov [rdi+rcx*2], sil
mov byte ptr [rdi+rcx*2+1], 0FFh
dec edx
inc rcx
jmp short loc_1514C
loc_15168:
xor ecx, ecx; jumptable 0000000000015141 case 24
mov edx, [rsp+68h+var_64]
mov rbp, rax
loc_15171:
test edx, edx
js loc_153A0
movzx eax, byte ptr [r9+rcx*2]
movzx esi, byte ptr [r9+rcx*2+1]
movzx r8d, byte ptr [r9+rcx*2+2]
imul eax, 4Dh ; 'M'
imul esi, 96h
add esi, eax
imul eax, r8d, 1Dh
add eax, esi
mov [rdi+rcx], ah
mov al, [r9+rcx*2+3]
mov [rdi+rcx+1], al
dec edx
add rcx, 2
jmp short loc_15171
loc_151AF:
xor ecx, ecx; jumptable 0000000000015141 case 10
mov edx, [rsp+68h+var_64]
mov rbp, rax
loc_151B8:
test edx, edx
js loc_153A0
mov dil, [r9+rcx]
mov [rsi+rcx*2-1], dil
mov [rsi+rcx*2-2], dil
mov [rsi+rcx*2-3], dil
mov dil, [r9+rcx+1]
mov [rsi+rcx*2], dil
dec edx
add rcx, 2
jmp short loc_151B8
loc_151E4:
xor ecx, ecx; jumptable 0000000000015141 case 2
mov edx, [rsp+68h+var_64]
mov rbp, rax
loc_151ED:
test edx, edx
js loc_153A0
mov dil, [r9+rcx]
mov [rsi+rcx*4-1], dil
mov [rsi+rcx*4-2], dil
mov [rsi+rcx*4-3], dil
mov byte ptr [rsi+rcx*4], 0FFh
dec edx
inc rcx
jmp short loc_151ED
loc_15213:
add rdx, [rsp+68h+var_50]; jumptable 0000000000015141 case 1
mov ecx, [rsp+68h+var_64]
mov rbp, rax
loc_1521F:
test ecx, ecx
js loc_153A0
mov sil, [r8]
mov [rdx], sil
mov [rdx-1], sil
mov [rdx-2], sil
inc r8
dec ecx
add rdx, 3
jmp short loc_1521F
loc_15240:
mov edx, [rsp+68h+var_64]; jumptable 0000000000015141 case 25
mov rbp, rax
loc_15247:
test edx, edx
js loc_153A0
mov al, [r8]
mov [rcx], al
mov al, [r8+1]
mov [rcx+1], al
mov al, [r8+2]
mov [rcx+2], al
add r8, 4
add rcx, 3
dec edx
jmp short loc_15247
loc_1526E:
xor ecx, ecx; jumptable 0000000000015141 case 7
mov edx, [rsp+68h+var_64]
mov rbp, rax
loc_15277:
test edx, edx
js loc_153A0
mov sil, [r9+rcx*2]
mov [rdi+rcx], sil
dec edx
inc rcx
jmp short loc_15277
loc_1528E:
mov edx, [rsp+68h+var_64]; jumptable 0000000000015141 case 18
mov rbp, rax
loc_15295:
test edx, edx
js loc_153A0
mov sil, [r8]
mov [rcx], sil
mov sil, [r8+1]
mov [rcx+1], sil
mov sil, [r8+2]
mov [rcx+2], sil
mov byte ptr [rcx+3], 0FFh
add r8, 3
add rcx, 4
dec edx
jmp short loc_15295
loc_152C3:
mov edx, [rsp+68h+var_64]; jumptable 0000000000015141 case 15
mov rbp, rax
loc_152CA:
test edx, edx
js loc_153A0
movzx esi, byte ptr [r8]
movzx edi, byte ptr [r8+1]
movzx r9d, byte ptr [r8+2]
imul esi, 4Dh ; 'M'
imul edi, 96h
add edi, esi
imul eax, r9d, 1Dh
add eax, edi
mov [rcx], ah
add r8, 3
inc rcx
dec edx
jmp short loc_152CA
loc_152FE:
add rdx, [rsp+68h+var_50]; jumptable 0000000000015141 case 9
mov ecx, [rsp+68h+var_64]
mov rbp, rax
loc_1530A:
test ecx, ecx
js loc_153A0
mov sil, [r8]
mov [rdx], sil
mov [rdx-1], sil
mov [rdx-2], sil
add r8, 2
dec ecx
add rdx, 3
jmp short loc_1530A
loc_1532C:
xor ecx, ecx; jumptable 0000000000015141 case 23
mov edx, [rsp+68h+var_64]
mov rbp, rax
loc_15335:
test edx, edx
js short loc_153A0
movzx eax, byte ptr [r9+rcx*4]
movzx esi, byte ptr [r9+rcx*4+1]
movzx r8d, byte ptr [r9+rcx*4+2]
imul eax, 4Dh ; 'M'
imul esi, 96h
add esi, eax
imul eax, r8d, 1Dh
add eax, esi
mov [rdi+rcx], ah
dec edx
inc rcx
jmp short loc_15335
loc_15365:
mov edx, [rsp+68h+var_64]; jumptable 0000000000015141 case 16
mov rbp, rax
loc_1536C:
test edx, edx
js short loc_153A0
movzx eax, byte ptr [r8]
movzx esi, byte ptr [r8+1]
movzx edi, byte ptr [r8+2]
imul eax, 4Dh ; 'M'
imul esi, 96h
add esi, eax
imul eax, edi, 1Dh
add eax, esi
mov [rcx], ah
mov byte ptr [rcx+1], 0FFh
add r8, 3
add rcx, 2
dec edx
jmp short loc_1536C
loc_153A0:
inc r11
add r10d, [rsp+68h+var_54]
add r12d, [rsp+68h+var_58]
jmp loc_150E8
loc_153B2:
mov rdi, r14
call _free
mov rax, [rsp+68h+var_60]
jmp short loc_153DB
loc_153C1:
mov rdi, r14
call _free
lea rax, aOutofmem; "outofmem"
loc_153D0:
mov fs:0FFFFFFFFFFFFFFE0h, rax
xor eax, eax
loc_153DB:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
def_15141:
mov rdi, r14; jumptable 0000000000015141 default case, cases 3-6,8,11-14,17,19-22
call _free
mov rdi, [rsp+68h+var_60]
call _free
lea rax, aUnsupported; "unsupported"
jmp short loc_153D0
| unsigned __int8 * stbi__convert_format(unsigned __int8 *a1, int a2, int a3, int a4, unsigned int a5)
{
long long v7; // rbp
unsigned int v10; // r12d
long long v11; // rax
int v12; // r10d
long long i; // r11
unsigned __int8 *v14; // r9
long long v15; // rdi
long long v16; // rsi
unsigned __int8 *v17; // r8
unsigned __int8 *v18; // rcx
long long v19; // rcx
int j; // edx
long long v21; // rcx
int i2; // edx
long long v23; // rcx
int jj; // edx
unsigned __int8 v25; // di
long long v26; // rcx
int m; // edx
unsigned __int8 v28; // di
unsigned __int8 *v29; // rdx
int k; // ecx
unsigned __int8 v31; // si
int i3; // edx
long long v33; // rcx
int n; // edx
int nn; // edx
int kk; // edx
unsigned __int8 *v37; // rdx
int ii; // ecx
unsigned __int8 v39; // si
long long v40; // rcx
int i1; // edx
int mm; // edx
const char *v43; // rax
long long v44; // [rsp+8h] [rbp-60h]
long long v45; // [rsp+18h] [rbp-50h]
if ( a3 == a2 )
return a1;
v7 = a5;
v10 = 0;
v11 = stbi__malloc_mad3(a3, a4, a5, 0);
if ( v11 )
{
if ( (int)v7 <= 0 )
v7 = 0LL;
v44 = v11;
v45 = v11 + 2;
v12 = 0;
for ( i = 0LL; i != v7; ++i )
{
v14 = &a1[v12];
v15 = v11 + v10;
v16 = v11 + 3 + v10;
v17 = &a1[(unsigned int)(a2 * a4 * i)];
v18 = (unsigned __int8 *)(v11 + (unsigned int)(a3 * a4 * i));
switch ( a3 + 8 * a2 )
{
case 10:
v19 = 0LL;
for ( j = a4 - 1; j >= 0; --j )
{
*(_BYTE *)(v15 + 2 * v19) = v14[v19];
*(_BYTE *)(v15 + 2 * v19++ + 1) = -1;
}
break;
case 11:
v29 = (unsigned __int8 *)(v45 + v10);
for ( k = a4 - 1; k >= 0; --k )
{
v31 = *v17;
*v29 = *v17;
*(v29 - 1) = v31;
*(v29 - 2) = v31;
++v17;
v29 += 3;
}
break;
case 12:
v26 = 0LL;
for ( m = a4 - 1; m >= 0; --m )
{
v28 = v14[v26];
*(_BYTE *)(v16 + 4 * v26 - 1) = v28;
*(_BYTE *)(v16 + 4 * v26 - 2) = v28;
*(_BYTE *)(v11 + v10 + 4 * v26) = v28;
*(_BYTE *)(v16 + 4 * v26++) = -1;
}
break;
case 17:
v33 = 0LL;
for ( n = a4 - 1; n >= 0; --n )
{
*(_BYTE *)(v15 + v33) = v14[2 * v33];
++v33;
}
break;
case 19:
v37 = (unsigned __int8 *)(v45 + v10);
for ( ii = a4 - 1; ii >= 0; --ii )
{
v39 = *v17;
*v37 = *v17;
*(v37 - 1) = v39;
*(v37 - 2) = v39;
v17 += 2;
v37 += 3;
}
break;
case 20:
v23 = 0LL;
for ( jj = a4 - 1; jj >= 0; --jj )
{
v25 = v14[v23];
*(_BYTE *)(v16 + 2 * v23 - 1) = v25;
*(_BYTE *)(v16 + 2 * v23 - 2) = v25;
*(_BYTE *)(v11 + v10 + 2 * v23) = v25;
*(_BYTE *)(v16 + 2 * v23) = v14[v23 + 1];
v23 += 2LL;
}
break;
case 25:
for ( kk = a4 - 1; kk >= 0; --kk )
{
*v18 = (unsigned __int16)(77 * *v17 + 150 * v17[1] + 29 * v17[2]) >> 8;
v17 += 3;
++v18;
}
break;
case 26:
for ( mm = a4 - 1; mm >= 0; --mm )
{
*v18 = (unsigned __int16)(77 * *v17 + 150 * v17[1] + 29 * v17[2]) >> 8;
v18[1] = -1;
v17 += 3;
v18 += 2;
}
break;
case 28:
for ( nn = a4 - 1; nn >= 0; --nn )
{
*v18 = *v17;
v18[1] = v17[1];
v18[2] = v17[2];
v18[3] = -1;
v17 += 3;
v18 += 4;
}
break;
case 33:
v40 = 0LL;
for ( i1 = a4 - 1; i1 >= 0; --i1 )
{
*(_BYTE *)(v15 + v40) = (unsigned __int16)(77 * v14[4 * v40] + 150 * v14[4 * v40 + 1] + 29 * v14[4 * v40 + 2]) >> 8;
++v40;
}
break;
case 34:
v21 = 0LL;
for ( i2 = a4 - 1; i2 >= 0; --i2 )
{
*(_BYTE *)(v15 + v21) = (unsigned __int16)(77 * v14[2 * v21] + 150 * v14[2 * v21 + 1] + 29 * v14[2 * v21 + 2]) >> 8;
*(_BYTE *)(v15 + v21 + 1) = v14[2 * v21 + 3];
v21 += 2LL;
}
break;
case 35:
for ( i3 = a4 - 1; i3 >= 0; --i3 )
{
*v18 = *v17;
v18[1] = v17[1];
v18[2] = v17[2];
v17 += 4;
v18 += 3;
}
break;
default:
free(a1);
free(v44);
v43 = "unsupported";
goto LABEL_48;
}
v12 += a2 * a4;
v10 += a3 * a4;
}
free(a1);
return (unsigned __int8 *)v44;
}
else
{
free(a1);
v43 = "outofmem";
LABEL_48:
__writefsqword(0xFFFFFFE0, (unsigned long long)v43);
return 0LL;
}
}
| stbi__convert_format:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RDI
MOV qword ptr [RSP + 0x20],RSI
CMP EDX,ESI
JNZ 0x0011506f
MOV RAX,R14
JMP 0x001153db
LAB_0011506f:
MOV EBP,R8D
MOV R15D,ECX
MOV R13D,EDX
XOR R12D,R12D
MOV EDI,EDX
MOV ESI,ECX
MOV EDX,R8D
XOR ECX,ECX
CALL 0x0011644a
TEST RAX,RAX
JZ 0x001153c1
MOV RSI,RAX
TEST EBP,EBP
CMOVLE EBP,R12D
MOV RCX,R15
MOV RAX,qword ptr [RSP + 0x20]
LEA EBX,[R13 + RAX*0x8]
LEA EDX,[R15 + -0x1]
MOV dword ptr [RSP + 0x4],EDX
MOV EDX,ECX
IMUL EDX,EAX
MOV dword ptr [RSP + 0x14],EDX
MOV qword ptr [RSP + 0x30],R15
MOV EAX,ECX
IMUL EAX,R13D
MOV dword ptr [RSP + 0x10],EAX
LEA RAX,[RSI + 0x3]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x8],RSI
LEA RAX,[RSI + 0x2]
MOV qword ptr [RSP + 0x18],RAX
ADD EBX,-0xa
XOR R10D,R10D
XOR R11D,R11D
LAB_001150e8:
CMP R11,RBP
JZ 0x001153b2
CMP EBX,0x19
JA 0x001153ea
MOV RAX,RBP
MOV R9D,R10D
ADD R9,R14
MOV EDX,R12D
MOV R15,qword ptr [RSP + 0x8]
LEA RDI,[R15 + RDX*0x1]
MOV RCX,qword ptr [RSP + 0x28]
LEA RSI,[RCX + RDX*0x1]
MOV ECX,R11D
IMUL ECX,dword ptr [RSP + 0x30]
MOV R8D,ECX
IMUL R8D,dword ptr [RSP + 0x20]
ADD R8,R14
IMUL ECX,R13D
ADD RCX,R15
LEA R15,[0x197180]
MOVSXD RBP,dword ptr [R15 + RBX*0x4]
ADD RBP,R15
switchD:
JMP RBP
caseD_a:
XOR ECX,ECX
MOV EDX,dword ptr [RSP + 0x4]
MOV RBP,RAX
LAB_0011514c:
TEST EDX,EDX
JS 0x001153a0
MOV SIL,byte ptr [R9 + RCX*0x1]
MOV byte ptr [RDI + RCX*0x2],SIL
MOV byte ptr [RDI + RCX*0x2 + 0x1],0xff
DEC EDX
INC RCX
JMP 0x0011514c
caseD_22:
XOR ECX,ECX
MOV EDX,dword ptr [RSP + 0x4]
MOV RBP,RAX
LAB_00115171:
TEST EDX,EDX
JS 0x001153a0
MOVZX EAX,byte ptr [R9 + RCX*0x2]
MOVZX ESI,byte ptr [R9 + RCX*0x2 + 0x1]
MOVZX R8D,byte ptr [R9 + RCX*0x2 + 0x2]
IMUL EAX,EAX,0x4d
IMUL ESI,ESI,0x96
ADD ESI,EAX
IMUL EAX,R8D,0x1d
ADD EAX,ESI
MOV byte ptr [RDI + RCX*0x1],AH
MOV AL,byte ptr [R9 + RCX*0x2 + 0x3]
MOV byte ptr [RDI + RCX*0x1 + 0x1],AL
DEC EDX
ADD RCX,0x2
JMP 0x00115171
caseD_14:
XOR ECX,ECX
MOV EDX,dword ptr [RSP + 0x4]
MOV RBP,RAX
LAB_001151b8:
TEST EDX,EDX
JS 0x001153a0
MOV DIL,byte ptr [R9 + RCX*0x1]
MOV byte ptr [RSI + RCX*0x2 + -0x1],DIL
MOV byte ptr [RSI + RCX*0x2 + -0x2],DIL
MOV byte ptr [RSI + RCX*0x2 + -0x3],DIL
MOV DIL,byte ptr [R9 + RCX*0x1 + 0x1]
MOV byte ptr [RSI + RCX*0x2],DIL
DEC EDX
ADD RCX,0x2
JMP 0x001151b8
caseD_c:
XOR ECX,ECX
MOV EDX,dword ptr [RSP + 0x4]
MOV RBP,RAX
LAB_001151ed:
TEST EDX,EDX
JS 0x001153a0
MOV DIL,byte ptr [R9 + RCX*0x1]
MOV byte ptr [RSI + RCX*0x4 + -0x1],DIL
MOV byte ptr [RSI + RCX*0x4 + -0x2],DIL
MOV byte ptr [RSI + RCX*0x4 + -0x3],DIL
MOV byte ptr [RSI + RCX*0x4],0xff
DEC EDX
INC RCX
JMP 0x001151ed
caseD_b:
ADD RDX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x4]
MOV RBP,RAX
LAB_0011521f:
TEST ECX,ECX
JS 0x001153a0
MOV SIL,byte ptr [R8]
MOV byte ptr [RDX],SIL
MOV byte ptr [RDX + -0x1],SIL
MOV byte ptr [RDX + -0x2],SIL
INC R8
DEC ECX
ADD RDX,0x3
JMP 0x0011521f
caseD_23:
MOV EDX,dword ptr [RSP + 0x4]
MOV RBP,RAX
LAB_00115247:
TEST EDX,EDX
JS 0x001153a0
MOV AL,byte ptr [R8]
MOV byte ptr [RCX],AL
MOV AL,byte ptr [R8 + 0x1]
MOV byte ptr [RCX + 0x1],AL
MOV AL,byte ptr [R8 + 0x2]
MOV byte ptr [RCX + 0x2],AL
ADD R8,0x4
ADD RCX,0x3
DEC EDX
JMP 0x00115247
caseD_11:
XOR ECX,ECX
MOV EDX,dword ptr [RSP + 0x4]
MOV RBP,RAX
LAB_00115277:
TEST EDX,EDX
JS 0x001153a0
MOV SIL,byte ptr [R9 + RCX*0x2]
MOV byte ptr [RDI + RCX*0x1],SIL
DEC EDX
INC RCX
JMP 0x00115277
caseD_1c:
MOV EDX,dword ptr [RSP + 0x4]
MOV RBP,RAX
LAB_00115295:
TEST EDX,EDX
JS 0x001153a0
MOV SIL,byte ptr [R8]
MOV byte ptr [RCX],SIL
MOV SIL,byte ptr [R8 + 0x1]
MOV byte ptr [RCX + 0x1],SIL
MOV SIL,byte ptr [R8 + 0x2]
MOV byte ptr [RCX + 0x2],SIL
MOV byte ptr [RCX + 0x3],0xff
ADD R8,0x3
ADD RCX,0x4
DEC EDX
JMP 0x00115295
caseD_19:
MOV EDX,dword ptr [RSP + 0x4]
MOV RBP,RAX
LAB_001152ca:
TEST EDX,EDX
JS 0x001153a0
MOVZX ESI,byte ptr [R8]
MOVZX EDI,byte ptr [R8 + 0x1]
MOVZX R9D,byte ptr [R8 + 0x2]
IMUL ESI,ESI,0x4d
IMUL EDI,EDI,0x96
ADD EDI,ESI
IMUL EAX,R9D,0x1d
ADD EAX,EDI
MOV byte ptr [RCX],AH
ADD R8,0x3
INC RCX
DEC EDX
JMP 0x001152ca
caseD_13:
ADD RDX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x4]
MOV RBP,RAX
LAB_0011530a:
TEST ECX,ECX
JS 0x001153a0
MOV SIL,byte ptr [R8]
MOV byte ptr [RDX],SIL
MOV byte ptr [RDX + -0x1],SIL
MOV byte ptr [RDX + -0x2],SIL
ADD R8,0x2
DEC ECX
ADD RDX,0x3
JMP 0x0011530a
caseD_21:
XOR ECX,ECX
MOV EDX,dword ptr [RSP + 0x4]
MOV RBP,RAX
LAB_00115335:
TEST EDX,EDX
JS 0x001153a0
MOVZX EAX,byte ptr [R9 + RCX*0x4]
MOVZX ESI,byte ptr [R9 + RCX*0x4 + 0x1]
MOVZX R8D,byte ptr [R9 + RCX*0x4 + 0x2]
IMUL EAX,EAX,0x4d
IMUL ESI,ESI,0x96
ADD ESI,EAX
IMUL EAX,R8D,0x1d
ADD EAX,ESI
MOV byte ptr [RDI + RCX*0x1],AH
DEC EDX
INC RCX
JMP 0x00115335
caseD_1a:
MOV EDX,dword ptr [RSP + 0x4]
MOV RBP,RAX
LAB_0011536c:
TEST EDX,EDX
JS 0x001153a0
MOVZX EAX,byte ptr [R8]
MOVZX ESI,byte ptr [R8 + 0x1]
MOVZX EDI,byte ptr [R8 + 0x2]
IMUL EAX,EAX,0x4d
IMUL ESI,ESI,0x96
ADD ESI,EAX
IMUL EAX,EDI,0x1d
ADD EAX,ESI
MOV byte ptr [RCX],AH
MOV byte ptr [RCX + 0x1],0xff
ADD R8,0x3
ADD RCX,0x2
DEC EDX
JMP 0x0011536c
LAB_001153a0:
INC R11
ADD R10D,dword ptr [RSP + 0x14]
ADD R12D,dword ptr [RSP + 0x10]
JMP 0x001150e8
LAB_001153b2:
MOV RDI,R14
CALL 0x0010a710
MOV RAX,qword ptr [RSP + 0x8]
JMP 0x001153db
LAB_001153c1:
MOV RDI,R14
CALL 0x0010a710
LEA RAX,[0x198727]
LAB_001153d0:
MOV qword ptr FS:[-0x20],RAX
XOR EAX,EAX
LAB_001153db:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
caseD_d:
MOV RDI,R14
CALL 0x0010a710
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010a710
LEA RAX,[0x198771]
JMP 0x001153d0
|
/* stbi__convert_format(unsigned char*, int, int, unsigned int, unsigned int) */
uchar * stbi__convert_format(uchar *param_1,int param_2,int param_3,uint param_4,uint param_5)
{
uchar uVar1;
byte bVar2;
uchar *__ptr;
char *pcVar3;
int iVar4;
byte *pbVar5;
long lVar6;
int iVar7;
ulong uVar8;
int iVar9;
ulong uVar10;
byte *pbVar11;
ulong uVar12;
ulong uVar13;
uint uVar14;
long in_FS_OFFSET;
if (param_3 != param_2) {
uVar10 = (ulong)param_5;
uVar14 = 0;
__ptr = (uchar *)stbi__malloc_mad3(param_3,param_4,param_5,0);
if (__ptr == (uchar *)0x0) {
free(param_1);
pcVar3 = "outofmem";
LAB_001153d0:
*(char **)(in_FS_OFFSET + -0x20) = pcVar3;
param_1 = (uchar *)0x0;
}
else {
if ((int)param_5 < 1) {
uVar10 = 0;
}
iVar9 = param_3 + param_2 * 8;
iVar7 = param_4 - 1;
uVar12 = 0;
for (uVar13 = 0; uVar13 != uVar10; uVar13 = uVar13 + 1) {
if (0x19 < iVar9 - 10U) {
switchD_00115141_caseD_d:
free(param_1);
free(__ptr);
pcVar3 = "unsupported";
goto LAB_001153d0;
}
uVar8 = (ulong)uVar14;
iVar4 = (int)uVar13 * param_4;
pbVar11 = param_1 + (uint)(iVar4 * param_2);
pbVar5 = __ptr + (uint)(iVar4 * param_3);
switch(iVar9) {
case 10:
lVar6 = 0;
for (iVar4 = iVar7; -1 < iVar4; iVar4 = iVar4 + -1) {
__ptr[lVar6 * 2 + uVar8] = param_1[lVar6 + uVar12];
__ptr[lVar6 * 2 + uVar8 + 1] = 0xff;
lVar6 = lVar6 + 1;
}
break;
case 0xb:
pbVar5 = __ptr + uVar8 + 2;
for (iVar4 = iVar7; -1 < iVar4; iVar4 = iVar4 + -1) {
bVar2 = *pbVar11;
*pbVar5 = bVar2;
pbVar5[-1] = bVar2;
pbVar5[-2] = bVar2;
pbVar11 = pbVar11 + 1;
pbVar5 = pbVar5 + 3;
}
break;
case 0xc:
lVar6 = 0;
for (iVar4 = iVar7; -1 < iVar4; iVar4 = iVar4 + -1) {
uVar1 = param_1[lVar6 + uVar12];
__ptr[lVar6 * 4 + uVar8 + 2] = uVar1;
__ptr[lVar6 * 4 + uVar8 + 1] = uVar1;
__ptr[lVar6 * 4 + uVar8] = uVar1;
__ptr[lVar6 * 4 + uVar8 + 3] = 0xff;
lVar6 = lVar6 + 1;
}
break;
default:
goto switchD_00115141_caseD_d;
case 0x11:
lVar6 = 0;
for (iVar4 = iVar7; -1 < iVar4; iVar4 = iVar4 + -1) {
__ptr[lVar6 + uVar8] = param_1[lVar6 * 2 + uVar12];
lVar6 = lVar6 + 1;
}
break;
case 0x13:
pbVar5 = __ptr + uVar8 + 2;
for (iVar4 = iVar7; -1 < iVar4; iVar4 = iVar4 + -1) {
bVar2 = *pbVar11;
*pbVar5 = bVar2;
pbVar5[-1] = bVar2;
pbVar5[-2] = bVar2;
pbVar11 = pbVar11 + 2;
pbVar5 = pbVar5 + 3;
}
break;
case 0x14:
lVar6 = 0;
for (iVar4 = iVar7; -1 < iVar4; iVar4 = iVar4 + -1) {
uVar1 = param_1[lVar6 + uVar12];
__ptr[lVar6 * 2 + uVar8 + 2] = uVar1;
__ptr[lVar6 * 2 + uVar8 + 1] = uVar1;
__ptr[lVar6 * 2 + uVar8] = uVar1;
__ptr[lVar6 * 2 + uVar8 + 3] = param_1[lVar6 + uVar12 + 1];
lVar6 = lVar6 + 2;
}
break;
case 0x19:
for (iVar4 = iVar7; -1 < iVar4; iVar4 = iVar4 + -1) {
*pbVar5 = (byte)((uint)pbVar11[2] * 0x1d +
(uint)pbVar11[1] * 0x96 + (uint)*pbVar11 * 0x4d >> 8);
pbVar11 = pbVar11 + 3;
pbVar5 = pbVar5 + 1;
}
break;
case 0x1a:
for (iVar4 = iVar7; -1 < iVar4; iVar4 = iVar4 + -1) {
*pbVar5 = (byte)((uint)pbVar11[2] * 0x1d +
(uint)pbVar11[1] * 0x96 + (uint)*pbVar11 * 0x4d >> 8);
pbVar5[1] = 0xff;
pbVar11 = pbVar11 + 3;
pbVar5 = pbVar5 + 2;
}
break;
case 0x1c:
for (iVar4 = iVar7; -1 < iVar4; iVar4 = iVar4 + -1) {
*pbVar5 = *pbVar11;
pbVar5[1] = pbVar11[1];
pbVar5[2] = pbVar11[2];
pbVar5[3] = 0xff;
pbVar11 = pbVar11 + 3;
pbVar5 = pbVar5 + 4;
}
break;
case 0x21:
lVar6 = 0;
for (iVar4 = iVar7; -1 < iVar4; iVar4 = iVar4 + -1) {
__ptr[lVar6 + uVar8] =
(uchar)((uint)param_1[lVar6 * 4 + uVar12 + 2] * 0x1d +
(uint)param_1[lVar6 * 4 + uVar12 + 1] * 0x96 +
(uint)param_1[lVar6 * 4 + uVar12] * 0x4d >> 8);
lVar6 = lVar6 + 1;
}
break;
case 0x22:
lVar6 = 0;
for (iVar4 = iVar7; -1 < iVar4; iVar4 = iVar4 + -1) {
__ptr[lVar6 + uVar8] =
(uchar)((uint)param_1[lVar6 * 2 + uVar12 + 2] * 0x1d +
(uint)param_1[lVar6 * 2 + uVar12 + 1] * 0x96 +
(uint)param_1[lVar6 * 2 + uVar12] * 0x4d >> 8);
__ptr[lVar6 + uVar8 + 1] = param_1[lVar6 * 2 + uVar12 + 3];
lVar6 = lVar6 + 2;
}
break;
case 0x23:
for (iVar4 = iVar7; -1 < iVar4; iVar4 = iVar4 + -1) {
*pbVar5 = *pbVar11;
pbVar5[1] = pbVar11[1];
pbVar5[2] = pbVar11[2];
pbVar11 = pbVar11 + 4;
pbVar5 = pbVar5 + 3;
}
}
uVar12 = (ulong)((int)uVar12 + param_4 * param_2);
uVar14 = uVar14 + param_4 * param_3;
}
free(param_1);
param_1 = __ptr;
}
}
return param_1;
}
| |
47,159 | my_casedn_utf32 | eloqsql/strings/ctype-ucs2.c | static size_t
my_casedn_utf32(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((res= my_utf32_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0)
{
my_tolower_utf32(uni_plane,&wc);
if (res != my_uni_utf32(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O3 | c | my_casedn_utf32:
movq %rdx, %rax
cmpq $0x4, %rdx
jl 0x5a859
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq (%rsi,%rax), %rdx
addq %rcx, %r8
movq 0x78(%rdi), %rdi
addq $0x4, %rcx
movzbl (%rsi), %r9d
shll $0x18, %r9d
movzbl 0x1(%rsi), %r10d
shll $0x10, %r10d
orl %r9d, %r10d
cmpl $0x10ffff, %r10d # imm = 0x10FFFF
ja 0x5a857
movzbl 0x2(%rsi), %ebx
shll $0x8, %ebx
movzbl 0x3(%rsi), %r9d
orq %r9, %rbx
orq %r10, %rbx
cmpq (%rdi), %rbx
ja 0x5a820
movq 0x8(%rdi), %r10
movl %ebx, %r11d
shrl $0x8, %r11d
movq (%r10,%r11,8), %r10
testq %r10, %r10
je 0x5a820
leaq (%r9,%r9,2), %r9
movl 0x4(%r10,%r9,4), %ebx
cmpq %r8, %rcx
ja 0x5a857
cmpl $0x10ffff, %ebx # imm = 0x10FFFF
ja 0x5a857
movb $0x0, -0x4(%rcx)
movl %ebx, %r9d
shrl $0x10, %r9d
movb %r9b, -0x3(%rcx)
movb %bh, -0x2(%rcx)
movb %bl, -0x1(%rcx)
leaq 0x8(%rsi), %r9
addq $0x4, %rcx
addq $0x4, %rsi
cmpq %rdx, %r9
jbe 0x5a7cf
popq %rbx
popq %rbp
retq
| my_casedn_utf32:
mov rax, rdx
cmp rdx, 4
jl locret_5A859
push rbp
mov rbp, rsp
push rbx
lea rdx, [rsi+rax]
add r8, rcx
mov rdi, [rdi+78h]
add rcx, 4
loc_5A7CF:
movzx r9d, byte ptr [rsi]
shl r9d, 18h
movzx r10d, byte ptr [rsi+1]
shl r10d, 10h
or r10d, r9d
cmp r10d, offset unk_10FFFF
ja short loc_5A857
movzx ebx, byte ptr [rsi+2]
shl ebx, 8
movzx r9d, byte ptr [rsi+3]
or rbx, r9
or rbx, r10
cmp rbx, [rdi]
ja short loc_5A820
mov r10, [rdi+8]
mov r11d, ebx
shr r11d, 8
mov r10, [r10+r11*8]
test r10, r10
jz short loc_5A820
lea r9, [r9+r9*2]
mov ebx, [r10+r9*4+4]
loc_5A820:
cmp rcx, r8
ja short loc_5A857
cmp ebx, offset unk_10FFFF
ja short loc_5A857
mov byte ptr [rcx-4], 0
mov r9d, ebx
shr r9d, 10h
mov [rcx-3], r9b
mov [rcx-2], bh
mov [rcx-1], bl
lea r9, [rsi+8]
add rcx, 4
add rsi, 4
cmp r9, rdx
jbe loc_5A7CF
loc_5A857:
pop rbx
pop rbp
locret_5A859:
retn
| long long my_casedn_utf32(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5)
{
long long result; // rax
unsigned __int8 *v6; // rdx
unsigned long long v7; // r8
unsigned long long *v8; // rdi
unsigned long long v9; // rcx
long long v10; // r10
long long v11; // r9
unsigned long long v12; // rbx
long long v13; // r10
unsigned __int8 *v14; // r9
result = a3;
if ( a3 >= 4 )
{
v6 = &a2[a3];
v7 = a4 + a5;
v8 = *(unsigned long long **)(a1 + 120);
v9 = a4 + 4;
do
{
v10 = (*a2 << 24) | (a2[1] << 16);
if ( (unsigned int)v10 > (unsigned int)&unk_10FFFF )
break;
v11 = a2[3];
v12 = v10 | v11 | (a2[2] << 8);
if ( v12 <= *v8 )
{
v13 = *(_QWORD *)(v8[1] + 8LL * ((unsigned int)v12 >> 8));
if ( v13 )
LODWORD(v12) = *(_DWORD *)(v13 + 12 * v11 + 4);
}
if ( v9 > v7 )
break;
if ( (unsigned int)v12 > (unsigned int)&unk_10FFFF )
break;
*(_BYTE *)(v9 - 4) = 0;
*(_BYTE *)(v9 - 3) = BYTE2(v12);
*(_BYTE *)(v9 - 2) = BYTE1(v12);
*(_BYTE *)(v9 - 1) = v12;
v14 = a2 + 8;
v9 += 4LL;
a2 += 4;
}
while ( v14 <= v6 );
}
return result;
}
| my_casedn_utf32:
MOV RAX,RDX
CMP RDX,0x4
JL 0x0015a859
PUSH RBP
MOV RBP,RSP
PUSH RBX
LEA RDX,[RSI + RAX*0x1]
ADD R8,RCX
MOV RDI,qword ptr [RDI + 0x78]
ADD RCX,0x4
LAB_0015a7cf:
MOVZX R9D,byte ptr [RSI]
SHL R9D,0x18
MOVZX R10D,byte ptr [RSI + 0x1]
SHL R10D,0x10
OR R10D,R9D
CMP R10D,0x10ffff
JA 0x0015a857
MOVZX EBX,byte ptr [RSI + 0x2]
SHL EBX,0x8
MOVZX R9D,byte ptr [RSI + 0x3]
OR RBX,R9
OR RBX,R10
CMP RBX,qword ptr [RDI]
JA 0x0015a820
MOV R10,qword ptr [RDI + 0x8]
MOV R11D,EBX
SHR R11D,0x8
MOV R10,qword ptr [R10 + R11*0x8]
TEST R10,R10
JZ 0x0015a820
LEA R9,[R9 + R9*0x2]
MOV EBX,dword ptr [R10 + R9*0x4 + 0x4]
LAB_0015a820:
CMP RCX,R8
JA 0x0015a857
CMP EBX,0x10ffff
JA 0x0015a857
MOV byte ptr [RCX + -0x4],0x0
MOV R9D,EBX
SHR R9D,0x10
MOV byte ptr [RCX + -0x3],R9B
MOV byte ptr [RCX + -0x2],BH
MOV byte ptr [RCX + -0x1],BL
LEA R9,[RSI + 0x8]
ADD RCX,0x4
ADD RSI,0x4
CMP R9,RDX
JBE 0x0015a7cf
LAB_0015a857:
POP RBX
POP RBP
LAB_0015a859:
RET
|
void my_casedn_utf32(long param_1,byte *param_2,long param_3,long param_4,long param_5)
{
byte *pbVar1;
byte *pbVar2;
ulong *puVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
uint uVar7;
if (3 < param_3) {
pbVar2 = param_2 + param_3;
puVar3 = *(ulong **)(param_1 + 0x78);
uVar5 = param_4 + 4;
while (uVar7 = (uint)param_2[1] << 0x10 | (uint)*param_2 << 0x18, uVar7 < 0x110000) {
uVar6 = (ulong)CONCAT11(param_2[2],param_2[3]) | (ulong)uVar7;
if ((uVar6 <= *puVar3) && (lVar4 = *(long *)(puVar3[1] + (uVar6 >> 8) * 8), lVar4 != 0)) {
uVar6 = (ulong)*(uint *)(lVar4 + 4 + (ulong)param_2[3] * 0xc);
}
if ((ulong)(param_5 + param_4) < uVar5) {
return;
}
if (0x10ffff < (uint)uVar6) {
return;
}
*(int1 *)(uVar5 - 4) = 0;
*(char *)(uVar5 - 3) = (char)(uVar6 >> 0x10);
*(char *)(uVar5 - 2) = (char)(uVar6 >> 8);
*(char *)(uVar5 - 1) = (char)uVar6;
pbVar1 = param_2 + 8;
uVar5 = uVar5 + 4;
param_2 = param_2 + 4;
if (pbVar2 < pbVar1) {
return;
}
}
}
return;
}
| |
47,160 | my_hash_free_elements | eloqsql/mysys/hash.c | static inline void my_hash_free_elements(HASH *hash)
{
uint records= hash->records;
if (records == 0)
return;
/*
Set records to 0 early to guard against anyone looking at the structure
during the free process
*/
hash->records= 0;
if (hash->free)
{
HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*);
HASH_LINK *end= data + records;
do
{
(*hash->free)((data++)->data);
} while (data < end);
}
} | O0 | c | my_hash_free_elements:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0xd81bf
jmp 0xd821d
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xd821d
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x10, %rdx
movq %rdx, -0x18(%rbp)
movq 0x8(%rcx), %rdi
callq *%rax
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0xd81f4
jmp 0xd821d
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_free_elements:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jnz short loc_D81BF
jmp short loc_D821D
loc_D81BF:
mov rax, [rbp+var_8]
mov qword ptr [rax+18h], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+60h], 0
jz short loc_D821D
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_C]
shl rcx, 4
add rax, rcx
mov [rbp+var_20], rax
loc_D81F4:
mov rax, [rbp+var_8]
mov rax, [rax+60h]
mov rcx, [rbp+var_18]
mov rdx, rcx
add rdx, 10h
mov [rbp+var_18], rdx
mov rdi, [rcx+8]
call rax
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jb short loc_D81F4
jmp short $+2
loc_D821D:
add rsp, 20h
pop rbp
retn
| unsigned long long my_hash_free_elements(unsigned long long a1)
{
unsigned long long result; // rax
unsigned long long v2; // rcx
unsigned long long v3; // [rsp+0h] [rbp-20h]
unsigned long long v4; // [rsp+8h] [rbp-18h]
unsigned int v5; // [rsp+14h] [rbp-Ch]
result = *(_QWORD *)(a1 + 24);
v5 = result;
if ( (_DWORD)result )
{
*(_QWORD *)(a1 + 24) = 0LL;
result = a1;
if ( *(_QWORD *)(a1 + 96) )
{
v4 = *(_QWORD *)(a1 + 40);
v3 = 16LL * v5 + v4;
do
{
v2 = v4;
v4 += 16LL;
(*(void ( **)(_QWORD))(a1 + 96))(*(_QWORD *)(v2 + 8));
result = v4;
}
while ( v4 < v3 );
}
}
return result;
}
| my_hash_free_elements:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x001d81bf
JMP 0x001d821d
LAB_001d81bf:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x001d821d
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001d81f4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x60]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,RCX
ADD RDX,0x10
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RCX + 0x8]
CALL RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x001d81f4
JMP 0x001d821d
LAB_001d821d:
ADD RSP,0x20
POP RBP
RET
|
void my_hash_free_elements(long param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong local_20;
uVar1 = *(ulong *)(param_1 + 0x18);
if (((int)uVar1 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) {
uVar2 = *(ulong *)(param_1 + 0x28);
local_20 = uVar2;
do {
uVar3 = local_20 + 0x10;
(**(code **)(param_1 + 0x60))(*(int8 *)(local_20 + 8));
local_20 = uVar3;
} while (uVar3 < uVar2 + (uVar1 & 0xffffffff) * 0x10);
}
return;
}
| |
47,161 | mi_get_prev_key | eloqsql/storage/myisam/mi_search.c | static my_bool _mi_get_prev_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uchar *keypos,
uint *return_key_length)
{
uint nod_flag;
DBUG_ENTER("_mi_get_prev_key");
nod_flag=mi_test_if_nod(page);
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)))
{
*return_key_length=keyinfo->keylength;
bmove((uchar*) key,(uchar*) keypos- *return_key_length-nod_flag,
*return_key_length);
DBUG_RETURN(0);
}
else
{
page+=2+nod_flag;
key[0]=0; /* safety */
while (page < keypos)
{
*return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key);
if (*return_key_length == 0)
{
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_RETURN(1);
}
}
}
DBUG_RETURN(0);
} | O0 | c | mi_get_prev_key:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xc6a23
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %eax
movl %eax, -0x40(%rbp)
jmp 0xc6a2a
xorl %eax, %eax
movl %eax, -0x40(%rbp)
jmp 0xc6a2a
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x28, %eax
cmpl $0x0, %eax
jne 0xc6a89
movq -0x18(%rbp), %rax
movzwl 0x12(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movl -0x3c(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, %edx
callq 0x29120
movb $0x0, -0x1(%rbp)
jmp 0xc6b0a
movl -0x3c(%rbp), %ecx
addl $0x2, %ecx
movq -0x20(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xc6b02
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %rdi
movl -0x3c(%rbp), %esi
movq -0x28(%rbp), %rcx
leaq -0x20(%rbp), %rdx
callq *%rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xc6b00
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0xb5e50
callq 0xfdd30
movl $0x7e, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0xc6b0a
jmp 0xc6aa3
jmp 0xc6b04
jmp 0xc6b06
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_get_prev_key:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
and eax, 80h
cmp eax, 0
jz short loc_C6A23
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+17Ch]
mov [rbp+var_40], eax
jmp short loc_C6A2A
loc_C6A23:
xor eax, eax
mov [rbp+var_40], eax
jmp short $+2
loc_C6A2A:
mov eax, [rbp+var_40]
mov [rbp+var_3C], eax
mov rax, [rbp+var_18]
movzx eax, word ptr [rax+0Ah]
and eax, 28h
cmp eax, 0
jnz short loc_C6A89
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+12h]
mov rax, [rbp+var_38]
mov [rax], ecx
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_30]
mov rax, [rbp+var_38]
mov eax, [rax]
mov ecx, eax
xor eax, eax
sub rax, rcx
add rsi, rax
mov eax, [rbp+var_3C]
mov ecx, eax
xor eax, eax
sub rax, rcx
add rsi, rax
mov rax, [rbp+var_38]
mov eax, [rax]
mov edx, eax
call _memmove
mov [rbp+var_1], 0
jmp loc_C6B0A
loc_C6A89:
mov ecx, [rbp+var_3C]
add ecx, 2
mov rax, [rbp+var_20]
mov ecx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
loc_C6AA3:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnb short loc_C6B02
mov rax, [rbp+var_18]
mov rax, [rax+48h]
mov rdi, [rbp+var_18]
mov esi, [rbp+var_3C]
mov rcx, [rbp+var_28]
lea rdx, [rbp+var_20]
call rax
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax], ecx
mov rax, [rbp+var_38]
cmp dword ptr [rax], 0
jnz short loc_C6B00
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_1], 1
jmp short loc_C6B0A
loc_C6B00:
jmp short loc_C6AA3
loc_C6B02:
jmp short $+2
loc_C6B04:
jmp short $+2
loc_C6B06:
mov [rbp+var_1], 0
loc_C6B0A:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char mi_get_prev_key(long long a1, long long a2, _BYTE *a3, _BYTE *a4, unsigned long long a5, _DWORD *a6)
{
const char *v6; // rsi
unsigned int v8; // [rsp+0h] [rbp-40h]
_BYTE *v12; // [rsp+20h] [rbp-20h] BYREF
long long v13; // [rsp+28h] [rbp-18h]
long long v14; // [rsp+30h] [rbp-10h]
v14 = a1;
v13 = a2;
v12 = a3;
if ( (*a3 & 0x80) != 0 )
v8 = *(_DWORD *)(*(_QWORD *)v14 + 380LL);
else
v8 = 0;
if ( (*(_WORD *)(v13 + 10) & 0x28) != 0 )
{
v12 += v8 + 2;
*a4 = 0;
while ( (unsigned long long)v12 < a5 )
{
*a6 = (*(long long ( **)(long long, _QWORD, _BYTE **, _BYTE *))(v13 + 72))(v13, v8, &v12, a4);
if ( !*a6 )
{
v6 = *(const char **)(*(_QWORD *)v14 + 616LL);
mi_report_error(126, (long long)v6);
*(_DWORD *)my_thread_var(126LL, v6) = 126;
return 1;
}
}
return 0;
}
else
{
*a6 = *(unsigned __int16 *)(v13 + 18);
memmove(a4, a5 - (unsigned int)*a6 - v8, (unsigned int)*a6);
return 0;
}
}
| _mi_get_prev_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001c6a23
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x17c]
MOV dword ptr [RBP + -0x40],EAX
JMP 0x001c6a2a
LAB_001c6a23:
XOR EAX,EAX
MOV dword ptr [RBP + -0x40],EAX
JMP 0x001c6a2a
LAB_001c6a2a:
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + 0xa]
AND EAX,0x28
CMP EAX,0x0
JNZ 0x001c6a89
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX + 0x12]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
ADD RSI,RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV EDX,EAX
CALL 0x00129120
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001c6b0a
LAB_001c6a89:
MOV ECX,dword ptr [RBP + -0x3c]
ADD ECX,0x2
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
LAB_001c6aa3:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001c6b02
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x48]
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x28]
LEA RDX,[RBP + -0x20]
CALL RAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX],0x0
JNZ 0x001c6b00
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x001b5e50
CALL 0x001fdd30
MOV dword ptr [RAX],0x7e
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001c6b0a
LAB_001c6b00:
JMP 0x001c6aa3
LAB_001c6b02:
JMP 0x001c6b04
LAB_001c6b04:
JMP 0x001c6b06
LAB_001c6b06:
MOV byte ptr [RBP + -0x1],0x0
LAB_001c6b0a:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
_mi_get_prev_key(long *param_1,long param_2,byte *param_3,int1 *param_4,byte *param_5,
uint *param_6)
{
uint uVar1;
int4 *puVar2;
uint local_48;
byte *local_28;
long local_20;
long *local_18;
int1 local_9;
if ((*param_3 & 0x80) == 0) {
local_48 = 0;
}
else {
local_48 = *(uint *)(*param_1 + 0x17c);
}
local_20 = param_2;
local_18 = param_1;
if ((*(ushort *)(param_2 + 10) & 0x28) == 0) {
*param_6 = (uint)*(ushort *)(param_2 + 0x12);
local_28 = param_3;
memmove(param_4,param_5 + (-(ulong)local_48 - (ulong)*param_6),(ulong)*param_6);
local_9 = 0;
}
else {
local_28 = param_3 + (local_48 + 2);
*param_4 = 0;
do {
if (param_5 <= local_28) {
return 0;
}
uVar1 = (**(code **)(local_20 + 0x48))(local_20,local_48,&local_28,param_4);
*param_6 = uVar1;
} while (*param_6 != 0);
mi_report_error(0x7e,*(int8 *)(*local_18 + 0x268));
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
local_9 = 1;
}
return local_9;
}
| |
47,162 | js_resolve_export | bluesky950520[P]quickjs/quickjs.c | static JSResolveResultEnum js_resolve_export(JSContext *ctx,
JSModuleDef **pmodule,
JSExportEntry **pme,
JSModuleDef *m,
JSAtom export_name)
{
JSResolveState ss, *s = &ss;
int i;
JSResolveResultEnum ret;
s->array = NULL;
s->size = 0;
s->count = 0;
ret = js_resolve_export1(ctx, pmodule, pme, m, export_name, s);
for(i = 0; i < s->count; i++)
JS_FreeAtom(ctx, s->array[i].name);
js_free(ctx, s->array);
return ret;
} | O1 | c | js_resolve_export:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq %r14, %r9
callq 0x43908
movl %eax, %ebp
cmpl $0x0, 0xc(%r14)
jle 0x437d0
movl $0x8, %r14d
xorl %r15d, %r15d
movq (%rsp), %rax
movl (%rax,%r14), %esi
movq %rbx, %rdi
callq 0x207d8
incq %r15
movslq 0xc(%rsp), %rax
addq $0x10, %r14
cmpq %rax, %r15
jl 0x437af
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0x1cb99
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| js_resolve_export:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
xorps xmm0, xmm0
mov r14, rsp
movaps xmmword ptr [r14], xmm0
mov r9, r14
call js_resolve_export1
mov ebp, eax
cmp dword ptr [r14+0Ch], 0
jle short loc_437D0
mov r14d, 8
xor r15d, r15d
loc_437AF:
mov rax, [rsp+38h+var_38]
mov esi, [rax+r14]
mov rdi, rbx
call JS_FreeAtom
inc r15
movsxd rax, [rsp+38h+var_2C]
add r14, 10h
cmp r15, rax
jl short loc_437AF
loc_437D0:
mov rsi, [rsp+38h+var_38]
mov rdi, rbx
call js_free
mov eax, ebp
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long js_resolve_export(long long a1, long long a2, long long a3, long long a4, long long a5)
{
unsigned int v5; // ebp
long long v6; // r14
long long v7; // r15
__int128 v9; // [rsp+0h] [rbp-38h] BYREF
v9 = 0LL;
v5 = js_resolve_export1(a1, a2, a3, a4, a5, &v9);
if ( SHIDWORD(v9) > 0 )
{
v6 = 8LL;
v7 = 0LL;
do
{
JS_FreeAtom(a1, *(_DWORD *)(v9 + v6));
++v7;
v6 += 16LL;
}
while ( v7 < SHIDWORD(v9) );
}
js_free(a1, v9);
return v5;
}
| |||
47,163 | js_resolve_export | bluesky950520[P]quickjs/quickjs.c | static JSResolveResultEnum js_resolve_export(JSContext *ctx,
JSModuleDef **pmodule,
JSExportEntry **pme,
JSModuleDef *m,
JSAtom export_name)
{
JSResolveState ss, *s = &ss;
int i;
JSResolveResultEnum ret;
s->array = NULL;
s->size = 0;
s->count = 0;
ret = js_resolve_export1(ctx, pmodule, pme, m, export_name, s);
for(i = 0; i < s->count; i++)
JS_FreeAtom(ctx, s->array[i].name);
js_free(ctx, s->array);
return ret;
} | O2 | c | js_resolve_export:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq %r14, %r9
callq 0x3b4a3
movl %eax, %ebp
movslq 0xc(%r14), %r15
movq (%r14), %r14
leaq 0x8(%r14), %r12
xorl %r13d, %r13d
cmpq %r15, %r13
jge 0x3b387
movl (%r12), %esi
movq %rbx, %rdi
callq 0x1a995
incq %r13
addq $0x10, %r12
jmp 0x3b36d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1726e
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_resolve_export:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
xorps xmm0, xmm0
mov r14, rsp
movaps xmmword ptr [r14], xmm0
mov r9, r14
call js_resolve_export1
mov ebp, eax
movsxd r15, dword ptr [r14+0Ch]
mov r14, [r14]
lea r12, [r14+8]
xor r13d, r13d
loc_3B36D:
cmp r13, r15
jge short loc_3B387
mov esi, [r12]
mov rdi, rbx
call JS_FreeAtom
inc r13
add r12, 10h
jmp short loc_3B36D
loc_3B387:
mov rdi, rbx
mov rsi, r14
call js_free
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_resolve_export(long long a1, long long a2, long long a3, long long a4, long long a5)
{
unsigned int v5; // ebp
long long v6; // r15
long long v7; // r14
int *v8; // r12
long long i; // r13
__int128 v11; // [rsp+0h] [rbp-48h] BYREF
v11 = 0LL;
v5 = js_resolve_export1(a1, a2, a3, a4, a5, &v11);
v6 = SHIDWORD(v11);
v7 = v11;
v8 = (int *)(v11 + 8);
for ( i = 0LL; i < v6; ++i )
{
JS_FreeAtom(a1, *v8);
v8 += 4;
}
js_free(a1, v7);
return v5;
}
| js_resolve_export:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
XORPS XMM0,XMM0
MOV R14,RSP
MOVAPS xmmword ptr [R14],XMM0
MOV R9,R14
CALL 0x0013b4a3
MOV EBP,EAX
MOVSXD R15,dword ptr [R14 + 0xc]
MOV R14,qword ptr [R14]
LEA R12,[R14 + 0x8]
XOR R13D,R13D
LAB_0013b36d:
CMP R13,R15
JGE 0x0013b387
MOV ESI,dword ptr [R12]
MOV RDI,RBX
CALL 0x0011a995
INC R13
ADD R12,0x10
JMP 0x0013b36d
LAB_0013b387:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011726e
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 js_resolve_export(int8 param_1)
{
int4 uVar1;
int4 *puVar2;
long lVar3;
uVar1 = js_resolve_export1();
puVar2 = (int4 *)0x8;
for (lVar3 = 0; lVar3 < 0; lVar3 = lVar3 + 1) {
JS_FreeAtom(param_1,*puVar2);
puVar2 = puVar2 + 4;
}
js_free(param_1,0);
return uVar1;
}
| |
47,164 | stbi__bmp_set_mask_defaults(stbi__bmp_data*, int) | SDL3Lite/dependencies/stb_image.h | static int stbi__bmp_set_mask_defaults(stbi__bmp_data *info, int compress)
{
// BI_BITFIELDS specifies masks explicitly, don't override
if (compress == 3)
return 1;
if (compress == 0) {
if (info->bpp == 16) {
info->mr = 31u << 10;
info->mg = 31u << 5;
info->mb = 31u << 0;
} else if (info->bpp == 32) {
info->mr = 0xffu << 16;
info->mg = 0xffu << 8;
info->mb = 0xffu << 0;
info->ma = 0xffu << 24;
info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0
} else {
// otherwise, use defaults, which is all-0
info->mr = info->mg = info->mb = info->ma = 0;
}
return 1;
}
return 0; // error
} | O0 | c | stbi__bmp_set_mask_defaults(stbi__bmp_data*, int):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jne 0x2b3fd
movl $0x1, -0x4(%rbp)
jmp 0x2b4b3
cmpl $0x0, -0x14(%rbp)
jne 0x2b4ac
movq -0x10(%rbp), %rax
cmpl $0x10, (%rax)
jne 0x2b433
movq -0x10(%rbp), %rax
movl $0x7c00, 0xc(%rax) # imm = 0x7C00
movq -0x10(%rbp), %rax
movl $0x3e0, 0x10(%rax) # imm = 0x3E0
movq -0x10(%rbp), %rax
movl $0x1f, 0x14(%rax)
jmp 0x2b4a3
movq -0x10(%rbp), %rax
cmpl $0x20, (%rax)
jne 0x2b475
movq -0x10(%rbp), %rax
movl $0xff0000, 0xc(%rax) # imm = 0xFF0000
movq -0x10(%rbp), %rax
movl $0xff00, 0x10(%rax) # imm = 0xFF00
movq -0x10(%rbp), %rax
movl $0xff, 0x14(%rax)
movq -0x10(%rbp), %rax
movl $0xff000000, 0x18(%rax) # imm = 0xFF000000
movq -0x10(%rbp), %rax
movl $0x0, 0x1c(%rax)
jmp 0x2b4a1
movq -0x10(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
jmp 0x2b4a3
movl $0x1, -0x4(%rbp)
jmp 0x2b4b3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| _ZL27stbi__bmp_set_mask_defaultsP14stbi__bmp_datai:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
cmp [rbp+var_14], 3
jnz short loc_2B3FD
mov [rbp+var_4], 1
jmp loc_2B4B3
loc_2B3FD:
cmp [rbp+var_14], 0
jnz loc_2B4AC
mov rax, [rbp+var_10]
cmp dword ptr [rax], 10h
jnz short loc_2B433
mov rax, [rbp+var_10]
mov dword ptr [rax+0Ch], 7C00h
mov rax, [rbp+var_10]
mov dword ptr [rax+10h], 3E0h
mov rax, [rbp+var_10]
mov dword ptr [rax+14h], 1Fh
jmp short loc_2B4A3
loc_2B433:
mov rax, [rbp+var_10]
cmp dword ptr [rax], 20h ; ' '
jnz short loc_2B475
mov rax, [rbp+var_10]
mov dword ptr [rax+0Ch], 0FF0000h
mov rax, [rbp+var_10]
mov dword ptr [rax+10h], 0FF00h
mov rax, [rbp+var_10]
mov dword ptr [rax+14h], 0FFh
mov rax, [rbp+var_10]
mov dword ptr [rax+18h], 0FF000000h
mov rax, [rbp+var_10]
mov dword ptr [rax+1Ch], 0
jmp short loc_2B4A1
loc_2B475:
mov rax, [rbp+var_10]
mov dword ptr [rax+18h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+14h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+10h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+0Ch], 0
loc_2B4A1:
jmp short $+2
loc_2B4A3:
mov [rbp+var_4], 1
jmp short loc_2B4B3
loc_2B4AC:
mov [rbp+var_4], 0
loc_2B4B3:
mov eax, [rbp+var_4]
pop rbp
retn
| long long stbi__bmp_set_mask_defaults(_DWORD *a1, int a2)
{
if ( a2 == 3 )
{
return 1;
}
else if ( a2 )
{
return 0;
}
else
{
if ( *a1 == 16 )
{
a1[3] = 31744;
a1[4] = 992;
a1[5] = 31;
}
else if ( *a1 == 32 )
{
a1[3] = 16711680;
a1[4] = 65280;
a1[5] = 255;
a1[6] = -16777216;
a1[7] = 0;
}
else
{
a1[6] = 0;
a1[5] = 0;
a1[4] = 0;
a1[3] = 0;
}
return 1;
}
}
| stbi__bmp_set_mask_defaults:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
CMP dword ptr [RBP + -0x14],0x3
JNZ 0x0012b3fd
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0012b4b3
LAB_0012b3fd:
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x0012b4ac
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX],0x10
JNZ 0x0012b433
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],0x7c00
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],0x3e0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],0x1f
JMP 0x0012b4a3
LAB_0012b433:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX],0x20
JNZ 0x0012b475
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],0xff0000
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],0xff00
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],0xff
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],0xff000000
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1c],0x0
JMP 0x0012b4a1
LAB_0012b475:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xc],0x0
LAB_0012b4a1:
JMP 0x0012b4a3
LAB_0012b4a3:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0012b4b3
LAB_0012b4ac:
MOV dword ptr [RBP + -0x4],0x0
LAB_0012b4b3:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
/* stbi__bmp_set_mask_defaults(stbi__bmp_data*, int) */
int4 stbi__bmp_set_mask_defaults(stbi__bmp_data *param_1,int param_2)
{
int4 local_c;
if (param_2 == 3) {
local_c = 1;
}
else if (param_2 == 0) {
if (*(int *)param_1 == 0x10) {
*(int4 *)(param_1 + 0xc) = 0x7c00;
*(int4 *)(param_1 + 0x10) = 0x3e0;
*(int4 *)(param_1 + 0x14) = 0x1f;
}
else if (*(int *)param_1 == 0x20) {
*(int4 *)(param_1 + 0xc) = 0xff0000;
*(int4 *)(param_1 + 0x10) = 0xff00;
*(int4 *)(param_1 + 0x14) = 0xff;
*(int4 *)(param_1 + 0x18) = 0xff000000;
*(int4 *)(param_1 + 0x1c) = 0;
}
else {
*(int4 *)(param_1 + 0x18) = 0;
*(int4 *)(param_1 + 0x14) = 0;
*(int4 *)(param_1 + 0x10) = 0;
*(int4 *)(param_1 + 0xc) = 0;
}
local_c = 1;
}
else {
local_c = 0;
}
return local_c;
}
| |
47,165 | stbi__bmp_set_mask_defaults(stbi__bmp_data*, int) | SDL3Lite/dependencies/stb_image.h | static int stbi__bmp_set_mask_defaults(stbi__bmp_data *info, int compress)
{
// BI_BITFIELDS specifies masks explicitly, don't override
if (compress == 3)
return 1;
if (compress == 0) {
if (info->bpp == 16) {
info->mr = 31u << 10;
info->mg = 31u << 5;
info->mb = 31u << 0;
} else if (info->bpp == 32) {
info->mr = 0xffu << 16;
info->mg = 0xffu << 8;
info->mb = 0xffu << 0;
info->ma = 0xffu << 24;
info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0
} else {
// otherwise, use defaults, which is all-0
info->mr = info->mg = info->mb = info->ma = 0;
}
return 1;
}
return 0; // error
} | O3 | c | stbi__bmp_set_mask_defaults(stbi__bmp_data*, int):
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
cmpl $0x3, -0x14(%rsp)
jne 0x2bd0d
movl $0x1, -0x4(%rsp)
jmp 0x2bdd4
cmpl $0x0, -0x14(%rsp)
jne 0x2bdcc
movq -0x10(%rsp), %rax
cmpl $0x10, (%rax)
jne 0x2bd48
movq -0x10(%rsp), %rax
movl $0x7c00, 0xc(%rax) # imm = 0x7C00
movq -0x10(%rsp), %rax
movl $0x3e0, 0x10(%rax) # imm = 0x3E0
movq -0x10(%rsp), %rax
movl $0x1f, 0x14(%rax)
jmp 0x2bdc2
movq -0x10(%rsp), %rax
cmpl $0x20, (%rax)
jne 0x2bd90
movq -0x10(%rsp), %rax
movl $0xff0000, 0xc(%rax) # imm = 0xFF0000
movq -0x10(%rsp), %rax
movl $0xff00, 0x10(%rax) # imm = 0xFF00
movq -0x10(%rsp), %rax
movl $0xff, 0x14(%rax)
movq -0x10(%rsp), %rax
movl $0xff000000, 0x18(%rax) # imm = 0xFF000000
movq -0x10(%rsp), %rax
movl $0x0, 0x1c(%rax)
jmp 0x2bdc0
movq -0x10(%rsp), %rax
movl $0x0, 0x18(%rax)
movq -0x10(%rsp), %rax
movl $0x0, 0x14(%rax)
movq -0x10(%rsp), %rax
movl $0x0, 0x10(%rax)
movq -0x10(%rsp), %rax
movl $0x0, 0xc(%rax)
jmp 0x2bdc2
movl $0x1, -0x4(%rsp)
jmp 0x2bdd4
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax)
| _ZL27stbi__bmp_set_mask_defaultsP14stbi__bmp_datai:
mov [rsp+var_10], rdi
mov [rsp+var_14], esi
cmp [rsp+var_14], 3
jnz short loc_2BD0D
mov [rsp+var_4], 1
jmp loc_2BDD4
loc_2BD0D:
cmp [rsp+var_14], 0
jnz loc_2BDCC
mov rax, [rsp+var_10]
cmp dword ptr [rax], 10h
jnz short loc_2BD48
mov rax, [rsp+var_10]
mov dword ptr [rax+0Ch], 7C00h
mov rax, [rsp+var_10]
mov dword ptr [rax+10h], 3E0h
mov rax, [rsp+var_10]
mov dword ptr [rax+14h], 1Fh
jmp short loc_2BDC2
loc_2BD48:
mov rax, [rsp+var_10]
cmp dword ptr [rax], 20h ; ' '
jnz short loc_2BD90
mov rax, [rsp+var_10]
mov dword ptr [rax+0Ch], 0FF0000h
mov rax, [rsp+var_10]
mov dword ptr [rax+10h], 0FF00h
mov rax, [rsp+var_10]
mov dword ptr [rax+14h], 0FFh
mov rax, [rsp+var_10]
mov dword ptr [rax+18h], 0FF000000h
mov rax, [rsp+var_10]
mov dword ptr [rax+1Ch], 0
jmp short loc_2BDC0
loc_2BD90:
mov rax, [rsp+var_10]
mov dword ptr [rax+18h], 0
mov rax, [rsp+var_10]
mov dword ptr [rax+14h], 0
mov rax, [rsp+var_10]
mov dword ptr [rax+10h], 0
mov rax, [rsp+var_10]
mov dword ptr [rax+0Ch], 0
loc_2BDC0:
jmp short $+2
loc_2BDC2:
mov [rsp+var_4], 1
jmp short loc_2BDD4
loc_2BDCC:
mov [rsp+var_4], 0
loc_2BDD4:
mov eax, [rsp+var_4]
retn
| long long stbi__bmp_set_mask_defaults(_DWORD *a1, int a2)
{
if ( a2 == 3 )
{
return 1;
}
else if ( a2 )
{
return 0;
}
else
{
if ( *a1 == 16 )
{
a1[3] = 31744;
a1[4] = 992;
a1[5] = 31;
}
else if ( *a1 == 32 )
{
a1[3] = 16711680;
a1[4] = 65280;
a1[5] = 255;
a1[6] = -16777216;
a1[7] = 0;
}
else
{
a1[6] = 0;
a1[5] = 0;
a1[4] = 0;
a1[3] = 0;
}
return 1;
}
}
| stbi__bmp_set_mask_defaults:
MOV qword ptr [RSP + -0x10],RDI
MOV dword ptr [RSP + -0x14],ESI
CMP dword ptr [RSP + -0x14],0x3
JNZ 0x0012bd0d
MOV dword ptr [RSP + -0x4],0x1
JMP 0x0012bdd4
LAB_0012bd0d:
CMP dword ptr [RSP + -0x14],0x0
JNZ 0x0012bdcc
MOV RAX,qword ptr [RSP + -0x10]
CMP dword ptr [RAX],0x10
JNZ 0x0012bd48
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0xc],0x7c00
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x10],0x3e0
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x14],0x1f
JMP 0x0012bdc2
LAB_0012bd48:
MOV RAX,qword ptr [RSP + -0x10]
CMP dword ptr [RAX],0x20
JNZ 0x0012bd90
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0xc],0xff0000
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x10],0xff00
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x14],0xff
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x18],0xff000000
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x1c],0x0
JMP 0x0012bdc0
LAB_0012bd90:
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x14],0x0
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RSP + -0x10]
MOV dword ptr [RAX + 0xc],0x0
LAB_0012bdc0:
JMP 0x0012bdc2
LAB_0012bdc2:
MOV dword ptr [RSP + -0x4],0x1
JMP 0x0012bdd4
LAB_0012bdcc:
MOV dword ptr [RSP + -0x4],0x0
LAB_0012bdd4:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
/* stbi__bmp_set_mask_defaults(stbi__bmp_data*, int) */
int4 stbi__bmp_set_mask_defaults(stbi__bmp_data *param_1,int param_2)
{
int4 local_4;
if (param_2 == 3) {
local_4 = 1;
}
else if (param_2 == 0) {
if (*(int *)param_1 == 0x10) {
*(int4 *)(param_1 + 0xc) = 0x7c00;
*(int4 *)(param_1 + 0x10) = 0x3e0;
*(int4 *)(param_1 + 0x14) = 0x1f;
}
else if (*(int *)param_1 == 0x20) {
*(int4 *)(param_1 + 0xc) = 0xff0000;
*(int4 *)(param_1 + 0x10) = 0xff00;
*(int4 *)(param_1 + 0x14) = 0xff;
*(int4 *)(param_1 + 0x18) = 0xff000000;
*(int4 *)(param_1 + 0x1c) = 0;
}
else {
*(int4 *)(param_1 + 0x18) = 0;
*(int4 *)(param_1 + 0x14) = 0;
*(int4 *)(param_1 + 0x10) = 0;
*(int4 *)(param_1 + 0xc) = 0;
}
local_4 = 1;
}
else {
local_4 = 0;
}
return local_4;
}
| |
47,166 | my_casedn_utf32 | eloqsql/strings/ctype-ucs2.c | static size_t
my_casedn_utf32(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((res= my_utf32_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0)
{
my_tolower_utf32(uni_plane,&wc);
if (res != my_uni_utf32(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O0 | c | my_casedn_utf32:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x696e2
jmp 0x696e4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x694d0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x69758
movq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6d830
movl -0x34(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x69500
movl %eax, %ecx
movl -0x54(%rbp), %eax
cmpl %ecx, %eax
je 0x69734
jmp 0x69758
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x34(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x696e4
movq -0x18(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_casedn_utf32:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_50], rax
jmp short $+2
loc_696E2:
jmp short $+2
loc_696E4:
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_utf32_uni
mov [rbp+var_34], eax
cmp eax, 0
jle short loc_69758
mov rdi, [rbp+var_50]
lea rsi, [rbp+var_30]
call my_tolower_utf32
mov eax, [rbp+var_34]
mov [rbp+var_54], eax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_48]
call my_uni_utf32
mov ecx, eax
mov eax, [rbp+var_54]
cmp eax, ecx
jz short loc_69734
jmp short loc_69758
loc_69734:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_34]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp short loc_696E4
loc_69758:
mov rax, [rbp+var_18]
add rsp, 60h
pop rbp
retn
| long long my_casedn_utf32(long long a1, long long a2, long long a3, _BYTE *a4, long long a5, long long a6)
{
long long v7; // [rsp+10h] [rbp-50h]
unsigned long long v8; // [rsp+18h] [rbp-48h]
long long v9; // [rsp+20h] [rbp-40h]
int v10; // [rsp+2Ch] [rbp-34h]
unsigned long long v11[2]; // [rsp+30h] [rbp-30h] BYREF
_BYTE *v12; // [rsp+40h] [rbp-20h]
long long v13; // [rsp+48h] [rbp-18h]
long long v14; // [rsp+50h] [rbp-10h]
long long v15; // [rsp+58h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11[1] = a5;
v9 = a3 + a2;
v8 = (unsigned long long)&a4[a5];
v7 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v10 = my_utf32_uni(v15, (long long)v11, v14, v9, a5, a6);
if ( v10 <= 0 )
break;
my_tolower_utf32(v7, v11);
if ( v10 != (unsigned int)my_uni_utf32(v15, v11[0], v12, v8) )
break;
v14 += v10;
v12 += v10;
}
return v13;
}
| my_casedn_utf32:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001696e2
LAB_001696e2:
JMP 0x001696e4
LAB_001696e4:
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x001694d0
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x00169758
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x30]
CALL 0x0016d830
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x54],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x00169500
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x54]
CMP EAX,ECX
JZ 0x00169734
JMP 0x00169758
LAB_00169734:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001696e4
LAB_00169758:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x60
POP RBP
RET
|
long my_casedn_utf32(long param_1,long param_2,long param_3,long param_4,long param_5)
{
int8 uVar1;
int iVar2;
int iVar3;
int8 local_38;
long local_30;
long local_28;
long local_20;
long local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
iVar2 = my_utf32_uni(local_10,&local_38,local_18,param_2 + param_3);
if (iVar2 < 1) {
return local_20;
}
my_tolower_utf32(uVar1,&local_38);
iVar3 = my_uni_utf32(local_10,local_38,local_28,param_4 + param_5);
if (iVar2 != iVar3) break;
local_18 = local_18 + iVar2;
local_28 = local_28 + iVar2;
}
return local_20;
}
| |
47,167 | JS_EnqueueJob | bluesky950520[P]quickjs/quickjs.c | int JS_EnqueueJob(JSContext *ctx, JSJobFunc *job_func,
int argc, JSValue *argv)
{
JSRuntime *rt = ctx->rt;
JSJobEntry *e;
int i;
assert(!rt->in_free);
e = js_malloc(ctx, sizeof(*e) + argc * sizeof(JSValue));
if (!e)
return -1;
e->ctx = ctx;
e->job_func = job_func;
e->argc = argc;
for(i = 0; i < argc; i++) {
e->argv[i] = js_dup(argv[i]);
}
list_add_tail(&e->link, &rt->job_list);
return 0;
} | O1 | c | JS_EnqueueJob:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rdi), %r12
movslq %edx, %rsi
shlq $0x4, %rsi
addq $0x28, %rsi
callq 0xf082
testq %rax, %rax
je 0xf354
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movl %ebp, 0x20(%rax)
testl %ebp, %ebp
jle 0xf32d
movl %ebp, %ecx
shlq $0x4, %rcx
xorl %edx, %edx
movq (%rbx,%rdx), %rsi
movq 0x8(%rbx,%rdx), %rdi
movq %rsi, 0x8(%rsp)
cmpl $-0x9, %edi
jb 0xf31a
movq 0x8(%rsp), %r8
incl (%r8)
movq %rsi, 0x28(%rax,%rdx)
movq %rdi, 0x30(%rax,%rdx)
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0xf2ff
leaq 0x130(%r12), %rcx
movq 0x130(%r12), %rdx
movq %rax, 0x8(%rdx)
movq %rdx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x130(%r12)
xorl %eax, %eax
jmp 0xf357
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| JS_EnqueueJob:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rcx
mov ebp, edx
mov r14, rsi
mov r15, rdi
mov r12, [rdi+18h]
movsxd rsi, edx
shl rsi, 4
add rsi, 28h ; '('
call js_malloc
test rax, rax
jz short loc_F354
mov [rax+10h], r15
mov [rax+18h], r14
mov [rax+20h], ebp
test ebp, ebp
jle short loc_F32D
mov ecx, ebp
shl rcx, 4
xor edx, edx
loc_F2FF:
mov rsi, [rbx+rdx]
mov rdi, [rbx+rdx+8]
mov [rsp+38h+var_30], rsi
cmp edi, 0FFFFFFF7h
jb short loc_F31A
mov r8, [rsp+38h+var_30]
inc dword ptr [r8]
loc_F31A:
mov [rax+rdx+28h], rsi
mov [rax+rdx+30h], rdi
add rdx, 10h
cmp rcx, rdx
jnz short loc_F2FF
loc_F32D:
lea rcx, [r12+130h]
mov rdx, [r12+130h]
mov [rdx+8], rax
mov [rax], rdx
mov [rax+8], rcx
mov [r12+130h], rax
xor eax, eax
jmp short loc_F357
loc_F354:
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_F357:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long JS_EnqueueJob(long long a1, long long a2, int a3, long long a4)
{
long long v6; // r12
long long v7; // rax
long long v8; // rdx
long long v9; // rsi
long long v10; // rdi
long long v11; // rdx
v6 = *(_QWORD *)(a1 + 24);
v7 = js_malloc(a1, 16LL * a3 + 40);
if ( !v7 )
return -1LL;
*(_QWORD *)(v7 + 16) = a1;
*(_QWORD *)(v7 + 24) = a2;
*(_DWORD *)(v7 + 32) = a3;
if ( a3 > 0 )
{
v8 = 0LL;
do
{
v9 = *(_QWORD *)(a4 + v8);
v10 = *(_QWORD *)(a4 + v8 + 8);
if ( (unsigned int)v10 >= 0xFFFFFFF7 )
++**(_DWORD **)(a4 + v8);
*(_QWORD *)(v7 + v8 + 40) = v9;
*(_QWORD *)(v7 + v8 + 48) = v10;
v8 += 16LL;
}
while ( 16LL * (unsigned int)a3 != v8 );
}
v11 = *(_QWORD *)(v6 + 304);
*(_QWORD *)(v11 + 8) = v7;
*(_QWORD *)v7 = v11;
*(_QWORD *)(v7 + 8) = v6 + 304;
*(_QWORD *)(v6 + 304) = v7;
return 0LL;
}
| JS_EnqueueJob:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RCX
MOV EBP,EDX
MOV R14,RSI
MOV R15,RDI
MOV R12,qword ptr [RDI + 0x18]
MOVSXD RSI,EDX
SHL RSI,0x4
ADD RSI,0x28
CALL 0x0010f082
TEST RAX,RAX
JZ 0x0010f354
MOV qword ptr [RAX + 0x10],R15
MOV qword ptr [RAX + 0x18],R14
MOV dword ptr [RAX + 0x20],EBP
TEST EBP,EBP
JLE 0x0010f32d
MOV ECX,EBP
SHL RCX,0x4
XOR EDX,EDX
LAB_0010f2ff:
MOV RSI,qword ptr [RBX + RDX*0x1]
MOV RDI,qword ptr [RBX + RDX*0x1 + 0x8]
MOV qword ptr [RSP + 0x8],RSI
CMP EDI,-0x9
JC 0x0010f31a
MOV R8,qword ptr [RSP + 0x8]
INC dword ptr [R8]
LAB_0010f31a:
MOV qword ptr [RAX + RDX*0x1 + 0x28],RSI
MOV qword ptr [RAX + RDX*0x1 + 0x30],RDI
ADD RDX,0x10
CMP RCX,RDX
JNZ 0x0010f2ff
LAB_0010f32d:
LEA RCX,[R12 + 0x130]
MOV RDX,qword ptr [R12 + 0x130]
MOV qword ptr [RDX + 0x8],RAX
MOV qword ptr [RAX],RDX
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [R12 + 0x130],RAX
XOR EAX,EAX
JMP 0x0010f357
LAB_0010f354:
PUSH -0x1
POP RAX
LAB_0010f357:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 JS_EnqueueJob(long param_1,long param_2,uint param_3,long param_4)
{
long lVar1;
int *piVar2;
long *plVar3;
int8 uVar4;
long lVar5;
lVar1 = *(long *)(param_1 + 0x18);
plVar3 = (long *)js_malloc(param_1,(long)(int)param_3 * 0x10 + 0x28);
if (plVar3 == (long *)0x0) {
uVar4 = 0xffffffffffffffff;
}
else {
plVar3[2] = param_1;
plVar3[3] = param_2;
*(uint *)(plVar3 + 4) = param_3;
if (0 < (int)param_3) {
lVar5 = 0;
do {
piVar2 = *(int **)(param_4 + lVar5);
uVar4 = *(int8 *)(param_4 + 8 + lVar5);
if (0xfffffff6 < (uint)uVar4) {
*piVar2 = *piVar2 + 1;
}
*(int **)((long)plVar3 + lVar5 + 0x28) = piVar2;
*(int8 *)((long)plVar3 + lVar5 + 0x30) = uVar4;
lVar5 = lVar5 + 0x10;
} while ((ulong)param_3 << 4 != lVar5);
}
lVar5 = *(long *)(lVar1 + 0x130);
*(long **)(lVar5 + 8) = plVar3;
*plVar3 = lVar5;
plVar3[1] = lVar1 + 0x130;
*(long **)(lVar1 + 0x130) = plVar3;
uVar4 = 0;
}
return uVar4;
}
| |
47,168 | delete_map_weak_ref | bluesky950520[P]quickjs/quickjs.c | static void delete_map_weak_ref(JSRuntime *rt, JSMapRecord *mr)
{
JSWeakRefRecord **pwr, *wr;
pwr = get_first_weak_ref(mr->key);
for(;;) {
wr = *pwr;
assert(wr != NULL);
if (wr->kind == JS_WEAK_REF_KIND_MAP && wr->u.map_record == mr)
break;
pwr = &wr->next_weak_ref;
}
*pwr = wr->next_weak_ref;
js_free_rt(rt, wr);
} | O0 | c | delete_map_weak_ref:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x38(%rax), %rsi
callq 0x62400
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x623be
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
cmpq 0x18(%rsp), %rax
jne 0x623be
jmp 0x623ce
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x10(%rsp)
jmp 0x62395
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x27c50
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| delete_map_weak_ref:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rax, [rsp+28h+var_10]
mov rdi, [rax+30h]
mov rsi, [rax+38h]
call get_first_weak_ref
mov [rsp+28h+var_18], rax
loc_62395:
mov rax, [rsp+28h+var_18]
mov rax, [rax]
mov [rsp+28h+var_20], rax
mov rax, [rsp+28h+var_20]
cmp dword ptr [rax], 0
jnz short loc_623BE
mov rax, [rsp+28h+var_20]
mov rax, [rax+10h]
cmp rax, [rsp+28h+var_10]
jnz short loc_623BE
jmp short loc_623CE
loc_623BE:
mov rax, [rsp+28h+var_20]
add rax, 8
mov [rsp+28h+var_18], rax
jmp short loc_62395
loc_623CE:
mov rax, [rsp+28h+var_20]
mov rcx, [rax+8]
mov rax, [rsp+28h+var_18]
mov [rax], rcx
mov rdi, [rsp+28h+var_8]
mov rsi, [rsp+28h+var_20]
call js_free_rt
add rsp, 28h
retn
| void delete_map_weak_ref(long long a1, long long a2)
{
_DWORD *v2; // [rsp+8h] [rbp-20h]
_DWORD **i; // [rsp+10h] [rbp-18h]
for ( i = (_DWORD **)get_first_weak_ref(*(_QWORD *)(a2 + 48), *(_QWORD *)(a2 + 56)); ; i = (_DWORD **)(v2 + 2) )
{
v2 = *i;
if ( !**i && *((_QWORD *)v2 + 2) == a2 )
break;
}
*i = (_DWORD *)*((_QWORD *)v2 + 1);
js_free_rt(a1, (long long)v2);
}
| delete_map_weak_ref:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x30]
MOV RSI,qword ptr [RAX + 0x38]
CALL 0x00162400
MOV qword ptr [RSP + 0x10],RAX
LAB_00162395:
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX],0x0
JNZ 0x001623be
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x10]
CMP RAX,qword ptr [RSP + 0x18]
JNZ 0x001623be
JMP 0x001623ce
LAB_001623be:
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x8
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00162395
LAB_001623ce:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00127c50
ADD RSP,0x28
RET
|
void delete_map_weak_ref(int8 param_1,long param_2)
{
int *piVar1;
int *local_18;
local_18 = (int *)get_first_weak_ref(*(int8 *)(param_2 + 0x30),
*(int8 *)(param_2 + 0x38));
while ((piVar1 = *(int **)local_18, *piVar1 != 0 || (*(long *)(piVar1 + 4) != param_2))) {
local_18 = piVar1 + 2;
}
*(int8 *)local_18 = *(int8 *)(piVar1 + 2);
js_free_rt(param_1,piVar1);
return;
}
| |
47,169 | delete_map_weak_ref | bluesky950520[P]quickjs/quickjs.c | static void delete_map_weak_ref(JSRuntime *rt, JSMapRecord *mr)
{
JSWeakRefRecord **pwr, *wr;
pwr = get_first_weak_ref(mr->key);
for(;;) {
wr = *pwr;
assert(wr != NULL);
if (wr->kind == JS_WEAK_REF_KIND_MAP && wr->u.map_record == mr)
break;
pwr = &wr->next_weak_ref;
}
*pwr = wr->next_weak_ref;
js_free_rt(rt, wr);
} | O2 | c | delete_map_weak_ref:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x30(%rsi), %rdi
movq 0x38(%rsi), %rsi
callq 0x37dc9
movq (%rax), %rsi
cmpl $0x0, (%rsi)
jne 0x37daa
cmpq %r14, 0x10(%rsi)
je 0x37db3
addq $0x8, %rsi
movq %rsi, %rax
jmp 0x37d9c
movq 0x8(%rsi), %rcx
movq %rcx, (%rax)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1ac7b
| delete_map_weak_ref:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rdi, [rsi+30h]
mov rsi, [rsi+38h]
call get_first_weak_ref
loc_37D9C:
mov rsi, [rax]
cmp dword ptr [rsi], 0
jnz short loc_37DAA
cmp [rsi+10h], r14
jz short loc_37DB3
loc_37DAA:
add rsi, 8
mov rax, rsi
jmp short loc_37D9C
loc_37DB3:
mov rcx, [rsi+8]
mov [rax], rcx
mov rdi, rbx
add rsp, 8
pop rbx
pop r14
jmp js_free_rt
| long long delete_map_weak_ref(long long a1, long long a2)
{
_DWORD **i; // rax
_DWORD *v4; // rsi
for ( i = (_DWORD **)get_first_weak_ref(*(_QWORD *)(a2 + 48), *(_QWORD *)(a2 + 56)); ; i = (_DWORD **)(v4 + 2) )
{
v4 = *i;
if ( !**i && *((_QWORD *)v4 + 2) == a2 )
break;
}
*i = (_DWORD *)*((_QWORD *)v4 + 1);
return js_free_rt(a1, (long long)v4);
}
| delete_map_weak_ref:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RSI + 0x30]
MOV RSI,qword ptr [RSI + 0x38]
CALL 0x00137dc9
LAB_00137d9c:
MOV RSI,qword ptr [RAX]
CMP dword ptr [RSI],0x0
JNZ 0x00137daa
CMP qword ptr [RSI + 0x10],R14
JZ 0x00137db3
LAB_00137daa:
ADD RSI,0x8
MOV RAX,RSI
JMP 0x00137d9c
LAB_00137db3:
MOV RCX,qword ptr [RSI + 0x8]
MOV qword ptr [RAX],RCX
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0011ac7b
|
void delete_map_weak_ref(int8 param_1,long param_2)
{
int *piVar1;
int *piVar2;
piVar2 = (int *)get_first_weak_ref(*(int8 *)(param_2 + 0x30),*(int8 *)(param_2 + 0x38)
);
while ((piVar1 = *(int **)piVar2, *piVar1 != 0 || (*(long *)(piVar1 + 4) != param_2))) {
piVar2 = piVar1 + 2;
}
*(int8 *)piVar2 = *(int8 *)(piVar1 + 2);
js_free_rt(param_1);
return;
}
| |
47,170 | bytecode_emit_literal | alca/libalca/bytecode.c | void bytecode_emit_literal(ac_builder *builder, ac_expr *expr)
{
if (expr->u.literal.value->type == TOKEN_IDENTIFIER)
{
uint32_t offset = ac_arena_add_string(builder->data,
expr->u.literal.value->value,
strlen(expr->u.literal.value->value));
if (builder->module_name)
{
// if it's the module, push module onto stack
if (strcmp(expr->u.literal.value->value, builder->module_name) == 0)
ac_arena_add_code_with_arg(builder->code, OP_PUSHMODULE, offset);
// if it's an iterator variable, don't do anything, it's pushed on the stack at the beginning
// of each loop
else if (strcmp(expr->u.literal.value->value, builder->iter) == 0)
{
ac_arena_add_code_with_arg(builder->code, OP_LOAD, 0); // iterator register
}
else
// otherwise, it's a rule. run it (pushes bool onto stack)
ac_arena_add_code_with_arg(builder->code, OP_RULE, offset);
}
} else if (expr->u.literal.value->type == TOKEN_NUMBER)
{
ac_arena_add_code_with_arg(builder->code, OP_PUSHINT, *(uint32_t *)expr->u.literal.value->value);
} else if (expr->u.literal.value->type == TOKEN_STRING)
{
uint32_t offset = ac_arena_add_string(builder->data,
expr->u.literal.value->value,
strlen(expr->u.literal.value->value));
ac_arena_add_code_with_arg(builder->code, OP_PUSHSTRING, offset);
} else if (expr->u.literal.value->type == TOKEN_REGEX)
{
uint32_t offset = ac_arena_add_string(builder->data,
expr->u.literal.value->value,
strlen(expr->u.literal.value->value));
ac_arena_add_code_with_arg(builder->code, OP_PUSHSTRING, offset); // push match string
ac_arena_add_code_with_arg(builder->code, OP_PUSHINT, expr->u.literal.value->flags); // push modifier flags
} else if (expr->u.literal.value->type == TOKEN_TRUE)
{
ac_arena_add_code_with_arg(builder->code, OP_PUSHBOOL, TRUE);
} else if (expr->u.literal.value->type == TOKEN_FALSE)
{
ac_arena_add_code_with_arg(builder->code, OP_PUSHBOOL, FALSE);
}
} | O0 | c | bytecode_emit_literal:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x29, (%rax)
jne 0x13fb4
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x7400
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl %eax, %edx
callq 0x7be0
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x13faf
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
callq 0x7650
cmpl $0x0, %eax
jne 0x13f62
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x14(%rbp), %edx
movl $0x67, %esi
callq 0x72c0
jmp 0x13fad
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x7650
cmpl $0x0, %eax
jne 0x13f96
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0xffffffce, %esi # imm = 0xFFFFFFCE
xorl %edx, %edx
callq 0x72c0
jmp 0x13fab
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x14(%rbp), %edx
movl $0xffffffc8, %esi # imm = 0xFFFFFFC8
callq 0x72c0
jmp 0x13fad
jmp 0x13faf
jmp 0x1411d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x26, (%rax)
jne 0x13fe6
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movl (%rax), %edx
movl $0x64, %esi
callq 0x72c0
jmp 0x1411b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x27, (%rax)
jne 0x1404c
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x7400
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl %eax, %edx
callq 0x7be0
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x18(%rbp), %edx
movl $0x66, %esi
callq 0x72c0
jmp 0x14119
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x28, (%rax)
jne 0x140cc
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x7400
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl %eax, %edx
callq 0x7be0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x1c(%rbp), %edx
movl $0x66, %esi
callq 0x72c0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x14(%rax), %edx
movl $0x64, %esi
callq 0x72c0
jmp 0x14117
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x2a, (%rax)
jne 0x140f2
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0x65, %esi
movl $0x1, %edx
callq 0x72c0
jmp 0x14115
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x2b, (%rax)
jne 0x14113
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0x65, %esi
xorl %edx, %edx
callq 0x72c0
jmp 0x14115
jmp 0x14117
jmp 0x14119
jmp 0x1411b
jmp 0x1411d
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| bytecode_emit_literal:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+8]
cmp dword ptr [rax], 29h ; ')'
jnz loc_13FB4
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rax, [rax+8]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rdi, [rax+8]
call _strlen
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_28]
mov edx, eax
call _ac_arena_add_string
mov [rbp+var_14], eax
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz loc_13FAF
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rdi, [rax+8]
mov rax, [rbp+var_8]
mov rsi, [rax]
call _strcmp
cmp eax, 0
jnz short loc_13F62
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov edx, [rbp+var_14]
mov esi, 67h ; 'g'
call _ac_arena_add_code_with_arg
jmp short loc_13FAD
loc_13F62:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rdi, [rax+8]
mov rax, [rbp+var_8]
mov rsi, [rax+8]
call _strcmp
cmp eax, 0
jnz short loc_13F96
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov esi, 0FFFFFFCEh
xor edx, edx
call _ac_arena_add_code_with_arg
jmp short loc_13FAB
loc_13F96:
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov edx, [rbp+var_14]
mov esi, 0FFFFFFC8h
call _ac_arena_add_code_with_arg
loc_13FAB:
jmp short $+2
loc_13FAD:
jmp short $+2
loc_13FAF:
jmp loc_1411D
loc_13FB4:
mov rax, [rbp+var_10]
mov rax, [rax+8]
cmp dword ptr [rax], 26h ; '&'
jnz short loc_13FE6
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rax, [rax+8]
mov edx, [rax]
mov esi, 64h ; 'd'
call _ac_arena_add_code_with_arg
jmp loc_1411B
loc_13FE6:
mov rax, [rbp+var_10]
mov rax, [rax+8]
cmp dword ptr [rax], 27h ; '''
jnz short loc_1404C
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rax, [rax+8]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rdi, [rax+8]
call _strlen
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_38]
mov edx, eax
call _ac_arena_add_string
mov [rbp+var_18], eax
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov edx, [rbp+var_18]
mov esi, 66h ; 'f'
call _ac_arena_add_code_with_arg
jmp loc_14119
loc_1404C:
mov rax, [rbp+var_10]
mov rax, [rax+8]
cmp dword ptr [rax], 28h ; '('
jnz short loc_140CC
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_50], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rax, [rax+8]
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rdi, [rax+8]
call _strlen
mov rdi, [rbp+var_50]
mov rsi, [rbp+var_48]
mov edx, eax
call _ac_arena_add_string
mov [rbp+var_1C], eax
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov edx, [rbp+var_1C]
mov esi, 66h ; 'f'
call _ac_arena_add_code_with_arg
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov edx, [rax+14h]
mov esi, 64h ; 'd'
call _ac_arena_add_code_with_arg
jmp short loc_14117
loc_140CC:
mov rax, [rbp+var_10]
mov rax, [rax+8]
cmp dword ptr [rax], 2Ah ; '*'
jnz short loc_140F2
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov esi, 65h ; 'e'
mov edx, 1
call _ac_arena_add_code_with_arg
jmp short loc_14115
loc_140F2:
mov rax, [rbp+var_10]
mov rax, [rax+8]
cmp dword ptr [rax], 2Bh ; '+'
jnz short loc_14113
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov esi, 65h ; 'e'
xor edx, edx
call _ac_arena_add_code_with_arg
loc_14113:
jmp short $+2
loc_14115:
jmp short $+2
loc_14117:
jmp short $+2
loc_14119:
jmp short $+2
loc_1411B:
jmp short $+2
loc_1411D:
add rsp, 50h
pop rbp
retn
| _DWORD * bytecode_emit_literal(_QWORD *a1, long long a2)
{
unsigned int v2; // eax
_DWORD *result; // rax
unsigned int v4; // eax
unsigned int v5; // eax
unsigned int v6; // eax
unsigned int v7; // eax
long long v8; // [rsp+0h] [rbp-50h]
long long v9; // [rsp+8h] [rbp-48h]
long long v10; // [rsp+10h] [rbp-40h]
long long v11; // [rsp+18h] [rbp-38h]
long long v12; // [rsp+20h] [rbp-30h]
long long v13; // [rsp+28h] [rbp-28h]
unsigned int v14; // [rsp+3Ch] [rbp-14h]
switch ( **(_DWORD **)(a2 + 8) )
{
case ')':
v12 = a1[3];
v13 = *(_QWORD *)(*(_QWORD *)(a2 + 8) + 8LL);
v2 = strlen(v13);
v14 = ac_arena_add_string(v12, v13, v2);
result = a1;
if ( *a1 )
{
if ( !(unsigned int)strcmp(*(_QWORD *)(*(_QWORD *)(a2 + 8) + 8LL), *a1) )
{
return (_DWORD *)ac_arena_add_code_with_arg(a1[2], 103, v14);
}
else if ( !(unsigned int)strcmp(*(_QWORD *)(*(_QWORD *)(a2 + 8) + 8LL), a1[1]) )
{
return (_DWORD *)ac_arena_add_code_with_arg(a1[2], -50, 0);
}
else
{
return (_DWORD *)ac_arena_add_code_with_arg(a1[2], -56, v14);
}
}
break;
case '&':
return (_DWORD *)ac_arena_add_code_with_arg(a1[2], 100, **(_DWORD **)(*(_QWORD *)(a2 + 8) + 8LL));
case '\'':
v10 = a1[3];
v11 = *(_QWORD *)(*(_QWORD *)(a2 + 8) + 8LL);
v4 = strlen(v11);
v5 = ac_arena_add_string(v10, v11, v4);
return (_DWORD *)ac_arena_add_code_with_arg(a1[2], 102, v5);
case '(':
v8 = a1[3];
v9 = *(_QWORD *)(*(_QWORD *)(a2 + 8) + 8LL);
v6 = strlen(v9);
v7 = ac_arena_add_string(v8, v9, v6);
ac_arena_add_code_with_arg(a1[2], 102, v7);
return (_DWORD *)ac_arena_add_code_with_arg(a1[2], 100, *(_DWORD *)(*(_QWORD *)(a2 + 8) + 20LL));
case '*':
return (_DWORD *)ac_arena_add_code_with_arg(a1[2], 101, 1u);
default:
result = *(_DWORD **)(a2 + 8);
if ( *result == 43 )
return (_DWORD *)ac_arena_add_code_with_arg(a1[2], 101, 0);
break;
}
return result;
}
| bytecode_emit_literal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
CMP dword ptr [RAX],0x29
JNZ 0x00113fb4
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00107400
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,EAX
CALL 0x00107be0
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x00113faf
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX]
CALL 0x00107650
CMP EAX,0x0
JNZ 0x00113f62
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV EDX,dword ptr [RBP + -0x14]
MOV ESI,0x67
CALL 0x001072c0
JMP 0x00113fad
LAB_00113f62:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x00107650
CMP EAX,0x0
JNZ 0x00113f96
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV ESI,0xffffffce
XOR EDX,EDX
CALL 0x001072c0
JMP 0x00113fab
LAB_00113f96:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV EDX,dword ptr [RBP + -0x14]
MOV ESI,0xffffffc8
CALL 0x001072c0
LAB_00113fab:
JMP 0x00113fad
LAB_00113fad:
JMP 0x00113faf
LAB_00113faf:
JMP 0x0011411d
LAB_00113fb4:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
CMP dword ptr [RAX],0x26
JNZ 0x00113fe6
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV EDX,dword ptr [RAX]
MOV ESI,0x64
CALL 0x001072c0
JMP 0x0011411b
LAB_00113fe6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
CMP dword ptr [RAX],0x27
JNZ 0x0011404c
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00107400
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,EAX
CALL 0x00107be0
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV EDX,dword ptr [RBP + -0x18]
MOV ESI,0x66
CALL 0x001072c0
JMP 0x00114119
LAB_0011404c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
CMP dword ptr [RAX],0x28
JNZ 0x001140cc
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00107400
MOV RDI,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x48]
MOV EDX,EAX
CALL 0x00107be0
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV EDX,dword ptr [RBP + -0x1c]
MOV ESI,0x66
CALL 0x001072c0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV EDX,dword ptr [RAX + 0x14]
MOV ESI,0x64
CALL 0x001072c0
JMP 0x00114117
LAB_001140cc:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
CMP dword ptr [RAX],0x2a
JNZ 0x001140f2
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV ESI,0x65
MOV EDX,0x1
CALL 0x001072c0
JMP 0x00114115
LAB_001140f2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
CMP dword ptr [RAX],0x2b
JNZ 0x00114113
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV ESI,0x65
XOR EDX,EDX
CALL 0x001072c0
LAB_00114113:
JMP 0x00114115
LAB_00114115:
JMP 0x00114117
LAB_00114117:
JMP 0x00114119
LAB_00114119:
JMP 0x0011411b
LAB_0011411b:
JMP 0x0011411d
LAB_0011411d:
ADD RSP,0x50
POP RBP
RET
|
void bytecode_emit_literal(long *param_1,long param_2)
{
long lVar1;
int8 uVar2;
int4 uVar3;
int iVar4;
size_t sVar5;
if (**(int **)(param_2 + 8) == 0x29) {
lVar1 = param_1[3];
uVar2 = *(int8 *)(*(long *)(param_2 + 8) + 8);
sVar5 = strlen(*(char **)(*(long *)(param_2 + 8) + 8));
uVar3 = ac_arena_add_string(lVar1,uVar2,sVar5 & 0xffffffff);
if (*param_1 != 0) {
iVar4 = strcmp(*(char **)(*(long *)(param_2 + 8) + 8),(char *)*param_1);
if (iVar4 == 0) {
ac_arena_add_code_with_arg(param_1[2],0x67,uVar3);
}
else {
iVar4 = strcmp(*(char **)(*(long *)(param_2 + 8) + 8),(char *)param_1[1]);
if (iVar4 == 0) {
ac_arena_add_code_with_arg(param_1[2],0xffffffce,0);
}
else {
ac_arena_add_code_with_arg(param_1[2],0xffffffc8,uVar3);
}
}
}
}
else if (**(int **)(param_2 + 8) == 0x26) {
ac_arena_add_code_with_arg(param_1[2],100,**(int4 **)(*(long *)(param_2 + 8) + 8));
}
else if (**(int **)(param_2 + 8) == 0x27) {
lVar1 = param_1[3];
uVar2 = *(int8 *)(*(long *)(param_2 + 8) + 8);
sVar5 = strlen(*(char **)(*(long *)(param_2 + 8) + 8));
uVar3 = ac_arena_add_string(lVar1,uVar2,sVar5 & 0xffffffff);
ac_arena_add_code_with_arg(param_1[2],0x66,uVar3);
}
else if (**(int **)(param_2 + 8) == 0x28) {
lVar1 = param_1[3];
uVar2 = *(int8 *)(*(long *)(param_2 + 8) + 8);
sVar5 = strlen(*(char **)(*(long *)(param_2 + 8) + 8));
uVar3 = ac_arena_add_string(lVar1,uVar2,sVar5 & 0xffffffff);
ac_arena_add_code_with_arg(param_1[2],0x66,uVar3);
ac_arena_add_code_with_arg(param_1[2],100,*(int4 *)(*(long *)(param_2 + 8) + 0x14));
}
else if (**(int **)(param_2 + 8) == 0x2a) {
ac_arena_add_code_with_arg(param_1[2],0x65,1);
}
else if (**(int **)(param_2 + 8) == 0x2b) {
ac_arena_add_code_with_arg(param_1[2],0x65,0);
}
return;
}
| |
47,171 | void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::array_t&&) | monkey531[P]llama/common/json.hpp | static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr)
{
j.m_data.m_value.destroy(j.m_data.m_type);
j.m_data.m_type = value_t::array;
j.m_data.m_value = std::move(arr);
j.set_parents();
j.assert_invariant();
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::array_t&&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
movzbl (%r14), %esi
callq 0x8efce
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x1dc20
movups (%rbx), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x89876
nop
| _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE2EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_ONSJ_7array_tE:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
add rdi, 8
movzx esi, byte ptr [r14]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t)
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
movups xmm0, xmmword ptr [rbx]
movups xmmword ptr [rax], xmm0
mov rcx, [rbx+10h]
mov [rax+10h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
add rsp, 8
pop rbx
pop r14
jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
| long long nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
unsigned __int8 *a1,
long long a2)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::destroy(
(long long **)a1 + 1,
*a1);
*a1 = 2;
result = operator new(0x18uLL);
*(_OWORD *)result = *(_OWORD *)a2;
*(_QWORD *)(result + 16) = *(_QWORD *)(a2 + 16);
*(_OWORD *)a2 = 0LL;
*(_QWORD *)(a2 + 16) = 0LL;
*((_QWORD *)a1 + 1) = result;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
return result;
}
| construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
ADD RDI,0x8
MOVZX ESI,byte ptr [R14]
CALL 0x0018efce
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x0011dc20
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [RAX],XMM0
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00189876
|
/* void
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::array_t&&) */
void nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,array_t *param_2)
{
int8 uVar1;
int8 *puVar2;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::json_value::destroy((json_value *)(param_1 + 8),*param_1);
*param_1 = (basic_json)0x2;
puVar2 = (int8 *)operator_new(0x18);
uVar1 = *(int8 *)(param_2 + 8);
*puVar2 = *(int8 *)param_2;
puVar2[1] = uVar1;
puVar2[2] = *(int8 *)(param_2 + 0x10);
*(int8 *)param_2 = 0;
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(param_2 + 0x10) = 0;
*(int8 **)(param_1 + 8) = puVar2;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(param_1,0));
return;
}
| |
47,172 | 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>>::end_object() | llama.cpp/common/json.hpp | bool end_object()
{
if (ref_stack.back())
{
if (!callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back()))
{
// discard object
*ref_stack.back() = discarded;
}
else
{
ref_stack.back()->set_parents();
}
}
JSON_ASSERT(!ref_stack.empty());
JSON_ASSERT(!keep_stack.empty());
ref_stack.pop_back();
keep_stack.pop_back();
if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured())
{
// remove discarded value
for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it)
{
if (it->is_discarded())
{
ref_stack.back()->erase(it);
break;
}
}
}
return true;
} | O3 | cpp | 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>>::end_object():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq -0x8(%rax), %rcx
testq %rcx, %rcx
je 0x88348
subq 0x8(%rbx), %rax
shrq $0x3, %rax
decl %eax
movl %eax, 0x28(%rsp)
movb $0x1, 0x8(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x884f3
leaq 0x80(%rbx), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq *0x98(%rbx)
testb %al, %al
jne 0x88348
leaq 0xa8(%rbx), %rsi
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x892dc
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rdi
movq %r14, %rsi
callq 0x871fa
movq %r14, %rdi
xorl %esi, %esi
callq 0x8508e
movq %r14, %rdi
callq 0x897a8
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq %rax, %rcx
je 0x884b6
movq 0x30(%rbx), %rdx
movl 0x38(%rbx), %esi
cmpq %rdx, 0x20(%rbx)
sete %dil
testl %esi, %esi
sete %r8b
andb %dil, %r8b
cmpb $0x1, %r8b
je 0x884d2
leaq -0x8(%rax), %rdi
movq %rdi, 0x10(%rbx)
subl $0x1, %esi
movl %esi, 0x38(%rbx)
jae 0x8839a
movl $0x3f, 0x38(%rbx)
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
cmpq %rdi, %rcx
je 0x884a5
movq -0x10(%rax), %rax
testq %rax, %rax
je 0x884a5
movb (%rax), %cl
decb %cl
cmpb $0x1, %cl
ja 0x884a5
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
leaq 0x28(%rsp), %r14
movq %rax, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq %r12, 0x18(%r14)
movq %r14, %rdi
callq 0x8a1b0
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r15)
movq %r12, 0x18(%r15)
movq %r15, %rdi
callq 0x8a502
movq %r14, %rdi
movq %r15, %rsi
callq 0x8a222
testb %al, %al
jne 0x884a5
leaq 0x30(%rsp), %r13
leaq 0x10(%rsp), %rbp
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x89380
cmpb $0x9, (%rax)
je 0x88475
movq %r14, %rdi
callq 0x8975a
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rbp)
movq %r12, 0x20(%rsp)
movq %r15, %rdi
callq 0x8a502
movq %r14, %rdi
movq %r15, %rsi
callq 0x8a222
testb %al, %al
je 0x8842e
jmp 0x884a5
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rsi
movq 0x28(%rsp), %rax
leaq 0x58(%rsp), %rdx
movq %rax, (%rdx)
movups (%r13), %xmm0
movups %xmm0, 0x8(%rdx)
movq 0x10(%r13), %rax
movq %rax, 0x18(%rdx)
leaq 0x8(%rsp), %rdi
callq 0x894cc
movb $0x1, %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x913fb(%rip), %rdi # 0x1198b8
leaq 0x89d49(%rip), %rdx # 0x11220d
leaq 0x923c9(%rip), %rcx # 0x11a894
movl $0x1bbd, %esi # imm = 0x1BBD
jmp 0x884ec
leaq 0x913df(%rip), %rdi # 0x1198b8
leaq 0x89d2d(%rip), %rdx # 0x11220d
leaq 0x92327(%rip), %rcx # 0x11a80e
movl $0x1bbe, %esi # imm = 0x1BBE
xorl %eax, %eax
callq 0x20e60
callq 0x212a0
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10end_objectEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov rbx, rdi
mov rax, [rdi+10h]
mov rcx, [rax-8]
test rcx, rcx
jz short loc_88348
sub rax, [rbx+8]
shr rax, 3
dec eax
mov dword ptr [rsp+0A8h+var_80], eax
mov byte ptr [rsp+0A8h+var_A0], 1
cmp qword ptr [rbx+90h], 0
jz loc_884F3
lea rdi, [rbx+80h]
lea rsi, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_A0]
call qword ptr [rbx+98h]
test al, al
jnz short loc_88348
lea rsi, [rbx+0A8h]
lea r14, [rsp+0A8h+var_60]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [rbx+10h]
mov rdi, [rax-8]
mov rsi, r14
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, 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()
loc_88348:
mov rcx, [rbx+8]
mov rax, [rbx+10h]
cmp rcx, rax
jz loc_884B6
mov rdx, [rbx+30h]
mov esi, [rbx+38h]
cmp [rbx+20h], rdx
setz dil
test esi, esi
setz r8b
and r8b, dil
cmp r8b, 1
jz loc_884D2
lea rdi, [rax-8]
mov [rbx+10h], rdi
sub esi, 1
mov [rbx+38h], esi
jnb short loc_8839A
mov dword ptr [rbx+38h], 3Fh ; '?'
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
loc_8839A:
cmp rcx, rdi
jz loc_884A5
mov rax, [rax-10h]
test rax, rax
jz loc_884A5
mov cl, [rax]
dec cl
cmp cl, 1
ja loc_884A5
mov r12, 8000000000000000h
lea r14, [rsp+0A8h+var_80]
mov [r14], rax
xorps xmm0, xmm0
movups xmmword ptr [r14+8], xmm0
mov [r14+18h], r12
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::set_begin(void)
mov rax, [rbx+10h]
mov rax, [rax-8]
lea r15, [rsp+0A8h+var_A0]
mov [r15], rax
xorps xmm0, xmm0
movups xmmword ptr [r15+8], xmm0
mov [r15+18h], r12
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::set_end(void)
mov rdi, r14
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
test al, al
jnz loc_884A5
lea r13, [rsp+0A8h+var_78]
lea rbp, [rsp+0A8h+var_98]
lea r14, [rsp+0A8h+var_80]
lea r15, [rsp+0A8h+var_A0]
loc_8842E:
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator->(void)
cmp byte ptr [rax], 9
jz short loc_88475
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator++(void)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov [rsp+0A8h+var_A0], rax
xorps xmm0, xmm0
movups xmmword ptr [rbp+0], xmm0
mov [rsp+0A8h+var_88], r12
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::set_end(void)
mov rdi, r14
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
test al, al
jz short loc_8842E
jmp short loc_884A5
loc_88475:
mov rax, [rbx+10h]
mov rsi, [rax-8]
mov rax, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_50]
mov [rdx], rax
movups xmm0, xmmword ptr [r13+0]
movups xmmword ptr [rdx+8], xmm0
mov rax, [r13+10h]
mov [rdx+18h], rax
lea rdi, [rsp+0A8h+var_A0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
loc_884A5:
mov al, 1
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_884B6:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackEmpty; "!ref_stack.empty()"
mov esi, 1BBDh
jmp short loc_884EC
loc_884D2:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1BBEh
loc_884EC:
xor eax, eax
call _ggml_abort
loc_884F3:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
| char 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>>::end_object(
long long a1)
{
long long v1; // rax
long long v2; // rcx
long long v3; // rax
long long v4; // rdx
int v5; // esi
_BYTE *v6; // rax
long long v7; // rsi
long long v9; // [rsp+8h] [rbp-A0h] BYREF
__int128 v10; // [rsp+10h] [rbp-98h]
unsigned long long v11; // [rsp+20h] [rbp-88h]
_BYTE *v12; // [rsp+28h] [rbp-80h] BYREF
__int128 v13; // [rsp+30h] [rbp-78h]
unsigned long long v14; // [rsp+40h] [rbp-68h]
char v15[16]; // [rsp+48h] [rbp-60h] BYREF
_BYTE *v16; // [rsp+58h] [rbp-50h]
__int128 v17; // [rsp+60h] [rbp-48h]
unsigned long long v18; // [rsp+70h] [rbp-38h]
v1 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v1 - 8) )
{
LODWORD(v12) = ((unsigned long long)(v1 - *(_QWORD *)(a1 + 8)) >> 3) - 1;
LOBYTE(v9) = 1;
if ( !*(_QWORD *)(a1 + 144) )
goto LABEL_20;
if ( !(*(unsigned __int8 ( **)(long long, _BYTE **, long long *))(a1 + 152))(a1 + 128, &v12, &v9) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v15,
a1 + 168);
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 *)(*(_QWORD *)(a1 + 16) - 8LL),
(long long)v15);
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(v15);
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(v15);
}
}
v2 = *(_QWORD *)(a1 + 8);
v3 = *(_QWORD *)(a1 + 16);
if ( v2 == v3 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7101LL,
"GGML_ASSERT(%s) failed",
"!ref_stack.empty()");
goto LABEL_20;
}
v4 = *(_QWORD *)(a1 + 48);
v5 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v4 && v5 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7102LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
LABEL_20:
std::__throw_bad_function_call();
}
*(_QWORD *)(a1 + 16) = v3 - 8;
*(_DWORD *)(a1 + 56) = v5 - 1;
if ( !v5 )
{
*(_DWORD *)(a1 + 56) = 63;
*(_QWORD *)(a1 + 48) = v4 - 8;
}
if ( v2 != v3 - 8 )
{
v6 = *(_BYTE **)(v3 - 16);
if ( v6 )
{
if ( (unsigned __int8)(*v6 - 1) <= 1u )
{
v12 = v6;
v13 = 0LL;
v14 = 0x8000000000000000LL;
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::set_begin(&v12);
v9 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL);
v10 = 0LL;
v11 = 0x8000000000000000LL;
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::set_end(&v9);
if ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_(
&v12,
&v9) )
{
while ( *(_BYTE *)nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator->(&v12) != 9 )
{
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator++(&v12);
v9 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL);
v10 = 0LL;
v11 = 0x8000000000000000LL;
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::set_end(&v9);
if ( (unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_(
&v12,
&v9) )
return 1;
}
v7 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL);
v16 = v12;
v17 = v13;
v18 = v14;
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_(
&v9,
v7);
}
}
}
}
return 1;
}
| end_object:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RAX + -0x8]
TEST RCX,RCX
JZ 0x00188348
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
DEC EAX
MOV dword ptr [RSP + 0x28],EAX
MOV byte ptr [RSP + 0x8],0x1
CMP qword ptr [RBX + 0x90],0x0
JZ 0x001884f3
LEA RDI,[RBX + 0x80]
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JNZ 0x00188348
LEA RSI,[RBX + 0xa8]
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x001892dc
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX + -0x8]
MOV RSI,R14
CALL 0x001871fa
MOV RDI,R14
XOR ESI,ESI
CALL 0x0018508e
MOV RDI,R14
CALL 0x001897a8
LAB_00188348:
MOV RCX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
CMP RCX,RAX
JZ 0x001884b6
MOV RDX,qword ptr [RBX + 0x30]
MOV ESI,dword ptr [RBX + 0x38]
CMP qword ptr [RBX + 0x20],RDX
SETZ DIL
TEST ESI,ESI
SETZ R8B
AND R8B,DIL
CMP R8B,0x1
JZ 0x001884d2
LEA RDI,[RAX + -0x8]
MOV qword ptr [RBX + 0x10],RDI
SUB ESI,0x1
MOV dword ptr [RBX + 0x38],ESI
JNC 0x0018839a
MOV dword ptr [RBX + 0x38],0x3f
ADD RDX,-0x8
MOV qword ptr [RBX + 0x30],RDX
LAB_0018839a:
CMP RCX,RDI
JZ 0x001884a5
MOV RAX,qword ptr [RAX + -0x10]
TEST RAX,RAX
JZ 0x001884a5
MOV CL,byte ptr [RAX]
DEC CL
CMP CL,0x1
JA 0x001884a5
MOV R12,-0x8000000000000000
LEA R14,[RSP + 0x28]
MOV qword ptr [R14],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x8],XMM0
MOV qword ptr [R14 + 0x18],R12
MOV RDI,R14
CALL 0x0018a1b0
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
LEA R15,[RSP + 0x8]
MOV qword ptr [R15],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x8],XMM0
MOV qword ptr [R15 + 0x18],R12
MOV RDI,R15
CALL 0x0018a502
MOV RDI,R14
MOV RSI,R15
CALL 0x0018a222
TEST AL,AL
JNZ 0x001884a5
LEA R13,[RSP + 0x30]
LEA RBP,[RSP + 0x10]
LEA R14,[RSP + 0x28]
LEA R15,[RSP + 0x8]
LAB_0018842e:
MOV RDI,R14
CALL 0x00189380
CMP byte ptr [RAX],0x9
JZ 0x00188475
MOV RDI,R14
CALL 0x0018975a
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV qword ptr [RSP + 0x8],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP],XMM0
MOV qword ptr [RSP + 0x20],R12
MOV RDI,R15
CALL 0x0018a502
MOV RDI,R14
MOV RSI,R15
CALL 0x0018a222
TEST AL,AL
JZ 0x0018842e
JMP 0x001884a5
LAB_00188475:
MOV RAX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RSP + 0x28]
LEA RDX,[RSP + 0x58]
MOV qword ptr [RDX],RAX
MOVUPS XMM0,xmmword ptr [R13]
MOVUPS xmmword ptr [RDX + 0x8],XMM0
MOV RAX,qword ptr [R13 + 0x10]
MOV qword ptr [RDX + 0x18],RAX
LEA RDI,[RSP + 0x8]
CALL 0x001894cc
LAB_001884a5:
MOV AL,0x1
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001884b6:
LEA RDI,[0x2198b8]
LEA RDX,[0x21220d]
LEA RCX,[0x21a894]
MOV ESI,0x1bbd
JMP 0x001884ec
LAB_001884d2:
LEA RDI,[0x2198b8]
LEA RDX,[0x21220d]
LEA RCX,[0x21a80e]
MOV ESI,0x1bbe
LAB_001884ec:
XOR EAX,EAX
CALL 0x00120e60
LAB_001884f3:
CALL 0x001212a0
|
/* 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> >::end_object() */
int8 __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>>
::end_object(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)
{
int iVar1;
long lVar2;
char cVar3;
char *pcVar4;
int8 uVar5;
int8 local_a0;
int8 local_98;
int8 uStack_90;
int8 local_88;
char *local_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
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_60 [16];
char *local_50;
int4 local_48;
int4 uStack_44;
int4 uStack_40;
int4 uStack_3c;
int8 local_38;
if (*(long *)(*(long *)(this + 0x10) + -8) != 0) {
local_80 = (char *)CONCAT44(local_80._4_4_,
(int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) +
-1);
local_a0 = CONCAT71(local_a0._1_7_,1);
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
cVar3 = (**(code **)(this + 0x98))(this + 0x80,&local_80,&local_a0);
if (cVar3 == '\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>
::basic_json(local_60,(basic_json *)(this + 0xa8));
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>
**)(*(long *)(this + 0x10) + -8),local_60);
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_60,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_60);
}
}
lVar2 = *(long *)(this + 0x10);
if (*(long *)(this + 8) == lVar2) {
pcVar4 = "!ref_stack.empty()";
uVar5 = 0x1bbd;
}
else {
iVar1 = *(int *)(this + 0x38);
if (iVar1 != 0 || *(long *)(this + 0x20) != *(long *)(this + 0x30)) {
*(long *)(this + 0x10) = lVar2 + -8;
*(int *)(this + 0x38) = iVar1 + -1;
if (iVar1 == 0) {
*(int4 *)(this + 0x38) = 0x3f;
*(long *)(this + 0x30) = *(long *)(this + 0x30) + -8;
}
if (((*(long *)(this + 8) != lVar2 + -8) &&
(local_80 = *(char **)(lVar2 + -0x10), local_80 != (char *)0x0)) &&
((byte)(*local_80 - 1U) < 2)) {
local_78 = 0;
uStack_70 = 0;
local_68 = 0x8000000000000000;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::set_begin((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_80);
local_a0 = *(int8 *)(*(long *)(this + 0x10) + -8);
local_98 = 0;
uStack_90 = 0;
local_88 = 0x8000000000000000;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::set_end((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_a0);
cVar3 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_80,
(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_a0);
if (cVar3 == '\0') {
do {
pcVar4 = (char *)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::operator->((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_80);
if (*pcVar4 == '\t') {
local_50 = local_80;
local_48 = (int4)local_78;
uStack_44 = local_78._4_4_;
uStack_40 = (int4)uStack_70;
uStack_3c = uStack_70._4_4_;
local_38 = local_68;
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
(&local_a0,*(int8 *)(*(long *)(this + 0x10) + -8));
return 1;
}
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::operator++((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_80);
local_a0 = *(int8 *)(*(long *)(this + 0x10) + -8);
local_98 = 0;
uStack_90 = 0;
local_88 = 0x8000000000000000;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::set_end((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_a0);
cVar3 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_80,
(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_a0);
} while (cVar3 == '\0');
}
}
return 1;
}
pcVar4 = "!keep_stack.empty()";
uVar5 = 0x1bbe;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar5,
"GGML_ASSERT(%s) failed",pcVar4);
}
| |
47,173 | rak_string_new_with_capacity | fabiosvm[P]rak/src/string.c | RakString *rak_string_new_with_capacity(int cap, RakError *err)
{
RakString *str = rak_memory_alloc(sizeof(*str), err);
if (!rak_is_ok(err)) return NULL;
rak_string_init_with_capacity(str, cap, err);
if (rak_is_ok(err)) return str;
rak_memory_free(str);
return NULL;
} | O1 | c | rak_string_new_with_capacity:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
movl $0x18, %edi
callq 0x76e8
cmpb $0x1, (%r14)
jne 0x812d
movq %rax, %rbx
movl $0x0, (%rax)
movl $0x8, %eax
movl %eax, %r15d
leal (%r15,%r15), %eax
cmpl %ebp, %r15d
jl 0x80f7
movslq %r15d, %rdi
movq %r14, %rsi
callq 0x76e8
cmpb $0x1, (%r14)
jne 0x8125
movl %r15d, 0x8(%rbx)
movl $0x0, 0xc(%rbx)
movq %rax, 0x10(%rbx)
jmp 0x812f
movq %rbx, %rdi
callq 0x7748
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| rak_string_new_with_capacity:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov ebp, edi
mov edi, 18h
call rak_memory_alloc
cmp byte ptr [r14], 1
jnz short loc_812D
mov rbx, rax
mov dword ptr [rax], 0
mov eax, 8
loc_80F7:
mov r15d, eax
lea eax, [r15+r15]
cmp r15d, ebp
jl short loc_80F7
movsxd rdi, r15d
mov rsi, r14
call rak_memory_alloc
cmp byte ptr [r14], 1
jnz short loc_8125
mov [rbx+8], r15d
mov dword ptr [rbx+0Ch], 0
mov [rbx+10h], rax
jmp short loc_812F
loc_8125:
mov rdi, rbx
call rak_memory_free
loc_812D:
xor ebx, ebx
loc_812F:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long rak_string_new_with_capacity(int a1, _BYTE *a2)
{
_DWORD *v2; // rax
long long v3; // rbx
int v4; // eax
int v5; // r15d
long long v6; // rax
v2 = (_DWORD *)rak_memory_alloc(24LL, a2);
if ( *a2 != 1 )
return 0LL;
v3 = (long long)v2;
*v2 = 0;
v4 = 8;
do
{
v5 = v4;
v4 *= 2;
}
while ( v5 < a1 );
v6 = rak_memory_alloc(v5, a2);
if ( *a2 != 1 )
{
rak_memory_free(v3);
return 0LL;
}
*(_DWORD *)(v3 + 8) = v5;
*(_DWORD *)(v3 + 12) = 0;
*(_QWORD *)(v3 + 16) = v6;
return v3;
}
| rak_string_new_with_capacity:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV EBP,EDI
MOV EDI,0x18
CALL 0x001076e8
CMP byte ptr [R14],0x1
JNZ 0x0010812d
MOV RBX,RAX
MOV dword ptr [RAX],0x0
MOV EAX,0x8
LAB_001080f7:
MOV R15D,EAX
LEA EAX,[R15 + R15*0x1]
CMP R15D,EBP
JL 0x001080f7
MOVSXD RDI,R15D
MOV RSI,R14
CALL 0x001076e8
CMP byte ptr [R14],0x1
JNZ 0x00108125
MOV dword ptr [RBX + 0x8],R15D
MOV dword ptr [RBX + 0xc],0x0
MOV qword ptr [RBX + 0x10],RAX
JMP 0x0010812f
LAB_00108125:
MOV RDI,RBX
CALL 0x00107748
LAB_0010812d:
XOR EBX,EBX
LAB_0010812f:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 * rak_string_new_with_capacity(int param_1,char *param_2)
{
int iVar1;
int iVar2;
int4 *__ptr;
int8 uVar3;
__ptr = (int4 *)rak_memory_alloc(0x18);
if (*param_2 == '\x01') {
*__ptr = 0;
iVar1 = 8;
do {
iVar2 = iVar1;
iVar1 = iVar2 * 2;
} while (iVar2 < param_1);
uVar3 = rak_memory_alloc((long)iVar2,param_2);
if (*param_2 == '\x01') {
__ptr[2] = iVar2;
__ptr[3] = 0;
*(int8 *)(__ptr + 4) = uVar3;
return __ptr;
}
rak_memory_free(__ptr);
}
return (int4 *)0x0;
}
| |
47,174 | rak_string_new_with_capacity | fabiosvm[P]rak/src/string.c | RakString *rak_string_new_with_capacity(int cap, RakError *err)
{
RakString *str = rak_memory_alloc(sizeof(*str), err);
if (!rak_is_ok(err)) return NULL;
rak_string_init_with_capacity(str, cap, err);
if (rak_is_ok(err)) return str;
rak_memory_free(str);
return NULL;
} | O2 | c | rak_string_new_with_capacity:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
pushq $0x18
popq %rdi
callq 0x5f24
cmpb $0x1, (%r14)
jne 0x6797
movq %rax, %rbx
movq %rax, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x6643
cmpb $0x0, (%r14)
jne 0x6799
movq %rbx, %rdi
callq 0x5f84
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
| rak_string_new_with_capacity:
push rbp
push r14
push rbx
mov r14, rsi
mov ebp, edi
push 18h
pop rdi
call rak_memory_alloc
cmp byte ptr [r14], 1
jnz short loc_6797
mov rbx, rax
mov rdi, rax
mov esi, ebp
mov rdx, r14
call rak_string_init_with_capacity
cmp byte ptr [r14], 0
jnz short loc_6799
mov rdi, rbx
call rak_memory_free
loc_6797:
xor ebx, ebx
loc_6799:
mov rax, rbx
pop rbx
pop r14
pop rbp
retn
| long long rak_string_new_with_capacity(
int a1,
_BYTE *a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v10; // rax
double v11; // xmm4_8
double v12; // xmm5_8
long long v13; // rbx
v10 = rak_memory_alloc(a3, a4, a5, a6, a7, a8, a9, a10, 24LL, (long long)a2);
if ( *a2 != 1 )
return 0LL;
v13 = v10;
rak_string_init_with_capacity(v10, a1, a2, a3, a4, a5, a6, v11, v12, a9, a10);
if ( !*a2 )
{
rak_memory_free(v13);
return 0LL;
}
return v13;
}
| rak_string_new_with_capacity:
PUSH RBP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV EBP,EDI
PUSH 0x18
POP RDI
CALL 0x00105f24
CMP byte ptr [R14],0x1
JNZ 0x00106797
MOV RBX,RAX
MOV RDI,RAX
MOV ESI,EBP
MOV RDX,R14
CALL 0x00106643
CMP byte ptr [R14],0x0
JNZ 0x00106799
MOV RDI,RBX
CALL 0x00105f84
LAB_00106797:
XOR EBX,EBX
LAB_00106799:
MOV RAX,RBX
POP RBX
POP R14
POP RBP
RET
|
void * rak_string_new_with_capacity(int4 param_1,char *param_2)
{
void *__ptr;
__ptr = (void *)rak_memory_alloc(0x18);
if (*param_2 == '\x01') {
rak_string_init_with_capacity(__ptr,param_1,param_2);
if (*param_2 != '\0') {
return __ptr;
}
rak_memory_free(__ptr);
}
return (void *)0x0;
}
| |
47,175 | rak_string_new_with_capacity | fabiosvm[P]rak/src/string.c | RakString *rak_string_new_with_capacity(int cap, RakError *err)
{
RakString *str = rak_memory_alloc(sizeof(*str), err);
if (!rak_is_ok(err)) return NULL;
rak_string_init_with_capacity(str, cap, err);
if (rak_is_ok(err)) return str;
rak_memory_free(str);
return NULL;
} | O3 | c | rak_string_new_with_capacity:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
movl $0x18, %edi
callq 0x74a4
cmpb $0x1, (%r14)
jne 0x7e85
movq %rax, %rbx
movl $0x0, (%rax)
movl $0x8, %eax
movl %eax, %r15d
leal (%r15,%r15), %eax
cmpl %ebp, %r15d
jl 0x7e4f
movslq %r15d, %rdi
movq %r14, %rsi
callq 0x74a4
cmpb $0x1, (%r14)
jne 0x7e7d
movl %r15d, 0x8(%rbx)
movl $0x0, 0xc(%rbx)
movq %rax, 0x10(%rbx)
jmp 0x7e87
movq %rbx, %rdi
callq 0x7504
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| rak_string_new_with_capacity:
push rbp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov ebp, edi
mov edi, 18h
call rak_memory_alloc
cmp byte ptr [r14], 1
jnz short loc_7E85
mov rbx, rax
mov dword ptr [rax], 0
mov eax, 8
loc_7E4F:
mov r15d, eax
lea eax, [r15+r15]
cmp r15d, ebp
jl short loc_7E4F
movsxd rdi, r15d
mov rsi, r14
call rak_memory_alloc
cmp byte ptr [r14], 1
jnz short loc_7E7D
mov [rbx+8], r15d
mov dword ptr [rbx+0Ch], 0
mov [rbx+10h], rax
jmp short loc_7E87
loc_7E7D:
mov rdi, rbx
call rak_memory_free
loc_7E85:
xor ebx, ebx
loc_7E87:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long rak_string_new_with_capacity(int a1, _BYTE *a2)
{
_DWORD *v2; // rax
long long v3; // rbx
int v4; // eax
int v5; // r15d
long long v6; // rax
v2 = (_DWORD *)rak_memory_alloc(24LL, a2);
if ( *a2 != 1 )
return 0LL;
v3 = (long long)v2;
*v2 = 0;
v4 = 8;
do
{
v5 = v4;
v4 *= 2;
}
while ( v5 < a1 );
v6 = rak_memory_alloc(v5, a2);
if ( *a2 != 1 )
{
rak_memory_free(v3);
return 0LL;
}
*(_DWORD *)(v3 + 8) = v5;
*(_DWORD *)(v3 + 12) = 0;
*(_QWORD *)(v3 + 16) = v6;
return v3;
}
| rak_string_new_with_capacity:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV EBP,EDI
MOV EDI,0x18
CALL 0x001074a4
CMP byte ptr [R14],0x1
JNZ 0x00107e85
MOV RBX,RAX
MOV dword ptr [RAX],0x0
MOV EAX,0x8
LAB_00107e4f:
MOV R15D,EAX
LEA EAX,[R15 + R15*0x1]
CMP R15D,EBP
JL 0x00107e4f
MOVSXD RDI,R15D
MOV RSI,R14
CALL 0x001074a4
CMP byte ptr [R14],0x1
JNZ 0x00107e7d
MOV dword ptr [RBX + 0x8],R15D
MOV dword ptr [RBX + 0xc],0x0
MOV qword ptr [RBX + 0x10],RAX
JMP 0x00107e87
LAB_00107e7d:
MOV RDI,RBX
CALL 0x00107504
LAB_00107e85:
XOR EBX,EBX
LAB_00107e87:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 * rak_string_new_with_capacity(int param_1,char *param_2)
{
int iVar1;
int iVar2;
int4 *__ptr;
int8 uVar3;
__ptr = (int4 *)rak_memory_alloc(0x18);
if (*param_2 == '\x01') {
*__ptr = 0;
iVar1 = 8;
do {
iVar2 = iVar1;
iVar1 = iVar2 * 2;
} while (iVar2 < param_1);
uVar3 = rak_memory_alloc((long)iVar2,param_2);
if (*param_2 == '\x01') {
__ptr[2] = iVar2;
__ptr[3] = 0;
*(int8 *)(__ptr + 4) = uVar3;
return __ptr;
}
rak_memory_free(__ptr);
}
return (int4 *)0x0;
}
| |
47,176 | BC_add_object_ref1 | bluesky950520[P]quickjs/quickjs.c | static int BC_add_object_ref1(BCReaderState *s, JSObject *p)
{
if (s->allow_reference) {
if (js_resize_array(s->ctx, (void *)&s->objects,
sizeof(s->objects[0]),
&s->objects_size, s->objects_count + 1))
return -1;
s->objects[s->objects_count++] = p;
}
return 0;
} | O1 | c | BC_add_object_ref1:
xorl %eax, %eax
cmpb $0x0, 0x36(%rdi)
je 0x464b5
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x40(%rdi), %r8d
cmpl %r8d, 0x44(%rdi)
jle 0x464b6
movq 0x38(%r14), %rax
movslq 0x40(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x40(%r14)
movq %rbx, (%rax,%rcx,8)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x38(%r14), %rsi
leaq 0x44(%r14), %rcx
incl %r8d
movq (%r14), %rdi
movl $0x8, %edx
callq 0x428db
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x464ae
jmp 0x46499
| BC_add_object_ref1:
xor eax, eax
cmp byte ptr [rdi+36h], 0
jz short locret_464B5
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov r8d, [rdi+40h]
cmp [rdi+44h], r8d
jle short loc_464B6
loc_46499:
mov rax, [r14+38h]
movsxd rcx, dword ptr [r14+40h]
lea edx, [rcx+1]
mov [r14+40h], edx
mov [rax+rcx*8], rbx
xor eax, eax
loc_464AE:
add rsp, 8
pop rbx
pop r14
locret_464B5:
retn
loc_464B6:
lea rsi, [r14+38h]
lea rcx, [r14+44h]
inc r8d
mov rdi, [r14]
mov edx, 8
call js_realloc_array
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_464AE
jmp short loc_46499
| long long BC_add_object_ref1(long long a1, long long a2)
{
long long result; // rax
int v3; // r8d
long long v4; // rax
long long v5; // rcx
int v6; // ecx
result = 0LL;
if ( *(_BYTE *)(a1 + 54) )
{
v3 = *(_DWORD *)(a1 + 64);
if ( *(_DWORD *)(a1 + 68) > v3
|| (v6 = js_realloc_array(*(_QWORD *)a1, (long long *)(a1 + 56), 8u, (_DWORD *)(a1 + 68), v3 + 1),
result = 0xFFFFFFFFLL,
!v6) )
{
v4 = *(_QWORD *)(a1 + 56);
v5 = *(int *)(a1 + 64);
*(_DWORD *)(a1 + 64) = v5 + 1;
*(_QWORD *)(v4 + 8 * v5) = a2;
return 0LL;
}
}
return result;
}
| BC_add_object_ref1:
XOR EAX,EAX
CMP byte ptr [RDI + 0x36],0x0
JZ 0x001464b5
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV R8D,dword ptr [RDI + 0x40]
CMP dword ptr [RDI + 0x44],R8D
JLE 0x001464b6
LAB_00146499:
MOV RAX,qword ptr [R14 + 0x38]
MOVSXD RCX,dword ptr [R14 + 0x40]
LEA EDX,[RCX + 0x1]
MOV dword ptr [R14 + 0x40],EDX
MOV qword ptr [RAX + RCX*0x8],RBX
XOR EAX,EAX
LAB_001464ae:
ADD RSP,0x8
POP RBX
POP R14
LAB_001464b5:
RET
LAB_001464b6:
LEA RSI,[R14 + 0x38]
LEA RCX,[R14 + 0x44]
INC R8D
MOV RDI,qword ptr [R14]
MOV EDX,0x8
CALL 0x001428db
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x001464ae
JMP 0x00146499
|
int8 BC_add_object_ref1(int8 *param_1,int8 param_2)
{
int iVar1;
int8 in_R9;
if (*(char *)((long)param_1 + 0x36) != '\0') {
if ((*(int *)((long)param_1 + 0x44) <= *(int *)(param_1 + 8)) &&
(iVar1 = js_realloc_array(*param_1,param_1 + 7,8,(long)param_1 + 0x44,
*(int *)(param_1 + 8) + 1,in_R9,0), iVar1 != 0)) {
return 0xffffffff;
}
iVar1 = *(int *)(param_1 + 8);
*(int *)(param_1 + 8) = iVar1 + 1;
*(int8 *)(param_1[7] + (long)iVar1 * 8) = param_2;
}
return 0;
}
| |
47,177 | BC_add_object_ref1 | bluesky950520[P]quickjs/quickjs.c | static int BC_add_object_ref1(BCReaderState *s, JSObject *p)
{
if (s->allow_reference) {
if (js_resize_array(s->ctx, (void *)&s->objects,
sizeof(s->objects[0]),
&s->objects_size, s->objects_count + 1))
return -1;
s->objects[s->objects_count++] = p;
}
return 0;
} | O3 | c | BC_add_object_ref1:
xorl %eax, %eax
cmpb $0x0, 0x36(%rdi)
je 0x4809c
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x40(%rdi), %r8d
cmpl %r8d, 0x44(%rdi)
jle 0x4809d
movq 0x38(%r14), %rax
leal 0x1(%r8), %ecx
movl %ecx, 0x40(%r14)
movslq %r8d, %rcx
movq %rbx, (%rax,%rcx,8)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x38(%r14), %rsi
leaq 0x44(%r14), %rcx
incl %r8d
movq (%r14), %rdi
movl $0x8, %edx
callq 0x444ee
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x48095
movl 0x40(%r14), %r8d
jmp 0x48080
| BC_add_object_ref1:
xor eax, eax
cmp byte ptr [rdi+36h], 0
jz short locret_4809C
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov r8d, [rdi+40h]
cmp [rdi+44h], r8d
jle short loc_4809D
loc_48080:
mov rax, [r14+38h]
lea ecx, [r8+1]
mov [r14+40h], ecx
movsxd rcx, r8d
mov [rax+rcx*8], rbx
xor eax, eax
loc_48095:
add rsp, 8
pop rbx
pop r14
locret_4809C:
retn
loc_4809D:
lea rsi, [r14+38h]
lea rcx, [r14+44h]
inc r8d
mov rdi, [r14]
mov edx, 8
call js_realloc_array
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_48095
mov r8d, [r14+40h]
jmp short loc_48080
| long long BC_add_object_ref1(long long a1, long long a2)
{
long long result; // rax
int v3; // r8d
long long v4; // rax
int v5; // ecx
result = 0LL;
if ( *(_BYTE *)(a1 + 54) )
{
v3 = *(_DWORD *)(a1 + 64);
if ( *(_DWORD *)(a1 + 68) > v3 )
{
LABEL_3:
v4 = *(_QWORD *)(a1 + 56);
*(_DWORD *)(a1 + 64) = v3 + 1;
*(_QWORD *)(v4 + 8LL * v3) = a2;
return 0LL;
}
v5 = js_realloc_array(*(_QWORD *)a1, (long long *)(a1 + 56), 8u, (_DWORD *)(a1 + 68), v3 + 1);
result = 0xFFFFFFFFLL;
if ( !v5 )
{
v3 = *(_DWORD *)(a1 + 64);
goto LABEL_3;
}
}
return result;
}
| BC_add_object_ref1:
XOR EAX,EAX
CMP byte ptr [RDI + 0x36],0x0
JZ 0x0014809c
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV R8D,dword ptr [RDI + 0x40]
CMP dword ptr [RDI + 0x44],R8D
JLE 0x0014809d
LAB_00148080:
MOV RAX,qword ptr [R14 + 0x38]
LEA ECX,[R8 + 0x1]
MOV dword ptr [R14 + 0x40],ECX
MOVSXD RCX,R8D
MOV qword ptr [RAX + RCX*0x8],RBX
XOR EAX,EAX
LAB_00148095:
ADD RSP,0x8
POP RBX
POP R14
LAB_0014809c:
RET
LAB_0014809d:
LEA RSI,[R14 + 0x38]
LEA RCX,[R14 + 0x44]
INC R8D
MOV RDI,qword ptr [R14]
MOV EDX,0x8
CALL 0x001444ee
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x00148095
MOV R8D,dword ptr [R14 + 0x40]
JMP 0x00148080
|
int8 BC_add_object_ref1(int8 *param_1,int8 param_2)
{
int iVar1;
int8 in_R9;
if (*(char *)((long)param_1 + 0x36) != '\0') {
iVar1 = *(int *)(param_1 + 8);
if (*(int *)((long)param_1 + 0x44) <= iVar1) {
iVar1 = js_realloc_array(*param_1,param_1 + 7,8,(long)param_1 + 0x44,iVar1 + 1,in_R9,0);
if (iVar1 != 0) {
return 0xffffffff;
}
iVar1 = *(int *)(param_1 + 8);
}
*(int *)(param_1 + 8) = iVar1 + 1;
*(int8 *)(param_1[7] + (long)iVar1 * 8) = param_2;
}
return 0;
}
| |
47,178 | js_number_toFixed | bluesky950520[P]quickjs/quickjs.c | static JSValue js_number_toFixed(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue val;
int f;
double d;
val = js_thisNumberValue(ctx, this_val);
if (JS_IsException(val))
return val;
if (JS_ToFloat64Free(ctx, &d, val))
return JS_EXCEPTION;
if (JS_ToInt32Sat(ctx, &f, argv[0]))
return JS_EXCEPTION;
if (f < 0 || f > 100) {
return JS_ThrowRangeError(ctx, "toFixed() digits argument must be between 0 and 100");
}
if (fabs(d) >= 1e21) {
// use ToString(d)
return js_dtoa(ctx, d, 0, JS_DTOA_TOSTRING);
} else {
return js_dtoa(ctx, d, f, JS_DTOA_FIXED);
}
} | O0 | c | js_number_toFixed:
subq $0x68, %rsp
movq %rsi, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq %rdi, 0x40(%rsp)
movl %ecx, 0x3c(%rsp)
movq %r8, 0x30(%rsp)
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0xd1ae0
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0xd1539
movq 0x20(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0xd1632
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
leaq 0x10(%rsp), %rsi
callq 0x385f0
cmpl $0x0, %eax
je 0xd156d
movl $0x0, 0x58(%rsp)
movq $0x6, 0x60(%rsp)
jmp 0xd1632
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x1c(%rsp), %rsi
callq 0x38680
cmpl $0x0, %eax
je 0xd15a3
movl $0x0, 0x58(%rsp)
movq $0x6, 0x60(%rsp)
jmp 0xd1632
cmpl $0x0, 0x1c(%rsp)
jl 0xd15b1
cmpl $0x64, 0x1c(%rsp)
jle 0xd15d0
movq 0x40(%rsp), %rdi
leaq 0x3f9f9(%rip), %rsi # 0x110fb6
movb $0x0, %al
callq 0x29670
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
jmp 0xd1632
movsd 0x10(%rsp), %xmm0
movaps 0x3c373(%rip), %xmm1 # 0x10d950
pand %xmm1, %xmm0
movsd 0x3c327(%rip), %xmm1 # 0x10d910
ucomisd %xmm1, %xmm0
jb 0xd160f
movq 0x40(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
xorl %edx, %edx
movl %edx, %esi
callq 0x39650
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
jmp 0xd1632
movq 0x40(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
movl 0x1c(%rsp), %esi
movl $0x2, %edx
callq 0x39650
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rdx
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
| js_number_toFixed:
sub rsp, 68h
mov [rsp+68h+var_20], rsi
mov [rsp+68h+var_18], rdx
mov [rsp+68h+var_28], rdi
mov [rsp+68h+var_2C], ecx
mov [rsp+68h+var_38], r8
mov rdi, [rsp+68h+var_28]
mov rsi, [rsp+68h+var_20]
mov rdx, [rsp+68h+var_18]
call js_thisNumberValue
mov [rsp+68h+var_68], rax
mov [rsp+68h+var_60], rdx
mov rax, [rsp+68h+var_68]
mov [rsp+68h+var_48], rax
mov rax, [rsp+68h+var_60]
mov [rsp+68h+var_40], rax
mov rdi, [rsp+68h+var_48]
mov rsi, [rsp+68h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_D1539
mov rax, [rsp+68h+var_48]
mov [rsp+68h+var_10], rax
mov rax, [rsp+68h+var_40]
mov [rsp+68h+var_8], rax
jmp loc_D1632
loc_D1539:
mov rdi, [rsp+68h+var_28]
mov rdx, [rsp+68h+var_48]
mov rcx, [rsp+68h+var_40]
lea rsi, [rsp+68h+var_58]
call JS_ToFloat64Free
cmp eax, 0
jz short loc_D156D
mov dword ptr [rsp+68h+var_10], 0
mov [rsp+68h+var_8], 6
jmp loc_D1632
loc_D156D:
mov rdi, [rsp+68h+var_28]
mov rax, [rsp+68h+var_38]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+68h+var_4C]
call JS_ToInt32Sat
cmp eax, 0
jz short loc_D15A3
mov dword ptr [rsp+68h+var_10], 0
mov [rsp+68h+var_8], 6
jmp loc_D1632
loc_D15A3:
cmp [rsp+68h+var_4C], 0
jl short loc_D15B1
cmp [rsp+68h+var_4C], 64h ; 'd'
jle short loc_D15D0
loc_D15B1:
mov rdi, [rsp+68h+var_28]
lea rsi, aTofixedDigitsA; "toFixed() digits argument must be betwe"...
mov al, 0
call JS_ThrowRangeError
mov [rsp+68h+var_10], rax
mov [rsp+68h+var_8], rdx
jmp short loc_D1632
loc_D15D0:
movsd xmm0, [rsp+68h+var_58]
movaps xmm1, cs:xmmword_10D950
pand xmm0, xmm1
movsd xmm1, cs:qword_10D910
ucomisd xmm0, xmm1
jb short loc_D160F
mov rdi, [rsp+68h+var_28]
movsd xmm0, [rsp+68h+var_58]
xor edx, edx
mov esi, edx
call js_dtoa
mov [rsp+68h+var_10], rax
mov [rsp+68h+var_8], rdx
jmp short loc_D1632
loc_D160F:
mov rdi, [rsp+68h+var_28]
movsd xmm0, [rsp+68h+var_58]
mov esi, [rsp+68h+var_4C]
mov edx, 2
call js_dtoa
mov [rsp+68h+var_10], rax
mov [rsp+68h+var_8], rdx
loc_D1632:
mov rax, [rsp+68h+var_10]
mov rdx, [rsp+68h+var_8]
add rsp, 68h
retn
| long long js_number_toFixed(
long long a1,
long long a2,
long long a3,
int a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v13; // rdx
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
__m128 v18; // xmm4
__m128 v19; // xmm5
long long v20; // rdx
long long v21; // rdx
long long v23; // [rsp+0h] [rbp-68h]
double v24; // [rsp+10h] [rbp-58h] BYREF
unsigned int v25; // [rsp+1Ch] [rbp-4Ch] BYREF
long long v26; // [rsp+20h] [rbp-48h]
long long v27; // [rsp+28h] [rbp-40h]
long long v28; // [rsp+30h] [rbp-38h]
int v29; // [rsp+3Ch] [rbp-2Ch]
long long v30; // [rsp+40h] [rbp-28h]
long long v31; // [rsp+48h] [rbp-20h]
long long v32; // [rsp+50h] [rbp-18h]
long long v33; // [rsp+58h] [rbp-10h]
long long v34; // [rsp+60h] [rbp-8h]
v31 = a2;
v32 = a3;
v30 = a1;
v29 = a4;
v28 = a5;
v23 = js_thisNumberValue(a1, a2, a3);
v26 = v23;
v27 = v13;
if ( JS_IsException_1(v23, v13) )
{
v33 = v26;
v34 = v27;
}
else if ( (unsigned int)JS_ToFloat64Free(v30, &v24, v26, v27) )
{
LODWORD(v33) = 0;
v34 = 6LL;
}
else if ( (unsigned int)JS_ToInt32Sat(v30, (long long)&v25, *(_DWORD **)v28, *(_QWORD *)(v28 + 8)) )
{
LODWORD(v33) = 0;
v34 = 6LL;
}
else if ( v25 <= 0x64 )
{
if ( *(double *)_mm_and_si128((__m128i)*(unsigned long long *)&v24, (__m128i)xmmword_10D950).m128i_i64 < 1.0e21 )
v33 = js_dtoa(v30, v25, 2, v24);
else
v33 = js_dtoa(v30, 0, 0, v24);
v34 = v21;
}
else
{
v33 = JS_ThrowRangeError(
v30,
(long long)"toFixed() digits argument must be between 0 and 100",
v14,
v15,
v16,
v17,
a6,
a7,
a8,
a9,
v18,
v19,
a12,
a13,
v23);
v34 = v20;
}
return v33;
}
| js_number_toFixed:
SUB RSP,0x68
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RSP + 0x40],RDI
MOV dword ptr [RSP + 0x3c],ECX
MOV qword ptr [RSP + 0x30],R8
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
CALL 0x001d1ae0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001d1539
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001d1632
LAB_001d1539:
MOV RDI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x10]
CALL 0x001385f0
CMP EAX,0x0
JZ 0x001d156d
MOV dword ptr [RSP + 0x58],0x0
MOV qword ptr [RSP + 0x60],0x6
JMP 0x001d1632
LAB_001d156d:
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x1c]
CALL 0x00138680
CMP EAX,0x0
JZ 0x001d15a3
MOV dword ptr [RSP + 0x58],0x0
MOV qword ptr [RSP + 0x60],0x6
JMP 0x001d1632
LAB_001d15a3:
CMP dword ptr [RSP + 0x1c],0x0
JL 0x001d15b1
CMP dword ptr [RSP + 0x1c],0x64
JLE 0x001d15d0
LAB_001d15b1:
MOV RDI,qword ptr [RSP + 0x40]
LEA RSI,[0x210fb6]
MOV AL,0x0
CALL 0x00129670
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RDX
JMP 0x001d1632
LAB_001d15d0:
MOVSD XMM0,qword ptr [RSP + 0x10]
MOVAPS XMM1,xmmword ptr [0x0020d950]
PAND XMM0,XMM1
MOVSD XMM1,qword ptr [0x0020d910]
UCOMISD XMM0,XMM1
JC 0x001d160f
MOV RDI,qword ptr [RSP + 0x40]
MOVSD XMM0,qword ptr [RSP + 0x10]
XOR EDX,EDX
MOV ESI,EDX
CALL 0x00139650
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RDX
JMP 0x001d1632
LAB_001d160f:
MOV RDI,qword ptr [RSP + 0x40]
MOVSD XMM0,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x1c]
MOV EDX,0x2
CALL 0x00139650
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RDX
LAB_001d1632:
MOV RAX,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
ADD RSP,0x68
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16]
js_number_toFixed(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int iVar1;
int1 auVar2 [16];
ulong local_58;
int local_4c;
int1 local_48 [16];
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_48 = js_thisNumberValue(param_1,param_2,param_3);
iVar1 = JS_IsException(local_48._0_8_,local_48._8_8_);
if (iVar1 == 0) {
iVar1 = JS_ToFloat64Free(local_28,&local_58,local_48._0_8_,local_48._8_8_);
if (iVar1 == 0) {
iVar1 = JS_ToInt32Sat(local_28,&local_4c,*local_38,local_38[1]);
if (iVar1 == 0) {
if ((local_4c < 0) || (100 < local_4c)) {
auVar2 = JS_ThrowRangeError(local_28,"toFixed() digits argument must be between 0 and 100"
);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
}
else if ((double)(local_58 & _DAT_0020d950) < DAT_0020d910) {
auVar2 = js_dtoa(local_58,local_28,local_4c,2);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
}
else {
auVar2 = js_dtoa(local_58,local_28,0);
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
}
}
else {
local_10 = 0;
local_8 = 6;
}
}
else {
local_10 = 0;
local_8 = 6;
}
}
else {
local_10 = local_48._0_4_;
uStack_c = local_48._4_4_;
local_8 = local_48._8_8_;
}
auVar2._4_4_ = uStack_c;
auVar2._0_4_ = local_10;
auVar2._8_8_ = local_8;
return auVar2;
}
| |
47,179 | js_number_toFixed | bluesky950520[P]quickjs/quickjs.c | static JSValue js_number_toFixed(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue val;
int f;
double d;
val = js_thisNumberValue(ctx, this_val);
if (JS_IsException(val))
return val;
if (JS_ToFloat64Free(ctx, &d, val))
return JS_EXCEPTION;
if (JS_ToInt32Sat(ctx, &f, argv[0]))
return JS_EXCEPTION;
if (f < 0 || f > 100) {
return JS_ThrowRangeError(ctx, "toFixed() digits argument must be between 0 and 100");
}
if (fabs(d) >= 1e21) {
// use ToString(d)
return js_dtoa(ctx, d, 0, JS_DTOA_TOSTRING);
} else {
return js_dtoa(ctx, d, f, JS_DTOA_FIXED);
}
} | O1 | c | js_number_toFixed:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movq %rdi, %r14
callq 0x7a70b
movq %rax, %r15
movq %rdx, %rbx
cmpl $0x6, %ebx
jne 0x7a05f
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %r12
andq %rax, %r12
jmp 0x7a0d1
cmpl $0x2, %ebx
ja 0x7a071
cvtsi2sd %r15d, %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x7a09b
cmpl $0x7, %ebx
jne 0x7a07d
movq %r15, 0x8(%rsp)
jmp 0x7a09b
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3df2f
testl %eax, %eax
je 0x7a09b
movl $0x6, %ebx
jmp 0x7a0cb
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %rdx, 0x10(%rsp)
cmpl $-0x9, %ecx
jb 0x7a0b5
movq 0x10(%rsp), %rax
incl (%rax)
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x276c3
movl $0x6, %ebx
testl %eax, %eax
je 0x7a0e6
xorl %r15d, %r15d
xorl %r12d, %r12d
movl %r15d, %eax
orq %r12, %rax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl 0x10(%rsp), %esi
cmpl $0x65, %esi
jb 0x7a105
leaq 0x27e45(%rip), %rsi # 0xa1f3b
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x20add
jmp 0x7a0ce
movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000
movsd 0x8(%rsp), %xmm0
movapd 0x24653(%rip), %xmm1 # 0x9e770
andpd %xmm0, %xmm1
movq %r14, %rdi
ucomisd 0x2481c(%rip), %xmm1 # 0x9e948
jae 0x7a135
movl $0x2, %edx
jmp 0x7a139
xorl %esi, %esi
xorl %edx, %edx
callq 0x27ce7
movq %rax, %r15
movq %rdx, %rbx
jmp 0x7a05a
| js_number_toFixed:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov r12, r8
mov r14, rdi
call js_thisNumberValue
mov r15, rax
mov rbx, rdx
cmp ebx, 6
jnz short loc_7A05F
mov rax, 0FFFFFFFF00000000h
mov r12, r15
loc_7A05A:
and r12, rax
jmp short loc_7A0D1
loc_7A05F:
cmp ebx, 2
ja short loc_7A071
cvtsi2sd xmm0, r15d
movsd [rsp+38h+var_30], xmm0
jmp short loc_7A09B
loc_7A071:
cmp ebx, 7
jnz short loc_7A07D
mov [rsp+38h+var_30], r15
jmp short loc_7A09B
loc_7A07D:
lea rsi, [rsp+38h+var_30]
mov rdi, r14
mov rdx, r15
mov rcx, rbx
call __JS_ToFloat64Free
test eax, eax
jz short loc_7A09B
mov ebx, 6
jmp short loc_7A0CB
loc_7A09B:
mov rdx, [r12]
mov rcx, [r12+8]
mov [rsp+38h+var_28], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_7A0B5
mov rax, [rsp+38h+var_28]
inc dword ptr [rax]
loc_7A0B5:
lea rsi, [rsp+38h+var_28]
mov rdi, r14
call JS_ToInt32SatFree
mov ebx, 6
test eax, eax
jz short loc_7A0E6
loc_7A0CB:
xor r15d, r15d
loc_7A0CE:
xor r12d, r12d
loc_7A0D1:
mov eax, r15d
or rax, r12
mov rdx, rbx
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
loc_7A0E6:
mov esi, dword ptr [rsp+38h+var_28]
cmp esi, 65h ; 'e'
jb short loc_7A105
lea rsi, aTofixedDigitsA; "toFixed() digits argument must be betwe"...
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowRangeError
jmp short loc_7A0CE
loc_7A105:
mov r12, 0FFFFFFFF00000000h
movsd xmm0, [rsp+38h+var_30]
movapd xmm1, cs:xmmword_9E770
andpd xmm1, xmm0
mov rdi, r14
ucomisd xmm1, cs:qword_9E948
jnb short loc_7A135
mov edx, 2
jmp short loc_7A139
loc_7A135:
xor esi, esi
xor edx, edx
loc_7A139:
call js_dtoa
mov r15, rax
mov rbx, rdx
jmp loc_7A05A
| unsigned long long js_number_toFixed(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13)
{
long long v14; // rax
long long v15; // rdx
unsigned long long v16; // r15
long long v17; // rax
unsigned long long v18; // r12
unsigned long long v19; // r12
long long v20; // rdx
long long v21; // rcx
long long v22; // rdx
long long v23; // rcx
long long v24; // r8
long long v25; // r9
__m128 v26; // xmm4
__m128 v27; // xmm5
int v29; // esi
int v30; // edx
char v31; // [rsp+0h] [rbp-38h]
double v32; // [rsp+8h] [rbp-30h] BYREF
int v33[10]; // [rsp+10h] [rbp-28h] BYREF
v14 = js_thisNumberValue();
v16 = v14;
if ( (_DWORD)v15 != 6 )
{
if ( (unsigned int)v15 > 2 )
{
if ( (_DWORD)v15 == 7 )
{
v32 = *(double *)&v14;
}
else if ( (unsigned int)_JS_ToFloat64Free(a1, (long long *)&v32, v14, v15) )
{
goto LABEL_12;
}
}
else
{
*(double *)a2.m128_u64 = (double)(int)v14;
v32 = (double)(int)v14;
}
v20 = *a13;
v21 = a13[1];
*(_QWORD *)v33 = *a13;
if ( (unsigned int)v21 >= 0xFFFFFFF7 )
++**(_DWORD **)v33;
if ( !(unsigned int)JS_ToInt32SatFree(a1, v33, v20, v21) )
{
v29 = v33[0];
if ( v33[0] < 0x65u )
{
v18 = 0xFFFFFFFF00000000LL;
if ( fabs(v32) >= 1.0e21 )
{
v29 = 0;
v30 = 0;
}
else
{
v30 = 2;
}
v17 = js_dtoa(a1, v29, v30, (__m128i)*(unsigned long long *)&v32);
LODWORD(v16) = v17;
goto LABEL_3;
}
LODWORD(v16) = 0;
JS_ThrowRangeError(
a1,
(long long)"toFixed() digits argument must be between 0 and 100",
v22,
v23,
v24,
v25,
a2,
a3,
a4,
a5,
v26,
v27,
a8,
a9,
v31);
LABEL_13:
v19 = 0LL;
return v19 | (unsigned int)v16;
}
LABEL_12:
LODWORD(v16) = 0;
goto LABEL_13;
}
v17 = 0xFFFFFFFF00000000LL;
v18 = v16;
LABEL_3:
v19 = v17 & v18;
return v19 | (unsigned int)v16;
}
| |||
47,180 | js_number_toFixed | bluesky950520[P]quickjs/quickjs.c | static JSValue js_number_toFixed(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue val;
int f;
double d;
val = js_thisNumberValue(ctx, this_val);
if (JS_IsException(val))
return val;
if (JS_ToFloat64Free(ctx, &d, val))
return JS_EXCEPTION;
if (JS_ToInt32Sat(ctx, &f, argv[0]))
return JS_EXCEPTION;
if (f < 0 || f > 100) {
return JS_ThrowRangeError(ctx, "toFixed() digits argument must be between 0 and 100");
}
if (fabs(d) >= 1e21) {
// use ToString(d)
return js_dtoa(ctx, d, 0, JS_DTOA_TOSTRING);
} else {
return js_dtoa(ctx, d, f, JS_DTOA_FIXED);
}
} | O2 | c | js_number_toFixed:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movq %rdi, %r15
callq 0x66e80
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
jne 0x668ae
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r14, %r12
andq %rax, %r12
jmp 0x668e8
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x21288
pushq $0x6
popq %rbx
testl %eax, %eax
jne 0x668e2
movq (%r12), %rdx
movq 0x8(%r12), %rcx
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
callq 0x2133d
testl %eax, %eax
je 0x668fd
xorl %r14d, %r14d
xorl %r12d, %r12d
movl %r14d, %eax
orq %r12, %rax
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl 0xc(%rsp), %esi
cmpl $0x65, %esi
jb 0x6691c
leaq 0x22568(%rip), %rsi # 0x88e75
xorl %r14d, %r14d
movq %r15, %rdi
xorl %eax, %eax
callq 0x1acb3
jmp 0x668e5
movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000
movsd 0x10(%rsp), %xmm0
movapd 0x1edcc(%rip), %xmm1 # 0x85700
andpd %xmm0, %xmm1
ucomisd 0x1ef58(%rip), %xmm1 # 0x85898
jae 0x6694a
pushq $0x2
popq %rdx
movq %r15, %rdi
jmp 0x66951
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2187c
movq %rax, %r14
movq %rdx, %rbx
jmp 0x668a9
| js_number_toFixed:
push r15
push r14
push r12
push rbx
sub rsp, 18h
mov r12, r8
mov r15, rdi
call js_thisNumberValue
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jnz short loc_668AE
mov rax, 0FFFFFFFF00000000h
mov r12, r14
loc_668A9:
and r12, rax
jmp short loc_668E8
loc_668AE:
lea rsi, [rsp+38h+var_28]
mov rdi, r15
mov rdx, r14
mov rcx, rbx
call JS_ToFloat64Free
push 6
pop rbx
test eax, eax
jnz short loc_668E2
mov rdx, [r12]
mov rcx, [r12+8]
lea rsi, [rsp+38h+var_2C]
mov rdi, r15
call JS_ToInt32Sat
test eax, eax
jz short loc_668FD
loc_668E2:
xor r14d, r14d
loc_668E5:
xor r12d, r12d
loc_668E8:
mov eax, r14d
or rax, r12
mov rdx, rbx
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
loc_668FD:
mov esi, [rsp+38h+var_2C]
cmp esi, 65h ; 'e'
jb short loc_6691C
lea rsi, aTofixedDigitsA; "toFixed() digits argument must be betwe"...
xor r14d, r14d
mov rdi, r15
xor eax, eax
call JS_ThrowRangeError
jmp short loc_668E5
loc_6691C:
mov r12, 0FFFFFFFF00000000h
movsd xmm0, [rsp+38h+var_28]
movapd xmm1, cs:xmmword_85700
andpd xmm1, xmm0
ucomisd xmm1, cs:qword_85898
jnb short loc_6694A
push 2
pop rdx
mov rdi, r15
jmp short loc_66951
loc_6694A:
mov rdi, r15
xor esi, esi
xor edx, edx
loc_66951:
call js_dtoa
mov r14, rax
mov rbx, rdx
jmp loc_668A9
| unsigned long long js_number_toFixed(
const char *a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13)
{
long long v14; // rax
long long v15; // rdx
unsigned long long v16; // r14
long long v17; // rax
unsigned long long v18; // r12
unsigned long long v19; // r12
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
long long v23; // r9
__m128 v24; // xmm4
__m128 v25; // xmm5
int v27; // esi
int v28; // edx
char v29; // [rsp+0h] [rbp-38h]
unsigned int v30; // [rsp+Ch] [rbp-2Ch] BYREF
unsigned long long v31[5]; // [rsp+10h] [rbp-28h] BYREF
v14 = js_thisNumberValue();
v16 = v14;
if ( (_DWORD)v15 != 6 )
{
if ( (unsigned int)JS_ToFloat64Free(a1, (double *)v31, v14, v15)
|| (unsigned int)JS_ToInt32Sat((long long)a1, (long long)&v30, *(_DWORD **)a13, *(_QWORD *)(a13 + 8)) )
{
LODWORD(v16) = 0;
}
else
{
v27 = v30;
if ( v30 < 0x65 )
{
v18 = 0xFFFFFFFF00000000LL;
if ( fabs(*(double *)v31) >= 1.0e21 )
{
v27 = 0;
v28 = 0;
}
else
{
v28 = 2;
}
v17 = js_dtoa((long long)a1, v27, v28, (__m128i)v31[0]);
LODWORD(v16) = v17;
goto LABEL_3;
}
LODWORD(v16) = 0;
JS_ThrowRangeError(
(long long)a1,
(long long)"toFixed() digits argument must be between 0 and 100",
v20,
v21,
v22,
v23,
a2,
a3,
a4,
a5,
v24,
v25,
a8,
a9,
v29);
}
v19 = 0LL;
return v19 | (unsigned int)v16;
}
v17 = 0xFFFFFFFF00000000LL;
v18 = v16;
LABEL_3:
v19 = v17 & v18;
return v19 | (unsigned int)v16;
}
| js_number_toFixed:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,R8
MOV R15,RDI
CALL 0x00166e80
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JNZ 0x001668ae
MOV RAX,-0x100000000
MOV R12,R14
LAB_001668a9:
AND R12,RAX
JMP 0x001668e8
LAB_001668ae:
LEA RSI,[RSP + 0x10]
MOV RDI,R15
MOV RDX,R14
MOV RCX,RBX
CALL 0x00121288
PUSH 0x6
POP RBX
TEST EAX,EAX
JNZ 0x001668e2
MOV RDX,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
LEA RSI,[RSP + 0xc]
MOV RDI,R15
CALL 0x0012133d
TEST EAX,EAX
JZ 0x001668fd
LAB_001668e2:
XOR R14D,R14D
LAB_001668e5:
XOR R12D,R12D
LAB_001668e8:
MOV EAX,R14D
OR RAX,R12
MOV RDX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001668fd:
MOV ESI,dword ptr [RSP + 0xc]
CMP ESI,0x65
JC 0x0016691c
LEA RSI,[0x188e75]
XOR R14D,R14D
MOV RDI,R15
XOR EAX,EAX
CALL 0x0011acb3
JMP 0x001668e5
LAB_0016691c:
MOV R12,-0x100000000
MOVSD XMM0,qword ptr [RSP + 0x10]
MOVAPD XMM1,xmmword ptr [0x00185700]
ANDPD XMM1,XMM0
UCOMISD XMM1,qword ptr [0x00185898]
JNC 0x0016694a
PUSH 0x2
POP RDX
MOV RDI,R15
JMP 0x00166951
LAB_0016694a:
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
LAB_00166951:
CALL 0x0012187c
MOV R14,RAX
MOV RBX,RDX
JMP 0x001668a9
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16] js_number_toFixed(int8 param_1)
{
int iVar1;
ulong uVar2;
int8 uVar3;
int8 *in_R8;
ulong uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
uint local_2c;
ulong local_28;
auVar5 = js_thisNumberValue();
if (auVar5._8_4_ == 6) {
uVar2 = 0xffffffff00000000;
uVar4 = auVar5._0_8_;
LAB_001668a9:
uVar3 = auVar5._8_8_;
uVar2 = auVar5._0_8_ & uVar2;
}
else {
iVar1 = JS_ToFloat64Free(param_1,&local_28,auVar5._0_8_,auVar5._8_8_);
uVar3 = 6;
if ((iVar1 == 0) && (iVar1 = JS_ToInt32Sat(param_1,&local_2c,*in_R8,in_R8[1]), iVar1 == 0)) {
if (local_2c < 0x65) {
if (_DAT_00185898 <= (double)(_DAT_00185700 & local_28)) {
local_2c = 0;
uVar3 = 0;
}
else {
uVar3 = 2;
}
auVar6 = js_dtoa(param_1,local_2c,uVar3);
auVar5._8_8_ = auVar6._8_8_;
auVar5._0_8_ = 0xffffffff00000000;
uVar2 = auVar6._0_8_;
uVar4 = uVar2;
goto LAB_001668a9;
}
JS_ThrowRangeError(param_1,"toFixed() digits argument must be between 0 and 100");
}
uVar4 = 0;
uVar2 = 0;
}
auVar6._0_8_ = uVar4 & 0xffffffff | uVar2;
auVar6._8_8_ = uVar3;
return auVar6;
}
| |
47,181 | thr_abort_locks | eloqsql/mysys/thr_lock.c | void thr_abort_locks(THR_LOCK *lock, my_bool upgrade_lock)
{
THR_LOCK_DATA *data;
DBUG_ENTER("thr_abort_locks");
mysql_mutex_lock(&lock->mutex);
for (data=lock->read_wait.data; data ; data=data->next)
{
data->type=TL_UNLOCK; /* Mark killed */
/* It's safe to signal the cond first: we're still holding the mutex. */
mysql_cond_signal(data->cond);
data->cond=0; /* Removed from list */
}
for (data=lock->write_wait.data; data ; data=data->next)
{
data->type=TL_UNLOCK;
mysql_cond_signal(data->cond);
data->cond=0;
}
lock->read_wait.last= &lock->read_wait.data;
lock->write_wait.last= &lock->write_wait.data;
lock->read_wait.data=lock->write_wait.data=0;
if (upgrade_lock && lock->write.data)
lock->write.data->type=TL_WRITE_ONLY;
mysql_mutex_unlock(&lock->mutex);
DBUG_VOID_RETURN;
} | O3 | c | thr_abort_locks:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, -0x2c(%rbp)
movq %rdi, %r14
addq $0x18, %rdi
cmpq $0x0, 0x58(%r14)
movq %rdi, -0x38(%rbp)
jne 0xa31cf
callq 0x29220
movq 0x60(%r14), %r15
testq %r15, %r15
je 0xa312a
leaq 0x2e2f22(%rip), %rbx # 0x386010
movl $0x0, 0x40(%r15)
movq 0x20(%r15), %r12
movq 0x30(%r12), %rdi
testq %rdi, %rdi
jne 0xa311f
movq %r12, %rdi
callq 0x295c0
movq $0x0, 0x20(%r15)
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0xa30ee
jmp 0xa312a
movq (%rbx), %rax
callq *0x170(%rax)
jmp 0xa3104
leaq 0x60(%r14), %r13
leaq 0x80(%r14), %r15
movq 0x80(%r14), %rbx
testq %rbx, %rbx
je 0xa317e
movl $0x0, 0x40(%rbx)
movq 0x20(%rbx), %r12
movq 0x30(%r12), %rdi
testq %rdi, %rdi
jne 0xa316c
movq %r12, %rdi
callq 0x295c0
movq $0x0, 0x20(%rbx)
movq 0x8(%rbx), %rbx
jmp 0xa313c
leaq 0x2e2e9d(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x170(%rax)
jmp 0xa3156
movq %r13, 0x68(%r14)
movq %r15, 0x88(%r14)
xorl %eax, %eax
movq %rax, 0x80(%r14)
movq %rax, 0x60(%r14)
cmpb $0x0, -0x2c(%rbp)
je 0xa31af
movq 0x90(%r14), %rax
testq %rax, %rax
je 0xa31af
movl $0xe, 0x40(%rax)
movq 0x58(%r14), %rdi
testq %rdi, %rdi
jne 0xa31e5
movq -0x38(%rbp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x291e0
leaq 0x3932c(%rip), %rsi # 0xdc502
movl $0x520, %edx # imm = 0x520
callq 0x2eb8f
jmp 0xa30de
leaq 0x2e2e24(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xa31b8
| thr_abort_locks:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_2C], esi
mov r14, rdi
add rdi, 18h
cmp qword ptr [r14+58h], 0
mov [rbp+var_38], rdi
jnz loc_A31CF
call _pthread_mutex_lock
loc_A30DE:
mov r15, [r14+60h]
test r15, r15
jz short loc_A312A
lea rbx, PSI_server
loc_A30EE:
mov dword ptr [r15+40h], 0
mov r12, [r15+20h]
mov rdi, [r12+30h]
test rdi, rdi
jnz short loc_A311F
loc_A3104:
mov rdi, r12
call _pthread_cond_signal
mov qword ptr [r15+20h], 0
mov r15, [r15+8]
test r15, r15
jnz short loc_A30EE
jmp short loc_A312A
loc_A311F:
mov rax, [rbx]
call qword ptr [rax+170h]
jmp short loc_A3104
loc_A312A:
lea r13, [r14+60h]
lea r15, [r14+80h]
mov rbx, [r14+80h]
loc_A313C:
test rbx, rbx
jz short loc_A317E
mov dword ptr [rbx+40h], 0
mov r12, [rbx+20h]
mov rdi, [r12+30h]
test rdi, rdi
jnz short loc_A316C
loc_A3156:
mov rdi, r12
call _pthread_cond_signal
mov qword ptr [rbx+20h], 0
mov rbx, [rbx+8]
jmp short loc_A313C
loc_A316C:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_A3156
loc_A317E:
mov [r14+68h], r13
mov [r14+88h], r15
xor eax, eax
mov [r14+80h], rax
mov [r14+60h], rax
cmp byte ptr [rbp+var_2C], 0
jz short loc_A31AF
mov rax, [r14+90h]
test rax, rax
jz short loc_A31AF
mov dword ptr [rax+40h], 0Eh
loc_A31AF:
mov rdi, [r14+58h]
test rdi, rdi
jnz short loc_A31E5
loc_A31B8:
mov rdi, [rbp+var_38]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_A31CF:
lea rsi, aWorkspaceLlm4b_23; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 520h
call psi_mutex_lock
jmp loc_A30DE
loc_A31E5:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_A31B8
| long long thr_abort_locks(_QWORD *a1, char a2)
{
long long v3; // rdi
long long i; // r15
long long v5; // r12
long long j; // rbx
long long v7; // r12
long long v8; // rax
v3 = (long long)(a1 + 3);
if ( a1[11] )
psi_mutex_lock(v3, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x520u);
else
pthread_mutex_lock(v3);
for ( i = a1[12]; i; i = *(_QWORD *)(i + 8) )
{
*(_DWORD *)(i + 64) = 0;
v5 = *(_QWORD *)(i + 32);
if ( *(_QWORD *)(v5 + 48) )
PSI_server[46]();
pthread_cond_signal(v5);
*(_QWORD *)(i + 32) = 0LL;
}
for ( j = a1[16]; j; j = *(_QWORD *)(j + 8) )
{
*(_DWORD *)(j + 64) = 0;
v7 = *(_QWORD *)(j + 32);
if ( *(_QWORD *)(v7 + 48) )
PSI_server[46]();
pthread_cond_signal(v7);
*(_QWORD *)(j + 32) = 0LL;
}
a1[13] = a1 + 12;
a1[17] = a1 + 16;
a1[16] = 0LL;
a1[12] = 0LL;
if ( a2 )
{
v8 = a1[18];
if ( v8 )
*(_DWORD *)(v8 + 64) = 14;
}
if ( a1[11] )
PSI_server[44]();
return pthread_mutex_unlock(v3);
}
| thr_abort_locks:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x2c],ESI
MOV R14,RDI
ADD RDI,0x18
CMP qword ptr [R14 + 0x58],0x0
MOV qword ptr [RBP + -0x38],RDI
JNZ 0x001a31cf
CALL 0x00129220
LAB_001a30de:
MOV R15,qword ptr [R14 + 0x60]
TEST R15,R15
JZ 0x001a312a
LEA RBX,[0x486010]
LAB_001a30ee:
MOV dword ptr [R15 + 0x40],0x0
MOV R12,qword ptr [R15 + 0x20]
MOV RDI,qword ptr [R12 + 0x30]
TEST RDI,RDI
JNZ 0x001a311f
LAB_001a3104:
MOV RDI,R12
CALL 0x001295c0
MOV qword ptr [R15 + 0x20],0x0
MOV R15,qword ptr [R15 + 0x8]
TEST R15,R15
JNZ 0x001a30ee
JMP 0x001a312a
LAB_001a311f:
MOV RAX,qword ptr [RBX]
CALL qword ptr [RAX + 0x170]
JMP 0x001a3104
LAB_001a312a:
LEA R13,[R14 + 0x60]
LEA R15,[R14 + 0x80]
MOV RBX,qword ptr [R14 + 0x80]
LAB_001a313c:
TEST RBX,RBX
JZ 0x001a317e
MOV dword ptr [RBX + 0x40],0x0
MOV R12,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [R12 + 0x30]
TEST RDI,RDI
JNZ 0x001a316c
LAB_001a3156:
MOV RDI,R12
CALL 0x001295c0
MOV qword ptr [RBX + 0x20],0x0
MOV RBX,qword ptr [RBX + 0x8]
JMP 0x001a313c
LAB_001a316c:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001a3156
LAB_001a317e:
MOV qword ptr [R14 + 0x68],R13
MOV qword ptr [R14 + 0x88],R15
XOR EAX,EAX
MOV qword ptr [R14 + 0x80],RAX
MOV qword ptr [R14 + 0x60],RAX
CMP byte ptr [RBP + -0x2c],0x0
JZ 0x001a31af
MOV RAX,qword ptr [R14 + 0x90]
TEST RAX,RAX
JZ 0x001a31af
MOV dword ptr [RAX + 0x40],0xe
LAB_001a31af:
MOV RDI,qword ptr [R14 + 0x58]
TEST RDI,RDI
JNZ 0x001a31e5
LAB_001a31b8:
MOV RDI,qword ptr [RBP + -0x38]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001291e0
LAB_001a31cf:
LEA RSI,[0x1dc502]
MOV EDX,0x520
CALL 0x0012eb8f
JMP 0x001a30de
LAB_001a31e5:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001a31b8
|
void thr_abort_locks(long param_1,char param_2)
{
pthread_cond_t *ppVar1;
long lVar2;
pthread_mutex_t *__mutex;
__mutex = (pthread_mutex_t *)(param_1 + 0x18);
if (*(long *)(param_1 + 0x58) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x520);
}
for (lVar2 = *(long *)(param_1 + 0x60); lVar2 != 0; lVar2 = *(long *)(lVar2 + 8)) {
*(int4 *)(lVar2 + 0x40) = 0;
ppVar1 = *(pthread_cond_t **)(lVar2 + 0x20);
if (ppVar1[1].__align != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal(ppVar1);
*(int8 *)(lVar2 + 0x20) = 0;
}
for (lVar2 = *(long *)(param_1 + 0x80); lVar2 != 0; lVar2 = *(long *)(lVar2 + 8)) {
*(int4 *)(lVar2 + 0x40) = 0;
ppVar1 = *(pthread_cond_t **)(lVar2 + 0x20);
if (ppVar1[1].__align != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal(ppVar1);
*(int8 *)(lVar2 + 0x20) = 0;
}
*(long *)(param_1 + 0x68) = param_1 + 0x60;
*(long *)(param_1 + 0x88) = param_1 + 0x80;
*(int8 *)(param_1 + 0x80) = 0;
*(int8 *)(param_1 + 0x60) = 0;
if ((param_2 != '\0') && (*(long *)(param_1 + 0x90) != 0)) {
*(int4 *)(*(long *)(param_1 + 0x90) + 0x40) = 0xe;
}
if (*(long *)(param_1 + 0x58) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return;
}
| |
47,182 | OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<short, 16u, true>::SetSize(unsigned int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/../bfr/../vtr/stackBuffer.h | inline void
StackBuffer<TYPE,SIZE,POD_TYPE>::SetSize(size_type size)
{
if (!POD_TYPE) {
destruct();
}
if (size == 0) {
deallocate();
} else if (size > _capacity) {
deallocate();
allocate(size);
}
_size = size;
if (!POD_TYPE) {
construct();
}
} | O0 | c | OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<short, 16u, true>::SetSize(unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x1b9c18
movq -0x18(%rbp), %rdi
callq 0xc5c40
jmp 0x1b9c3b
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0xc(%rcx), %eax
jbe 0x1b9c39
movq -0x18(%rbp), %rdi
callq 0xc5c40
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xd6150
jmp 0x1b9c3b
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb1EE7SetSizeEj:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
cmp [rbp+var_C], 0
jnz short loc_1B9C18
mov rdi, [rbp+var_18]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb1EE10deallocateEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::deallocate(void)
jmp short loc_1B9C3B
loc_1B9C18:
mov rcx, [rbp+var_18]
mov eax, [rbp+var_C]
cmp eax, [rcx+0Ch]
jbe short loc_1B9C39
mov rdi, [rbp+var_18]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb1EE10deallocateEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::deallocate(void)
mov rdi, [rbp+var_18]
mov esi, [rbp+var_C]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb1EE8allocateEj; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::allocate(uint)
loc_1B9C39:
jmp short $+2
loc_1B9C3B:
mov rax, [rbp+var_18]
mov ecx, [rbp+var_C]
mov [rax+8], ecx
add rsp, 20h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::SetSize(long long a1, unsigned int a2)
{
long long result; // rax
if ( a2 )
{
if ( a2 > *(_DWORD *)(a1 + 12) )
{
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::deallocate(a1);
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::allocate(a1, a2);
}
}
else
{
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::deallocate(a1);
}
result = a1;
*(_DWORD *)(a1 + 8) = a2;
return result;
}
| |||
47,183 | OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<short, 16u, true>::SetSize(unsigned int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/../bfr/../vtr/stackBuffer.h | inline void
StackBuffer<TYPE,SIZE,POD_TYPE>::SetSize(size_type size)
{
if (!POD_TYPE) {
destruct();
}
if (size == 0) {
deallocate();
} else if (size > _capacity) {
deallocate();
allocate(size);
}
_size = size;
if (!POD_TYPE) {
construct();
}
} | O2 | c | OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<short, 16u, true>::SetSize(unsigned int):
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
testl %esi, %esi
je 0xaa193
cmpl %ebx, 0xc(%r14)
jae 0xaa19b
movq %r14, %rdi
callq 0x4fe80
movq %r14, %rdi
movl %ebx, %esi
callq 0x555d0
jmp 0xaa19b
movq %r14, %rdi
callq 0x4fe80
movl %ebx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb1EE7SetSizeEj:
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
test esi, esi
jz short loc_AA193
cmp [r14+0Ch], ebx
jnb short loc_AA19B
mov rdi, r14
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb1EE10deallocateEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::deallocate(void)
mov rdi, r14
mov esi, ebx
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb1EE8allocateEj; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::allocate(uint)
jmp short loc_AA19B
loc_AA193:
mov rdi, r14
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb1EE10deallocateEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::deallocate(void)
loc_AA19B:
mov [r14+8], ebx
add rsp, 8
pop rbx
pop r14
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::SetSize(long long a1, unsigned int a2)
{
long long result; // rax
if ( a2 )
{
if ( *(_DWORD *)(a1 + 12) < a2 )
{
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::deallocate(a1);
result = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::allocate(a1, a2);
}
}
else
{
result = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::deallocate(a1);
}
*(_DWORD *)(a1 + 8) = a2;
return result;
}
| SetSize:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
TEST ESI,ESI
JZ 0x001aa193
CMP dword ptr [R14 + 0xc],EBX
JNC 0x001aa19b
MOV RDI,R14
CALL 0x0014fe80
MOV RDI,R14
MOV ESI,EBX
CALL 0x001555d0
JMP 0x001aa19b
LAB_001aa193:
MOV RDI,R14
CALL 0x0014fe80
LAB_001aa19b:
MOV dword ptr [R14 + 0x8],EBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float, 16u, true>::SetSize(unsigned int) */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,true>::SetSize
(StackBuffer<float,16u,true> *this,uint param_1)
{
if (param_1 == 0) {
deallocate(this);
}
else if (*(uint *)(this + 0xc) < param_1) {
deallocate(this);
allocate(this,param_1);
}
*(uint *)(this + 8) = param_1;
return;
}
| |
47,184 | my_xml_scan | eloqsql/strings/xml.c | static int my_xml_scan(MY_XML_PARSER *p,MY_XML_ATTR *a)
{
int lex;
for (; ( p->cur < p->end) && my_xml_is_space(p->cur[0]) ; p->cur++);
if (p->cur >= p->end)
{
a->beg=p->end;
a->end=p->end;
lex=MY_XML_EOF;
goto ret;
}
a->beg=p->cur;
a->end=p->cur;
if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<!--")))
{
for (; p->cur < p->end; p->cur++)
{
if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("-->")))
{
p->cur+= 3;
break;
}
}
a->end=p->cur;
lex=MY_XML_COMMENT;
}
else if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<![CDATA[")))
{
p->cur+= 9;
for (; p->cur < p->end - 2 ; p->cur++)
{
if (p->cur[0] == ']' && p->cur[1] == ']' && p->cur[2] == '>')
{
p->cur+= 3;
a->end= p->cur;
break;
}
}
lex= MY_XML_CDATA;
}
else if (strchr("?=/<>!",p->cur[0]))
{
p->cur++;
a->end=p->cur;
lex=a->beg[0];
}
else if ( (p->cur[0] == '"') || (p->cur[0] == '\'') )
{
/*
"string" or 'string' found.
Scan until the closing quote/doublequote, or until the END-OF-INPUT.
*/
p->cur++;
for (; ( p->cur < p->end ) && (p->cur[0] != a->beg[0]); p->cur++)
{}
a->end=p->cur;
if (p->cur < p->end) /* Closing quote or doublequote has been found */
p->cur++;
a->beg++;
if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION))
my_xml_norm_text(a);
lex=MY_XML_STRING;
}
else if (my_xml_is_id0(p->cur[0]))
{
p->cur++;
while (p->cur < p->end && my_xml_is_id1(p->cur[0]))
p->cur++;
a->end=p->cur;
my_xml_norm_text(a);
lex=MY_XML_IDENT;
}
else
lex= MY_XML_UNKNOWN;
#if 0
printf("LEX=%s[%d]\n",lex2str(lex),a->end-a->beg);
#endif
ret:
return lex;
} | O0 | c | my_xml_scan:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x138(%rdx), %rcx
movb %al, -0x15(%rbp)
jae 0x80fe4
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x30fcfc(%rip), %rax # 0x390cd0
movsbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0x80fed
jmp 0x81007
jmp 0x80fef
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
jmp 0x80fa0
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x138(%rcx), %rax
jb 0x81050
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x138(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x45, -0x14(%rbp)
jmp 0x81440
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
leaq 0x716f(%rip), %rsi # 0x881ef
movl $0x4, %edx
callq 0x81c80
cmpb $0x0, %al
jne 0x81116
jmp 0x81094
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x138(%rcx), %rax
jae 0x810f7
movq -0x8(%rbp), %rdi
leaq 0x713d(%rip), %rsi # 0x881f4
movl $0x3, %edx
callq 0x81c80
cmpb $0x0, %al
jne 0x810dd
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x3, %rcx
movq %rcx, 0x130(%rax)
jmp 0x810f7
jmp 0x810df
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
jmp 0x81094
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x43, -0x14(%rbp)
jmp 0x8143e
movq -0x8(%rbp), %rdi
leaq 0x70d7(%rip), %rsi # 0x881f8
movl $0x9, %edx
callq 0x81c80
cmpb $0x0, %al
jne 0x811fb
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x9, %rcx
movq %rcx, 0x130(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x138(%rcx), %rcx
addq $-0x2, %rcx
cmpq %rcx, %rax
jae 0x811ef
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl (%rax), %eax
cmpl $0x5d, %eax
jne 0x811d2
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x5d, %eax
jne 0x811d2
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x3e, %eax
jne 0x811d2
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x3, %rcx
movq %rcx, 0x130(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x811ef
jmp 0x811d4
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
jmp 0x81149
movl $0x44, -0x14(%rbp)
jmp 0x8143c
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl (%rax), %esi
leaq 0x6ff2(%rip), %rdi # 0x88202
callq 0x25120
cmpq $0x0, %rax
je 0x81256
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x8143a
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x81280
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x81368
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x138(%rdx), %rcx
movb %al, -0x16(%rbp)
jae 0x812d3
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movsbl (%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
setne %al
movb %al, -0x16(%rbp)
movb -0x16(%rbp), %al
testb $0x1, %al
jne 0x812dc
jmp 0x812f6
jmp 0x812de
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
jmp 0x81296
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x138(%rcx), %rax
jae 0x81337
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x8135c
movq -0x10(%rbp), %rdi
callq 0x819b0
movl $0x53, -0x14(%rbp)
jmp 0x81438
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x30f951(%rip), %rax # 0x390cd0
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8142f
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x138(%rdx), %rcx
movb %al, -0x17(%rbp)
jae 0x813e9
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x30f8f7(%rip), %rax # 0x390cd0
movsbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x17(%rbp)
movb -0x17(%rbp), %al
testb $0x1, %al
jne 0x813f2
jmp 0x8140a
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x130(%rax)
jmp 0x813a5
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x819b0
movl $0x49, -0x14(%rbp)
jmp 0x81436
movl $0x55, -0x14(%rbp)
jmp 0x81438
jmp 0x8143a
jmp 0x8143c
jmp 0x8143e
jmp 0x81440
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| my_xml_scan:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
loc_80FA0:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rdx, [rbp+var_8]
xor eax, eax
cmp rcx, [rdx+138h]
mov [rbp+var_15], al
jnb short loc_80FE4
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_xml_ctype
movsx eax, byte ptr [rax+rcx]
and eax, 8
cmp eax, 0
setnz al
mov [rbp+var_15], al
loc_80FE4:
mov al, [rbp+var_15]
test al, 1
jnz short loc_80FED
jmp short loc_81007
loc_80FED:
jmp short $+2
loc_80FEF:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
jmp short loc_80FA0
loc_81007:
mov rax, [rbp+var_8]
mov rax, [rax+130h]
mov rcx, [rbp+var_8]
cmp rax, [rcx+138h]
jb short loc_81050
mov rax, [rbp+var_8]
mov rcx, [rax+138h]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+138h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov [rbp+var_14], 45h ; 'E'
jmp loc_81440
loc_81050:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rdi, [rbp+var_8]
lea rsi, asc_881EF; "<!--"
mov edx, 4
call my_xml_parser_prefix_cmp
cmp al, 0
jnz loc_81116
jmp short $+2
loc_81094:
mov rax, [rbp+var_8]
mov rax, [rax+130h]
mov rcx, [rbp+var_8]
cmp rax, [rcx+138h]
jnb short loc_810F7
mov rdi, [rbp+var_8]
lea rsi, asc_881F4; "-->"
mov edx, 3
call my_xml_parser_prefix_cmp
cmp al, 0
jnz short loc_810DD
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 3
mov [rax+130h], rcx
jmp short loc_810F7
loc_810DD:
jmp short $+2
loc_810DF:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
jmp short loc_81094
loc_810F7:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov [rbp+var_14], 43h ; 'C'
jmp loc_8143E
loc_81116:
mov rdi, [rbp+var_8]
lea rsi, aCdata; "<![CDATA["
mov edx, 9
call my_xml_parser_prefix_cmp
cmp al, 0
jnz loc_811FB
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 9
mov [rax+130h], rcx
loc_81149:
mov rax, [rbp+var_8]
mov rax, [rax+130h]
mov rcx, [rbp+var_8]
mov rcx, [rcx+138h]
add rcx, 0FFFFFFFFFFFFFFFEh
cmp rax, rcx
jnb loc_811EF
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx eax, byte ptr [rax]
cmp eax, 5Dh ; ']'
jnz short loc_811D2
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx eax, byte ptr [rax+1]
cmp eax, 5Dh ; ']'
jnz short loc_811D2
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx eax, byte ptr [rax+2]
cmp eax, 3Eh ; '>'
jnz short loc_811D2
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 3
mov [rax+130h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
jmp short loc_811EF
loc_811D2:
jmp short $+2
loc_811D4:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
jmp loc_81149
loc_811EF:
mov [rbp+var_14], 44h ; 'D'
jmp loc_8143C
loc_811FB:
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx esi, byte ptr [rax]
lea rdi, asc_88202; "?=/<>!"
call _strchr
cmp rax, 0
jz short loc_81256
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
movsx eax, byte ptr [rax]
mov [rbp+var_14], eax
jmp loc_8143A
loc_81256:
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx eax, byte ptr [rax]
cmp eax, 22h ; '"'
jz short loc_81280
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jnz loc_81368
loc_81280:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
loc_81296:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rdx, [rbp+var_8]
xor eax, eax
cmp rcx, [rdx+138h]
mov [rbp+var_16], al
jnb short loc_812D3
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movsx eax, byte ptr [rax]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
movsx ecx, byte ptr [rcx]
cmp eax, ecx
setnz al
mov [rbp+var_16], al
loc_812D3:
mov al, [rbp+var_16]
test al, 1
jnz short loc_812DC
jmp short loc_812F6
loc_812DC:
jmp short $+2
loc_812DE:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
jmp short loc_81296
loc_812F6:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_8]
mov rax, [rax+130h]
mov rcx, [rbp+var_8]
cmp rax, [rcx+138h]
jnb short loc_81337
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
loc_81337:
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_8]
mov eax, [rax]
and eax, 2
cmp eax, 0
jnz short loc_8135C
mov rdi, [rbp+var_10]
call my_xml_norm_text
loc_8135C:
mov [rbp+var_14], 53h ; 'S'
jmp loc_81438
loc_81368:
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_xml_ctype
movsx eax, byte ptr [rax+rcx]
and eax, 1
cmp eax, 0
jz loc_8142F
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
loc_813A5:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rdx, [rbp+var_8]
xor eax, eax
cmp rcx, [rdx+138h]
mov [rbp+var_17], al
jnb short loc_813E9
mov rax, [rbp+var_8]
mov rax, [rax+130h]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_xml_ctype
movsx eax, byte ptr [rax+rcx]
and eax, 2
cmp eax, 0
setnz al
mov [rbp+var_17], al
loc_813E9:
mov al, [rbp+var_17]
test al, 1
jnz short loc_813F2
jmp short loc_8140A
loc_813F2:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
add rcx, 1
mov [rax+130h], rcx
jmp short loc_813A5
loc_8140A:
mov rax, [rbp+var_8]
mov rcx, [rax+130h]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rdi, [rbp+var_10]
call my_xml_norm_text
mov [rbp+var_14], 49h ; 'I'
jmp short loc_81436
loc_8142F:
mov [rbp+var_14], 55h ; 'U'
loc_81436:
jmp short $+2
loc_81438:
jmp short $+2
loc_8143A:
jmp short $+2
loc_8143C:
jmp short $+2
loc_8143E:
jmp short $+2
loc_81440:
mov eax, [rbp+var_14]
add rsp, 20h
pop rbp
retn
| long long my_xml_scan(long long a1, char **a2)
{
bool v3; // [rsp+9h] [rbp-17h]
bool v4; // [rsp+Ah] [rbp-16h]
bool v5; // [rsp+Bh] [rbp-15h]
while ( 1 )
{
v5 = 0;
if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) )
v5 = (my_xml_ctype[**(unsigned __int8 **)(a1 + 304)] & 8) != 0;
if ( !v5 )
break;
++*(_QWORD *)(a1 + 304);
}
if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) )
{
*a2 = *(char **)(a1 + 304);
a2[1] = *(char **)(a1 + 304);
if ( (unsigned __int8)my_xml_parser_prefix_cmp(a1, "<!--", 4LL) )
{
if ( (unsigned __int8)my_xml_parser_prefix_cmp(a1, "<![CDATA[", 9LL) )
{
if ( strchr("?=/<>!", (unsigned int)**(char **)(a1 + 304)) )
{
a2[1] = (char *)++*(_QWORD *)(a1 + 304);
return (unsigned int)**a2;
}
else if ( **(_BYTE **)(a1 + 304) == 34 || **(_BYTE **)(a1 + 304) == 39 )
{
++*(_QWORD *)(a1 + 304);
while ( 1 )
{
v4 = 0;
if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) )
v4 = **(char **)(a1 + 304) != **a2;
if ( !v4 )
break;
++*(_QWORD *)(a1 + 304);
}
a2[1] = *(char **)(a1 + 304);
if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) )
++*(_QWORD *)(a1 + 304);
++*a2;
if ( (*(_DWORD *)a1 & 2) == 0 )
my_xml_norm_text(a2);
return 83;
}
else if ( (my_xml_ctype[**(unsigned __int8 **)(a1 + 304)] & 1) != 0 )
{
++*(_QWORD *)(a1 + 304);
while ( 1 )
{
v3 = 0;
if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) )
v3 = (my_xml_ctype[**(unsigned __int8 **)(a1 + 304)] & 2) != 0;
if ( !v3 )
break;
++*(_QWORD *)(a1 + 304);
}
a2[1] = *(char **)(a1 + 304);
my_xml_norm_text(a2);
return 73;
}
else
{
return 85;
}
}
else
{
for ( *(_QWORD *)(a1 + 304) += 9LL;
*(_QWORD *)(a1 + 304) < (unsigned long long)(*(_QWORD *)(a1 + 312) - 2LL);
++*(_QWORD *)(a1 + 304) )
{
if ( **(_BYTE **)(a1 + 304) == 93
&& *(_BYTE *)(*(_QWORD *)(a1 + 304) + 1LL) == 93
&& *(_BYTE *)(*(_QWORD *)(a1 + 304) + 2LL) == 62 )
{
*(_QWORD *)(a1 + 304) += 3LL;
a2[1] = *(char **)(a1 + 304);
break;
}
}
return 68;
}
}
else
{
while ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) )
{
if ( !(unsigned __int8)my_xml_parser_prefix_cmp(a1, "-->", 3LL) )
{
*(_QWORD *)(a1 + 304) += 3LL;
break;
}
++*(_QWORD *)(a1 + 304);
}
a2[1] = *(char **)(a1 + 304);
return 67;
}
}
else
{
*a2 = *(char **)(a1 + 312);
a2[1] = *(char **)(a1 + 312);
return 69;
}
}
| my_xml_scan:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LAB_00180fa0:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RDX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x138]
MOV byte ptr [RBP + -0x15],AL
JNC 0x00180fe4
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x490cd0]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x15],AL
LAB_00180fe4:
MOV AL,byte ptr [RBP + -0x15]
TEST AL,0x1
JNZ 0x00180fed
JMP 0x00181007
LAB_00180fed:
JMP 0x00180fef
LAB_00180fef:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
JMP 0x00180fa0
LAB_00181007:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x138]
JC 0x00181050
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x138]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x138]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RBP + -0x14],0x45
JMP 0x00181440
LAB_00181050:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1881ef]
MOV EDX,0x4
CALL 0x00181c80
CMP AL,0x0
JNZ 0x00181116
JMP 0x00181094
LAB_00181094:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x138]
JNC 0x001810f7
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1881f4]
MOV EDX,0x3
CALL 0x00181c80
CMP AL,0x0
JNZ 0x001810dd
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x3
MOV qword ptr [RAX + 0x130],RCX
JMP 0x001810f7
LAB_001810dd:
JMP 0x001810df
LAB_001810df:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
JMP 0x00181094
LAB_001810f7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RBP + -0x14],0x43
JMP 0x0018143e
LAB_00181116:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1881f8]
MOV EDX,0x9
CALL 0x00181c80
CMP AL,0x0
JNZ 0x001811fb
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x9
MOV qword ptr [RAX + 0x130],RCX
LAB_00181149:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x138]
ADD RCX,-0x2
CMP RAX,RCX
JNC 0x001811ef
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5d
JNZ 0x001811d2
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x5d
JNZ 0x001811d2
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX EAX,byte ptr [RAX + 0x2]
CMP EAX,0x3e
JNZ 0x001811d2
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x3
MOV qword ptr [RAX + 0x130],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001811ef
LAB_001811d2:
JMP 0x001811d4
LAB_001811d4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
JMP 0x00181149
LAB_001811ef:
MOV dword ptr [RBP + -0x14],0x44
JMP 0x0018143c
LAB_001811fb:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x188202]
CALL 0x00125120
CMP RAX,0x0
JZ 0x00181256
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVSX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0018143a
LAB_00181256:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x22
JZ 0x00181280
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JNZ 0x00181368
LAB_00181280:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
LAB_00181296:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RDX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x138]
MOV byte ptr [RBP + -0x16],AL
JNC 0x001812d3
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVSX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOVSX ECX,byte ptr [RCX]
CMP EAX,ECX
SETNZ AL
MOV byte ptr [RBP + -0x16],AL
LAB_001812d3:
MOV AL,byte ptr [RBP + -0x16]
TEST AL,0x1
JNZ 0x001812dc
JMP 0x001812f6
LAB_001812dc:
JMP 0x001812de
LAB_001812de:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
JMP 0x00181296
LAB_001812f6:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x138]
JNC 0x00181337
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
LAB_00181337:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x0018135c
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001819b0
LAB_0018135c:
MOV dword ptr [RBP + -0x14],0x53
JMP 0x00181438
LAB_00181368:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x490cd0]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0018142f
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
LAB_001813a5:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RDX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x138]
MOV byte ptr [RBP + -0x17],AL
JNC 0x001813e9
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x130]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x490cd0]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
AND EAX,0x2
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x17],AL
LAB_001813e9:
MOV AL,byte ptr [RBP + -0x17]
TEST AL,0x1
JNZ 0x001813f2
JMP 0x0018140a
LAB_001813f2:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
ADD RCX,0x1
MOV qword ptr [RAX + 0x130],RCX
JMP 0x001813a5
LAB_0018140a:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x130]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001819b0
MOV dword ptr [RBP + -0x14],0x49
JMP 0x00181436
LAB_0018142f:
MOV dword ptr [RBP + -0x14],0x55
LAB_00181436:
JMP 0x00181438
LAB_00181438:
JMP 0x0018143a
LAB_0018143a:
JMP 0x0018143c
LAB_0018143c:
JMP 0x0018143e
LAB_0018143e:
JMP 0x00181440
LAB_00181440:
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0x20
POP RBP
RET
|
int my_xml_scan(uint *param_1,long *param_2)
{
char cVar1;
char *pcVar2;
bool bVar3;
int local_1c;
while( true ) {
bVar3 = false;
if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) {
bVar3 = (my_xml_ctype[**(byte **)(param_1 + 0x4c)] & 8) != 0;
}
if (!bVar3) break;
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
}
if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) {
*param_2 = *(long *)(param_1 + 0x4c);
param_2[1] = *(long *)(param_1 + 0x4c);
cVar1 = my_xml_parser_prefix_cmp(param_1,&DAT_001881ef,4);
if (cVar1 == '\0') {
while (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) {
cVar1 = my_xml_parser_prefix_cmp(param_1,&DAT_001881f4,3);
if (cVar1 == '\0') {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 3;
break;
}
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
}
param_2[1] = *(long *)(param_1 + 0x4c);
local_1c = 0x43;
}
else {
cVar1 = my_xml_parser_prefix_cmp(param_1,&DAT_001881f8,9);
if (cVar1 == '\0') {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 9;
while (*(ulong *)(param_1 + 0x4c) < *(long *)(param_1 + 0x4e) - 2U) {
if (((**(char **)(param_1 + 0x4c) == ']') &&
(*(char *)(*(long *)(param_1 + 0x4c) + 1) == ']')) &&
(*(char *)(*(long *)(param_1 + 0x4c) + 2) == '>')) {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 3;
param_2[1] = *(long *)(param_1 + 0x4c);
break;
}
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
}
local_1c = 0x44;
}
else {
pcVar2 = strchr("?=/<>!",(int)**(char **)(param_1 + 0x4c));
if (pcVar2 == (char *)0x0) {
if ((**(char **)(param_1 + 0x4c) == '\"') || (**(char **)(param_1 + 0x4c) == '\'')) {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
while( true ) {
bVar3 = false;
if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) {
bVar3 = **(char **)(param_1 + 0x4c) != *(char *)*param_2;
}
if (!bVar3) break;
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
}
param_2[1] = *(long *)(param_1 + 0x4c);
if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
}
*param_2 = *param_2 + 1;
if ((*param_1 & 2) == 0) {
my_xml_norm_text(param_2);
}
local_1c = 0x53;
}
else if ((my_xml_ctype[**(byte **)(param_1 + 0x4c)] & 1) == 0) {
local_1c = 0x55;
}
else {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
while( true ) {
bVar3 = false;
if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) {
bVar3 = (my_xml_ctype[**(byte **)(param_1 + 0x4c)] & 2) != 0;
}
if (!bVar3) break;
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
}
param_2[1] = *(long *)(param_1 + 0x4c);
my_xml_norm_text(param_2);
local_1c = 0x49;
}
}
else {
*(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1;
param_2[1] = *(long *)(param_1 + 0x4c);
local_1c = (int)*(char *)*param_2;
}
}
}
}
else {
*param_2 = *(long *)(param_1 + 0x4e);
param_2[1] = *(long *)(param_1 + 0x4e);
local_1c = 0x45;
}
return local_1c;
}
| |
47,185 | mariadb_convert_string | eloqsql/libmariadb/libmariadb/ma_charset.c | size_t STDCALL mariadb_convert_string(const char *from __attribute__((unused)),
size_t *from_len __attribute__((unused)),
MARIADB_CHARSET_INFO *from_cs __attribute__((unused)),
char *to __attribute__((unused)),
size_t *to_len __attribute__((unused)),
MARIADB_CHARSET_INFO *to_cs __attribute__((unused)), int *errorcode)
{
#ifndef HAVE_ICONV
*errorcode= ENOTSUP;
return -1;
#else
iconv_t conv= 0;
size_t rc= -1;
size_t save_len= *to_len;
char to_encoding[128], from_encoding[128];
*errorcode= 0;
/* check if conversion is supported */
if (!from_cs || !from_cs->encoding || !from_cs->encoding[0] ||
!to_cs || !to_cs->encoding || !to_cs->encoding[0])
{
*errorcode= EINVAL;
return rc;
}
map_charset_name(to_cs->encoding, 1, to_encoding, sizeof(to_encoding));
map_charset_name(from_cs->encoding, 0, from_encoding, sizeof(from_encoding));
if ((conv= iconv_open(to_encoding, from_encoding)) == (iconv_t)-1)
{
*errorcode= errno;
goto error;
}
if ((rc= iconv(conv, IF_WIN(,IF_SOLARIS(,(char **)))&from, from_len, &to, to_len)) == (size_t)-1)
{
*errorcode= errno;
goto error;
}
rc= save_len - *to_len;
error:
if (conv != (iconv_t)-1)
iconv_close(conv);
return rc;
#endif
} | O0 | c | mariadb_convert_string:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq 0x10(%rbp), %rax
movl $0x5f, (%rax)
movq $-0x1, %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mariadb_convert_string:
push rbp
mov rbp, rsp
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+arg_0]
mov dword ptr [rax], 5Fh ; '_'
mov rax, 0FFFFFFFFFFFFFFFFh
pop rbp
retn
| long long mariadb_convert_string(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
_DWORD *a7)
{
*a7 = 95;
return -1LL;
}
| mariadb_convert_string:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RAX],0x5f
MOV RAX,-0x1
POP RBP
RET
|
int8 mariadb_convert_string(void)
{
int4 *in_stack_00000008;
*in_stack_00000008 = 0x5f;
return 0xffffffffffffffff;
}
| |
47,186 | ggml_opt_epoch | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp | void ggml_opt_epoch(
ggml_opt_context_t opt_ctx,
ggml_opt_dataset_t dataset,
ggml_opt_result_t result_train,
ggml_opt_result_t result_eval,
int64_t idata_split,
ggml_opt_epoch_callback callback_train,
ggml_opt_epoch_callback callback_eval) {
struct ggml_tensor * inputs = ggml_opt_inputs(opt_ctx);
struct ggml_tensor * labels = ggml_opt_labels(opt_ctx);
struct ggml_tensor * data = ggml_opt_dataset_data(dataset);
GGML_ASSERT(data->ne[0] == inputs->ne[0]);
const int64_t ndata = data->ne[1];
const int64_t ndata_batch = inputs->ne[1];
GGML_ASSERT(data->ne[1] % inputs->ne[1] == 0);
const int64_t nbatches = ndata/ndata_batch;
idata_split = idata_split < 0 ? ndata : idata_split;
GGML_ASSERT(idata_split % ndata_batch == 0);
const int64_t ibatch_split = idata_split / ndata_batch;
int64_t ibatch = 0;
int64_t t_loop_start = ggml_time_us();
for (; ibatch < ibatch_split; ++ibatch) {
ggml_opt_dataset_get_batch(dataset, inputs, labels, ibatch);
ggml_opt_forward_backward(opt_ctx, result_train);
if (callback_train) {
callback_train(true, opt_ctx, dataset, result_train, ibatch+1, ibatch_split, t_loop_start);
}
}
t_loop_start = ggml_time_us();
for (; ibatch < nbatches; ++ibatch) {
ggml_opt_dataset_get_batch(dataset, inputs, labels, ibatch);
ggml_opt_forward(opt_ctx, result_eval);
if (callback_eval) {
callback_eval(false, opt_ctx, dataset, result_eval, ibatch+1-ibatch_split, nbatches-ibatch_split, t_loop_start);
}
}
} | O1 | cpp | ggml_opt_epoch:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rdi, %r15
movq 0x13d0(%rdi), %rdi
movq 0x10(%rsi), %rax
movq 0x10(%rax), %rdx
cmpq 0x10(%rdi), %rdx
jne 0x2c552
movq %rsi, %r14
movq %rcx, 0x30(%rsp)
movq 0x18(%rax), %rcx
movq 0x18(%rdi), %rsi
movq %rcx, %rax
cqto
idivq %rsi
movq %rax, 0x10(%rsp)
testq %rdx, %rdx
jne 0x2c56e
testq %r8, %r8
cmovnsq %r8, %rcx
movq %rcx, %rax
cqto
idivq %rsi
testq %rdx, %rdx
jne 0x2c58a
movq %r9, %r13
movq %rax, %r12
movq %rdi, 0x20(%rsp)
movq 0x13e0(%r15), %rax
movq %rax, 0x18(%rsp)
callq 0x18e50
movq %rax, 0x8(%rsp)
testq %r12, %r12
jle 0x2c4bb
xorl %ebp, %ebp
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbp, %rcx
callq 0x18030
movq %r15, %rdi
movq %rbx, %rsi
callq 0x173a0
testq %r13, %r13
je 0x2c4ae
leaq 0x1(%rbp), %r8
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
movl $0x1, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq %r12, %r9
callq *%r13
incq %rbp
cmpq %rbp, %r12
jne 0x2c468
movq %r12, %rbx
jmp 0x2c4bd
xorl %ebx, %ebx
callq 0x18e50
movq %rax, 0x8(%rsp)
cmpq 0x10(%rsp), %rbx
jge 0x2c543
movq 0x70(%rsp), %rbp
movq 0x10(%rsp), %rax
subq %r12, %rax
movq %rax, 0x28(%rsp)
movl $0x1, %r13d
subq %r12, %r13
movq 0x30(%rsp), %r12
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rcx
callq 0x18030
movq 0x1400(%r15), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x2bb4c
testq %rbp, %rbp
je 0x2c539
leaq (%rbx,%r13), %r8
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
xorl %edi, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq 0x28(%rsp), %r9
callq *%rbp
incq %rbx
cmpq %rbx, 0x10(%rsp)
jne 0x2c4ee
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x23f4f(%rip), %rdi # 0x504a8
leaq 0x20061(%rip), %rdx # 0x4c5c1
leaq 0x24279(%rip), %rcx # 0x507e0
movl $0x2b0, %esi # imm = 0x2B0
jmp 0x2c5a4
leaq 0x23f33(%rip), %rdi # 0x504a8
leaq 0x20045(%rip), %rdx # 0x4c5c1
leaq 0x2427a(%rip), %rcx # 0x507fd
movl $0x2b5, %esi # imm = 0x2B5
jmp 0x2c5a4
leaq 0x23f17(%rip), %rdi # 0x504a8
leaq 0x20029(%rip), %rdx # 0x4c5c1
leaq 0x2427f(%rip), %rcx # 0x5081e
movl $0x2b9, %esi # imm = 0x2B9
xorl %eax, %eax
callq 0x18ce0
| ggml_opt_epoch:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdx
mov r15, rdi
mov rdi, [rdi+13D0h]
mov rax, [rsi+10h]
mov rdx, [rax+10h]
cmp rdx, [rdi+10h]
jnz loc_2C552
mov r14, rsi
mov [rsp+68h+var_38], rcx
mov rcx, [rax+18h]
mov rsi, [rdi+18h]
mov rax, rcx
cqo
idiv rsi
mov [rsp+68h+var_58], rax
test rdx, rdx
jnz loc_2C56E
test r8, r8
cmovns rcx, r8
mov rax, rcx
cqo
idiv rsi
test rdx, rdx
jnz loc_2C58A
mov r13, r9
mov r12, rax
mov [rsp+68h+var_48], rdi
mov rax, [r15+13E0h]
mov [rsp+68h+var_50], rax
call _ggml_time_us
mov [rsp+68h+var_60], rax
test r12, r12
jle short loc_2C4BB
xor ebp, ebp
loc_2C468:
mov rdi, r14
mov rsi, [rsp+68h+var_48]
mov rdx, [rsp+68h+var_50]
mov rcx, rbp
call _ggml_opt_dataset_get_batch
mov rdi, r15
mov rsi, rbx
call _ggml_opt_forward_backward
test r13, r13
jz short loc_2C4AE
lea r8, [rbp+1]
mov rax, [rsp+68h+var_60]
mov [rsp+68h+var_68], rax
mov edi, 1
mov rsi, r15
mov rdx, r14
mov rcx, rbx
mov r9, r12
call r13
loc_2C4AE:
inc rbp
cmp r12, rbp
jnz short loc_2C468
mov rbx, r12
jmp short loc_2C4BD
loc_2C4BB:
xor ebx, ebx
loc_2C4BD:
call _ggml_time_us
mov [rsp+68h+var_60], rax
cmp rbx, [rsp+68h+var_58]
jge short loc_2C543
mov rbp, [rsp+68h+arg_0]
mov rax, [rsp+68h+var_58]
sub rax, r12
mov [rsp+68h+var_40], rax
mov r13d, 1
sub r13, r12
mov r12, [rsp+68h+var_38]
loc_2C4EE:
mov rdi, r14
mov rsi, [rsp+68h+var_48]
mov rdx, [rsp+68h+var_50]
mov rcx, rbx
call _ggml_opt_dataset_get_batch
mov rsi, [r15+1400h]
mov rdi, r15
mov rdx, r12
call _ZL19ggml_opt_eval_graphP16ggml_opt_contextP11ggml_cgraphP15ggml_opt_result; ggml_opt_eval_graph(ggml_opt_context *,ggml_cgraph *,ggml_opt_result *)
test rbp, rbp
jz short loc_2C539
lea r8, [rbx+r13]
mov rax, [rsp+68h+var_60]
mov [rsp+68h+var_68], rax
xor edi, edi
mov rsi, r15
mov rdx, r14
mov rcx, r12
mov r9, [rsp+68h+var_40]
call rbp
loc_2C539:
inc rbx
cmp [rsp+68h+var_58], rbx
jnz short loc_2C4EE
loc_2C543:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2C552:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDataNe0InputsN; "data->ne[0] == inputs->ne[0]"
mov esi, 2B0h
jmp short loc_2C5A4
loc_2C56E:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDataNe1InputsN; "data->ne[1] % inputs->ne[1] == 0"
mov esi, 2B5h
jmp short loc_2C5A4
loc_2C58A:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIdataSplitNdat; "idata_split % ndata_batch == 0"
mov esi, 2B9h
loc_2C5A4:
xor eax, eax
call _ggml_abort
| void ggml_opt_epoch(
_QWORD *a1,
_QWORD *a2,
long long *a3,
long long *a4,
long long a5,
void ( *a6)(long long, _QWORD *, _QWORD *, long long *, long long, long long, long long),
double a7,
__m128 a8,
__m128 a9,
__m128i a10,
double a11,
double a12,
__m128 a13,
__m128 a14,
void ( *a15)(_QWORD, _QWORD *, _QWORD *, long long *, long long, long long, long long))
{
long long v17; // rdi
long long v18; // rax
long long v20; // rcx
long long v21; // rsi
long long v23; // r12
int v24; // r8d
int v25; // r9d
long long i; // rbp
long long v27; // rdx
long long v28; // rcx
int v29; // r8d
int v30; // r9d
double v31; // xmm4_8
double v32; // xmm5_8
long long v33; // rbx
int v34; // r8d
int v35; // r9d
long long v36; // rcx
int v37; // r8d
int v38; // r9d
double v39; // xmm4_8
double v40; // xmm5_8
const char *v41; // rcx
int v42; // esi
long long v43; // [rsp+8h] [rbp-60h]
long long v44; // [rsp+8h] [rbp-60h]
long long v45; // [rsp+10h] [rbp-58h]
unsigned int *v46; // [rsp+18h] [rbp-50h]
v17 = a1[634];
v18 = a2[2];
if ( *(_QWORD *)(v18 + 16) != *(_QWORD *)(v17 + 16) )
{
v41 = "data->ne[0] == inputs->ne[0]";
v42 = 688;
goto LABEL_21;
}
v20 = *(_QWORD *)(v18 + 24);
v21 = *(_QWORD *)(v17 + 24);
v45 = v20 / v21;
if ( v20 % v21 )
{
v41 = "data->ne[1] % inputs->ne[1] == 0";
v42 = 693;
goto LABEL_21;
}
if ( a5 >= 0 )
v20 = a5;
if ( v20 % v21 )
{
v41 = "idata_split % ndata_batch == 0";
v42 = 697;
LABEL_21:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp",
v42,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v41,
a5,
(_DWORD)a6);
}
v23 = v20 / v21;
v46 = (unsigned int *)a1[636];
v43 = ggml_time_us();
if ( v23 <= 0 )
{
v33 = 0LL;
}
else
{
for ( i = 0LL; i != v23; ++i )
{
ggml_opt_dataset_get_batch(a2, (unsigned int *)v17, v46, i, v24, v25);
ggml_opt_forward_backward((long long)a1, a3, a7, a8, a9, a10, v31, v32, a13, a14, v27, v28, v29, v30);
if ( a6 )
a6(1LL, a1, a2, a3, i + 1, v23, v43);
}
v33 = v23;
}
v44 = ggml_time_us();
if ( v33 < v45 )
{
do
{
ggml_opt_dataset_get_batch(a2, (unsigned int *)v17, v46, v33, v34, v35);
ggml_opt_eval_graph((long long)a1, a1[640], a4, a7, a8, a9, a10, v39, v40, a13, a14, v36, v37, v38);
if ( a15 )
a15(0LL, a1, a2, a4, v33 + 1 - v23, v45 - v23, v44);
++v33;
}
while ( v45 != v33 );
}
}
| ggml_opt_epoch:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDX
MOV R15,RDI
MOV RDI,qword ptr [RDI + 0x13d0]
MOV RAX,qword ptr [RSI + 0x10]
MOV RDX,qword ptr [RAX + 0x10]
CMP RDX,qword ptr [RDI + 0x10]
JNZ 0x0012c552
MOV R14,RSI
MOV qword ptr [RSP + 0x30],RCX
MOV RCX,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RDI + 0x18]
MOV RAX,RCX
CQO
IDIV RSI
MOV qword ptr [RSP + 0x10],RAX
TEST RDX,RDX
JNZ 0x0012c56e
TEST R8,R8
CMOVNS RCX,R8
MOV RAX,RCX
CQO
IDIV RSI
TEST RDX,RDX
JNZ 0x0012c58a
MOV R13,R9
MOV R12,RAX
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [R15 + 0x13e0]
MOV qword ptr [RSP + 0x18],RAX
CALL 0x00118e50
MOV qword ptr [RSP + 0x8],RAX
TEST R12,R12
JLE 0x0012c4bb
XOR EBP,EBP
LAB_0012c468:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,RBP
CALL 0x00118030
MOV RDI,R15
MOV RSI,RBX
CALL 0x001173a0
TEST R13,R13
JZ 0x0012c4ae
LEA R8,[RBP + 0x1]
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP],RAX
MOV EDI,0x1
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
MOV R9,R12
CALL R13
LAB_0012c4ae:
INC RBP
CMP R12,RBP
JNZ 0x0012c468
MOV RBX,R12
JMP 0x0012c4bd
LAB_0012c4bb:
XOR EBX,EBX
LAB_0012c4bd:
CALL 0x00118e50
MOV qword ptr [RSP + 0x8],RAX
CMP RBX,qword ptr [RSP + 0x10]
JGE 0x0012c543
MOV RBP,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x10]
SUB RAX,R12
MOV qword ptr [RSP + 0x28],RAX
MOV R13D,0x1
SUB R13,R12
MOV R12,qword ptr [RSP + 0x30]
LAB_0012c4ee:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,RBX
CALL 0x00118030
MOV RSI,qword ptr [R15 + 0x1400]
MOV RDI,R15
MOV RDX,R12
CALL 0x0012bb4c
TEST RBP,RBP
JZ 0x0012c539
LEA R8,[RBX + R13*0x1]
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP],RAX
XOR EDI,EDI
MOV RSI,R15
MOV RDX,R14
MOV RCX,R12
MOV R9,qword ptr [RSP + 0x28]
CALL RBP
LAB_0012c539:
INC RBX
CMP qword ptr [RSP + 0x10],RBX
JNZ 0x0012c4ee
LAB_0012c543:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012c552:
LEA RDI,[0x1504a8]
LEA RDX,[0x14c5c1]
LEA RCX,[0x1507e0]
MOV ESI,0x2b0
JMP 0x0012c5a4
LAB_0012c56e:
LEA RDI,[0x1504a8]
LEA RDX,[0x14c5c1]
LEA RCX,[0x1507fd]
MOV ESI,0x2b5
JMP 0x0012c5a4
LAB_0012c58a:
LEA RDI,[0x1504a8]
LEA RDX,[0x14c5c1]
LEA RCX,[0x15081e]
MOV ESI,0x2b9
LAB_0012c5a4:
XOR EAX,EAX
CALL 0x00118ce0
|
void ggml_opt_epoch(ggml_opt_context *param_1,long param_2,int8 param_3,
ggml_opt_result *param_4,long param_5,code *param_6,code *param_7)
{
long lVar1;
long lVar2;
long lVar3;
int8 uVar4;
char *pcVar5;
long lVar6;
long lVar7;
int8 uVar8;
lVar1 = *(long *)(param_1 + 0x13d0);
if (*(long *)(*(long *)(param_2 + 0x10) + 0x10) == *(long *)(lVar1 + 0x10)) {
lVar6 = *(long *)(*(long *)(param_2 + 0x10) + 0x18);
lVar7 = *(long *)(lVar1 + 0x18);
lVar2 = lVar6 / lVar7;
if (lVar6 % lVar7 == 0) {
if (-1 < param_5) {
lVar6 = param_5;
}
lVar3 = lVar6 / lVar7;
if (lVar6 % lVar7 == 0) {
uVar8 = *(int8 *)(param_1 + 0x13e0);
uVar4 = ggml_time_us();
if (lVar3 < 1) {
lVar6 = 0;
}
else {
lVar7 = 0;
do {
ggml_opt_dataset_get_batch(param_2,lVar1,uVar8,lVar7);
ggml_opt_forward_backward(param_1,param_3);
if (param_6 != (code *)0x0) {
(*param_6)(1,param_1,param_2,param_3,lVar7 + 1,lVar3,uVar4);
}
lVar7 = lVar7 + 1;
lVar6 = lVar3;
} while (lVar3 != lVar7);
}
uVar4 = ggml_time_us();
if (lVar6 < lVar2) {
do {
ggml_opt_dataset_get_batch(param_2,lVar1,uVar8,lVar6);
ggml_opt_eval_graph(param_1,*(ggml_cgraph **)(param_1 + 0x1400),param_4);
if (param_7 != (code *)0x0) {
(*param_7)(0,param_1,param_2,param_4,lVar6 + (1 - lVar3),lVar2 - lVar3,uVar4);
}
lVar6 = lVar6 + 1;
} while (lVar2 != lVar6);
}
return;
}
pcVar5 = "idata_split % ndata_batch == 0";
uVar8 = 0x2b9;
}
else {
pcVar5 = "data->ne[1] % inputs->ne[1] == 0";
uVar8 = 0x2b5;
}
}
else {
pcVar5 = "data->ne[0] == inputs->ne[0]";
uVar8 = 0x2b0;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp"
,uVar8,"GGML_ASSERT(%s) failed",pcVar5);
}
| |
47,187 | ggml_opt_epoch | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp | void ggml_opt_epoch(
ggml_opt_context_t opt_ctx,
ggml_opt_dataset_t dataset,
ggml_opt_result_t result_train,
ggml_opt_result_t result_eval,
int64_t idata_split,
ggml_opt_epoch_callback callback_train,
ggml_opt_epoch_callback callback_eval) {
struct ggml_tensor * inputs = ggml_opt_inputs(opt_ctx);
struct ggml_tensor * labels = ggml_opt_labels(opt_ctx);
struct ggml_tensor * data = ggml_opt_dataset_data(dataset);
GGML_ASSERT(data->ne[0] == inputs->ne[0]);
const int64_t ndata = data->ne[1];
const int64_t ndata_batch = inputs->ne[1];
GGML_ASSERT(data->ne[1] % inputs->ne[1] == 0);
const int64_t nbatches = ndata/ndata_batch;
idata_split = idata_split < 0 ? ndata : idata_split;
GGML_ASSERT(idata_split % ndata_batch == 0);
const int64_t ibatch_split = idata_split / ndata_batch;
int64_t ibatch = 0;
int64_t t_loop_start = ggml_time_us();
for (; ibatch < ibatch_split; ++ibatch) {
ggml_opt_dataset_get_batch(dataset, inputs, labels, ibatch);
ggml_opt_forward_backward(opt_ctx, result_train);
if (callback_train) {
callback_train(true, opt_ctx, dataset, result_train, ibatch+1, ibatch_split, t_loop_start);
}
}
t_loop_start = ggml_time_us();
for (; ibatch < nbatches; ++ibatch) {
ggml_opt_dataset_get_batch(dataset, inputs, labels, ibatch);
ggml_opt_forward(opt_ctx, result_eval);
if (callback_eval) {
callback_eval(false, opt_ctx, dataset, result_eval, ibatch+1-ibatch_split, nbatches-ibatch_split, t_loop_start);
}
}
} | O2 | cpp | ggml_opt_epoch:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r12
movq 0x13d0(%rdi), %r10
movq 0x10(%rsi), %rax
movq 0x10(%rax), %rdx
cmpq 0x10(%r10), %rdx
jne 0x30513
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rax), %rdi
movq 0x18(%r10), %rsi
movq %rdi, %rax
cqto
idivq %rsi
movq %rax, 0x20(%rsp)
testq %rdx, %rdx
jne 0x3052f
movq %r9, 0x10(%rsp)
movq %r10, 0x28(%rsp)
movq %rcx, 0x30(%rsp)
testq %r8, %r8
cmovnsq %r8, %rdi
movq %rdi, %rax
cqto
idivq %rsi
testq %rdx, %rdx
jne 0x3054b
movq %rax, %r13
movq 0x13e0(%r15), %rbp
callq 0x1fbc0
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
testq %r13, %r13
movq %r13, %rax
movl $0x0, %r13d
movq %rax, 0x18(%rsp)
cmovgq %rax, %r13
cmpq %rbx, %r13
je 0x3048a
movq %r14, %rdi
movq 0x28(%rsp), %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x1e760
movq %r15, %rdi
movq %r12, %rsi
callq 0x1d5d0
incq %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x30439
movq 0x8(%rsp), %rcx
movq %rcx, (%rsp)
pushq $0x1
popq %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq %rbx, %r8
movq 0x18(%rsp), %r9
callq *%rax
jmp 0x30439
callq 0x1fbc0
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
subq %rax, %rcx
movq %rcx, 0x8(%rsp)
pushq $0x1
popq %rbx
subq %rax, %rbx
movq 0x30(%rsp), %r12
cmpq 0x20(%rsp), %r13
jge 0x30504
movq %r14, %rdi
movq 0x28(%rsp), %rsi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x1e760
movq %r15, %rdi
movq %r12, %rsi
callq 0x1f340
cmpq $0x0, 0x70(%rsp)
je 0x304ff
leaq (%rbx,%r13), %r8
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
xorl %edi, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq 0x8(%rsp), %r9
callq *0x70(%rsp)
incq %r13
jmp 0x304b1
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x21f9e(%rip), %rdi # 0x524b8
leaq 0x1e0b4(%rip), %rdx # 0x4e5d5
leaq 0x222c8(%rip), %rcx # 0x527f0
movl $0x2b0, %esi # imm = 0x2B0
jmp 0x30565
leaq 0x21f82(%rip), %rdi # 0x524b8
leaq 0x1e098(%rip), %rdx # 0x4e5d5
leaq 0x222c9(%rip), %rcx # 0x5280d
movl $0x2b5, %esi # imm = 0x2B5
jmp 0x30565
leaq 0x21f66(%rip), %rdi # 0x524b8
leaq 0x1e07c(%rip), %rdx # 0x4e5d5
leaq 0x222ce(%rip), %rcx # 0x5282e
movl $0x2b9, %esi # imm = 0x2B9
xorl %eax, %eax
callq 0x1f9b0
| ggml_opt_epoch:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12, rdx
mov r10, [rdi+13D0h]
mov rax, [rsi+10h]
mov rdx, [rax+10h]
cmp rdx, [r10+10h]
jnz loc_30513
mov r14, rsi
mov r15, rdi
mov rdi, [rax+18h]
mov rsi, [r10+18h]
mov rax, rdi
cqo
idiv rsi
mov [rsp+68h+var_48], rax
test rdx, rdx
jnz loc_3052F
mov [rsp+68h+var_58], r9
mov [rsp+68h+var_40], r10
mov [rsp+68h+var_38], rcx
test r8, r8
cmovns rdi, r8
mov rax, rdi
cqo
idiv rsi
test rdx, rdx
jnz loc_3054B
mov r13, rax
mov rbp, [r15+13E0h]
call _ggml_time_us
mov [rsp+68h+var_60], rax
xor ebx, ebx
test r13, r13
mov rax, r13
mov r13d, 0
mov [rsp+68h+var_50], rax
cmovg r13, rax
loc_30439:
cmp r13, rbx
jz short loc_3048A
mov rdi, r14
mov rsi, [rsp+68h+var_40]
mov rdx, rbp
mov rcx, rbx
call _ggml_opt_dataset_get_batch
mov rdi, r15
mov rsi, r12
call _ggml_opt_forward_backward
inc rbx
mov rax, [rsp+68h+var_58]
test rax, rax
jz short loc_30439
mov rcx, [rsp+68h+var_60]
mov [rsp+68h+var_68], rcx
push 1
pop rdi
mov rsi, r15
mov rdx, r14
mov rcx, r12
mov r8, rbx
mov r9, [rsp+68h+var_50]
call rax
jmp short loc_30439
loc_3048A:
call _ggml_time_us
mov [rsp+68h+var_58], rax
mov rcx, [rsp+68h+var_48]
mov rax, [rsp+68h+var_50]
sub rcx, rax
mov [rsp+68h+var_60], rcx
push 1
pop rbx
sub rbx, rax
mov r12, [rsp+68h+var_38]
loc_304B1:
cmp r13, [rsp+68h+var_48]
jge short loc_30504
mov rdi, r14
mov rsi, [rsp+68h+var_40]
mov rdx, rbp
mov rcx, r13
call _ggml_opt_dataset_get_batch
mov rdi, r15
mov rsi, r12
call _ggml_opt_forward
cmp [rsp+68h+arg_0], 0
jz short loc_304FF
lea r8, [rbx+r13]
mov rax, [rsp+68h+var_58]
mov [rsp+68h+var_68], rax
xor edi, edi
mov rsi, r15
mov rdx, r14
mov rcx, r12
mov r9, [rsp+68h+var_60]
call [rsp+68h+arg_0]
loc_304FF:
inc r13
jmp short loc_304B1
loc_30504:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_30513:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDataNe0InputsN; "data->ne[0] == inputs->ne[0]"
mov esi, 2B0h
jmp short loc_30565
loc_3052F:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDataNe1InputsN; "data->ne[1] % inputs->ne[1] == 0"
mov esi, 2B5h
jmp short loc_30565
loc_3054B:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIdataSplitNdat; "idata_split % ndata_batch == 0"
mov esi, 2B9h
loc_30565:
xor eax, eax
call _ggml_abort
| long long ggml_opt_epoch(
unsigned long long a1,
_QWORD *a2,
long long *a3,
long long a4,
long long a5,
void ( *a6)(long long, unsigned long long, _QWORD *, long long *, long long, long long, long long),
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
long long ( *a15)(_QWORD, unsigned long long, _QWORD *, long long, long long, long long, long long))
{
long long v16; // r10
long long v17; // rax
long long v20; // rdi
long long v21; // rsi
unsigned int *v22; // rbp
long long v23; // r8
long long v24; // r9
__m128 v25; // xmm4
__m128 v26; // xmm5
long long v27; // rbx
long long v28; // r13
long long v29; // rdx
long long v30; // rcx
long long v31; // r8
long long v32; // r9
__m128 v33; // xmm4
__m128 v34; // xmm5
long long v35; // r8
long long v36; // r9
__m128 v37; // xmm4
__m128 v38; // xmm5
long long result; // rax
const char *v40; // rcx
int v41; // esi
char v42; // [rsp+0h] [rbp-68h]
long long v43; // [rsp+8h] [rbp-60h]
long long v45; // [rsp+10h] [rbp-58h]
long long v46; // [rsp+18h] [rbp-50h]
long long v47; // [rsp+20h] [rbp-48h]
unsigned int *v48; // [rsp+28h] [rbp-40h]
v16 = *(_QWORD *)(a1 + 5072);
v17 = a2[2];
if ( *(_QWORD *)(v17 + 16) != *(_QWORD *)(v16 + 16) )
{
v40 = "data->ne[0] == inputs->ne[0]";
v41 = 688;
goto LABEL_20;
}
v20 = *(_QWORD *)(v17 + 24);
v21 = *(_QWORD *)(v16 + 24);
v47 = v20 / v21;
if ( v20 % v21 )
{
v40 = "data->ne[1] % inputs->ne[1] == 0";
v41 = 693;
goto LABEL_20;
}
v48 = (unsigned int *)v16;
if ( a5 >= 0 )
v20 = a5;
if ( v20 % v21 )
{
v40 = "idata_split % ndata_batch == 0";
v41 = 697;
LABEL_20:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp",
v41,
(long long)"GGML_ASSERT(%s) failed",
(long long)v40,
a5,
(long long)a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v42);
}
v22 = *(unsigned int **)(a1 + 5088);
v43 = ggml_time_us();
v27 = 0LL;
v28 = 0LL;
v46 = v20 / v21;
if ( v20 / v21 > 0 )
v28 = v20 / v21;
while ( v28 != v27 )
{
ggml_opt_dataset_get_batch(a2, v48, v22, v27, v23, v24, a7, a8, a9, a10, v25, v26, a13, a14);
ggml_opt_forward_backward(a1, a3, a7, a8, a9, (__m128i)a10, v33, v34, a13, a14, v29, v30, v31, v32);
++v27;
if ( a6 )
a6(1LL, a1, a2, a3, v27, v46, v43);
}
v45 = ggml_time_us();
result = v20 / v21;
while ( v28 < v47 )
{
ggml_opt_dataset_get_batch(a2, v48, v22, v28, v35, v36, a7, a8, a9, a10, v37, v38, a13, a14);
result = ggml_opt_forward(a1, a4);
if ( a15 )
result = a15(0LL, a1, a2, a4, 1 - v46 + v28, v47 - v46, v45);
++v28;
}
return result;
}
| ggml_opt_epoch:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12,RDX
MOV R10,qword ptr [RDI + 0x13d0]
MOV RAX,qword ptr [RSI + 0x10]
MOV RDX,qword ptr [RAX + 0x10]
CMP RDX,qword ptr [R10 + 0x10]
JNZ 0x00130513
MOV R14,RSI
MOV R15,RDI
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [R10 + 0x18]
MOV RAX,RDI
CQO
IDIV RSI
MOV qword ptr [RSP + 0x20],RAX
TEST RDX,RDX
JNZ 0x0013052f
MOV qword ptr [RSP + 0x10],R9
MOV qword ptr [RSP + 0x28],R10
MOV qword ptr [RSP + 0x30],RCX
TEST R8,R8
CMOVNS RDI,R8
MOV RAX,RDI
CQO
IDIV RSI
TEST RDX,RDX
JNZ 0x0013054b
MOV R13,RAX
MOV RBP,qword ptr [R15 + 0x13e0]
CALL 0x0011fbc0
MOV qword ptr [RSP + 0x8],RAX
XOR EBX,EBX
TEST R13,R13
MOV RAX,R13
MOV R13D,0x0
MOV qword ptr [RSP + 0x18],RAX
CMOVG R13,RAX
LAB_00130439:
CMP R13,RBX
JZ 0x0013048a
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,RBP
MOV RCX,RBX
CALL 0x0011e760
MOV RDI,R15
MOV RSI,R12
CALL 0x0011d5d0
INC RBX
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00130439
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP],RCX
PUSH 0x1
POP RDI
MOV RSI,R15
MOV RDX,R14
MOV RCX,R12
MOV R8,RBX
MOV R9,qword ptr [RSP + 0x18]
CALL RAX
JMP 0x00130439
LAB_0013048a:
CALL 0x0011fbc0
MOV qword ptr [RSP + 0x10],RAX
MOV RCX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x18]
SUB RCX,RAX
MOV qword ptr [RSP + 0x8],RCX
PUSH 0x1
POP RBX
SUB RBX,RAX
MOV R12,qword ptr [RSP + 0x30]
LAB_001304b1:
CMP R13,qword ptr [RSP + 0x20]
JGE 0x00130504
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,RBP
MOV RCX,R13
CALL 0x0011e760
MOV RDI,R15
MOV RSI,R12
CALL 0x0011f340
CMP qword ptr [RSP + 0x70],0x0
JZ 0x001304ff
LEA R8,[RBX + R13*0x1]
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
XOR EDI,EDI
MOV RSI,R15
MOV RDX,R14
MOV RCX,R12
MOV R9,qword ptr [RSP + 0x8]
CALL qword ptr [RSP + 0x70]
LAB_001304ff:
INC R13
JMP 0x001304b1
LAB_00130504:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00130513:
LEA RDI,[0x1524b8]
LEA RDX,[0x14e5d5]
LEA RCX,[0x1527f0]
MOV ESI,0x2b0
JMP 0x00130565
LAB_0013052f:
LEA RDI,[0x1524b8]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15280d]
MOV ESI,0x2b5
JMP 0x00130565
LAB_0013054b:
LEA RDI,[0x1524b8]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15282e]
MOV ESI,0x2b9
LAB_00130565:
XOR EAX,EAX
CALL 0x0011f9b0
|
void ggml_opt_epoch(long param_1,long param_2,int8 param_3,int8 param_4,long param_5,
code *param_6,code *param_7)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
int8 uVar5;
char *pcVar6;
long lVar7;
int8 uVar8;
long lVar9;
lVar1 = *(long *)(param_1 + 0x13d0);
if (*(long *)(*(long *)(param_2 + 0x10) + 0x10) == *(long *)(lVar1 + 0x10)) {
lVar2 = *(long *)(*(long *)(param_2 + 0x10) + 0x18);
lVar3 = *(long *)(lVar1 + 0x18);
if (lVar2 % lVar3 == 0) {
lVar9 = lVar2;
if (-1 < param_5) {
lVar9 = param_5;
}
lVar4 = lVar9 / lVar3;
if (lVar9 % lVar3 == 0) {
uVar8 = *(int8 *)(param_1 + 0x13e0);
uVar5 = ggml_time_us();
lVar7 = 0;
lVar9 = 0;
if (0 < lVar4) {
lVar9 = lVar4;
}
while (lVar9 != lVar7) {
ggml_opt_dataset_get_batch(param_2,lVar1,uVar8,lVar7);
ggml_opt_forward_backward(param_1,param_3);
lVar7 = lVar7 + 1;
if (param_6 != (code *)0x0) {
(*param_6)(1,param_1,param_2,param_3,lVar7,lVar4,uVar5);
}
}
uVar5 = ggml_time_us();
for (; lVar9 < lVar2 / lVar3; lVar9 = lVar9 + 1) {
ggml_opt_dataset_get_batch(param_2,lVar1,uVar8,lVar9);
ggml_opt_forward(param_1,param_4);
if (param_7 != (code *)0x0) {
(*param_7)(0,param_1,param_2,param_4,(1 - lVar4) + lVar9,lVar2 / lVar3 - lVar4,uVar5);
}
}
return;
}
pcVar6 = "idata_split % ndata_batch == 0";
uVar8 = 0x2b9;
}
else {
pcVar6 = "data->ne[1] % inputs->ne[1] == 0";
uVar8 = 0x2b5;
}
}
else {
pcVar6 = "data->ne[0] == inputs->ne[0]";
uVar8 = 0x2b0;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp"
,uVar8,"GGML_ASSERT(%s) failed",pcVar6);
}
| |
47,188 | ggml_opt_epoch | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp | void ggml_opt_epoch(
ggml_opt_context_t opt_ctx,
ggml_opt_dataset_t dataset,
ggml_opt_result_t result_train,
ggml_opt_result_t result_eval,
int64_t idata_split,
ggml_opt_epoch_callback callback_train,
ggml_opt_epoch_callback callback_eval) {
struct ggml_tensor * inputs = ggml_opt_inputs(opt_ctx);
struct ggml_tensor * labels = ggml_opt_labels(opt_ctx);
struct ggml_tensor * data = ggml_opt_dataset_data(dataset);
GGML_ASSERT(data->ne[0] == inputs->ne[0]);
const int64_t ndata = data->ne[1];
const int64_t ndata_batch = inputs->ne[1];
GGML_ASSERT(data->ne[1] % inputs->ne[1] == 0);
const int64_t nbatches = ndata/ndata_batch;
idata_split = idata_split < 0 ? ndata : idata_split;
GGML_ASSERT(idata_split % ndata_batch == 0);
const int64_t ibatch_split = idata_split / ndata_batch;
int64_t ibatch = 0;
int64_t t_loop_start = ggml_time_us();
for (; ibatch < ibatch_split; ++ibatch) {
ggml_opt_dataset_get_batch(dataset, inputs, labels, ibatch);
ggml_opt_forward_backward(opt_ctx, result_train);
if (callback_train) {
callback_train(true, opt_ctx, dataset, result_train, ibatch+1, ibatch_split, t_loop_start);
}
}
t_loop_start = ggml_time_us();
for (; ibatch < nbatches; ++ibatch) {
ggml_opt_dataset_get_batch(dataset, inputs, labels, ibatch);
ggml_opt_forward(opt_ctx, result_eval);
if (callback_eval) {
callback_eval(false, opt_ctx, dataset, result_eval, ibatch+1-ibatch_split, nbatches-ibatch_split, t_loop_start);
}
}
} | O3 | cpp | ggml_opt_epoch:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rdi, %r15
movq 0x13d0(%rdi), %rdi
movq 0x10(%rsi), %rax
movq 0x10(%rax), %rdx
cmpq 0x10(%rdi), %rdx
jne 0x2afa8
movq %rsi, %r14
movq %rcx, 0x30(%rsp)
movq 0x18(%rax), %rcx
movq 0x18(%rdi), %rsi
movq %rcx, %rax
cqto
idivq %rsi
movq %rax, 0x10(%rsp)
testq %rdx, %rdx
jne 0x2afc4
testq %r8, %r8
cmovnsq %r8, %rcx
movq %rcx, %rax
cqto
idivq %rsi
testq %rdx, %rdx
jne 0x2afe0
movq %r9, %r13
movq %rax, %r12
movq %rdi, 0x20(%rsp)
movq 0x13e0(%r15), %rax
movq %rax, 0x18(%rsp)
callq 0x17e40
movq %rax, 0x8(%rsp)
testq %r12, %r12
jle 0x2af11
xorl %ebp, %ebp
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbp, %rcx
callq 0x17020
movq %r15, %rdi
movq %rbx, %rsi
callq 0x163a0
incq %rbp
testq %r13, %r13
je 0x2af07
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
movl $0x1, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq %rbp, %r8
movq %r12, %r9
callq *%r13
cmpq %rbp, %r12
jne 0x2aebf
movq %r12, %rbx
jmp 0x2af13
xorl %ebx, %ebx
callq 0x17e40
movq %rax, 0x8(%rsp)
cmpq 0x10(%rsp), %rbx
jge 0x2af99
movq 0x70(%rsp), %rbp
movq 0x10(%rsp), %rax
subq %r12, %rax
movq %rax, 0x28(%rsp)
movl $0x1, %r13d
subq %r12, %r13
movq 0x30(%rsp), %r12
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rcx
callq 0x17020
movq 0x1400(%r15), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x2a5ba
testq %rbp, %rbp
je 0x2af8f
leaq (%rbx,%r13), %r8
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
xorl %edi, %edi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq 0x28(%rsp), %r9
callq *%rbp
incq %rbx
cmpq %rbx, 0x10(%rsp)
jne 0x2af44
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x255c9(%rip), %rdi # 0x50578
leaq 0x216af(%rip), %rdx # 0x4c665
leaq 0x258f3(%rip), %rcx # 0x508b0
movl $0x2b0, %esi # imm = 0x2B0
jmp 0x2affa
leaq 0x255ad(%rip), %rdi # 0x50578
leaq 0x21693(%rip), %rdx # 0x4c665
leaq 0x258f4(%rip), %rcx # 0x508cd
movl $0x2b5, %esi # imm = 0x2B5
jmp 0x2affa
leaq 0x25591(%rip), %rdi # 0x50578
leaq 0x21677(%rip), %rdx # 0x4c665
leaq 0x258f9(%rip), %rcx # 0x508ee
movl $0x2b9, %esi # imm = 0x2B9
xorl %eax, %eax
callq 0x17cd0
| ggml_opt_epoch:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdx
mov r15, rdi
mov rdi, [rdi+13D0h]
mov rax, [rsi+10h]
mov rdx, [rax+10h]
cmp rdx, [rdi+10h]
jnz loc_2AFA8
mov r14, rsi
mov [rsp+68h+var_38], rcx
mov rcx, [rax+18h]
mov rsi, [rdi+18h]
mov rax, rcx
cqo
idiv rsi
mov [rsp+68h+var_58], rax
test rdx, rdx
jnz loc_2AFC4
test r8, r8
cmovns rcx, r8
mov rax, rcx
cqo
idiv rsi
test rdx, rdx
jnz loc_2AFE0
mov r13, r9
mov r12, rax
mov [rsp+68h+var_48], rdi
mov rax, [r15+13E0h]
mov [rsp+68h+var_50], rax
call _ggml_time_us
mov [rsp+68h+var_60], rax
test r12, r12
jle short loc_2AF11
xor ebp, ebp
loc_2AEBF:
mov rdi, r14
mov rsi, [rsp+68h+var_48]
mov rdx, [rsp+68h+var_50]
mov rcx, rbp
call _ggml_opt_dataset_get_batch
mov rdi, r15
mov rsi, rbx
call _ggml_opt_forward_backward
inc rbp
test r13, r13
jz short loc_2AF07
mov rax, [rsp+68h+var_60]
mov [rsp+68h+var_68], rax
mov edi, 1
mov rsi, r15
mov rdx, r14
mov rcx, rbx
mov r8, rbp
mov r9, r12
call r13
loc_2AF07:
cmp r12, rbp
jnz short loc_2AEBF
mov rbx, r12
jmp short loc_2AF13
loc_2AF11:
xor ebx, ebx
loc_2AF13:
call _ggml_time_us
mov [rsp+68h+var_60], rax
cmp rbx, [rsp+68h+var_58]
jge short loc_2AF99
mov rbp, [rsp+68h+arg_0]
mov rax, [rsp+68h+var_58]
sub rax, r12
mov [rsp+68h+var_40], rax
mov r13d, 1
sub r13, r12
mov r12, [rsp+68h+var_38]
loc_2AF44:
mov rdi, r14
mov rsi, [rsp+68h+var_48]
mov rdx, [rsp+68h+var_50]
mov rcx, rbx
call _ggml_opt_dataset_get_batch
mov rsi, [r15+1400h]
mov rdi, r15
mov rdx, r12
call _ZL19ggml_opt_eval_graphP16ggml_opt_contextP11ggml_cgraphP15ggml_opt_result; ggml_opt_eval_graph(ggml_opt_context *,ggml_cgraph *,ggml_opt_result *)
test rbp, rbp
jz short loc_2AF8F
lea r8, [rbx+r13]
mov rax, [rsp+68h+var_60]
mov [rsp+68h+var_68], rax
xor edi, edi
mov rsi, r15
mov rdx, r14
mov rcx, r12
mov r9, [rsp+68h+var_40]
call rbp
loc_2AF8F:
inc rbx
cmp [rsp+68h+var_58], rbx
jnz short loc_2AF44
loc_2AF99:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2AFA8:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDataNe0InputsN; "data->ne[0] == inputs->ne[0]"
mov esi, 2B0h
jmp short loc_2AFFA
loc_2AFC4:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDataNe1InputsN; "data->ne[1] % inputs->ne[1] == 0"
mov esi, 2B5h
jmp short loc_2AFFA
loc_2AFE0:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIdataSplitNdat; "idata_split % ndata_batch == 0"
mov esi, 2B9h
loc_2AFFA:
xor eax, eax
call _ggml_abort
| void ggml_opt_epoch(
_QWORD *a1,
_QWORD *a2,
long long *a3,
long long *a4,
long long a5,
void ( *a6)(long long, _QWORD *, _QWORD *, long long *, long long, long long, long long),
double a7,
__m128 a8,
__m128 a9,
__m128i a10,
double a11,
double a12,
__m128i a13,
__m128 a14,
void ( *a15)(_QWORD, _QWORD *, _QWORD *, long long *, long long, long long, long long))
{
long long v17; // rdi
long long v18; // rax
long long v20; // rcx
long long v21; // rsi
long long v23; // r12
int v24; // r8d
int v25; // r9d
long long v26; // rbp
long long v27; // rdx
long long v28; // rcx
int v29; // r8d
int v30; // r9d
double v31; // xmm4_8
double v32; // xmm5_8
long long v33; // rbx
int v34; // r8d
int v35; // r9d
long long v36; // rcx
int v37; // r8d
int v38; // r9d
double v39; // xmm4_8
double v40; // xmm5_8
const char *v41; // rcx
int v42; // esi
long long v43; // [rsp+8h] [rbp-60h]
long long v44; // [rsp+8h] [rbp-60h]
long long v45; // [rsp+10h] [rbp-58h]
unsigned int *v46; // [rsp+18h] [rbp-50h]
v17 = a1[634];
v18 = a2[2];
if ( *(_QWORD *)(v18 + 16) != *(_QWORD *)(v17 + 16) )
{
v41 = "data->ne[0] == inputs->ne[0]";
v42 = 688;
goto LABEL_21;
}
v20 = *(_QWORD *)(v18 + 24);
v21 = *(_QWORD *)(v17 + 24);
v45 = v20 / v21;
if ( v20 % v21 )
{
v41 = "data->ne[1] % inputs->ne[1] == 0";
v42 = 693;
goto LABEL_21;
}
if ( a5 >= 0 )
v20 = a5;
if ( v20 % v21 )
{
v41 = "idata_split % ndata_batch == 0";
v42 = 697;
LABEL_21:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp",
v42,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v41,
a5,
(_DWORD)a6);
}
v23 = v20 / v21;
v46 = (unsigned int *)a1[636];
v43 = ggml_time_us();
if ( v23 <= 0 )
{
v33 = 0LL;
}
else
{
v26 = 0LL;
do
{
ggml_opt_dataset_get_batch(a2, (unsigned int *)v17, v46, v26, v24, v25);
ggml_opt_forward_backward((unsigned long long)a1, a3, a7, a8, a9, a10, v31, v32, a13, a14, v27, v28, v29, v30);
++v26;
if ( a6 )
a6(1LL, a1, a2, a3, v26, v23, v43);
}
while ( v23 != v26 );
v33 = v23;
}
v44 = ggml_time_us();
if ( v33 < v45 )
{
do
{
ggml_opt_dataset_get_batch(a2, (unsigned int *)v17, v46, v33, v34, v35);
ggml_opt_eval_graph((unsigned long long)a1, a1[640], a4, a7, a8, a9, a10, v39, v40, a13, a14, v36, v37, v38);
if ( a15 )
a15(0LL, a1, a2, a4, v33 + 1 - v23, v45 - v23, v44);
++v33;
}
while ( v45 != v33 );
}
}
| ggml_opt_epoch:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDX
MOV R15,RDI
MOV RDI,qword ptr [RDI + 0x13d0]
MOV RAX,qword ptr [RSI + 0x10]
MOV RDX,qword ptr [RAX + 0x10]
CMP RDX,qword ptr [RDI + 0x10]
JNZ 0x0012afa8
MOV R14,RSI
MOV qword ptr [RSP + 0x30],RCX
MOV RCX,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RDI + 0x18]
MOV RAX,RCX
CQO
IDIV RSI
MOV qword ptr [RSP + 0x10],RAX
TEST RDX,RDX
JNZ 0x0012afc4
TEST R8,R8
CMOVNS RCX,R8
MOV RAX,RCX
CQO
IDIV RSI
TEST RDX,RDX
JNZ 0x0012afe0
MOV R13,R9
MOV R12,RAX
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [R15 + 0x13e0]
MOV qword ptr [RSP + 0x18],RAX
CALL 0x00117e40
MOV qword ptr [RSP + 0x8],RAX
TEST R12,R12
JLE 0x0012af11
XOR EBP,EBP
LAB_0012aebf:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,RBP
CALL 0x00117020
MOV RDI,R15
MOV RSI,RBX
CALL 0x001163a0
INC RBP
TEST R13,R13
JZ 0x0012af07
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP],RAX
MOV EDI,0x1
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
MOV R8,RBP
MOV R9,R12
CALL R13
LAB_0012af07:
CMP R12,RBP
JNZ 0x0012aebf
MOV RBX,R12
JMP 0x0012af13
LAB_0012af11:
XOR EBX,EBX
LAB_0012af13:
CALL 0x00117e40
MOV qword ptr [RSP + 0x8],RAX
CMP RBX,qword ptr [RSP + 0x10]
JGE 0x0012af99
MOV RBP,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x10]
SUB RAX,R12
MOV qword ptr [RSP + 0x28],RAX
MOV R13D,0x1
SUB R13,R12
MOV R12,qword ptr [RSP + 0x30]
LAB_0012af44:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,RBX
CALL 0x00117020
MOV RSI,qword ptr [R15 + 0x1400]
MOV RDI,R15
MOV RDX,R12
CALL 0x0012a5ba
TEST RBP,RBP
JZ 0x0012af8f
LEA R8,[RBX + R13*0x1]
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP],RAX
XOR EDI,EDI
MOV RSI,R15
MOV RDX,R14
MOV RCX,R12
MOV R9,qword ptr [RSP + 0x28]
CALL RBP
LAB_0012af8f:
INC RBX
CMP qword ptr [RSP + 0x10],RBX
JNZ 0x0012af44
LAB_0012af99:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012afa8:
LEA RDI,[0x150578]
LEA RDX,[0x14c665]
LEA RCX,[0x1508b0]
MOV ESI,0x2b0
JMP 0x0012affa
LAB_0012afc4:
LEA RDI,[0x150578]
LEA RDX,[0x14c665]
LEA RCX,[0x1508cd]
MOV ESI,0x2b5
JMP 0x0012affa
LAB_0012afe0:
LEA RDI,[0x150578]
LEA RDX,[0x14c665]
LEA RCX,[0x1508ee]
MOV ESI,0x2b9
LAB_0012affa:
XOR EAX,EAX
CALL 0x00117cd0
|
void ggml_opt_epoch(ggml_opt_context *param_1,long param_2,int8 param_3,
ggml_opt_result *param_4,long param_5,code *param_6,code *param_7)
{
long lVar1;
long lVar2;
long lVar3;
int8 uVar4;
char *pcVar5;
long lVar6;
long lVar7;
int8 uVar8;
lVar1 = *(long *)(param_1 + 0x13d0);
if (*(long *)(*(long *)(param_2 + 0x10) + 0x10) == *(long *)(lVar1 + 0x10)) {
lVar6 = *(long *)(*(long *)(param_2 + 0x10) + 0x18);
lVar7 = *(long *)(lVar1 + 0x18);
lVar2 = lVar6 / lVar7;
if (lVar6 % lVar7 == 0) {
if (-1 < param_5) {
lVar6 = param_5;
}
lVar3 = lVar6 / lVar7;
if (lVar6 % lVar7 == 0) {
uVar8 = *(int8 *)(param_1 + 0x13e0);
uVar4 = ggml_time_us();
if (lVar3 < 1) {
lVar6 = 0;
}
else {
lVar7 = 0;
do {
ggml_opt_dataset_get_batch(param_2,lVar1,uVar8,lVar7);
ggml_opt_forward_backward(param_1,param_3);
lVar7 = lVar7 + 1;
if (param_6 != (code *)0x0) {
(*param_6)(1,param_1,param_2,param_3,lVar7,lVar3,uVar4);
}
lVar6 = lVar3;
} while (lVar3 != lVar7);
}
uVar4 = ggml_time_us();
if (lVar6 < lVar2) {
do {
ggml_opt_dataset_get_batch(param_2,lVar1,uVar8,lVar6);
ggml_opt_eval_graph(param_1,*(ggml_cgraph **)(param_1 + 0x1400),param_4);
if (param_7 != (code *)0x0) {
(*param_7)(0,param_1,param_2,param_4,lVar6 + (1 - lVar3),lVar2 - lVar3,uVar4);
}
lVar6 = lVar6 + 1;
} while (lVar2 != lVar6);
}
return;
}
pcVar5 = "idata_split % ndata_batch == 0";
uVar8 = 0x2b9;
}
else {
pcVar5 = "data->ne[1] % inputs->ne[1] == 0";
uVar8 = 0x2b5;
}
}
else {
pcVar5 = "data->ne[0] == inputs->ne[0]";
uVar8 = 0x2b0;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp"
,uVar8,"GGML_ASSERT(%s) failed",pcVar5);
}
| |
47,189 | my_hrtime | eloqsql/mysys/my_getsystime.c | my_hrtime_t my_hrtime()
{
my_hrtime_t hrtime;
#if defined(_WIN32)
ulonglong newtime;
GetSystemTimePreciseAsFileTime((FILETIME*)&newtime);
hrtime.val= (newtime - OFFSET_TO_EPOC)/10;
#elif defined(HAVE_CLOCK_GETTIME)
struct timespec tp;
clock_gettime(CLOCK_REALTIME, &tp);
hrtime.val= tp.tv_sec*1000000ULL+tp.tv_nsec/1000ULL;
#else
struct timeval t;
/* The following loop is here because gettimeofday may fail */
while (gettimeofday(&t, NULL) != 0) {}
hrtime.val= t.tv_sec*1000000ULL + t.tv_usec;
#endif
DBUG_EXECUTE_IF("system_time_plus_one_hour", hrtime.val += 3600*1000000ULL;);
DBUG_EXECUTE_IF("system_time_minus_one_hour", hrtime.val -= 3600*1000000ULL;);
return hrtime;
} | O0 | c | my_hrtime:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
xorl %edi, %edi
leaq -0x18(%rbp), %rsi
callq 0x2a270
imulq $0xf4240, -0x18(%rbp), %rax # imm = 0xF4240
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x3e8, %ecx # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x7f0dd
jmp 0x7f0df
jmp 0x7f0e1
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_hrtime:
push rbp
mov rbp, rsp
sub rsp, 20h
xor edi, edi
lea rsi, [rbp+var_18]
call _clock_gettime
imul rax, [rbp+var_18], 0F4240h
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov ecx, 3E8h
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rbp+var_20]
add rax, rcx
mov [rbp+var_8], rax
jmp short $+2
loc_7F0DD:
jmp short $+2
loc_7F0DF:
jmp short $+2
loc_7F0E1:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| unsigned long long my_hrtime()
{
long long v1; // [rsp+8h] [rbp-18h] BYREF
unsigned long long v2; // [rsp+10h] [rbp-10h]
clock_gettime(0LL, &v1);
return v2 / 0x3E8 + 1000000 * v1;
}
| my_hrtime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
XOR EDI,EDI
LEA RSI,[RBP + -0x18]
CALL 0x0012a270
IMUL RAX,qword ptr [RBP + -0x18],0xf4240
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x3e8
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0017f0dd
LAB_0017f0dd:
JMP 0x0017f0df
LAB_0017f0df:
JMP 0x0017f0e1
LAB_0017f0e1:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long my_hrtime(void)
{
timespec local_20;
clock_gettime(0,&local_20);
return local_20.tv_sec * 1000000 + (ulong)local_20.tv_nsec / 1000;
}
| |
47,190 | my_casedn_utf32 | eloqsql/strings/ctype-ucs2.c | static size_t
my_casedn_utf32(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((res= my_utf32_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0)
{
my_tolower_utf32(uni_plane,&wc);
if (res != my_uni_utf32(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O3 | c | my_casedn_utf32:
movq %rdx, %rax
cmpq $0x4, %rdx
jl 0x48689
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq (%rsi,%rax), %rdx
addq %rcx, %r8
movq 0x78(%rdi), %rdi
addq $0x4, %rcx
movzbl (%rsi), %r9d
shll $0x18, %r9d
movzbl 0x1(%rsi), %r10d
shll $0x10, %r10d
orl %r9d, %r10d
cmpl $0x10ffff, %r10d # imm = 0x10FFFF
ja 0x48687
movzbl 0x2(%rsi), %ebx
shll $0x8, %ebx
movzbl 0x3(%rsi), %r9d
orq %r9, %rbx
orq %r10, %rbx
cmpq (%rdi), %rbx
ja 0x48650
movq 0x8(%rdi), %r10
movl %ebx, %r11d
shrl $0x8, %r11d
movq (%r10,%r11,8), %r10
testq %r10, %r10
je 0x48650
leaq (%r9,%r9,2), %r9
movl 0x4(%r10,%r9,4), %ebx
cmpq %r8, %rcx
ja 0x48687
cmpl $0x10ffff, %ebx # imm = 0x10FFFF
ja 0x48687
movb $0x0, -0x4(%rcx)
movl %ebx, %r9d
shrl $0x10, %r9d
movb %r9b, -0x3(%rcx)
movb %bh, -0x2(%rcx)
movb %bl, -0x1(%rcx)
leaq 0x8(%rsi), %r9
addq $0x4, %rcx
addq $0x4, %rsi
cmpq %rdx, %r9
jbe 0x485ff
popq %rbx
popq %rbp
retq
| my_casedn_utf32:
mov rax, rdx
cmp rdx, 4
jl locret_48689
push rbp
mov rbp, rsp
push rbx
lea rdx, [rsi+rax]
add r8, rcx
mov rdi, [rdi+78h]
add rcx, 4
loc_485FF:
movzx r9d, byte ptr [rsi]
shl r9d, 18h
movzx r10d, byte ptr [rsi+1]
shl r10d, 10h
or r10d, r9d
cmp r10d, offset unk_10FFFF
ja short loc_48687
movzx ebx, byte ptr [rsi+2]
shl ebx, 8
movzx r9d, byte ptr [rsi+3]
or rbx, r9
or rbx, r10
cmp rbx, [rdi]
ja short loc_48650
mov r10, [rdi+8]
mov r11d, ebx
shr r11d, 8
mov r10, [r10+r11*8]
test r10, r10
jz short loc_48650
lea r9, [r9+r9*2]
mov ebx, [r10+r9*4+4]
loc_48650:
cmp rcx, r8
ja short loc_48687
cmp ebx, offset unk_10FFFF
ja short loc_48687
mov byte ptr [rcx-4], 0
mov r9d, ebx
shr r9d, 10h
mov [rcx-3], r9b
mov [rcx-2], bh
mov [rcx-1], bl
lea r9, [rsi+8]
add rcx, 4
add rsi, 4
cmp r9, rdx
jbe loc_485FF
loc_48687:
pop rbx
pop rbp
locret_48689:
retn
| long long my_casedn_utf32(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5)
{
long long result; // rax
unsigned __int8 *v6; // rdx
unsigned long long v7; // r8
unsigned long long *v8; // rdi
unsigned long long v9; // rcx
long long v10; // r10
long long v11; // r9
unsigned long long v12; // rbx
long long v13; // r10
unsigned __int8 *v14; // r9
result = a3;
if ( a3 >= 4 )
{
v6 = &a2[a3];
v7 = a4 + a5;
v8 = *(unsigned long long **)(a1 + 120);
v9 = a4 + 4;
do
{
v10 = (*a2 << 24) | (a2[1] << 16);
if ( (unsigned int)v10 > (unsigned int)&unk_10FFFF )
break;
v11 = a2[3];
v12 = v10 | v11 | (a2[2] << 8);
if ( v12 <= *v8 )
{
v13 = *(_QWORD *)(v8[1] + 8LL * ((unsigned int)v12 >> 8));
if ( v13 )
LODWORD(v12) = *(_DWORD *)(v13 + 12 * v11 + 4);
}
if ( v9 > v7 )
break;
if ( (unsigned int)v12 > (unsigned int)&unk_10FFFF )
break;
*(_BYTE *)(v9 - 4) = 0;
*(_BYTE *)(v9 - 3) = BYTE2(v12);
*(_BYTE *)(v9 - 2) = BYTE1(v12);
*(_BYTE *)(v9 - 1) = v12;
v14 = a2 + 8;
v9 += 4LL;
a2 += 4;
}
while ( v14 <= v6 );
}
return result;
}
| my_casedn_utf32:
MOV RAX,RDX
CMP RDX,0x4
JL 0x00148689
PUSH RBP
MOV RBP,RSP
PUSH RBX
LEA RDX,[RSI + RAX*0x1]
ADD R8,RCX
MOV RDI,qword ptr [RDI + 0x78]
ADD RCX,0x4
LAB_001485ff:
MOVZX R9D,byte ptr [RSI]
SHL R9D,0x18
MOVZX R10D,byte ptr [RSI + 0x1]
SHL R10D,0x10
OR R10D,R9D
CMP R10D,0x10ffff
JA 0x00148687
MOVZX EBX,byte ptr [RSI + 0x2]
SHL EBX,0x8
MOVZX R9D,byte ptr [RSI + 0x3]
OR RBX,R9
OR RBX,R10
CMP RBX,qword ptr [RDI]
JA 0x00148650
MOV R10,qword ptr [RDI + 0x8]
MOV R11D,EBX
SHR R11D,0x8
MOV R10,qword ptr [R10 + R11*0x8]
TEST R10,R10
JZ 0x00148650
LEA R9,[R9 + R9*0x2]
MOV EBX,dword ptr [R10 + R9*0x4 + 0x4]
LAB_00148650:
CMP RCX,R8
JA 0x00148687
CMP EBX,0x10ffff
JA 0x00148687
MOV byte ptr [RCX + -0x4],0x0
MOV R9D,EBX
SHR R9D,0x10
MOV byte ptr [RCX + -0x3],R9B
MOV byte ptr [RCX + -0x2],BH
MOV byte ptr [RCX + -0x1],BL
LEA R9,[RSI + 0x8]
ADD RCX,0x4
ADD RSI,0x4
CMP R9,RDX
JBE 0x001485ff
LAB_00148687:
POP RBX
POP RBP
LAB_00148689:
RET
|
void my_casedn_utf32(long param_1,byte *param_2,long param_3,long param_4,long param_5)
{
byte *pbVar1;
byte *pbVar2;
ulong *puVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
uint uVar7;
if (3 < param_3) {
pbVar2 = param_2 + param_3;
puVar3 = *(ulong **)(param_1 + 0x78);
uVar5 = param_4 + 4;
while (uVar7 = (uint)param_2[1] << 0x10 | (uint)*param_2 << 0x18, uVar7 < 0x110000) {
uVar6 = (ulong)CONCAT11(param_2[2],param_2[3]) | (ulong)uVar7;
if ((uVar6 <= *puVar3) && (lVar4 = *(long *)(puVar3[1] + (uVar6 >> 8) * 8), lVar4 != 0)) {
uVar6 = (ulong)*(uint *)(lVar4 + 4 + (ulong)param_2[3] * 0xc);
}
if ((ulong)(param_5 + param_4) < uVar5) {
return;
}
if (0x10ffff < (uint)uVar6) {
return;
}
*(int1 *)(uVar5 - 4) = 0;
*(char *)(uVar5 - 3) = (char)(uVar6 >> 0x10);
*(char *)(uVar5 - 2) = (char)(uVar6 >> 8);
*(char *)(uVar5 - 1) = (char)uVar6;
pbVar1 = param_2 + 8;
uVar5 = uVar5 + 4;
param_2 = param_2 + 4;
if (pbVar2 < pbVar1) {
return;
}
}
}
return;
}
| |
47,191 | my_fill_utf8mb3 | eloqsql/strings/ctype-utf8.c | static void
my_fill_utf8mb3(CHARSET_INFO *cs, char *str, size_t length, int fill)
{
if (fill < 0x80)
my_fill_8bit(cs, str, length, fill);
else
my_fill_utf8mb3_mb(cs, str, length, fill);
} | O3 | c | my_fill_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpl $0x7f, %ecx
jg 0x55319
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x5539d
movq %rbx, %rsi
movq %r15, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3f3df
leaq (%rbx,%r15), %r14
movq 0xb8(%rdi), %rax
movl %ecx, %esi
leaq -0x30(%rbp), %rcx
leaq -0x3a(%rbp), %rdx
callq *0xd8(%rax)
movsbq %al, %r12
cmpq %r15, %r12
jle 0x55342
movq %rbx, %r13
jmp 0x55367
movsbq %al, %r15
movq %rbx, %r13
movq %rbx, %rdi
leaq -0x3a(%rbp), %rsi
movq %r15, %rdx
callq 0x24210
addq %r12, %rbx
addq %r12, %r13
leaq (%rbx,%r12), %rax
cmpq %r14, %rax
jbe 0x55349
cmpq %r14, %rbx
jae 0x5537f
subq %r13, %r14
movq %rbx, %rdi
movl $0x20, %esi
movq %r14, %rdx
callq 0x24170
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x5539d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24300
| my_fill_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
cmp ecx, 7Fh
jg short loc_55319
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_5539D
mov rsi, rbx
mov rdx, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp my_fill_8bit
loc_55319:
lea r14, [rbx+r15]
mov rax, [rdi+0B8h]
mov esi, ecx
lea rcx, [rbp+var_30]
lea rdx, [rbp+var_3A]
call qword ptr [rax+0D8h]
movsx r12, al
cmp r12, r15
jle short loc_55342
mov r13, rbx
jmp short loc_55367
loc_55342:
movsx r15, al
mov r13, rbx
loc_55349:
mov rdi, rbx
lea rsi, [rbp+var_3A]
mov rdx, r15
call _memcpy
add rbx, r12
add r13, r12
lea rax, [rbx+r12]
cmp rax, r14
jbe short loc_55349
loc_55367:
cmp rbx, r14
jnb short loc_5537F
sub r14, r13
mov rdi, rbx
mov esi, 20h ; ' '
mov rdx, r14
call _memset
loc_5537F:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_5539D
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5539D:
call ___stack_chk_fail
| long long my_fill_utf8mb3(long long a1, long long a2, long long a3, signed int a4)
{
unsigned long long v5; // rbx
unsigned long long v7; // r14
char v8; // al
long long v9; // r12
long long v10; // r13
long long v11; // r15
_BYTE v12[10]; // [rsp+6h] [rbp-3Ah] BYREF
unsigned long long v13[6]; // [rsp+10h] [rbp-30h] BYREF
v5 = a2;
v13[0] = __readfsqword(0x28u);
if ( a4 <= 127 )
return my_fill_8bit(a1, a2, a3, a4);
v7 = a2 + a3;
v8 = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))(
a1,
(unsigned int)a4,
v12,
v13);
v9 = v8;
if ( v8 <= a3 )
{
v11 = v8;
v10 = a2;
do
{
memcpy(v5, v12, v11);
v5 += v9;
v10 += v9;
}
while ( v5 + v9 <= v7 );
}
else
{
v10 = a2;
}
if ( v5 < v7 )
memset(v5, 32LL, v7 - v10);
return __readfsqword(0x28u);
}
| my_fill_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP ECX,0x7f
JG 0x00155319
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015539d
MOV RSI,RBX
MOV RDX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0013f3df
LAB_00155319:
LEA R14,[RBX + R15*0x1]
MOV RAX,qword ptr [RDI + 0xb8]
MOV ESI,ECX
LEA RCX,[RBP + -0x30]
LEA RDX,[RBP + -0x3a]
CALL qword ptr [RAX + 0xd8]
MOVSX R12,AL
CMP R12,R15
JLE 0x00155342
MOV R13,RBX
JMP 0x00155367
LAB_00155342:
MOVSX R15,AL
MOV R13,RBX
LAB_00155349:
MOV RDI,RBX
LEA RSI,[RBP + -0x3a]
MOV RDX,R15
CALL 0x00124210
ADD RBX,R12
ADD R13,R12
LEA RAX,[RBX + R12*0x1]
CMP RAX,R14
JBE 0x00155349
LAB_00155367:
CMP RBX,R14
JNC 0x0015537f
SUB R14,R13
MOV RDI,RBX
MOV ESI,0x20
MOV RDX,R14
CALL 0x00124170
LAB_0015537f:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015539d
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015539d:
CALL 0x00124300
|
void my_fill_utf8mb3(long param_1,void *param_2,long param_3,int param_4)
{
void *pvVar1;
char cVar2;
long lVar3;
void *pvVar4;
long in_FS_OFFSET;
int1 local_42 [10];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (param_4 < 0x80) {
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
my_fill_8bit(param_1,param_2,param_3);
return;
}
}
else {
pvVar1 = (void *)((long)param_2 + param_3);
cVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,param_4,local_42,&local_38);
lVar3 = (long)cVar2;
pvVar4 = param_2;
if (lVar3 <= param_3) {
do {
memcpy(param_2,local_42,(long)cVar2);
param_2 = (void *)((long)param_2 + lVar3);
pvVar4 = (void *)((long)pvVar4 + lVar3);
} while ((void *)((long)param_2 + lVar3) <= pvVar1);
}
if (param_2 < pvVar1) {
memset(param_2,0x20,(long)pvVar1 - (long)pvVar4);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
47,192 | google::protobuf::internal::DynamicMapField::LookupMapValue(google::protobuf::MapKey const&, google::protobuf::MapValueConstRef*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.cc | bool DynamicMapField::LookupMapValue(const MapKey& map_key,
MapValueConstRef* val) const {
const Map<MapKey, MapValueRef>& map = GetMap();
Map<MapKey, MapValueRef>::const_iterator iter = map.find(map_key);
if (iter == map.end()) {
return false;
}
// map_key is already in the map. Make sure (*map)[map_key] is not called.
// [] may reorder the map and iterators.
val->CopyFrom(iter->second);
return true;
} | O0 | cpp | google::protobuf::internal::DynamicMapField::LookupMapValue(google::protobuf::MapKey const&, google::protobuf::MapValueConstRef*) const:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x58(%rsp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x1d0940
movq 0x40(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x1d09c0
leaq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1d0b00
testb $0x1, %al
jne 0x1cc69e
jmp 0x1cc6a5
movb $0x0, 0x67(%rsp)
jmp 0x1cc6cf
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x1d0b30
movq 0x8(%rsp), %rdi
movq %rax, %rsi
addq $0x28, %rsi
callq 0x1d0ad0
movb $0x1, 0x67(%rsp)
movb 0x67(%rsp), %al
andb $0x1, %al
addq $0x68, %rsp
retq
nopw (%rax,%rax)
| _ZNK6google8protobuf8internal15DynamicMapField14LookupMapValueERKNS0_6MapKeyEPNS0_16MapValueConstRefE:
sub rsp, 68h
mov [rsp+68h+var_10], rdi
mov [rsp+68h+var_18], rsi
mov [rsp+68h+var_20], rdx
mov rdi, [rsp+68h+var_10]
mov rax, [rdi]
call qword ptr [rax+98h]
mov [rsp+68h+var_28], rax
mov rsi, [rsp+68h+var_28]
mov rdx, [rsp+68h+var_18]
lea rdi, [rsp+68h+var_40]
call _ZNK6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE4findIS2_EENS4_14const_iteratorERKS2_; google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::find<google::protobuf::MapKey>(google::protobuf::MapKey const&)
mov rsi, [rsp+68h+var_28]
lea rdi, [rsp+68h+var_58]
call _ZNK6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE3endEv; google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::end(void)
lea rdi, [rsp+68h+var_40]
lea rsi, [rsp+68h+var_58]
call _ZN6google8protobufeqERKNS0_3MapINS0_6MapKeyENS0_11MapValueRefEE14const_iteratorES7_; google::protobuf::operator==(google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::const_iterator const&,google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::const_iterator const&)
test al, 1
jnz short loc_1CC69E
jmp short loc_1CC6A5
loc_1CC69E:
mov [rsp+68h+var_1], 0
jmp short loc_1CC6CF
loc_1CC6A5:
mov rax, [rsp+68h+var_20]
mov [rsp+68h+var_60], rax
lea rdi, [rsp+68h+var_40]
call _ZNK6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE14const_iteratorptEv; google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::const_iterator::operator->(void)
mov rdi, [rsp+68h+var_60]; this
mov rsi, rax
add rsi, 28h ; '('; google::protobuf::MapValueConstRef *
call _ZN6google8protobuf16MapValueConstRef8CopyFromERKS1_; google::protobuf::MapValueConstRef::CopyFrom(google::protobuf::MapValueConstRef const&)
mov [rsp+68h+var_1], 1
loc_1CC6CF:
mov al, [rsp+68h+var_1]
and al, 1
add rsp, 68h
retn
| char google::protobuf::internal::DynamicMapField::LookupMapValue(
google::protobuf::internal::DynamicMapField *this,
const google::protobuf::MapKey *a2,
google::protobuf::MapValueConstRef *a3)
{
long long v3; // rax
google::protobuf::MapValueConstRef *v5; // [rsp+8h] [rbp-60h]
_BYTE v6[24]; // [rsp+10h] [rbp-58h] BYREF
_BYTE v7[24]; // [rsp+28h] [rbp-40h] BYREF
long long v8; // [rsp+40h] [rbp-28h]
google::protobuf::MapValueConstRef *v9; // [rsp+48h] [rbp-20h]
const google::protobuf::MapKey *v10; // [rsp+50h] [rbp-18h]
google::protobuf::internal::DynamicMapField *v11; // [rsp+58h] [rbp-10h]
v11 = this;
v10 = a2;
v9 = a3;
v8 = (*(long long ( **)(google::protobuf::internal::DynamicMapField *))(*(_QWORD *)this + 152LL))(this);
google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::find<google::protobuf::MapKey>(
v7,
v8,
a2);
google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::end(v6, v8);
if ( (google::protobuf::operator==(v7, v6) & 1) != 0 )
return 0;
v5 = v9;
v3 = google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::const_iterator::operator->(v7);
google::protobuf::MapValueConstRef::CopyFrom(v5, (const google::protobuf::MapValueConstRef *)(v3 + 40));
return 1;
}
| |||
47,193 | google::protobuf::internal::DynamicMapField::LookupMapValue(google::protobuf::MapKey const&, google::protobuf::MapValueConstRef*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.cc | bool DynamicMapField::LookupMapValue(const MapKey& map_key,
MapValueConstRef* val) const {
const Map<MapKey, MapValueRef>& map = GetMap();
Map<MapKey, MapValueRef>::const_iterator iter = map.find(map_key);
if (iter == map.end()) {
return false;
}
// map_key is already in the map. Make sure (*map)[map_key] is not called.
// [] may reorder the map and iterators.
val->CopyFrom(iter->second);
return true;
} | O3 | cpp | google::protobuf::internal::DynamicMapField::LookupMapValue(google::protobuf::MapKey const&, google::protobuf::MapValueConstRef*) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %rax
callq *0x98(%rax)
movq %rsp, %r15
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x9da52
movq (%r15), %rax
testq %rax, %rax
je 0x9a586
movl 0x30(%rax), %ecx
movl %ecx, 0x8(%rbx)
movq 0x28(%rax), %rcx
movq %rcx, (%rbx)
testq %rax, %rax
setne %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
| _ZNK6google8protobuf8internal15DynamicMapField14LookupMapValueERKNS0_6MapKeyEPNS0_16MapValueConstRefE:
push r15
push r14
push rbx
sub rsp, 20h
mov rbx, rdx
mov r14, rsi
mov rax, [rdi]
call qword ptr [rax+98h]
mov r15, rsp
mov rdi, r15
mov rsi, rax
mov rdx, r14
xor ecx, ecx
call _ZNK6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE8InnerMap10FindHelperIS2_EESt4pairINS5_13iterator_baseIKNS0_7MapPairIS2_S3_EEEEmERKT_PSt17_Rb_tree_iteratorIS7_IKSt17reference_wrapperIKS2_EPvEE; google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::FindHelper<google::protobuf::MapKey>(google::protobuf::MapKey const&,std::_Rb_tree_iterator<std::pair<std::reference_wrapper<google::protobuf::MapKey const> const,void *>> *)
mov rax, [r15]
test rax, rax
jz short loc_9A586
mov ecx, [rax+30h]
mov [rbx+8], ecx
mov rcx, [rax+28h]
mov [rbx], rcx
loc_9A586:
test rax, rax
setnz al
add rsp, 20h
pop rbx
pop r14
pop r15
retn
| bool google::protobuf::internal::DynamicMapField::LookupMapValue(
google::protobuf::internal::DynamicMapField *this,
const google::protobuf::MapKey *a2,
google::protobuf::MapValueConstRef *a3)
{
long long v4; // rax
long long v5; // rax
_QWORD v7[7]; // [rsp+0h] [rbp-38h] BYREF
v4 = (*(long long ( **)(google::protobuf::internal::DynamicMapField *))(*(_QWORD *)this + 152LL))(this);
google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::FindHelper<google::protobuf::MapKey>(
v7,
v4,
a2,
0LL);
v5 = v7[0];
if ( v7[0] )
{
*((_DWORD *)a3 + 2) = *(_DWORD *)(v7[0] + 48LL);
*(_QWORD *)a3 = *(_QWORD *)(v5 + 40);
}
return v5 != 0;
}
| LookupMapValue:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV RBX,RDX
MOV R14,RSI
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x98]
MOV R15,RSP
MOV RDI,R15
MOV RSI,RAX
MOV RDX,R14
XOR ECX,ECX
CALL 0x0019da52
MOV RAX,qword ptr [R15]
TEST RAX,RAX
JZ 0x0019a586
MOV ECX,dword ptr [RAX + 0x30]
MOV dword ptr [RBX + 0x8],ECX
MOV RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RBX],RCX
LAB_0019a586:
TEST RAX,RAX
SETNZ AL
ADD RSP,0x20
POP RBX
POP R14
POP R15
RET
|
/* google::protobuf::internal::DynamicMapField::LookupMapValue(google::protobuf::MapKey const&,
google::protobuf::MapValueConstRef*) const */
bool __thiscall
google::protobuf::internal::DynamicMapField::LookupMapValue
(DynamicMapField *this,MapKey *param_1,MapValueConstRef *param_2)
{
_Rb_tree_iterator *p_Var1;
long local_38 [4];
p_Var1 = (_Rb_tree_iterator *)(**(code **)(*(long *)this + 0x98))();
Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::
FindHelper<google::protobuf::MapKey>((MapKey *)local_38,p_Var1);
if (local_38[0] != 0) {
*(int4 *)(param_2 + 8) = *(int4 *)(local_38[0] + 0x30);
*(int8 *)param_2 = *(int8 *)(local_38[0] + 0x28);
}
return local_38[0] != 0;
}
| |
47,194 | 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>::basic_json(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>&&) | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | basic_json(basic_json&& other) noexcept
: json_base_class_t(std::forward<json_base_class_t>(other)),
m_data(std::move(other.m_data)) // cppcheck-suppress[accessForwarded] TODO check
#if JSON_DIAGNOSTIC_POSITIONS
, start_position(other.start_position) // cppcheck-suppress[accessForwarded] TODO check
, end_position(other.end_position) // cppcheck-suppress[accessForwarded] TODO check
#endif
{
// check that passed value is valid
other.assert_invariant(false); // cppcheck-suppress[accessForwarded]
// invalidate payload
other.m_data.m_type = value_t::null;
other.m_data.m_value = {};
#if JSON_DIAGNOSTIC_POSITIONS
other.start_position = std::string::npos;
other.end_position = std::string::npos;
#endif
set_parents();
assert_invariant();
} | O0 | cpp | 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>::basic_json(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>&&):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x5c550
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
callq 0x611a0
jmp 0x69603
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x5c550
addq $0x20, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x66c80
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rcx, [rbp+var_10]
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rax], xmm0
mov rdi, [rbp+var_10]
xor esi, esi
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; 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>::assert_invariant(bool)
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
mov [rbp+var_18], 0
mov rax, [rbp+var_10]
mov rcx, [rbp+var_18]
mov [rax+8], rcx
call __ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv; 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>::set_parents(void)
jmp short $+2
loc_69603:
mov rdi, [rbp+var_20]
mov esi, 1
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; 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>::assert_invariant(bool)
add rsp, 20h
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
| long long 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>::basic_json(
_OWORD *a1,
long long a2)
{
*a1 = *(_OWORD *)a2;
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>::assert_invariant(
a2,
0LL);
*(_BYTE *)a2 = 0;
*(_QWORD *)(a2 + 8) = 0LL;
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>::set_parents(a1);
return 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>::assert_invariant(
a1,
1LL);
}
| basic_json:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RAX],XMM0
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x0015c550
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
MOV qword ptr [RBP + -0x18],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],RCX
LAB_001695fc:
CALL 0x001611a0
JMP 0x00169603
LAB_00169603:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,0x1
CALL 0x0015c550
ADD RSP,0x20
POP RBP
RET
|
/* 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>::basic_json(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>&&) */
void __thiscall
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>
::basic_json(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>
*this,basic_json *param_1)
{
int8 uVar1;
uVar1 = *(int8 *)(param_1 + 8);
*(int8 *)this = *(int8 *)param_1;
*(int8 *)(this + 8) = uVar1;
assert_invariant(SUB81(param_1,0));
*param_1 = (basic_json)0x0;
*(int8 *)(param_1 + 8) = 0;
/* try { // try from 001695fc to 00169600 has its CatchHandler @ 00169617 */
set_parents();
assert_invariant(SUB81(this,0));
return;
}
| |
47,195 | fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | std::string fs_get_cache_file(const std::string & filename) {
GGML_ASSERT(filename.find(DIRECTORY_SEPARATOR) == std::string::npos);
std::string cache_directory = fs_get_cache_directory();
const bool success = fs_create_directory_with_parents(cache_directory);
if (!success) {
throw std::runtime_error("failed to create cache directory: " + cache_directory);
}
return cache_directory + filename;
} | O2 | cpp | fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x2f
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x24b40
cmpq $-0x1, %rax
jne 0x55ad7
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x5589b
movq %r15, %rdi
callq 0x557bd
testb %al, %al
je 0x55af8
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5955f
leaq 0x8(%rsp), %rdi
callq 0x251d8
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5efc3(%rip), %rdi # 0xb4aa1
leaq 0x5c1a1(%rip), %rdx # 0xb1c86
leaq 0x5f18e(%rip), %rcx # 0xb4c7a
movl $0x378, %esi # imm = 0x378
xorl %eax, %eax
callq 0x24ea0
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %rbx
leaq 0x5f1a8(%rip), %rsi # 0xb4cb2
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x3a1e4
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x24e20
xorl %ebp, %ebp
movq 0xab4be(%rip), %rsi # 0x100ff0
movq 0xab417(%rip), %rdx # 0x100f50
movq %rbx, %rdi
callq 0x24ef0
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x251d8
testb %bpl, %bpl
jne 0x55b58
jmp 0x55b65
movq %rax, %r14
movq %rbx, %rdi
callq 0x24680
jmp 0x55b65
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x251d8
movq %r14, %rdi
callq 0x24f80
| _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
push 2Fh ; '/'
pop rsi
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_55AD7
lea r15, [rsp+68h+var_60]
mov rdi, r15
call _Z22fs_get_cache_directoryB5cxx11v; fs_get_cache_directory(void)
mov rdi, r15
call _Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_create_directory_with_parents(std::string const&)
test al, al
jz short loc_55AF8
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&)
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_55AD7:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFilenameFindDi; "filename.find(DIRECTORY_SEPARATOR) == s"...
mov esi, 378h
xor eax, eax
call _ggml_abort
loc_55AF8:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aFailedToCreate; "failed to create cache directory: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+68h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_55B58
jmp short loc_55B65
mov r14, rax
loc_55B58:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_55B65
mov r14, rax
loc_55B65:
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| long long fs_get_cache_file(long long a1, long long a2)
{
void *exception; // rbx
_QWORD v4[4]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v5[64]; // [rsp+28h] [rbp-40h] BYREF
if ( std::string::find(a2, 47LL, 0LL) != -1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
888LL,
"GGML_ASSERT(%s) failed",
"filename.find(DIRECTORY_SEPARATOR) == std::string::npos");
LABEL_5:
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v5, (long long)"failed to create cache directory: ", (long long)v4);
std::runtime_error::runtime_error(exception, v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
fs_get_cache_directory[abi:cxx11]((long long)v4);
if ( !(unsigned __int8)fs_create_directory_with_parents(v4) )
goto LABEL_5;
std::operator+<char>(a1, v4, a2);
std::string::~string(v4);
return a1;
}
| fs_get_cache_file:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
PUSH 0x2f
POP RSI
MOV RDI,R14
XOR EDX,EDX
CALL 0x00124b40
CMP RAX,-0x1
JNZ 0x00155ad7
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x0015589b
LAB_00155aa3:
MOV RDI,R15
CALL 0x001557bd
TEST AL,AL
JZ 0x00155af8
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV RDX,R14
CALL 0x0015955f
LAB_00155abf:
LEA RDI,[RSP + 0x8]
CALL 0x001251d8
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00155ad7:
LEA RDI,[0x1b4aa1]
LEA RDX,[0x1b1c86]
LEA RCX,[0x1b4c7a]
MOV ESI,0x378
XOR EAX,EAX
CALL 0x00124ea0
LAB_00155af8:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV RBX,RAX
LAB_00155b03:
LEA RSI,[0x1b4cb2]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0013a1e4
MOV BPL,0x1
LAB_00155b1c:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00124e20
XOR EBP,EBP
MOV RSI,qword ptr [0x00200ff0]
MOV RDX,qword ptr [0x00200f50]
MOV RDI,RBX
CALL 0x00124ef0
|
/* fs_get_cache_file(std::__cxx11::string const&) */
string * fs_get_cache_file(string *param_1)
{
char cVar1;
long lVar2;
runtime_error *this;
char in_SIL;
string local_60 [32];
string local_40 [32];
lVar2 = std::__cxx11::string::find(in_SIL,0x2f);
if (lVar2 != -1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x378,
"GGML_ASSERT(%s) failed","filename.find(DIRECTORY_SEPARATOR) == std::string::npos");
}
fs_get_cache_directory_abi_cxx11_();
/* try { // try from 00155aa3 to 00155abe has its CatchHandler @ 00155b62 */
cVar1 = fs_create_directory_with_parents(local_60);
if (cVar1 != '\0') {
std::operator+(param_1,local_60);
std::__cxx11::string::~string(local_60);
return param_1;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00155b03 to 00155b18 has its CatchHandler @ 00155b55 */
std::operator+((char *)local_40,(string *)"failed to create cache directory: ");
/* try { // try from 00155b1c to 00155b40 has its CatchHandler @ 00155b41 */
std::runtime_error::runtime_error(this,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00200ff0,PTR__runtime_error_00200f50);
}
| |
47,196 | js_fcvt | bluesky950520[P]quickjs/quickjs.c | static size_t js_fcvt(double d, int n_digits,
char dest[minimum_length(JS_FCVT_BUF_SIZE)], size_t size)
{
#if defined(FE_DOWNWARD) && defined(FE_TONEAREST)
int i, n1;
/* generate 2 extra digits: 99% chances to avoid 2 calls */
n1 = snprintf(dest, size, "%.*f", n_digits + 2, d) - 2;
if (dest[n1] >= '5') {
if (dest[n1] == '5' && dest[n1 + 1] == '0') {
/* close to half-way: try rounding toward 0 */
fesetround(FE_DOWNWARD);
n1 = snprintf(dest, size, "%.*f", n_digits + 2, d) - 2;
fesetround(FE_TONEAREST);
}
if (dest[n1] >= '5') { /* number should be rounded up */
/* d is either exactly half way or greater: round the string manually */
for (i = n1 - 1;; i--) {
/* ignore the locale specific decimal point */
if (is_digit(dest[i])) {
if (dest[i]++ < '9')
break;
dest[i] = '0';
if (i == 0) {
dest[0] = '1';
dest[n1] = '0';
dest[n1 - n_digits - 1] = '0';
dest[n1 - n_digits] = '.';
n1++;
break;
}
}
}
}
}
/* truncate the extra 2 digits and the decimal point if !n_digits */
n1 -= !n_digits;
//dest[n1] = '\0'; // optional
return n1;
#else
/* No disambiguation available, eg: __wasi__ targets */
return snprintf(dest, size, "%.*f", n_digits, d);
#endif
} | O0 | c | js_fcvt:
subq $0x28, %rsp
movsd %xmm0, 0x20(%rsp)
movl %edi, 0x1c(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl 0x1c(%rsp), %ecx
addl $0x2, %ecx
movsd 0x20(%rsp), %xmm0
leaq 0xabdf7(%rip), %rdx # 0x10e22d
movb $0x1, %al
callq 0xe2d0
subl $0x2, %eax
movl %eax, (%rsp)
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x35, %eax
jl 0x62592
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x35, %eax
jne 0x624be
movq 0x10(%rsp), %rax
movl (%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jne 0x624be
movl $0x400, %edi # imm = 0x400
callq 0xe030
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl 0x1c(%rsp), %ecx
addl $0x2, %ecx
movsd 0x20(%rsp), %xmm0
leaq 0xabd83(%rip), %rdx # 0x10e22d
movb $0x1, %al
callq 0xe2d0
subl $0x2, %eax
movl %eax, (%rsp)
xorl %edi, %edi
callq 0xe030
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x35, %eax
jl 0x62590
movl (%rsp), %eax
subl $0x1, %eax
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %rax
movslq 0x4(%rsp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x280f0
cmpl $0x0, %eax
je 0x6257c
movq 0x10(%rsp), %rcx
movslq 0x4(%rsp), %rdx
movb (%rcx,%rdx), %al
movb %al, %sil
addb $0x1, %sil
movb %sil, (%rcx,%rdx)
movzbl %al, %eax
cmpl $0x39, %eax
jge 0x6251c
jmp 0x6258e
movq 0x10(%rsp), %rax
movslq 0x4(%rsp), %rcx
movb $0x30, (%rax,%rcx)
cmpl $0x0, 0x4(%rsp)
jne 0x6257a
movq 0x10(%rsp), %rax
movb $0x31, (%rax)
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
movb $0x30, (%rax,%rcx)
movq 0x10(%rsp), %rax
movl (%rsp), %ecx
subl 0x1c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x30, (%rax,%rcx)
movq 0x10(%rsp), %rax
movl (%rsp), %ecx
subl 0x1c(%rsp), %ecx
movslq %ecx, %rcx
movb $0x2e, (%rax,%rcx)
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x6258e
jmp 0x6257c
jmp 0x6257e
movl 0x4(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x624de
jmp 0x62590
jmp 0x62592
cmpl $0x0, 0x1c(%rsp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %ecx
movl (%rsp), %eax
subl %ecx, %eax
movl %eax, (%rsp)
movslq (%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| js_fcvt:
sub rsp, 28h
movsd [rsp+28h+var_8], xmm0
mov [rsp+28h+var_C], edi
mov [rsp+28h+var_18], rsi
mov [rsp+28h+var_20], rdx
mov rdi, [rsp+28h+var_18]
mov rsi, [rsp+28h+var_20]
mov ecx, [rsp+28h+var_C]
add ecx, 2
movsd xmm0, [rsp+28h+var_8]
lea rdx, asc_10E22D; "%.*f"
mov al, 1
call _snprintf
sub eax, 2
mov [rsp+28h+var_28], eax
mov rax, [rsp+28h+var_18]
movsxd rcx, [rsp+28h+var_28]
movzx eax, byte ptr [rax+rcx]
cmp eax, 35h ; '5'
jl loc_62592
mov rax, [rsp+28h+var_18]
movsxd rcx, [rsp+28h+var_28]
movzx eax, byte ptr [rax+rcx]
cmp eax, 35h ; '5'
jnz short loc_624BE
mov rax, [rsp+28h+var_18]
mov ecx, [rsp+28h+var_28]
add ecx, 1
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
cmp eax, 30h ; '0'
jnz short loc_624BE
mov edi, 400h
call _fesetround
mov rdi, [rsp+28h+var_18]
mov rsi, [rsp+28h+var_20]
mov ecx, [rsp+28h+var_C]
add ecx, 2
movsd xmm0, [rsp+28h+var_8]
lea rdx, asc_10E22D; "%.*f"
mov al, 1
call _snprintf
sub eax, 2
mov [rsp+28h+var_28], eax
xor edi, edi
call _fesetround
loc_624BE:
mov rax, [rsp+28h+var_18]
movsxd rcx, [rsp+28h+var_28]
movzx eax, byte ptr [rax+rcx]
cmp eax, 35h ; '5'
jl loc_62590
mov eax, [rsp+28h+var_28]
sub eax, 1
mov [rsp+28h+var_24], eax
loc_624DE:
mov rax, [rsp+28h+var_18]
movsxd rcx, [rsp+28h+var_24]
movzx edi, byte ptr [rax+rcx]
call is_digit
cmp eax, 0
jz loc_6257C
mov rcx, [rsp+28h+var_18]
movsxd rdx, [rsp+28h+var_24]
mov al, [rcx+rdx]
mov sil, al
add sil, 1
mov [rcx+rdx], sil
movzx eax, al
cmp eax, 39h ; '9'
jge short loc_6251C
jmp short loc_6258E
loc_6251C:
mov rax, [rsp+28h+var_18]
movsxd rcx, [rsp+28h+var_24]
mov byte ptr [rax+rcx], 30h ; '0'
cmp [rsp+28h+var_24], 0
jnz short loc_6257A
mov rax, [rsp+28h+var_18]
mov byte ptr [rax], 31h ; '1'
mov rax, [rsp+28h+var_18]
movsxd rcx, [rsp+28h+var_28]
mov byte ptr [rax+rcx], 30h ; '0'
mov rax, [rsp+28h+var_18]
mov ecx, [rsp+28h+var_28]
sub ecx, [rsp+28h+var_C]
sub ecx, 1
movsxd rcx, ecx
mov byte ptr [rax+rcx], 30h ; '0'
mov rax, [rsp+28h+var_18]
mov ecx, [rsp+28h+var_28]
sub ecx, [rsp+28h+var_C]
movsxd rcx, ecx
mov byte ptr [rax+rcx], 2Eh ; '.'
mov eax, [rsp+28h+var_28]
add eax, 1
mov [rsp+28h+var_28], eax
jmp short loc_6258E
loc_6257A:
jmp short $+2
loc_6257C:
jmp short $+2
loc_6257E:
mov eax, [rsp+28h+var_24]
add eax, 0FFFFFFFFh
mov [rsp+28h+var_24], eax
jmp loc_624DE
loc_6258E:
jmp short $+2
loc_62590:
jmp short $+2
loc_62592:
cmp [rsp+28h+var_C], 0
setnz al
xor al, 0FFh
and al, 1
movzx ecx, al
mov eax, [rsp+28h+var_28]
sub eax, ecx
mov [rsp+28h+var_28], eax
movsxd rax, [rsp+28h+var_28]
add rsp, 28h
retn
| long long js_fcvt(unsigned int a1, _BYTE *a2, long long a3, double a4)
{
unsigned __int8 v4; // al
unsigned int v6; // [rsp+0h] [rbp-28h]
unsigned int i; // [rsp+4h] [rbp-24h]
v6 = snprintf(a2, a3, "%.*f", a1 + 2, a4) - 2;
if ( (unsigned __int8)a2[v6] >= 0x35u )
{
if ( a2[v6] == 53 && a2[v6 + 1] == 48 )
{
fesetround(1024LL);
v6 = snprintf(a2, a3, "%.*f", a1 + 2, a4) - 2;
fesetround(0LL);
}
if ( (unsigned __int8)a2[v6] >= 0x35u )
{
for ( i = v6 - 1; ; --i )
{
if ( is_digit((unsigned __int8)a2[i]) )
{
v4 = a2[i];
a2[i] = v4 + 1;
if ( v4 < 0x39u )
return (int)((__PAIR64__(v6, a1) - 1) >> 32);
a2[i] = 48;
if ( !i )
break;
}
}
*a2 = 49;
a2[v6] = 48;
a2[v6 - a1 - 1] = 48;
a2[v6 - a1] = 46;
++v6;
}
}
return (int)((__PAIR64__(v6, a1) - 1) >> 32);
}
| js_fcvt:
SUB RSP,0x28
MOVSD qword ptr [RSP + 0x20],XMM0
MOV dword ptr [RSP + 0x1c],EDI
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x1c]
ADD ECX,0x2
MOVSD XMM0,qword ptr [RSP + 0x20]
LEA RDX,[0x20e22d]
MOV AL,0x1
CALL 0x0010e2d0
SUB EAX,0x2
MOV dword ptr [RSP],EAX
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x35
JL 0x00162592
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x35
JNZ 0x001624be
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP]
ADD ECX,0x1
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x30
JNZ 0x001624be
MOV EDI,0x400
CALL 0x0010e030
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x1c]
ADD ECX,0x2
MOVSD XMM0,qword ptr [RSP + 0x20]
LEA RDX,[0x20e22d]
MOV AL,0x1
CALL 0x0010e2d0
SUB EAX,0x2
MOV dword ptr [RSP],EAX
XOR EDI,EDI
CALL 0x0010e030
LAB_001624be:
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x35
JL 0x00162590
MOV EAX,dword ptr [RSP]
SUB EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
LAB_001624de:
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x4]
MOVZX EDI,byte ptr [RAX + RCX*0x1]
CALL 0x001280f0
CMP EAX,0x0
JZ 0x0016257c
MOV RCX,qword ptr [RSP + 0x10]
MOVSXD RDX,dword ptr [RSP + 0x4]
MOV AL,byte ptr [RCX + RDX*0x1]
MOV SIL,AL
ADD SIL,0x1
MOV byte ptr [RCX + RDX*0x1],SIL
MOVZX EAX,AL
CMP EAX,0x39
JGE 0x0016251c
JMP 0x0016258e
LAB_0016251c:
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x4]
MOV byte ptr [RAX + RCX*0x1],0x30
CMP dword ptr [RSP + 0x4],0x0
JNZ 0x0016257a
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX],0x31
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP]
MOV byte ptr [RAX + RCX*0x1],0x30
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP]
SUB ECX,dword ptr [RSP + 0x1c]
SUB ECX,0x1
MOVSXD RCX,ECX
MOV byte ptr [RAX + RCX*0x1],0x30
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP]
SUB ECX,dword ptr [RSP + 0x1c]
MOVSXD RCX,ECX
MOV byte ptr [RAX + RCX*0x1],0x2e
MOV EAX,dword ptr [RSP]
ADD EAX,0x1
MOV dword ptr [RSP],EAX
JMP 0x0016258e
LAB_0016257a:
JMP 0x0016257c
LAB_0016257c:
JMP 0x0016257e
LAB_0016257e:
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,-0x1
MOV dword ptr [RSP + 0x4],EAX
JMP 0x001624de
LAB_0016258e:
JMP 0x00162590
LAB_00162590:
JMP 0x00162592
LAB_00162592:
CMP dword ptr [RSP + 0x1c],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX ECX,AL
MOV EAX,dword ptr [RSP]
SUB EAX,ECX
MOV dword ptr [RSP],EAX
MOVSXD RAX,dword ptr [RSP]
ADD RSP,0x28
RET
|
long js_fcvt(int8 param_1,int param_2,char *param_3,size_t param_4)
{
byte bVar1;
int iVar2;
int local_28;
int local_24;
iVar2 = snprintf(param_3,param_4,"%.*f",param_1,(ulong)(param_2 + 2));
local_28 = iVar2 + -2;
if (0x34 < (byte)param_3[local_28]) {
if ((param_3[local_28] == '5') && (param_3[iVar2 + -1] == '0')) {
fesetround(0x400);
local_28 = snprintf(param_3,param_4,"%.*f",param_1,(ulong)(param_2 + 2));
local_28 = local_28 + -2;
fesetround(0);
}
local_24 = local_28;
if (0x34 < (byte)param_3[local_28]) {
do {
do {
local_24 = local_24 + -1;
iVar2 = is_digit(param_3[local_24]);
} while (iVar2 == 0);
bVar1 = param_3[local_24];
param_3[local_24] = bVar1 + 1;
if (bVar1 < 0x39) goto LAB_00162592;
param_3[local_24] = '0';
} while (local_24 != 0);
*param_3 = '1';
param_3[local_28] = '0';
param_3[(local_28 - param_2) + -1] = '0';
param_3[local_28 - param_2] = '.';
local_28 = local_28 + 1;
}
}
LAB_00162592:
return (long)(int)(local_28 - (uint)((param_2 != 0 ^ 0xffU) & 1));
}
| |
47,197 | js_array_toString | bluesky950520[P]quickjs/quickjs.c | static JSValue js_array_toString(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj, method, ret;
obj = JS_ToObject(ctx, this_val);
if (JS_IsException(obj))
return JS_EXCEPTION;
method = JS_GetProperty(ctx, obj, JS_ATOM_join);
if (JS_IsException(method)) {
ret = JS_EXCEPTION;
} else
if (!JS_IsFunction(ctx, method)) {
/* Use intrinsic Object.prototype.toString */
JS_FreeValue(ctx, method);
ret = js_object_toString(ctx, obj, 0, NULL);
} else {
ret = JS_CallFree(ctx, method, obj, 0, NULL);
}
JS_FreeValue(ctx, obj);
return ret;
} | O0 | c | js_array_toString:
subq $0xc8, %rsp
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xb0(%rsp)
movq %rdi, 0xa0(%rsp)
movl %ecx, 0x9c(%rsp)
movq %r8, 0x90(%rsp)
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
callq 0x364b0
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0xc9945
movl $0x0, 0xb8(%rsp)
movq $0x6, 0xc0(%rsp)
jmp 0xc9ac5
movq 0xa0(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movl $0x5c, %ecx
callq 0x28ac0
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0xc99c3
movl $0x0, 0x30(%rsp)
movq $0x6, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x68(%rsp)
jmp 0xc9a8e
movq 0xa0(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x2d250
cmpl $0x0, %eax
jne 0xc9a3a
movq 0xa0(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x229d0
movq 0xa0(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0xbf920
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x68(%rsp)
jmp 0xc9a8c
movq 0xa0(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %r8
xorl %r9d, %r9d
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x2cfc0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x68(%rsp)
jmp 0xc9a8e
movq 0xa0(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0x229d0
movq 0x60(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xb8(%rsp), %rax
movq 0xc0(%rsp), %rdx
addq $0xc8, %rsp
retq
nopl (%rax)
| js_array_toString:
sub rsp, 0C8h
mov [rsp+0C8h+var_20], rsi
mov [rsp+0C8h+var_18], rdx
mov [rsp+0C8h+var_28], rdi
mov [rsp+0C8h+var_2C], ecx
mov [rsp+0C8h+var_38], r8
mov rdi, [rsp+0C8h+var_28]
mov rsi, [rsp+0C8h+var_20]
mov rdx, [rsp+0C8h+var_18]
call JS_ToObject
mov [rsp+0C8h+var_78], rax
mov [rsp+0C8h+var_70], rdx
mov rax, [rsp+0C8h+var_78]
mov [rsp+0C8h+var_48], rax
mov rax, [rsp+0C8h+var_70]
mov [rsp+0C8h+var_40], rax
mov rdi, [rsp+0C8h+var_48]
mov rsi, [rsp+0C8h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_C9945
mov dword ptr [rsp+0C8h+var_10], 0
mov [rsp+0C8h+var_8], 6
jmp loc_C9AC5
loc_C9945:
mov rdi, [rsp+0C8h+var_28]
mov rsi, [rsp+0C8h+var_48]
mov rdx, [rsp+0C8h+var_40]
mov ecx, 5Ch ; '\'
call JS_GetProperty
mov [rsp+0C8h+var_88], rax
mov [rsp+0C8h+var_80], rdx
mov rax, [rsp+0C8h+var_88]
mov [rsp+0C8h+var_58], rax
mov rax, [rsp+0C8h+var_80]
mov [rsp+0C8h+var_50], rax
mov rdi, [rsp+0C8h+var_58]
mov rsi, [rsp+0C8h+var_50]
call JS_IsException_1
cmp eax, 0
jz short loc_C99C3
mov dword ptr [rsp+0C8h+var_98], 0
mov [rsp+0C8h+var_90], 6
mov rax, [rsp+0C8h+var_98]
mov [rsp+0C8h+var_68], rax
mov rax, [rsp+0C8h+var_90]
mov [rsp+0C8h+var_60], rax
jmp loc_C9A8E
loc_C99C3:
mov rdi, [rsp+0C8h+var_28]
mov rsi, [rsp+0C8h+var_58]
mov rdx, [rsp+0C8h+var_50]
call JS_IsFunction
cmp eax, 0
jnz short loc_C9A3A
mov rdi, [rsp+0C8h+var_28]
mov rsi, [rsp+0C8h+var_58]
mov rdx, [rsp+0C8h+var_50]
call JS_FreeValue
mov rdi, [rsp+0C8h+var_28]
mov rsi, [rsp+0C8h+var_48]
mov rdx, [rsp+0C8h+var_40]
xor ecx, ecx
xor eax, eax
mov r8d, eax
call js_object_toString
mov [rsp+0C8h+var_A8], rax
mov [rsp+0C8h+var_A0], rdx
mov rax, [rsp+0C8h+var_A8]
mov [rsp+0C8h+var_68], rax
mov rax, [rsp+0C8h+var_A0]
mov [rsp+0C8h+var_60], rax
jmp short loc_C9A8C
loc_C9A3A:
mov rdi, [rsp+0C8h+var_28]
mov rsi, [rsp+0C8h+var_58]
mov rdx, [rsp+0C8h+var_50]
mov rcx, [rsp+0C8h+var_48]
mov r8, [rsp+0C8h+var_40]
xor r9d, r9d
xor eax, eax
mov [rsp+0C8h+var_C8], 0
call JS_CallFree
mov [rsp+0C8h+var_B8], rax
mov [rsp+0C8h+var_B0], rdx
mov rax, [rsp+0C8h+var_B8]
mov [rsp+0C8h+var_68], rax
mov rax, [rsp+0C8h+var_B0]
mov [rsp+0C8h+var_60], rax
loc_C9A8C:
jmp short $+2
loc_C9A8E:
mov rdi, [rsp+0C8h+var_28]
mov rsi, [rsp+0C8h+var_48]
mov rdx, [rsp+0C8h+var_40]
call JS_FreeValue
mov rax, [rsp+0C8h+var_68]
mov [rsp+0C8h+var_10], rax
mov rax, [rsp+0C8h+var_60]
mov [rsp+0C8h+var_8], rax
loc_C9AC5:
mov rax, [rsp+0C8h+var_10]
mov rdx, [rsp+0C8h+var_8]
add rsp, 0C8h
retn
| long long js_array_toString(
long long a1,
_DWORD *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rdx
long long v15; // rdx
double v16; // xmm4_8
double v17; // xmm5_8
long long v19; // [rsp+30h] [rbp-98h]
long long Property; // [rsp+40h] [rbp-88h]
_DWORD *v21; // [rsp+50h] [rbp-78h]
long long v22; // [rsp+60h] [rbp-68h]
long long v23; // [rsp+78h] [rbp-50h]
long long v24; // [rsp+88h] [rbp-40h]
long long v25; // [rsp+B8h] [rbp-10h]
v21 = JS_ToObject(a1, a2, a3, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6);
v24 = v14;
if ( JS_IsException_1((long long)v21, v14) )
{
LODWORD(v25) = 0;
}
else
{
Property = JS_GetProperty(a1, (int)v21, v24, 92);
v23 = v15;
if ( JS_IsException_1(Property, v15) )
{
LODWORD(v19) = 0;
v22 = v19;
}
else if ( (unsigned int)JS_IsFunction(a1, Property, v23) )
{
v22 = JS_CallFree(a1, Property, v23, (int)v21, v24, 0, 0LL);
}
else
{
JS_FreeValue(a1, Property, v23);
v22 = js_object_toString(a1, v21, v24, a7, a8, a9, a10, v16, v17, a13, a14);
}
JS_FreeValue(a1, (long long)v21, v24);
return v22;
}
return v25;
}
| js_array_toString:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xa8],RSI
MOV qword ptr [RSP + 0xb0],RDX
MOV qword ptr [RSP + 0xa0],RDI
MOV dword ptr [RSP + 0x9c],ECX
MOV qword ptr [RSP + 0x90],R8
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0xa8]
MOV RDX,qword ptr [RSP + 0xb0]
CALL 0x001364b0
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x88]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001c9945
MOV dword ptr [RSP + 0xb8],0x0
MOV qword ptr [RSP + 0xc0],0x6
JMP 0x001c9ac5
LAB_001c9945:
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
MOV ECX,0x5c
CALL 0x00128ac0
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001c99c3
MOV dword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x6
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x68],RAX
JMP 0x001c9a8e
LAB_001c99c3:
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x0012d250
CMP EAX,0x0
JNZ 0x001c9a3a
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
XOR ECX,ECX
XOR EAX,EAX
MOV R8D,EAX
CALL 0x001bf920
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x68],RAX
JMP 0x001c9a8c
LAB_001c9a3a:
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
MOV RCX,qword ptr [RSP + 0x80]
MOV R8,qword ptr [RSP + 0x88]
XOR R9D,R9D
XOR EAX,EAX
MOV qword ptr [RSP],0x0
CALL 0x0012cfc0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x68],RAX
LAB_001c9a8c:
JMP 0x001c9a8e
LAB_001c9a8e:
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
CALL 0x001229d0
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xc0],RAX
LAB_001c9ac5:
MOV RAX,qword ptr [RSP + 0xb8]
MOV RDX,qword ptr [RSP + 0xc0]
ADD RSP,0xc8
RET
|
int1 [16] js_array_toString(int8 param_1,int8 param_2,int8 param_3)
{
int1 auVar1 [16];
int iVar2;
int8 uVar4;
int8 uVar6;
int1 auVar7 [16];
uint uStack_94;
int8 local_60;
int4 local_10;
int4 uStack_c;
int8 local_8;
int8 uVar3;
int8 uVar5;
auVar7 = JS_ToObject(param_1,param_2,param_3);
uVar5 = auVar7._8_8_;
uVar3 = auVar7._0_8_;
iVar2 = JS_IsException(uVar3,uVar5);
if (iVar2 == 0) {
auVar7 = JS_GetProperty(param_1,uVar3,uVar5,0x5c);
uVar6 = auVar7._8_8_;
uVar4 = auVar7._0_8_;
iVar2 = JS_IsException(uVar4,uVar6);
if (iVar2 == 0) {
iVar2 = JS_IsFunction(param_1,uVar4,uVar6);
if (iVar2 == 0) {
JS_FreeValue(param_1,uVar4,uVar6);
auVar7 = js_object_toString(param_1,uVar3,uVar5,0,0);
}
else {
auVar7 = JS_CallFree(param_1,uVar4,uVar6,uVar3,uVar5,0,0);
}
}
else {
auVar7._8_8_ = 6;
auVar7._0_8_ = (ulong)uStack_94 << 0x20;
}
local_60 = auVar7._8_8_;
JS_FreeValue(param_1,uVar3,uVar5);
local_10 = auVar7._0_4_;
uStack_c = auVar7._4_4_;
local_8 = local_60;
}
else {
local_10 = 0;
local_8 = 6;
}
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
| |
47,198 | js_array_toString | bluesky950520[P]quickjs/quickjs.c | static JSValue js_array_toString(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj, method, ret;
obj = JS_ToObject(ctx, this_val);
if (JS_IsException(obj))
return JS_EXCEPTION;
method = JS_GetProperty(ctx, obj, JS_ATOM_join);
if (JS_IsException(method)) {
ret = JS_EXCEPTION;
} else
if (!JS_IsFunction(ctx, method)) {
/* Use intrinsic Object.prototype.toString */
JS_FreeValue(ctx, method);
ret = js_object_toString(ctx, obj, 0, NULL);
} else {
ret = JS_CallFree(ctx, method, obj, 0, NULL);
}
JS_FreeValue(ctx, obj);
return ret;
} | O1 | c | js_array_toString:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x261c9
movq %rdx, %r15
cmpl $0x6, %r15d
jne 0x75654
movl $0x6, %r12d
xorl %eax, %eax
jmp 0x7570b
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
movl $0x5c, %ecx
movq %rax, %r8
movq %r15, %r9
pushq $0x0
pushq $0x0
callq 0x2238f
addq $0x10, %rsp
movq %rdx, %r12
cmpl $0x6, %r12d
jne 0x7568e
movl $0x6, %r12d
xorl %r13d, %r13d
xorl %ebp, %ebp
jmp 0x756f6
movq %rax, %r13
movabsq $-0x100000000, %rbp # imm = 0xFFFFFFFF00000000
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x221aa
testl %eax, %eax
je 0x756d0
subq $0x8, %rsp
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %r15, %r8
xorl %r9d, %r9d
pushq $0x0
callq 0x22089
addq $0x10, %rsp
jmp 0x756ed
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1ccb2
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x706ec
movq %rax, %r13
movq %rdx, %r12
andq %rax, %rbp
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1ccb2
movl %r13d, %eax
orq %rbp, %rax
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_array_toString:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
call JS_ToObject
mov r15, rdx
cmp r15d, 6
jnz short loc_75654
mov r12d, 6
xor eax, eax
jmp loc_7570B
loc_75654:
mov r14, rax
mov rdi, rbx
mov rsi, rax
mov rdx, r15
mov ecx, 5Ch ; '\'
mov r8, rax
mov r9, r15
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r12, rdx
cmp r12d, 6
jnz short loc_7568E
mov r12d, 6
xor r13d, r13d
xor ebp, ebp
jmp short loc_756F6
loc_7568E:
mov r13, rax
mov rbp, 0FFFFFFFF00000000h
mov rdi, rbx
mov rsi, rax
mov rdx, r12
call JS_IsFunction
test eax, eax
jz short loc_756D0
sub rsp, 8
mov rdi, rbx
mov rsi, r13
mov rdx, r12
mov rcx, r14
mov r8, r15
xor r9d, r9d
push 0
call JS_CallFree
add rsp, 10h
jmp short loc_756ED
loc_756D0:
mov rdi, [rbx+18h]
mov rsi, r13
mov rdx, r12
call JS_FreeValueRT
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call js_object_toString
loc_756ED:
mov r13, rax
mov r12, rdx
and rbp, rax
loc_756F6:
mov rdi, [rbx+18h]
mov rsi, r14
mov rdx, r15
call JS_FreeValueRT
mov eax, r13d
or rax, rbp
loc_7570B:
mov rdx, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long js_array_toString(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
_DWORD *v14; // rax
long long v15; // rdx
long long v16; // r15
_DWORD *v18; // r14
unsigned long long PropertyInternal2; // rax
long long v20; // rdx
long long v21; // r12
unsigned int v22; // r13d
unsigned long long v23; // rbp
_DWORD *v24; // r13
long long v25; // rax
long long v26; // rcx
long long v27; // r8
long long v28; // r9
__m128 v29; // xmm4
__m128 v30; // xmm5
v14 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v16 = v15;
if ( (_DWORD)v15 == 6 )
return 0LL;
v18 = v14;
PropertyInternal2 = JS_GetPropertyInternal2(a1, (long long)v14, v15, 0x5Cu, (long long)v14, v15, 0LL, 0);
v21 = v20;
if ( (_DWORD)v20 == 6 )
{
v22 = 0;
v23 = 0LL;
}
else
{
v24 = (_DWORD *)PropertyInternal2;
if ( (unsigned int)JS_IsFunction(a1, PropertyInternal2, v20) )
{
v25 = JS_CallFree(a1, v24, v21, (int)v18, v16, 0, 0LL);
}
else
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v24, v21);
v25 = (long long)js_object_toString(a1, (long long)v18, v16, v26, v27, v28, a7, a8, a9, a10, v29, v30, a13, a14);
}
v22 = v25;
v23 = v25 & 0xFFFFFFFF00000000LL;
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v18, v16);
return v23 | v22;
}
| js_array_toString:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x001261c9
MOV R15,RDX
CMP R15D,0x6
JNZ 0x00175654
MOV R12D,0x6
XOR EAX,EAX
JMP 0x0017570b
LAB_00175654:
MOV R14,RAX
MOV RDI,RBX
MOV RSI,RAX
MOV RDX,R15
MOV ECX,0x5c
MOV R8,RAX
MOV R9,R15
PUSH 0x0
PUSH 0x0
CALL 0x0012238f
ADD RSP,0x10
MOV R12,RDX
CMP R12D,0x6
JNZ 0x0017568e
MOV R12D,0x6
XOR R13D,R13D
XOR EBP,EBP
JMP 0x001756f6
LAB_0017568e:
MOV R13,RAX
MOV RBP,-0x100000000
MOV RDI,RBX
MOV RSI,RAX
MOV RDX,R12
CALL 0x001221aa
TEST EAX,EAX
JZ 0x001756d0
SUB RSP,0x8
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
MOV RCX,R14
MOV R8,R15
XOR R9D,R9D
PUSH 0x0
CALL 0x00122089
ADD RSP,0x10
JMP 0x001756ed
LAB_001756d0:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R13
MOV RDX,R12
CALL 0x0011ccb2
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x001706ec
LAB_001756ed:
MOV R13,RAX
MOV R12,RDX
AND RBP,RAX
LAB_001756f6:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
MOV RDX,R15
CALL 0x0011ccb2
MOV EAX,R13D
OR RAX,RBP
LAB_0017570b:
MOV RDX,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_array_toString(long param_1)
{
int iVar1;
int8 uVar2;
ulong uVar3;
int8 uVar5;
int8 uVar6;
int1 auVar7 [16];
int8 uVar4;
auVar7 = JS_ToObject();
uVar4 = auVar7._8_8_;
uVar2 = auVar7._0_8_;
if (auVar7._8_4_ == 6) {
uVar6 = 6;
uVar3 = 0;
}
else {
auVar7 = JS_GetPropertyInternal2(param_1,uVar2,uVar4,0x5c,uVar2,uVar4,0,0);
uVar5 = auVar7._8_8_;
uVar6 = auVar7._0_8_;
if (auVar7._8_4_ == 6) {
auVar7 = ZEXT816(6) << 0x40;
uVar3 = 0;
}
else {
iVar1 = JS_IsFunction(param_1,uVar6,uVar5);
if (iVar1 == 0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar6,uVar5);
auVar7 = js_object_toString(param_1,uVar2,uVar4);
}
else {
auVar7 = JS_CallFree(param_1,uVar6,uVar5,uVar2,uVar4,0,0);
}
uVar3 = auVar7._0_8_ & 0xffffffff00000000;
}
uVar6 = auVar7._8_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar2,uVar4);
uVar3 = auVar7._0_8_ & 0xffffffff | uVar3;
}
auVar7._8_8_ = uVar6;
auVar7._0_8_ = uVar3;
return auVar7;
}
| |
47,199 | LefDefParser::lefwLayerAntennaAreaMinusDiff(double) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwLayerAntennaAreaMinusDiff(double minusDiffFactor)
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING &&
lefwState != LEFW_LAYER_START && lefwState != LEFW_LAYER)
return LEFW_BAD_ORDER;
if (!lefwIsRouting && !lefwIsCut)
return LEFW_BAD_DATA;
/* WANDA
if ((versionNum < 5.4) &&
(diffUseOnly && strcmp(diffUseOnly, "DIFFUSEONLY") == 0))
return LEFW_WRONG_VERSION;
*/
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) " ANTENNAAREAMINUSDIFF %.11g ;\n",
minusDiffFactor);
else {
fprintf(lefwFile, " ANTENNAAREAMINUSDIFF %.11g ;\n", minusDiffFactor);
}
lefwLines++;
return LEFW_OK;
} | O0 | cpp | LefDefParser::lefwLayerAntennaAreaMinusDiff(double):
subq $0x18, %rsp
movsd %xmm0, 0x8(%rsp)
leaq 0xa358f(%rip), %rax # 0xc5250
cmpq $0x0, (%rax)
jne 0x21cd4
movl $0x1, 0x14(%rsp)
jmp 0x21d97
leaq 0xa37c5(%rip), %rax # 0xc54a0
cmpl $0x7, (%rax)
je 0x21d11
leaq 0xa37b9(%rip), %rax # 0xc54a0
cmpl $0x1f, (%rax)
je 0x21d11
leaq 0xa37ad(%rip), %rax # 0xc54a0
cmpl $0x6, (%rax)
je 0x21d11
leaq 0xa37a1(%rip), %rax # 0xc54a0
cmpl $0x1c, (%rax)
je 0x21d11
movl $0x2, 0x14(%rsp)
jmp 0x21d97
leaq 0xa37fc(%rip), %rax # 0xc5514
cmpl $0x0, (%rax)
jne 0x21d33
leaq 0xa37b0(%rip), %rax # 0xc54d4
cmpl $0x0, (%rax)
jne 0x21d33
movl $0x3, 0x14(%rsp)
jmp 0x21d97
cmpl $0x0, 0xa3802(%rip) # 0xc553c
je 0x21d5c
leaq 0xa350d(%rip), %rax # 0xc5250
movq (%rax), %rdi
movsd 0x8(%rsp), %xmm0
leaq 0x7180c(%rip), %rsi # 0x9355f
movb $0x1, %al
callq 0x8bf50
jmp 0x21d7a
leaq 0xa34ed(%rip), %rax # 0xc5250
movq (%rax), %rdi
movsd 0x8(%rsp), %xmm0
leaq 0x717ec(%rip), %rsi # 0x9355f
movb $0x1, %al
callq 0x2370
leaq 0xa371b(%rip), %rax # 0xc549c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0xa370f(%rip), %rax # 0xc549c
movl %ecx, (%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
| _ZN12LefDefParser29lefwLayerAntennaAreaMinusDiffEd:
sub rsp, 18h
movsd [rsp+18h+var_10], xmm0
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_21CD4
mov [rsp+18h+var_4], 1
jmp loc_21D97
loc_21CD4:
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 7
jz short loc_21D11
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 1Fh
jz short loc_21D11
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 6
jz short loc_21D11
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 1Ch
jz short loc_21D11
mov [rsp+18h+var_4], 2
jmp loc_21D97
loc_21D11:
lea rax, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting
cmp dword ptr [rax], 0
jnz short loc_21D33
lea rax, _ZN12LefDefParser9lefwIsCutE; LefDefParser::lefwIsCut
cmp dword ptr [rax], 0
jnz short loc_21D33
mov [rsp+18h+var_4], 3
jmp short loc_21D97
loc_21D33:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz short loc_21D5C
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+18h+var_10]
lea rsi, aAntennaareamin_0; " ANTENNAAREAMINUSDIFF %.11g ;\n"
mov al, 1
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_21D7A
loc_21D5C:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
movsd xmm0, [rsp+18h+var_10]
lea rsi, aAntennaareamin_0; " ANTENNAAREAMINUSDIFF %.11g ;\n"
mov al, 1
call _fprintf
loc_21D7A:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
mov [rsp+18h+var_4], 0
loc_21D97:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| long long LefDefParser::lefwLayerAntennaAreaMinusDiff(
LefDefParser *this,
double a2,
long long a3,
int a4,
int a5,
int a6,
int a7)
{
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwState == 7
|| LefDefParser::lefwState == 31
|| LefDefParser::lefwState == 6
|| LefDefParser::lefwState == 28 )
{
if ( LefDefParser::lefwIsRouting || LefDefParser::lefwIsCut )
{
if ( LefDefParser::lefwWriteEncrypt )
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" ANTENNAAREAMINUSDIFF %.11g ;\n",
a4,
a5,
a6,
a7);
else
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " ANTENNAAREAMINUSDIFF %.11g ;\n", a2);
++LefDefParser::lefwLines;
return 0;
}
else
{
return 3;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| lefwLayerAntennaAreaMinusDiff:
SUB RSP,0x18
MOVSD qword ptr [RSP + 0x8],XMM0
LEA RAX,[0x1c5250]
CMP qword ptr [RAX],0x0
JNZ 0x00121cd4
MOV dword ptr [RSP + 0x14],0x1
JMP 0x00121d97
LAB_00121cd4:
LEA RAX,[0x1c54a0]
CMP dword ptr [RAX],0x7
JZ 0x00121d11
LEA RAX,[0x1c54a0]
CMP dword ptr [RAX],0x1f
JZ 0x00121d11
LEA RAX,[0x1c54a0]
CMP dword ptr [RAX],0x6
JZ 0x00121d11
LEA RAX,[0x1c54a0]
CMP dword ptr [RAX],0x1c
JZ 0x00121d11
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00121d97
LAB_00121d11:
LEA RAX,[0x1c5514]
CMP dword ptr [RAX],0x0
JNZ 0x00121d33
LEA RAX,[0x1c54d4]
CMP dword ptr [RAX],0x0
JNZ 0x00121d33
MOV dword ptr [RSP + 0x14],0x3
JMP 0x00121d97
LAB_00121d33:
CMP dword ptr [0x001c553c],0x0
JZ 0x00121d5c
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x8]
LEA RSI,[0x19355f]
MOV AL,0x1
CALL 0x0018bf50
JMP 0x00121d7a
LAB_00121d5c:
LEA RAX,[0x1c5250]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [RSP + 0x8]
LEA RSI,[0x19355f]
MOV AL,0x1
CALL 0x00102370
LAB_00121d7a:
LEA RAX,[0x1c549c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x1c549c]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0x14],0x0
LAB_00121d97:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::lefwLayerAntennaAreaMinusDiff(double) */
int4 LefDefParser::lefwLayerAntennaAreaMinusDiff(double param_1)
{
int4 local_4;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if ((((lefwState == 7) || (lefwState == 0x1f)) || (lefwState == 6)) || (lefwState == 0x1c)) {
if ((lefwIsRouting == 0) && (lefwIsCut == 0)) {
local_4 = 3;
}
else {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile," ANTENNAAREAMINUSDIFF %.11g ;\n",param_1);
}
else {
encPrint(lefwFile," ANTENNAAREAMINUSDIFF %.11g ;\n",param_1);
}
lefwLines = lefwLines + 1;
local_4 = 0;
}
}
else {
local_4 = 2;
}
return local_4;
}
|
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.