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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
37,400 | my_hash_init2 | eloqsql/mysys/hash.c | my_bool
my_hash_init2(PSI_memory_key psi_key, HASH *hash, uint growth_size,
CHARSET_INFO *charset, ulong size, size_t key_offset,
size_t key_length, my_hash_get_key get_key,
my_hash_function hash_function,
void (*free_element)(void*), uint flags)
{
my_bool res;
DBUG_ENTER("my_hash_init2");
DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size));
hash->records=0;
hash->key_offset=key_offset;
hash->key_length=key_length;
hash->blength=1;
hash->get_key=get_key;
hash->hash_function= hash_function ? hash_function : my_hash_sort;
hash->free=free_element;
hash->flags=flags;
hash->charset=charset;
res= init_dynamic_array2(psi_key, &hash->array, sizeof(HASH_LINK), NULL, size,
growth_size, MYF((flags & HASH_THREAD_SPECIFIC ?
MY_THREAD_SPECIFIC : 0)));
DBUG_RETURN(res);
} | O0 | c | my_hash_init2:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x30(%rbp), %eax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
jmp 0xdf223
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x1, 0x10(%rax)
movq 0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
cmpq $0x0, 0x20(%rbp)
je 0xdf26f
movq 0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xdf27c
leaq -0x126(%rip), %rax # 0xdf150
movq %rax, -0x40(%rbp)
jmp 0xdf27c
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq 0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movl 0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
movq -0x28(%rbp), %rax
movl %eax, %r8d
movl -0x14(%rbp), %r9d
movl 0x30(%rbp), %edx
andl $0x2, %edx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, %eax
movl $0x10, %edx
xorl %ecx, %ecx
movq %rax, (%rsp)
callq 0xdbb90
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_hash_init2:
push rbp
mov rbp, rsp
sub rsp, 50h
mov eax, [rbp+arg_20]
mov rax, [rbp+arg_18]
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
jmp short $+2
loc_DF223:
mov rax, [rbp+var_10]
mov qword ptr [rax+18h], 0
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+10h], 1
mov rcx, [rbp+arg_8]
mov rax, [rbp+var_10]
mov [rax+50h], rcx
cmp [rbp+arg_10], 0
jz short loc_DF26F
mov rax, [rbp+arg_10]
mov [rbp+var_40], rax
jmp short loc_DF27C
loc_DF26F:
lea rax, my_hash_sort
mov [rbp+var_40], rax
jmp short $+2
loc_DF27C:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax+58h], rcx
mov rcx, [rbp+arg_18]
mov rax, [rbp+var_10]
mov [rax+60h], rcx
mov ecx, [rbp+arg_20]
mov rax, [rbp+var_10]
mov [rax+20h], ecx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+68h], rcx
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
add rsi, 28h ; '('
mov rax, [rbp+var_28]
mov r8d, eax
mov r9d, [rbp+var_14]
mov edx, [rbp+arg_20]
and edx, 2
xor eax, eax
mov ecx, 10000h
cmp edx, 0
cmovnz eax, ecx
mov eax, eax
mov edx, 10h
xor ecx, ecx
mov [rsp+50h+var_50], rax
call init_dynamic_array2
mov [rbp+var_31], al
mov al, [rbp+var_31]
mov [rbp+var_41], al
mov al, [rbp+var_41]
add rsp, 50h
pop rbp
retn
| char my_hash_init2(
unsigned int a1,
long long a2,
int a3,
long long a4,
unsigned int a5,
long long a6,
long long a7,
long long a8,
long long ( *a9)(long long a1, long long a2, long long a3),
long long a10,
int a11)
{
long long v11; // rsi
unsigned int v12; // eax
long long ( *v14)(long long, long long, long long); // [rsp+10h] [rbp-40h]
*(_QWORD *)(a2 + 24) = 0LL;
*(_QWORD *)a2 = a6;
*(_QWORD *)(a2 + 8) = a7;
*(_QWORD *)(a2 + 16) = 1LL;
*(_QWORD *)(a2 + 80) = a8;
if ( a9 )
v14 = a9;
else
v14 = my_hash_sort;
*(_QWORD *)(a2 + 88) = v14;
*(_QWORD *)(a2 + 96) = a10;
*(_DWORD *)(a2 + 32) = a11;
*(_QWORD *)(a2 + 104) = a4;
v11 = a2 + 40;
v12 = 0;
if ( (a11 & 2) != 0 )
v12 = 0x10000;
return init_dynamic_array2(a1, v11, 0x10u, 0LL, a5, a3, v12);
}
| my_hash_init2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV EAX,dword ptr [RBP + 0x30]
MOV RAX,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
JMP 0x001df223
LAB_001df223:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],0x0
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],0x1
MOV RCX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x50],RCX
CMP qword ptr [RBP + 0x20],0x0
JZ 0x001df26f
MOV RAX,qword ptr [RBP + 0x20]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001df27c
LAB_001df26f:
LEA RAX,[0x1df150]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001df27c
LAB_001df27c:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x58],RCX
MOV RCX,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x60],RCX
MOV ECX,dword ptr [RBP + 0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x20],ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x68],RCX
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x28
MOV RAX,qword ptr [RBP + -0x28]
MOV R8D,EAX
MOV R9D,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RBP + 0x30]
AND EDX,0x2
XOR EAX,EAX
MOV ECX,0x10000
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV EAX,EAX
MOV EDX,0x10
XOR ECX,ECX
MOV qword ptr [RSP],RAX
CALL 0x001dbb90
MOV byte ptr [RBP + -0x31],AL
MOV AL,byte ptr [RBP + -0x31]
MOV byte ptr [RBP + -0x41],AL
MOV AL,byte ptr [RBP + -0x41]
ADD RSP,0x50
POP RBP
RET
|
int8
my_hash_init2(int4 param_1,int8 *param_2,int4 param_3,int8 param_4,
int4 param_5,int8 param_6,int8 param_7,int8 param_8,
code *param_9,int8 param_10,uint param_11)
{
int4 uVar1;
int8 uVar2;
code *local_48;
param_2[3] = 0;
*param_2 = param_6;
param_2[1] = param_7;
param_2[2] = 1;
param_2[10] = param_8;
if (param_9 == (code *)0x0) {
local_48 = my_hash_sort;
}
else {
local_48 = param_9;
}
param_2[0xb] = local_48;
param_2[0xc] = param_10;
*(uint *)(param_2 + 4) = param_11;
param_2[0xd] = param_4;
uVar1 = 0;
if ((param_11 & 2) != 0) {
uVar1 = 0x10000;
}
uVar2 = init_dynamic_array2(param_1,param_2 + 5,0x10,0,param_5,param_3,uVar1);
return uVar2;
}
| |
37,401 | ma_log_prefix | eloqsql/storage/maria/ma_key_recover.c | my_bool _ma_log_prefix(MARIA_PAGE *ma_page, uint changed_length,
int move_length,
enum en_key_debug debug_marker __attribute__((unused)))
{
uint translog_parts;
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 7 + 7 + 2 + 2];
uchar *log_pos;
uchar *buff= ma_page->buff;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4];
MARIA_HA *info= ma_page->info;
pgcache_page_no_t page= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_prefix");
DBUG_PRINT("enter", ("page: %lu changed_length: %u move_length: %d",
(ulong) page, changed_length, move_length));
DBUG_ASSERT(ma_page->size == ma_page->org_size + move_length);
log_pos= log_data + FILEID_STORE_SIZE;
page_store(log_pos, page);
log_pos+= PAGE_STORE_SIZE;
#ifdef EXTRA_DEBUG_KEY_CHANGES
(*log_pos++)= KEY_OP_DEBUG;
(*log_pos++)= debug_marker;
#endif
/* Store keypage_flag */
*log_pos++= KEY_OP_SET_PAGEFLAG;
*log_pos++= _ma_get_keypage_flag(info->s, buff);
if (move_length < 0)
{
/* Delete prefix */
log_pos[0]= KEY_OP_DEL_PREFIX;
int2store(log_pos+1, -move_length);
log_pos+= 3;
if (changed_length)
{
/*
We don't need a KEY_OP_OFFSET as KEY_OP_DEL_PREFIX has an implicit
offset
*/
log_pos[0]= KEY_OP_CHANGE;
int2store(log_pos+1, changed_length);
log_pos+= 3;
}
}
else
{
/* Add prefix */
DBUG_ASSERT(changed_length >0 && (int) changed_length >= move_length);
log_pos[0]= KEY_OP_ADD_PREFIX;
int2store(log_pos+1, move_length);
int2store(log_pos+3, changed_length);
log_pos+= 5;
}
translog_parts= 1;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos -
log_data);
if (changed_length)
{
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= (buff +
info->s->keypage_header);
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= changed_length;
translog_parts= 2;
}
_ma_log_key_changes(ma_page, log_array + TRANSLOG_INTERNAL_PARTS +
translog_parts, log_pos, &changed_length,
&translog_parts);
/* Remember new page length for future log entires for same page */
ma_page->org_size= ma_page->size;
DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS +
0].length + changed_length,
TRANSLOG_INTERNAL_PARTS + translog_parts,
log_array, log_data, NULL));
} | O0 | c | ma_log_prefix:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp # imm = 0x120
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x38(%rbp)
movl %esi, -0x3c(%rbp)
movl %edx, -0x40(%rbp)
movl %ecx, -0x44(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xc8(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq -0xc8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xd0(%rbp)
jmp 0x3f915
jmp 0x3f917
jmp 0x3f919
leaq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd0(%rbp), %rax
movl %eax, %ecx
movq -0xd8(%rbp), %rax
movl %ecx, (%rax)
movq -0xd0(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0xd8(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x58(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rbp)
movb $0xa, (%rax)
movq -0x60(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x744(%rcx), %ecx
subl $0x2, %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %cl
movq -0x58(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x58(%rbp)
movb %cl, (%rax)
cmpl $0x0, -0x40(%rbp)
jge 0x3fa1b
movq -0x58(%rbp), %rax
movb $0x5, (%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe0(%rbp)
xorl %eax, %eax
subl -0x40(%rbp), %eax
movw %ax, %cx
movq -0xe0(%rbp), %rax
movw %cx, (%rax)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x3fa19
movq -0x58(%rbp), %rax
movb $0x3, (%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe8(%rbp)
movl -0x3c(%rbp), %eax
movw %ax, %cx
movq -0xe8(%rbp), %rax
movw %cx, (%rax)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x3fa72
jmp 0x3fa1d
jmp 0x3fa1f
movq -0x58(%rbp), %rax
movb $0x4, (%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf0(%rbp)
movl -0x40(%rbp), %eax
movw %ax, %cx
movq -0xf0(%rbp), %rax
movw %cx, (%rax)
jmp 0x3fa47
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0xf8(%rbp)
movl -0x3c(%rbp), %eax
movw %ax, %cx
movq -0xf8(%rbp), %rax
movw %cx, (%rax)
movq -0x58(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x58(%rbp)
movl $0x1, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x58(%rbp), %rax
leaq -0x30(%rbp), %rcx
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x98(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x3facd
movq -0x60(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq (%rcx), %rcx
movl 0x744(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movl -0x3c(%rbp), %eax
movq %rax, -0x88(%rbp)
movl $0x2, -0x48(%rbp)
movq -0x38(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0xc8(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0xc8(%rbp), %rcx
movq -0x98(%rbp), %rax
movl %eax, %r8d
addl -0x3c(%rbp), %r8d
movl -0x48(%rbp), %r9d
addl $0x2, %r9d
leaq -0xc0(%rbp), %r10
leaq -0x30(%rbp), %rax
leaq -0x50(%rbp), %rdi
movl $0xc, %esi
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x8cc60
movb %al, -0xf9(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x3fb58
movb -0xf9(%rbp), %al
addq $0x120, %rsp # imm = 0x120
popq %rbp
retq
callq 0x29250
nopl (%rax)
| _ma_log_prefix:
push rbp
mov rbp, rsp
sub rsp, 120h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_38], rdi
mov [rbp+var_3C], esi
mov [rbp+var_40], edx
mov [rbp+var_44], ecx
mov rax, [rbp+var_38]
mov rax, [rax+10h]
mov [rbp+var_60], rax
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_C8], rax
mov rax, [rbp+var_38]
mov rax, [rax+18h]
mov rcx, [rbp+var_C8]
mov rcx, [rcx]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_D0], rax
jmp short $+2
loc_3F915:
jmp short $+2
loc_3F917:
jmp short $+2
loc_3F919:
lea rax, [rbp+var_30]
add rax, 2
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov [rbp+var_D8], rax
mov rax, [rbp+var_D0]
mov ecx, eax
mov rax, [rbp+var_D8]
mov [rax], ecx
mov rax, [rbp+var_D0]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_D8]
mov [rax+4], cl
mov rax, [rbp+var_58]
add rax, 5
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov rcx, rax
add rcx, 1
mov [rbp+var_58], rcx
mov byte ptr [rax], 0Ah
mov rax, [rbp+var_60]
mov rcx, [rbp+var_C8]
mov rcx, [rcx]
mov ecx, [rcx+744h]
sub ecx, 2
sub ecx, 1
mov ecx, ecx
mov cl, [rax+rcx]
mov rax, [rbp+var_58]
mov rdx, rax
add rdx, 1
mov [rbp+var_58], rdx
mov [rax], cl
cmp [rbp+var_40], 0
jge short loc_3FA1B
mov rax, [rbp+var_58]
mov byte ptr [rax], 5
mov rax, [rbp+var_58]
add rax, 1
mov [rbp+var_E0], rax
xor eax, eax
sub eax, [rbp+var_40]
mov cx, ax
mov rax, [rbp+var_E0]
mov [rax], cx
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
cmp [rbp+var_3C], 0
jz short loc_3FA19
mov rax, [rbp+var_58]
mov byte ptr [rax], 3
mov rax, [rbp+var_58]
add rax, 1
mov [rbp+var_E8], rax
mov eax, [rbp+var_3C]
mov cx, ax
mov rax, [rbp+var_E8]
mov [rax], cx
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
loc_3FA19:
jmp short loc_3FA72
loc_3FA1B:
jmp short $+2
loc_3FA1D:
jmp short $+2
loc_3FA1F:
mov rax, [rbp+var_58]
mov byte ptr [rax], 4
mov rax, [rbp+var_58]
add rax, 1
mov [rbp+var_F0], rax
mov eax, [rbp+var_40]
mov cx, ax
mov rax, [rbp+var_F0]
mov [rax], cx
jmp short $+2
loc_3FA47:
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_F8], rax
mov eax, [rbp+var_3C]
mov cx, ax
mov rax, [rbp+var_F8]
mov [rax], cx
mov rax, [rbp+var_58]
add rax, 5
mov [rbp+var_58], rax
loc_3FA72:
mov [rbp+var_48], 1
lea rax, [rbp+var_30]
mov [rbp+var_A0], rax
mov rax, [rbp+var_58]
lea rcx, [rbp+var_30]
sub rax, rcx
mov eax, eax
mov [rbp+var_98], rax
cmp [rbp+var_3C], 0
jz short loc_3FACD
mov rax, [rbp+var_60]
mov rcx, [rbp+var_C8]
mov rcx, [rcx]
mov ecx, [rcx+744h]
add rax, rcx
mov [rbp+var_90], rax
mov eax, [rbp+var_3C]
mov [rbp+var_88], rax
mov [rbp+var_48], 2
loc_3FACD:
mov rax, [rbp+var_38]
mov ecx, [rax+20h]
mov rax, [rbp+var_38]
mov [rax+24h], ecx
mov rax, [rbp+var_C8]
mov rdx, [rax+8]
mov rcx, [rbp+var_C8]
mov rax, [rbp+var_98]
mov r8d, eax
add r8d, [rbp+var_3C]
mov r9d, [rbp+var_48]
add r9d, 2
lea r10, [rbp+var_C0]
lea rax, [rbp+var_30]
lea rdi, [rbp+var_50]
mov esi, 0Ch
xor r11d, r11d
mov [rsp+120h+var_120], r10
mov [rsp+120h+var_118], rax
mov [rsp+120h+var_110], 0
call translog_write_record
mov [rbp+var_F9], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_3FB58
mov al, [rbp+var_F9]
add rsp, 120h
pop rbp
retn
loc_3FB58:
call ___stack_chk_fail
| char ma_log_prefix(_QWORD *a1, unsigned int a2, int a3, int a4)
{
char v4; // cl
unsigned long long v6; // [rsp+50h] [rbp-D0h]
_QWORD *v7; // [rsp+58h] [rbp-C8h]
_BYTE v8[32]; // [rsp+60h] [rbp-C0h] BYREF
_BYTE *v9; // [rsp+80h] [rbp-A0h]
long long v10; // [rsp+88h] [rbp-98h]
long long v11; // [rsp+90h] [rbp-90h]
long long v12; // [rsp+98h] [rbp-88h]
long long v13; // [rsp+C0h] [rbp-60h]
char *v14; // [rsp+C8h] [rbp-58h]
char v15; // [rsp+D0h] [rbp-50h] BYREF
int v16; // [rsp+D8h] [rbp-48h]
int v17; // [rsp+DCh] [rbp-44h]
int v18; // [rsp+E0h] [rbp-40h]
unsigned int v19; // [rsp+E4h] [rbp-3Ch]
_QWORD *v20; // [rsp+E8h] [rbp-38h]
_BYTE v21[2]; // [rsp+F0h] [rbp-30h] BYREF
int v22; // [rsp+F2h] [rbp-2Eh]
char v23; // [rsp+F6h] [rbp-2Ah]
char v24; // [rsp+F7h] [rbp-29h]
char v25; // [rsp+F8h] [rbp-28h] BYREF
_BYTE v26[39]; // [rsp+F9h] [rbp-27h] BYREF
*(_QWORD *)&v26[31] = __readfsqword(0x28u);
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v13 = a1[2];
v7 = (_QWORD *)*a1;
v6 = a1[3] / (unsigned long long)*(unsigned int *)(*(_QWORD *)*a1 + 1980LL);
v22 = v6;
v23 = BYTE4(v6);
v14 = &v25;
v24 = 10;
v4 = *(_BYTE *)(v13 + (unsigned int)(*(_DWORD *)(*v7 + 1860LL) - 3));
v14 = v26;
v25 = v4;
if ( a3 >= 0 )
{
*v14 = 4;
*(_WORD *)(v14 + 1) = v18;
*(_WORD *)(v14 + 3) = v19;
v14 += 5;
}
else
{
*v14 = 5;
*(_WORD *)(v14 + 1) = -(__int16)v18;
v14 += 3;
if ( v19 )
{
*v14 = 3;
*(_WORD *)(v14 + 1) = v19;
v14 += 3;
}
}
v16 = 1;
v9 = v21;
v10 = (unsigned int)v14 - (unsigned int)v21;
if ( v19 )
{
v11 = *(unsigned int *)(*v7 + 1860LL) + v13;
v12 = v19;
v16 = 2;
}
*((_DWORD *)v20 + 9) = *((_DWORD *)v20 + 8);
return translog_write_record(
(unsigned int)&v15,
12,
v7[1],
(_DWORD)v7,
v19 + (unsigned int)v10,
v16 + 2,
(long long)v8,
(long long)v21,
0LL);
}
| _ma_log_prefix:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x120
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x38],RDI
MOV dword ptr [RBP + -0x3c],ESI
MOV dword ptr [RBP + -0x40],EDX
MOV dword ptr [RBP + -0x44],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xc8],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0xc8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x0013f915
LAB_0013f915:
JMP 0x0013f917
LAB_0013f917:
JMP 0x0013f919
LAB_0013f919:
LEA RAX,[RBP + -0x30]
ADD RAX,0x2
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0xd8],RAX
MOV RAX,qword ptr [RBP + -0xd0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xd8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0xd0]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xd8]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x5
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x58],RCX
MOV byte ptr [RAX],0xa
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0xc8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x744]
SUB ECX,0x2
SUB ECX,0x1
MOV ECX,ECX
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x58]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x58],RDX
MOV byte ptr [RAX],CL
CMP dword ptr [RBP + -0x40],0x0
JGE 0x0013fa1b
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX],0x5
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x1
MOV qword ptr [RBP + -0xe0],RAX
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x40]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xe0]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x0013fa19
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX],0x3
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x1
MOV qword ptr [RBP + -0xe8],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xe8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
LAB_0013fa19:
JMP 0x0013fa72
LAB_0013fa1b:
JMP 0x0013fa1d
LAB_0013fa1d:
JMP 0x0013fa1f
LAB_0013fa1f:
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX],0x4
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x1
MOV qword ptr [RBP + -0xf0],RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xf0]
MOV word ptr [RAX],CX
JMP 0x0013fa47
LAB_0013fa47:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0xf8],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xf8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x5
MOV qword ptr [RBP + -0x58],RAX
LAB_0013fa72:
MOV dword ptr [RBP + -0x48],0x1
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[RBP + -0x30]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x98],RAX
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x0013facd
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0xc8]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x744]
ADD RAX,RCX
MOV qword ptr [RBP + -0x90],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV qword ptr [RBP + -0x88],RAX
MOV dword ptr [RBP + -0x48],0x2
LAB_0013facd:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RBP + -0xc8]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RBP + -0x98]
MOV R8D,EAX
ADD R8D,dword ptr [RBP + -0x3c]
MOV R9D,dword ptr [RBP + -0x48]
ADD R9D,0x2
LEA R10,[RBP + -0xc0]
LEA RAX,[RBP + -0x30]
LEA RDI,[RBP + -0x50]
MOV ESI,0xc
XOR R11D,R11D
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
CALL 0x0018cc60
MOV byte ptr [RBP + -0xf9],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0013fb58
MOV AL,byte ptr [RBP + -0xf9]
ADD RSP,0x120
POP RBP
RET
LAB_0013fb58:
CALL 0x00129250
|
int8 _ma_log_prefix(long *param_1,uint param_2,int param_3,int4 param_4)
{
long *plVar1;
int1 uVar2;
uint uVar3;
ulong uVar4;
long in_FS_OFFSET;
int1 local_c8 [32];
int1 *local_a8;
ulong local_a0;
long local_98;
ulong local_90;
long local_68;
int1 *local_60;
int1 local_58 [8];
int local_50;
int4 local_4c;
int local_48;
uint local_44;
long *local_40;
int1 local_38 [2];
int4 local_36;
int1 local_32;
int1 local_31;
int1 local_30;
int1 local_2f;
short local_2e;
int1 local_2c [2];
int1 uStack_2a;
int1 auStack_29 [25];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_68 = param_1[2];
plVar1 = (long *)*param_1;
uVar4 = (ulong)param_1[3] / (ulong)*(uint *)(*plVar1 + 0x7bc);
local_36 = (int4)uVar4;
local_32 = (int1)(uVar4 >> 0x20);
local_31 = 10;
local_30 = *(int1 *)(local_68 + (ulong)(*(int *)(*plVar1 + 0x744) - 3));
local_2e = (short)param_3;
if (param_3 < 0) {
local_2f = 5;
local_2e = -local_2e;
local_60 = local_2c;
if (param_2 != 0) {
local_2c[0] = 3;
/* WARNING: Ignoring partial resolution of indirect */
stack0xffffffffffffffd5 = (short)param_2;
local_60 = auStack_29;
}
}
else {
local_2f = 4;
local_60 = &uStack_2a;
local_2c = (int1 [2])(short)param_2;
}
local_50 = 1;
local_a8 = local_38;
uVar3 = (int)local_60 - (int)local_38;
local_a0 = (ulong)uVar3;
if (param_2 != 0) {
local_98 = local_68 + (ulong)*(uint *)(*plVar1 + 0x744);
local_90 = (ulong)param_2;
local_50 = 2;
}
*(int *)((long)param_1 + 0x24) = (int)param_1[4];
local_4c = param_4;
local_48 = param_3;
local_44 = param_2;
local_40 = param_1;
uVar2 = translog_write_record
(local_58,0xc,plVar1[1],plVar1,uVar3 + param_2,local_50 + 2,local_c8,local_38,0)
;
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),uVar2);
}
| |
37,402 | stbi__zhuffman_decode(stbi__zbuf*, stbi__zhuffman*) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffman *z)
{
int b,s;
if (a->num_bits < 16) {
if (stbi__zeof(a)) {
return -1; /* report error for unexpected end of data. */
}
stbi__fill_bits(a);
}
b = z->fast[a->code_buffer & STBI__ZFAST_MASK];
if (b) {
s = b >> 9;
a->code_buffer >>= s;
a->num_bits -= s;
return b & 511;
}
return stbi__zhuffman_decode_slowpath(a, z);
} | O2 | c | stbi__zhuffman_decode(stbi__zbuf*, stbi__zhuffman*):
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0xf, 0x10(%rdi)
pushq $-0x1
popq %rbp
jg 0x19893
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
jae 0x1996a
movq %rbx, %rdi
callq 0x197a4
movl 0x14(%rbx), %edx
movl %edx, %eax
andl $0x1ff, %eax # imm = 0x1FF
movzwl (%r14,%rax,2), %eax
testl %eax, %eax
je 0x198bf
movl %eax, %ecx
shrl $0x9, %ecx
shrl %cl, %edx
movl %edx, 0x14(%rbx)
subl %ecx, 0x10(%rbx)
andl $0x1ff, %eax # imm = 0x1FF
movl %eax, %ebp
jmp 0x1996a
movl %edx, %eax
rolw $0x8, %ax
movl %eax, %ecx
shrl $0x4, %ecx
movl $0xf0f, %esi # imm = 0xF0F
andl %esi, %ecx
andl %esi, %eax
shll $0x4, %eax
orl %ecx, %eax
movl $0x3333, %ecx # imm = 0x3333
movl %eax, %esi
andl %ecx, %esi
shrl $0x2, %eax
andl %ecx, %eax
leal (%rax,%rsi,4), %eax
movl $0x5555, %ecx # imm = 0x5555
movl %eax, %esi
andl %ecx, %esi
shrl %eax
andl %ecx, %eax
leal (%rax,%rsi,2), %edi
xorl %esi, %esi
movq %rsi, %rax
incq %rsi
cmpl %edi, 0x448(%r14,%rax,4)
jle 0x198fb
leaq 0x9(%rsi), %rax
cmpq $0xf, %rax
ja 0x1996a
movb $0x7, %cl
subb %sil, %cl
shrl %cl, %edi
movzwl 0x412(%r14,%rsi,2), %ecx
subq %rcx, %rdi
movzwl 0x476(%r14,%rsi,2), %r8d
addq %rdi, %r8
cmpl $0x11f, %r8d # imm = 0x11F
jg 0x1996a
movzbl 0x484(%r14,%r8), %ecx
addq $-0x9, %rcx
cmpq %rsi, %rcx
jne 0x1996a
movl %eax, %ecx
shrl %cl, %edx
movl %edx, 0x14(%rbx)
movl 0x10(%rbx), %eax
subl %esi, %eax
addl $-0x9, %eax
movl %eax, 0x10(%rbx)
movzwl 0x5a4(%r14,%r8,2), %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
| _ZL21stbi__zhuffman_decodeP10stbi__zbufP14stbi__zhuffman:
push rbp
push r14
push rbx
mov r14, rsi
mov rbx, rdi
cmp dword ptr [rdi+10h], 0Fh
push 0FFFFFFFFFFFFFFFFh
pop rbp
jg short loc_19893
mov rax, [rbx]
cmp rax, [rbx+8]
jnb loc_1996A
mov rdi, rbx
call _ZL15stbi__fill_bitsP10stbi__zbuf; stbi__fill_bits(stbi__zbuf *)
loc_19893:
mov edx, [rbx+14h]
mov eax, edx
and eax, 1FFh
movzx eax, word ptr [r14+rax*2]
test eax, eax
jz short loc_198BF
mov ecx, eax
shr ecx, 9
shr edx, cl
mov [rbx+14h], edx
sub [rbx+10h], ecx
and eax, 1FFh
mov ebp, eax
jmp loc_1996A
loc_198BF:
mov eax, edx
rol ax, 8
mov ecx, eax
shr ecx, 4
mov esi, 0F0Fh
and ecx, esi
and eax, esi
shl eax, 4
or eax, ecx
mov ecx, 3333h
mov esi, eax
and esi, ecx
shr eax, 2
and eax, ecx
lea eax, [rax+rsi*4]
mov ecx, 5555h
mov esi, eax
and esi, ecx
shr eax, 1
and eax, ecx
lea edi, [rax+rsi*2]
xor esi, esi
loc_198FB:
mov rax, rsi
inc rsi
cmp [r14+rax*4+448h], edi
jle short loc_198FB
lea rax, [rsi+9]
cmp rax, 0Fh
ja short loc_1996A
mov cl, 7
sub cl, sil
shr edi, cl
movzx ecx, word ptr [r14+rsi*2+412h]
sub rdi, rcx
movzx r8d, word ptr [r14+rsi*2+476h]
add r8, rdi
cmp r8d, 11Fh
jg short loc_1996A
movzx ecx, byte ptr [r14+r8+484h]
add rcx, 0FFFFFFFFFFFFFFF7h
cmp rcx, rsi
jnz short loc_1996A
mov ecx, eax
shr edx, cl
mov [rbx+14h], edx
mov eax, [rbx+10h]
sub eax, esi
add eax, 0FFFFFFF7h
mov [rbx+10h], eax
movzx ebp, word ptr [r14+r8*2+5A4h]
loc_1996A:
mov eax, ebp
pop rbx
pop r14
pop rbp
retn
| long long stbi__zhuffman_decode(long long a1, long long a2)
{
unsigned int v4; // ebp
unsigned int v5; // edx
unsigned int v6; // eax
unsigned int v7; // eax
unsigned int v8; // eax
unsigned int v9; // eax
int v10; // edi
long long v11; // rsi
long long v12; // rax
unsigned long long v13; // r8
v4 = -1;
if ( *(int *)(a1 + 16) <= 15 )
{
if ( *(_QWORD *)a1 >= *(_QWORD *)(a1 + 8) )
return v4;
stbi__fill_bits((unsigned __int8 **)a1);
}
v5 = *(_DWORD *)(a1 + 20);
v6 = *(unsigned __int16 *)(a2 + 2LL * (v5 & 0x1FF));
if ( *(_WORD *)(a2 + 2LL * (v5 & 0x1FF)) )
{
*(_DWORD *)(a1 + 20) = v5 >> (v6 >> 9);
*(_DWORD *)(a1 + 16) -= v6 >> 9;
return v6 & 0x1FF;
}
else
{
HIWORD(v7) = HIWORD(v5);
LOWORD(v7) = __ROL2__(v5, 8);
v8 = (v7 >> 4) & 0xF0F | (16 * (v7 & 0xF0F));
v9 = ((v8 >> 2) & 0x3333) + 4 * (v8 & 0x3333);
v10 = ((v9 >> 1) & 0x5555) + 2 * (v9 & 0x5555);
v11 = 0LL;
do
v12 = v11++;
while ( *(_DWORD *)(a2 + 4 * v12 + 1096) <= v10 );
if ( (unsigned long long)(v11 + 9) <= 0xF )
{
v13 = ((unsigned int)v10 >> (7 - v11))
- (unsigned long long)*(unsigned __int16 *)(a2 + 2 * v11 + 1042)
+ *(unsigned __int16 *)(a2 + 2 * v11 + 1142);
if ( (int)v13 <= 287 && *(unsigned __int8 *)(a2 + v13 + 1156) - 9LL == v11 )
{
*(_DWORD *)(a1 + 20) = v5 >> (v11 + 9);
*(_DWORD *)(a1 + 16) = *(_DWORD *)(a1 + 16) - v11 - 9;
return *(unsigned __int16 *)(a2 + 2 * v13 + 1444);
}
}
}
return v4;
}
| stbi__zhuffman_decode:
PUSH RBP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
CMP dword ptr [RDI + 0x10],0xf
PUSH -0x1
POP RBP
JG 0x00119893
MOV RAX,qword ptr [RBX]
CMP RAX,qword ptr [RBX + 0x8]
JNC 0x0011996a
MOV RDI,RBX
CALL 0x001197a4
LAB_00119893:
MOV EDX,dword ptr [RBX + 0x14]
MOV EAX,EDX
AND EAX,0x1ff
MOVZX EAX,word ptr [R14 + RAX*0x2]
TEST EAX,EAX
JZ 0x001198bf
MOV ECX,EAX
SHR ECX,0x9
SHR EDX,CL
MOV dword ptr [RBX + 0x14],EDX
SUB dword ptr [RBX + 0x10],ECX
AND EAX,0x1ff
MOV EBP,EAX
JMP 0x0011996a
LAB_001198bf:
MOV EAX,EDX
ROL AX,0x8
MOV ECX,EAX
SHR ECX,0x4
MOV ESI,0xf0f
AND ECX,ESI
AND EAX,ESI
SHL EAX,0x4
OR EAX,ECX
MOV ECX,0x3333
MOV ESI,EAX
AND ESI,ECX
SHR EAX,0x2
AND EAX,ECX
LEA EAX,[RAX + RSI*0x4]
MOV ECX,0x5555
MOV ESI,EAX
AND ESI,ECX
SHR EAX,0x1
AND EAX,ECX
LEA EDI,[RAX + RSI*0x2]
XOR ESI,ESI
LAB_001198fb:
MOV RAX,RSI
INC RSI
CMP dword ptr [R14 + RAX*0x4 + 0x448],EDI
JLE 0x001198fb
LEA RAX,[RSI + 0x9]
CMP RAX,0xf
JA 0x0011996a
MOV CL,0x7
SUB CL,SIL
SHR EDI,CL
MOVZX ECX,word ptr [R14 + RSI*0x2 + 0x412]
SUB RDI,RCX
MOVZX R8D,word ptr [R14 + RSI*0x2 + 0x476]
ADD R8,RDI
CMP R8D,0x11f
JG 0x0011996a
MOVZX ECX,byte ptr [R14 + R8*0x1 + 0x484]
ADD RCX,-0x9
CMP RCX,RSI
JNZ 0x0011996a
MOV ECX,EAX
SHR EDX,CL
MOV dword ptr [RBX + 0x14],EDX
MOV EAX,dword ptr [RBX + 0x10]
SUB EAX,ESI
ADD EAX,-0x9
MOV dword ptr [RBX + 0x10],EAX
MOVZX EBP,word ptr [R14 + R8*0x2 + 0x5a4]
LAB_0011996a:
MOV EAX,EBP
POP RBX
POP R14
POP RBP
RET
|
/* stbi__zhuffman_decode(stbi__zbuf*, stbi__zhuffman*) */
uint stbi__zhuffman_decode(stbi__zbuf *param_1,stbi__zhuffman *param_2)
{
uint uVar1;
ushort uVar2;
uint uVar3;
uint uVar4;
long lVar5;
long lVar6;
long lVar7;
uVar3 = 0xffffffff;
if (*(int *)(param_1 + 0x10) < 0x10) {
if (*(ulong *)(param_1 + 8) <= *(ulong *)param_1) {
return 0xffffffff;
}
stbi__fill_bits(param_1);
}
uVar1 = *(uint *)(param_1 + 0x14);
uVar2 = *(ushort *)(param_2 + (ulong)(uVar1 & 0x1ff) * 2);
if (uVar2 == 0) {
uVar2 = (ushort)uVar1 << 8 | (ushort)uVar1 >> 8;
uVar4 = (uVar2 & 0xf0f) << 4 | (uVar2 & 0xf0f0) >> 4;
uVar4 = (uVar4 >> 2 & 0x3333) + (uVar4 & 0x3333) * 4;
uVar4 = (uVar4 >> 1 & 0x5555) + (uVar4 & 0x5555) * 2;
lVar6 = 0;
do {
lVar5 = lVar6;
lVar6 = lVar5 + 1;
} while (*(int *)(param_2 + lVar5 * 4 + 0x448) <= (int)uVar4);
if (((lVar5 + 10U < 0x10) &&
(lVar7 = (ulong)*(ushort *)(param_2 + lVar6 * 2 + 0x476) +
((ulong)(uVar4 >> (7U - (char)lVar6 & 0x1f)) -
(ulong)*(ushort *)(param_2 + lVar6 * 2 + 0x412)), (int)lVar7 < 0x120)) &&
((ulong)(byte)param_2[lVar7 + 0x484] - 9 == lVar6)) {
*(uint *)(param_1 + 0x14) = uVar1 >> ((byte)(lVar5 + 10U) & 0x1f);
*(int *)(param_1 + 0x10) = (*(int *)(param_1 + 0x10) - (int)lVar6) + -9;
uVar3 = (uint)*(ushort *)(param_2 + lVar7 * 2 + 0x5a4);
}
}
else {
*(uint *)(param_1 + 0x14) = uVar1 >> ((byte)(uVar2 >> 9) & 0x1f);
*(uint *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) - (uint)(uVar2 >> 9);
uVar3 = uVar2 & 0x1ff;
}
return uVar3;
}
| |
37,403 | nglog::tools::SafeAppendHexNumber(unsigned long, char*, unsigned long) | ng-log[P]ng-log/src/symbolize.cc | static void SafeAppendHexNumber(uint64_t value, char* dest, size_t dest_size) {
// 64-bit numbers in hex can have up to 16 digits.
char buf[17] = {'\0'};
SafeAppendString(itoa_r(value, buf, sizeof(buf), 16, 0), dest, dest_size);
} | O3 | cpp | nglog::tools::SafeAppendHexNumber(unsigned long, char*, unsigned long):
subq $0x18, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movb $0x0, 0x10(%rsp)
xorl %eax, %eax
leaq 0x3038(%rip), %rcx # 0x23e50
cmpq $0x10, %rax
je 0x20e76
movl %edi, %r8d
andl $0xf, %r8d
movb (%r8,%rcx), %r8b
movb %r8b, (%rsp,%rax)
movq %rdi, %r8
shrq $0x4, %r8
incq %rax
cmpq $0xf, %rdi
movq %r8, %rdi
ja 0x20e18
addq %rsp, %rax
decq %rax
movb $0x0, 0x1(%rax)
movq %rsp, %rdi
cmpq %rdi, %rax
jbe 0x20e7c
leaq 0x1(%rsp), %rcx
movb (%rax), %r8b
movb -0x1(%rcx), %r9b
movb %r9b, (%rax)
movb %r8b, -0x1(%rcx)
decq %rax
leaq 0x1(%rcx), %r8
cmpq %rcx, %rax
movq %r8, %rcx
ja 0x20e57
jmp 0x20e7c
movb $0x0, (%rsp)
xorl %edi, %edi
callq 0x209a4
addq $0x18, %rsp
retq
| _ZN5nglog5toolsL19SafeAppendHexNumberEmPcm:
sub rsp, 18h
xorps xmm0, xmm0
movaps [rsp+18h+var_18], xmm0
mov [rsp+18h+var_8], 0
xor eax, eax
lea rcx, a0123456789abcd; "0123456789abcdef"
loc_20E18:
cmp rax, 10h
jz short loc_20E76
mov r8d, edi
and r8d, 0Fh
mov r8b, [r8+rcx]
mov byte ptr [rsp+rax+18h+var_18], r8b
mov r8, rdi
shr r8, 4
inc rax
cmp rdi, 0Fh
mov rdi, r8
ja short loc_20E18
add rax, rsp
dec rax
mov byte ptr [rax+1], 0
mov rdi, rsp
cmp rax, rdi
jbe short loc_20E7C
lea rcx, [rsp+18h+var_18+1]
loc_20E57:
mov r8b, [rax]
mov r9b, [rcx-1]
mov [rax], r9b
mov [rcx-1], r8b
dec rax
lea r8, [rcx+1]
cmp rax, rcx
mov rcx, r8
ja short loc_20E57
jmp short loc_20E7C
loc_20E76:
mov byte ptr [rsp+18h+var_18], 0
xor edi, edi; this
loc_20E7C:
call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong)
add rsp, 18h
retn
| long long nglog::tools::SafeAppendHexNumber(unsigned long long this, const char *a2, char *a3)
{
long long v3; // rax
bool v4; // cc
char *v5; // rax
nglog::tools *v6; // rdi
char *v7; // rcx
char v8; // r8
__int128 v10; // [rsp+0h] [rbp-18h] BYREF
char v11; // [rsp+10h] [rbp-8h]
v10 = 0LL;
v11 = 0;
v3 = 0LL;
do
{
if ( v3 == 16 )
{
LOBYTE(v10) = 0;
v6 = 0LL;
return nglog::tools::SafeAppendString(v6, a2, a3);
}
*((_BYTE *)&v10 + v3++) = a0123456789abcd[this & 0xF];
v4 = this <= 0xF;
this >>= 4;
}
while ( !v4 );
v5 = (char *)&v10 + v3 - 1;
v5[1] = 0;
v6 = (nglog::tools *)&v10;
if ( v5 > (char *)&v10 )
{
v7 = (char *)&v10 + 1;
do
{
v8 = *v5;
*v5 = *(v7 - 1);
*(v7 - 1) = v8;
v4 = --v5 <= v7++;
}
while ( !v4 );
}
return nglog::tools::SafeAppendString(v6, a2, a3);
}
| SafeAppendHexNumber:
SUB RSP,0x18
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV byte ptr [RSP + 0x10],0x0
XOR EAX,EAX
LEA RCX,[0x123e50]
LAB_00120e18:
CMP RAX,0x10
JZ 0x00120e76
MOV R8D,EDI
AND R8D,0xf
MOV R8B,byte ptr [R8 + RCX*0x1]
MOV byte ptr [RSP + RAX*0x1],R8B
MOV R8,RDI
SHR R8,0x4
INC RAX
CMP RDI,0xf
MOV RDI,R8
JA 0x00120e18
ADD RAX,RSP
DEC RAX
MOV byte ptr [RAX + 0x1],0x0
MOV RDI,RSP
CMP RAX,RDI
JBE 0x00120e7c
LEA RCX,[RSP + 0x1]
LAB_00120e57:
MOV R8B,byte ptr [RAX]
MOV R9B,byte ptr [RCX + -0x1]
MOV byte ptr [RAX],R9B
MOV byte ptr [RCX + -0x1],R8B
DEC RAX
LEA R8,[RCX + 0x1]
CMP RAX,RCX
MOV RCX,R8
JA 0x00120e57
JMP 0x00120e7c
LAB_00120e76:
MOV byte ptr [RSP],0x0
XOR EDI,EDI
LAB_00120e7c:
CALL 0x001209a4
ADD RSP,0x18
RET
|
/* nglog::tools::SafeAppendHexNumber(unsigned long, char*, unsigned long) */
void nglog::tools::SafeAppendHexNumber(ulong param_1,char *param_2,ulong param_3)
{
int1 uVar1;
bool bVar2;
long lVar3;
long lVar4;
int1 *puVar5;
int1 *puVar6;
char *pcVar7;
int8 local_18;
int8 uStack_10;
int1 local_8;
local_18 = 0;
uStack_10 = 0;
local_8 = 0;
lVar3 = 0;
do {
lVar4 = lVar3;
if (lVar4 == 0x10) {
local_18 = local_18 & 0xffffffffffffff00;
pcVar7 = (char *)0x0;
goto LAB_00120e7c;
}
*(char *)((long)&local_18 + lVar4) = "0123456789abcdef"[(uint)param_1 & 0xf];
bVar2 = 0xf < param_1;
lVar3 = lVar4 + 1;
param_1 = param_1 >> 4;
} while (bVar2);
puVar5 = (int1 *)((long)&local_18 + lVar4);
*(int1 *)((long)&local_18 + lVar4 + 1) = 0;
pcVar7 = (char *)&local_18;
if (&local_18 < puVar5) {
puVar6 = (int1 *)((long)&local_18 + 1);
do {
uVar1 = *puVar5;
*puVar5 = puVar6[-1];
puVar6[-1] = uVar1;
puVar5 = puVar5 + -1;
bVar2 = puVar6 < puVar5;
puVar6 = puVar6 + 1;
pcVar7 = (char *)&local_18;
} while (bVar2);
}
LAB_00120e7c:
SafeAppendString(pcVar7,param_2,param_3);
return;
}
| |
37,404 | LefDefParser::defwInit(_IO_FILE*, int, int, char const*, char const*, char const*, char const*, char const*, char const*, char const*, double) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwInit(FILE *f,
int vers1,
int vers2,
const char *caseSensitive,
const char *dividerChar,
const char *busBitChars,
const char *designName,
const char *technology, // optional
const char *array, // optional
const char *floorplan, // optional
double units // optional (set to -1 to ignore)
)
{
//if (defwFile) return DEFW_BAD_ORDER;
defwFile = f;
if (defwHasInitCbk == 1) { // defwInitCbk has already called, issue an error
fprintf(stderr,
"ERROR (DEFWRIT-9000): The DEF writer has detected that the function defwInitCbk has already been called and you are trying to call defwInit.\nOnly defwInitCbk or defwInit can be called but not both.\nUpdate your program and then try again.\n");
fprintf(stderr, "Writer Exit.\n");
exit(DEFW_BAD_ORDER);
}
defwState = DEFW_UNINIT; // Current state of writer
defwFunc = DEFW_UNINIT; // Current function of writer
defwDidNets = 0; // required section
defwDidComponents = 0; // required section
defwDidInit = 0; // required section
if (vers1) { // optional in 5.6 on
fprintf(defwFile, "VERSION %d.%d ;\n", vers1, vers2);
defwLines++;
}
if ((vers1 == 5) && (vers2 < 6)) { // For version before 5.6
if (caseSensitive == 0 || *caseSensitive == 0)
return DEFW_BAD_DATA;
fprintf(defwFile, "NAMESCASESENSITIVE %s ;\n", caseSensitive);
}
if (dividerChar) { // optional in 5.6 on
fprintf(defwFile, "DIVIDERCHAR \"%s\" ;\n", dividerChar);
defwLines++;
}
if (busBitChars) { // optional in 5.6 on
fprintf(defwFile, "BUSBITCHARS \"%s\" ;\n", busBitChars);
defwLines++;
}
if (designName == 0 || *designName == 0)
return DEFW_BAD_DATA;
fprintf(defwFile, "DESIGN %s ;\n", designName);
defwLines++;
if (technology) {
fprintf(defwFile, "TECHNOLOGY %s ;\n", technology);
defwLines++;
}
if (array) {
fprintf(defwFile, "ARRAY %s ;\n", array);
defwLines++;
}
if (floorplan) {
fprintf(defwFile, "FLOORPLAN %s ;\n", floorplan);
defwLines++;
}
if (units != -1.0) {
int unitsVal = (int) units;
switch (unitsVal) {
case 100:
case 200:
case 1000:
case 2000:
case 4000:
case 8000:
case 10000:
case 16000:
case 20000:
fprintf(defwFile, "UNITS DISTANCE MICRONS %d ;\n", ROUND(units));
defwLines++;
break;
default:
return DEFW_BAD_DATA;
}
}
defwDidInit = 1;
defwState = DEFW_DESIGN;
defwHasInit = 1;
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwInit(_IO_FILE*, int, int, char const*, char const*, char const*, char const*, char const*, char const*, char const*, double):
subq $0x58, %rsp
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rax
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rax
movq %rdi, 0x48(%rsp)
movl %esi, 0x44(%rsp)
movl %edx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %r9, 0x28(%rsp)
movsd %xmm0, 0x20(%rsp)
movq 0x48(%rsp), %rcx
leaq 0x1a9f2(%rip), %rax # 0x2b158
movq %rcx, (%rax)
leaq 0x1aa18(%rip), %rax # 0x2b188
cmpl $0x1, (%rax)
jne 0x107af
movq 0x1884c(%rip), %rax # 0x28fc8
movq (%rax), %rdi
leaq 0x13595(%rip), %rsi # 0x23d1b
movb $0x0, %al
callq 0x10f0
movq 0x18834(%rip), %rax # 0x28fc8
movq (%rax), %rdi
leaq 0x1366c(%rip), %rsi # 0x23e0a
movb $0x0, %al
callq 0x10f0
movl $0x2, %edi
callq 0x10c0
leaq 0x1a9ae(%rip), %rax # 0x2b164
movl $0x0, (%rax)
leaq 0x1a9a5(%rip), %rax # 0x2b168
movl $0x0, (%rax)
leaq 0x1a99c(%rip), %rax # 0x2b16c
movl $0x0, (%rax)
leaq 0x1a993(%rip), %rax # 0x2b170
movl $0x0, (%rax)
leaq 0x1a98a(%rip), %rax # 0x2b174
movl $0x0, (%rax)
cmpl $0x0, 0x44(%rsp)
je 0x1082c
leaq 0x1a95a(%rip), %rax # 0x2b158
movq (%rax), %rdi
movl 0x44(%rsp), %edx
movl 0x40(%rsp), %ecx
leaq 0x13608(%rip), %rsi # 0x23e18
movb $0x0, %al
callq 0x10f0
leaq 0x1a942(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1a936(%rip), %rax # 0x2b160
movl %ecx, (%rax)
cmpl $0x5, 0x44(%rsp)
jne 0x10879
cmpl $0x6, 0x40(%rsp)
jge 0x10879
cmpq $0x0, 0x38(%rsp)
je 0x1084f
movq 0x38(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x1085c
movl $0x3, 0x54(%rsp)
jmp 0x10b48
leaq 0x1a8f5(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x38(%rsp), %rdx
leaq 0x135b7(%rip), %rsi # 0x23e29
movb $0x0, %al
callq 0x10f0
cmpq $0x0, 0x30(%rsp)
je 0x108b3
leaq 0x1a8d0(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x30(%rsp), %rdx
leaq 0x135ab(%rip), %rsi # 0x23e42
movb $0x0, %al
callq 0x10f0
leaq 0x1a8bb(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1a8af(%rip), %rax # 0x2b160
movl %ecx, (%rax)
cmpq $0x0, 0x28(%rsp)
je 0x108ed
leaq 0x1a896(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x28(%rsp), %rdx
leaq 0x13585(%rip), %rsi # 0x23e56
movb $0x0, %al
callq 0x10f0
leaq 0x1a881(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1a875(%rip), %rax # 0x2b160
movl %ecx, (%rax)
cmpq $0x0, 0x60(%rsp)
je 0x10902
movq 0x60(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x1090f
movl $0x3, 0x54(%rsp)
jmp 0x10b48
leaq 0x1a842(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x60(%rsp), %rdx
leaq 0x13545(%rip), %rsi # 0x23e6a
movb $0x0, %al
callq 0x10f0
leaq 0x1a82d(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1a821(%rip), %rax # 0x2b160
movl %ecx, (%rax)
cmpq $0x0, 0x68(%rsp)
je 0x1097b
leaq 0x1a808(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x68(%rsp), %rdx
leaq 0x13518(%rip), %rsi # 0x23e77
movb $0x0, %al
callq 0x10f0
leaq 0x1a7f3(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1a7e7(%rip), %rax # 0x2b160
movl %ecx, (%rax)
cmpq $0x0, 0x70(%rsp)
je 0x109b5
leaq 0x1a7ce(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x70(%rsp), %rdx
leaq 0x134ef(%rip), %rsi # 0x23e88
movb $0x0, %al
callq 0x10f0
leaq 0x1a7b9(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1a7ad(%rip), %rax # 0x2b160
movl %ecx, (%rax)
cmpq $0x0, 0x78(%rsp)
je 0x109ef
leaq 0x1a794(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x78(%rsp), %rdx
leaq 0x134c1(%rip), %rsi # 0x23e94
movb $0x0, %al
callq 0x10f0
leaq 0x1a77f(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1a773(%rip), %rax # 0x2b160
movl %ecx, (%rax)
movsd 0x20(%rsp), %xmm0
movsd 0x1269b(%rip), %xmm1 # 0x23098
ucomisd %xmm1, %xmm0
jne 0x10a0a
jp 0x10a0a
jmp 0x10b19
cvttsd2si 0x20(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x18(%rsp)
subl $0x64, %eax
je 0x10a8f
jmp 0x10a23
movl 0x18(%rsp), %eax
subl $0xc8, %eax
je 0x10a8f
jmp 0x10a30
movl 0x18(%rsp), %eax
subl $0x3e8, %eax # imm = 0x3E8
je 0x10a8f
jmp 0x10a3d
movl 0x18(%rsp), %eax
subl $0x7d0, %eax # imm = 0x7D0
je 0x10a8f
jmp 0x10a4a
movl 0x18(%rsp), %eax
subl $0xfa0, %eax # imm = 0xFA0
je 0x10a8f
jmp 0x10a57
movl 0x18(%rsp), %eax
subl $0x1f40, %eax # imm = 0x1F40
je 0x10a8f
jmp 0x10a64
movl 0x18(%rsp), %eax
subl $0x2710, %eax # imm = 0x2710
je 0x10a8f
jmp 0x10a71
movl 0x18(%rsp), %eax
subl $0x3e80, %eax # imm = 0x3E80
je 0x10a8f
jmp 0x10a7e
movl 0x18(%rsp), %eax
subl $0x4e20, %eax # imm = 0x4E20
jne 0x10b0d
jmp 0x10a8f
leaq 0x1a6c2(%rip), %rax # 0x2b158
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movsd 0x20(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x10ac5
movsd 0x1286b(%rip), %xmm0 # 0x23320
addsd 0x20(%rsp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0xc(%rsp)
jmp 0x10adf
movsd 0x20(%rsp), %xmm0
movsd 0x1284d(%rip), %xmm1 # 0x23320
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %edx
leaq 0x133b5(%rip), %rsi # 0x23ea4
movb $0x0, %al
callq 0x10f0
leaq 0x1a663(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1a657(%rip), %rax # 0x2b160
movl %ecx, (%rax)
jmp 0x10b17
movl $0x3, 0x54(%rsp)
jmp 0x10b48
jmp 0x10b19
leaq 0x1a654(%rip), %rax # 0x2b174
movl $0x1, (%rax)
leaq 0x1a637(%rip), %rax # 0x2b164
movl $0x6, (%rax)
leaq 0x1a64a(%rip), %rax # 0x2b184
movl $0x1, (%rax)
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser8defwInitEP8_IO_FILEiiPKcS3_S3_S3_S3_S3_S3_d:
sub rsp, 58h
mov rax, [rsp+58h+arg_18]
mov rax, [rsp+58h+arg_10]
mov rax, [rsp+58h+arg_8]
mov rax, [rsp+58h+arg_0]
mov [rsp+58h+var_10], rdi
mov [rsp+58h+var_14], esi
mov [rsp+58h+var_18], edx
mov [rsp+58h+var_20], rcx
mov [rsp+58h+var_28], r8
mov [rsp+58h+var_30], r9
movsd [rsp+58h+var_38], xmm0
mov rcx, [rsp+58h+var_10]
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov [rax], rcx
lea rax, _ZN12LefDefParser14defwHasInitCbkE; LefDefParser::defwHasInitCbk
cmp dword ptr [rax], 1
jnz short loc_107AF
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aErrorDefwrit90; "ERROR (DEFWRIT-9000): The DEF writer ha"...
mov al, 0
call _fprintf
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aWriterExit; "Writer Exit.\n"
mov al, 0
call _fprintf
mov edi, 2
call _exit
loc_107AF:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 0
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 0
lea rax, _ZN12LefDefParser11defwDidNetsE; LefDefParser::defwDidNets
mov dword ptr [rax], 0
lea rax, _ZN12LefDefParser17defwDidComponentsE; LefDefParser::defwDidComponents
mov dword ptr [rax], 0
lea rax, _ZN12LefDefParser11defwDidInitE; LefDefParser::defwDidInit
mov dword ptr [rax], 0
cmp [rsp+58h+var_14], 0
jz short loc_1082C
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov edx, [rsp+58h+var_14]
mov ecx, [rsp+58h+var_18]
lea rsi, aVersionDD; "VERSION %d.%d ;\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
loc_1082C:
cmp [rsp+58h+var_14], 5
jnz short loc_10879
cmp [rsp+58h+var_18], 6
jge short loc_10879
cmp [rsp+58h+var_20], 0
jz short loc_1084F
mov rax, [rsp+58h+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_1085C
loc_1084F:
mov [rsp+58h+var_4], 3
jmp loc_10B48
loc_1085C:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+58h+var_20]
lea rsi, aNamescasesensi; "NAMESCASESENSITIVE %s ;\n"
mov al, 0
call _fprintf
loc_10879:
cmp [rsp+58h+var_28], 0
jz short loc_108B3
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+58h+var_28]
lea rsi, aDividercharS; "DIVIDERCHAR \"%s\" ;\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
loc_108B3:
cmp [rsp+58h+var_30], 0
jz short loc_108ED
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+58h+var_30]
lea rsi, aBusbitcharsS; "BUSBITCHARS \"%s\" ;\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
loc_108ED:
cmp [rsp+58h+arg_0], 0
jz short loc_10902
mov rax, [rsp+58h+arg_0]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_1090F
loc_10902:
mov [rsp+58h+var_4], 3
jmp loc_10B48
loc_1090F:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+58h+arg_0]
lea rsi, aDesignS; "DESIGN %s ;\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
cmp [rsp+58h+arg_8], 0
jz short loc_1097B
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+58h+arg_8]
lea rsi, aTechnologyS; "TECHNOLOGY %s ;\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
loc_1097B:
cmp [rsp+58h+arg_10], 0
jz short loc_109B5
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+58h+arg_10]
lea rsi, aArrayS; "ARRAY %s ;\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
loc_109B5:
cmp [rsp+58h+arg_18], 0
jz short loc_109EF
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+58h+arg_18]
lea rsi, aFloorplanS; "FLOORPLAN %s ;\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
loc_109EF:
movsd xmm0, [rsp+58h+var_38]
movsd xmm1, cs:qword_23098
ucomisd xmm0, xmm1
jnz short loc_10A0A
jp short loc_10A0A
jmp loc_10B19
loc_10A0A:
cvttsd2si eax, [rsp+58h+var_38]
mov [rsp+58h+var_3C], eax
mov eax, [rsp+58h+var_3C]
mov [rsp+58h+var_40], eax
sub eax, 64h ; 'd'
jz short loc_10A8F
jmp short $+2
loc_10A23:
mov eax, [rsp+58h+var_40]
sub eax, 0C8h
jz short loc_10A8F
jmp short $+2
loc_10A30:
mov eax, [rsp+58h+var_40]
sub eax, 3E8h
jz short loc_10A8F
jmp short $+2
loc_10A3D:
mov eax, [rsp+58h+var_40]
sub eax, 7D0h
jz short loc_10A8F
jmp short $+2
loc_10A4A:
mov eax, [rsp+58h+var_40]
sub eax, 0FA0h
jz short loc_10A8F
jmp short $+2
loc_10A57:
mov eax, [rsp+58h+var_40]
sub eax, 1F40h
jz short loc_10A8F
jmp short $+2
loc_10A64:
mov eax, [rsp+58h+var_40]
sub eax, 2710h
jz short loc_10A8F
jmp short $+2
loc_10A71:
mov eax, [rsp+58h+var_40]
sub eax, 3E80h
jz short loc_10A8F
jmp short $+2
loc_10A7E:
mov eax, [rsp+58h+var_40]
sub eax, 4E20h
jnz loc_10B0D
jmp short $+2
loc_10A8F:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rax, [rax]
mov [rsp+58h+var_48], rax
movsd xmm0, [rsp+58h+var_38]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jb short loc_10AC5
movsd xmm0, cs:qword_23320
addsd xmm0, [rsp+58h+var_38]
cvttsd2si eax, xmm0
mov [rsp+58h+var_4C], eax
jmp short loc_10ADF
loc_10AC5:
movsd xmm0, [rsp+58h+var_38]
movsd xmm1, cs:qword_23320
subsd xmm0, xmm1
cvttsd2si eax, xmm0
mov [rsp+58h+var_4C], eax
loc_10ADF:
mov rdi, [rsp+58h+var_48]
mov edx, [rsp+58h+var_4C]
lea rsi, aUnitsDistanceM; "UNITS DISTANCE MICRONS %d ;\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
jmp short loc_10B17
loc_10B0D:
mov [rsp+58h+var_4], 3
jmp short loc_10B48
loc_10B17:
jmp short $+2
loc_10B19:
lea rax, _ZN12LefDefParser11defwDidInitE; LefDefParser::defwDidInit
mov dword ptr [rax], 1
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 6
lea rax, _ZN12LefDefParser11defwHasInitE; LefDefParser::defwHasInit
mov dword ptr [rax], 1
mov [rsp+58h+var_4], 0
loc_10B48:
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
| long long LefDefParser::defwInit(
long long a1,
int a2,
int a3,
const char *a4,
const char *a5,
const char *a6,
double a7,
const char *a8,
const char *a9,
const char *a10,
const char *a11)
{
int v12; // [rsp+18h] [rbp-40h]
LefDefParser::defwFile = a1;
if ( LefDefParser::defwHasInitCbk == 1 )
{
fprintf(
stderr,
"ERROR (DEFWRIT-9000): The DEF writer has detected that the function defwInitCbk has already been called and you ar"
"e trying to call defwInit.\n"
"Only defwInitCbk or defwInit can be called but not both.\n"
"Update your program and then try again.\n");
fprintf(stderr, "Writer Exit.\n");
exit(2LL);
}
LefDefParser::defwState = 0;
LefDefParser::defwFunc = 0;
LefDefParser::defwDidNets = 0;
LefDefParser::defwDidComponents = 0;
LefDefParser::defwDidInit = 0;
if ( a2 )
{
fprintf(LefDefParser::defwFile, "VERSION %d.%d ;\n", a2, a3);
++LefDefParser::defwLines;
}
if ( a2 == 5 && a3 < 6 )
{
if ( !a4 || !*a4 )
return 3;
fprintf(LefDefParser::defwFile, "NAMESCASESENSITIVE %s ;\n", a4);
}
if ( a5 )
{
fprintf(LefDefParser::defwFile, "DIVIDERCHAR \"%s\" ;\n", a5);
++LefDefParser::defwLines;
}
if ( a6 )
{
fprintf(LefDefParser::defwFile, "BUSBITCHARS \"%s\" ;\n", a6);
++LefDefParser::defwLines;
}
if ( a8 && *a8 )
{
fprintf(LefDefParser::defwFile, "DESIGN %s ;\n", a8);
++LefDefParser::defwLines;
if ( a9 )
{
fprintf(LefDefParser::defwFile, "TECHNOLOGY %s ;\n", a9);
++LefDefParser::defwLines;
}
if ( a10 )
{
fprintf(LefDefParser::defwFile, "ARRAY %s ;\n", a10);
++LefDefParser::defwLines;
}
if ( a11 )
{
fprintf(LefDefParser::defwFile, "FLOORPLAN %s ;\n", a11);
++LefDefParser::defwLines;
}
if ( a7 != -1.0 )
{
v12 = (int)a7;
if ( (int)a7 != 100
&& v12 != 200
&& v12 != 1000
&& v12 != 2000
&& v12 != 4000
&& v12 != 8000
&& v12 != 10000
&& v12 != 16000
&& v12 != 20000 )
{
return 3;
}
if ( a7 < 0.0 )
fprintf(LefDefParser::defwFile, "UNITS DISTANCE MICRONS %d ;\n", (int)(a7 - 0.5));
else
fprintf(LefDefParser::defwFile, "UNITS DISTANCE MICRONS %d ;\n", (int)(a7 + 0.5));
++LefDefParser::defwLines;
}
LefDefParser::defwDidInit = 1;
LefDefParser::defwState = 6;
LefDefParser::defwHasInit = 1;
return 0;
}
return 3;
}
| defwInit:
SUB RSP,0x58
MOV RAX,qword ptr [RSP + 0x78]
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x48],RDI
MOV dword ptr [RSP + 0x44],ESI
MOV dword ptr [RSP + 0x40],EDX
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x30],R8
MOV qword ptr [RSP + 0x28],R9
MOVSD qword ptr [RSP + 0x20],XMM0
MOV RCX,qword ptr [RSP + 0x48]
LEA RAX,[0x12b158]
MOV qword ptr [RAX],RCX
LEA RAX,[0x12b188]
CMP dword ptr [RAX],0x1
JNZ 0x001107af
MOV RAX,qword ptr [0x00128fc8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x123d1b]
MOV AL,0x0
CALL 0x001010f0
MOV RAX,qword ptr [0x00128fc8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x123e0a]
MOV AL,0x0
CALL 0x001010f0
MOV EDI,0x2
CALL 0x001010c0
LAB_001107af:
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x0
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x0
LEA RAX,[0x12b16c]
MOV dword ptr [RAX],0x0
LEA RAX,[0x12b170]
MOV dword ptr [RAX],0x0
LEA RAX,[0x12b174]
MOV dword ptr [RAX],0x0
CMP dword ptr [RSP + 0x44],0x0
JZ 0x0011082c
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RSP + 0x44]
MOV ECX,dword ptr [RSP + 0x40]
LEA RSI,[0x123e18]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LAB_0011082c:
CMP dword ptr [RSP + 0x44],0x5
JNZ 0x00110879
CMP dword ptr [RSP + 0x40],0x6
JGE 0x00110879
CMP qword ptr [RSP + 0x38],0x0
JZ 0x0011084f
MOV RAX,qword ptr [RSP + 0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x0011085c
LAB_0011084f:
MOV dword ptr [RSP + 0x54],0x3
JMP 0x00110b48
LAB_0011085c:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x38]
LEA RSI,[0x123e29]
MOV AL,0x0
CALL 0x001010f0
LAB_00110879:
CMP qword ptr [RSP + 0x30],0x0
JZ 0x001108b3
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x30]
LEA RSI,[0x123e42]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LAB_001108b3:
CMP qword ptr [RSP + 0x28],0x0
JZ 0x001108ed
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x28]
LEA RSI,[0x123e56]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LAB_001108ed:
CMP qword ptr [RSP + 0x60],0x0
JZ 0x00110902
MOV RAX,qword ptr [RSP + 0x60]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x0011090f
LAB_00110902:
MOV dword ptr [RSP + 0x54],0x3
JMP 0x00110b48
LAB_0011090f:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x60]
LEA RSI,[0x123e6a]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
CMP qword ptr [RSP + 0x68],0x0
JZ 0x0011097b
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x68]
LEA RSI,[0x123e77]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LAB_0011097b:
CMP qword ptr [RSP + 0x70],0x0
JZ 0x001109b5
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x70]
LEA RSI,[0x123e88]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LAB_001109b5:
CMP qword ptr [RSP + 0x78],0x0
JZ 0x001109ef
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x78]
LEA RSI,[0x123e94]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LAB_001109ef:
MOVSD XMM0,qword ptr [RSP + 0x20]
MOVSD XMM1,qword ptr [0x00123098]
UCOMISD XMM0,XMM1
JNZ 0x00110a0a
JP 0x00110a0a
JMP 0x00110b19
LAB_00110a0a:
CVTTSD2SI EAX,qword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x1c],EAX
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x18],EAX
SUB EAX,0x64
JZ 0x00110a8f
JMP 0x00110a23
LAB_00110a23:
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,0xc8
JZ 0x00110a8f
JMP 0x00110a30
LAB_00110a30:
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,0x3e8
JZ 0x00110a8f
JMP 0x00110a3d
LAB_00110a3d:
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,0x7d0
JZ 0x00110a8f
JMP 0x00110a4a
LAB_00110a4a:
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,0xfa0
JZ 0x00110a8f
JMP 0x00110a57
LAB_00110a57:
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,0x1f40
JZ 0x00110a8f
JMP 0x00110a64
LAB_00110a64:
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,0x2710
JZ 0x00110a8f
JMP 0x00110a71
LAB_00110a71:
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,0x3e80
JZ 0x00110a8f
JMP 0x00110a7e
LAB_00110a7e:
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,0x4e20
JNZ 0x00110b0d
JMP 0x00110a8f
LAB_00110a8f:
LEA RAX,[0x12b158]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
MOVSD XMM0,qword ptr [RSP + 0x20]
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JC 0x00110ac5
MOVSD XMM0,qword ptr [0x00123320]
ADDSD XMM0,qword ptr [RSP + 0x20]
CVTTSD2SI EAX,XMM0
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00110adf
LAB_00110ac5:
MOVSD XMM0,qword ptr [RSP + 0x20]
MOVSD XMM1,qword ptr [0x00123320]
SUBSD XMM0,XMM1
CVTTSD2SI EAX,XMM0
MOV dword ptr [RSP + 0xc],EAX
LAB_00110adf:
MOV RDI,qword ptr [RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xc]
LEA RSI,[0x123ea4]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
JMP 0x00110b17
LAB_00110b0d:
MOV dword ptr [RSP + 0x54],0x3
JMP 0x00110b48
LAB_00110b17:
JMP 0x00110b19
LAB_00110b19:
LEA RAX,[0x12b174]
MOV dword ptr [RAX],0x1
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x6
LEA RAX,[0x12b184]
MOV dword ptr [RAX],0x1
MOV dword ptr [RSP + 0x54],0x0
LAB_00110b48:
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
/* LefDefParser::defwInit(_IO_FILE*, int, int, char const*, char const*, char const*, char const*,
char const*, char const*, char const*, double) */
int4
LefDefParser::defwInit
(_IO_FILE *param_1,int param_2,int param_3,char *param_4,char *param_5,char *param_6,
char *param_7,char *param_8,char *param_9,char *param_10,double param_11)
{
int iVar1;
double dVar2;
uint local_4c;
int4 local_4;
defwFile = param_1;
if (defwHasInitCbk == 1) {
fprintf(*(FILE **)PTR_stderr_00128fc8,
"ERROR (DEFWRIT-9000): The DEF writer has detected that the function defwInitCbk has already been called and you are trying to call defwInit.\nOnly defwInitCbk or defwInit can be called but not both.\nUpdate your program and then try again.\n"
);
fprintf(*(FILE **)PTR_stderr_00128fc8,"Writer Exit.\n");
/* WARNING: Subroutine does not return */
exit(2);
}
defwState = 0;
defwFunc = 0;
defwDidNets = 0;
defwDidComponents = 0;
defwDidInit = 0;
if (param_2 != 0) {
fprintf(param_1,"VERSION %d.%d ;\n",(ulong)(uint)param_2,(ulong)(uint)param_3);
defwLines = defwLines + 1;
}
if ((param_2 == 5) && (param_3 < 6)) {
if ((param_4 == (char *)0x0) || (*param_4 == '\0')) {
return 3;
}
fprintf(defwFile,"NAMESCASESENSITIVE %s ;\n",param_4);
}
if (param_5 != (char *)0x0) {
fprintf(defwFile,"DIVIDERCHAR \"%s\" ;\n",param_5);
defwLines = defwLines + 1;
}
if (param_6 != (char *)0x0) {
fprintf(defwFile,"BUSBITCHARS \"%s\" ;\n",param_6);
defwLines = defwLines + 1;
}
if ((param_7 == (char *)0x0) || (*param_7 == '\0')) {
local_4 = 3;
}
else {
fprintf(defwFile,"DESIGN %s ;\n",param_7);
defwLines = defwLines + 1;
if (param_8 != (char *)0x0) {
fprintf(defwFile,"TECHNOLOGY %s ;\n",param_8);
defwLines = defwLines + 1;
}
if (param_9 != (char *)0x0) {
fprintf(defwFile,"ARRAY %s ;\n",param_9);
defwLines = defwLines + 1;
}
if (param_10 != (char *)0x0) {
fprintf(defwFile,"FLOORPLAN %s ;\n",param_10);
defwLines = defwLines + 1;
}
if ((param_11 != DAT_00123098) || (NAN(param_11) || NAN(DAT_00123098))) {
iVar1 = (int)param_11;
if ((((iVar1 != 100) &&
((((iVar1 != 200 && (iVar1 != 1000)) && (iVar1 != 2000)) &&
((iVar1 != 4000 && (iVar1 != 8000)))))) && (iVar1 != 10000)) &&
((iVar1 != 16000 && (iVar1 != 20000)))) {
return 3;
}
if (param_11 < 0.0) {
dVar2 = param_11 - DAT_00123320;
}
else {
dVar2 = DAT_00123320 + param_11;
}
local_4c = (uint)dVar2;
fprintf(defwFile,"UNITS DISTANCE MICRONS %d ;\n",(ulong)local_4c);
defwLines = defwLines + 1;
}
defwDidInit = 1;
defwState = 6;
defwHasInit = 1;
local_4 = 0;
}
return local_4;
}
| |
37,405 | js_init_module_bjson | bluesky950520[P]quickjs/quickjs-libc.c | JSModuleDef *js_init_module_bjson(JSContext *ctx, const char *module_name)
{
JSModuleDef *m;
m = JS_NewCModule(ctx, module_name, js_bjson_init);
if (!m)
return NULL;
JS_AddModuleExportList(ctx, m, js_bjson_funcs, countof(js_bjson_funcs));
return m;
} | O1 | c | js_init_module_bjson:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x33(%rip), %rdx # 0x19dc2
callq 0x348af
testq %rax, %rax
je 0x19db5
movq %rax, %rbx
leaq 0xb275d(%rip), %rdx # 0xcc500
movq %r14, %rdi
movq %rax, %rsi
movl $0xa, %ecx
callq 0x370ac
jmp 0x19db7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| js_init_module_bjson:
push r14
push rbx
push rax
mov r14, rdi
lea rdx, js_bjson_init
call JS_NewCModule
test rax, rax
jz short loc_19DB5
mov rbx, rax
lea rdx, js_bjson_funcs
mov rdi, r14
mov rsi, rax
mov ecx, 0Ah
call JS_AddModuleExportList
jmp short loc_19DB7
loc_19DB5:
xor ebx, ebx
loc_19DB7:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| long long js_init_module_bjson(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rbx
v2 = JS_NewCModule(a1, a2, js_bjson_init);
if ( !v2 )
return 0LL;
v3 = v2;
JS_AddModuleExportList(a1, v2, &js_bjson_funcs, 10LL);
return v3;
}
| js_init_module_bjson:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
LEA RDX,[0x119dc2]
CALL 0x001348af
TEST RAX,RAX
JZ 0x00119db5
MOV RBX,RAX
LEA RDX,[0x1cc500]
MOV RDI,R14
MOV RSI,RAX
MOV ECX,0xa
CALL 0x001370ac
JMP 0x00119db7
LAB_00119db5:
XOR EBX,EBX
LAB_00119db7:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
long js_init_module_bjson(int8 param_1,int8 param_2)
{
long lVar1;
lVar1 = JS_NewCModule(param_1,param_2,js_bjson_init);
if (lVar1 == 0) {
lVar1 = 0;
}
else {
JS_AddModuleExportList(param_1,lVar1,js_bjson_funcs,10);
}
return lVar1;
}
| |
37,406 | js_dynamic_import_job | bluesky950520[P]quickjs/quickjs.c | static JSValue js_dynamic_import_job(JSContext *ctx,
int argc, JSValue *argv)
{
JSValue *resolving_funcs = argv;
JSValue basename_val = argv[2];
JSValue specifier = argv[3];
const char *basename = NULL, *filename;
JSValue ret, err;
if (!JS_IsString(basename_val)) {
JS_ThrowTypeError(ctx, "no function filename for import()");
goto exception;
}
basename = JS_ToCString(ctx, basename_val);
if (!basename)
goto exception;
filename = JS_ToCString(ctx, specifier);
if (!filename)
goto exception;
JS_LoadModuleInternal(ctx, basename, filename,
resolving_funcs);
JS_FreeCString(ctx, filename);
JS_FreeCString(ctx, basename);
return JS_UNDEFINED;
exception:
err = JS_GetException(ctx);
ret = JS_Call(ctx, resolving_funcs[1], JS_UNDEFINED,
1, &err);
JS_FreeValue(ctx, ret); /* XXX: what to do if exception ? */
JS_FreeValue(ctx, err);
JS_FreeCString(ctx, basename);
return JS_UNDEFINED;
} | O1 | c | js_dynamic_import_job:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq 0x28(%rdx), %rcx
cmpl $-0x7, %ecx
jne 0x41729
movq 0x20(%r14), %rdx
movq 0x30(%r14), %r12
movq 0x38(%r14), %r13
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x20bf7
testq %rax, %rax
je 0x4173c
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x20bf7
testq %rax, %rax
je 0x41803
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x30fd4
movq 0x18(%rbx), %rdi
movl -0x18(%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, -0x18(%r12)
cmpl $0x1, %eax
jg 0x41708
addq $-0x18, %r12
movq %r12, %rsi
movq $-0x7, %rdx
callq 0x21266
movq 0x18(%rbx), %rdi
movl -0x18(%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, -0x18(%r15)
cmpl $0x2, %eax
jge 0x417ed
addq $-0x18, %r15
jmp 0x417de
leaq 0x5dd46(%rip), %rsi # 0x9f476
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
movq 0x18(%rbx), %rax
movups 0xf0(%rax), %xmm0
xorl %ecx, %ecx
movl %ecx, 0xf0(%rax)
movq $0x4, 0xf8(%rax)
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movl %ecx, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r15, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x3, %r8d
movq %rbx, %rdi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x284ca
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x1d8c6
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
testq %rbp, %rbp
je 0x417ed
movq 0x18(%rbx), %rdi
movl -0x18(%rbp), %eax
leal -0x1(%rax), %ecx
movl %ecx, -0x18(%rbp)
cmpl $0x1, %eax
jg 0x417ed
addq $-0x18, %rbp
movq %rbp, %r15
movq %r15, %rsi
movq $-0x7, %rdx
callq 0x21266
movl $0x3, %edx
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rbp
jmp 0x4173c
| js_dynamic_import_job:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rdx
mov rbx, rdi
mov rcx, [rdx+28h]
cmp ecx, 0FFFFFFF9h
jnz loc_41729
mov rdx, [r14+20h]
mov r12, [r14+30h]
mov r13, [r14+38h]
xor ebp, ebp
mov rdi, rbx
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz loc_4173C
mov r15, rax
mov rdi, rbx
xor esi, esi
mov rdx, r12
mov rcx, r13
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz loc_41803
mov r12, rax
mov rdi, rbx
mov rsi, r15
mov rdx, rax
mov rcx, r14
call JS_LoadModuleInternal
mov rdi, [rbx+18h]
mov eax, [r12-18h]
lea ecx, [rax-1]
mov [r12-18h], ecx
cmp eax, 1
jg short loc_41708
add r12, 0FFFFFFFFFFFFFFE8h
mov rsi, r12
mov rdx, 0FFFFFFFFFFFFFFF9h
call js_free_value_rt
loc_41708:
mov rdi, [rbx+18h]
mov eax, [r15-18h]
lea ecx, [rax-1]
mov [r15-18h], ecx
cmp eax, 2
jge loc_417ED
add r15, 0FFFFFFFFFFFFFFE8h
jmp loc_417DE
loc_41729:
lea rsi, aNoFunctionFile; "no function filename for import()"
xor ebp, ebp
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
loc_4173C:
mov rax, [rbx+18h]
movups xmm0, xmmword ptr [rax+0F0h]
xor ecx, ecx
mov [rax+0F0h], ecx
mov qword ptr [rax+0F8h], 4
lea r15, [rsp+78h+var_48]
movaps xmmword ptr [r15], xmm0
mov rsi, [r14+10h]
mov rdx, [r14+18h]
mov dword ptr [rsp+78h+var_58], ecx
mov qword ptr [rsp+78h+var_58+8], 3
movups xmm0, [rsp+78h+var_58]
movups [rsp+78h+var_78], xmm0
mov [rsp+78h+var_68], r15
mov [rsp+78h+var_60], 2
mov r8d, 3
mov rdi, rbx
xor ecx, ecx
mov r9d, 1
call JS_CallInternal
mov rdi, [rbx+18h]
mov rsi, rax
call JS_FreeValueRT
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, [rbx+18h]
call JS_FreeValueRT
test rbp, rbp
jz short loc_417ED
mov rdi, [rbx+18h]
mov eax, [rbp-18h]
lea ecx, [rax-1]
mov [rbp-18h], ecx
cmp eax, 1
jg short loc_417ED
add rbp, 0FFFFFFFFFFFFFFE8h
mov r15, rbp
loc_417DE:
mov rsi, r15
mov rdx, 0FFFFFFFFFFFFFFF9h
call js_free_value_rt
loc_417ED:
mov edx, 3
xor eax, eax
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_41803:
mov rbp, r15
jmp loc_4173C
| long long js_dynamic_import_job(
long long *a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
__m128 *a11,
long long a12,
long long a13,
long long a14)
{
long long v16; // rcx
long long v17; // r12
long long v18; // r13
long long v19; // rbp
long long v20; // rax
__m128 v21; // xmm4
__m128 v22; // xmm5
long long v23; // r15
long long v24; // rax
long long v25; // r12
long long v26; // rdi
int v27; // eax
long long v28; // rdi
int v29; // eax
_QWORD *v30; // r15
long long v31; // rax
__int128 v32; // xmm0
_DWORD *v33; // rax
long long v34; // rdx
int v35; // eax
char v37; // [rsp+0h] [rbp-78h]
__m128 v38; // [rsp+20h] [rbp-58h]
__int128 v39; // [rsp+30h] [rbp-48h] BYREF
v16 = a11[2].m128_i64[1];
if ( (_DWORD)v16 == -7 )
{
v17 = a11[3].m128_i64[0];
v18 = a11[3].m128_i64[1];
v19 = 0LL;
v20 = JS_ToCStringLen2((long long)a1, 0LL, a11[2].m128_i64[0], v16, 0);
if ( v20 )
{
v23 = v20;
v24 = JS_ToCStringLen2((long long)a1, 0LL, v17, v18, 0);
if ( v24 )
{
v25 = v24;
JS_LoadModuleInternal(
a1,
*(double *)a2.m128_u64,
a3,
a4,
a5,
*(double *)v21.m128_u64,
*(double *)v22.m128_u64,
a8,
a9,
v23,
v24,
a11);
v26 = a1[3];
v27 = *(_DWORD *)(v25 - 24);
*(_DWORD *)(v25 - 24) = v27 - 1;
if ( v27 <= 1 )
js_free_value_rt(v26, (_QWORD *)(v25 - 24), -7);
v28 = a1[3];
v29 = *(_DWORD *)(v23 - 24);
*(_DWORD *)(v23 - 24) = v29 - 1;
if ( v29 < 2 )
{
v30 = (_QWORD *)(v23 - 24);
LABEL_12:
js_free_value_rt(v28, v30, -7);
return 0LL;
}
return 0LL;
}
v19 = v23;
}
}
else
{
v19 = 0LL;
JS_ThrowTypeError(
(long long)a1,
(long long)"no function filename for import()",
(long long)a11,
v16,
a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v37);
}
v31 = a1[3];
v32 = *(_OWORD *)(v31 + 240);
*(_DWORD *)(v31 + 240) = 0;
*(_QWORD *)(v31 + 248) = 4LL;
v39 = v32;
v38.m128_i32[0] = 0;
v38.m128_u64[1] = 3LL;
v33 = (_DWORD *)JS_CallInternal(
(long long)a1,
a11[1].m128_i64[0],
a11[1].m128_i64[1],
0LL,
3LL,
1LL,
v38,
a3,
a4,
a5,
v21,
v22,
a8,
a9,
v38.m128_i8[0],
3,
(long long)&v39,
2u);
JS_FreeValueRT(a1[3], v33, v34);
JS_FreeValueRT(a1[3], (_DWORD *)v39, *((long long *)&v39 + 1));
if ( v19 )
{
v28 = a1[3];
v35 = *(_DWORD *)(v19 - 24);
*(_DWORD *)(v19 - 24) = v35 - 1;
if ( v35 <= 1 )
{
v30 = (_QWORD *)(v19 - 24);
goto LABEL_12;
}
}
return 0LL;
}
| js_dynamic_import_job:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RDX
MOV RBX,RDI
MOV RCX,qword ptr [RDX + 0x28]
CMP ECX,-0x7
JNZ 0x00141729
MOV RDX,qword ptr [R14 + 0x20]
MOV R12,qword ptr [R14 + 0x30]
MOV R13,qword ptr [R14 + 0x38]
XOR EBP,EBP
MOV RDI,RBX
XOR ESI,ESI
XOR R8D,R8D
CALL 0x00120bf7
TEST RAX,RAX
JZ 0x0014173c
MOV R15,RAX
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R12
MOV RCX,R13
XOR R8D,R8D
CALL 0x00120bf7
TEST RAX,RAX
JZ 0x00141803
MOV R12,RAX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,RAX
MOV RCX,R14
CALL 0x00130fd4
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R12 + -0x18]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12 + -0x18],ECX
CMP EAX,0x1
JG 0x00141708
ADD R12,-0x18
MOV RSI,R12
MOV RDX,-0x7
CALL 0x00121266
LAB_00141708:
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [R15 + -0x18]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15 + -0x18],ECX
CMP EAX,0x2
JGE 0x001417ed
ADD R15,-0x18
JMP 0x001417de
LAB_00141729:
LEA RSI,[0x19f476]
XOR EBP,EBP
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00122567
LAB_0014173c:
MOV RAX,qword ptr [RBX + 0x18]
MOVUPS XMM0,xmmword ptr [RAX + 0xf0]
XOR ECX,ECX
MOV dword ptr [RAX + 0xf0],ECX
MOV qword ptr [RAX + 0xf8],0x4
LEA R15,[RSP + 0x30]
MOVAPS xmmword ptr [R15],XMM0
MOV RSI,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x18]
MOV dword ptr [RSP + 0x20],ECX
MOV qword ptr [RSP + 0x28],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],R15
MOV dword ptr [RSP + 0x18],0x2
MOV R8D,0x3
MOV RDI,RBX
XOR ECX,ECX
MOV R9D,0x1
CALL 0x001284ca
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RAX
CALL 0x0011d8c6
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011d8c6
TEST RBP,RBP
JZ 0x001417ed
MOV RDI,qword ptr [RBX + 0x18]
MOV EAX,dword ptr [RBP + -0x18]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBP + -0x18],ECX
CMP EAX,0x1
JG 0x001417ed
ADD RBP,-0x18
MOV R15,RBP
LAB_001417de:
MOV RSI,R15
MOV RDX,-0x7
CALL 0x00121266
LAB_001417ed:
MOV EDX,0x3
XOR EAX,EAX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00141803:
MOV RBP,R15
JMP 0x0014173c
|
int1 [16] js_dynamic_import_job(long param_1,int8 param_2,long param_3)
{
int iVar1;
int8 uVar2;
long lVar3;
long lVar4;
int8 uVar5;
long lVar6;
int8 local_48;
int8 uStack_40;
if ((int)*(int8 *)(param_3 + 0x28) == -7) {
uVar5 = *(int8 *)(param_3 + 0x30);
uVar2 = *(int8 *)(param_3 + 0x38);
lVar3 = JS_ToCStringLen2(param_1,0,*(int8 *)(param_3 + 0x20),
*(int8 *)(param_3 + 0x28),0);
lVar6 = 0;
if ((lVar3 == 0) ||
(lVar4 = JS_ToCStringLen2(param_1,0,uVar5,uVar2,0), lVar6 = lVar3, lVar4 == 0))
goto LAB_0014173c;
JS_LoadModuleInternal(param_1,lVar3,lVar4,param_3);
uVar5 = *(int8 *)(param_1 + 0x18);
iVar1 = *(int *)(lVar4 + -0x18);
*(int *)(lVar4 + -0x18) = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar5,lVar4 + -0x18,0xfffffffffffffff9);
}
uVar5 = *(int8 *)(param_1 + 0x18);
iVar1 = *(int *)(lVar3 + -0x18);
*(int *)(lVar3 + -0x18) = iVar1 + -1;
}
else {
JS_ThrowTypeError(param_1,"no function filename for import()");
lVar6 = 0;
LAB_0014173c:
lVar3 = *(long *)(param_1 + 0x18);
local_48 = *(int8 *)(lVar3 + 0xf0);
uStack_40 = *(int8 *)(lVar3 + 0xf8);
*(int4 *)(lVar3 + 0xf0) = 0;
*(int8 *)(lVar3 + 0xf8) = 4;
uVar5 = JS_CallInternal(param_1,*(int8 *)(param_3 + 0x10),*(int8 *)(param_3 + 0x18),
0,3,1,0,3,&local_48,2);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar5);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_48,uStack_40);
if (lVar6 == 0) goto LAB_001417ed;
uVar5 = *(int8 *)(param_1 + 0x18);
iVar1 = *(int *)(lVar6 + -0x18);
*(int *)(lVar6 + -0x18) = iVar1 + -1;
lVar3 = lVar6;
}
if (iVar1 < 2) {
js_free_value_rt(uVar5,lVar3 + -0x18,0xfffffffffffffff9);
}
LAB_001417ed:
return ZEXT816(3) << 0x40;
}
| |
37,407 | lf_dynarray_value | eloqsql/mysys/lf_dynarray.c | void *lf_dynarray_value(LF_DYNARRAY *array, uint idx)
{
void * ptr, * volatile * ptr_ptr= 0;
int i;
for (i= LF_DYNARRAY_LEVELS-1; idx < dynarray_idxes_in_prev_levels[i]; i--)
/* no-op */;
ptr_ptr= &array->level[i];
idx-= dynarray_idxes_in_prev_levels[i];
for (; i > 0; i--)
{
if (!(ptr= *ptr_ptr))
return(NULL);
ptr_ptr= ((void **)ptr) + idx / dynarray_idxes_in_prev_level[i];
idx %= dynarray_idxes_in_prev_level[i];
}
if (!(ptr= *ptr_ptr))
return(NULL);
return ((uchar*)ptr) + array->size_of_element * idx;
} | O0 | c | lf_dynarray_value:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x3, -0x2c(%rbp)
movl -0x14(%rbp), %eax
movslq -0x2c(%rbp), %rdx
leaq 0x57c18(%rip), %rcx # 0xb51b0
cmpq (%rcx,%rdx,8), %rax
jae 0x5d5ab
jmp 0x5d5a0
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5d58a
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x57be7(%rip), %rax # 0xb51b0
movq (%rax,%rcx,8), %rcx
movl -0x14(%rbp), %eax
subq %rcx, %rax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x2c(%rbp)
jle 0x5d64f
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x5d5fa
movq $0x0, -0x8(%rbp)
jmp 0x5d682
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x14(%rbp), %eax
movslq -0x2c(%rbp), %rsi
leaq 0x57bc0(%rip), %rcx # 0xb51d0
xorl %edx, %edx
divq (%rcx,%rsi,8)
movq %rax, %rcx
movq -0x38(%rbp), %rax
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x57b9d(%rip), %rax # 0xb51d0
movq (%rax,%rcx,8), %rcx
movl -0x14(%rbp), %eax
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x14(%rbp)
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5d5d6
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x5d66a
movq $0x0, -0x8(%rbp)
jmp 0x5d682
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x20(%rcx), %ecx
imull -0x14(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
| lf_dynarray_value:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_28], 0
mov [rbp+var_2C], 3
loc_5D58A:
mov eax, [rbp+var_14]
movsxd rdx, [rbp+var_2C]
lea rcx, dynarray_idxes_in_prev_levels
cmp rax, [rcx+rdx*8]
jnb short loc_5D5AB
jmp short $+2
loc_5D5A0:
mov eax, [rbp+var_2C]
add eax, 0FFFFFFFFh
mov [rbp+var_2C], eax
jmp short loc_5D58A
loc_5D5AB:
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_2C]
shl rcx, 3
add rax, rcx
mov [rbp+var_28], rax
movsxd rcx, [rbp+var_2C]
lea rax, dynarray_idxes_in_prev_levels
mov rcx, [rax+rcx*8]
mov eax, [rbp+var_14]
sub rax, rcx
mov [rbp+var_14], eax
loc_5D5D6:
cmp [rbp+var_2C], 0
jle short loc_5D64F
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_5D5FA
mov [rbp+var_8], 0
jmp loc_5D682
loc_5D5FA:
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov eax, [rbp+var_14]
movsxd rsi, [rbp+var_2C]
lea rcx, dynarray_idxes_in_prev_level
xor edx, edx
div qword ptr [rcx+rsi*8]
mov rcx, rax
mov rax, [rbp+var_38]
shl rcx, 3
add rax, rcx
mov [rbp+var_28], rax
movsxd rcx, [rbp+var_2C]
lea rax, dynarray_idxes_in_prev_level
mov rcx, [rax+rcx*8]
mov eax, [rbp+var_14]
xor edx, edx
div rcx
mov eax, edx
mov [rbp+var_14], eax
mov eax, [rbp+var_2C]
add eax, 0FFFFFFFFh
mov [rbp+var_2C], eax
jmp short loc_5D5D6
loc_5D64F:
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_5D66A
mov [rbp+var_8], 0
jmp short loc_5D682
loc_5D66A:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov ecx, [rcx+20h]
imul ecx, [rbp+var_14]
mov ecx, ecx
add rax, rcx
mov [rbp+var_8], rax
loc_5D682:
mov rax, [rbp+var_8]
pop rbp
retn
| long long lf_dynarray_value(long long a1, unsigned int a2)
{
int i; // [rsp+Ch] [rbp-2Ch]
_QWORD *v4; // [rsp+10h] [rbp-28h]
unsigned int v5; // [rsp+24h] [rbp-14h]
for ( i = 3; (unsigned long long)a2 < dynarray_idxes_in_prev_levels[i]; --i )
;
v4 = (_QWORD *)(8LL * i + a1);
v5 = a2 - dynarray_idxes_in_prev_levels[i];
while ( i > 0 )
{
if ( !*v4 )
return 0LL;
v4 = (_QWORD *)(8 * ((unsigned long long)v5 / dynarray_idxes_in_prev_level[i]) + *v4);
v5 = (unsigned long long)v5 % dynarray_idxes_in_prev_level[i--];
}
if ( *v4 )
return v5 * *(_DWORD *)(a1 + 32) + *v4;
else
return 0LL;
}
| lf_dynarray_value:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x28],0x0
MOV dword ptr [RBP + -0x2c],0x3
LAB_0015d58a:
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RDX,dword ptr [RBP + -0x2c]
LEA RCX,[0x1b51b0]
CMP RAX,qword ptr [RCX + RDX*0x8]
JNC 0x0015d5ab
JMP 0x0015d5a0
LAB_0015d5a0:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0015d58a
LAB_0015d5ab:
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x2c]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOVSXD RCX,dword ptr [RBP + -0x2c]
LEA RAX,[0x1b51b0]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x14]
SUB RAX,RCX
MOV dword ptr [RBP + -0x14],EAX
LAB_0015d5d6:
CMP dword ptr [RBP + -0x2c],0x0
JLE 0x0015d64f
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0015d5fa
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015d682
LAB_0015d5fa:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x14]
MOVSXD RSI,dword ptr [RBP + -0x2c]
LEA RCX,[0x1b51d0]
XOR EDX,EDX
DIV qword ptr [RCX + RSI*0x8]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x38]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOVSXD RCX,dword ptr [RBP + -0x2c]
LEA RAX,[0x1b51d0]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x14]
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0015d5d6
LAB_0015d64f:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0015d66a
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015d682
LAB_0015d66a:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x20]
IMUL ECX,dword ptr [RBP + -0x14]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_0015d682:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
long lf_dynarray_value(long param_1,uint param_2)
{
int local_34;
long *local_30;
uint local_1c;
long local_10;
local_34 = 3;
while ((ulong)param_2 < *(ulong *)(dynarray_idxes_in_prev_levels + (long)local_34 * 8)) {
local_34 = local_34 + -1;
}
local_30 = (long *)(param_1 + (long)local_34 * 8);
local_1c = param_2 - (int)*(int8 *)(dynarray_idxes_in_prev_levels + (long)local_34 * 8);
while( true ) {
if (local_34 < 1) {
if (*local_30 == 0) {
local_10 = 0;
}
else {
local_10 = *local_30 + (ulong)(*(int *)(param_1 + 0x20) * local_1c);
}
return local_10;
}
if (*local_30 == 0) break;
local_30 = (long *)(*local_30 +
((ulong)local_1c /
*(ulong *)(dynarray_idxes_in_prev_level + (long)local_34 * 8)) * 8);
local_1c = (uint)((ulong)local_1c %
*(ulong *)(dynarray_idxes_in_prev_level + (long)local_34 * 8));
local_34 = local_34 + -1;
}
return 0;
}
| |
37,408 | rtree_delete_req | eloqsql/storage/myisam/rt_index.c | static int rtree_delete_req(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
uint key_length, my_off_t page, uint *page_size,
stPageList *ReinsertList, int level)
{
uchar *k;
uchar *last;
ulong i;
uint nod_flag;
uchar *page_buf;
int res;
DBUG_ENTER("rtree_delete_req");
if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length)))
{
my_errno = HA_ERR_OUT_OF_MEM;
DBUG_RETURN(-1); /* purecov: inspected */
}
if (!_mi_fetch_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf, 0))
goto err1;
nod_flag = mi_test_if_nod(page_buf);
DBUG_PRINT("rtree", ("page: %lu level: %d nod_flag: %u",
(ulong) page, level, nod_flag));
k = rt_PAGE_FIRST_KEY(page_buf, nod_flag);
last = rt_PAGE_END(page_buf);
for (i = 0; k < last; k = rt_PAGE_NEXT_KEY(k, key_length, nod_flag), ++i)
{
if (nod_flag)
{
/* not leaf */
if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_WITHIN))
{
switch ((res = rtree_delete_req(info, keyinfo, key, key_length,
_mi_kpos(nod_flag, k), page_size, ReinsertList, level + 1)))
{
case 0: /* deleted */
{
/* test page filling */
if (*page_size + key_length >= rt_PAGE_MIN_SIZE(keyinfo->block_length))
{
/* OK */
/* Calculate a new key value (MBR) for the shrinked block. */
if (rtree_set_key_mbr(info, keyinfo, k, key_length,
_mi_kpos(nod_flag, k)))
goto err1;
if (_mi_write_keypage(info, keyinfo, page,
DFLT_INIT_HITS, page_buf))
goto err1;
}
else
{
/*
Too small: delete key & add it descendant to reinsert list.
Store position and level of the block so that it can be
accessed later for inserting the remaining keys.
*/
DBUG_PRINT("rtree", ("too small. move block to reinsert list"));
if (rtree_fill_reinsert_list(ReinsertList, _mi_kpos(nod_flag, k),
level + 1))
goto err1;
/*
Delete the key that references the block. This makes the
block disappear from the index. Hence we need to insert
its remaining keys later. Note: if the block is a branch
block, we do not only remove this block, but the whole
subtree. So we need to re-insert its keys on the same
level later to reintegrate the subtrees.
*/
rtree_delete_key(info, page_buf, k, key_length, nod_flag);
if (_mi_write_keypage(info, keyinfo, page,
DFLT_INIT_HITS, page_buf))
goto err1;
*page_size = mi_getint(page_buf);
}
goto ok;
}
case 1: /* not found - continue searching */
{
break;
}
case 2: /* vacuous case: last key in the leaf */
{
rtree_delete_key(info, page_buf, k, key_length, nod_flag);
if (_mi_write_keypage(info, keyinfo, page,
DFLT_INIT_HITS, page_buf))
goto err1;
*page_size = mi_getint(page_buf);
res = 0;
goto ok;
}
default: /* error */
case -1:
{
goto err1;
}
}
}
}
else
{
/* leaf */
if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_EQUAL | MBR_DATA))
{
rtree_delete_key(info, page_buf, k, key_length, nod_flag);
*page_size = mi_getint(page_buf);
if (*page_size == 2)
{
/* last key in the leaf */
res = 2;
if (_mi_dispose(info, keyinfo, page, DFLT_INIT_HITS))
goto err1;
}
else
{
res = 0;
if (_mi_write_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf))
goto err1;
}
goto ok;
}
}
}
res = 1;
ok:
my_afree((uchar*)page_buf);
DBUG_RETURN(res);
err1:
my_afree((uchar*)page_buf);
DBUG_RETURN(-1); /* purecov: inspected */
} | O3 | c | rtree_delete_req:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, -0x60(%rbp)
movl %ecx, -0x34(%rbp)
movq %rdx, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movzwl 0xe(%rsi), %eax
movq %rsp, %r12
addl $0xf, %eax
andl $-0x10, %eax
subq %rax, %r12
movq %r12, %rsp
xorl %ebx, %ebx
movq %rdi, -0x48(%rbp)
movq %rsi, -0x40(%rbp)
movq %r8, -0x50(%rbp)
movq %r8, %rdx
movl $0x3, %ecx
movq %r12, %r8
xorl %r9d, %r9d
callq 0x86da4
testq %rax, %rax
je 0x8dcd8
movzbl (%r12), %r15d
testb %r15b, %r15b
jns 0x8d9f3
movq -0x48(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %ebx
movl %ebx, %r13d
leaq (%r12,%r13), %rbx
addq $0x2, %rbx
movzbl 0x1(%r12), %eax
andl $0x7f, %r15d
shll $0x8, %r15d
orq %rax, %r15
addq %r12, %r15
movl $0x1, %eax
cmpq %r15, %rbx
movq -0x40(%rbp), %rsi
movl -0x34(%rbp), %ecx
jae 0x8dcdd
movq %r12, -0x58(%rbp)
movl 0x18(%rbp), %edx
incl %edx
movq %rdx, -0x68(%rbp)
movl %ecx, %r12d
movq 0x28(%rsi), %rdi
movq %r14, %rsi
movq %rbx, %rdx
testq %r13, %r13
je 0x8da91
movl $0x800, %r8d # imm = 0x800
callq 0x8e560
movq %r13, %rcx
testl %eax, %eax
jne 0x8dab1
movl %r13d, %edi
movq %rbx, %rsi
callq 0x8771e
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %r14, %rdx
movl -0x34(%rbp), %ecx
movq %rax, %r8
movq -0x60(%rbp), %r9
pushq -0x68(%rbp)
pushq 0x10(%rbp)
callq 0x8d977
addq $0x10, %rsp
movq %r13, %rcx
cmpl $0x1, %eax
je 0x8dab1
jmp 0x8dad1
movl $0x6000, %r8d # imm = 0x6000
callq 0x8e560
testl %eax, %eax
je 0x8db74
movq -0x48(%rbp), %rax
movq (%rax), %rax
movl 0x178(%rax), %ecx
addq %r12, %rbx
addq %rcx, %rbx
cmpq %r15, %rbx
movq -0x40(%rbp), %rsi
movl -0x34(%rbp), %ecx
jb 0x8da37
movl $0x1, %eax
jmp 0x8dcdd
cmpl $0x2, %eax
je 0x8dbd2
testl %eax, %eax
jne 0x8dcd8
movq -0x60(%rbp), %rax
movl (%rax), %r15d
addl -0x34(%rbp), %r15d
movq -0x40(%rbp), %r14
movzwl 0xe(%r14), %eax
imull $0xaaab, %eax, %r12d # imm = 0xAAAB
shrl $0x11, %r12d
movl %r13d, %edi
movq %rbx, %rsi
callq 0x8771e
movq %rax, %r8
cmpl %r12d, %r15d
jae 0x8dc42
movq 0x10(%rbp), %r14
movq (%r14), %rdx
cmpq 0x8(%r14), %rdx
jne 0x8dc7b
movq %r8, -0x70(%rbp)
addq $0xa, %rdx
movq %rdx, 0x8(%r14)
leaq 0xb74898(%rip), %rax # 0xc023d4
movl (%rax), %edi
movq 0x10(%r14), %rsi
shlq $0x4, %rdx
movl $0x40, %ecx
callq 0xa2bb8
movq %rax, 0x10(%r14)
testq %rax, %rax
movq -0x58(%rbp), %r15
je 0x8dcd8
movq (%r14), %rdx
movq -0x50(%rbp), %r12
movl -0x34(%rbp), %ecx
movq -0x70(%rbp), %r8
jmp 0x8dc8a
movq -0x48(%rbp), %r15
movq %r15, %rdi
movq -0x58(%rbp), %r14
movq %r14, %rsi
movq %rbx, %rdx
movl -0x34(%rbp), %ecx
xorl %r8d, %r8d
callq 0x8e46b
movzbl 0x1(%r14), %eax
movl (%r14), %ecx
andl $0x7f, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, (%rax)
movq %r15, %rdi
cmpl $0x2, %ecx
jne 0x8dc1b
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl $0x3, %ecx
callq 0x86f23
testl %eax, %eax
jne 0x8dcd8
movl $0x2, %eax
jmp 0x8dcdd
movq -0x48(%rbp), %r15
movq %r15, %rdi
movq -0x58(%rbp), %r14
movq %r14, %rsi
movq %rbx, %rdx
movl -0x34(%rbp), %ecx
movl %r13d, %r8d
callq 0x8e46b
movq %r15, %rdi
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl $0x3, %ecx
movq %r14, %r8
callq 0x86e50
testl %eax, %eax
jne 0x8dcd8
movzbl 0x1(%r14), %eax
movl (%r14), %ecx
jmp 0x8dd03
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl $0x3, %ecx
movq %r14, %r8
callq 0x86e50
testl %eax, %eax
movl $0x0, %eax
jne 0x8dcd8
jmp 0x8dcdd
movq -0x48(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl -0x34(%rbp), %ecx
callq 0x8e4f8
testl %eax, %eax
movq -0x58(%rbp), %r8
jne 0x8dcd8
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl $0x3, %ecx
callq 0x86e50
testl %eax, %eax
jne 0x8dcd8
jmp 0x8dd11
movq 0x10(%r14), %rax
movq -0x58(%rbp), %r15
movq -0x50(%rbp), %r12
movl -0x34(%rbp), %ecx
shlq $0x4, %rdx
movq %r8, 0x8(%rax,%rdx)
movq (%r14), %rax
movq 0x10(%r14), %rdx
shlq $0x4, %rax
movq -0x68(%rbp), %rsi
movl %esi, (%rdx,%rax)
incq (%r14)
movq -0x48(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl %r13d, %r8d
callq 0x8e46b
movq %r14, %rdi
movq -0x40(%rbp), %rsi
movq %r12, %rdx
movl $0x3, %ecx
movq %r15, %r8
callq 0x86e50
testl %eax, %eax
je 0x8dcfb
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x8dd15
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl 0x1(%r15), %eax
movl (%r15), %ecx
andl $0x7f, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, (%rax)
xorl %eax, %eax
jmp 0x8dcdd
callq 0x29240
| rtree_delete_req:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_60], r9
mov [rbp+var_34], ecx
mov r14, rdx
mov rax, fs:28h
mov [rbp+var_30], rax
movzx eax, word ptr [rsi+0Eh]
mov r12, rsp
add eax, 0Fh
and eax, 0FFFFFFF0h
sub r12, rax
mov rsp, r12
xor ebx, ebx
mov [rbp+var_48], rdi
mov [rbp+var_40], rsi
mov [rbp+var_50], r8
mov rdx, r8
mov ecx, 3
mov r8, r12
xor r9d, r9d
call _mi_fetch_keypage
test rax, rax
jz loc_8DCD8
movzx r15d, byte ptr [r12]
test r15b, r15b
jns short loc_8D9F3
mov rax, [rbp+var_48]
mov rax, [rax]
mov ebx, [rax+17Ch]
loc_8D9F3:
mov r13d, ebx
lea rbx, [r12+r13]
add rbx, 2
movzx eax, byte ptr [r12+1]
and r15d, 7Fh
shl r15d, 8
or r15, rax
add r15, r12
mov eax, 1
cmp rbx, r15
mov rsi, [rbp+var_40]
mov ecx, [rbp+var_34]
jnb loc_8DCDD
mov [rbp+var_58], r12
mov edx, [rbp+arg_8]
inc edx
mov [rbp+var_68], rdx
mov r12d, ecx
loc_8DA37:
mov rdi, [rsi+28h]
mov rsi, r14
mov rdx, rbx
test r13, r13
jz short loc_8DA91
mov r8d, 800h
call rtree_key_cmp
mov rcx, r13
test eax, eax
jnz short loc_8DAB1
mov edi, r13d
mov rsi, rbx
call _mi_kpos
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_40]
mov rdx, r14
mov ecx, [rbp+var_34]
mov r8, rax
mov r9, [rbp+var_60]
push [rbp+var_68]
push [rbp+arg_0]
call rtree_delete_req
add rsp, 10h
mov rcx, r13
cmp eax, 1
jz short loc_8DAB1
jmp short loc_8DAD1
loc_8DA91:
mov r8d, 6000h
call rtree_key_cmp
test eax, eax
jz loc_8DB74
mov rax, [rbp+var_48]
mov rax, [rax]
mov ecx, [rax+178h]
loc_8DAB1:
add rbx, r12
add rbx, rcx
cmp rbx, r15
mov rsi, [rbp+var_40]
mov ecx, [rbp+var_34]
jb loc_8DA37
mov eax, 1
jmp loc_8DCDD
loc_8DAD1:
cmp eax, 2
jz loc_8DBD2
test eax, eax
jnz loc_8DCD8
mov rax, [rbp+var_60]
mov r15d, [rax]
add r15d, [rbp+var_34]
mov r14, [rbp+var_40]
movzx eax, word ptr [r14+0Eh]
imul r12d, eax, 0AAABh
shr r12d, 11h
mov edi, r13d
mov rsi, rbx
call _mi_kpos
mov r8, rax
cmp r15d, r12d
jnb loc_8DC42
mov r14, [rbp+arg_0]
mov rdx, [r14]
cmp rdx, [r14+8]
jnz loc_8DC7B
mov [rbp+var_70], r8
add rdx, 0Ah
mov [r14+8], rdx
lea rax, mi_key_memory_stPageList_pages
mov edi, [rax]
mov rsi, [r14+10h]
shl rdx, 4
mov ecx, 40h ; '@'
call my_realloc
mov [r14+10h], rax
test rax, rax
mov r15, [rbp+var_58]
jz loc_8DCD8
mov rdx, [r14]
mov r12, [rbp+var_50]
mov ecx, [rbp+var_34]
mov r8, [rbp+var_70]
jmp loc_8DC8A
loc_8DB74:
mov r15, [rbp+var_48]
mov rdi, r15
mov r14, [rbp+var_58]
mov rsi, r14
mov rdx, rbx
mov ecx, [rbp+var_34]
xor r8d, r8d
call rtree_delete_key
movzx eax, byte ptr [r14+1]
mov ecx, [r14]
and ecx, 7Fh
shl ecx, 8
or ecx, eax
mov rax, [rbp+var_60]
mov [rax], ecx
mov rdi, r15
cmp ecx, 2
jnz short loc_8DC1B
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_50]
mov ecx, 3
call _mi_dispose
test eax, eax
jnz loc_8DCD8
mov eax, 2
jmp loc_8DCDD
loc_8DBD2:
mov r15, [rbp+var_48]
mov rdi, r15
mov r14, [rbp+var_58]
mov rsi, r14
mov rdx, rbx
mov ecx, [rbp+var_34]
mov r8d, r13d
call rtree_delete_key
mov rdi, r15
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_50]
mov ecx, 3
mov r8, r14
call _mi_write_keypage
test eax, eax
jnz loc_8DCD8
movzx eax, byte ptr [r14+1]
mov ecx, [r14]
jmp loc_8DD03
loc_8DC1B:
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_50]
mov ecx, 3
mov r8, r14
call _mi_write_keypage
test eax, eax
mov eax, 0
jnz loc_8DCD8
jmp loc_8DCDD
loc_8DC42:
mov rdi, [rbp+var_48]
mov rsi, r14
mov rdx, rbx
mov ecx, [rbp+var_34]
call rtree_set_key_mbr
test eax, eax
mov r8, [rbp+var_58]
jnz short loc_8DCD8
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_50]
mov ecx, 3
call _mi_write_keypage
test eax, eax
jnz short loc_8DCD8
jmp loc_8DD11
loc_8DC7B:
mov rax, [r14+10h]
mov r15, [rbp+var_58]
mov r12, [rbp+var_50]
mov ecx, [rbp+var_34]
loc_8DC8A:
shl rdx, 4
mov [rax+rdx+8], r8
mov rax, [r14]
mov rdx, [r14+10h]
shl rax, 4
mov rsi, [rbp+var_68]
mov [rdx+rax], esi
inc qword ptr [r14]
mov r14, [rbp+var_48]
mov rdi, r14
mov rsi, r15
mov rdx, rbx
mov r8d, r13d
call rtree_delete_key
mov rdi, r14
mov rsi, [rbp+var_40]
mov rdx, r12
mov ecx, 3
mov r8, r15
call _mi_write_keypage
test eax, eax
jz short loc_8DCFB
loc_8DCD8:
mov eax, 0FFFFFFFFh
loc_8DCDD:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_8DD15
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8DCFB:
movzx eax, byte ptr [r15+1]
mov ecx, [r15]
loc_8DD03:
and ecx, 7Fh
shl ecx, 8
or ecx, eax
mov rax, [rbp+var_60]
mov [rax], ecx
loc_8DD11:
xor eax, eax
jmp short loc_8DCDD
loc_8DD15:
call ___stack_chk_fail
| long long rtree_delete_req(
long long *a1,
long long a2,
long long a3,
unsigned int a4,
long long a5,
int *a6,
long long *a7,
int a8)
{
char *v9; // r12
unsigned int v10; // ebx
long long v11; // r13
unsigned long long v12; // rbx
char *v13; // r15
long long result; // rax
long long v15; // rsi
long long v16; // rcx
long long v17; // r12
long long v18; // rdi
int v19; // eax
long long v20; // rcx
int v21; // eax
int v22; // eax
unsigned int v23; // r15d
long long v24; // r14
unsigned int v25; // r12d
unsigned long long v26; // rax
unsigned long long v27; // r8
long long v28; // rdx
long long v29; // rdx
long long v30; // rax
_BYTE *v31; // r15
unsigned long long v32; // r12
long long v33; // rcx
long long *v34; // r15
_BYTE *v35; // r14
int v36; // ecx
long long *v37; // r15
_BYTE *v38; // r14
int v39; // eax
int v40; // ecx
bool v41; // zf
long long *v42; // r14
unsigned long long v43; // [rsp+0h] [rbp-70h] BYREF
long long v44; // [rsp+8h] [rbp-68h]
int *v45; // [rsp+10h] [rbp-60h]
_BYTE *v46; // [rsp+18h] [rbp-58h]
unsigned long long v47; // [rsp+20h] [rbp-50h]
long long *v48; // [rsp+28h] [rbp-48h]
long long v49; // [rsp+30h] [rbp-40h]
unsigned int v50; // [rsp+3Ch] [rbp-34h]
unsigned long long v51; // [rsp+40h] [rbp-30h]
v45 = a6;
v50 = a4;
v51 = __readfsqword(0x28u);
v9 = (char *)&v43 - ((*(unsigned __int16 *)(a2 + 14) + 15) & 0xFFFFFFF0);
v10 = 0;
v48 = a1;
v49 = a2;
v47 = a5;
if ( !mi_fetch_keypage(a1, a2, a5) )
return 0xFFFFFFFFLL;
if ( *v9 < 0 )
v10 = *(_DWORD *)(*v48 + 380);
v11 = v10;
v12 = (unsigned long long)&v9[v10 + 2];
v13 = &v9[(unsigned __int8)v9[1] | (unsigned long long)((unsigned __int8)(*v9 & 0x7F) << 8)];
result = 1LL;
v15 = v49;
v16 = v50;
if ( v12 < (unsigned long long)v13 )
{
v46 = v9;
v44 = (unsigned int)(a8 + 1);
v17 = v50;
while ( 1 )
{
v18 = *(_QWORD *)(v15 + 40);
if ( v11 )
{
v19 = rtree_key_cmp(v18, a3, v12, v16, 2048LL);
v20 = v11;
if ( !v19 )
{
v21 = mi_kpos(v11, v12);
v22 = rtree_delete_req((_DWORD)v48, v49, a3, v50, v21, (_DWORD)v45, (long long)a7, v44);
v20 = v11;
if ( v22 != 1 )
{
if ( v22 != 2 )
{
if ( v22 )
return 0xFFFFFFFFLL;
v23 = v50 + *v45;
v24 = v49;
v25 = *(unsigned __int16 *)(v49 + 14) / 3u;
v26 = mi_kpos(v11, v12);
v27 = v26;
if ( v23 >= v25 )
{
if ( (unsigned int)rtree_set_key_mbr(v48, v24, v12, v50, v26)
|| (unsigned int)mi_write_keypage(v48, v49, v47, 3u, v46) )
{
return 0xFFFFFFFFLL;
}
}
else
{
v28 = *a7;
if ( *a7 == a7[1] )
{
v43 = v26;
v29 = v28 + 10;
a7[1] = v29;
v30 = my_realloc(mi_key_memory_stPageList_pages, a7[2], 16 * v29, 64LL);
a7[2] = v30;
v31 = v46;
if ( !v30 )
return 0xFFFFFFFFLL;
v28 = *a7;
v32 = v47;
v33 = v50;
v27 = v43;
}
else
{
v30 = a7[2];
v31 = v46;
v32 = v47;
v33 = v50;
}
*(_QWORD *)(v30 + 16 * v28 + 8) = v27;
*(_DWORD *)(a7[2] + 16 * (*a7)++) = v44;
v42 = v48;
rtree_delete_key(v48, v31, v12, v33, (unsigned int)v11);
if ( (unsigned int)mi_write_keypage(v42, v49, v32, 3u, v31) )
return 0xFFFFFFFFLL;
v39 = (unsigned __int8)v31[1];
v40 = *(_DWORD *)v31;
LABEL_35:
*v45 = v39 | ((v40 & 0x7F) << 8);
}
return 0LL;
}
v37 = v48;
v38 = v46;
rtree_delete_key(v48, v46, v12, v50, (unsigned int)v11);
if ( (unsigned int)mi_write_keypage(v37, v49, v47, 3u, v38) )
return 0xFFFFFFFFLL;
v39 = (unsigned __int8)v38[1];
v40 = *(_DWORD *)v38;
goto LABEL_35;
}
}
}
else
{
if ( !(unsigned int)rtree_key_cmp(v18, a3, v12, v16, 24576LL) )
{
v34 = v48;
v35 = v46;
rtree_delete_key(v48, v46, v12, v50, 0LL);
v36 = (unsigned __int8)v35[1] | ((*(_DWORD *)v35 & 0x7F) << 8);
*v45 = v36;
if ( v36 == 2 )
{
if ( (unsigned int)mi_dispose(v34, v49, v47, 3u) )
return 0xFFFFFFFFLL;
return 2LL;
}
else
{
v41 = (unsigned int)mi_write_keypage(v34, v49, v47, 3u, v35) == 0;
result = 0LL;
if ( !v41 )
return 0xFFFFFFFFLL;
}
return result;
}
v20 = *(unsigned int *)(*v48 + 376);
}
v12 += v20 + v17;
v15 = v49;
v16 = v50;
if ( v12 >= (unsigned long long)v13 )
return 1LL;
}
}
return result;
}
| rtree_delete_req:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x60],R9
MOV dword ptr [RBP + -0x34],ECX
MOV R14,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOVZX EAX,word ptr [RSI + 0xe]
MOV R12,RSP
ADD EAX,0xf
AND EAX,0xfffffff0
SUB R12,RAX
MOV RSP,R12
XOR EBX,EBX
MOV qword ptr [RBP + -0x48],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV qword ptr [RBP + -0x50],R8
MOV RDX,R8
MOV ECX,0x3
MOV R8,R12
XOR R9D,R9D
CALL 0x00186da4
TEST RAX,RAX
JZ 0x0018dcd8
MOVZX R15D,byte ptr [R12]
TEST R15B,R15B
JNS 0x0018d9f3
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX]
MOV EBX,dword ptr [RAX + 0x17c]
LAB_0018d9f3:
MOV R13D,EBX
LEA RBX,[R12 + R13*0x1]
ADD RBX,0x2
MOVZX EAX,byte ptr [R12 + 0x1]
AND R15D,0x7f
SHL R15D,0x8
OR R15,RAX
ADD R15,R12
MOV EAX,0x1
CMP RBX,R15
MOV RSI,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x34]
JNC 0x0018dcdd
MOV qword ptr [RBP + -0x58],R12
MOV EDX,dword ptr [RBP + 0x18]
INC EDX
MOV qword ptr [RBP + -0x68],RDX
MOV R12D,ECX
LAB_0018da37:
MOV RDI,qword ptr [RSI + 0x28]
MOV RSI,R14
MOV RDX,RBX
TEST R13,R13
JZ 0x0018da91
MOV R8D,0x800
CALL 0x0018e560
MOV RCX,R13
TEST EAX,EAX
JNZ 0x0018dab1
MOV EDI,R13D
MOV RSI,RBX
CALL 0x0018771e
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,R14
MOV ECX,dword ptr [RBP + -0x34]
MOV R8,RAX
MOV R9,qword ptr [RBP + -0x60]
PUSH qword ptr [RBP + -0x68]
PUSH qword ptr [RBP + 0x10]
CALL 0x0018d977
ADD RSP,0x10
MOV RCX,R13
CMP EAX,0x1
JZ 0x0018dab1
JMP 0x0018dad1
LAB_0018da91:
MOV R8D,0x6000
CALL 0x0018e560
TEST EAX,EAX
JZ 0x0018db74
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x178]
LAB_0018dab1:
ADD RBX,R12
ADD RBX,RCX
CMP RBX,R15
MOV RSI,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x34]
JC 0x0018da37
MOV EAX,0x1
JMP 0x0018dcdd
LAB_0018dad1:
CMP EAX,0x2
JZ 0x0018dbd2
TEST EAX,EAX
JNZ 0x0018dcd8
MOV RAX,qword ptr [RBP + -0x60]
MOV R15D,dword ptr [RAX]
ADD R15D,dword ptr [RBP + -0x34]
MOV R14,qword ptr [RBP + -0x40]
MOVZX EAX,word ptr [R14 + 0xe]
IMUL R12D,EAX,0xaaab
SHR R12D,0x11
MOV EDI,R13D
MOV RSI,RBX
CALL 0x0018771e
MOV R8,RAX
CMP R15D,R12D
JNC 0x0018dc42
MOV R14,qword ptr [RBP + 0x10]
MOV RDX,qword ptr [R14]
CMP RDX,qword ptr [R14 + 0x8]
JNZ 0x0018dc7b
MOV qword ptr [RBP + -0x70],R8
ADD RDX,0xa
MOV qword ptr [R14 + 0x8],RDX
LEA RAX,[0xd023d4]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [R14 + 0x10]
SHL RDX,0x4
MOV ECX,0x40
CALL 0x001a2bb8
MOV qword ptr [R14 + 0x10],RAX
TEST RAX,RAX
MOV R15,qword ptr [RBP + -0x58]
JZ 0x0018dcd8
MOV RDX,qword ptr [R14]
MOV R12,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x34]
MOV R8,qword ptr [RBP + -0x70]
JMP 0x0018dc8a
LAB_0018db74:
MOV R15,qword ptr [RBP + -0x48]
MOV RDI,R15
MOV R14,qword ptr [RBP + -0x58]
MOV RSI,R14
MOV RDX,RBX
MOV ECX,dword ptr [RBP + -0x34]
XOR R8D,R8D
CALL 0x0018e46b
MOVZX EAX,byte ptr [R14 + 0x1]
MOV ECX,dword ptr [R14]
AND ECX,0x7f
SHL ECX,0x8
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],ECX
MOV RDI,R15
CMP ECX,0x2
JNZ 0x0018dc1b
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,0x3
CALL 0x00186f23
TEST EAX,EAX
JNZ 0x0018dcd8
MOV EAX,0x2
JMP 0x0018dcdd
LAB_0018dbd2:
MOV R15,qword ptr [RBP + -0x48]
MOV RDI,R15
MOV R14,qword ptr [RBP + -0x58]
MOV RSI,R14
MOV RDX,RBX
MOV ECX,dword ptr [RBP + -0x34]
MOV R8D,R13D
CALL 0x0018e46b
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,0x3
MOV R8,R14
CALL 0x00186e50
TEST EAX,EAX
JNZ 0x0018dcd8
MOVZX EAX,byte ptr [R14 + 0x1]
MOV ECX,dword ptr [R14]
JMP 0x0018dd03
LAB_0018dc1b:
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,0x3
MOV R8,R14
CALL 0x00186e50
TEST EAX,EAX
MOV EAX,0x0
JNZ 0x0018dcd8
JMP 0x0018dcdd
LAB_0018dc42:
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,R14
MOV RDX,RBX
MOV ECX,dword ptr [RBP + -0x34]
CALL 0x0018e4f8
TEST EAX,EAX
MOV R8,qword ptr [RBP + -0x58]
JNZ 0x0018dcd8
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,0x3
CALL 0x00186e50
TEST EAX,EAX
JNZ 0x0018dcd8
JMP 0x0018dd11
LAB_0018dc7b:
MOV RAX,qword ptr [R14 + 0x10]
MOV R15,qword ptr [RBP + -0x58]
MOV R12,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x34]
LAB_0018dc8a:
SHL RDX,0x4
MOV qword ptr [RAX + RDX*0x1 + 0x8],R8
MOV RAX,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x10]
SHL RAX,0x4
MOV RSI,qword ptr [RBP + -0x68]
MOV dword ptr [RDX + RAX*0x1],ESI
INC qword ptr [R14]
MOV R14,qword ptr [RBP + -0x48]
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
MOV R8D,R13D
CALL 0x0018e46b
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,R12
MOV ECX,0x3
MOV R8,R15
CALL 0x00186e50
TEST EAX,EAX
JZ 0x0018dcfb
LAB_0018dcd8:
MOV EAX,0xffffffff
LAB_0018dcdd:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x0018dd15
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018dcfb:
MOVZX EAX,byte ptr [R15 + 0x1]
MOV ECX,dword ptr [R15]
LAB_0018dd03:
AND ECX,0x7f
SHL ECX,0x8
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],ECX
LAB_0018dd11:
XOR EAX,EAX
JMP 0x0018dcdd
LAB_0018dd15:
CALL 0x00129240
|
int8
rtree_delete_req(long *param_1,long param_2,int8 param_3,uint param_4,int8 param_5,
uint *param_6,long *param_7,int param_8)
{
byte bVar1;
ushort uVar2;
long lVar3;
int8 uVar4;
long *plVar5;
uint uVar6;
int iVar7;
long lVar8;
int8 uVar9;
long lVar10;
uint uVar11;
ulong uVar12;
byte *pbVar13;
uint *puVar14;
ulong uVar15;
ulong uVar16;
uint uVar17;
byte *pbVar18;
long in_FS_OFFSET;
ulong auStack_90 [3];
int8 local_78;
ulong local_70;
uint *local_68;
uint *local_60;
int8 local_58;
long *local_50;
long local_48;
uint local_3c;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar3 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0xf & 0xfffffff0);
puVar14 = (uint *)((long)&local_78 + lVar3);
uVar11 = 0;
local_68 = param_6;
local_58 = param_5;
local_50 = param_1;
local_48 = param_2;
local_3c = param_4;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18d9d3;
lVar8 = _mi_fetch_keypage(param_1,param_2,param_5,3,puVar14,0);
if (lVar8 == 0) {
LAB_0018dcd8:
uVar9 = 0xffffffff;
}
else {
if ((char)(byte)*puVar14 < '\0') {
uVar11 = *(uint *)(*local_50 + 0x17c);
}
uVar16 = (ulong)uVar11;
pbVar13 = (byte *)((long)puVar14 + uVar16 + 2);
pbVar18 = (byte *)(((ulong)(((byte)*puVar14 & 0x7f) << 8) |
(ulong)*(byte *)((long)&local_78 + lVar3 + 1)) + (long)puVar14);
uVar9 = 1;
if (pbVar13 < pbVar18) {
local_70 = (ulong)(param_8 + 1);
uVar15 = (ulong)local_3c;
local_60 = puVar14;
do {
uVar6 = local_3c;
uVar9 = *(int8 *)(local_48 + 0x28);
if (uVar16 == 0) {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18da9c;
iVar7 = rtree_key_cmp(uVar9,param_3,pbVar13,uVar6,0x6000);
uVar6 = local_3c;
plVar5 = local_50;
puVar14 = local_60;
if (iVar7 == 0) {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18db90;
rtree_delete_key(plVar5,puVar14,pbVar13,uVar6,0);
lVar8 = local_48;
uVar9 = local_58;
uVar11 = (*puVar14 & 0x7f) << 8 | (uint)*(byte *)((long)puVar14 + 1);
*local_68 = uVar11;
if (uVar11 != 2) {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18dc30;
iVar7 = _mi_write_keypage(plVar5,lVar8,uVar9,3,puVar14);
uVar9 = 0;
if (iVar7 == 0) goto LAB_0018dcdd;
goto LAB_0018dcd8;
}
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18dbc0;
iVar7 = _mi_dispose(plVar5,lVar8,uVar9,3);
if (iVar7 != 0) goto LAB_0018dcd8;
uVar9 = 2;
goto LAB_0018dcdd;
}
uVar12 = (ulong)*(uint *)(*local_50 + 0x178);
}
else {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18da51;
iVar7 = rtree_key_cmp(uVar9,param_3,pbVar13,uVar6,0x800);
uVar12 = uVar16;
if (iVar7 == 0) {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18da63;
uVar9 = _mi_kpos(uVar16,pbVar13);
uVar6 = local_3c;
lVar8 = local_48;
plVar5 = local_50;
puVar14 = local_68;
*(ulong *)((long)auStack_90 + lVar3 + 0x10) = local_70;
*(long **)((long)auStack_90 + lVar3 + 8) = param_7;
*(int8 *)((long)auStack_90 + lVar3) = 0x18da83;
iVar7 = rtree_delete_req(plVar5,lVar8,param_3,uVar6,uVar9,puVar14);
uVar6 = local_3c;
lVar8 = local_48;
plVar5 = local_50;
puVar14 = local_60;
if (iVar7 != 1) {
if (iVar7 == 2) {
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18dbee;
rtree_delete_key(plVar5,puVar14,pbVar13,uVar6,uVar11);
lVar8 = local_48;
uVar9 = local_58;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18dc06;
iVar7 = _mi_write_keypage(plVar5,lVar8,uVar9,3,puVar14);
if (iVar7 != 0) goto LAB_0018dcd8;
bVar1 = *(byte *)((long)puVar14 + 1);
uVar11 = *puVar14;
LAB_0018dd03:
*local_68 = (uVar11 & 0x7f) << 8 | (uint)bVar1;
}
else {
if (iVar7 != 0) goto LAB_0018dcd8;
uVar17 = *local_68 + local_3c;
uVar2 = *(ushort *)(local_48 + 0xe);
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18db0c;
uVar9 = _mi_kpos(uVar16,pbVar13);
uVar6 = local_3c;
plVar5 = local_50;
if (uVar17 < uVar2 / 3) {
lVar8 = *param_7;
if (lVar8 == param_7[1]) {
param_7[1] = lVar8 + 10;
lVar10 = param_7[2];
local_78 = uVar9;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18db50;
lVar10 = my_realloc(mi_key_memory_stPageList_pages,lVar10,(lVar8 + 10) * 0x10,
0x40);
param_7[2] = lVar10;
if (lVar10 == 0) goto LAB_0018dcd8;
lVar8 = *param_7;
uVar9 = local_78;
}
else {
lVar10 = param_7[2];
}
uVar6 = local_3c;
plVar5 = local_50;
uVar4 = local_58;
puVar14 = local_60;
*(int8 *)(lVar10 + 8 + lVar8 * 0x10) = uVar9;
*(int *)(param_7[2] + *param_7 * 0x10) = (int)local_70;
*param_7 = *param_7 + 1;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18dcbd;
rtree_delete_key(plVar5,puVar14,pbVar13,uVar6,uVar11);
lVar8 = local_48;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18dcd4;
iVar7 = _mi_write_keypage(plVar5,lVar8,uVar4,3,puVar14);
if (iVar7 == 0) {
bVar1 = *(byte *)((long)puVar14 + 1);
uVar11 = *puVar14;
goto LAB_0018dd03;
}
goto LAB_0018dcd8;
}
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18dc54;
iVar7 = rtree_set_key_mbr(plVar5,lVar8,pbVar13,uVar6);
lVar8 = local_48;
plVar5 = local_50;
uVar9 = local_58;
puVar14 = local_60;
if (iVar7 != 0) goto LAB_0018dcd8;
*(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18dc72;
iVar7 = _mi_write_keypage(plVar5,lVar8,uVar9,3,puVar14);
if (iVar7 != 0) goto LAB_0018dcd8;
}
uVar9 = 0;
goto LAB_0018dcdd;
}
}
}
pbVar13 = pbVar13 + uVar12 + uVar15;
} while (pbVar13 < pbVar18);
uVar9 = 1;
}
}
LAB_0018dcdd:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)((long)auStack_90 + lVar3 + 0x10) = rtree_estimate;
__stack_chk_fail();
}
return uVar9;
}
| |
37,409 | my_strxfrm_pad_unicode | eloqsql/strings/ctype-utf8.c | size_t
my_strxfrm_pad_unicode(uchar *str, uchar *strend)
{
uchar *str0= str;
DBUG_ASSERT(str && str <= strend);
for ( ; str < strend ; )
{
*str++= 0x00;
if (str < strend)
*str++= 0x20;
}
return str - str0;
} | O3 | c | my_strxfrm_pad_unicode:
movq %rdi, %rax
cmpq %rsi, %rdi
jae 0x4e608
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rcx
leaq 0x1(%rcx), %rax
movb $0x0, (%rcx)
cmpq %rsi, %rax
jae 0x4e5ff
movb $0x20, 0x1(%rcx)
addq $0x2, %rcx
movq %rcx, %rax
movq %rax, %rcx
cmpq %rsi, %rax
jb 0x4e5e8
popq %rbp
subq %rdi, %rax
retq
| my_strxfrm_pad_unicode:
mov rax, rdi
cmp rdi, rsi
jnb short loc_4E608
push rbp
mov rbp, rsp
mov rcx, rdi
loc_4E5E8:
lea rax, [rcx+1]
mov byte ptr [rcx], 0
cmp rax, rsi
jnb short loc_4E5FF
mov byte ptr [rcx+1], 20h ; ' '
add rcx, 2
mov rax, rcx
loc_4E5FF:
mov rcx, rax
cmp rax, rsi
jb short loc_4E5E8
pop rbp
loc_4E608:
sub rax, rdi
retn
| long long my_strxfrm_pad_unicode(_BYTE *a1, unsigned long long a2)
{
_BYTE *v2; // rax
_BYTE *v3; // rcx
v2 = a1;
if ( (unsigned long long)a1 < a2 )
{
v3 = a1;
do
{
v2 = v3 + 1;
*v3 = 0;
if ( (unsigned long long)(v3 + 1) < a2 )
{
v3[1] = 32;
v2 = v3 + 2;
}
v3 = v2;
}
while ( (unsigned long long)v2 < a2 );
}
return v2 - a1;
}
| my_strxfrm_pad_unicode:
MOV RAX,RDI
CMP RDI,RSI
JNC 0x0014e608
PUSH RBP
MOV RBP,RSP
MOV RCX,RDI
LAB_0014e5e8:
LEA RAX,[RCX + 0x1]
MOV byte ptr [RCX],0x0
CMP RAX,RSI
JNC 0x0014e5ff
MOV byte ptr [RCX + 0x1],0x20
ADD RCX,0x2
MOV RAX,RCX
LAB_0014e5ff:
MOV RCX,RAX
CMP RAX,RSI
JC 0x0014e5e8
POP RBP
LAB_0014e608:
SUB RAX,RDI
RET
|
long my_strxfrm_pad_unicode(int1 *param_1,int1 *param_2)
{
int1 *puVar1;
int1 *puVar2;
puVar2 = param_1;
puVar1 = param_1;
if (param_1 < param_2) {
do {
puVar2 = puVar1 + 1;
*puVar1 = 0;
if (puVar2 < param_2) {
puVar1[1] = 0x20;
puVar2 = puVar1 + 2;
}
puVar1 = puVar2;
} while (puVar2 < param_2);
}
return (long)puVar2 - (long)param_1;
}
| |
37,410 | lf_alloc_init | eloqsql/mysys/lf_alloc-pin.c | void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset)
{
lf_pinbox_init(&allocator->pinbox, free_ptr_offset,
(lf_pinbox_free_func *)alloc_free, allocator);
allocator->top= 0;
allocator->mallocs= 0;
allocator->element_size= size;
allocator->constructor= 0;
allocator->destructor= 0;
DBUG_ASSERT(size >= sizeof(void*) + free_ptr_offset);
} | O3 | c | lf_alloc_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
movl $0x78, %esi
callq 0xa6968
xorl %eax, %eax
movl %eax, 0x3c(%r15)
movl %eax, 0x40(%r15)
movl %ebx, 0x38(%r15)
leaq 0x2b(%rip), %rcx # 0xa6776
movq %rcx, 0x28(%r15)
movq %r15, 0x30(%r15)
movq $0x0, 0x48(%r15)
movl %eax, 0x54(%r15)
movl %r14d, 0x50(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| lf_alloc_init:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, edx
mov r14d, esi
mov r15, rdi
mov esi, 78h ; 'x'
call lf_dynarray_init
xor eax, eax
mov [r15+3Ch], eax
mov [r15+40h], eax
mov [r15+38h], ebx
lea rcx, alloc_free
mov [r15+28h], rcx
mov [r15+30h], r15
mov qword ptr [r15+48h], 0
mov [r15+54h], eax
mov [r15+50h], r14d
xorps xmm0, xmm0
movups xmmword ptr [r15+58h], xmm0
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long lf_alloc_init(long long a1, int a2, int a3)
{
long long result; // rax
lf_dynarray_init(a1, 120LL);
result = 0LL;
*(_DWORD *)(a1 + 60) = 0;
*(_DWORD *)(a1 + 64) = 0;
*(_DWORD *)(a1 + 56) = a3;
*(_QWORD *)(a1 + 40) = alloc_free;
*(_QWORD *)(a1 + 48) = a1;
*(_QWORD *)(a1 + 72) = 0LL;
*(_DWORD *)(a1 + 84) = 0;
*(_DWORD *)(a1 + 80) = a2;
*(_OWORD *)(a1 + 88) = 0LL;
return result;
}
| lf_alloc_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDX
MOV R14D,ESI
MOV R15,RDI
MOV ESI,0x78
CALL 0x001a6968
XOR EAX,EAX
MOV dword ptr [R15 + 0x3c],EAX
MOV dword ptr [R15 + 0x40],EAX
MOV dword ptr [R15 + 0x38],EBX
LEA RCX,[0x1a6776]
MOV qword ptr [R15 + 0x28],RCX
MOV qword ptr [R15 + 0x30],R15
MOV qword ptr [R15 + 0x48],0x0
MOV dword ptr [R15 + 0x54],EAX
MOV dword ptr [R15 + 0x50],R14D
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x58],XMM0
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void lf_alloc_init(long param_1,int4 param_2,int4 param_3)
{
lf_dynarray_init(param_1,0x78);
*(int4 *)(param_1 + 0x3c) = 0;
*(int4 *)(param_1 + 0x40) = 0;
*(int4 *)(param_1 + 0x38) = param_3;
*(code **)(param_1 + 0x28) = alloc_free;
*(long *)(param_1 + 0x30) = param_1;
*(int8 *)(param_1 + 0x48) = 0;
*(int4 *)(param_1 + 0x54) = 0;
*(int4 *)(param_1 + 0x50) = param_2;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
return;
}
| |
37,411 | pfs_create_file_v1 | eloqsql/storage/perfschema/pfs.cc | void pfs_create_file_v1(PSI_file_key key, const char *name, File file)
{
if (psi_unlikely(! flag_global_instrumentation))
return;
int index= (int) file;
if (unlikely(index < 0))
return;
PFS_file_class *klass= find_file_class(key);
if (unlikely(klass == NULL))
return;
if (! klass->m_enabled)
return;
/* A thread is needed for LF_PINS */
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
return;
if (flag_thread_instrumentation && ! pfs_thread->m_enabled)
return;
/*
We want this check after pfs_thread->m_enabled,
to avoid reporting false loss.
*/
if (unlikely(index >= file_handle_max))
{
file_handle_lost++;
return;
}
uint len= (uint)strlen(name);
PFS_file *pfs_file= find_or_create_file(pfs_thread, klass, name, len, true);
file_handle_array[index]= pfs_file;
} | O0 | cpp | pfs_create_file_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x3c7cc7(%rip), %rax # 0x410f80
movb (%rax), %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x492cc
jmp 0x493ca
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
setl %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x492e8
jmp 0x493ca
movl -0x4(%rbp), %edi
callq 0x2efb0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4930b
jmp 0x493ca
movq -0x20(%rbp), %rax
testb $0x1, 0x4(%rax)
jne 0x4931a
jmp 0x493ca
callq 0x48dd0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4933a
jmp 0x493ca
leaq 0x3c7c7f(%rip), %rax # 0x410fc0
testb $0x1, (%rax)
je 0x49355
movq -0x28(%rbp), %rax
testb $0x1, 0x7e0(%rax)
jne 0x49355
jmp 0x493ca
movslq -0x18(%rbp), %rax
leaq 0x3c4720(%rip), %rcx # 0x40da80
cmpq (%rcx), %rax
setge %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4938a
leaq 0x3c4719(%rip), %rax # 0x40da90
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x3c470b(%rip), %rax # 0x40da90
movq %rcx, (%rax)
jmp 0x493ca
movq -0x10(%rbp), %rdi
callq 0x26150
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movl $0x1, %r8d
callq 0x3aba0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdx
leaq 0x3c4731(%rip), %rax # 0x40daf0
movq (%rax), %rax
movslq -0x18(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
addq $0x40, %rsp
popq %rbp
retq
| pfs_create_file_v1:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, flag_global_instrumentation
mov al, [rax]
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_492CC
jmp loc_493CA
loc_492CC:
mov eax, [rbp+var_14]
mov [rbp+var_18], eax
cmp [rbp+var_18], 0
setl al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_492E8
jmp loc_493CA
loc_492E8:
mov edi, [rbp+var_4]; unsigned int
call _Z15find_file_classj; find_file_class(uint)
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_4930B
jmp loc_493CA
loc_4930B:
mov rax, [rbp+var_20]
test byte ptr [rax+4], 1
jnz short loc_4931A
jmp loc_493CA
loc_4931A:
call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void)
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_4933A
jmp loc_493CA
loc_4933A:
lea rax, flag_thread_instrumentation
test byte ptr [rax], 1
jz short loc_49355
mov rax, [rbp+var_28]
test byte ptr [rax+7E0h], 1
jnz short loc_49355
jmp short loc_493CA
loc_49355:
movsxd rax, [rbp+var_18]
lea rcx, file_handle_max
cmp rax, [rcx]
setnl al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_4938A
lea rax, file_handle_lost
mov rcx, [rax]
add rcx, 1
lea rax, file_handle_lost
mov [rax], rcx
jmp short loc_493CA
loc_4938A:
mov rdi, [rbp+var_10]
call _strlen
mov [rbp+var_2C], eax
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_2C]
mov r8d, 1
call _Z19find_or_create_fileP10PFS_threadP14PFS_file_classPKcjb; find_or_create_file(PFS_thread *,PFS_file_class *,char const*,uint,bool)
mov [rbp+var_38], rax
mov rdx, [rbp+var_38]
lea rax, file_handle_array
mov rax, [rax]
movsxd rcx, [rbp+var_18]
mov [rax+rcx*8], rdx
loc_493CA:
add rsp, 40h
pop rbp
retn
| unsigned long long pfs_create_file_v1(unsigned int a1, _BYTE *a2, int a3)
{
unsigned long long result; // rax
PFS_atomic *file; // rdx
unsigned int v5; // [rsp+14h] [rbp-2Ch]
PFS_thread *THR_PFS; // [rsp+18h] [rbp-28h]
long long *file_class; // [rsp+20h] [rbp-20h]
result = (flag_global_instrumentation & 1) == 0;
if ( (flag_global_instrumentation & 1) != 0 )
{
result = a3 < 0;
if ( a3 >= 0 )
{
file_class = (long long *)find_file_class(a1);
result = file_class == 0LL;
if ( file_class )
{
result = (unsigned long long)file_class;
if ( (*((_BYTE *)file_class + 4) & 1) != 0 )
{
THR_PFS = (PFS_thread *)my_thread_get_THR_PFS();
result = THR_PFS == 0LL;
if ( THR_PFS )
{
if ( (flag_thread_instrumentation & 1) == 0
|| (result = (unsigned long long)THR_PFS, (*((_BYTE *)THR_PFS + 2016) & 1) != 0) )
{
if ( a3 < (long long)file_handle_max )
{
v5 = strlen(a2);
file = find_or_create_file(THR_PFS, (PFS_instr_class *)file_class, a2, v5, 1);
result = (unsigned long long)file_handle_array;
*((_QWORD *)file_handle_array + a3) = file;
}
else
{
result = (unsigned long long)&file_handle_lost;
++file_handle_lost;
}
}
}
}
}
}
}
return result;
}
| pfs_create_file_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x510f80]
MOV AL,byte ptr [RAX]
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001492cc
JMP 0x001493ca
LAB_001492cc:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
CMP dword ptr [RBP + -0x18],0x0
SETL AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x001492e8
JMP 0x001493ca
LAB_001492e8:
MOV EDI,dword ptr [RBP + -0x4]
CALL 0x0012efb0
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0014930b
JMP 0x001493ca
LAB_0014930b:
MOV RAX,qword ptr [RBP + -0x20]
TEST byte ptr [RAX + 0x4],0x1
JNZ 0x0014931a
JMP 0x001493ca
LAB_0014931a:
CALL 0x00148dd0
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0014933a
JMP 0x001493ca
LAB_0014933a:
LEA RAX,[0x510fc0]
TEST byte ptr [RAX],0x1
JZ 0x00149355
MOV RAX,qword ptr [RBP + -0x28]
TEST byte ptr [RAX + 0x7e0],0x1
JNZ 0x00149355
JMP 0x001493ca
LAB_00149355:
MOVSXD RAX,dword ptr [RBP + -0x18]
LEA RCX,[0x50da80]
CMP RAX,qword ptr [RCX]
SETGE AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0014938a
LEA RAX,[0x50da90]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x50da90]
MOV qword ptr [RAX],RCX
JMP 0x001493ca
LAB_0014938a:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00126150
MOV dword ptr [RBP + -0x2c],EAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x2c]
MOV R8D,0x1
CALL 0x0013aba0
MOV qword ptr [RBP + -0x38],RAX
MOV RDX,qword ptr [RBP + -0x38]
LEA RAX,[0x50daf0]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x18]
MOV qword ptr [RAX + RCX*0x8],RDX
LAB_001493ca:
ADD RSP,0x40
POP RBP
RET
|
void pfs_create_file_v1(uint param_1,char *param_2,int param_3)
{
PFS_file_class *pPVar1;
PFS_thread *pPVar2;
size_t sVar3;
int8 uVar4;
if ((((((flag_global_instrumentation ^ 0xff) & 1) == 0) && (-1 < param_3)) &&
(pPVar1 = (PFS_file_class *)find_file_class(param_1), pPVar1 != (PFS_file_class *)0x0)) &&
(((((byte)pPVar1[4] & 1) != 0 &&
(pPVar2 = (PFS_thread *)my_thread_get_THR_PFS(), pPVar2 != (PFS_thread *)0x0)) &&
(((flag_thread_instrumentation & 1) == 0 || (((byte)pPVar2[0x7e0] & 1) != 0)))))) {
if (param_3 < file_handle_max) {
sVar3 = strlen(param_2);
uVar4 = find_or_create_file(pPVar2,pPVar1,param_2,(uint)sVar3,true);
*(int8 *)(file_handle_array + (long)param_3 * 8) = uVar4;
}
else {
file_handle_lost = file_handle_lost + 1;
}
}
return;
}
| |
37,412 | mysql_hex_string | eloqsql/libmariadb/libmariadb/mariadb_lib.c | ulong STDCALL mysql_hex_string(char *to, const char *from, unsigned long len)
{
char *start= to;
char hexdigits[]= "0123456789ABCDEF";
while (len--)
{
*to++= hexdigits[((unsigned char)*from) >> 4];
*to++= hexdigits[((unsigned char)*from) & 0x0F];
from++;
}
*to= 0;
return (ulong)(to - start);
} | O0 | c | mysql_hex_string:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x317b0(%rip), %rax # 0x6df80
movq %rax, -0x20(%rbp)
movq 0x317ad(%rip), %rax # 0x6df88
movq %rax, -0x18(%rbp)
movb 0x317ab(%rip), %al # 0x6df90
movb %al, -0x10(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x38(%rbp)
cmpq $0x0, %rax
je 0x3c84d
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
sarl $0x4, %eax
cltq
movb -0x20(%rbp,%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
andl $0xf, %eax
cltq
movb -0x20(%rbp,%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x3c7e8
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x3c87f
movq -0x48(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
callq 0x144c0
nopw %cs:(%rax,%rax)
| mysql_hex_string:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rax, cs:qword_6DF80
mov [rbp+var_20], rax
mov rax, cs:qword_6DF88
mov [rbp+var_18], rax
mov al, cs:byte_6DF90
mov [rbp+var_10], al
loc_3C7E8:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rcx
cmp rax, 0
jz short loc_3C84D
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
sar eax, 4
cdqe
mov cl, byte ptr [rbp+rax+var_20]
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 1
mov [rbp+var_28], rdx
mov [rax], cl
mov rax, [rbp+var_30]
movzx eax, byte ptr [rax]
and eax, 0Fh
cdqe
mov cl, byte ptr [rbp+rax+var_20]
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 1
mov [rbp+var_28], rdx
mov [rax], cl
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_3C7E8
loc_3C84D:
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
mov rax, [rbp+var_28]
mov rcx, [rbp+var_40]
sub rax, rcx
mov [rbp+var_48], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_3C87F
mov rax, [rbp+var_48]
add rsp, 50h
pop rbp
retn
loc_3C87F:
call ___stack_chk_fail
| _BYTE * mysql_hex_string(_BYTE *a1, unsigned __int8 *a2, long long a3)
{
_BYTE *v4; // rax
_BYTE *v8; // [rsp+28h] [rbp-28h]
char v9[24]; // [rsp+30h] [rbp-20h] BYREF
unsigned long long v10; // [rsp+48h] [rbp-8h]
v10 = __readfsqword(0x28u);
v8 = a1;
strcpy(v9, "0123456789ABCDEF");
while ( a3-- )
{
*v8 = v9[(int)*a2 >> 4];
v4 = v8 + 1;
v8 += 2;
*v4 = v9[*a2++ & 0xF];
}
*v8 = 0;
return (_BYTE *)(v8 - a1);
}
| mysql_hex_string:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [0x0016df80]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [0x0016df88]
MOV qword ptr [RBP + -0x18],RAX
MOV AL,byte ptr [0x0016df90]
MOV byte ptr [RBP + -0x10],AL
LAB_0013c7e8:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x38],RCX
CMP RAX,0x0
JZ 0x0013c84d
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
SAR EAX,0x4
CDQE
MOV CL,byte ptr [RBP + RAX*0x1 + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,byte ptr [RAX]
AND EAX,0xf
CDQE
MOV CL,byte ptr [RBP + RAX*0x1 + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0013c7e8
LAB_0013c84d:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0013c87f
MOV RAX,qword ptr [RBP + -0x48]
ADD RSP,0x50
POP RBP
RET
LAB_0013c87f:
CALL 0x001144c0
|
long mysql_hex_string(char *param_1,byte *param_2,long param_3)
{
char *pcVar1;
long in_FS_OFFSET;
long local_40;
byte *local_38;
char *local_30;
char local_28 [16];
char local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_28._0_8_ = s_0123456789ABCDEF_0016df80._0_8_;
local_28._8_8_ = s_0123456789ABCDEF_0016df80._8_8_;
local_18 = s_0123456789ABCDEF_0016df80[0x10];
local_40 = param_3;
local_38 = param_2;
local_30 = param_1;
while (local_40 != 0) {
pcVar1 = local_30 + 1;
*local_30 = local_28[(int)(uint)*local_38 >> 4];
local_30 = local_30 + 2;
*pcVar1 = local_28[(int)(*local_38 & 0xf)];
local_38 = local_38 + 1;
local_40 = local_40 + -1;
}
*local_30 = '\0';
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return (long)local_30 - (long)param_1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
37,413 | check_posix_syntax | eloqsql/build_O0/extra/pcre2/src/pcre2/src/pcre2_compile.c | static BOOL
check_posix_syntax(PCRE2_SPTR ptr, PCRE2_SPTR ptrend, PCRE2_SPTR *endptr)
{
PCRE2_UCHAR terminator; /* Don't combine these lines; the Solaris cc */
terminator = *ptr++; /* compiler warns about "non-constant" initializer. */
for (; ptrend - ptr >= 2; ptr++)
{
if (*ptr == CHAR_BACKSLASH &&
(ptr[1] == CHAR_RIGHT_SQUARE_BRACKET || ptr[1] == CHAR_BACKSLASH))
ptr++;
else if ((*ptr == CHAR_LEFT_SQUARE_BRACKET && ptr[1] == terminator) ||
*ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;
else if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
{
*endptr = ptr;
return TRUE;
}
}
return FALSE;
} | O0 | c | check_posix_syntax:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %al
movb %al, -0x21(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jl 0xd54c5
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5c, %eax
jne 0xd544d
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x5d, %eax
je 0xd543f
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x5c, %eax
jne 0xd544d
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xd54b2
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5b, %eax
jne 0xd5469
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
movzbl -0x21(%rbp), %ecx
cmpl %ecx, %eax
je 0xd5475
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x5d, %eax
jne 0xd547e
movl $0x0, -0x4(%rbp)
jmp 0xd54cc
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movzbl -0x21(%rbp), %ecx
cmpl %ecx, %eax
jne 0xd54ae
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x5d, %eax
jne 0xd54ae
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xd54cc
jmp 0xd54b0
jmp 0xd54b2
jmp 0xd54b4
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xd5404
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| check_posix_syntax:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov al, [rax]
mov [rbp+var_21], al
loc_D5404:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
cmp rax, 2
jl loc_D54C5
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 5Ch ; '\'
jnz short loc_D544D
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 5Dh ; ']'
jz short loc_D543F
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 5Ch ; '\'
jnz short loc_D544D
loc_D543F:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_D54B2
loc_D544D:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 5Bh ; '['
jnz short loc_D5469
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
movzx ecx, [rbp+var_21]
cmp eax, ecx
jz short loc_D5475
loc_D5469:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 5Dh ; ']'
jnz short loc_D547E
loc_D5475:
mov [rbp+var_4], 0
jmp short loc_D54CC
loc_D547E:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
movzx ecx, [rbp+var_21]
cmp eax, ecx
jnz short loc_D54AE
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 5Dh ; ']'
jnz short loc_D54AE
mov rcx, [rbp+var_10]
mov rax, [rbp+var_20]
mov [rax], rcx
mov [rbp+var_4], 1
jmp short loc_D54CC
loc_D54AE:
jmp short $+2
loc_D54B0:
jmp short $+2
loc_D54B2:
jmp short $+2
loc_D54B4:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_D5404
loc_D54C5:
mov [rbp+var_4], 0
loc_D54CC:
mov eax, [rbp+var_4]
pop rbp
retn
| long long check_posix_syntax(unsigned __int8 *a1, long long a2, _QWORD *a3)
{
unsigned __int8 v4; // [rsp+1h] [rbp-21h]
unsigned __int8 *v5; // [rsp+12h] [rbp-10h]
v5 = a1 + 1;
v4 = *a1;
while ( a2 - (long long)v5 >= 2 )
{
if ( *v5 == 92 && (v5[1] == 93 || v5[1] == 92) )
{
++v5;
}
else
{
if ( *v5 == 91 && v5[1] == v4 || *v5 == 93 )
return 0;
if ( *v5 == v4 && v5[1] == 93 )
{
*a3 = v5;
return 1;
}
}
++v5;
}
return 0;
}
| check_posix_syntax:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x21],AL
LAB_001d5404:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
CMP RAX,0x2
JL 0x001d54c5
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x5c
JNZ 0x001d544d
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x5d
JZ 0x001d543f
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x5c
JNZ 0x001d544d
LAB_001d543f:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001d54b2
LAB_001d544d:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x5b
JNZ 0x001d5469
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX ECX,byte ptr [RBP + -0x21]
CMP EAX,ECX
JZ 0x001d5475
LAB_001d5469:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x5d
JNZ 0x001d547e
LAB_001d5475:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001d54cc
LAB_001d547e:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOVZX ECX,byte ptr [RBP + -0x21]
CMP EAX,ECX
JNZ 0x001d54ae
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x5d
JNZ 0x001d54ae
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001d54cc
LAB_001d54ae:
JMP 0x001d54b0
LAB_001d54b0:
JMP 0x001d54b2
LAB_001d54b2:
JMP 0x001d54b4
LAB_001d54b4:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001d5404
LAB_001d54c5:
MOV dword ptr [RBP + -0x4],0x0
LAB_001d54cc:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 check_posix_syntax(char *param_1,long param_2,int8 *param_3)
{
char *local_18;
local_18 = param_1 + 1;
do {
if (param_2 - (long)local_18 < 2) {
return 0;
}
if ((*local_18 == '\\') && ((local_18[1] == ']' || (local_18[1] == '\\')))) {
local_18 = local_18 + 1;
}
else {
if (((*local_18 == '[') && (local_18[1] == *param_1)) || (*local_18 == ']')) {
return 0;
}
if ((*local_18 == *param_1) && (local_18[1] == ']')) {
*param_3 = local_18;
return 1;
}
}
local_18 = local_18 + 1;
} while( true );
}
| |
37,414 | js_proxy_get | bluesky950520[P]quickjs/quickjs.c | static JSValue js_proxy_get(JSContext *ctx, JSValue obj, JSAtom atom,
JSValue receiver)
{
JSProxyData *s;
JSValue method, ret, atom_val;
int res;
JSValue args[3];
JSPropertyDescriptor desc;
s = get_proxy_method(ctx, &method, obj, JS_ATOM_get);
if (!s)
return JS_EXCEPTION;
/* Note: recursion is possible thru the prototype of s->target */
if (JS_IsUndefined(method))
return JS_GetPropertyInternal(ctx, s->target, atom, receiver, FALSE);
atom_val = JS_AtomToValue(ctx, atom);
if (JS_IsException(atom_val)) {
JS_FreeValue(ctx, method);
return JS_EXCEPTION;
}
args[0] = s->target;
args[1] = atom_val;
args[2] = receiver;
ret = JS_CallFree(ctx, method, s->handler, 3, args);
JS_FreeValue(ctx, atom_val);
if (JS_IsException(ret))
return JS_EXCEPTION;
res = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(s->target), atom);
if (res < 0) {
JS_FreeValue(ctx, ret);
return JS_EXCEPTION;
}
if (res) {
if ((desc.flags & (JS_PROP_GETSET | JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE)) == 0) {
if (!js_same_value(ctx, desc.value, ret)) {
goto fail;
}
} else if ((desc.flags & (JS_PROP_GETSET | JS_PROP_CONFIGURABLE)) == JS_PROP_GETSET) {
if (JS_IsUndefined(desc.getter) && !JS_IsUndefined(ret)) {
fail:
js_free_desc(ctx, &desc);
JS_FreeValue(ctx, ret);
return JS_ThrowTypeError(ctx, "proxy: inconsistent get");
}
}
js_free_desc(ctx, &desc);
}
return ret;
} | O1 | c | js_proxy_get:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, %r15
movq %r8, %r12
movl %ecx, %ebp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x8(%rsp), %rsi
movl $0x42, %r8d
callq 0x3d3e0
movl $0x6, %edx
testq %rax, %rax
je 0x4f0bf
movq %rax, %r13
movq 0x10(%rsp), %rbx
cmpl $0x3, %ebx
jne 0x4f0c9
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r14, %rdi
movl %ebp, %ecx
movq %r12, %r8
movq %r15, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %rax, %r15
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x4f165
xorl %r15d, %r15d
xorl %ecx, %ecx
jmp 0x4f165
movq %r14, %rdi
movl %ebp, 0x4(%rsp)
movl %ebp, %esi
xorl %edx, %edx
callq 0x2075a
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x4f0f4
movq 0x8(%rsp), %rsi
movq 0x18(%r14), %rdi
movq %rbx, %rdx
callq 0x1d8c6
jmp 0x4f15b
movups (%r13), %xmm0
leaq 0x50(%rsp), %r10
movaps %xmm0, (%r10)
movq %rax, 0x10(%r10)
movq %rbp, 0x18(%r10)
movq %r12, 0x20(%r10)
movq %r15, 0x28(%r10)
movq %rax, %r12
movq 0x8(%rsp), %rsi
movq 0x10(%r13), %rcx
movq 0x18(%r13), %r8
subq $0x8, %rsp
movq %r14, %rdi
movq %rbx, %rdx
movl $0x3, %r9d
pushq %r10
callq 0x22c9d
addq $0x10, %rsp
movq %rax, %r15
movq 0x18(%r14), %rdi
movq %r12, %rsi
movq %rdx, %r12
movq %rbp, %rdx
callq 0x1d8c6
movl %r12d, %ebx
cmpq $0x6, %rbx
jne 0x4f17d
xorl %r15d, %r15d
xorl %ecx, %ecx
movl $0x6, %edx
movl %r15d, %eax
orq %rcx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r13), %rdx
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
movl 0x4(%rsp), %ecx
callq 0x23bd9
testl %eax, %eax
js 0x4f1ef
je 0x4f227
movl 0x18(%rsp), %eax
testb $0x13, %al
je 0x4f1fe
andl $0x11, %eax
cmpl $0x10, %eax
jne 0x4f21a
cmpl $0x3, %ebx
je 0x4f21a
movl 0x38(%rsp), %eax
cmpl $0x3, %eax
jne 0x4f21a
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x3d8c3
movq 0x18(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1d8c6
leaq 0x50f64(%rip), %rsi # 0xa0141
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x22567
jmp 0x4f15e
movq 0x18(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
jmp 0x4f0ed
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rcx
movq %r12, %r8
callq 0x26461
testl %eax, %eax
je 0x4f1ba
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x3d8c3
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %rcx
andq %rax, %rcx
movq %r12, %rdx
jmp 0x4f165
| js_proxy_get:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r15, r9
mov r12, r8
mov ebp, ecx
mov rcx, rdx
mov rdx, rsi
mov r14, rdi
lea rsi, [rsp+0B8h+var_B0]
mov r8d, 42h ; 'B'
call get_proxy_method
mov edx, 6
test rax, rax
jz short loc_4F0BF
mov r13, rax
mov rbx, [rsp+0B8h+var_A8]
cmp ebx, 3
jnz short loc_4F0C9
mov rsi, [r13+0]
mov rdx, [r13+8]
mov rdi, r14
mov ecx, ebp
mov r8, r12
mov r9, r15
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r15, rax
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
jmp loc_4F165
loc_4F0BF:
xor r15d, r15d
xor ecx, ecx
jmp loc_4F165
loc_4F0C9:
mov rdi, r14
mov [rsp+0B8h+var_B4], ebp
mov esi, ebp
xor edx, edx
call __JS_AtomToValue
mov rbp, rdx
cmp ebp, 6
jnz short loc_4F0F4
mov rsi, [rsp+0B8h+var_B0]
mov rdi, [r14+18h]
mov rdx, rbx
loc_4F0ED:
call JS_FreeValueRT
jmp short loc_4F15B
loc_4F0F4:
movups xmm0, xmmword ptr [r13+0]
lea r10, [rsp+0B8h+var_68]
movaps xmmword ptr [r10], xmm0
mov [r10+10h], rax
mov [r10+18h], rbp
mov [r10+20h], r12
mov [r10+28h], r15
mov r12, rax
mov rsi, [rsp+0B8h+var_B0]
mov rcx, [r13+10h]
mov r8, [r13+18h]
sub rsp, 8
mov rdi, r14
mov rdx, rbx
mov r9d, 3
push r10
call JS_CallFree
add rsp, 10h
mov r15, rax
mov rdi, [r14+18h]
mov rsi, r12
mov r12, rdx
mov rdx, rbp
call JS_FreeValueRT
mov ebx, r12d
cmp rbx, 6
jnz short loc_4F17D
loc_4F15B:
xor r15d, r15d
loc_4F15E:
xor ecx, ecx
mov edx, 6
loc_4F165:
mov eax, r15d
or rax, rcx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4F17D:
mov rdx, [r13+0]
lea rsi, [rsp+0B8h+var_A0]
mov rdi, r14
mov ecx, [rsp+0B8h+var_B4]
call JS_GetOwnPropertyInternal
test eax, eax
js short loc_4F1EF
jz loc_4F227
mov eax, [rsp+0B8h+var_A0]
test al, 13h
jz short loc_4F1FE
and eax, 11h
cmp eax, 10h
jnz short loc_4F21A
cmp ebx, 3
jz short loc_4F21A
mov eax, [rsp+0B8h+var_80]
cmp eax, 3
jnz short loc_4F21A
loc_4F1BA:
lea rsi, [rsp+0B8h+var_A0]
mov rdi, r14
call js_free_desc
mov rdi, [r14+18h]
mov rsi, r15
mov rdx, r12
call JS_FreeValueRT
lea rsi, aProxyInconsist_6; "proxy: inconsistent get"
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp loc_4F15E
loc_4F1EF:
mov rdi, [r14+18h]
mov rsi, r15
mov rdx, r12
jmp loc_4F0ED
loc_4F1FE:
mov rsi, [rsp+0B8h+var_98]
mov rdx, [rsp+0B8h+var_90]
mov rdi, r14
mov rcx, r15
mov r8, r12
call js_same_value
test eax, eax
jz short loc_4F1BA
loc_4F21A:
lea rsi, [rsp+0B8h+var_A0]
mov rdi, r14
call js_free_desc
loc_4F227:
mov rax, 0FFFFFFFF00000000h
mov rcx, r15
and rcx, rax
mov rdx, r12
jmp loc_4F165
| unsigned long long js_proxy_get(
long long a1,
long long a2,
long long a3,
unsigned int 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; // r15
long long *proxy_method; // rax
long long *v18; // r13
long long v19; // rbx
unsigned long long PropertyInternal2; // rax
unsigned long long v21; // rcx
long long v22; // rax
long long v23; // rdx
long long v24; // rbp
_DWORD *v25; // rsi
long long v26; // rdi
long long v27; // rdx
__m128 v28; // xmm0
_DWORD *v29; // r12
_DWORD *v30; // rsi
long long v31; // rdx
long long v32; // r12
int OwnPropertyInternal; // eax
long long v35; // rdx
long long v36; // rcx
long long v37; // r8
long long v38; // r9
__m128 v39; // xmm4
__m128 v40; // xmm5
char v41; // [rsp+0h] [rbp-B8h]
int v42; // [rsp+4h] [rbp-B4h]
_DWORD *v43; // [rsp+8h] [rbp-B0h] BYREF
long long v44; // [rsp+10h] [rbp-A8h]
int v45; // [rsp+18h] [rbp-A0h] BYREF
_DWORD *v46; // [rsp+20h] [rbp-98h]
long long v47; // [rsp+28h] [rbp-90h]
int v48; // [rsp+38h] [rbp-80h]
__m128 v49; // [rsp+50h] [rbp-68h] BYREF
long long v50; // [rsp+60h] [rbp-58h]
long long v51; // [rsp+68h] [rbp-50h]
long long v52; // [rsp+70h] [rbp-48h]
long long v53; // [rsp+78h] [rbp-40h]
v14 = a6;
proxy_method = (long long *)get_proxy_method(
a1,
(unsigned long long *)&v43,
a2,
a3,
66LL,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14);
if ( !proxy_method )
{
LODWORD(v14) = 0;
v21 = 0LL;
return v21 | (unsigned int)v14;
}
v18 = proxy_method;
v19 = v44;
if ( (_DWORD)v44 != 3 )
{
v42 = a4;
v22 = _JS_AtomToValue(a1, a4, 0);
v24 = v23;
if ( (_DWORD)v23 == 6 )
{
v25 = v43;
v26 = *(_QWORD *)(a1 + 24);
v27 = v19;
LABEL_7:
JS_FreeValueRT(v26, v25, v27);
LABEL_9:
LODWORD(v14) = 0;
LABEL_10:
v21 = 0LL;
return v21 | (unsigned int)v14;
}
v28 = *(__m128 *)v18;
v49 = *(__m128 *)v18;
v50 = v22;
v51 = v23;
v52 = a5;
v53 = v14;
v29 = (_DWORD *)v22;
v14 = JS_CallFree(a1, v43, v19, v18[2], v18[3], 3, (long long)&v49);
v30 = v29;
v32 = v31;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v30, v24);
if ( (unsigned int)v32 == 6LL )
goto LABEL_9;
OwnPropertyInternal = JS_GetOwnPropertyInternal(a1, (long long)&v45, *v18, v42);
if ( OwnPropertyInternal < 0 )
{
v26 = *(_QWORD *)(a1 + 24);
v25 = (_DWORD *)v14;
v27 = v32;
goto LABEL_7;
}
if ( OwnPropertyInternal )
{
if ( (v45 & 0x13) != 0 )
{
if ( (v45 & 0x11) == 0x10 && (_DWORD)v32 != 3 && v48 == 3 )
goto LABEL_18;
}
else if ( !(unsigned int)js_same_value(a1, v46, v47, (_DWORD *)v14, v32) )
{
LABEL_18:
js_free_desc(a1, (long long)&v45);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v14, v32);
LODWORD(v14) = 0;
JS_ThrowTypeError(
a1,
(long long)"proxy: inconsistent get",
v35,
v36,
v37,
v38,
v28,
a8,
a9,
a10,
v39,
v40,
a13,
a14,
v41);
goto LABEL_10;
}
js_free_desc(a1, (long long)&v45);
}
v21 = v14 & 0xFFFFFFFF00000000LL;
return v21 | (unsigned int)v14;
}
PropertyInternal2 = JS_GetPropertyInternal2(a1, *proxy_method, proxy_method[1], a4, a5, v14, 0LL, 0);
LODWORD(v14) = PropertyInternal2;
v21 = PropertyInternal2 & 0xFFFFFFFF00000000LL;
return v21 | (unsigned int)v14;
}
| js_proxy_get:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R15,R9
MOV R12,R8
MOV EBP,ECX
MOV RCX,RDX
MOV RDX,RSI
MOV R14,RDI
LEA RSI,[RSP + 0x8]
MOV R8D,0x42
CALL 0x0013d3e0
MOV EDX,0x6
TEST RAX,RAX
JZ 0x0014f0bf
MOV R13,RAX
MOV RBX,qword ptr [RSP + 0x10]
CMP EBX,0x3
JNZ 0x0014f0c9
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,R14
MOV ECX,EBP
MOV R8,R12
MOV R9,R15
PUSH 0x0
PUSH 0x0
CALL 0x00122fa3
ADD RSP,0x10
MOV R15,RAX
MOV RCX,-0x100000000
AND RCX,RAX
JMP 0x0014f165
LAB_0014f0bf:
XOR R15D,R15D
XOR ECX,ECX
JMP 0x0014f165
LAB_0014f0c9:
MOV RDI,R14
MOV dword ptr [RSP + 0x4],EBP
MOV ESI,EBP
XOR EDX,EDX
CALL 0x0012075a
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x0014f0f4
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [R14 + 0x18]
MOV RDX,RBX
LAB_0014f0ed:
CALL 0x0011d8c6
JMP 0x0014f15b
LAB_0014f0f4:
MOVUPS XMM0,xmmword ptr [R13]
LEA R10,[RSP + 0x50]
MOVAPS xmmword ptr [R10],XMM0
MOV qword ptr [R10 + 0x10],RAX
MOV qword ptr [R10 + 0x18],RBP
MOV qword ptr [R10 + 0x20],R12
MOV qword ptr [R10 + 0x28],R15
MOV R12,RAX
MOV RSI,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [R13 + 0x10]
MOV R8,qword ptr [R13 + 0x18]
SUB RSP,0x8
MOV RDI,R14
MOV RDX,RBX
MOV R9D,0x3
PUSH R10
CALL 0x00122c9d
ADD RSP,0x10
MOV R15,RAX
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R12
MOV R12,RDX
MOV RDX,RBP
CALL 0x0011d8c6
MOV EBX,R12D
CMP RBX,0x6
JNZ 0x0014f17d
LAB_0014f15b:
XOR R15D,R15D
LAB_0014f15e:
XOR ECX,ECX
MOV EDX,0x6
LAB_0014f165:
MOV EAX,R15D
OR RAX,RCX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014f17d:
MOV RDX,qword ptr [R13]
LEA RSI,[RSP + 0x18]
MOV RDI,R14
MOV ECX,dword ptr [RSP + 0x4]
CALL 0x00123bd9
TEST EAX,EAX
JS 0x0014f1ef
JZ 0x0014f227
MOV EAX,dword ptr [RSP + 0x18]
TEST AL,0x13
JZ 0x0014f1fe
AND EAX,0x11
CMP EAX,0x10
JNZ 0x0014f21a
CMP EBX,0x3
JZ 0x0014f21a
MOV EAX,dword ptr [RSP + 0x38]
CMP EAX,0x3
JNZ 0x0014f21a
LAB_0014f1ba:
LEA RSI,[RSP + 0x18]
MOV RDI,R14
CALL 0x0013d8c3
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R15
MOV RDX,R12
CALL 0x0011d8c6
LEA RSI,[0x1a0141]
XOR R15D,R15D
MOV RDI,R14
XOR EAX,EAX
CALL 0x00122567
JMP 0x0014f15e
LAB_0014f1ef:
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R15
MOV RDX,R12
JMP 0x0014f0ed
LAB_0014f1fe:
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV RDI,R14
MOV RCX,R15
MOV R8,R12
CALL 0x00126461
TEST EAX,EAX
JZ 0x0014f1ba
LAB_0014f21a:
LEA RSI,[RSP + 0x18]
MOV RDI,R14
CALL 0x0013d8c3
LAB_0014f227:
MOV RAX,-0x100000000
MOV RCX,R15
AND RCX,RAX
MOV RDX,R12
JMP 0x0014f165
|
ulong js_proxy_get(long param_1,int8 param_2,int8 param_3,int4 param_4,
int8 param_5,int8 param_6)
{
int iVar1;
int8 *puVar2;
ulong uVar3;
ulong uVar4;
int8 uVar5;
int1 auVar6 [16];
int1 auVar7 [16];
ulong local_b0;
int8 local_a8;
uint local_a0 [2];
int8 local_98;
int8 local_90;
int local_80;
int4 local_68;
int4 uStack_64;
int4 uStack_60;
int4 uStack_5c;
int1 local_58 [16];
int8 local_48;
int8 local_40;
puVar2 = (int8 *)get_proxy_method(param_1,&local_b0,param_2,param_3,0x42);
if (puVar2 == (int8 *)0x0) {
uVar3 = 0;
uVar4 = 0;
goto LAB_0014f165;
}
if ((int)local_a8 == 3) {
uVar3 = JS_GetPropertyInternal2(param_1,*puVar2,puVar2[1],param_4,param_5,param_6,0,0);
uVar4 = uVar3 & 0xffffffff00000000;
goto LAB_0014f165;
}
auVar6 = __JS_AtomToValue(param_1,param_4,0);
auVar7._8_8_ = local_a8;
auVar7._0_8_ = local_b0;
if (auVar6._8_4_ == 6) {
uVar5 = *(int8 *)(param_1 + 0x18);
LAB_0014f0ed:
JS_FreeValueRT(uVar5,auVar7._0_8_,auVar7._8_8_);
}
else {
local_68 = *(int4 *)puVar2;
uStack_64 = *(int4 *)((long)puVar2 + 4);
uStack_60 = *(int4 *)(puVar2 + 1);
uStack_5c = *(int4 *)((long)puVar2 + 0xc);
local_48 = param_5;
local_40 = param_6;
local_58 = auVar6;
auVar7 = JS_CallFree(param_1,local_b0,local_a8,puVar2[2],puVar2[3],3,&local_68);
uVar4 = auVar7._8_8_;
uVar3 = auVar7._0_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar6._0_8_,auVar6._8_8_);
if ((uVar4 & 0xffffffff) != 6) {
iVar1 = JS_GetOwnPropertyInternal(param_1,local_a0,*puVar2,param_4);
if (iVar1 < 0) {
uVar5 = *(int8 *)(param_1 + 0x18);
goto LAB_0014f0ed;
}
if (iVar1 == 0) {
LAB_0014f227:
uVar4 = uVar3 & 0xffffffff00000000;
goto LAB_0014f165;
}
if ((local_a0[0] & 0x13) == 0) {
iVar1 = js_same_value(param_1,local_98,local_90,uVar3,uVar4);
if (iVar1 != 0) goto LAB_0014f21a;
}
else if ((((local_a0[0] & 0x11) != 0x10) || (auVar7._8_4_ == 3)) || (local_80 != 3)) {
LAB_0014f21a:
js_free_desc(param_1,local_a0);
goto LAB_0014f227;
}
js_free_desc(param_1,local_a0);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3,uVar4);
JS_ThrowTypeError(param_1,"proxy: inconsistent get");
}
}
uVar3 = 0;
uVar4 = 0;
LAB_0014f165:
return uVar3 & 0xffffffff | uVar4;
}
| |
37,415 | js_proxy_get | bluesky950520[P]quickjs/quickjs.c | static JSValue js_proxy_get(JSContext *ctx, JSValue obj, JSAtom atom,
JSValue receiver)
{
JSProxyData *s;
JSValue method, ret, atom_val;
int res;
JSValue args[3];
JSPropertyDescriptor desc;
s = get_proxy_method(ctx, &method, obj, JS_ATOM_get);
if (!s)
return JS_EXCEPTION;
/* Note: recursion is possible thru the prototype of s->target */
if (JS_IsUndefined(method))
return JS_GetPropertyInternal(ctx, s->target, atom, receiver, FALSE);
atom_val = JS_AtomToValue(ctx, atom);
if (JS_IsException(atom_val)) {
JS_FreeValue(ctx, method);
return JS_EXCEPTION;
}
args[0] = s->target;
args[1] = atom_val;
args[2] = receiver;
ret = JS_CallFree(ctx, method, s->handler, 3, args);
JS_FreeValue(ctx, atom_val);
if (JS_IsException(ret))
return JS_EXCEPTION;
res = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(s->target), atom);
if (res < 0) {
JS_FreeValue(ctx, ret);
return JS_EXCEPTION;
}
if (res) {
if ((desc.flags & (JS_PROP_GETSET | JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE)) == 0) {
if (!js_same_value(ctx, desc.value, ret)) {
goto fail;
}
} else if ((desc.flags & (JS_PROP_GETSET | JS_PROP_CONFIGURABLE)) == JS_PROP_GETSET) {
if (JS_IsUndefined(desc.getter) && !JS_IsUndefined(ret)) {
fail:
js_free_desc(ctx, &desc);
JS_FreeValue(ctx, ret);
return JS_ThrowTypeError(ctx, "proxy: inconsistent get");
}
}
js_free_desc(ctx, &desc);
}
return ret;
} | O2 | c | js_proxy_get:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, %r15
movq %r8, %r12
movl %ecx, %ebp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x18(%rsp), %rsi
pushq $0x42
popq %r8
callq 0x35d01
pushq $0x6
popq %rdx
testq %rax, %rax
je 0x43da3
movq %rax, %r13
movq 0x20(%rsp), %rbx
cmpl $0x3, %ebx
jne 0x43dad
movq (%r13), %rsi
movq 0x8(%r13), %rdx
andl $0x0, (%rsp)
movq %r14, %rdi
movl %ebp, %ecx
movq %r12, %r8
movq %r15, %r9
callq 0x3963b
movq %rax, %r15
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x43e3a
xorl %r15d, %r15d
xorl %ecx, %ecx
jmp 0x43e3a
movq %r14, %rdi
movl %ebp, 0x14(%rsp)
movl %ebp, %esi
callq 0x1a91e
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x43dd5
movq 0x18(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x1801e
jmp 0x43e32
movups (%r13), %xmm0
leaq 0x60(%rsp), %rdx
movaps %xmm0, (%rdx)
movq %rax, 0x10(%rdx)
movq %rbp, 0x18(%rdx)
movq %r12, 0x20(%rdx)
movq %r15, 0x28(%rdx)
movq %rax, %r12
movq 0x18(%rsp), %rsi
movq 0x10(%r13), %rcx
movq 0x18(%r13), %r8
movq %rdx, (%rsp)
pushq $0x3
popq %r9
movq %r14, %rdi
movq %rbx, %rdx
callq 0x1cd8e
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
movq %rdx, %r12
movq %rbp, %rdx
callq 0x1801e
movl %r12d, %ebx
cmpq $0x6, %rbx
jne 0x43e52
xorl %r15d, %r15d
xorl %ecx, %ecx
pushq $0x6
popq %rdx
movl %r15d, %eax
orq %rcx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r13), %rdx
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
movl 0x14(%rsp), %ecx
callq 0x1db80
testl %eax, %eax
js 0x43ec3
je 0x43efa
movl 0x28(%rsp), %eax
testb $0x13, %al
je 0x43ed1
andl $0x11, %eax
cmpl $0x10, %eax
jne 0x43eed
cmpl $0x3, %ebx
je 0x43eed
movl 0x48(%rsp), %eax
cmpl $0x3, %eax
jne 0x43eed
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x360ed
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1801e
leaq 0x431ca(%rip), %rsi # 0x8707b
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x1c64d
jmp 0x43e35
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
jmp 0x43dce
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %r14, %rdi
movq %r15, %rcx
movq %r12, %r8
callq 0x1ff32
testl %eax, %eax
je 0x43e8f
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x360ed
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %rcx
andq %rax, %rcx
movq %r12, %rdx
jmp 0x43e3a
| js_proxy_get:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, r9
mov r12, r8
mov ebp, ecx
mov rcx, rdx
mov rdx, rsi
mov r14, rdi
lea rsi, [rsp+0C8h+var_B0]
push 42h ; 'B'
pop r8
call get_proxy_method
push 6
pop rdx
test rax, rax
jz short loc_43DA3
mov r13, rax
mov rbx, [rsp+0C8h+var_A8]
cmp ebx, 3
jnz short loc_43DAD
mov rsi, [r13+0]
mov rdx, [r13+8]
and dword ptr [rsp+0C8h+var_C8], 0
mov rdi, r14
mov ecx, ebp
mov r8, r12
mov r9, r15
call JS_GetPropertyInternal
mov r15, rax
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
jmp loc_43E3A
loc_43DA3:
xor r15d, r15d
xor ecx, ecx
jmp loc_43E3A
loc_43DAD:
mov rdi, r14
mov [rsp+0C8h+var_B4], ebp
mov esi, ebp
call JS_AtomToValue
mov rbp, rdx
cmp ebp, 6
jnz short loc_43DD5
mov rsi, [rsp+0C8h+var_B0]
mov rdi, r14
mov rdx, rbx
loc_43DCE:
call JS_FreeValue
jmp short loc_43E32
loc_43DD5:
movups xmm0, xmmword ptr [r13+0]
lea rdx, [rsp+0C8h+var_68]
movaps xmmword ptr [rdx], xmm0
mov [rdx+10h], rax
mov [rdx+18h], rbp
mov [rdx+20h], r12
mov [rdx+28h], r15
mov r12, rax
mov rsi, [rsp+0C8h+var_B0]
mov rcx, [r13+10h]
mov r8, [r13+18h]
mov [rsp+0C8h+var_C8], rdx
push 3
pop r9
mov rdi, r14
mov rdx, rbx
call JS_CallFree
mov r15, rax
mov rdi, r14
mov rsi, r12
mov r12, rdx
mov rdx, rbp
call JS_FreeValue
mov ebx, r12d
cmp rbx, 6
jnz short loc_43E52
loc_43E32:
xor r15d, r15d
loc_43E35:
xor ecx, ecx
push 6
pop rdx
loc_43E3A:
mov eax, r15d
or rax, rcx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_43E52:
mov rdx, [r13+0]
lea rsi, [rsp+0C8h+var_A0]
mov rdi, r14
mov ecx, [rsp+0C8h+var_B4]
call JS_GetOwnPropertyInternal
test eax, eax
js short loc_43EC3
jz loc_43EFA
mov eax, [rsp+0C8h+var_A0]
test al, 13h
jz short loc_43ED1
and eax, 11h
cmp eax, 10h
jnz short loc_43EED
cmp ebx, 3
jz short loc_43EED
mov eax, [rsp+0C8h+var_80]
cmp eax, 3
jnz short loc_43EED
loc_43E8F:
lea rsi, [rsp+0C8h+var_A0]
mov rdi, r14
call js_free_desc
mov rdi, r14
mov rsi, r15
mov rdx, r12
call JS_FreeValue
lea rsi, aProxyInconsist_6; "proxy: inconsistent get"
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp loc_43E35
loc_43EC3:
mov rdi, r14
mov rsi, r15
mov rdx, r12
jmp loc_43DCE
loc_43ED1:
mov rsi, [rsp+0C8h+var_98]
mov rdx, [rsp+0C8h+var_90]
mov rdi, r14
mov rcx, r15
mov r8, r12
call js_same_value
test eax, eax
jz short loc_43E8F
loc_43EED:
lea rsi, [rsp+0C8h+var_A0]
mov rdi, r14
call js_free_desc
loc_43EFA:
mov rax, 0FFFFFFFF00000000h
mov rcx, r15
and rcx, rax
mov rdx, r12
jmp loc_43E3A
| unsigned long long js_proxy_get(
long long a1,
long long a2,
int a3,
unsigned int a4,
long long a5,
long long a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
long long *proxy_method; // rax
long long *v18; // r13
long long v19; // rbx
unsigned long long PropertyInternal; // rax
unsigned long long v21; // rcx
long long v22; // rax
long long v23; // rdx
long long v24; // rbp
long long v25; // rsi
long long v26; // rdx
__m128 v27; // xmm0
long long v28; // r12
long long v29; // rsi
long long v30; // rdx
long long v31; // r12
unsigned int *v32; // r8
int v34; // eax
long long v35; // rdx
long long v36; // rcx
long long v37; // r8
long long v38; // r9
__m128 v39; // xmm4
__m128 v40; // xmm5
char v41; // [rsp+0h] [rbp-C8h]
unsigned int v42; // [rsp+14h] [rbp-B4h]
long long v43; // [rsp+18h] [rbp-B0h] BYREF
long long v44; // [rsp+20h] [rbp-A8h]
long long v45[4]; // [rsp+28h] [rbp-A0h] BYREF
int v46; // [rsp+48h] [rbp-80h]
__m128 v47; // [rsp+60h] [rbp-68h] BYREF
long long v48; // [rsp+70h] [rbp-58h]
long long v49; // [rsp+78h] [rbp-50h]
long long v50; // [rsp+80h] [rbp-48h]
long long v51; // [rsp+88h] [rbp-40h]
proxy_method = (long long *)get_proxy_method(a1, (unsigned long long *)&v43, a2, a3, 66);
if ( !proxy_method )
{
LODWORD(a6) = 0;
v21 = 0LL;
return v21 | (unsigned int)a6;
}
v18 = proxy_method;
v19 = v44;
if ( (_DWORD)v44 != 3 )
{
v42 = a4;
v22 = JS_AtomToValue(a1, a4);
v24 = v23;
if ( (_DWORD)v23 == 6 )
{
v25 = v43;
v26 = v19;
LABEL_7:
JS_FreeValue(a1, v25, v26);
LABEL_9:
LODWORD(a6) = 0;
LABEL_10:
v21 = 0LL;
return v21 | (unsigned int)a6;
}
v27 = *(__m128 *)v18;
v47 = *(__m128 *)v18;
v48 = v22;
v49 = v23;
v50 = a5;
v51 = a6;
v28 = v22;
a6 = JS_CallFree(a1, v43, v19, v18[2], v18[3], 3, (long long)&v47);
v29 = v28;
v31 = v30;
JS_FreeValue(a1, v29, v24);
if ( (unsigned int)v31 == 6LL )
goto LABEL_9;
LOBYTE(v34) = JS_GetOwnPropertyInternal(a1, (long long)v45, *v18, v42, v32);
if ( v34 < 0 )
{
v25 = a6;
v26 = v31;
goto LABEL_7;
}
if ( v34 )
{
if ( (v45[0] & 0x13) != 0 )
{
if ( (v45[0] & 0x11) == 0x10 && (_DWORD)v31 != 3 && v46 == 3 )
goto LABEL_18;
}
else if ( !(unsigned int)js_same_value(a1, (_DWORD *)v45[1], v45[2], (_DWORD *)a6, v31) )
{
LABEL_18:
js_free_desc(a1, v45);
JS_FreeValue(a1, a6, v31);
LODWORD(a6) = 0;
JS_ThrowTypeError(
a1,
(long long)"proxy: inconsistent get",
v35,
v36,
v37,
v38,
v27,
a8,
a9,
a10,
v39,
v40,
a13,
a14,
v41);
goto LABEL_10;
}
js_free_desc(a1, v45);
}
v21 = a6 & 0xFFFFFFFF00000000LL;
return v21 | (unsigned int)a6;
}
PropertyInternal = JS_GetPropertyInternal(a1, *proxy_method, proxy_method[1], a4, a5, a6, 0);
LODWORD(a6) = PropertyInternal;
v21 = PropertyInternal & 0xFFFFFFFF00000000LL;
return v21 | (unsigned int)a6;
}
| js_proxy_get:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15,R9
MOV R12,R8
MOV EBP,ECX
MOV RCX,RDX
MOV RDX,RSI
MOV R14,RDI
LEA RSI,[RSP + 0x18]
PUSH 0x42
POP R8
CALL 0x00135d01
PUSH 0x6
POP RDX
TEST RAX,RAX
JZ 0x00143da3
MOV R13,RAX
MOV RBX,qword ptr [RSP + 0x20]
CMP EBX,0x3
JNZ 0x00143dad
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
AND dword ptr [RSP],0x0
MOV RDI,R14
MOV ECX,EBP
MOV R8,R12
MOV R9,R15
CALL 0x0013963b
MOV R15,RAX
MOV RCX,-0x100000000
AND RCX,RAX
JMP 0x00143e3a
LAB_00143da3:
XOR R15D,R15D
XOR ECX,ECX
JMP 0x00143e3a
LAB_00143dad:
MOV RDI,R14
MOV dword ptr [RSP + 0x14],EBP
MOV ESI,EBP
CALL 0x0011a91e
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x00143dd5
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,R14
MOV RDX,RBX
LAB_00143dce:
CALL 0x0011801e
JMP 0x00143e32
LAB_00143dd5:
MOVUPS XMM0,xmmword ptr [R13]
LEA RDX,[RSP + 0x60]
MOVAPS xmmword ptr [RDX],XMM0
MOV qword ptr [RDX + 0x10],RAX
MOV qword ptr [RDX + 0x18],RBP
MOV qword ptr [RDX + 0x20],R12
MOV qword ptr [RDX + 0x28],R15
MOV R12,RAX
MOV RSI,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [R13 + 0x10]
MOV R8,qword ptr [R13 + 0x18]
MOV qword ptr [RSP],RDX
PUSH 0x3
POP R9
MOV RDI,R14
MOV RDX,RBX
CALL 0x0011cd8e
MOV R15,RAX
MOV RDI,R14
MOV RSI,R12
MOV R12,RDX
MOV RDX,RBP
CALL 0x0011801e
MOV EBX,R12D
CMP RBX,0x6
JNZ 0x00143e52
LAB_00143e32:
XOR R15D,R15D
LAB_00143e35:
XOR ECX,ECX
PUSH 0x6
POP RDX
LAB_00143e3a:
MOV EAX,R15D
OR RAX,RCX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00143e52:
MOV RDX,qword ptr [R13]
LEA RSI,[RSP + 0x28]
MOV RDI,R14
MOV ECX,dword ptr [RSP + 0x14]
CALL 0x0011db80
TEST EAX,EAX
JS 0x00143ec3
JZ 0x00143efa
MOV EAX,dword ptr [RSP + 0x28]
TEST AL,0x13
JZ 0x00143ed1
AND EAX,0x11
CMP EAX,0x10
JNZ 0x00143eed
CMP EBX,0x3
JZ 0x00143eed
MOV EAX,dword ptr [RSP + 0x48]
CMP EAX,0x3
JNZ 0x00143eed
LAB_00143e8f:
LEA RSI,[RSP + 0x28]
MOV RDI,R14
CALL 0x001360ed
MOV RDI,R14
MOV RSI,R15
MOV RDX,R12
CALL 0x0011801e
LEA RSI,[0x18707b]
XOR R15D,R15D
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011c64d
JMP 0x00143e35
LAB_00143ec3:
MOV RDI,R14
MOV RSI,R15
MOV RDX,R12
JMP 0x00143dce
LAB_00143ed1:
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV RDI,R14
MOV RCX,R15
MOV R8,R12
CALL 0x0011ff32
TEST EAX,EAX
JZ 0x00143e8f
LAB_00143eed:
LEA RSI,[RSP + 0x28]
MOV RDI,R14
CALL 0x001360ed
LAB_00143efa:
MOV RAX,-0x100000000
MOV RCX,R15
AND RCX,RAX
MOV RDX,R12
JMP 0x00143e3a
|
ulong js_proxy_get(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 param_5,int8 param_6)
{
int iVar1;
int8 *puVar2;
ulong uVar3;
ulong uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
ulong in_stack_ffffffffffffff38;
ulong local_b0;
int8 local_a8;
uint local_a0 [2];
int8 local_98;
int8 local_90;
int local_80;
int4 local_68;
int4 uStack_64;
int4 uStack_60;
int4 uStack_5c;
int1 local_58 [16];
int8 local_48;
int8 local_40;
puVar2 = (int8 *)get_proxy_method(param_1,&local_b0,param_2,param_3,0x42);
if (puVar2 == (int8 *)0x0) {
uVar3 = 0;
uVar4 = 0;
goto LAB_00143e3a;
}
if ((int)local_a8 == 3) {
uVar3 = JS_GetPropertyInternal
(param_1,*puVar2,puVar2[1],param_4,param_5,param_6,
in_stack_ffffffffffffff38 & 0xffffffff00000000);
uVar4 = uVar3 & 0xffffffff00000000;
goto LAB_00143e3a;
}
auVar5 = JS_AtomToValue(param_1,param_4,6);
auVar6._8_8_ = local_a8;
auVar6._0_8_ = local_b0;
if (auVar5._8_4_ == 6) {
LAB_00143dce:
JS_FreeValue(param_1,auVar6._0_8_,auVar6._8_8_);
}
else {
local_68 = *(int4 *)puVar2;
uStack_64 = *(int4 *)((long)puVar2 + 4);
uStack_60 = *(int4 *)(puVar2 + 1);
uStack_5c = *(int4 *)((long)puVar2 + 0xc);
local_48 = param_5;
local_40 = param_6;
local_58 = auVar5;
auVar6 = JS_CallFree(param_1,local_b0,local_a8,puVar2[2],puVar2[3],3,&local_68);
uVar4 = auVar6._8_8_;
uVar3 = auVar6._0_8_;
JS_FreeValue(param_1,auVar5._0_8_,auVar5._8_8_);
if ((uVar4 & 0xffffffff) != 6) {
iVar1 = JS_GetOwnPropertyInternal(param_1,local_a0,*puVar2,param_4);
if (iVar1 < 0) goto LAB_00143dce;
if (iVar1 == 0) {
LAB_00143efa:
uVar4 = uVar3 & 0xffffffff00000000;
goto LAB_00143e3a;
}
if ((local_a0[0] & 0x13) == 0) {
iVar1 = js_same_value(param_1,local_98,local_90,uVar3,uVar4);
if (iVar1 != 0) goto LAB_00143eed;
}
else if ((((local_a0[0] & 0x11) != 0x10) || (auVar6._8_4_ == 3)) || (local_80 != 3)) {
LAB_00143eed:
js_free_desc(param_1,local_a0);
goto LAB_00143efa;
}
js_free_desc(param_1,local_a0);
JS_FreeValue(param_1,uVar3,uVar4);
JS_ThrowTypeError(param_1,"proxy: inconsistent get");
}
}
uVar3 = 0;
uVar4 = 0;
LAB_00143e3a:
return uVar3 & 0xffffffff | uVar4;
}
| |
37,416 | js_proxy_get | bluesky950520[P]quickjs/quickjs.c | static JSValue js_proxy_get(JSContext *ctx, JSValue obj, JSAtom atom,
JSValue receiver)
{
JSProxyData *s;
JSValue method, ret, atom_val;
int res;
JSValue args[3];
JSPropertyDescriptor desc;
s = get_proxy_method(ctx, &method, obj, JS_ATOM_get);
if (!s)
return JS_EXCEPTION;
/* Note: recursion is possible thru the prototype of s->target */
if (JS_IsUndefined(method))
return JS_GetPropertyInternal(ctx, s->target, atom, receiver, FALSE);
atom_val = JS_AtomToValue(ctx, atom);
if (JS_IsException(atom_val)) {
JS_FreeValue(ctx, method);
return JS_EXCEPTION;
}
args[0] = s->target;
args[1] = atom_val;
args[2] = receiver;
ret = JS_CallFree(ctx, method, s->handler, 3, args);
JS_FreeValue(ctx, atom_val);
if (JS_IsException(ret))
return JS_EXCEPTION;
res = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(s->target), atom);
if (res < 0) {
JS_FreeValue(ctx, ret);
return JS_EXCEPTION;
}
if (res) {
if ((desc.flags & (JS_PROP_GETSET | JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE)) == 0) {
if (!js_same_value(ctx, desc.value, ret)) {
goto fail;
}
} else if ((desc.flags & (JS_PROP_GETSET | JS_PROP_CONFIGURABLE)) == JS_PROP_GETSET) {
if (JS_IsUndefined(desc.getter) && !JS_IsUndefined(ret)) {
fail:
js_free_desc(ctx, &desc);
JS_FreeValue(ctx, ret);
return JS_ThrowTypeError(ctx, "proxy: inconsistent get");
}
}
js_free_desc(ctx, &desc);
}
return ret;
} | O3 | c | js_proxy_get:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, %r14
movq %r8, %r12
movl %ecx, %ebp
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
movl $0x42, %r8d
callq 0x3e9d6
movl $0x6, %edx
testq %rax, %rax
je 0x512a6
movq %rax, %r13
movq 0x10(%rsp), %rbx
cmpl $0x3, %ebx
jne 0x512b0
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r15, %rdi
movl %ebp, %ecx
movq %r12, %r8
movq %r14, %r9
pushq $0x0
pushq $0x0
callq 0x2384b
addq $0x10, %rsp
movq %rax, %r14
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x51376
xorl %r14d, %r14d
xorl %ecx, %ecx
jmp 0x51376
movq %r15, %rdi
movl %ebp, 0x4(%rsp)
movl %ebp, %esi
xorl %edx, %edx
callq 0x20eb3
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x512f4
cmpl $-0x9, %ebx
jb 0x5136c
movq 0x8(%rsp), %rsi
movq 0x18(%r15), %rdi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x5136c
movq %rbx, %rdx
callq 0x219cc
jmp 0x5136c
movups (%r13), %xmm0
leaq 0x50(%rsp), %r10
movaps %xmm0, (%r10)
movq %rax, 0x10(%r10)
movq %rbp, 0x18(%r10)
movq %r12, 0x20(%r10)
movq %r14, 0x28(%r10)
movq %rax, %r14
movq 0x8(%rsp), %rsi
movq 0x10(%r13), %rcx
movq 0x18(%r13), %r8
subq $0x8, %rsp
movq %r15, %rdi
movq %rbx, %rdx
movl $0x3, %r9d
pushq %r10
callq 0x234e7
movq %r14, %rsi
addq $0x10, %rsp
movq %rax, %r14
movq %rdx, %r12
cmpl $-0x9, %ebp
jb 0x51363
movq 0x18(%r15), %rdi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x51363
movq %rbp, %rdx
callq 0x219cc
movl %r12d, %ebx
cmpq $0x6, %rbx
jne 0x5138e
xorl %r14d, %r14d
xorl %ecx, %ecx
movl $0x6, %edx
movl %r14d, %eax
orq %rcx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r13), %rdx
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
movl 0x4(%rsp), %ecx
callq 0x243f9
testl %eax, %eax
js 0x51424
je 0x5147c
movl 0x18(%rsp), %eax
testb $0x13, %al
je 0x5144f
andl $0x11, %eax
cmpl $0x10, %eax
jne 0x5146f
cmpl $0x3, %ebx
je 0x5146f
movl 0x38(%rsp), %eax
cmpl $0x3, %eax
jne 0x5146f
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x3ee5b
cmpl $-0x9, %r12d
jb 0x5140b
movq 0x18(%r15), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x5140b
movq %r14, %rsi
movq %r12, %rdx
callq 0x219cc
leaq 0x51cd9(%rip), %rsi # 0xa30eb
xorl %r14d, %r14d
movq %r15, %rdi
xorl %eax, %eax
callq 0x22d8b
jmp 0x5136f
cmpl $-0x9, %r12d
jb 0x5136c
movq 0x18(%r15), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x5136c
movq %r14, %rsi
movq %r12, %rdx
jmp 0x512ed
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rcx
movq %r12, %r8
callq 0x26ae5
testl %eax, %eax
je 0x513db
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x3ee5b
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r14, %rcx
andq %rax, %rcx
movq %r12, %rdx
jmp 0x51376
| js_proxy_get:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r14, r9
mov r12, r8
mov ebp, ecx
mov rcx, rdx
mov rdx, rsi
mov r15, rdi
lea rsi, [rsp+0B8h+var_B0]
mov r8d, 42h ; 'B'
call get_proxy_method
mov edx, 6
test rax, rax
jz short loc_512A6
mov r13, rax
mov rbx, [rsp+0B8h+var_A8]
cmp ebx, 3
jnz short loc_512B0
mov rsi, [r13+0]
mov rdx, [r13+8]
mov rdi, r15
mov ecx, ebp
mov r8, r12
mov r9, r14
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r14, rax
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
jmp loc_51376
loc_512A6:
xor r14d, r14d
xor ecx, ecx
jmp loc_51376
loc_512B0:
mov rdi, r15
mov [rsp+0B8h+var_B4], ebp
mov esi, ebp
xor edx, edx
call __JS_AtomToValue
mov rbp, rdx
cmp ebp, 6
jnz short loc_512F4
cmp ebx, 0FFFFFFF7h
jb loc_5136C
mov rsi, [rsp+0B8h+var_B0]
mov rdi, [r15+18h]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg loc_5136C
mov rdx, rbx
loc_512ED:
call js_free_value_rt
jmp short loc_5136C
loc_512F4:
movups xmm0, xmmword ptr [r13+0]
lea r10, [rsp+0B8h+var_68]
movaps xmmword ptr [r10], xmm0
mov [r10+10h], rax
mov [r10+18h], rbp
mov [r10+20h], r12
mov [r10+28h], r14
mov r14, rax
mov rsi, [rsp+0B8h+var_B0]
mov rcx, [r13+10h]
mov r8, [r13+18h]
sub rsp, 8
mov rdi, r15
mov rdx, rbx
mov r9d, 3
push r10
call JS_CallFree
mov rsi, r14
add rsp, 10h
mov r14, rax
mov r12, rdx
cmp ebp, 0FFFFFFF7h
jb short loc_51363
mov rdi, [r15+18h]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_51363
mov rdx, rbp
call js_free_value_rt
loc_51363:
mov ebx, r12d
cmp rbx, 6
jnz short loc_5138E
loc_5136C:
xor r14d, r14d
loc_5136F:
xor ecx, ecx
mov edx, 6
loc_51376:
mov eax, r14d
or rax, rcx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5138E:
mov rdx, [r13+0]
lea rsi, [rsp+0B8h+var_A0]
mov rdi, r15
mov ecx, [rsp+0B8h+var_B4]
call JS_GetOwnPropertyInternal
test eax, eax
js short loc_51424
jz loc_5147C
mov eax, [rsp+0B8h+var_A0]
test al, 13h
jz loc_5144F
and eax, 11h
cmp eax, 10h
jnz loc_5146F
cmp ebx, 3
jz loc_5146F
mov eax, [rsp+0B8h+var_80]
cmp eax, 3
jnz loc_5146F
loc_513DB:
lea rsi, [rsp+0B8h+var_A0]
mov rdi, r15
call js_free_desc
cmp r12d, 0FFFFFFF7h
jb short loc_5140B
mov rdi, [r15+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_5140B
mov rsi, r14
mov rdx, r12
call js_free_value_rt
loc_5140B:
lea rsi, aProxyInconsist_6; "proxy: inconsistent get"
xor r14d, r14d
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
jmp loc_5136F
loc_51424:
cmp r12d, 0FFFFFFF7h
jb loc_5136C
mov rdi, [r15+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg loc_5136C
mov rsi, r14
mov rdx, r12
jmp loc_512ED
loc_5144F:
mov rsi, [rsp+0B8h+var_98]
mov rdx, [rsp+0B8h+var_90]
mov rdi, r15
mov rcx, r14
mov r8, r12
call js_same_value
test eax, eax
jz loc_513DB
loc_5146F:
lea rsi, [rsp+0B8h+var_A0]
mov rdi, r15
call js_free_desc
loc_5147C:
mov rax, 0FFFFFFFF00000000h
mov rcx, r14
and rcx, rax
mov rdx, r12
jmp loc_51376
| unsigned long long js_proxy_get(
long long a1,
long long a2,
long long a3,
unsigned int 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; // r14
long long *proxy_method; // rax
long long *v19; // r13
unsigned int v20; // ebx
unsigned long long PropertyInternal2; // rax
unsigned long long v22; // rcx
long long v23; // rax
long long v24; // rdx
unsigned int v25; // ebp
_QWORD *v26; // rsi
long long v27; // rdi
int v28; // eax
int v29; // edx
__m128 v30; // xmm0
_QWORD *v31; // rsi
long long v32; // rdx
long long v33; // r12
long long v34; // rdi
int v35; // eax
int v37; // eax
long long v38; // rdx
long long v39; // rcx
long long v40; // r8
long long v41; // r9
__m128 v42; // xmm4
__m128 v43; // xmm5
long long v44; // rdi
int v45; // eax
int v46; // eax
char v47; // [rsp+0h] [rbp-B8h]
unsigned int v48; // [rsp+4h] [rbp-B4h]
_QWORD *v49; // [rsp+8h] [rbp-B0h] BYREF
long long v50; // [rsp+10h] [rbp-A8h]
_QWORD v51[4]; // [rsp+18h] [rbp-A0h] BYREF
int v52; // [rsp+38h] [rbp-80h]
__m128 v53; // [rsp+50h] [rbp-68h] BYREF
long long v54; // [rsp+60h] [rbp-58h]
long long v55; // [rsp+68h] [rbp-50h]
long long v56; // [rsp+70h] [rbp-48h]
long long v57; // [rsp+78h] [rbp-40h]
v14 = a6;
proxy_method = (long long *)get_proxy_method(
a1,
(unsigned long long *)&v49,
a2,
a3,
66LL,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14);
if ( !proxy_method )
{
LODWORD(v14) = 0;
v22 = 0LL;
return v22 | (unsigned int)v14;
}
v19 = proxy_method;
v20 = v50;
if ( (_DWORD)v50 != 3 )
{
v48 = a4;
v23 = _JS_AtomToValue(a1, a4, 0);
v25 = v24;
if ( (_DWORD)v24 == 6 )
{
if ( v20 < 0xFFFFFFF7 )
goto LABEL_14;
v26 = v49;
v27 = *(_QWORD *)(a1 + 24);
v28 = (*(_DWORD *)v49)--;
if ( v28 > 1 )
goto LABEL_14;
v29 = v20;
LABEL_9:
js_free_value_rt(v27, v26, v29);
LABEL_14:
LODWORD(v14) = 0;
LABEL_15:
v22 = 0LL;
return v22 | (unsigned int)v14;
}
v30 = *(__m128 *)v19;
v53 = *(__m128 *)v19;
v54 = v23;
v55 = v24;
v56 = a5;
v57 = v14;
v31 = (_QWORD *)v23;
v14 = JS_CallFree(a1, v49, v20, v19[2], v19[3], 3, (long long)&v53);
v33 = v32;
if ( v25 >= 0xFFFFFFF7 )
{
v34 = *(_QWORD *)(a1 + 24);
v35 = (*(_DWORD *)v31)--;
if ( v35 <= 1 )
js_free_value_rt(v34, v31, v25);
}
if ( (unsigned int)v33 == 6LL )
goto LABEL_14;
LOBYTE(v37) = JS_GetOwnPropertyInternal(a1, (long long)v51, *v19, v48);
if ( v37 < 0 )
{
if ( (unsigned int)v33 < 0xFFFFFFF7 )
goto LABEL_14;
v27 = *(_QWORD *)(a1 + 24);
v46 = (*(_DWORD *)v14)--;
if ( v46 > 1 )
goto LABEL_14;
v26 = (_QWORD *)v14;
v29 = v33;
goto LABEL_9;
}
if ( v37 )
{
if ( (v51[0] & 0x13) != 0 )
{
if ( (v51[0] & 0x11) == 0x10 && (_DWORD)v33 != 3 && v52 == 3 )
goto LABEL_23;
}
else if ( !(unsigned int)js_same_value(a1, (_DWORD *)v51[1], v51[2], (_DWORD *)v14, v33) )
{
LABEL_23:
js_free_desc(a1, v51);
if ( (unsigned int)v33 >= 0xFFFFFFF7 )
{
v44 = *(_QWORD *)(a1 + 24);
v45 = *(_DWORD *)v14;
v39 = (unsigned int)(*(_DWORD *)v14 - 1);
*(_DWORD *)v14 = v39;
if ( v45 <= 1 )
js_free_value_rt(v44, (_QWORD *)v14, v33);
}
LODWORD(v14) = 0;
JS_ThrowTypeError(
a1,
(long long)"proxy: inconsistent get",
v38,
v39,
v40,
v41,
v30,
a8,
a9,
a10,
v42,
v43,
a13,
a14,
v47);
goto LABEL_15;
}
js_free_desc(a1, v51);
}
v22 = v14 & 0xFFFFFFFF00000000LL;
return v22 | (unsigned int)v14;
}
PropertyInternal2 = JS_GetPropertyInternal2(a1, *proxy_method, proxy_method[1], a4, a5, v14, 0LL, 0);
LODWORD(v14) = PropertyInternal2;
v22 = PropertyInternal2 & 0xFFFFFFFF00000000LL;
return v22 | (unsigned int)v14;
}
| js_proxy_get:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,R9
MOV R12,R8
MOV EBP,ECX
MOV RCX,RDX
MOV RDX,RSI
MOV R15,RDI
LEA RSI,[RSP + 0x8]
MOV R8D,0x42
CALL 0x0013e9d6
MOV EDX,0x6
TEST RAX,RAX
JZ 0x001512a6
MOV R13,RAX
MOV RBX,qword ptr [RSP + 0x10]
CMP EBX,0x3
JNZ 0x001512b0
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,R15
MOV ECX,EBP
MOV R8,R12
MOV R9,R14
PUSH 0x0
PUSH 0x0
CALL 0x0012384b
ADD RSP,0x10
MOV R14,RAX
MOV RCX,-0x100000000
AND RCX,RAX
JMP 0x00151376
LAB_001512a6:
XOR R14D,R14D
XOR ECX,ECX
JMP 0x00151376
LAB_001512b0:
MOV RDI,R15
MOV dword ptr [RSP + 0x4],EBP
MOV ESI,EBP
XOR EDX,EDX
CALL 0x00120eb3
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x001512f4
CMP EBX,-0x9
JC 0x0015136c
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0015136c
MOV RDX,RBX
LAB_001512ed:
CALL 0x001219cc
JMP 0x0015136c
LAB_001512f4:
MOVUPS XMM0,xmmword ptr [R13]
LEA R10,[RSP + 0x50]
MOVAPS xmmword ptr [R10],XMM0
MOV qword ptr [R10 + 0x10],RAX
MOV qword ptr [R10 + 0x18],RBP
MOV qword ptr [R10 + 0x20],R12
MOV qword ptr [R10 + 0x28],R14
MOV R14,RAX
MOV RSI,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [R13 + 0x10]
MOV R8,qword ptr [R13 + 0x18]
SUB RSP,0x8
MOV RDI,R15
MOV RDX,RBX
MOV R9D,0x3
PUSH R10
CALL 0x001234e7
MOV RSI,R14
ADD RSP,0x10
MOV R14,RAX
MOV R12,RDX
CMP EBP,-0x9
JC 0x00151363
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x00151363
MOV RDX,RBP
CALL 0x001219cc
LAB_00151363:
MOV EBX,R12D
CMP RBX,0x6
JNZ 0x0015138e
LAB_0015136c:
XOR R14D,R14D
LAB_0015136f:
XOR ECX,ECX
MOV EDX,0x6
LAB_00151376:
MOV EAX,R14D
OR RAX,RCX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015138e:
MOV RDX,qword ptr [R13]
LEA RSI,[RSP + 0x18]
MOV RDI,R15
MOV ECX,dword ptr [RSP + 0x4]
CALL 0x001243f9
TEST EAX,EAX
JS 0x00151424
JZ 0x0015147c
MOV EAX,dword ptr [RSP + 0x18]
TEST AL,0x13
JZ 0x0015144f
AND EAX,0x11
CMP EAX,0x10
JNZ 0x0015146f
CMP EBX,0x3
JZ 0x0015146f
MOV EAX,dword ptr [RSP + 0x38]
CMP EAX,0x3
JNZ 0x0015146f
LAB_001513db:
LEA RSI,[RSP + 0x18]
MOV RDI,R15
CALL 0x0013ee5b
CMP R12D,-0x9
JC 0x0015140b
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x0015140b
MOV RSI,R14
MOV RDX,R12
CALL 0x001219cc
LAB_0015140b:
LEA RSI,[0x1a30eb]
XOR R14D,R14D
MOV RDI,R15
XOR EAX,EAX
CALL 0x00122d8b
JMP 0x0015136f
LAB_00151424:
CMP R12D,-0x9
JC 0x0015136c
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x0015136c
MOV RSI,R14
MOV RDX,R12
JMP 0x001512ed
LAB_0015144f:
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV RDI,R15
MOV RCX,R14
MOV R8,R12
CALL 0x00126ae5
TEST EAX,EAX
JZ 0x001513db
LAB_0015146f:
LEA RSI,[RSP + 0x18]
MOV RDI,R15
CALL 0x0013ee5b
LAB_0015147c:
MOV RAX,-0x100000000
MOV RCX,R14
AND RCX,RAX
MOV RDX,R12
JMP 0x00151376
|
ulong js_proxy_get(long param_1,int8 param_2,int8 param_3,int4 param_4,
int8 param_5,int8 param_6)
{
int8 uVar1;
int iVar2;
int8 *puVar3;
int *piVar4;
int *piVar5;
ulong uVar6;
uint uVar7;
int1 auVar8 [16];
int1 auVar9 [16];
int *local_b0;
int8 local_a8;
uint local_a0 [2];
int8 local_98;
int8 local_90;
int local_80;
int4 local_68;
int4 uStack_64;
int4 uStack_60;
int4 uStack_5c;
int1 local_58 [16];
int8 local_48;
int8 local_40;
puVar3 = (int8 *)get_proxy_method(param_1,&local_b0,param_2,param_3,0x42);
if (puVar3 == (int8 *)0x0) {
piVar4 = (int *)0x0;
uVar6 = 0;
goto LAB_00151376;
}
if ((uint)local_a8 == 3) {
piVar4 = (int *)JS_GetPropertyInternal2(param_1,*puVar3,puVar3[1],param_4,param_5,param_6,0,0);
uVar6 = (ulong)piVar4 & 0xffffffff00000000;
goto LAB_00151376;
}
auVar8 = __JS_AtomToValue(param_1,param_4,0);
auVar9._8_8_ = local_a8;
auVar9._0_8_ = local_b0;
piVar5 = auVar8._0_8_;
if (auVar8._8_4_ == 6) {
if (0xfffffff6 < (uint)local_a8) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar2 = *local_b0;
*local_b0 = iVar2 + -1;
joined_r0x0015143e:
if (iVar2 < 2) {
js_free_value_rt(uVar1,auVar9._0_8_,auVar9._8_8_);
}
}
}
else {
local_68 = *(int4 *)puVar3;
uStack_64 = *(int4 *)((long)puVar3 + 4);
uStack_60 = *(int4 *)(puVar3 + 1);
uStack_5c = *(int4 *)((long)puVar3 + 0xc);
local_48 = param_5;
local_40 = param_6;
local_58 = auVar8;
auVar9 = JS_CallFree(param_1,local_b0,local_a8,puVar3[2],puVar3[3],3,&local_68);
uVar6 = auVar9._8_8_;
piVar4 = auVar9._0_8_;
if (0xfffffff6 < auVar8._8_4_) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar5;
*piVar5 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar1,piVar5,auVar8._8_8_);
}
}
uVar7 = auVar9._8_4_;
if ((uVar6 & 0xffffffff) != 6) {
iVar2 = JS_GetOwnPropertyInternal(param_1,local_a0,*puVar3,param_4);
if (iVar2 < 0) {
if (0xfffffff6 < uVar7) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar4;
*piVar4 = iVar2 + -1;
goto joined_r0x0015143e;
}
}
else {
if (iVar2 == 0) {
LAB_0015147c:
uVar6 = (ulong)piVar4 & 0xffffffff00000000;
goto LAB_00151376;
}
if ((local_a0[0] & 0x13) == 0) {
iVar2 = js_same_value(param_1,local_98,local_90,piVar4,uVar6);
if (iVar2 != 0) goto LAB_0015146f;
}
else if ((((local_a0[0] & 0x11) != 0x10) || (uVar7 == 3)) || (local_80 != 3)) {
LAB_0015146f:
js_free_desc(param_1,local_a0);
goto LAB_0015147c;
}
js_free_desc(param_1,local_a0);
if (0xfffffff6 < uVar7) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar4;
*piVar4 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar1,piVar4,uVar6);
}
}
JS_ThrowTypeError(param_1,"proxy: inconsistent get");
}
}
}
piVar4 = (int *)0x0;
uVar6 = 0;
LAB_00151376:
return (ulong)piVar4 & 0xffffffff | uVar6;
}
| |
37,417 | translog_file_init | eloqsql/storage/maria/ma_loghandler.c | static void translog_file_init(TRANSLOG_FILE *file, uint32 number,
my_bool is_sync)
{
pagecache_file_set_null_hooks(&file->handler);
file->handler.post_read_hook= translog_page_validator;
file->handler.flush_log_callback= maria_flush_log_for_page_none;
file->handler.callback_data= (uchar*)file;
file->number= number;
file->was_recovered= 0;
file->is_sync= is_sync;
} | O0 | c | translog_file_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x3fb50
movq -0x8(%rbp), %rax
leaq 0x6994(%rip), %rcx # 0x36920
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
leaq 0x116c5(%rip), %rcx # 0x41660
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x50(%rax)
movb -0xd(%rbp), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x51(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| translog_file_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_D], al
mov rdi, [rbp+var_8]
add rdi, 8
call pagecache_file_set_null_hooks
mov rax, [rbp+var_8]
lea rcx, translog_page_validator
mov [rax+28h], rcx
mov rax, [rbp+var_8]
lea rcx, maria_flush_log_for_page_none
mov [rax+40h], rcx
mov rcx, [rbp+var_8]
mov rax, [rbp+var_8]
mov [rax+48h], rcx
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax], ecx
mov rax, [rbp+var_8]
mov byte ptr [rax+50h], 0
mov cl, [rbp+var_D]
mov rax, [rbp+var_8]
mov [rax+51h], cl
add rsp, 10h
pop rbp
retn
| long long translog_file_init(long long a1, int a2, char a3)
{
long long result; // rax
pagecache_file_set_null_hooks(a1 + 8);
*(_QWORD *)(a1 + 40) = translog_page_validator;
*(_QWORD *)(a1 + 64) = maria_flush_log_for_page_none;
*(_QWORD *)(a1 + 72) = a1;
*(_DWORD *)a1 = a2;
*(_BYTE *)(a1 + 80) = 0;
result = a1;
*(_BYTE *)(a1 + 81) = a3;
return result;
}
| translog_file_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV AL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV byte ptr [RBP + -0xd],AL
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8
CALL 0x0013fb50
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x136920]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x141660]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x48],RCX
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x50],0x0
MOV CL,byte ptr [RBP + -0xd]
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x51],CL
ADD RSP,0x10
POP RBP
RET
|
void translog_file_init(int4 *param_1,int4 param_2,int1 param_3)
{
pagecache_file_set_null_hooks(param_1 + 2);
*(code **)(param_1 + 10) = translog_page_validator;
*(code **)(param_1 + 0x10) = maria_flush_log_for_page_none;
*(int4 **)(param_1 + 0x12) = param_1;
*param_1 = param_2;
*(int1 *)(param_1 + 0x14) = 0;
*(int1 *)((long)param_1 + 0x51) = param_3;
return;
}
| |
37,418 | get_options | eloqsql/libmariadb/unittest/libmariadb/my_test.h | void get_options(int argc, char **argv)
{
int c= 0;
while ((c=getopt(argc,argv, "h:u:p:d:w:P:S:t:?")) >= 0)
{
switch(c) {
case 'h':
hostname= optarg;
break;
case 'u':
username= optarg;
break;
case 'p':
password= optarg;
break;
case 'd':
schema= optarg;
break;
case 'P':
port= atoi(optarg);
ssl_port=port;
break;
case 'S':
socketname= optarg;
break;
case 't':
force_tls= 1;
break;
case '?':
usage();
exit(0);
break;
default:
usage();
BAIL_OUT("Unknown option %c\n", c);
}
}
} | O0 | c | get_options:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x5070f(%rip), %rdx # 0x65773
callq 0x14110
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jl 0x15159
movl -0x14(%rbp), %eax
addl $-0x3f, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x36, %eax
ja 0x1513e
movq -0x20(%rbp), %rax
leaq 0x4ff7b(%rip), %rcx # 0x65010
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x68f33(%rip), %rax # 0x7dfd8
movq (%rax), %rax
movq %rax, 0x6c251(%rip) # 0x81300
jmp 0x15154
movq 0x68f1d(%rip), %rax # 0x7dfd8
movq (%rax), %rax
movq %rax, 0x6c243(%rip) # 0x81308
jmp 0x15154
movq 0x68f07(%rip), %rax # 0x7dfd8
movq (%rax), %rax
movq %rax, 0x6c235(%rip) # 0x81310
jmp 0x15154
movq 0x68ef4(%rip), %rax # 0x7dfd8
movq (%rax), %rax
movq %rax, 0x6c22a(%rip) # 0x81318
jmp 0x15154
movq 0x68ee1(%rip), %rax # 0x7dfd8
movq (%rax), %rdi
callq 0x146c0
movl %eax, 0x6c21b(%rip) # 0x81320
movl 0x6c215(%rip), %eax # 0x81320
movl %eax, 0x6c213(%rip) # 0x81324
jmp 0x15154
movq 0x68ebe(%rip), %rax # 0x7dfd8
movq (%rax), %rax
movq %rax, 0x6c204(%rip) # 0x81328
jmp 0x15154
movl $0x1, 0x6c200(%rip) # 0x81330
jmp 0x15154
callq 0x2f9c0
xorl %edi, %edi
callq 0x14540
callq 0x2f9c0
movl -0x14(%rbp), %esi
leaq 0x50638(%rip), %rdi # 0x65785
movb $0x0, %al
callq 0x2fb70
jmp 0x15056
addq $0x20, %rsp
popq %rbp
retq
nop
| get_options:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], 0
loc_15056:
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
lea rdx, aHUPDWPST; "h:u:p:d:w:P:S:t:?"
call _getopt
mov [rbp+var_14], eax
cmp eax, 0
jl loc_15159
mov eax, [rbp+var_14]
add eax, 0FFFFFFC1h; switch 55 cases
mov ecx, eax
mov [rbp+var_20], rcx
sub eax, 36h
ja def_1509C; jumptable 000000000001509C default case, cases 64-79,81,82,84-99,101-103,105-111,113-115
mov rax, [rbp+var_20]
lea rcx, jpt_1509C
movsxd rax, ds:(jpt_1509C - 65010h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1509E:
mov rax, cs:optarg_ptr; jumptable 000000000001509C case 104
mov rax, [rax]
mov cs:hostname, rax
jmp loc_15154
loc_150B4:
mov rax, cs:optarg_ptr; jumptable 000000000001509C case 117
mov rax, [rax]
mov cs:username, rax
jmp loc_15154
loc_150CA:
mov rax, cs:optarg_ptr; jumptable 000000000001509C case 112
mov rax, [rax]
mov cs:password, rax
jmp short loc_15154
loc_150DD:
mov rax, cs:optarg_ptr; jumptable 000000000001509C case 100
mov rax, [rax]
mov cs:schema, rax
jmp short loc_15154
loc_150F0:
mov rax, cs:optarg_ptr; jumptable 000000000001509C case 80
mov rdi, [rax]
call _atoi
mov cs:port, eax
mov eax, cs:port
mov cs:ssl_port, eax
jmp short loc_15154
loc_15113:
mov rax, cs:optarg_ptr; jumptable 000000000001509C case 83
mov rax, [rax]
mov cs:socketname, rax
jmp short loc_15154
loc_15126:
mov cs:force_tls, 1; jumptable 000000000001509C case 116
jmp short loc_15154
loc_15132:
call usage; jumptable 000000000001509C case 63
xor edi, edi
call _exit
def_1509C:
call usage; jumptable 000000000001509C default case, cases 64-79,81,82,84-99,101-103,105-111,113-115
mov esi, [rbp+var_14]
lea rdi, aUnknownOptionC; "Unknown option %c\n"
mov al, 0
call BAIL_OUT
loc_15154:
jmp loc_15056
loc_15159:
add rsp, 20h
pop rbp
retn
| long long get_options(unsigned int a1, long long a2)
{
long long result; // rax
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
char v7; // [rsp+0h] [rbp-20h]
int v8; // [rsp+Ch] [rbp-14h]
while ( 1 )
{
result = getopt(a1, a2, "h:u:p:d:w:P:S:t:?");
v8 = result;
if ( (int)result < 0 )
break;
v7 = result - 63;
switch ( (int)result )
{
case '?':
usage(a1);
exit(0LL);
case 'P':
port = atoi(optarg);
ssl_port = port;
break;
case 'S':
socketname = optarg;
break;
case 'd':
schema = optarg;
break;
case 'h':
hostname = optarg;
break;
case 'p':
password = optarg;
break;
case 't':
force_tls = 1;
break;
case 'u':
username = optarg;
break;
default:
((void (*)(void))usage)();
BAIL_OUT((unsigned int)"Unknown option %c\n", v8, v3, v4, v5, v6, v7);
}
}
return result;
}
| get_options:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],0x0
LAB_00115056:
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[0x165773]
CALL 0x00114110
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JL 0x00115159
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,-0x3f
MOV ECX,EAX
MOV qword ptr [RBP + -0x20],RCX
SUB EAX,0x36
JA 0x0011513e
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x165010]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_68:
MOV RAX,qword ptr [0x0017dfd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00181300],RAX
JMP 0x00115154
caseD_75:
MOV RAX,qword ptr [0x0017dfd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00181308],RAX
JMP 0x00115154
caseD_70:
MOV RAX,qword ptr [0x0017dfd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00181310],RAX
JMP 0x00115154
caseD_64:
MOV RAX,qword ptr [0x0017dfd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00181318],RAX
JMP 0x00115154
caseD_50:
MOV RAX,qword ptr [0x0017dfd8]
MOV RDI,qword ptr [RAX]
CALL 0x001146c0
MOV dword ptr [0x00181320],EAX
MOV EAX,dword ptr [0x00181320]
MOV dword ptr [0x00181324],EAX
JMP 0x00115154
caseD_53:
MOV RAX,qword ptr [0x0017dfd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00181328],RAX
JMP 0x00115154
caseD_74:
MOV dword ptr [0x00181330],0x1
JMP 0x00115154
caseD_3f:
CALL 0x0012f9c0
XOR EDI,EDI
CALL 0x00114540
caseD_40:
CALL 0x0012f9c0
MOV ESI,dword ptr [RBP + -0x14]
LEA RDI,[0x165785]
MOV AL,0x0
CALL 0x0012fb70
LAB_00115154:
JMP 0x00115056
LAB_00115159:
ADD RSP,0x20
POP RBP
RET
|
void get_options(int param_1,char **param_2)
{
int iVar1;
while (iVar1 = getopt(param_1,param_2,"h:u:p:d:w:P:S:t:?"), -1 < iVar1) {
switch(iVar1) {
case 0x3f:
usage();
/* WARNING: Subroutine does not return */
exit(0);
default:
usage();
BAIL_OUT("Unknown option %c\n",iVar1);
break;
case 0x50:
port = atoi(*(char **)PTR_optarg_0017dfd8);
ssl_port = port;
break;
case 0x53:
socketname = *(int8 *)PTR_optarg_0017dfd8;
break;
case 100:
schema = *(int8 *)PTR_optarg_0017dfd8;
break;
case 0x68:
hostname = *(int8 *)PTR_optarg_0017dfd8;
break;
case 0x70:
password = *(int8 *)PTR_optarg_0017dfd8;
break;
case 0x74:
force_tls = 1;
break;
case 0x75:
username = *(int8 *)PTR_optarg_0017dfd8;
}
}
return;
}
| |
37,419 | get_options | eloqsql/libmariadb/unittest/libmariadb/my_test.h | void get_options(int argc, char **argv)
{
int c= 0;
while ((c=getopt(argc,argv, "h:u:p:d:w:P:S:t:?")) >= 0)
{
switch(c) {
case 'h':
hostname= optarg;
break;
case 'u':
username= optarg;
break;
case 'p':
password= optarg;
break;
case 'd':
schema= optarg;
break;
case 'P':
port= atoi(optarg);
ssl_port=port;
break;
case 'S':
socketname= optarg;
break;
case 't':
force_tls= 1;
break;
case '?':
usage();
exit(0);
break;
default:
usage();
BAIL_OUT("Unknown option %c\n", c);
}
}
} | O3 | c | get_options:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
leaq 0x3153f(%rip), %rdx # 0x463c3
callq 0x14110
testl %eax, %eax
js 0x14f68
movl %eax, %r12d
movq 0x4b12d(%rip), %r13 # 0x5ffc8
leaq 0x31521(%rip), %r15 # 0x463c3
cmpl $0x67, %r12d
jle 0x14ece
cmpl $0x73, %r12d
jg 0x14ef1
cmpl $0x68, %r12d
je 0x14f2b
cmpl $0x70, %r12d
jne 0x14f89
movq (%r13), %rax
movq %rax, 0x4df67(%rip) # 0x62e30
jmp 0x14f4f
cmpl $0x52, %r12d
jle 0x14f0e
cmpl $0x53, %r12d
je 0x14f44
cmpl $0x64, %r12d
jne 0x14f89
movq (%r13), %rax
movq %rax, 0x4df49(%rip) # 0x62e38
jmp 0x14f4f
cmpl $0x74, %r12d
je 0x14f38
cmpl $0x75, %r12d
jne 0x14f89
movq (%r13), %rax
movq %rax, 0x4df1c(%rip) # 0x62e28
jmp 0x14f4f
cmpl $0x50, %r12d
jne 0x14f77
movq (%r13), %rdi
callq 0x14710
movl %eax, 0x4df1d(%rip) # 0x62e40
movl %eax, 0x4df1b(%rip) # 0x62e44
jmp 0x14f4f
movq (%r13), %rax
movq %rax, 0x4deea(%rip) # 0x62e20
jmp 0x14f4f
movl $0x1, 0x4df0e(%rip) # 0x62e50
jmp 0x14f4f
movq (%r13), %rax
movq %rax, 0x4def9(%rip) # 0x62e48
movl %r14d, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x14110
movl %eax, %r12d
testl %eax, %eax
jns 0x14ea2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x3f, %r12d
jne 0x14f89
callq 0x26385
xorl %edi, %edi
callq 0x145a0
callq 0x26385
leaq 0x31440(%rip), %rdi # 0x463d5
movl %r12d, %esi
xorl %eax, %eax
callq 0x26438
| get_options:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14d, edi
lea rdx, aHUPDWPST; "h:u:p:d:w:P:S:t:?"
call _getopt
test eax, eax
js loc_14F68
mov r12d, eax
mov r13, cs:optarg_ptr
lea r15, aHUPDWPST; "h:u:p:d:w:P:S:t:?"
loc_14EA2:
cmp r12d, 67h ; 'g'
jle short loc_14ECE
cmp r12d, 73h ; 's'
jg short loc_14EF1
cmp r12d, 68h ; 'h'
jz short loc_14F2B
cmp r12d, 70h ; 'p'
jnz loc_14F89
mov rax, [r13+0]
mov cs:password, rax
jmp loc_14F4F
loc_14ECE:
cmp r12d, 52h ; 'R'
jle short loc_14F0E
cmp r12d, 53h ; 'S'
jz short loc_14F44
cmp r12d, 64h ; 'd'
jnz loc_14F89
mov rax, [r13+0]
mov cs:schema, rax
jmp short loc_14F4F
loc_14EF1:
cmp r12d, 74h ; 't'
jz short loc_14F38
cmp r12d, 75h ; 'u'
jnz loc_14F89
mov rax, [r13+0]
mov cs:username, rax
jmp short loc_14F4F
loc_14F0E:
cmp r12d, 50h ; 'P'
jnz short loc_14F77
mov rdi, [r13+0]
call _atoi
mov cs:port, eax
mov cs:ssl_port, eax
jmp short loc_14F4F
loc_14F2B:
mov rax, [r13+0]
mov cs:hostname, rax
jmp short loc_14F4F
loc_14F38:
mov cs:force_tls, 1
jmp short loc_14F4F
loc_14F44:
mov rax, [r13+0]
mov cs:socketname, rax
loc_14F4F:
mov edi, r14d
mov rsi, rbx
mov rdx, r15
call _getopt
mov r12d, eax
test eax, eax
jns loc_14EA2
loc_14F68:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_14F77:
cmp r12d, 3Fh ; '?'
jnz short loc_14F89
call usage
xor edi, edi
call _exit
loc_14F89:
call usage
lea rdi, aUnknownOptionC; "Unknown option %c\n"
mov esi, r12d
xor eax, eax
call BAIL_OUT
| long long get_options(long long a1, long long a2)
{
char v2; // al
long long result; // rax
int v4; // r12d
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
char v9; // [rsp-8h] [rbp-30h]
v9 = v2;
result = getopt(a1, a2, "h:u:p:d:w:P:S:t:?");
if ( (int)result >= 0 )
{
v4 = result;
do
{
if ( v4 <= 103 )
{
if ( v4 <= 82 )
{
if ( v4 != 80 )
{
if ( v4 == 63 )
{
usage();
exit(0LL);
}
LABEL_24:
usage();
BAIL_OUT((unsigned int)"Unknown option %c\n", v4, v5, v6, v7, v8, v9);
}
port = atoi(optarg);
ssl_port = port;
}
else if ( v4 == 83 )
{
socketname = optarg;
}
else
{
if ( v4 != 100 )
goto LABEL_24;
schema = optarg;
}
}
else if ( v4 > 115 )
{
if ( v4 == 116 )
{
force_tls = 1;
}
else
{
if ( v4 != 117 )
goto LABEL_24;
username = optarg;
}
}
else if ( v4 == 104 )
{
hostname = optarg;
}
else
{
if ( v4 != 112 )
goto LABEL_24;
password = optarg;
}
result = getopt((unsigned int)a1, a2, "h:u:p:d:w:P:S:t:?");
v4 = result;
}
while ( (int)result >= 0 );
}
return result;
}
| get_options:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14D,EDI
LEA RDX,[0x1463c3]
CALL 0x00114110
TEST EAX,EAX
JS 0x00114f68
MOV R12D,EAX
MOV R13,qword ptr [0x0015ffc8]
LEA R15,[0x1463c3]
LAB_00114ea2:
CMP R12D,0x67
JLE 0x00114ece
CMP R12D,0x73
JG 0x00114ef1
CMP R12D,0x68
JZ 0x00114f2b
CMP R12D,0x70
JNZ 0x00114f89
MOV RAX,qword ptr [R13]
MOV qword ptr [0x00162e30],RAX
JMP 0x00114f4f
LAB_00114ece:
CMP R12D,0x52
JLE 0x00114f0e
CMP R12D,0x53
JZ 0x00114f44
CMP R12D,0x64
JNZ 0x00114f89
MOV RAX,qword ptr [R13]
MOV qword ptr [0x00162e38],RAX
JMP 0x00114f4f
LAB_00114ef1:
CMP R12D,0x74
JZ 0x00114f38
CMP R12D,0x75
JNZ 0x00114f89
MOV RAX,qword ptr [R13]
MOV qword ptr [0x00162e28],RAX
JMP 0x00114f4f
LAB_00114f0e:
CMP R12D,0x50
JNZ 0x00114f77
MOV RDI,qword ptr [R13]
CALL 0x00114710
MOV dword ptr [0x00162e40],EAX
MOV dword ptr [0x00162e44],EAX
JMP 0x00114f4f
LAB_00114f2b:
MOV RAX,qword ptr [R13]
MOV qword ptr [0x00162e20],RAX
JMP 0x00114f4f
LAB_00114f38:
MOV dword ptr [0x00162e50],0x1
JMP 0x00114f4f
LAB_00114f44:
MOV RAX,qword ptr [R13]
MOV qword ptr [0x00162e48],RAX
LAB_00114f4f:
MOV EDI,R14D
MOV RSI,RBX
MOV RDX,R15
CALL 0x00114110
MOV R12D,EAX
TEST EAX,EAX
JNS 0x00114ea2
LAB_00114f68:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00114f77:
CMP R12D,0x3f
JNZ 0x00114f89
CALL 0x00126385
XOR EDI,EDI
CALL 0x001145a0
LAB_00114f89:
CALL 0x00126385
LEA RDI,[0x1463d5]
MOV ESI,R12D
XOR EAX,EAX
CALL 0x00126438
|
void get_options(int param_1,char **param_2)
{
int *puVar1;
int iVar2;
iVar2 = getopt(param_1,param_2,"h:u:p:d:w:P:S:t:?");
puVar1 = PTR_optarg_0015ffc8;
do {
if (iVar2 < 0) {
return;
}
if (iVar2 < 0x68) {
if (iVar2 < 0x53) {
if (iVar2 != 0x50) {
if (iVar2 == 0x3f) {
usage();
/* WARNING: Subroutine does not return */
exit(0);
}
LAB_00114f89:
usage();
/* WARNING: Subroutine does not return */
BAIL_OUT("Unknown option %c\n",iVar2);
}
port = atoi(*(char **)puVar1);
ssl_port = port;
}
else if (iVar2 == 0x53) {
socketname = *(int8 *)puVar1;
}
else {
if (iVar2 != 100) goto LAB_00114f89;
schema = *(int8 *)puVar1;
}
}
else if (iVar2 < 0x74) {
if (iVar2 == 0x68) {
hostname = *(int8 *)puVar1;
}
else {
if (iVar2 != 0x70) goto LAB_00114f89;
password = *(int8 *)puVar1;
}
}
else if (iVar2 == 0x74) {
force_tls = 1;
}
else {
if (iVar2 != 0x75) goto LAB_00114f89;
username = *(int8 *)puVar1;
}
iVar2 = getopt(param_1,param_2,"h:u:p:d:w:P:S:t:?");
} while( true );
}
| |
37,420 | inline_mysql_cond_signal | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_signal(
mysql_cond_t *that)
{
int result;
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
PSI_COND_CALL(signal_cond)(that->m_psi);
#endif
result= pthread_cond_signal(&that->m_cond);
return result;
} | O0 | c | inline_mysql_cond_signal:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5aa1b
leaq 0x1b9909(%rip), %rax # 0x214310
movq (%rax), %rax
movq 0x170(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x26030
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
| inline_mysql_cond_signal:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_5AA1B
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+170h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
loc_5AA1B:
mov rdi, [rbp+var_8]
call _pthread_cond_signal
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
| long long inline_mysql_cond_signal(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
((void ( *)(_QWORD))PSI_server[46])(*(_QWORD *)(a1 + 48));
return (unsigned int)pthread_cond_signal(a1);
}
| inline_mysql_cond_signal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],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 0x0015aa1b
LEA RAX,[0x314310]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x170]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
LAB_0015aa1b:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00126030
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int inline_mysql_cond_signal(pthread_cond_t *param_1)
{
int iVar1;
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x170))(param_1[1].__align);
}
iVar1 = pthread_cond_signal(param_1);
return iVar1;
}
| |
37,421 | minja::IfTemplateToken::~IfTemplateToken() | monkey531[P]llama/common/minja.hpp | IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {} | O1 | cpp | minja::IfTemplateToken::~IfTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x7070f(%rip), %rax # 0xedcb0
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x7d5b6
callq 0x42d00
leaq 0x6feab(%rip), %rax # 0xed468
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x7d5d3
popq %rbx
jmp 0x42d00
popq %rbx
retq
nop
| _ZN5minja15IfTemplateTokenD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_7D5B6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7D5B6:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_7D5D3
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7D5D3:
pop rbx
retn
| void minja::IfTemplateToken::~IfTemplateToken(minja::IfTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::IfTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
| ~IfTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1edcb0]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x0017d5b6
CALL 0x00142d00
LAB_0017d5b6:
LEA RAX,[0x1ed468]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0017d5d3
POP RBX
JMP 0x00142d00
LAB_0017d5d3:
POP RBX
RET
|
/* minja::IfTemplateToken::~IfTemplateToken() */
void __thiscall minja::IfTemplateToken::~IfTemplateToken(IfTemplateToken *this)
{
*(int ***)this = &PTR__IfTemplateToken_001edcc0;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_001ed478;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
return;
}
return;
}
| |
37,422 | minja::IfTemplateToken::~IfTemplateToken() | monkey531[P]llama/common/minja.hpp | IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {} | O3 | cpp | minja::IfTemplateToken::~IfTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x6f5ab(%rip), %rax # 0xeacb0
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x7b71a
callq 0x4200c
leaq 0x6ed47(%rip), %rax # 0xea468
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x7b736
callq 0x4200c
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x196b0
| _ZN5minja15IfTemplateTokenD0Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_7B71A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7B71A:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_7B736
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7B736:
mov esi, 40h ; '@'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void minja::IfTemplateToken::~IfTemplateToken(minja::IfTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::IfTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
operator delete(this, 0x40uLL);
}
| ~IfTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1eacb0]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x0017b71a
CALL 0x0014200c
LAB_0017b71a:
LEA RAX,[0x1ea468]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0017b736
CALL 0x0014200c
LAB_0017b736:
MOV ESI,0x40
MOV RDI,RBX
POP RBX
JMP 0x001196b0
|
/* minja::IfTemplateToken::~IfTemplateToken() */
void __thiscall minja::IfTemplateToken::~IfTemplateToken(IfTemplateToken *this)
{
*(int ***)this = &PTR__IfTemplateToken_001eacc0;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_001ea478;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
}
operator_delete(this,0x40);
return;
}
| |
37,423 | skip_dead_code | bluesky950520[P]quickjs/quickjs.c | static int skip_dead_code(JSFunctionDef *s, const uint8_t *bc_buf, int bc_len,
int pos, int *linep, int *colp)
{
int op, len, label;
for (; pos < bc_len; pos += len) {
op = bc_buf[pos];
len = opcode_info[op].size;
if (op == OP_source_loc) {
*linep = get_u32(bc_buf + pos + 1);
*colp = get_u32(bc_buf + pos + 5);
} else if (op == OP_label) {
label = get_u32(bc_buf + pos + 1);
if (update_label(s, label, 0) > 0)
break;
assert(s->label_slots[label].first_reloc == NULL);
} else {
/* XXX: output a warning for unreachable code? */
JSAtom atom;
switch(opcode_info[op].fmt) {
case OP_FMT_label:
case OP_FMT_label_u16:
label = get_u32(bc_buf + pos + 1);
update_label(s, label, -1);
break;
case OP_FMT_atom_label_u8:
case OP_FMT_atom_label_u16:
label = get_u32(bc_buf + pos + 5);
update_label(s, label, -1);
/* fall thru */
case OP_FMT_atom:
case OP_FMT_atom_u8:
case OP_FMT_atom_u16:
atom = get_u32(bc_buf + pos + 1);
JS_FreeAtom(s->ctx, atom);
break;
default:
break;
}
}
}
return pos;
} | O0 | c | skip_dead_code:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movl %ecx, 0x30(%rsp)
movq %r8, 0x28(%rsp)
movq %r9, 0x20(%rsp)
movl 0x30(%rsp), %eax
cmpl 0x34(%rsp), %eax
jge 0xc18bd
movq 0x38(%rsp), %rax
movslq 0x30(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, 0x1c(%rsp)
movslq 0x1c(%rsp), %rcx
leaq 0x51d14(%rip), %rax # 0x113450
movzbl (%rax,%rcx,4), %eax
movl %eax, 0x18(%rsp)
cmpl $0xc4, 0x1c(%rsp)
jne 0xc1791
movq 0x38(%rsp), %rdi
movslq 0x30(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x654a0
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
movq 0x38(%rsp), %rdi
movslq 0x30(%rsp), %rax
addq %rax, %rdi
addq $0x5, %rdi
callq 0x654a0
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
jmp 0xc18aa
cmpl $0xb5, 0x1c(%rsp)
jne 0xc17d4
movq 0x38(%rsp), %rdi
movslq 0x30(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x654a0
movl %eax, 0x14(%rsp)
movq 0x40(%rsp), %rdi
movl 0x14(%rsp), %esi
xorl %edx, %edx
callq 0xb7340
cmpl $0x0, %eax
jle 0xc17cf
jmp 0xc18bd
jmp 0xc18a8
movslq 0x1c(%rsp), %rcx
leaq 0x51c70(%rip), %rax # 0x113450
movzbl 0x3(%rax,%rcx,4), %eax
movl %eax, 0xc(%rsp)
subl $0x17, %eax
je 0xc181b
jmp 0xc17f0
movl 0xc(%rsp), %eax
addl $-0x18, %eax
subl $0x3, %eax
jb 0xc1877
jmp 0xc17fe
movl 0xc(%rsp), %eax
addl $-0x1b, %eax
subl $0x2, %eax
jb 0xc184a
jmp 0xc180c
movl 0xc(%rsp), %eax
subl $0x1d, %eax
jne 0xc18a4
jmp 0xc181b
movq 0x38(%rsp), %rdi
movslq 0x30(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x654a0
movl %eax, 0x14(%rsp)
movq 0x40(%rsp), %rdi
movl 0x14(%rsp), %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0xb7340
jmp 0xc18a6
movq 0x38(%rsp), %rdi
movslq 0x30(%rsp), %rax
addq %rax, %rdi
addq $0x5, %rdi
callq 0x654a0
movl %eax, 0x14(%rsp)
movq 0x40(%rsp), %rdi
movl 0x14(%rsp), %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0xb7340
movq 0x38(%rsp), %rdi
movslq 0x30(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x654a0
movl %eax, 0x10(%rsp)
movq 0x40(%rsp), %rax
movq (%rax), %rdi
movl 0x10(%rsp), %esi
callq 0x2f330
jmp 0xc18a6
jmp 0xc18a6
jmp 0xc18a8
jmp 0xc18aa
jmp 0xc18ac
movl 0x18(%rsp), %eax
addl 0x30(%rsp), %eax
movl %eax, 0x30(%rsp)
jmp 0xc1710
movl 0x30(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
| skip_dead_code:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_14], edx
mov [rsp+48h+var_18], ecx
mov [rsp+48h+var_20], r8
mov [rsp+48h+var_28], r9
loc_C1710:
mov eax, [rsp+48h+var_18]
cmp eax, [rsp+48h+var_14]
jge loc_C18BD
mov rax, [rsp+48h+var_10]
movsxd rcx, [rsp+48h+var_18]
movzx eax, byte ptr [rax+rcx]
mov [rsp+48h+var_2C], eax
movsxd rcx, [rsp+48h+var_2C]
lea rax, opcode_info
movzx eax, byte ptr [rax+rcx*4]
mov [rsp+48h+var_30], eax
cmp [rsp+48h+var_2C], 0C4h
jnz short loc_C1791
mov rdi, [rsp+48h+var_10]
movsxd rax, [rsp+48h+var_18]
add rdi, rax
add rdi, 1
call get_u32
mov ecx, eax
mov rax, [rsp+48h+var_20]
mov [rax], ecx
mov rdi, [rsp+48h+var_10]
movsxd rax, [rsp+48h+var_18]
add rdi, rax
add rdi, 5
call get_u32
mov ecx, eax
mov rax, [rsp+48h+var_28]
mov [rax], ecx
jmp loc_C18AA
loc_C1791:
cmp [rsp+48h+var_2C], 0B5h
jnz short loc_C17D4
mov rdi, [rsp+48h+var_10]
movsxd rax, [rsp+48h+var_18]
add rdi, rax
add rdi, 1
call get_u32
mov [rsp+48h+var_34], eax
mov rdi, [rsp+48h+var_8]
mov esi, [rsp+48h+var_34]
xor edx, edx
call update_label
cmp eax, 0
jle short loc_C17CF
jmp loc_C18BD
loc_C17CF:
jmp loc_C18A8
loc_C17D4:
movsxd rcx, [rsp+48h+var_2C]
lea rax, opcode_info
movzx eax, byte ptr [rax+rcx*4+3]
mov [rsp+48h+var_3C], eax
sub eax, 17h
jz short loc_C181B
jmp short $+2
loc_C17F0:
mov eax, [rsp+48h+var_3C]
add eax, 0FFFFFFE8h
sub eax, 3
jb short loc_C1877
jmp short $+2
loc_C17FE:
mov eax, [rsp+48h+var_3C]
add eax, 0FFFFFFE5h
sub eax, 2
jb short loc_C184A
jmp short $+2
loc_C180C:
mov eax, [rsp+48h+var_3C]
sub eax, 1Dh
jnz loc_C18A4
jmp short $+2
loc_C181B:
mov rdi, [rsp+48h+var_10]
movsxd rax, [rsp+48h+var_18]
add rdi, rax
add rdi, 1
call get_u32
mov [rsp+48h+var_34], eax
mov rdi, [rsp+48h+var_8]
mov esi, [rsp+48h+var_34]
mov edx, 0FFFFFFFFh
call update_label
jmp short loc_C18A6
loc_C184A:
mov rdi, [rsp+48h+var_10]
movsxd rax, [rsp+48h+var_18]
add rdi, rax
add rdi, 5
call get_u32
mov [rsp+48h+var_34], eax
mov rdi, [rsp+48h+var_8]
mov esi, [rsp+48h+var_34]
mov edx, 0FFFFFFFFh
call update_label
loc_C1877:
mov rdi, [rsp+48h+var_10]
movsxd rax, [rsp+48h+var_18]
add rdi, rax
add rdi, 1
call get_u32
mov [rsp+48h+var_38], eax
mov rax, [rsp+48h+var_8]
mov rdi, [rax]
mov esi, [rsp+48h+var_38]
call JS_FreeAtom
jmp short loc_C18A6
loc_C18A4:
jmp short $+2
loc_C18A6:
jmp short $+2
loc_C18A8:
jmp short $+2
loc_C18AA:
jmp short $+2
loc_C18AC:
mov eax, [rsp+48h+var_30]
add eax, [rsp+48h+var_18]
mov [rsp+48h+var_18], eax
jmp loc_C1710
loc_C18BD:
mov eax, [rsp+48h+var_18]
add rsp, 48h
retn
| long long skip_dead_code(long long *a1, long long a2, int a3, unsigned int a4, _DWORD *a5, _DWORD *a6)
{
unsigned int v6; // eax
int v8; // [rsp+Ch] [rbp-3Ch]
int u32; // [rsp+14h] [rbp-34h]
int v10; // [rsp+14h] [rbp-34h]
int v11; // [rsp+14h] [rbp-34h]
int v12; // [rsp+18h] [rbp-30h]
int v13; // [rsp+1Ch] [rbp-2Ch]
while ( (int)a4 < a3 )
{
v13 = *(unsigned __int8 *)(a2 + (int)a4);
v12 = opcode_info[4 * *(unsigned __int8 *)(a2 + (int)a4)];
if ( v13 == 196 )
{
*a5 = get_u32((unsigned int *)((int)a4 + a2 + 1));
*a6 = get_u32((unsigned int *)((int)a4 + a2 + 5));
goto LABEL_14;
}
if ( v13 == 181 )
{
u32 = get_u32((unsigned int *)((int)a4 + a2 + 1));
if ( (int)update_label((long long)a1, u32, 0) > 0 )
return a4;
}
else
{
v8 = opcode_info[4 * *(unsigned __int8 *)(a2 + (int)a4) + 3];
if ( v8 == 23 )
goto LABEL_11;
if ( (unsigned int)(v8 - 24) >= 3 )
{
if ( (unsigned int)(v8 - 27) >= 2 )
{
if ( v8 != 29 )
goto LABEL_14;
LABEL_11:
v10 = get_u32((unsigned int *)((int)a4 + a2 + 1));
update_label((long long)a1, v10, -1);
goto LABEL_14;
}
v11 = get_u32((unsigned int *)((int)a4 + a2 + 5));
update_label((long long)a1, v11, -1);
}
v6 = get_u32((unsigned int *)((int)a4 + a2 + 1));
JS_FreeAtom(*a1, v6);
}
LABEL_14:
a4 += v12;
}
return a4;
}
| skip_dead_code:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV dword ptr [RSP + 0x34],EDX
MOV dword ptr [RSP + 0x30],ECX
MOV qword ptr [RSP + 0x28],R8
MOV qword ptr [RSP + 0x20],R9
LAB_001c1710:
MOV EAX,dword ptr [RSP + 0x30]
CMP EAX,dword ptr [RSP + 0x34]
JGE 0x001c18bd
MOV RAX,qword ptr [RSP + 0x38]
MOVSXD RCX,dword ptr [RSP + 0x30]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RSP + 0x1c],EAX
MOVSXD RCX,dword ptr [RSP + 0x1c]
LEA RAX,[0x213450]
MOVZX EAX,byte ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x18],EAX
CMP dword ptr [RSP + 0x1c],0xc4
JNZ 0x001c1791
MOV RDI,qword ptr [RSP + 0x38]
MOVSXD RAX,dword ptr [RSP + 0x30]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x001654a0
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x28]
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RSP + 0x38]
MOVSXD RAX,dword ptr [RSP + 0x30]
ADD RDI,RAX
ADD RDI,0x5
CALL 0x001654a0
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RAX],ECX
JMP 0x001c18aa
LAB_001c1791:
CMP dword ptr [RSP + 0x1c],0xb5
JNZ 0x001c17d4
MOV RDI,qword ptr [RSP + 0x38]
MOVSXD RAX,dword ptr [RSP + 0x30]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x001654a0
MOV dword ptr [RSP + 0x14],EAX
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,dword ptr [RSP + 0x14]
XOR EDX,EDX
CALL 0x001b7340
CMP EAX,0x0
JLE 0x001c17cf
JMP 0x001c18bd
LAB_001c17cf:
JMP 0x001c18a8
LAB_001c17d4:
MOVSXD RCX,dword ptr [RSP + 0x1c]
LEA RAX,[0x213450]
MOVZX EAX,byte ptr [RAX + RCX*0x4 + 0x3]
MOV dword ptr [RSP + 0xc],EAX
SUB EAX,0x17
JZ 0x001c181b
JMP 0x001c17f0
LAB_001c17f0:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,-0x18
SUB EAX,0x3
JC 0x001c1877
JMP 0x001c17fe
LAB_001c17fe:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,-0x1b
SUB EAX,0x2
JC 0x001c184a
JMP 0x001c180c
LAB_001c180c:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x1d
JNZ 0x001c18a4
JMP 0x001c181b
LAB_001c181b:
MOV RDI,qword ptr [RSP + 0x38]
MOVSXD RAX,dword ptr [RSP + 0x30]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x001654a0
MOV dword ptr [RSP + 0x14],EAX
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,dword ptr [RSP + 0x14]
MOV EDX,0xffffffff
CALL 0x001b7340
JMP 0x001c18a6
LAB_001c184a:
MOV RDI,qword ptr [RSP + 0x38]
MOVSXD RAX,dword ptr [RSP + 0x30]
ADD RDI,RAX
ADD RDI,0x5
CALL 0x001654a0
MOV dword ptr [RSP + 0x14],EAX
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,dword ptr [RSP + 0x14]
MOV EDX,0xffffffff
CALL 0x001b7340
LAB_001c1877:
MOV RDI,qword ptr [RSP + 0x38]
MOVSXD RAX,dword ptr [RSP + 0x30]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x001654a0
MOV dword ptr [RSP + 0x10],EAX
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,qword ptr [RAX]
MOV ESI,dword ptr [RSP + 0x10]
CALL 0x0012f330
JMP 0x001c18a6
LAB_001c18a4:
JMP 0x001c18a6
LAB_001c18a6:
JMP 0x001c18a8
LAB_001c18a8:
JMP 0x001c18aa
LAB_001c18aa:
JMP 0x001c18ac
LAB_001c18ac:
MOV EAX,dword ptr [RSP + 0x18]
ADD EAX,dword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x30],EAX
JMP 0x001c1710
LAB_001c18bd:
MOV EAX,dword ptr [RSP + 0x30]
ADD RSP,0x48
RET
|
int skip_dead_code(int8 *param_1,long param_2,int param_3,int param_4,int4 *param_5,
int4 *param_6)
{
byte bVar1;
uint uVar2;
int4 uVar3;
int iVar4;
int local_18;
local_18 = param_4;
do {
if (param_3 <= local_18) {
return local_18;
}
uVar2 = (uint)*(byte *)(param_2 + local_18);
bVar1 = opcode_info[(long)(int)uVar2 * 4];
if (uVar2 == 0xc4) {
uVar3 = get_u32(param_2 + local_18 + 1);
*param_5 = uVar3;
uVar3 = get_u32(param_2 + local_18 + 5);
*param_6 = uVar3;
}
else if (uVar2 == 0xb5) {
uVar3 = get_u32(param_2 + local_18 + 1);
iVar4 = update_label(param_1,uVar3,0);
if (0 < iVar4) {
return local_18;
}
}
else {
uVar2 = (uint)(byte)opcode_info[(long)(int)uVar2 * 4 + 3];
if (uVar2 == 0x17) {
LAB_001c181b:
uVar3 = get_u32(param_2 + local_18 + 1);
update_label(param_1,uVar3,0xffffffff);
}
else {
if (2 < uVar2 - 0x18) {
if (1 < uVar2 - 0x1b) {
if (uVar2 != 0x1d) goto LAB_001c18ac;
goto LAB_001c181b;
}
uVar3 = get_u32(param_2 + local_18 + 5);
update_label(param_1,uVar3,0xffffffff);
}
uVar3 = get_u32(param_2 + local_18 + 1);
JS_FreeAtom(*param_1,uVar3);
}
}
LAB_001c18ac:
local_18 = (uint)bVar1 + local_18;
} while( true );
}
| |
37,424 | skip_dead_code | bluesky950520[P]quickjs/quickjs.c | static int skip_dead_code(JSFunctionDef *s, const uint8_t *bc_buf, int bc_len,
int pos, int *linep, int *colp)
{
int op, len, label;
for (; pos < bc_len; pos += len) {
op = bc_buf[pos];
len = opcode_info[op].size;
if (op == OP_source_loc) {
*linep = get_u32(bc_buf + pos + 1);
*colp = get_u32(bc_buf + pos + 5);
} else if (op == OP_label) {
label = get_u32(bc_buf + pos + 1);
if (update_label(s, label, 0) > 0)
break;
assert(s->label_slots[label].first_reloc == NULL);
} else {
/* XXX: output a warning for unreachable code? */
JSAtom atom;
switch(opcode_info[op].fmt) {
case OP_FMT_label:
case OP_FMT_label_u16:
label = get_u32(bc_buf + pos + 1);
update_label(s, label, -1);
break;
case OP_FMT_atom_label_u8:
case OP_FMT_atom_label_u16:
label = get_u32(bc_buf + pos + 5);
update_label(s, label, -1);
/* fall thru */
case OP_FMT_atom:
case OP_FMT_atom_u8:
case OP_FMT_atom_u16:
atom = get_u32(bc_buf + pos + 1);
JS_FreeAtom(s->ctx, atom);
break;
default:
break;
}
}
}
return pos;
} | O2 | c | skip_dead_code:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x8(%rsp)
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r13
leaq 0x272ca(%rip), %rbx # 0x88350
cmpl %r15d, %ebp
jge 0x61144
movslq %ebp, %rax
movzbl (%r12,%rax), %ecx
movzbl (%rbx,%rcx,4), %r14d
cmpl $0xb5, %ecx
je 0x610c6
cmpl $0xc4, %ecx
jne 0x610de
movl 0x1(%r12,%rax), %ecx
movq 0x8(%rsp), %rdx
movl %ecx, (%rdx)
movl 0x5(%r12,%rax), %eax
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
jmp 0x6113c
movslq 0x1(%r12,%rax), %rax
movq 0x170(%r13), %rcx
imulq $0x18, %rax, %rax
cmpl $0x0, (%rcx,%rax)
jle 0x6113c
jmp 0x61144
movzbl 0x3(%rbx,%rcx,4), %ecx
cmpl $0x1d, %ecx
ja 0x6113c
movl $0x7000000, %edx # imm = 0x7000000
btl %ecx, %edx
jb 0x6112e
movl $0x18000000, %edx # imm = 0x18000000
btl %ecx, %edx
jb 0x6111b
movl $0x20800000, %edx # imm = 0x20800000
btl %ecx, %edx
jae 0x6113c
movslq 0x1(%r12,%rax), %rax
movq 0x170(%r13), %rcx
imulq $0x18, %rax, %rax
decl (%rcx,%rax)
jmp 0x6113c
movslq 0x5(%r12,%rax), %rcx
movq 0x170(%r13), %rdx
imulq $0x18, %rcx, %rcx
decl (%rdx,%rcx)
movl 0x1(%r12,%rax), %esi
movq (%r13), %rdi
callq 0x1e545
addl %r14d, %ebp
jmp 0x61086
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| skip_dead_code:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_38], r9
mov [rsp+48h+var_40], r8
mov ebp, ecx
mov r15d, edx
mov r12, rsi
mov r13, rdi
lea rbx, opcode_info
loc_61086:
cmp ebp, r15d
jge loc_61144
movsxd rax, ebp
movzx ecx, byte ptr [r12+rax]
movzx r14d, byte ptr [rbx+rcx*4]
cmp ecx, 0B5h
jz short loc_610C6
cmp ecx, 0C4h
jnz short loc_610DE
mov ecx, [r12+rax+1]
mov rdx, [rsp+48h+var_40]
mov [rdx], ecx
mov eax, [r12+rax+5]
mov rcx, [rsp+48h+var_38]
mov [rcx], eax
jmp short loc_6113C
loc_610C6:
movsxd rax, dword ptr [r12+rax+1]
mov rcx, [r13+170h]
imul rax, 18h
cmp dword ptr [rcx+rax], 0
jle short loc_6113C
jmp short loc_61144
loc_610DE:
movzx ecx, byte ptr [rbx+rcx*4+3]
cmp ecx, 1Dh
ja short loc_6113C
mov edx, 7000000h
bt edx, ecx
jb short loc_6112E
mov edx, 18000000h
bt edx, ecx
jb short loc_6111B
mov edx, 20800000h
bt edx, ecx
jnb short loc_6113C
movsxd rax, dword ptr [r12+rax+1]
mov rcx, [r13+170h]
imul rax, 18h
dec dword ptr [rcx+rax]
jmp short loc_6113C
loc_6111B:
movsxd rcx, dword ptr [r12+rax+5]
mov rdx, [r13+170h]
imul rcx, 18h
dec dword ptr [rdx+rcx]
loc_6112E:
mov esi, [r12+rax+1]
mov rdi, [r13+0]
call JS_FreeAtom
loc_6113C:
add ebp, r14d
jmp loc_61086
loc_61144:
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long skip_dead_code(long long *a1, long long a2, int a3, unsigned int a4, _DWORD *a5, _DWORD *a6)
{
long long v8; // rcx
int v9; // r14d
unsigned int v10; // ecx
int v11; // edx
int v12; // edx
int v13; // edx
long long v14; // rax
long long v15; // rcx
while ( (int)a4 < a3 )
{
v8 = *(unsigned __int8 *)(a2 + (int)a4);
v9 = opcode_info[4 * v8];
if ( (_DWORD)v8 == 181 )
{
if ( *(int *)(a1[46] + 24LL * *(int *)(a2 + (int)a4 + 1)) > 0 )
return a4;
}
else
{
if ( (_DWORD)v8 == 196 )
{
*a5 = *(_DWORD *)(a2 + (int)a4 + 1);
*a6 = *(_DWORD *)(a2 + (int)a4 + 5);
goto LABEL_14;
}
v10 = opcode_info[4 * v8 + 3];
if ( v10 <= 0x1D )
{
v11 = 117440512;
if ( _bittest(&v11, v10) )
goto LABEL_13;
v12 = 402653184;
if ( _bittest(&v12, v10) )
{
v15 = 24LL * *(int *)(a2 + (int)a4 + 5);
--*(_DWORD *)(a1[46] + v15);
LABEL_13:
JS_FreeAtom(*a1, *(_DWORD *)(a2 + (int)a4 + 1));
goto LABEL_14;
}
v13 = 545259520;
if ( _bittest(&v13, v10) )
{
v14 = 24LL * *(int *)(a2 + (int)a4 + 1);
--*(_DWORD *)(a1[46] + v14);
}
}
}
LABEL_14:
a4 += v9;
}
return a4;
}
| skip_dead_code:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],R9
MOV qword ptr [RSP + 0x8],R8
MOV EBP,ECX
MOV R15D,EDX
MOV R12,RSI
MOV R13,RDI
LEA RBX,[0x188350]
LAB_00161086:
CMP EBP,R15D
JGE 0x00161144
MOVSXD RAX,EBP
MOVZX ECX,byte ptr [R12 + RAX*0x1]
MOVZX R14D,byte ptr [RBX + RCX*0x4]
CMP ECX,0xb5
JZ 0x001610c6
CMP ECX,0xc4
JNZ 0x001610de
MOV ECX,dword ptr [R12 + RAX*0x1 + 0x1]
MOV RDX,qword ptr [RSP + 0x8]
MOV dword ptr [RDX],ECX
MOV EAX,dword ptr [R12 + RAX*0x1 + 0x5]
MOV RCX,qword ptr [RSP + 0x10]
MOV dword ptr [RCX],EAX
JMP 0x0016113c
LAB_001610c6:
MOVSXD RAX,dword ptr [R12 + RAX*0x1 + 0x1]
MOV RCX,qword ptr [R13 + 0x170]
IMUL RAX,RAX,0x18
CMP dword ptr [RCX + RAX*0x1],0x0
JLE 0x0016113c
JMP 0x00161144
LAB_001610de:
MOVZX ECX,byte ptr [RBX + RCX*0x4 + 0x3]
CMP ECX,0x1d
JA 0x0016113c
MOV EDX,0x7000000
BT EDX,ECX
JC 0x0016112e
MOV EDX,0x18000000
BT EDX,ECX
JC 0x0016111b
MOV EDX,0x20800000
BT EDX,ECX
JNC 0x0016113c
MOVSXD RAX,dword ptr [R12 + RAX*0x1 + 0x1]
MOV RCX,qword ptr [R13 + 0x170]
IMUL RAX,RAX,0x18
DEC dword ptr [RCX + RAX*0x1]
JMP 0x0016113c
LAB_0016111b:
MOVSXD RCX,dword ptr [R12 + RAX*0x1 + 0x5]
MOV RDX,qword ptr [R13 + 0x170]
IMUL RCX,RCX,0x18
DEC dword ptr [RDX + RCX*0x1]
LAB_0016112e:
MOV ESI,dword ptr [R12 + RAX*0x1 + 0x1]
MOV RDI,qword ptr [R13]
CALL 0x0011e545
LAB_0016113c:
ADD EBP,R14D
JMP 0x00161086
LAB_00161144:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int skip_dead_code(int8 *param_1,long param_2,int param_3,int param_4,int4 *param_5,
int4 *param_6)
{
int *piVar1;
byte bVar2;
byte bVar3;
long lVar4;
do {
if (param_3 <= param_4) {
return param_4;
}
lVar4 = (long)param_4;
bVar2 = *(byte *)(param_2 + lVar4);
bVar3 = opcode_info[(ulong)bVar2 * 4];
if (bVar2 == 0xb5) {
if (0 < *(int *)(param_1[0x2e] + (long)*(int *)(param_2 + 1 + lVar4) * 0x18)) {
return param_4;
}
}
else if (bVar2 == 0xc4) {
*param_5 = *(int4 *)(param_2 + 1 + lVar4);
*param_6 = *(int4 *)(param_2 + 5 + lVar4);
}
else {
bVar2 = opcode_info[(ulong)bVar2 * 4 + 3];
if (bVar2 < 0x1e) {
if ((0x7000000U >> (bVar2 & 0x1f) & 1) == 0) {
if ((0x18000000U >> (bVar2 & 0x1f) & 1) == 0) {
if ((0x20800000U >> (bVar2 & 0x1f) & 1) != 0) {
piVar1 = (int *)(param_1[0x2e] + (long)*(int *)(param_2 + 1 + lVar4) * 0x18);
*piVar1 = *piVar1 + -1;
}
goto LAB_0016113c;
}
piVar1 = (int *)(param_1[0x2e] + (long)*(int *)(param_2 + 5 + lVar4) * 0x18);
*piVar1 = *piVar1 + -1;
}
JS_FreeAtom(*param_1,*(int4 *)(param_2 + 1 + lVar4));
}
}
LAB_0016113c:
param_4 = param_4 + (uint)bVar3;
} while( true );
}
| |
37,425 | my_hash_sort_ucs2_bin | eloqsql/strings/ctype-ucs2.c | static void
my_hash_sort_ucs2_bin(CHARSET_INFO *cs,
const uchar *key, size_t len, ulong *nr1, ulong *nr2)
{
size_t lengthsp= my_lengthsp_mb2(cs, (const char *) key, len);
my_hash_sort_ucs2_nopad_bin(cs, key, lengthsp, nr1, nr2);
} | O3 | c | my_hash_sort_ucs2_bin:
movq %rdx, %rax
cmpq $0x2, %rdx
jl 0x4c299
cmpb $0x20, -0x1(%rsi,%rax)
jne 0x4c291
leaq -0x2(%rax), %rdx
cmpb $0x0, -0x2(%rsi,%rax)
je 0x4c276
movq (%rcx), %rdx
movq (%r8), %rdi
jmp 0x4c2a5
movq (%rcx), %rdx
movq (%r8), %rdi
cmpq $0x1, %rax
jne 0x4c2d8
pushq %rbp
movq %rsp, %rbp
addq %rsi, %rax
movl %edx, %r9d
andl $0x3f, %r9d
addq %rdi, %r9
movzbl (%rsi), %r10d
imulq %r9, %r10
movq %rdx, %r9
shlq $0x8, %r9
addq %r10, %r9
xorq %r9, %rdx
addq $0x3, %rdi
incq %rsi
cmpq %rax, %rsi
jb 0x4c2ac
popq %rbp
movq %rdx, (%rcx)
movq %rdi, (%r8)
retq
| my_hash_sort_ucs2_bin:
mov rax, rdx
cmp rdx, 2
jl short loc_4C299
cmp byte ptr [rsi+rax-1], 20h ; ' '
jnz short loc_4C291
lea rdx, [rax-2]
cmp byte ptr [rsi+rax-2], 0
jz short my_hash_sort_ucs2_bin
loc_4C291:
mov rdx, [rcx]
mov rdi, [r8]
jmp short loc_4C2A5
loc_4C299:
mov rdx, [rcx]
mov rdi, [r8]
cmp rax, 1
jnz short loc_4C2D8
loc_4C2A5:
push rbp
mov rbp, rsp
add rax, rsi
loc_4C2AC:
mov r9d, edx
and r9d, 3Fh
add r9, rdi
movzx r10d, byte ptr [rsi]
imul r10, r9
mov r9, rdx
shl r9, 8
add r9, r10
xor rdx, r9
add rdi, 3
inc rsi
cmp rsi, rax
jb short loc_4C2AC
pop rbp
loc_4C2D8:
mov [rcx], rdx
mov [r8], rdi
retn
| unsigned long long my_hash_sort_ucs2_bin(
long long a1,
unsigned long long a2,
long long a3,
long long *a4,
long long *a5)
{
unsigned long long result; // rax
long long v6; // rdx
long long v7; // rdi
while ( 1 )
{
result = a3;
if ( a3 < 2 )
break;
if ( *(_BYTE *)(a2 + a3 - 1) == 32 )
{
a3 -= 2LL;
if ( !*(_BYTE *)(a2 + result - 2) )
continue;
}
v6 = *a4;
v7 = *a5;
goto LABEL_6;
}
v6 = *a4;
v7 = *a5;
if ( result != 1 )
goto LABEL_8;
LABEL_6:
result += a2;
do
{
v6 ^= (v7 + (v6 & 0x3F)) * *(unsigned __int8 *)a2 + (v6 << 8);
v7 += 3LL;
++a2;
}
while ( a2 < result );
LABEL_8:
*a4 = v6;
*a5 = v7;
return result;
}
| my_hash_sort_ucs2_bin:
MOV RAX,RDX
CMP RDX,0x2
JL 0x0014c299
CMP byte ptr [RSI + RAX*0x1 + -0x1],0x20
JNZ 0x0014c291
LEA RDX,[RAX + -0x2]
CMP byte ptr [RSI + RAX*0x1 + -0x2],0x0
JZ 0x0014c276
LAB_0014c291:
MOV RDX,qword ptr [RCX]
MOV RDI,qword ptr [R8]
JMP 0x0014c2a5
LAB_0014c299:
MOV RDX,qword ptr [RCX]
MOV RDI,qword ptr [R8]
CMP RAX,0x1
JNZ 0x0014c2d8
LAB_0014c2a5:
PUSH RBP
MOV RBP,RSP
ADD RAX,RSI
LAB_0014c2ac:
MOV R9D,EDX
AND R9D,0x3f
ADD R9,RDI
MOVZX R10D,byte ptr [RSI]
IMUL R10,R9
MOV R9,RDX
SHL R9,0x8
ADD R9,R10
XOR RDX,R9
ADD RDI,0x3
INC RSI
CMP RSI,RAX
JC 0x0014c2ac
POP RBP
LAB_0014c2d8:
MOV qword ptr [RCX],RDX
MOV qword ptr [R8],RDI
RET
|
void my_hash_sort_ucs2_bin
(int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
byte *pbVar1;
long lVar2;
ulong uVar3;
long lVar4;
do {
lVar2 = param_3;
if (lVar2 < 2) {
uVar3 = *param_4;
lVar4 = *param_5;
if (lVar2 != 1) goto LAB_0014c2d8;
goto LAB_0014c2a5;
}
} while ((param_2[lVar2 + -1] == 0x20) && (param_3 = lVar2 + -2, param_2[lVar2 + -2] == 0));
uVar3 = *param_4;
lVar4 = *param_5;
LAB_0014c2a5:
pbVar1 = param_2 + lVar2;
do {
uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar4);
lVar4 = lVar4 + 3;
param_2 = param_2 + 1;
} while (param_2 < pbVar1);
LAB_0014c2d8:
*param_4 = uVar3;
*param_5 = lVar4;
return;
}
| |
37,426 | plutovg_path_add_path | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c | void plutovg_path_add_path(plutovg_path_t* path, const plutovg_path_t* source, const plutovg_matrix_t* matrix)
{
if(matrix == NULL) {
plutovg_array_append(path->elements, source->elements);
path->start_point = source->start_point;
path->num_points += source->num_points;
path->num_contours += source->num_contours;
path->num_curves += source->num_curves;
return;
}
plutovg_path_iterator_t it;
plutovg_path_iterator_init(&it, source);
plutovg_point_t points[3];
plutovg_array_ensure(path->elements, source->elements.size);
while(plutovg_path_iterator_has_next(&it)) {
switch(plutovg_path_iterator_next(&it, points)) {
case PLUTOVG_PATH_COMMAND_MOVE_TO:
plutovg_matrix_map_points(matrix, points, points, 1);
plutovg_path_move_to(path, points[0].x, points[0].y);
break;
case PLUTOVG_PATH_COMMAND_LINE_TO:
plutovg_matrix_map_points(matrix, points, points, 1);
plutovg_path_line_to(path, points[0].x, points[0].y);
break;
case PLUTOVG_PATH_COMMAND_CUBIC_TO:
plutovg_matrix_map_points(matrix, points, points, 3);
plutovg_path_cubic_to(path, points[0].x, points[0].y, points[1].x, points[1].y, points[2].x, points[2].y);
break;
case PLUTOVG_PATH_COMMAND_CLOSE:
plutovg_path_close(path);
break;
}
}
} | O1 | c | plutovg_path_add_path:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rsi), %r12
movq %rdx, 0x18(%rsp)
testq %rdx, %rdx
je 0x2b530
movl 0x20(%r15), %ebp
movl 0x20(%rbx), %eax
addl %ebp, %eax
movl 0x24(%rbx), %edx
cmpl %edx, %eax
jle 0x2b3c5
testl %edx, %edx
movl $0x8, %ecx
cmovnel %edx, %ecx
movl %ecx, %r14d
leal (%r14,%r14), %ecx
cmpl %eax, %r14d
jl 0x2b3a1
movq 0x18(%rbx), %rdi
movslq %r14d, %rsi
shlq $0x3, %rsi
callq 0xa540
movq %rax, 0x18(%rbx)
movl %r14d, 0x24(%rbx)
testl %ebp, %ebp
jle 0x2b5b6
xorl %r14d, %r14d
leaq 0x1a261(%rip), %r13 # 0x45638
movq %rsp, %r15
movslq %r14d, %rax
movl (%r12,%rax,8), %ecx
cmpl $0x2, %ecx
jb 0x2b3ed
je 0x2b3f8
cmpl $0x3, %ecx
jne 0x2b415
movq 0x8(%r12,%rax,8), %rcx
movq %rcx, (%rsp)
jmp 0x2b415
movq 0x8(%r12,%rax,8), %rcx
movq %rcx, (%rsp)
movq 0x10(%r12,%rax,8), %rcx
movq %rcx, 0x8(%rsp)
movq 0x18(%r12,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
movl 0x4(%r12,%rax,8), %r14d
addl %eax, %r14d
movl (%r12,%rax,8), %eax
cmpq $0x3, %rax
ja 0x2b522
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x28033
movss (%rsp), %xmm0
movss %xmm0, 0x24(%rsp)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x20(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x2a2d3
movss 0x24(%rsp), %xmm0
movss %xmm0, (%rax)
movss 0x20(%rsp), %xmm1
movss %xmm1, 0x4(%rax)
movss %xmm0, 0x10(%rbx)
movss %xmm1, 0x14(%rbx)
incl 0x8(%rbx)
jmp 0x2b522
movq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %r15, %rdx
movl $0x3, %ecx
callq 0x28033
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
movss 0x8(%rsp), %xmm2
movss 0xc(%rsp), %xmm3
movss 0x10(%rsp), %xmm4
movss 0x14(%rsp), %xmm5
movq %rbx, %rdi
callq 0x2a452
jmp 0x2b522
cmpl $0x0, 0x20(%rbx)
je 0x2b522
movq %rbx, %rdi
movl $0x3, %esi
movl $0x1, %edx
callq 0x2a2d3
movq 0x10(%rbx), %rcx
movq %rcx, (%rax)
jmp 0x2b522
movq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %r15, %rdx
movl $0x1, %ecx
callq 0x28033
movss (%rsp), %xmm0
movss 0x4(%rsp), %xmm1
movq %rbx, %rdi
callq 0x2a349
cmpl %ebp, %r14d
jl 0x2b3da
jmp 0x2b5b6
testq %r12, %r12
je 0x2b599
movl 0x20(%r15), %eax
testl %eax, %eax
jle 0x2b599
addl 0x20(%rbx), %eax
movl 0x24(%rbx), %edx
cmpl %edx, %eax
jle 0x2b575
testl %edx, %edx
movl $0x8, %ecx
cmovnel %edx, %ecx
movl %ecx, %r14d
leal (%r14,%r14), %ecx
cmpl %eax, %r14d
jl 0x2b551
movq 0x18(%rbx), %rdi
movslq %r14d, %rsi
shlq $0x3, %rsi
callq 0xa540
movq %rax, 0x18(%rbx)
movl %r14d, 0x24(%rbx)
movslq 0x20(%rbx), %rdi
shlq $0x3, %rdi
addq 0x18(%rbx), %rdi
movq 0x18(%r15), %rsi
movslq 0x20(%r15), %rdx
shlq $0x3, %rdx
callq 0xa2a0
movl 0x20(%r15), %eax
addl %eax, 0x20(%rbx)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rbx)
movl 0x4(%r15), %eax
addl %eax, 0x4(%rbx)
movl 0x8(%r15), %eax
addl %eax, 0x8(%rbx)
movl 0xc(%r15), %eax
addl %eax, 0xc(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| plutovg_path_add_path:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rsi
mov rbx, rdi
mov r12, [rsi+18h]
mov [rsp+58h+var_40], rdx
test rdx, rdx
jz loc_2B530
mov ebp, [r15+20h]
mov eax, [rbx+20h]
add eax, ebp
mov edx, [rbx+24h]
cmp eax, edx
jle short loc_2B3C5
test edx, edx
mov ecx, 8
cmovnz ecx, edx
loc_2B3A1:
mov r14d, ecx
lea ecx, [r14+r14]
cmp r14d, eax
jl short loc_2B3A1
mov rdi, [rbx+18h]
movsxd rsi, r14d
shl rsi, 3
call _realloc
mov [rbx+18h], rax
mov [rbx+24h], r14d
loc_2B3C5:
test ebp, ebp
jle loc_2B5B6
xor r14d, r14d
lea r13, jpt_2B433
mov r15, rsp
loc_2B3DA:
movsxd rax, r14d
mov ecx, [r12+rax*8]
cmp ecx, 2
jb short loc_2B3ED
jz short loc_2B3F8
cmp ecx, 3
jnz short loc_2B415
loc_2B3ED:
mov rcx, [r12+rax*8+8]
mov [rsp+58h+var_58], rcx
jmp short loc_2B415
loc_2B3F8:
mov rcx, [r12+rax*8+8]
mov [rsp+58h+var_58], rcx
mov rcx, [r12+rax*8+10h]
mov [rsp+58h+var_50], rcx
mov rcx, [r12+rax*8+18h]
mov [rsp+58h+var_48], rcx
loc_2B415:
mov r14d, [r12+rax*8+4]
add r14d, eax
mov eax, [r12+rax*8]
cmp rax, 3; switch 4 cases
ja def_2B433; jumptable 000000000002B433 default case
movsxd rax, ds:(jpt_2B433 - 45638h)[r13+rax*4]
add rax, r13
jmp rax; switch jump
loc_2B435:
mov rdi, [rsp+58h+var_40]; jumptable 000000000002B433 case 0
mov rsi, r15
mov rdx, r15
mov ecx, 1
call plutovg_matrix_map_points
movss xmm0, dword ptr [rsp+58h+var_58]
movss [rsp+58h+var_34], xmm0
movss xmm0, dword ptr [rsp+58h+var_58+4]
movss [rsp+58h+var_38], xmm0
mov rdi, rbx
xor esi, esi
mov edx, 1
call plutovg_path_add_command
movss xmm0, [rsp+58h+var_34]
movss dword ptr [rax], xmm0
movss xmm1, [rsp+58h+var_38]
movss dword ptr [rax+4], xmm1
movss dword ptr [rbx+10h], xmm0
movss dword ptr [rbx+14h], xmm1
inc dword ptr [rbx+8]
jmp def_2B433; jumptable 000000000002B433 default case
loc_2B497:
mov rdi, [rsp+58h+var_40]; jumptable 000000000002B433 case 2
mov rsi, r15
mov rdx, r15
mov ecx, 3
call plutovg_matrix_map_points
movss xmm0, dword ptr [rsp+58h+var_58]
movss xmm1, dword ptr [rsp+58h+var_58+4]
movss xmm2, dword ptr [rsp+58h+var_50]
movss xmm3, dword ptr [rsp+58h+var_50+4]
movss xmm4, dword ptr [rsp+58h+var_48]
movss xmm5, dword ptr [rsp+58h+var_48+4]
mov rdi, rbx
call plutovg_path_cubic_to
jmp short def_2B433; jumptable 000000000002B433 default case
loc_2B4D9:
cmp dword ptr [rbx+20h], 0; jumptable 000000000002B433 case 3
jz short def_2B433; jumptable 000000000002B433 default case
mov rdi, rbx
mov esi, 3
mov edx, 1
call plutovg_path_add_command
mov rcx, [rbx+10h]
mov [rax], rcx
jmp short def_2B433; jumptable 000000000002B433 default case
loc_2B4FA:
mov rdi, [rsp+58h+var_40]; jumptable 000000000002B433 case 1
mov rsi, r15
mov rdx, r15
mov ecx, 1
call plutovg_matrix_map_points
movss xmm0, dword ptr [rsp+58h+var_58]
movss xmm1, dword ptr [rsp+58h+var_58+4]
mov rdi, rbx
call plutovg_path_line_to
def_2B433:
cmp r14d, ebp; jumptable 000000000002B433 default case
jl loc_2B3DA
jmp loc_2B5B6
loc_2B530:
test r12, r12
jz short loc_2B599
mov eax, [r15+20h]
test eax, eax
jle short loc_2B599
add eax, [rbx+20h]
mov edx, [rbx+24h]
cmp eax, edx
jle short loc_2B575
test edx, edx
mov ecx, 8
cmovnz ecx, edx
loc_2B551:
mov r14d, ecx
lea ecx, [r14+r14]
cmp r14d, eax
jl short loc_2B551
mov rdi, [rbx+18h]
movsxd rsi, r14d
shl rsi, 3
call _realloc
mov [rbx+18h], rax
mov [rbx+24h], r14d
loc_2B575:
movsxd rdi, dword ptr [rbx+20h]
shl rdi, 3
add rdi, [rbx+18h]
mov rsi, [r15+18h]
movsxd rdx, dword ptr [r15+20h]
shl rdx, 3
call _memcpy
mov eax, [r15+20h]
add [rbx+20h], eax
loc_2B599:
mov rax, [r15+10h]
mov [rbx+10h], rax
mov eax, [r15+4]
add [rbx+4], eax
mov eax, [r15+8]
add [rbx+8], eax
mov eax, [r15+0Ch]
add [rbx+0Ch], eax
loc_2B5B6:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long plutovg_path_add_path(long long a1, long long a2, float *a3)
{
long long v3; // r12
int v4; // ebp
long long result; // rax
long long v6; // rdx
long long v7; // rcx
int v8; // r14d
int v9; // r14d
long long v10; // rax
unsigned int v11; // ecx
int v12; // xmm0_4
int v13; // xmm1_4
int v14; // eax
int v15; // eax
long long v16; // rdx
long long v17; // rcx
int v18; // r14d
long long v19; // [rsp+0h] [rbp-58h] BYREF
long long v20; // [rsp+8h] [rbp-50h]
long long v21; // [rsp+10h] [rbp-48h]
float *v22; // [rsp+18h] [rbp-40h]
int v23; // [rsp+20h] [rbp-38h]
int v24; // [rsp+24h] [rbp-34h]
v3 = *(_QWORD *)(a2 + 24);
v22 = a3;
if ( a3 )
{
v4 = *(_DWORD *)(a2 + 32);
result = (unsigned int)(v4 + *(_DWORD *)(a1 + 32));
v6 = *(unsigned int *)(a1 + 36);
if ( (int)result > (int)v6 )
{
LODWORD(v7) = 8;
if ( (_DWORD)v6 )
LODWORD(v7) = *(_DWORD *)(a1 + 36);
do
{
v8 = v7;
v7 = (unsigned int)(2 * v7);
}
while ( v8 < (int)result );
result = realloc(*(_QWORD *)(a1 + 24), 8LL * v8, v6, v7);
*(_QWORD *)(a1 + 24) = result;
*(_DWORD *)(a1 + 36) = v8;
}
if ( v4 > 0 )
{
v9 = 0;
do
{
v10 = v9;
v11 = *(_DWORD *)(v3 + 8LL * v9);
if ( v11 < 2 )
goto LABEL_12;
if ( v11 == 2 )
{
v19 = *(_QWORD *)(v3 + 8LL * v9 + 8);
v20 = *(_QWORD *)(v3 + 8LL * v9 + 16);
v21 = *(_QWORD *)(v3 + 8LL * v9 + 24);
goto LABEL_14;
}
if ( v11 == 3 )
LABEL_12:
v19 = *(_QWORD *)(v3 + 8LL * v9 + 8);
LABEL_14:
v9 += *(_DWORD *)(v3 + 8LL * v9 + 4);
result = *(unsigned int *)(v3 + 8 * v10);
switch ( result )
{
case 0LL:
plutovg_matrix_map_points(v22, (long long)&v19, (long long)&v19, 1);
v23 = HIDWORD(v19);
v24 = v19;
result = plutovg_path_add_command(a1, 0, 1);
v12 = v24;
*(_DWORD *)result = v24;
v13 = v23;
*(_DWORD *)(result + 4) = v23;
*(_DWORD *)(a1 + 16) = v12;
*(_DWORD *)(a1 + 20) = v13;
++*(_DWORD *)(a1 + 8);
break;
case 1LL:
plutovg_matrix_map_points(v22, (long long)&v19, (long long)&v19, 1);
result = (long long)plutovg_path_line_to(a1, *(float *)&v19, *((float *)&v19 + 1));
break;
case 2LL:
plutovg_matrix_map_points(v22, (long long)&v19, (long long)&v19, 3);
result = (long long)plutovg_path_cubic_to(
a1,
*(float *)&v19,
*((float *)&v19 + 1),
*(float *)&v20,
*((float *)&v20 + 1),
*(float *)&v21,
*((float *)&v21 + 1));
break;
case 3LL:
if ( *(_DWORD *)(a1 + 32) )
{
result = plutovg_path_add_command(a1, 3, 1);
*(_QWORD *)result = *(_QWORD *)(a1 + 16);
}
break;
default:
break;
}
}
while ( v9 < v4 );
}
}
else
{
if ( v3 )
{
v14 = *(_DWORD *)(a2 + 32);
if ( v14 > 0 )
{
v15 = *(_DWORD *)(a1 + 32) + v14;
v16 = *(unsigned int *)(a1 + 36);
if ( v15 > (int)v16 )
{
LODWORD(v17) = 8;
if ( (_DWORD)v16 )
LODWORD(v17) = *(_DWORD *)(a1 + 36);
do
{
v18 = v17;
v17 = (unsigned int)(2 * v17);
}
while ( v18 < v15 );
*(_QWORD *)(a1 + 24) = realloc(*(_QWORD *)(a1 + 24), 8LL * v18, v16, v17);
*(_DWORD *)(a1 + 36) = v18;
}
memcpy(*(_QWORD *)(a1 + 24) + 8LL * *(int *)(a1 + 32), *(_QWORD *)(a2 + 24), 8LL * *(int *)(a2 + 32));
*(_DWORD *)(a1 + 32) += *(_DWORD *)(a2 + 32);
}
}
*(_QWORD *)(a1 + 16) = *(_QWORD *)(a2 + 16);
*(_DWORD *)(a1 + 4) += *(_DWORD *)(a2 + 4);
*(_DWORD *)(a1 + 8) += *(_DWORD *)(a2 + 8);
result = *(unsigned int *)(a2 + 12);
*(_DWORD *)(a1 + 12) += result;
}
return result;
}
| plutovg_path_add_path:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RSI
MOV RBX,RDI
MOV R12,qword ptr [RSI + 0x18]
MOV qword ptr [RSP + 0x18],RDX
TEST RDX,RDX
JZ 0x0012b530
MOV EBP,dword ptr [R15 + 0x20]
MOV EAX,dword ptr [RBX + 0x20]
ADD EAX,EBP
MOV EDX,dword ptr [RBX + 0x24]
CMP EAX,EDX
JLE 0x0012b3c5
TEST EDX,EDX
MOV ECX,0x8
CMOVNZ ECX,EDX
LAB_0012b3a1:
MOV R14D,ECX
LEA ECX,[R14 + R14*0x1]
CMP R14D,EAX
JL 0x0012b3a1
MOV RDI,qword ptr [RBX + 0x18]
MOVSXD RSI,R14D
SHL RSI,0x3
CALL 0x0010a540
MOV qword ptr [RBX + 0x18],RAX
MOV dword ptr [RBX + 0x24],R14D
LAB_0012b3c5:
TEST EBP,EBP
JLE 0x0012b5b6
XOR R14D,R14D
LEA R13,[0x145638]
MOV R15,RSP
LAB_0012b3da:
MOVSXD RAX,R14D
MOV ECX,dword ptr [R12 + RAX*0x8]
CMP ECX,0x2
JC 0x0012b3ed
JZ 0x0012b3f8
CMP ECX,0x3
JNZ 0x0012b415
LAB_0012b3ed:
MOV RCX,qword ptr [R12 + RAX*0x8 + 0x8]
MOV qword ptr [RSP],RCX
JMP 0x0012b415
LAB_0012b3f8:
MOV RCX,qword ptr [R12 + RAX*0x8 + 0x8]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [R12 + RAX*0x8 + 0x10]
MOV qword ptr [RSP + 0x8],RCX
MOV RCX,qword ptr [R12 + RAX*0x8 + 0x18]
MOV qword ptr [RSP + 0x10],RCX
LAB_0012b415:
MOV R14D,dword ptr [R12 + RAX*0x8 + 0x4]
ADD R14D,EAX
MOV EAX,dword ptr [R12 + RAX*0x8]
CMP RAX,0x3
JA 0x0012b522
MOVSXD RAX,dword ptr [R13 + RAX*0x4]
ADD RAX,R13
switchD:
JMP RAX
caseD_0:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,R15
MOV RDX,R15
MOV ECX,0x1
CALL 0x00128033
MOVSS XMM0,dword ptr [RSP]
MOVSS dword ptr [RSP + 0x24],XMM0
MOVSS XMM0,dword ptr [RSP + 0x4]
MOVSS dword ptr [RSP + 0x20],XMM0
MOV RDI,RBX
XOR ESI,ESI
MOV EDX,0x1
CALL 0x0012a2d3
MOVSS XMM0,dword ptr [RSP + 0x24]
MOVSS dword ptr [RAX],XMM0
MOVSS XMM1,dword ptr [RSP + 0x20]
MOVSS dword ptr [RAX + 0x4],XMM1
MOVSS dword ptr [RBX + 0x10],XMM0
MOVSS dword ptr [RBX + 0x14],XMM1
INC dword ptr [RBX + 0x8]
JMP 0x0012b522
caseD_2:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,R15
MOV RDX,R15
MOV ECX,0x3
CALL 0x00128033
MOVSS XMM0,dword ptr [RSP]
MOVSS XMM1,dword ptr [RSP + 0x4]
MOVSS XMM2,dword ptr [RSP + 0x8]
MOVSS XMM3,dword ptr [RSP + 0xc]
MOVSS XMM4,dword ptr [RSP + 0x10]
MOVSS XMM5,dword ptr [RSP + 0x14]
MOV RDI,RBX
CALL 0x0012a452
JMP 0x0012b522
caseD_3:
CMP dword ptr [RBX + 0x20],0x0
JZ 0x0012b522
MOV RDI,RBX
MOV ESI,0x3
MOV EDX,0x1
CALL 0x0012a2d3
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x0012b522
caseD_1:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,R15
MOV RDX,R15
MOV ECX,0x1
CALL 0x00128033
MOVSS XMM0,dword ptr [RSP]
MOVSS XMM1,dword ptr [RSP + 0x4]
MOV RDI,RBX
CALL 0x0012a349
default:
CMP R14D,EBP
JL 0x0012b3da
JMP 0x0012b5b6
LAB_0012b530:
TEST R12,R12
JZ 0x0012b599
MOV EAX,dword ptr [R15 + 0x20]
TEST EAX,EAX
JLE 0x0012b599
ADD EAX,dword ptr [RBX + 0x20]
MOV EDX,dword ptr [RBX + 0x24]
CMP EAX,EDX
JLE 0x0012b575
TEST EDX,EDX
MOV ECX,0x8
CMOVNZ ECX,EDX
LAB_0012b551:
MOV R14D,ECX
LEA ECX,[R14 + R14*0x1]
CMP R14D,EAX
JL 0x0012b551
MOV RDI,qword ptr [RBX + 0x18]
MOVSXD RSI,R14D
SHL RSI,0x3
CALL 0x0010a540
MOV qword ptr [RBX + 0x18],RAX
MOV dword ptr [RBX + 0x24],R14D
LAB_0012b575:
MOVSXD RDI,dword ptr [RBX + 0x20]
SHL RDI,0x3
ADD RDI,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [R15 + 0x18]
MOVSXD RDX,dword ptr [R15 + 0x20]
SHL RDX,0x3
CALL 0x0010a2a0
MOV EAX,dword ptr [R15 + 0x20]
ADD dword ptr [RBX + 0x20],EAX
LAB_0012b599:
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RBX + 0x10],RAX
MOV EAX,dword ptr [R15 + 0x4]
ADD dword ptr [RBX + 0x4],EAX
MOV EAX,dword ptr [R15 + 0x8]
ADD dword ptr [RBX + 0x8],EAX
MOV EAX,dword ptr [R15 + 0xc]
ADD dword ptr [RBX + 0xc],EAX
LAB_0012b5b6:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void plutovg_path_add_path(long param_1,long param_2,long param_3)
{
uint uVar1;
long lVar2;
int iVar3;
int iVar4;
void *pvVar5;
long lVar6;
int4 *puVar7;
int8 *puVar8;
int iVar9;
int iVar10;
int8 local_58;
int8 local_50;
int8 local_48;
long local_40;
int4 local_38;
int4 local_34;
lVar2 = *(long *)(param_2 + 0x18);
local_40 = param_3;
if (param_3 == 0) {
if ((lVar2 != 0) && (0 < *(int *)(param_2 + 0x20))) {
iVar10 = *(int *)(param_2 + 0x20) + *(int *)(param_1 + 0x20);
iVar9 = *(int *)(param_1 + 0x24);
if (iVar9 < iVar10) {
iVar4 = 8;
if (iVar9 != 0) {
iVar4 = iVar9;
}
do {
iVar9 = iVar4;
iVar4 = iVar9 * 2;
} while (iVar9 < iVar10);
pvVar5 = realloc(*(void **)(param_1 + 0x18),(long)iVar9 << 3);
*(void **)(param_1 + 0x18) = pvVar5;
*(int *)(param_1 + 0x24) = iVar9;
}
memcpy((void *)((long)*(int *)(param_1 + 0x20) * 8 + *(long *)(param_1 + 0x18)),
*(void **)(param_2 + 0x18),(long)*(int *)(param_2 + 0x20) << 3);
*(int *)(param_1 + 0x20) = *(int *)(param_1 + 0x20) + *(int *)(param_2 + 0x20);
}
*(int8 *)(param_1 + 0x10) = *(int8 *)(param_2 + 0x10);
*(int *)(param_1 + 4) = *(int *)(param_1 + 4) + *(int *)(param_2 + 4);
*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + *(int *)(param_2 + 8);
*(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + *(int *)(param_2 + 0xc);
}
else {
iVar9 = *(int *)(param_2 + 0x20);
iVar4 = *(int *)(param_1 + 0x20) + iVar9;
iVar10 = *(int *)(param_1 + 0x24);
if (iVar10 < iVar4) {
iVar3 = 8;
if (iVar10 != 0) {
iVar3 = iVar10;
}
do {
iVar10 = iVar3;
iVar3 = iVar10 * 2;
} while (iVar10 < iVar4);
pvVar5 = realloc(*(void **)(param_1 + 0x18),(long)iVar10 << 3);
*(void **)(param_1 + 0x18) = pvVar5;
*(int *)(param_1 + 0x24) = iVar10;
}
if (0 < iVar9) {
iVar10 = 0;
do {
lVar6 = (long)iVar10;
uVar1 = *(uint *)(lVar2 + lVar6 * 8);
if (uVar1 < 2) {
LAB_0012b3ed:
local_58 = *(int8 *)(lVar2 + 8 + lVar6 * 8);
}
else if (uVar1 == 2) {
local_58 = *(int8 *)(lVar2 + 8 + lVar6 * 8);
local_50 = *(int8 *)(lVar2 + 0x10 + lVar6 * 8);
local_48 = *(int8 *)(lVar2 + 0x18 + lVar6 * 8);
}
else if (uVar1 == 3) goto LAB_0012b3ed;
iVar10 = *(int *)(lVar2 + 4 + lVar6 * 8) + iVar10;
switch(*(int4 *)(lVar2 + lVar6 * 8)) {
case 0:
plutovg_matrix_map_points(local_40,&local_58,&local_58,1);
local_34 = (int4)local_58;
local_38 = local_58._4_4_;
puVar7 = (int4 *)plutovg_path_add_command(param_1,0,1);
*puVar7 = local_34;
puVar7[1] = local_38;
*(int4 *)(param_1 + 0x10) = local_34;
*(int4 *)(param_1 + 0x14) = local_38;
*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;
break;
case 1:
plutovg_matrix_map_points(local_40,&local_58,&local_58,1);
plutovg_path_line_to((int4)local_58,local_58._4_4_,param_1);
break;
case 2:
plutovg_matrix_map_points(local_40,&local_58,&local_58,3);
plutovg_path_cubic_to
((int4)local_58,local_58._4_4_,(int4)local_50,local_50._4_4_,
(int4)local_48,local_48._4_4_,param_1);
break;
case 3:
if (*(int *)(param_1 + 0x20) != 0) {
puVar8 = (int8 *)plutovg_path_add_command(param_1,3,1);
*puVar8 = *(int8 *)(param_1 + 0x10);
}
}
} while (iVar10 < iVar9);
}
}
return;
}
| |
37,427 | plutovg_path_add_path | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c | void plutovg_path_add_path(plutovg_path_t* path, const plutovg_path_t* source, const plutovg_matrix_t* matrix)
{
if(matrix == NULL) {
plutovg_array_append(path->elements, source->elements);
path->start_point = source->start_point;
path->num_points += source->num_points;
path->num_contours += source->num_contours;
path->num_curves += source->num_curves;
return;
}
plutovg_path_iterator_t it;
plutovg_path_iterator_init(&it, source);
plutovg_point_t points[3];
plutovg_array_ensure(path->elements, source->elements.size);
while(plutovg_path_iterator_has_next(&it)) {
switch(plutovg_path_iterator_next(&it, points)) {
case PLUTOVG_PATH_COMMAND_MOVE_TO:
plutovg_matrix_map_points(matrix, points, points, 1);
plutovg_path_move_to(path, points[0].x, points[0].y);
break;
case PLUTOVG_PATH_COMMAND_LINE_TO:
plutovg_matrix_map_points(matrix, points, points, 1);
plutovg_path_line_to(path, points[0].x, points[0].y);
break;
case PLUTOVG_PATH_COMMAND_CUBIC_TO:
plutovg_matrix_map_points(matrix, points, points, 3);
plutovg_path_cubic_to(path, points[0].x, points[0].y, points[1].x, points[1].y, points[2].x, points[2].y);
break;
case PLUTOVG_PATH_COMMAND_CLOSE:
plutovg_path_close(path);
break;
}
}
} | O2 | c | plutovg_path_add_path:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
testq %rdx, %rdx
je 0x26652
movq %rdx, %r14
movq 0x18(%r15), %rax
movq %rax, 0x18(%rsp)
movl 0x20(%r15), %ebp
movl %ebp, 0x20(%rsp)
andl $0x0, 0x24(%rsp)
movl 0x20(%rbx), %eax
addl %ebp, %eax
movl 0x24(%rbx), %edx
cmpl %edx, %eax
jle 0x2657a
testl %edx, %edx
pushq $0x8
popq %rcx
cmovnel %edx, %ecx
movl %ecx, %r15d
leal (%r15,%r15), %ecx
cmpl %eax, %r15d
jl 0x26556
movq 0x18(%rbx), %rdi
movslq %r15d, %rsi
shlq $0x3, %rsi
callq 0xa510
movq %rax, 0x18(%rbx)
movl %r15d, 0x24(%rbx)
xorl %eax, %eax
leaq 0x18(%rsp), %r15
movq %rsp, %r12
leaq 0x1616d(%rip), %r13 # 0x3c6f8
cmpl %ebp, %eax
jge 0x266ea
movq %r15, %rdi
movq %r12, %rsi
callq 0x254c4
cmpl $0x3, %eax
ja 0x26645
movl %eax, %eax
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movq %r14, %rdi
movq %r12, %rsi
movq %r12, %rdx
pushq $0x1
popq %rcx
callq 0x23df8
movd (%rsp), %xmm0
movd 0x4(%rsp), %xmm1
movq %rbx, %rdi
callq 0x25570
jmp 0x26645
movq %r14, %rdi
movq %r12, %rsi
movq %r12, %rdx
pushq $0x3
popq %rcx
callq 0x23df8
movd (%rsp), %xmm0
movd 0x4(%rsp), %xmm1
movss 0x8(%rsp), %xmm2
movss 0xc(%rsp), %xmm3
movss 0x10(%rsp), %xmm4
movss 0x14(%rsp), %xmm5
movq %rbx, %rdi
callq 0x25721
jmp 0x26645
movq %rbx, %rdi
callq 0x25d66
jmp 0x26645
movq %r14, %rdi
movq %r12, %rsi
movq %r12, %rdx
pushq $0x1
popq %rcx
callq 0x23df8
movd (%rsp), %xmm0
movd 0x4(%rsp), %xmm1
movq %rbx, %rdi
callq 0x25631
movl 0x20(%rsp), %ebp
movl 0x24(%rsp), %eax
jmp 0x2658b
movq 0x18(%r15), %rsi
testq %rsi, %rsi
je 0x266c7
movl 0x20(%r15), %ecx
testl %ecx, %ecx
jle 0x266c7
movl 0x20(%rbx), %edx
movl 0x24(%rbx), %edi
leal (%rdx,%rcx), %eax
cmpl %edi, %eax
jle 0x266a9
testl %edi, %edi
pushq $0x8
popq %rcx
cmovnel %edi, %ecx
movl %ecx, %r14d
leal (%r14,%r14), %ecx
cmpl %eax, %r14d
jl 0x26678
movq 0x18(%rbx), %rdi
movslq %r14d, %rsi
shlq $0x3, %rsi
callq 0xa510
movq %rax, 0x18(%rbx)
movl %r14d, 0x24(%rbx)
movl 0x20(%rbx), %edx
movq 0x18(%r15), %rsi
movl 0x20(%r15), %ecx
jmp 0x266ad
movq 0x18(%rbx), %rax
movslq %edx, %rdx
leaq (%rax,%rdx,8), %rdi
movslq %ecx, %rdx
shlq $0x3, %rdx
callq 0xa240
movl 0x20(%r15), %eax
addl %eax, 0x20(%rbx)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rbx)
movq 0x4(%r15), %xmm0
movq 0x4(%rbx), %xmm1
paddd %xmm0, %xmm1
movq %xmm1, 0x4(%rbx)
movl 0xc(%r15), %eax
addl %eax, 0xc(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| plutovg_path_add_path:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rsi
mov rbx, rdi
test rdx, rdx
jz loc_26652
mov r14, rdx
mov rax, [r15+18h]
mov [rsp+58h+var_40], rax
mov ebp, [r15+20h]
mov [rsp+58h+var_38], ebp
and [rsp+58h+var_34], 0
mov eax, [rbx+20h]
add eax, ebp
mov edx, [rbx+24h]
cmp eax, edx
jle short loc_2657A
test edx, edx
push 8
pop rcx
cmovnz ecx, edx
loc_26556:
mov r15d, ecx
lea ecx, [r15+r15]
cmp r15d, eax
jl short loc_26556
mov rdi, [rbx+18h]
movsxd rsi, r15d
shl rsi, 3
call _realloc
mov [rbx+18h], rax
mov [rbx+24h], r15d
loc_2657A:
xor eax, eax
lea r15, [rsp+58h+var_40]
mov r12, rsp
lea r13, jpt_265B1
loc_2658B:
cmp eax, ebp
jge loc_266EA
mov rdi, r15
mov rsi, r12
call plutovg_path_iterator_next
cmp eax, 3; switch 4 cases
ja def_265B1; jumptable 00000000000265B1 default case
mov eax, eax
movsxd rax, ds:(jpt_265B1 - 3C6F8h)[r13+rax*4]
add rax, r13
jmp rax; switch jump
loc_265B3:
mov rdi, r14; jumptable 00000000000265B1 case 0
mov rsi, r12
mov rdx, r12
push 1
pop rcx
call plutovg_matrix_map_points
movd xmm0, [rsp+58h+var_58]
movd xmm1, [rsp+58h+var_54]
mov rdi, rbx
call plutovg_path_move_to
jmp short def_265B1; jumptable 00000000000265B1 default case
loc_265D9:
mov rdi, r14; jumptable 00000000000265B1 case 2
mov rsi, r12
mov rdx, r12
push 3
pop rcx
call plutovg_matrix_map_points
movd xmm0, [rsp+58h+var_58]
movd xmm1, [rsp+58h+var_54]
movss xmm2, [rsp+58h+var_50]
movss xmm3, [rsp+58h+var_4C]
movss xmm4, [rsp+58h+var_48]
movss xmm5, [rsp+58h+var_44]
mov rdi, rbx
call plutovg_path_cubic_to
jmp short def_265B1; jumptable 00000000000265B1 default case
loc_26617:
mov rdi, rbx; jumptable 00000000000265B1 case 3
call plutovg_path_close
jmp short def_265B1; jumptable 00000000000265B1 default case
loc_26621:
mov rdi, r14; jumptable 00000000000265B1 case 1
mov rsi, r12
mov rdx, r12
push 1
pop rcx
call plutovg_matrix_map_points
movd xmm0, [rsp+58h+var_58]
movd xmm1, [rsp+58h+var_54]
mov rdi, rbx
call plutovg_path_line_to
def_265B1:
mov ebp, [rsp+58h+var_38]; jumptable 00000000000265B1 default case
mov eax, [rsp+58h+var_34]
jmp loc_2658B
loc_26652:
mov rsi, [r15+18h]
test rsi, rsi
jz short loc_266C7
mov ecx, [r15+20h]
test ecx, ecx
jle short loc_266C7
mov edx, [rbx+20h]
mov edi, [rbx+24h]
lea eax, [rdx+rcx]
cmp eax, edi
jle short loc_266A9
test edi, edi
push 8
pop rcx
cmovnz ecx, edi
loc_26678:
mov r14d, ecx
lea ecx, [r14+r14]
cmp r14d, eax
jl short loc_26678
mov rdi, [rbx+18h]
movsxd rsi, r14d
shl rsi, 3
call _realloc
mov [rbx+18h], rax
mov [rbx+24h], r14d
mov edx, [rbx+20h]
mov rsi, [r15+18h]
mov ecx, [r15+20h]
jmp short loc_266AD
loc_266A9:
mov rax, [rbx+18h]
loc_266AD:
movsxd rdx, edx
lea rdi, [rax+rdx*8]
movsxd rdx, ecx
shl rdx, 3
call _memcpy
mov eax, [r15+20h]
add [rbx+20h], eax
loc_266C7:
mov rax, [r15+10h]
mov [rbx+10h], rax
movq xmm0, qword ptr [r15+4]
movq xmm1, qword ptr [rbx+4]
paddd xmm1, xmm0
movq qword ptr [rbx+4], xmm1
mov eax, [r15+0Ch]
add [rbx+0Ch], eax
loc_266EA:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long plutovg_path_add_path(long long a1, long long a2, float *a3)
{
int v6; // ebp
int v7; // eax
int v8; // edx
int v9; // ecx
int v10; // r15d
long long result; // rax
long long v12; // rsi
int v13; // ecx
int v14; // edx
int v15; // edi
int v16; // eax
int v17; // ecx
int v18; // r14d
long long v19; // rax
long long v20; // [rsp+0h] [rbp-58h] BYREF
float v21; // [rsp+8h] [rbp-50h]
float v22; // [rsp+Ch] [rbp-4Ch]
float v23; // [rsp+10h] [rbp-48h]
float v24; // [rsp+14h] [rbp-44h]
long long v25; // [rsp+18h] [rbp-40h] BYREF
int v26; // [rsp+20h] [rbp-38h]
unsigned int v27; // [rsp+24h] [rbp-34h]
if ( a3 )
{
v25 = *(_QWORD *)(a2 + 24);
v6 = *(_DWORD *)(a2 + 32);
v26 = v6;
v27 = 0;
v7 = v6 + *(_DWORD *)(a1 + 32);
v8 = *(_DWORD *)(a1 + 36);
if ( v7 > v8 )
{
v9 = 8;
if ( v8 )
v9 = *(_DWORD *)(a1 + 36);
do
{
v10 = v9;
v9 *= 2;
}
while ( v10 < v7 );
*(_QWORD *)(a1 + 24) = realloc(*(_QWORD *)(a1 + 24), 8LL * v10);
*(_DWORD *)(a1 + 36) = v10;
}
for ( result = 0LL; (int)result < v6; result = v27 )
{
switch ( (unsigned int)plutovg_path_iterator_next((long long)&v25, &v20) )
{
case 0u:
plutovg_matrix_map_points(a3, (float *)&v20, (float *)&v20, 1);
plutovg_path_move_to(a1, *(float *)&v20, *((float *)&v20 + 1));
break;
case 1u:
plutovg_matrix_map_points(a3, (float *)&v20, (float *)&v20, 1);
plutovg_path_line_to(a1, *(float *)&v20, *((float *)&v20 + 1));
break;
case 2u:
plutovg_matrix_map_points(a3, (float *)&v20, (float *)&v20, 3);
plutovg_path_cubic_to(a1, *(float *)&v20, *((float *)&v20 + 1), v21, v22, v23, v24);
break;
case 3u:
plutovg_path_close(a1);
break;
default:
break;
}
v6 = v26;
}
}
else
{
v12 = *(_QWORD *)(a2 + 24);
if ( v12 )
{
v13 = *(_DWORD *)(a2 + 32);
if ( v13 > 0 )
{
v14 = *(_DWORD *)(a1 + 32);
v15 = *(_DWORD *)(a1 + 36);
v16 = v14 + v13;
if ( v14 + v13 <= v15 )
{
v19 = *(_QWORD *)(a1 + 24);
}
else
{
v17 = 8;
if ( v15 )
v17 = v15;
do
{
v18 = v17;
v17 *= 2;
}
while ( v18 < v16 );
v19 = realloc(*(_QWORD *)(a1 + 24), 8LL * v18);
*(_QWORD *)(a1 + 24) = v19;
*(_DWORD *)(a1 + 36) = v18;
v14 = *(_DWORD *)(a1 + 32);
v12 = *(_QWORD *)(a2 + 24);
v13 = *(_DWORD *)(a2 + 32);
}
memcpy(v19 + 8LL * v14, v12, 8LL * v13);
*(_DWORD *)(a1 + 32) += *(_DWORD *)(a2 + 32);
}
}
*(_QWORD *)(a1 + 16) = *(_QWORD *)(a2 + 16);
*(_QWORD *)(a1 + 4) = _mm_add_epi32(
_mm_loadl_epi64((const __m128i *)(a1 + 4)),
_mm_loadl_epi64((const __m128i *)(a2 + 4))).m128i_u64[0];
result = *(unsigned int *)(a2 + 12);
*(_DWORD *)(a1 + 12) += result;
}
return result;
}
| plutovg_path_add_path:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RSI
MOV RBX,RDI
TEST RDX,RDX
JZ 0x00126652
MOV R14,RDX
MOV RAX,qword ptr [R15 + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV EBP,dword ptr [R15 + 0x20]
MOV dword ptr [RSP + 0x20],EBP
AND dword ptr [RSP + 0x24],0x0
MOV EAX,dword ptr [RBX + 0x20]
ADD EAX,EBP
MOV EDX,dword ptr [RBX + 0x24]
CMP EAX,EDX
JLE 0x0012657a
TEST EDX,EDX
PUSH 0x8
POP RCX
CMOVNZ ECX,EDX
LAB_00126556:
MOV R15D,ECX
LEA ECX,[R15 + R15*0x1]
CMP R15D,EAX
JL 0x00126556
MOV RDI,qword ptr [RBX + 0x18]
MOVSXD RSI,R15D
SHL RSI,0x3
CALL 0x0010a510
MOV qword ptr [RBX + 0x18],RAX
MOV dword ptr [RBX + 0x24],R15D
LAB_0012657a:
XOR EAX,EAX
LEA R15,[RSP + 0x18]
MOV R12,RSP
LEA R13,[0x13c6f8]
default:
CMP EAX,EBP
JGE 0x001266ea
MOV RDI,R15
MOV RSI,R12
CALL 0x001254c4
CMP EAX,0x3
JA 0x00126645
MOV EAX,EAX
MOVSXD RAX,dword ptr [R13 + RAX*0x4]
ADD RAX,R13
switchD:
JMP RAX
caseD_0:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R12
PUSH 0x1
POP RCX
CALL 0x00123df8
MOVD XMM0,dword ptr [RSP]
MOVD XMM1,dword ptr [RSP + 0x4]
MOV RDI,RBX
CALL 0x00125570
JMP 0x00126645
caseD_2:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R12
PUSH 0x3
POP RCX
CALL 0x00123df8
MOVD XMM0,dword ptr [RSP]
MOVD XMM1,dword ptr [RSP + 0x4]
MOVSS XMM2,dword ptr [RSP + 0x8]
MOVSS XMM3,dword ptr [RSP + 0xc]
MOVSS XMM4,dword ptr [RSP + 0x10]
MOVSS XMM5,dword ptr [RSP + 0x14]
MOV RDI,RBX
CALL 0x00125721
JMP 0x00126645
caseD_3:
MOV RDI,RBX
CALL 0x00125d66
JMP 0x00126645
caseD_1:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R12
PUSH 0x1
POP RCX
CALL 0x00123df8
MOVD XMM0,dword ptr [RSP]
MOVD XMM1,dword ptr [RSP + 0x4]
MOV RDI,RBX
CALL 0x00125631
LAB_00126645:
MOV EBP,dword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x24]
JMP 0x0012658b
LAB_00126652:
MOV RSI,qword ptr [R15 + 0x18]
TEST RSI,RSI
JZ 0x001266c7
MOV ECX,dword ptr [R15 + 0x20]
TEST ECX,ECX
JLE 0x001266c7
MOV EDX,dword ptr [RBX + 0x20]
MOV EDI,dword ptr [RBX + 0x24]
LEA EAX,[RDX + RCX*0x1]
CMP EAX,EDI
JLE 0x001266a9
TEST EDI,EDI
PUSH 0x8
POP RCX
CMOVNZ ECX,EDI
LAB_00126678:
MOV R14D,ECX
LEA ECX,[R14 + R14*0x1]
CMP R14D,EAX
JL 0x00126678
MOV RDI,qword ptr [RBX + 0x18]
MOVSXD RSI,R14D
SHL RSI,0x3
CALL 0x0010a510
MOV qword ptr [RBX + 0x18],RAX
MOV dword ptr [RBX + 0x24],R14D
MOV EDX,dword ptr [RBX + 0x20]
MOV RSI,qword ptr [R15 + 0x18]
MOV ECX,dword ptr [R15 + 0x20]
JMP 0x001266ad
LAB_001266a9:
MOV RAX,qword ptr [RBX + 0x18]
LAB_001266ad:
MOVSXD RDX,EDX
LEA RDI,[RAX + RDX*0x8]
MOVSXD RDX,ECX
SHL RDX,0x3
CALL 0x0010a240
MOV EAX,dword ptr [R15 + 0x20]
ADD dword ptr [RBX + 0x20],EAX
LAB_001266c7:
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RBX + 0x10],RAX
MOVQ XMM0,qword ptr [R15 + 0x4]
MOVQ XMM1,qword ptr [RBX + 0x4]
PADDD XMM1,XMM0
MOVQ qword ptr [RBX + 0x4],XMM1
MOV EAX,dword ptr [R15 + 0xc]
ADD dword ptr [RBX + 0xc],EAX
LAB_001266ea:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void plutovg_path_add_path(long param_1,long param_2,long param_3)
{
int iVar1;
int iVar2;
int iVar3;
int4 uVar4;
void *pvVar5;
void *pvVar6;
int iVar7;
int4 local_58;
int4 local_54;
int4 local_50;
int4 local_4c;
int4 local_48;
int4 local_44;
int8 local_40;
int local_38;
int local_34;
if (param_3 == 0) {
pvVar5 = *(void **)(param_2 + 0x18);
if ((pvVar5 != (void *)0x0) && (iVar7 = *(int *)(param_2 + 0x20), 0 < iVar7)) {
iVar2 = *(int *)(param_1 + 0x20);
iVar3 = *(int *)(param_1 + 0x24);
if (iVar3 < iVar2 + iVar7) {
iVar1 = 8;
if (iVar3 != 0) {
iVar1 = iVar3;
}
do {
iVar3 = iVar1;
iVar1 = iVar3 * 2;
} while (iVar3 < iVar2 + iVar7);
pvVar6 = realloc(*(void **)(param_1 + 0x18),(long)iVar3 << 3);
*(void **)(param_1 + 0x18) = pvVar6;
*(int *)(param_1 + 0x24) = iVar3;
iVar2 = *(int *)(param_1 + 0x20);
pvVar5 = *(void **)(param_2 + 0x18);
iVar7 = *(int *)(param_2 + 0x20);
}
else {
pvVar6 = *(void **)(param_1 + 0x18);
}
memcpy((void *)((long)pvVar6 + (long)iVar2 * 8),pvVar5,(long)iVar7 << 3);
*(int *)(param_1 + 0x20) = *(int *)(param_1 + 0x20) + *(int *)(param_2 + 0x20);
}
*(int8 *)(param_1 + 0x10) = *(int8 *)(param_2 + 0x10);
*(ulong *)(param_1 + 4) =
CONCAT44((int)((ulong)*(int8 *)(param_1 + 4) >> 0x20) +
(int)((ulong)*(int8 *)(param_2 + 4) >> 0x20),
(int)*(int8 *)(param_1 + 4) + (int)*(int8 *)(param_2 + 4));
*(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + *(int *)(param_2 + 0xc);
}
else {
local_40 = *(int8 *)(param_2 + 0x18);
iVar7 = *(int *)(param_2 + 0x20);
local_34 = 0;
iVar2 = *(int *)(param_1 + 0x20) + iVar7;
iVar3 = *(int *)(param_1 + 0x24);
local_38 = iVar7;
if (iVar3 < iVar2) {
iVar1 = 8;
if (iVar3 != 0) {
iVar1 = iVar3;
}
do {
iVar3 = iVar1;
iVar1 = iVar3 * 2;
} while (iVar3 < iVar2);
pvVar5 = realloc(*(void **)(param_1 + 0x18),(long)iVar3 << 3);
*(void **)(param_1 + 0x18) = pvVar5;
*(int *)(param_1 + 0x24) = iVar3;
}
iVar3 = 0;
while (iVar3 < iVar7) {
uVar4 = plutovg_path_iterator_next(&local_40,&local_58);
iVar7 = local_38;
iVar3 = local_34;
switch(uVar4) {
case 0:
plutovg_matrix_map_points(param_3,&local_58,&local_58,1);
plutovg_path_move_to(local_58,local_54,param_1);
iVar7 = local_38;
iVar3 = local_34;
break;
case 1:
plutovg_matrix_map_points(param_3,&local_58,&local_58,1);
plutovg_path_line_to(local_58,local_54,param_1);
iVar7 = local_38;
iVar3 = local_34;
break;
case 2:
plutovg_matrix_map_points(param_3,&local_58,&local_58,3);
plutovg_path_cubic_to(local_58,local_54,local_50,local_4c,local_48,local_44,param_1);
iVar7 = local_38;
iVar3 = local_34;
break;
case 3:
plutovg_path_close(param_1);
iVar7 = local_38;
iVar3 = local_34;
}
}
}
return;
}
| |
37,428 | dequantize_row_q4_K | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | void dequantize_row_q4_K(const block_q4_K * restrict x, float * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int nb = k / QK_K;
for (int i = 0; i < nb; i++) {
const uint8_t * q = x[i].qs;
const float d = GGML_FP16_TO_FP32(x[i].d);
const float min = GGML_FP16_TO_FP32(x[i].dmin);
int is = 0;
uint8_t sc, m;
for (int j = 0; j < QK_K; j += 64) {
get_scale_min_k4(is + 0, x[i].scales, &sc, &m);
const float d1 = d * sc; const float m1 = min * m;
get_scale_min_k4(is + 1, x[i].scales, &sc, &m);
const float d2 = d * sc; const float m2 = min * m;
for (int l = 0; l < 32; ++l) *y++ = d1 * (q[l] & 0xF) - m1;
for (int l = 0; l < 32; ++l) *y++ = d2 * (q[l] >> 4) - m2;
q += 32; is += 2;
}
}
} | O2 | c | dequantize_row_q4_K:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, 0x28(%rsp)
testb %dl, %dl
jne 0x34a58
movq %rsi, %r14
shrq $0x8, %rdx
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
movq %rdx, 0x20(%rsp)
cmpq %rdx, %rax
je 0x34a49
movq %rax, 0x30(%rsp)
imulq $0x90, %rax, %rax
movq 0x28(%rsp), %rdx
leaq (%rdx,%rax), %r15
addq $0x10, %r15
movzwl -0x10(%r15), %ecx
movq 0x3e6a5(%rip), %rsi # 0x72fa8
movss (%rsi,%rcx,4), %xmm0
movss %xmm0, 0x10(%rsp)
movzwl -0xe(%r15), %ecx
movss (%rsi,%rcx,4), %xmm3
xorps 0x1e581(%rip), %xmm3 # 0x52ea0
addq %rdx, %rax
addq $0x4, %rax
movq %rax, 0x38(%rsp)
xorl %ebx, %ebx
xorl %eax, %eax
movaps %xmm3, 0x40(%rsp)
cmpl $0x100, %eax # imm = 0x100
jae 0x34a37
movl %eax, 0x1c(%rsp)
movl %ebx, %edi
movq 0x38(%rsp), %r12
movq %r12, %rsi
leaq 0xf(%rsp), %r13
movq %r13, %rdx
leaq 0xe(%rsp), %rbp
movq %rbp, %rcx
callq 0x3485c
movzbl 0xf(%rsp), %eax
cvtsi2ss %eax, %xmm0
movzbl 0xe(%rsp), %eax
cvtsi2ss %eax, %xmm1
movss %xmm1, 0x18(%rsp)
mulss 0x10(%rsp), %xmm0
movss %xmm0, 0x14(%rsp)
movl %ebx, %edi
orl $0x1, %edi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x3485c
movss 0x18(%rsp), %xmm4
movss 0x14(%rsp), %xmm2
movaps 0x40(%rsp), %xmm3
movzbl 0xf(%rsp), %eax
cvtsi2ss %eax, %xmm0
movb 0xe(%rsp), %al
mulss %xmm3, %xmm4
xorl %ecx, %ecx
cmpq $0x20, %rcx
je 0x349e7
movb (%r15,%rcx), %dl
andb $0xf, %dl
movzbl %dl, %edx
cvtsi2ss %edx, %xmm1
mulss %xmm2, %xmm1
addss %xmm4, %xmm1
movss %xmm1, (%r14)
addq $0x4, %r14
incq %rcx
jmp 0x349bd
movzbl %al, %eax
cvtsi2ss %eax, %xmm1
mulss 0x10(%rsp), %xmm0
mulss %xmm3, %xmm1
xorl %eax, %eax
cmpq $0x20, %rax
je 0x34a24
movb (%r15,%rax), %cl
shrb $0x4, %cl
movzbl %cl, %ecx
cvtsi2ss %ecx, %xmm2
mulss %xmm0, %xmm2
addss %xmm1, %xmm2
movss %xmm2, (%r14)
addq $0x4, %r14
incq %rax
jmp 0x349fa
addq $0x20, %r15
addl $0x2, %ebx
movl 0x1c(%rsp), %eax
addl $0x40, %eax
jmp 0x34934
movq 0x30(%rsp), %rax
incq %rax
movq 0x20(%rsp), %rdx
jmp 0x348d5
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x293ed(%rip), %rdi # 0x5de4c
leaq 0x28ffe(%rip), %rsi # 0x5da64
leaq 0x2957e(%rip), %rcx # 0x5dfeb
movl $0x501, %edx # imm = 0x501
callq 0x1dfb0
| dequantize_row_q4_K:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_60], rdi
test dl, dl
jnz loc_34A58
mov r14, rsi
shr rdx, 8
xor eax, eax
test edx, edx
cmovle edx, eax
mov [rsp+88h+var_68], rdx
loc_348D5:
cmp rax, rdx
jz loc_34A49
mov [rsp+88h+var_58], rax
imul rax, 90h
mov rdx, [rsp+88h+var_60]
lea r15, [rdx+rax]
add r15, 10h
movzx ecx, word ptr [r15-10h]
mov rsi, cs:ggml_table_f32_f16_ptr
movss xmm0, dword ptr [rsi+rcx*4]
movss [rsp+88h+var_78], xmm0
movzx ecx, word ptr [r15-0Eh]
movss xmm3, dword ptr [rsi+rcx*4]
xorps xmm3, cs:xmmword_52EA0
add rax, rdx
add rax, 4
mov [rsp+88h+var_50], rax
xor ebx, ebx
xor eax, eax
movaps [rsp+88h+var_48], xmm3
loc_34934:
cmp eax, 100h
jnb loc_34A37
mov [rsp+88h+var_6C], eax
mov edi, ebx
mov r12, [rsp+88h+var_50]
mov rsi, r12
lea r13, [rsp+88h+var_79]
mov rdx, r13
lea rbp, [rsp+88h+var_7A]
mov rcx, rbp
call get_scale_min_k4
movzx eax, [rsp+88h+var_79]
cvtsi2ss xmm0, eax
movzx eax, [rsp+88h+var_7A]
cvtsi2ss xmm1, eax
movss [rsp+88h+var_70], xmm1
mulss xmm0, [rsp+88h+var_78]
movss [rsp+88h+var_74], xmm0
mov edi, ebx
or edi, 1
mov rsi, r12
mov rdx, r13
mov rcx, rbp
call get_scale_min_k4
movss xmm4, [rsp+88h+var_70]
movss xmm2, [rsp+88h+var_74]
movaps xmm3, [rsp+88h+var_48]
movzx eax, [rsp+88h+var_79]
cvtsi2ss xmm0, eax
mov al, [rsp+88h+var_7A]
mulss xmm4, xmm3
xor ecx, ecx
loc_349BD:
cmp rcx, 20h ; ' '
jz short loc_349E7
mov dl, [r15+rcx]
and dl, 0Fh
movzx edx, dl
cvtsi2ss xmm1, edx
mulss xmm1, xmm2
addss xmm1, xmm4
movss dword ptr [r14], xmm1
add r14, 4
inc rcx
jmp short loc_349BD
loc_349E7:
movzx eax, al
cvtsi2ss xmm1, eax
mulss xmm0, [rsp+88h+var_78]
mulss xmm1, xmm3
xor eax, eax
loc_349FA:
cmp rax, 20h ; ' '
jz short loc_34A24
mov cl, [r15+rax]
shr cl, 4
movzx ecx, cl
cvtsi2ss xmm2, ecx
mulss xmm2, xmm0
addss xmm2, xmm1
movss dword ptr [r14], xmm2
add r14, 4
inc rax
jmp short loc_349FA
loc_34A24:
add r15, 20h ; ' '
add ebx, 2
mov eax, [rsp+88h+var_6C]
add eax, 40h ; '@'
jmp loc_34934
loc_34A37:
mov rax, [rsp+88h+var_58]
inc rax
mov rdx, [rsp+88h+var_68]
jmp loc_348D5
loc_34A49:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_34A58:
lea rdi, aKQkK0; "k % QK_K == 0"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidDequantize_6; "void dequantize_row_q4_K(const block_q4"...
mov edx, 501h
call ___assert_fail
| long long dequantize_row_q4_K(long long a1, float *a2, unsigned long long a3)
{
unsigned long long v4; // rdx
long long result; // rax
long long v6; // rax
long long v7; // r15
__m128 v8; // xmm3
int v9; // ebx
unsigned int v10; // eax
long long v11; // r12
float v12; // xmm2_4
float v13; // xmm3_4
float v14; // xmm0_4
unsigned __int8 v15; // al
float v16; // xmm4_4
long long i; // rcx
float v18; // xmm0_4
float v19; // xmm1_4
long long j; // rax
unsigned __int8 v21; // [rsp+Eh] [rbp-7Ah] BYREF
unsigned __int8 v22; // [rsp+Fh] [rbp-79h] BYREF
float v23; // [rsp+10h] [rbp-78h]
float v24; // [rsp+14h] [rbp-74h]
float v25; // [rsp+18h] [rbp-70h]
unsigned int v26; // [rsp+1Ch] [rbp-6Ch]
unsigned long long v27; // [rsp+20h] [rbp-68h]
long long v28; // [rsp+28h] [rbp-60h]
long long v29; // [rsp+30h] [rbp-58h]
long long v30; // [rsp+38h] [rbp-50h]
__m128 v31; // [rsp+40h] [rbp-48h]
v28 = a1;
if ( (_BYTE)a3 )
__assert_fail(
"k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
1281LL,
"void dequantize_row_q4_K(const block_q4_K *restrict, float *restrict, int64_t)");
v4 = a3 >> 8;
result = 0LL;
if ( (int)v4 <= 0 )
v4 = 0LL;
v27 = v4;
while ( result != v4 )
{
v29 = result;
v6 = 144 * result;
v7 = v28 + v6 + 16;
v23 = ggml_table_f32_f16[*(unsigned __int16 *)(v28 + v6)];
v8 = _mm_xor_ps((__m128)LODWORD(ggml_table_f32_f16[*(unsigned __int16 *)(v28 + v6 + 2)]), (__m128)xmmword_52EA0);
v30 = v28 + v6 + 4;
v9 = 0;
v10 = 0;
v31 = v8;
while ( v10 < 0x100 )
{
v26 = v10;
v11 = v30;
get_scale_min_k4(v9, v30, &v22, &v21);
v25 = (float)v21;
v24 = (float)v22 * v23;
get_scale_min_k4(v9 | 1, v11, &v22, &v21);
v12 = v24;
v13 = v31.m128_f32[0];
v14 = (float)v22;
v15 = v21;
v16 = v25 * v31.m128_f32[0];
for ( i = 0LL; i != 32; ++i )
*a2++ = (float)((float)(*(_BYTE *)(v7 + i) & 0xF) * v12) + v16;
v18 = v14 * v23;
v19 = (float)v15 * v13;
for ( j = 0LL; j != 32; ++j )
*a2++ = (float)((float)(*(_BYTE *)(v7 + j) >> 4) * v18) + v19;
v7 += 32LL;
v9 += 2;
v10 = v26 + 64;
}
result = v29 + 1;
v4 = v27;
}
return result;
}
| dequantize_row_q4_K:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP + 0x28],RDI
TEST DL,DL
JNZ 0x00134a58
MOV R14,RSI
SHR RDX,0x8
XOR EAX,EAX
TEST EDX,EDX
CMOVLE EDX,EAX
MOV qword ptr [RSP + 0x20],RDX
LAB_001348d5:
CMP RAX,RDX
JZ 0x00134a49
MOV qword ptr [RSP + 0x30],RAX
IMUL RAX,RAX,0x90
MOV RDX,qword ptr [RSP + 0x28]
LEA R15,[RDX + RAX*0x1]
ADD R15,0x10
MOVZX ECX,word ptr [R15 + -0x10]
MOV RSI,qword ptr [0x00172fa8]
MOVSS XMM0,dword ptr [RSI + RCX*0x4]
MOVSS dword ptr [RSP + 0x10],XMM0
MOVZX ECX,word ptr [R15 + -0xe]
MOVSS XMM3,dword ptr [RSI + RCX*0x4]
XORPS XMM3,xmmword ptr [0x00152ea0]
ADD RAX,RDX
ADD RAX,0x4
MOV qword ptr [RSP + 0x38],RAX
XOR EBX,EBX
XOR EAX,EAX
MOVAPS xmmword ptr [RSP + 0x40],XMM3
LAB_00134934:
CMP EAX,0x100
JNC 0x00134a37
MOV dword ptr [RSP + 0x1c],EAX
MOV EDI,EBX
MOV R12,qword ptr [RSP + 0x38]
MOV RSI,R12
LEA R13,[RSP + 0xf]
MOV RDX,R13
LEA RBP,[RSP + 0xe]
MOV RCX,RBP
CALL 0x0013485c
MOVZX EAX,byte ptr [RSP + 0xf]
CVTSI2SS XMM0,EAX
MOVZX EAX,byte ptr [RSP + 0xe]
CVTSI2SS XMM1,EAX
MOVSS dword ptr [RSP + 0x18],XMM1
MULSS XMM0,dword ptr [RSP + 0x10]
MOVSS dword ptr [RSP + 0x14],XMM0
MOV EDI,EBX
OR EDI,0x1
MOV RSI,R12
MOV RDX,R13
MOV RCX,RBP
CALL 0x0013485c
MOVSS XMM4,dword ptr [RSP + 0x18]
MOVSS XMM2,dword ptr [RSP + 0x14]
MOVAPS XMM3,xmmword ptr [RSP + 0x40]
MOVZX EAX,byte ptr [RSP + 0xf]
CVTSI2SS XMM0,EAX
MOV AL,byte ptr [RSP + 0xe]
MULSS XMM4,XMM3
XOR ECX,ECX
LAB_001349bd:
CMP RCX,0x20
JZ 0x001349e7
MOV DL,byte ptr [R15 + RCX*0x1]
AND DL,0xf
MOVZX EDX,DL
CVTSI2SS XMM1,EDX
MULSS XMM1,XMM2
ADDSS XMM1,XMM4
MOVSS dword ptr [R14],XMM1
ADD R14,0x4
INC RCX
JMP 0x001349bd
LAB_001349e7:
MOVZX EAX,AL
CVTSI2SS XMM1,EAX
MULSS XMM0,dword ptr [RSP + 0x10]
MULSS XMM1,XMM3
XOR EAX,EAX
LAB_001349fa:
CMP RAX,0x20
JZ 0x00134a24
MOV CL,byte ptr [R15 + RAX*0x1]
SHR CL,0x4
MOVZX ECX,CL
CVTSI2SS XMM2,ECX
MULSS XMM2,XMM0
ADDSS XMM2,XMM1
MOVSS dword ptr [R14],XMM2
ADD R14,0x4
INC RAX
JMP 0x001349fa
LAB_00134a24:
ADD R15,0x20
ADD EBX,0x2
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,0x40
JMP 0x00134934
LAB_00134a37:
MOV RAX,qword ptr [RSP + 0x30]
INC RAX
MOV RDX,qword ptr [RSP + 0x20]
JMP 0x001348d5
LAB_00134a49:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00134a58:
LEA RDI,[0x15de4c]
LEA RSI,[0x15da64]
LEA RCX,[0x15dfeb]
MOV EDX,0x501
CALL 0x0011dfb0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void dequantize_row_q4_K(long param_1,float *param_2,ulong param_3)
{
ushort *puVar1;
long lVar2;
uint uVar3;
ushort *puVar4;
byte local_7a;
byte local_79;
float local_78;
float local_74;
float local_70;
uint local_6c;
ulong local_68;
long local_60;
ulong local_58;
long local_50;
float local_48;
int4 uStack_44;
int4 uStack_40;
int4 uStack_3c;
local_60 = param_1;
if ((char)param_3 != '\0') {
/* WARNING: Subroutine does not return */
__assert_fail("k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x501,
"void dequantize_row_q4_K(const block_q4_K *restrict, float *restrict, int64_t)");
}
local_58 = 0;
local_68 = param_3 >> 8 & 0xffffffff;
if ((int)(param_3 >> 8) < 1) {
local_68 = local_58;
}
for (; local_58 != local_68; local_58 = local_58 + 1) {
puVar1 = (ushort *)(local_60 + local_58 * 0x90);
puVar4 = puVar1 + 8;
local_78 = *(float *)(PTR_ggml_table_f32_f16_00172fa8 + (ulong)*puVar1 * 4);
local_48 = (float)(*(uint *)(PTR_ggml_table_f32_f16_00172fa8 + (ulong)puVar1[1] * 4) ^
_DAT_00152ea0);
local_50 = local_58 * 0x90 + local_60 + 4;
uVar3 = 0;
uStack_44 = _UNK_00152ea4;
uStack_40 = _UNK_00152ea8;
uStack_3c = _UNK_00152eac;
for (local_6c = 0; lVar2 = local_50, local_6c < 0x100; local_6c = local_6c + 0x40) {
get_scale_min_k4(uVar3,local_50,&local_79,&local_7a);
local_70 = (float)local_7a;
local_74 = (float)local_79 * local_78;
get_scale_min_k4(uVar3 | 1,lVar2,&local_79);
for (lVar2 = 0; lVar2 != 0x20; lVar2 = lVar2 + 1) {
*param_2 = (float)(*(byte *)((long)puVar4 + lVar2) & 0xf) * local_74 + local_70 * local_48;
param_2 = param_2 + 1;
}
for (lVar2 = 0; lVar2 != 0x20; lVar2 = lVar2 + 1) {
*param_2 = (float)(*(byte *)((long)puVar4 + lVar2) >> 4) * (float)local_79 * local_78 +
(float)local_7a * local_48;
param_2 = param_2 + 1;
}
puVar4 = puVar4 + 0x10;
uVar3 = uVar3 + 2;
}
}
return;
}
| |
37,429 | dequantize_row_q4_K | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | void dequantize_row_q4_K(const block_q4_K * restrict x, float * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int nb = k / QK_K;
for (int i = 0; i < nb; i++) {
const uint8_t * q = x[i].qs;
const float d = GGML_FP16_TO_FP32(x[i].d);
const float min = GGML_FP16_TO_FP32(x[i].dmin);
int is = 0;
uint8_t sc, m;
for (int j = 0; j < QK_K; j += 64) {
get_scale_min_k4(is + 0, x[i].scales, &sc, &m);
const float d1 = d * sc; const float m1 = min * m;
get_scale_min_k4(is + 1, x[i].scales, &sc, &m);
const float d2 = d * sc; const float m2 = min * m;
for (int l = 0; l < 32; ++l) *y++ = d1 * (q[l] & 0xF) - m1;
for (int l = 0; l < 32; ++l) *y++ = d2 * (q[l] >> 4) - m2;
q += 32; is += 2;
}
}
} | O3 | c | dequantize_row_q4_K:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testb %dl, %dl
jne 0x2fc26
shrq $0x8, %rdx
testl %edx, %edx
jle 0x2fc1d
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
xorl %eax, %eax
movq 0x3e516(%rip), %rcx # 0x6dfa8
movaps 0x1c5e7(%rip), %xmm0 # 0x4c080
leaq (%rax,%rax,8), %r9
shlq $0x4, %r9
leaq (%rdi,%r9), %r8
addq %rdi, %r9
addq $0x10, %r9
movzwl -0x10(%r9), %r10d
movss (%rcx,%r10,4), %xmm1
movzwl -0xe(%r9), %r10d
movss (%rcx,%r10,4), %xmm2
xorps %xmm0, %xmm2
xorl %r10d, %r10d
xorl %r11d, %r11d
cmpq $0x3, %r10
ja 0x2faf6
movb 0x4(%r8,%r10), %r14b
movb 0x5(%r8,%r10), %bl
andb $0x3f, %r14b
movb 0x8(%r8,%r10), %r15b
andb $0x3f, %r15b
andb $0x3f, %bl
movb 0x9(%r8,%r10), %bpl
andb $0x3f, %bpl
jmp 0x2fb53
movb 0x8(%r8,%r10), %bpl
movl %ebp, %r15d
andb $0xf, %r15b
movb (%r8,%r10), %r14b
movb 0x1(%r8,%r10), %bl
shrb $0x2, %r14b
andb $0x30, %r14b
orb %r15b, %r14b
shrb $0x4, %bpl
movb 0x4(%r8,%r10), %r15b
shrb $0x2, %r15b
andb $0x30, %r15b
orb %bpl, %r15b
movb 0x9(%r8,%r10), %r12b
movl %r12d, %ebp
andb $0xf, %bpl
shrb $0x2, %bl
andb $0x30, %bl
orb %bpl, %bl
shrb $0x4, %r12b
movb 0x5(%r8,%r10), %bpl
shrb $0x2, %bpl
andb $0x30, %bpl
orb %r12b, %bpl
movzbl %r14b, %r14d
xorps %xmm4, %xmm4
cvtsi2ss %r14d, %xmm4
mulss %xmm1, %xmm4
movzbl %r15b, %r14d
xorps %xmm5, %xmm5
cvtsi2ss %r14d, %xmm5
movzbl %bl, %ebx
xorps %xmm3, %xmm3
cvtsi2ss %ebx, %xmm3
mulss %xmm1, %xmm3
mulss %xmm2, %xmm5
xorl %ebx, %ebx
xorl %r14d, %r14d
movb (%r9,%r14), %r15b
andb $0xf, %r15b
movzbl %r15b, %r15d
xorps %xmm6, %xmm6
cvtsi2ss %r15d, %xmm6
mulss %xmm4, %xmm6
addss %xmm5, %xmm6
movss %xmm6, (%rsi,%r14,4)
incq %r14
addq $-0x4, %rbx
cmpq $0x20, %r14
jne 0x2fb86
movzbl %bpl, %ebp
xorps %xmm4, %xmm4
cvtsi2ss %ebp, %xmm4
mulss %xmm2, %xmm4
subq %rbx, %rsi
xorl %ebx, %ebx
movb (%r9,%rbx), %bpl
shrb $0x4, %bpl
movzbl %bpl, %ebp
xorps %xmm5, %xmm5
cvtsi2ss %ebp, %xmm5
mulss %xmm3, %xmm5
addss %xmm4, %xmm5
movss %xmm5, (%rsi)
addq $0x4, %rsi
incq %rbx
cmpq $0x20, %rbx
jne 0x2fbc9
addq $0x20, %r9
addq $0x2, %r10
leal 0x40(%r11), %ebx
cmpl $0xc0, %r11d
movl %ebx, %r11d
jb 0x2facb
incq %rax
cmpq %rdx, %rax
jne 0x2fa99
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2c4af(%rip), %rdi # 0x5c0dc
leaq 0x2c0c0(%rip), %rsi # 0x5bcf4
leaq 0x2c640(%rip), %rcx # 0x5c27b
movl $0x501, %edx # imm = 0x501
callq 0x16b00
| dequantize_row_q4_K:
push rbp
push r15
push r14
push r12
push rbx
test dl, dl
jnz loc_2FC26
shr rdx, 8
test edx, edx
jle loc_2FC1D
and edx, 7FFFFFFFh
xor eax, eax
mov rcx, cs:ggml_table_f32_f16_ptr
movaps xmm0, cs:xmmword_4C080
loc_2FA99:
lea r9, [rax+rax*8]
shl r9, 4
lea r8, [rdi+r9]
add r9, rdi
add r9, 10h
movzx r10d, word ptr [r9-10h]
movss xmm1, dword ptr [rcx+r10*4]
movzx r10d, word ptr [r9-0Eh]
movss xmm2, dword ptr [rcx+r10*4]
xorps xmm2, xmm0
xor r10d, r10d
xor r11d, r11d
loc_2FACB:
cmp r10, 3
ja short loc_2FAF6
mov r14b, [r8+r10+4]
mov bl, [r8+r10+5]
and r14b, 3Fh
mov r15b, [r8+r10+8]
and r15b, 3Fh
and bl, 3Fh
mov bpl, [r8+r10+9]
and bpl, 3Fh
jmp short loc_2FB53
loc_2FAF6:
mov bpl, [r8+r10+8]
mov r15d, ebp
and r15b, 0Fh
mov r14b, [r8+r10]
mov bl, [r8+r10+1]
shr r14b, 2
and r14b, 30h
or r14b, r15b
shr bpl, 4
mov r15b, [r8+r10+4]
shr r15b, 2
and r15b, 30h
or r15b, bpl
mov r12b, [r8+r10+9]
mov ebp, r12d
and bpl, 0Fh
shr bl, 2
and bl, 30h
or bl, bpl
shr r12b, 4
mov bpl, [r8+r10+5]
shr bpl, 2
and bpl, 30h
or bpl, r12b
loc_2FB53:
movzx r14d, r14b
xorps xmm4, xmm4
cvtsi2ss xmm4, r14d
mulss xmm4, xmm1
movzx r14d, r15b
xorps xmm5, xmm5
cvtsi2ss xmm5, r14d
movzx ebx, bl
xorps xmm3, xmm3
cvtsi2ss xmm3, ebx
mulss xmm3, xmm1
mulss xmm5, xmm2
xor ebx, ebx
xor r14d, r14d
loc_2FB86:
mov r15b, [r9+r14]
and r15b, 0Fh
movzx r15d, r15b
xorps xmm6, xmm6
cvtsi2ss xmm6, r15d
mulss xmm6, xmm4
addss xmm6, xmm5
movss dword ptr [rsi+r14*4], xmm6
inc r14
add rbx, 0FFFFFFFFFFFFFFFCh
cmp r14, 20h ; ' '
jnz short loc_2FB86
movzx ebp, bpl
xorps xmm4, xmm4
cvtsi2ss xmm4, ebp
mulss xmm4, xmm2
sub rsi, rbx
xor ebx, ebx
loc_2FBC9:
mov bpl, [r9+rbx]
shr bpl, 4
movzx ebp, bpl
xorps xmm5, xmm5
cvtsi2ss xmm5, ebp
mulss xmm5, xmm3
addss xmm5, xmm4
movss dword ptr [rsi], xmm5
add rsi, 4
inc rbx
cmp rbx, 20h ; ' '
jnz short loc_2FBC9
add r9, 20h ; ' '
add r10, 2
lea ebx, [r11+40h]
cmp r11d, 0C0h
mov r11d, ebx
jb loc_2FACB
inc rax
cmp rax, rdx
jnz loc_2FA99
loc_2FC1D:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_2FC26:
lea rdi, aKQkK0; "k % QK_K == 0"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidDequantize_6; "void dequantize_row_q4_K(const block_q4"...
mov edx, 501h
call ___assert_fail
| void dequantize_row_q4_K(long long a1, float *a2, unsigned long long a3)
{
unsigned long long v3; // rdx
long long v4; // rdx
long long v5; // rax
unsigned __int16 *v6; // r8
unsigned __int16 *v7; // r9
float v8; // xmm1_4
float v9; // xmm2_4
unsigned long long v10; // r10
unsigned int v11; // r11d
unsigned __int8 v12; // r14
unsigned __int8 v13; // r15
unsigned __int8 v14; // bl
unsigned __int8 v15; // bp
unsigned __int8 v16; // bp
unsigned __int8 v17; // r12
float v18; // xmm4_4
float v19; // xmm3_4
long long v20; // rbx
long long i; // r14
long long j; // rbx
bool v23; // cf
if ( (_BYTE)a3 )
__assert_fail(
"k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
1281LL,
"void dequantize_row_q4_K(const block_q4_K *restrict, float *restrict, int64_t)");
v3 = a3 >> 8;
if ( (int)v3 > 0 )
{
v4 = v3 & 0x7FFFFFFF;
v5 = 0LL;
do
{
v6 = (unsigned __int16 *)(a1 + 144 * v5);
v7 = v6 + 8;
v8 = ggml_table_f32_f16[*v6];
v9 = -ggml_table_f32_f16[v6[1]];
v10 = 0LL;
v11 = 0;
do
{
if ( v10 > 3 )
{
v16 = v6[v10 / 2 + 4];
v12 = v16 & 0xF | (LOBYTE(v6[v10 / 2]) >> 2) & 0x30;
v13 = (v16 >> 4) | (LOBYTE(v6[v10 / 2 + 2]) >> 2) & 0x30;
v17 = HIBYTE(v6[v10 / 2 + 4]);
v14 = v17 & 0xF | (HIBYTE(v6[v10 / 2]) >> 2) & 0x30;
v15 = (v17 >> 4) | (HIBYTE(v6[v10 / 2 + 2]) >> 2) & 0x30;
}
else
{
v12 = v6[v10 / 2 + 2] & 0x3F;
v13 = v6[v10 / 2 + 4] & 0x3F;
v14 = HIBYTE(v6[v10 / 2 + 2]) & 0x3F;
v15 = HIBYTE(v6[v10 / 2 + 4]) & 0x3F;
}
v18 = (float)v12 * v8;
v19 = (float)v14 * v8;
v20 = 0LL;
for ( i = 0LL; i != 32; ++i )
{
a2[i] = (float)((float)(*((_BYTE *)v7 + i) & 0xF) * v18) + (float)((float)v13 * v9);
v20 -= 4LL;
}
a2 = (float *)((char *)a2 - v20);
for ( j = 0LL; j != 32; ++j )
*a2++ = (float)((float)(*((_BYTE *)v7 + j) >> 4) * v19) + (float)((float)v15 * v9);
v7 += 16;
v10 += 2LL;
v23 = v11 < 0xC0;
v11 += 64;
}
while ( v23 );
++v5;
}
while ( v5 != v4 );
}
}
| dequantize_row_q4_K:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
TEST DL,DL
JNZ 0x0012fc26
SHR RDX,0x8
TEST EDX,EDX
JLE 0x0012fc1d
AND EDX,0x7fffffff
XOR EAX,EAX
MOV RCX,qword ptr [0x0016dfa8]
MOVAPS XMM0,xmmword ptr [0x0014c080]
LAB_0012fa99:
LEA R9,[RAX + RAX*0x8]
SHL R9,0x4
LEA R8,[RDI + R9*0x1]
ADD R9,RDI
ADD R9,0x10
MOVZX R10D,word ptr [R9 + -0x10]
MOVSS XMM1,dword ptr [RCX + R10*0x4]
MOVZX R10D,word ptr [R9 + -0xe]
MOVSS XMM2,dword ptr [RCX + R10*0x4]
XORPS XMM2,XMM0
XOR R10D,R10D
XOR R11D,R11D
LAB_0012facb:
CMP R10,0x3
JA 0x0012faf6
MOV R14B,byte ptr [R8 + R10*0x1 + 0x4]
MOV BL,byte ptr [R8 + R10*0x1 + 0x5]
AND R14B,0x3f
MOV R15B,byte ptr [R8 + R10*0x1 + 0x8]
AND R15B,0x3f
AND BL,0x3f
MOV BPL,byte ptr [R8 + R10*0x1 + 0x9]
AND BPL,0x3f
JMP 0x0012fb53
LAB_0012faf6:
MOV BPL,byte ptr [R8 + R10*0x1 + 0x8]
MOV R15D,EBP
AND R15B,0xf
MOV R14B,byte ptr [R8 + R10*0x1]
MOV BL,byte ptr [R8 + R10*0x1 + 0x1]
SHR R14B,0x2
AND R14B,0x30
OR R14B,R15B
SHR BPL,0x4
MOV R15B,byte ptr [R8 + R10*0x1 + 0x4]
SHR R15B,0x2
AND R15B,0x30
OR R15B,BPL
MOV R12B,byte ptr [R8 + R10*0x1 + 0x9]
MOV EBP,R12D
AND BPL,0xf
SHR BL,0x2
AND BL,0x30
OR BL,BPL
SHR R12B,0x4
MOV BPL,byte ptr [R8 + R10*0x1 + 0x5]
SHR BPL,0x2
AND BPL,0x30
OR BPL,R12B
LAB_0012fb53:
MOVZX R14D,R14B
XORPS XMM4,XMM4
CVTSI2SS XMM4,R14D
MULSS XMM4,XMM1
MOVZX R14D,R15B
XORPS XMM5,XMM5
CVTSI2SS XMM5,R14D
MOVZX EBX,BL
XORPS XMM3,XMM3
CVTSI2SS XMM3,EBX
MULSS XMM3,XMM1
MULSS XMM5,XMM2
XOR EBX,EBX
XOR R14D,R14D
LAB_0012fb86:
MOV R15B,byte ptr [R9 + R14*0x1]
AND R15B,0xf
MOVZX R15D,R15B
XORPS XMM6,XMM6
CVTSI2SS XMM6,R15D
MULSS XMM6,XMM4
ADDSS XMM6,XMM5
MOVSS dword ptr [RSI + R14*0x4],XMM6
INC R14
ADD RBX,-0x4
CMP R14,0x20
JNZ 0x0012fb86
MOVZX EBP,BPL
XORPS XMM4,XMM4
CVTSI2SS XMM4,EBP
MULSS XMM4,XMM2
SUB RSI,RBX
XOR EBX,EBX
LAB_0012fbc9:
MOV BPL,byte ptr [R9 + RBX*0x1]
SHR BPL,0x4
MOVZX EBP,BPL
XORPS XMM5,XMM5
CVTSI2SS XMM5,EBP
MULSS XMM5,XMM3
ADDSS XMM5,XMM4
MOVSS dword ptr [RSI],XMM5
ADD RSI,0x4
INC RBX
CMP RBX,0x20
JNZ 0x0012fbc9
ADD R9,0x20
ADD R10,0x2
LEA EBX,[R11 + 0x40]
CMP R11D,0xc0
MOV R11D,EBX
JC 0x0012facb
INC RAX
CMP RAX,RDX
JNZ 0x0012fa99
LAB_0012fc1d:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0012fc26:
LEA RDI,[0x15c0dc]
LEA RSI,[0x15bcf4]
LEA RCX,[0x15c27b]
MOV EDX,0x501
CALL 0x00116b00
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void dequantize_row_q4_K(long param_1,float *param_2,int8 param_3)
{
long lVar1;
float fVar2;
uint uVar3;
int *puVar4;
ulong uVar5;
uint uVar6;
byte bVar7;
long lVar8;
byte bVar9;
ushort *puVar10;
ushort *puVar11;
ulong uVar12;
uint uVar13;
byte bVar14;
long lVar15;
byte bVar16;
bool bVar17;
float fVar18;
puVar4 = PTR_ggml_table_f32_f16_0016dfa8;
uVar3 = _DAT_0014c080;
if ((char)param_3 == '\0') {
uVar6 = (uint)((ulong)param_3 >> 8);
if (0 < (int)uVar6) {
uVar5 = 0;
do {
lVar1 = param_1 + uVar5 * 0x90;
puVar10 = (ushort *)(uVar5 * 0x90 + param_1);
puVar11 = puVar10 + 8;
fVar2 = *(float *)(puVar4 + (ulong)*puVar10 * 4);
fVar18 = (float)(*(uint *)(puVar4 + (ulong)puVar10[1] * 4) ^ uVar3);
uVar12 = 0;
uVar13 = 0;
do {
if (uVar12 < 4) {
bVar14 = *(byte *)(lVar1 + 4 + uVar12) & 0x3f;
bVar16 = *(byte *)(lVar1 + 8 + uVar12) & 0x3f;
bVar7 = *(byte *)(lVar1 + 5 + uVar12) & 0x3f;
bVar9 = *(byte *)(lVar1 + 9 + uVar12) & 0x3f;
}
else {
bVar9 = *(byte *)(lVar1 + 8 + uVar12);
bVar14 = *(byte *)(lVar1 + uVar12) >> 2 & 0x30 | bVar9 & 0xf;
bVar16 = *(byte *)(lVar1 + 4 + uVar12) >> 2 & 0x30 | bVar9 >> 4;
bVar9 = *(byte *)(lVar1 + 9 + uVar12);
bVar7 = *(byte *)(lVar1 + 1 + uVar12) >> 2 & 0x30 | bVar9 & 0xf;
bVar9 = *(byte *)(lVar1 + 5 + uVar12) >> 2 & 0x30 | bVar9 >> 4;
}
lVar8 = 0;
lVar15 = 0;
do {
param_2[lVar15] =
(float)(*(byte *)((long)puVar11 + lVar15) & 0xf) * (float)bVar14 * fVar2 +
(float)bVar16 * fVar18;
lVar15 = lVar15 + 1;
lVar8 = lVar8 + -4;
} while (lVar15 != 0x20);
param_2 = (float *)((long)param_2 - lVar8);
lVar8 = 0;
do {
*param_2 = (float)(*(byte *)((long)puVar11 + lVar8) >> 4) * (float)bVar7 * fVar2 +
(float)bVar9 * fVar18;
param_2 = param_2 + 1;
lVar8 = lVar8 + 1;
} while (lVar8 != 0x20);
puVar11 = puVar11 + 0x10;
uVar12 = uVar12 + 2;
bVar17 = uVar13 < 0xc0;
uVar13 = uVar13 + 0x40;
} while (bVar17);
uVar5 = uVar5 + 1;
} while (uVar5 != (uVar6 & 0x7fffffff));
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x501,
"void dequantize_row_q4_K(const block_q4_K *restrict, float *restrict, int64_t)");
}
| |
37,430 | my_hash_sort_latin1_de | eloqsql/strings/ctype-latin1.c | void my_hash_sort_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
const uchar *end;
register ulong m1= *nr1, m2= *nr2;
/*
Remove end space. We have to do this to be able to compare
'AE' and 'Ä' as identical
*/
end= skip_trailing_space(key, len);
for (; key < end ; key++)
{
uint X= (uint) combo1map[(uint) *key];
MY_HASH_ADD(m1, m2, X);
if ((X= combo2map[*key]))
{
MY_HASH_ADD(m1, m2, X);
}
}
*nr1= m1;
*nr2= m2;
} | O0 | c | my_hash_sort_latin1_de:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x41620
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x41601
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0xff53d(%rip), %rax # 0x140aa0
movzbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
andq $0x3f, %rax
addq -0x40(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xff5f4(%rip), %rax # 0x140ba0
movzbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
je 0x415ee
jmp 0x415ba
movq -0x38(%rbp), %rax
andq $0x3f, %rax
addq -0x40(%rbp), %rax
movl -0x44(%rbp), %ecx
imulq %rcx, %rax
movq -0x38(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x40(%rbp)
jmp 0x415ee
jmp 0x415f0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x41543
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| my_hash_sort_latin1_de:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_40], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call skip_trailing_space_0
mov [rbp+var_30], rax
loc_41543:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_30]
jnb loc_41601
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov eax, eax
mov ecx, eax
lea rax, combo1map
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_44], eax
mov rax, [rbp+var_38]
and rax, 3Fh
add rax, [rbp+var_40]
mov ecx, [rbp+var_44]
imul rax, rcx
mov rcx, [rbp+var_38]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, combo2map
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_44], eax
cmp eax, 0
jz short loc_415EE
jmp short $+2
loc_415BA:
mov rax, [rbp+var_38]
and rax, 3Fh
add rax, [rbp+var_40]
mov ecx, [rbp+var_44]
imul rax, rcx
mov rcx, [rbp+var_38]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 3
mov [rbp+var_40], rax
jmp short $+2
loc_415EE:
jmp short $+2
loc_415F0:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_41543
loc_41601:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_40]
mov rax, [rbp+var_28]
mov [rax], rcx
add rsp, 50h
pop rbp
retn
| _QWORD * my_hash_sort_latin1_de(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5)
{
_QWORD *result; // rax
long long v6; // [rsp+10h] [rbp-40h]
long long v7; // [rsp+18h] [rbp-38h]
unsigned long long v8; // [rsp+20h] [rbp-30h]
unsigned __int8 *v11; // [rsp+40h] [rbp-10h]
v11 = a2;
v7 = *a4;
v6 = *a5;
v8 = skip_trailing_space_0(a2, a3);
while ( (unsigned long long)v11 < v8 )
{
v7 ^= (v7 << 8) + combo1map[*v11] * (v6 + (v7 & 0x3F));
v6 += 3LL;
if ( combo2map[*v11] )
{
v7 ^= (v7 << 8) + combo2map[*v11] * (v6 + (v7 & 0x3F));
v6 += 3LL;
}
++v11;
}
*a4 = v7;
result = a5;
*a5 = v6;
return result;
}
| my_hash_sort_latin1_de:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00141620
MOV qword ptr [RBP + -0x30],RAX
LAB_00141543:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x00141601
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x240aa0]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x240ba0]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JZ 0x001415ee
JMP 0x001415ba
LAB_001415ba:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x44]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001415ee
LAB_001415ee:
JMP 0x001415f0
LAB_001415f0:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00141543
LAB_00141601:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
ADD RSP,0x50
POP RBP
RET
|
void my_hash_sort_latin1_de
(int8 param_1,byte *param_2,int8 param_3,ulong *param_4,long *param_5)
{
long lVar1;
byte *pbVar2;
long local_48;
ulong local_40;
byte *local_18;
local_40 = *param_4;
local_48 = *param_5;
pbVar2 = (byte *)skip_trailing_space(param_2,param_3);
for (local_18 = param_2; local_18 < pbVar2; local_18 = local_18 + 1) {
local_40 = ((local_40 & 0x3f) + local_48) * (ulong)(byte)combo1map[*local_18] + local_40 * 0x100
^ local_40;
lVar1 = local_48 + 3;
if ((byte)combo2map[*local_18] != 0) {
local_40 = ((local_40 & 0x3f) + local_48 + 3) * (ulong)(uint)(byte)combo2map[*local_18] +
local_40 * 0x100 ^ local_40;
lVar1 = local_48 + 6;
}
local_48 = lVar1;
}
*param_4 = local_40;
*param_5 = local_48;
return;
}
| |
37,431 | typed_array_is_oob | bluesky950520[P]quickjs/quickjs.c | static BOOL typed_array_is_oob(JSObject *p)
{
JSArrayBuffer *abuf;
JSTypedArray *ta;
int len, size_elem;
int64_t end;
assert(p->class_id >= JS_CLASS_UINT8C_ARRAY);
assert(p->class_id <= JS_CLASS_FLOAT64_ARRAY);
ta = p->u.typed_array;
abuf = ta->buffer->u.array_buffer;
if (abuf->detached)
return TRUE;
len = abuf->byte_length;
if (ta->offset > len)
return TRUE;
if (ta->track_rab)
return FALSE;
if (len < (int64_t)ta->offset + ta->length)
return TRUE;
size_elem = 1 << typed_array_size_log2(p->class_id);
end = (int64_t)ta->offset + (int64_t)p->u.array.count * size_elem;
return end > len;
} | O0 | c | typed_array_is_oob:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rsp)
movq -0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rax
cmpb $0x0, 0x8(%rax)
je 0x5774d
movl $0x1, -0x4(%rsp)
jmp 0x57811
movq -0x18(%rsp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rsp)
movq -0x20(%rsp), %rax
movl 0x20(%rax), %eax
cmpl -0x24(%rsp), %eax
jbe 0x57773
movl $0x1, -0x4(%rsp)
jmp 0x57811
movq -0x20(%rsp), %rax
cmpl $0x0, 0x28(%rax)
je 0x5778b
movl $0x0, -0x4(%rsp)
jmp 0x57811
movslq -0x24(%rsp), %rax
movq -0x20(%rsp), %rcx
movl 0x20(%rcx), %ecx
movq -0x20(%rsp), %rdx
movl 0x24(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jge 0x577b2
movl $0x1, -0x4(%rsp)
jmp 0x57811
movq -0x10(%rsp), %rax
movzwl 0x6(%rax), %eax
subl $0x15, %eax
movslq %eax, %rcx
leaq 0xb3ab7(%rip), %rax # 0x10b27f
movzbl (%rax,%rcx), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x28(%rsp)
movq -0x20(%rsp), %rax
movl 0x20(%rax), %eax
movq -0x10(%rsp), %rcx
movl 0x40(%rcx), %ecx
movslq -0x28(%rsp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rsp)
movq -0x30(%rsp), %rax
movslq -0x24(%rsp), %rcx
cmpq %rcx, %rax
setg %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
| typed_array_is_oob:
mov [rsp+var_10], rdi
mov rax, [rsp+var_10]
mov rax, [rax+30h]
mov [rsp+var_20], rax
mov rax, [rsp+var_20]
mov rax, [rax+18h]
mov rax, [rax+30h]
mov [rsp+var_18], rax
mov rax, [rsp+var_18]
cmp byte ptr [rax+8], 0
jz short loc_5774D
mov [rsp+var_4], 1
jmp loc_57811
loc_5774D:
mov rax, [rsp+var_18]
mov eax, [rax]
mov [rsp+var_24], eax
mov rax, [rsp+var_20]
mov eax, [rax+20h]
cmp eax, [rsp+var_24]
jbe short loc_57773
mov [rsp+var_4], 1
jmp loc_57811
loc_57773:
mov rax, [rsp+var_20]
cmp dword ptr [rax+28h], 0
jz short loc_5778B
mov [rsp+var_4], 0
jmp loc_57811
loc_5778B:
movsxd rax, [rsp+var_24]
mov rcx, [rsp+var_20]
mov ecx, [rcx+20h]
mov rdx, [rsp+var_20]
mov edx, [rdx+24h]
add rcx, rdx
cmp rax, rcx
jge short loc_577B2
mov [rsp+var_4], 1
jmp short loc_57811
loc_577B2:
mov rax, [rsp+var_10]
movzx eax, word ptr [rax+6]
sub eax, 15h
movsxd rcx, eax
lea rax, typed_array_size_log2
movzx ecx, byte ptr [rax+rcx]
mov eax, 1
shl eax, cl
mov [rsp+var_28], eax
mov rax, [rsp+var_20]
mov eax, [rax+20h]
mov rcx, [rsp+var_10]
mov ecx, [rcx+40h]
movsxd rdx, [rsp+var_28]
imul rcx, rdx
add rax, rcx
mov [rsp+var_30], rax
mov rax, [rsp+var_30]
movsxd rcx, [rsp+var_24]
cmp rax, rcx
setnle al
and al, 1
movzx eax, al
mov [rsp+var_4], eax
loc_57811:
mov eax, [rsp+var_4]
retn
| _BOOL8 typed_array_is_oob(long long a1)
{
unsigned int v2; // [rsp+Ch] [rbp-24h]
long long v3; // [rsp+10h] [rbp-20h]
unsigned int *v4; // [rsp+18h] [rbp-18h]
v3 = *(_QWORD *)(a1 + 48);
v4 = *(unsigned int **)(*(_QWORD *)(v3 + 24) + 48LL);
if ( *((_BYTE *)v4 + 8) )
{
return 1;
}
else
{
v2 = *v4;
if ( *(_DWORD *)(v3 + 32) <= *v4 )
{
if ( *(_DWORD *)(v3 + 40) )
return 0;
else
return (int)v2 < (long long)(*(unsigned int *)(v3 + 36) + (unsigned long long)*(unsigned int *)(v3 + 32))
|| (long long)((1 << typed_array_size_log2[*(unsigned __int16 *)(a1 + 6) - 21])
* (unsigned long long)*(unsigned int *)(a1 + 64)
+ *(unsigned int *)(v3 + 32)) > (int)v2;
}
else
{
return 1;
}
}
}
| typed_array_is_oob:
MOV qword ptr [RSP + -0x10],RDI
MOV RAX,qword ptr [RSP + -0x10]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + -0x18],RAX
MOV RAX,qword ptr [RSP + -0x18]
CMP byte ptr [RAX + 0x8],0x0
JZ 0x0015774d
MOV dword ptr [RSP + -0x4],0x1
JMP 0x00157811
LAB_0015774d:
MOV RAX,qword ptr [RSP + -0x18]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + -0x24],EAX
MOV RAX,qword ptr [RSP + -0x20]
MOV EAX,dword ptr [RAX + 0x20]
CMP EAX,dword ptr [RSP + -0x24]
JBE 0x00157773
MOV dword ptr [RSP + -0x4],0x1
JMP 0x00157811
LAB_00157773:
MOV RAX,qword ptr [RSP + -0x20]
CMP dword ptr [RAX + 0x28],0x0
JZ 0x0015778b
MOV dword ptr [RSP + -0x4],0x0
JMP 0x00157811
LAB_0015778b:
MOVSXD RAX,dword ptr [RSP + -0x24]
MOV RCX,qword ptr [RSP + -0x20]
MOV ECX,dword ptr [RCX + 0x20]
MOV RDX,qword ptr [RSP + -0x20]
MOV EDX,dword ptr [RDX + 0x24]
ADD RCX,RDX
CMP RAX,RCX
JGE 0x001577b2
MOV dword ptr [RSP + -0x4],0x1
JMP 0x00157811
LAB_001577b2:
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,word ptr [RAX + 0x6]
SUB EAX,0x15
MOVSXD RCX,EAX
LEA RAX,[0x20b27f]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
MOV EAX,0x1
SHL EAX,CL
MOV dword ptr [RSP + -0x28],EAX
MOV RAX,qword ptr [RSP + -0x20]
MOV EAX,dword ptr [RAX + 0x20]
MOV RCX,qword ptr [RSP + -0x10]
MOV ECX,dword ptr [RCX + 0x40]
MOVSXD RDX,dword ptr [RSP + -0x28]
IMUL RCX,RDX
ADD RAX,RCX
MOV qword ptr [RSP + -0x30],RAX
MOV RAX,qword ptr [RSP + -0x30]
MOVSXD RCX,dword ptr [RSP + -0x24]
CMP RAX,RCX
SETG AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + -0x4],EAX
LAB_00157811:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
bool typed_array_is_oob(long param_1)
{
uint uVar1;
long lVar2;
uint *puVar3;
bool bVar4;
lVar2 = *(long *)(param_1 + 0x30);
puVar3 = *(uint **)(*(long *)(lVar2 + 0x18) + 0x30);
if ((char)puVar3[2] == '\0') {
uVar1 = *puVar3;
if (uVar1 < *(uint *)(lVar2 + 0x20)) {
bVar4 = true;
}
else if (*(int *)(lVar2 + 0x28) == 0) {
if ((long)(int)uVar1 < (long)((ulong)*(uint *)(lVar2 + 0x20) + (ulong)*(uint *)(lVar2 + 0x24))
) {
bVar4 = true;
}
else {
bVar4 = (long)(int)uVar1 <
(long)((ulong)*(uint *)(lVar2 + 0x20) +
(ulong)*(uint *)(param_1 + 0x40) *
(long)(1 << ((&typed_array_size_log2)[(int)(*(ushort *)(param_1 + 6) - 0x15)]
& 0x1f)));
}
}
else {
bVar4 = false;
}
}
else {
bVar4 = true;
}
return bVar4;
}
| |
37,432 | typed_array_is_oob | bluesky950520[P]quickjs/quickjs.c | static BOOL typed_array_is_oob(JSObject *p)
{
JSArrayBuffer *abuf;
JSTypedArray *ta;
int len, size_elem;
int64_t end;
assert(p->class_id >= JS_CLASS_UINT8C_ARRAY);
assert(p->class_id <= JS_CLASS_FLOAT64_ARRAY);
ta = p->u.typed_array;
abuf = ta->buffer->u.array_buffer;
if (abuf->detached)
return TRUE;
len = abuf->byte_length;
if (ta->offset > len)
return TRUE;
if (ta->track_rab)
return FALSE;
if (len < (int64_t)ta->offset + ta->length)
return TRUE;
size_elem = 1 << typed_array_size_log2(p->class_id);
end = (int64_t)ta->offset + (int64_t)p->u.array.count * size_elem;
return end > len;
} | O2 | c | typed_array_is_oob:
movq 0x30(%rdi), %r8
movq 0x18(%r8), %rax
movq 0x30(%rax), %rax
pushq $0x1
popq %rcx
cmpb $0x0, 0x8(%rax)
jne 0x31cda
movslq (%rax), %rdx
movl 0x20(%r8), %esi
cmpl %edx, %esi
jbe 0x31cdd
movl %ecx, %eax
retq
xorl %eax, %eax
cmpl $0x0, 0x28(%r8)
je 0x31ce7
retq
movl 0x24(%r8), %r8d
addq %rsi, %r8
movl %ecx, %eax
cmpq %rdx, %r8
jg 0x31ce6
movzwl 0x6(%rdi), %eax
leaq 0x5147f(%rip), %rcx # 0x8317f
movb -0x15(%rax,%rcx), %cl
pushq $0x1
popq %rax
shll %cl, %eax
movl 0x40(%rdi), %ecx
movslq %eax, %rdi
imulq %rcx, %rdi
addq %rsi, %rdi
xorl %eax, %eax
cmpq %rdx, %rdi
setg %al
retq
| typed_array_is_oob:
mov r8, [rdi+30h]
mov rax, [r8+18h]
mov rax, [rax+30h]
push 1
pop rcx
cmp byte ptr [rax+8], 0
jnz short loc_31CDA
movsxd rdx, dword ptr [rax]
mov esi, [r8+20h]
cmp esi, edx
jbe short loc_31CDD
loc_31CDA:
mov eax, ecx
retn
loc_31CDD:
xor eax, eax
cmp dword ptr [r8+28h], 0
jz short loc_31CE7
locret_31CE6:
retn
loc_31CE7:
mov r8d, [r8+24h]
add r8, rsi
mov eax, ecx
cmp r8, rdx
jg short locret_31CE6
movzx eax, word ptr [rdi+6]
lea rcx, typed_array_size_log2
mov cl, [rax+rcx-15h]
push 1
pop rax
shl eax, cl
mov ecx, [rdi+40h]
movsxd rdi, eax
imul rdi, rcx
add rdi, rsi
xor eax, eax
cmp rdi, rdx
setnle al
retn
| _BOOL8 typed_array_is_oob(long long a1)
{
long long v1; // r8
int *v2; // rax
signed long long v3; // rdx
long long v4; // rsi
_BOOL8 result; // rax
v1 = *(_QWORD *)(a1 + 48);
v2 = *(int **)(*(_QWORD *)(v1 + 24) + 48LL);
if ( *((_BYTE *)v2 + 8) )
return 1LL;
v3 = *v2;
v4 = *(unsigned int *)(v1 + 32);
if ( (unsigned int)v4 > (unsigned int)v3 )
return 1LL;
result = 0LL;
if ( !*(_DWORD *)(v1 + 40) )
{
result = 1LL;
if ( v4 + *(unsigned int *)(v1 + 36) <= v3 )
return v4 + *(unsigned int *)(a1 + 64) * (long long)(1 << typed_array_size_log2[*(unsigned __int16 *)(a1 + 6) - 21]) > v3;
}
return result;
}
| typed_array_is_oob:
MOV R8,qword ptr [RDI + 0x30]
MOV RAX,qword ptr [R8 + 0x18]
MOV RAX,qword ptr [RAX + 0x30]
PUSH 0x1
POP RCX
CMP byte ptr [RAX + 0x8],0x0
JNZ 0x00131cda
MOVSXD RDX,dword ptr [RAX]
MOV ESI,dword ptr [R8 + 0x20]
CMP ESI,EDX
JBE 0x00131cdd
LAB_00131cda:
MOV EAX,ECX
RET
LAB_00131cdd:
XOR EAX,EAX
CMP dword ptr [R8 + 0x28],0x0
JZ 0x00131ce7
LAB_00131ce6:
RET
LAB_00131ce7:
MOV R8D,dword ptr [R8 + 0x24]
ADD R8,RSI
MOV EAX,ECX
CMP R8,RDX
JG 0x00131ce6
MOVZX EAX,word ptr [RDI + 0x6]
LEA RCX,[0x18317f]
MOV CL,byte ptr [RAX + RCX*0x1 + -0x15]
PUSH 0x1
POP RAX
SHL EAX,CL
MOV ECX,dword ptr [RDI + 0x40]
MOVSXD RDI,EAX
IMUL RDI,RCX
ADD RDI,RSI
XOR EAX,EAX
CMP RDI,RDX
SETG AL
RET
|
bool typed_array_is_oob(long param_1)
{
uint uVar1;
uint uVar2;
long lVar3;
uint *puVar4;
bool bVar5;
lVar3 = *(long *)(param_1 + 0x30);
puVar4 = *(uint **)(*(long *)(lVar3 + 0x18) + 0x30);
if ((char)puVar4[2] == '\0') {
uVar1 = *puVar4;
uVar2 = *(uint *)(lVar3 + 0x20);
if (uVar2 <= uVar1) {
bVar5 = false;
if ((*(int *)(lVar3 + 0x28) == 0) &&
(bVar5 = true, (long)((ulong)*(uint *)(lVar3 + 0x24) + (ulong)uVar2) <= (long)(int)uVar1))
{
return (long)(int)uVar1 <
(long)((long)(1 << ("toSorted"[(ulong)*(ushort *)(param_1 + 6) + 6] & 0x1fU)) *
(ulong)*(uint *)(param_1 + 0x40) + (ulong)uVar2);
}
return bVar5;
}
}
return true;
}
| |
37,433 | ft_add_word | eloqsql/storage/myisam/ft_parser.c | static int ft_add_word(MYSQL_FTPARSER_PARAM *param,
const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
{
TREE *wtree;
FT_WORD w;
MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam;
DBUG_ENTER("ft_add_word");
wtree= ft_param->wtree;
if (param->flags & MYSQL_FTFLAGS_NEED_COPY)
{
uchar *ptr;
DBUG_ASSERT(wtree->with_delete == 0);
ptr= (uchar *)alloc_root(ft_param->mem_root, word_len);
memcpy(ptr, word, word_len);
w.pos= ptr;
}
else
w.pos= (uchar*) word;
w.len= word_len;
if (!tree_insert(wtree, &w, 0, wtree->custom_arg))
{
delete_tree(wtree, 0);
DBUG_RETURN(1);
}
DBUG_RETURN(0);
} | O0 | c | ft_add_word:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x34(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xaa0b1
jmp 0xaa07f
jmp 0xaa081
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rdi
movslq -0x1c(%rbp), %rsi
callq 0xf4f90
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x29090
movq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0xaa0b9
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x230(%rax), %rcx
leaq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0x102400
cmpq $0x0, %rax
jne 0xaa0f5
movq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x102230
movl $0x1, -0x4(%rbp)
jmp 0xaa0fe
jmp 0xaa0f7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| ft_add_word:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov eax, [rax+34h]
and eax, 1
cmp eax, 0
jz short loc_AA0B1
jmp short $+2
loc_AA07F:
jmp short $+2
loc_AA081:
mov rax, [rbp+var_50]
mov rdi, [rax+8]
movsxd rsi, [rbp+var_1C]
call alloc_root
mov [rbp+var_58], rax
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_18]
movsxd rdx, [rbp+var_1C]
call _memcpy
mov rax, [rbp+var_58]
mov [rbp+var_48], rax
jmp short loc_AA0B9
loc_AA0B1:
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
loc_AA0B9:
movsxd rax, [rbp+var_1C]
mov [rbp+var_38], rax
mov rdi, [rbp+var_30]
mov rax, [rbp+var_30]
mov rcx, [rax+230h]
lea rsi, [rbp+var_48]
xor edx, edx
call tree_insert
cmp rax, 0
jnz short loc_AA0F5
mov rdi, [rbp+var_30]
xor esi, esi
call delete_tree
mov [rbp+var_4], 1
jmp short loc_AA0FE
loc_AA0F5:
jmp short $+2
loc_AA0F7:
mov [rbp+var_4], 0
loc_AA0FE:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long ft_add_word(long long a1, long long a2, int a3, long long a4)
{
long long v5; // [rsp+8h] [rbp-58h]
long long *v6; // [rsp+10h] [rbp-50h]
_QWORD v7[3]; // [rsp+18h] [rbp-48h] BYREF
long long v8; // [rsp+30h] [rbp-30h]
long long v9; // [rsp+38h] [rbp-28h]
int v10; // [rsp+44h] [rbp-1Ch]
long long v11; // [rsp+48h] [rbp-18h]
long long v12; // [rsp+50h] [rbp-10h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = a4;
v6 = *(long long **)(a1 + 24);
v8 = *v6;
if ( (*(_DWORD *)(a1 + 52) & 1) != 0 )
{
v5 = alloc_root(v6[1], v10);
memcpy(v5, v11, v10);
v7[0] = v5;
}
else
{
v7[0] = v11;
}
v7[2] = v10;
if ( tree_insert(v8, v7, 0LL, *(_QWORD *)(v8 + 560)) )
{
return 0;
}
else
{
delete_tree(v8, 0LL);
return 1;
}
}
| ft_add_word:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x34]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001aa0b1
JMP 0x001aa07f
LAB_001aa07f:
JMP 0x001aa081
LAB_001aa081:
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x8]
MOVSXD RSI,dword ptr [RBP + -0x1c]
CALL 0x001f4f90
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x18]
MOVSXD RDX,dword ptr [RBP + -0x1c]
CALL 0x00129090
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001aa0b9
LAB_001aa0b1:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
LAB_001aa0b9:
MOVSXD RAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX + 0x230]
LEA RSI,[RBP + -0x48]
XOR EDX,EDX
CALL 0x00202400
CMP RAX,0x0
JNZ 0x001aa0f5
MOV RDI,qword ptr [RBP + -0x30]
XOR ESI,ESI
CALL 0x00202230
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001aa0fe
LAB_001aa0f5:
JMP 0x001aa0f7
LAB_001aa0f7:
MOV dword ptr [RBP + -0x4],0x0
LAB_001aa0fe:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
bool ft_add_word(long param_1,void *param_2,int param_3,int8 param_4)
{
void *__dest;
long lVar1;
void *local_50 [2];
long local_40;
long local_38;
int8 local_30;
int local_24;
void *local_20;
long local_18;
local_38 = **(long **)(param_1 + 0x18);
local_50[0] = param_2;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((*(uint *)(param_1 + 0x34) & 1) != 0) {
__dest = (void *)alloc_root((*(long **)(param_1 + 0x18))[1],(long)param_3);
memcpy(__dest,local_20,(long)local_24);
local_50[0] = __dest;
}
local_40 = (long)local_24;
lVar1 = tree_insert(local_38,local_50,0,*(int8 *)(local_38 + 0x230));
if (lVar1 == 0) {
delete_tree(local_38,0);
}
return lVar1 == 0;
}
| |
37,434 | my_caseup_str_mb | eloqsql/strings/ctype-mb.c | size_t my_caseup_str_mb(CHARSET_INFO * cs, char *str)
{
register uint32 l;
register const uchar *map= cs->to_upper;
char *str_orig= str;
while (*str)
{
/* Pointing after the '\0' is safe here. */
if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen)))
str+= l;
else
{
*str= (char) map[(uchar)*str];
str++;
}
}
return (size_t) (str - str_orig);
} | O0 | c | my_caseup_str_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x40277
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x9c(%rax), %eax
addq %rax, %rdx
callq 0x40290
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x40255
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x40275
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x40214
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_caseup_str_mb:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax+50h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
loc_40214:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz short loc_40277
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
mov rax, [rbp+var_8]
mov eax, [rax+9Ch]
add rdx, rax
call my_ismbchar_0
mov [rbp+var_14], eax
cmp eax, 0
jz short loc_40255
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp short loc_40275
loc_40255:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
loc_40275:
jmp short loc_40214
loc_40277:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_28]
sub rax, rcx
add rsp, 30h
pop rbp
retn
| _BYTE * my_caseup_str_mb(long long a1, _BYTE *a2)
{
long long v3; // [rsp+10h] [rbp-20h]
unsigned int v4; // [rsp+1Ch] [rbp-14h]
_BYTE *v5; // [rsp+20h] [rbp-10h]
v5 = a2;
v3 = *(_QWORD *)(a1 + 80);
while ( *v5 )
{
v4 = my_ismbchar_0(a1, v5, &v5[*(unsigned int *)(a1 + 156)]);
if ( v4 )
{
v5 += v4;
}
else
{
*v5 = *(_BYTE *)(v3 + (unsigned __int8)*v5);
++v5;
}
}
return (_BYTE *)(v5 - a2);
}
| my_caseup_str_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
LAB_00140214:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x00140277
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x9c]
ADD RDX,RAX
CALL 0x00140290
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JZ 0x00140255
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00140275
LAB_00140255:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
LAB_00140275:
JMP 0x00140214
LAB_00140277:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
ADD RSP,0x30
POP RBP
RET
|
long my_caseup_str_mb(long param_1,byte *param_2)
{
long lVar1;
uint uVar2;
byte *local_18;
lVar1 = *(long *)(param_1 + 0x50);
local_18 = param_2;
while (*local_18 != 0) {
uVar2 = my_ismbchar(param_1,local_18,local_18 + *(uint *)(param_1 + 0x9c));
if (uVar2 == 0) {
*local_18 = *(byte *)(lVar1 + (ulong)*local_18);
local_18 = local_18 + 1;
}
else {
local_18 = local_18 + uVar2;
}
}
return (long)local_18 - (long)param_2;
}
| |
37,435 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>) | monkey531[P]llama/common/json.hpp | basic_json& operator=(basic_json other) noexcept (
std::is_nothrow_move_constructible<value_t>::value&&
std::is_nothrow_move_assignable<value_t>::value&&
std::is_nothrow_move_constructible<json_value>::value&&
std::is_nothrow_move_assignable<json_value>::value&&
std::is_nothrow_move_assignable<json_base_class_t>::value
)
{
// check that passed value is valid
other.assert_invariant();
using std::swap;
swap(m_data.m_type, other.m_data.m_type);
swap(m_data.m_value, other.m_data.m_value);
json_base_class_t::operator=(std::move(other));
set_parents();
assert_invariant();
return *this;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>):
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rbp
movq %rsi, %rdi
movl %ebp, %esi
callq 0x3d72c
movb (%r14), %al
movb (%rbx), %cl
movb %cl, (%r14)
movb %al, (%rbx)
movq 0x8(%r14), %rax
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%r14)
movq %rax, 0x8(%rbx)
movq %r14, %rdi
movl %ebp, %esi
callq 0x3d72c
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_:
push rbp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
push 1
pop rbp
mov rdi, rsi
mov esi, ebp
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 al, [r14]
mov cl, [rbx]
mov [r14], cl
mov [rbx], al
mov rax, [r14+8]
mov rcx, [rbx+8]
mov [r14+8], rcx
mov [rbx+8], rax
mov rdi, r14
mov esi, ebp
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 rax, r14
pop rbx
pop r14
pop rbp
retn
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
long long a1,
long long a2)
{
char v2; // al
long long v3; // 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>::assert_invariant((char *)a2);
v2 = *(_BYTE *)a1;
*(_BYTE *)a1 = *(_BYTE *)a2;
*(_BYTE *)a2 = v2;
v3 = *(_QWORD *)(a1 + 8);
*(_QWORD *)(a1 + 8) = *(_QWORD *)(a2 + 8);
*(_QWORD *)(a2 + 8) = v3;
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 a1;
}
| operator=:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
PUSH 0x1
POP RBP
MOV RDI,RSI
MOV ESI,EBP
CALL 0x0013d72c
MOV AL,byte ptr [R14]
MOV CL,byte ptr [RBX]
MOV byte ptr [R14],CL
MOV byte ptr [RBX],AL
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [R14 + 0x8],RCX
MOV qword ptr [RBX + 0x8],RAX
MOV RDI,R14
MOV ESI,EBP
CALL 0x0013d72c
MOV RAX,R14
POP RBX
POP R14
POP RBP
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>::TEMPNAMEPLACEHOLDERVALUE(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<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>
* __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_2)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
int8 uVar2;
assert_invariant(SUB81(param_2,0));
bVar1 = *this;
*this = *param_2;
*param_2 = bVar1;
uVar2 = *(int8 *)(this + 8);
*(int8 *)(this + 8) = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = uVar2;
assert_invariant(SUB81(this,0));
return this;
}
| |
37,436 | httplib::detail::SocketStream::is_writable() const | hkr04[P]cpp-mcp/common/httplib.h | inline bool SocketStream::is_writable() const {
return select_write(sock_, write_timeout_sec_, write_timeout_usec_) > 0 &&
is_socket_alive(sock_);
} | O3 | c | httplib::detail::SocketStream::is_writable() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl 0x8(%rdi), %r14d
cmpl $0x3ff, %r14d # imm = 0x3FF
jg 0x16346
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdx
movaps %xmm0, 0x70(%rdx)
movaps %xmm0, 0x60(%rdx)
movaps %xmm0, 0x50(%rdx)
movaps %xmm0, 0x40(%rdx)
movaps %xmm0, 0x30(%rdx)
movaps %xmm0, 0x20(%rdx)
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
leal 0x3f(%r14), %eax
testl %r14d, %r14d
cmovnsl %r14d, %eax
movl %eax, %esi
andl $-0x40, %esi
movl %r14d, %ecx
subl %esi, %ecx
movl $0x1, %esi
shlq %cl, %rsi
sarl $0x6, %eax
cltq
orq %rsi, 0x20(%rsp,%rax,8)
movups 0x20(%rdi), %xmm0
leaq 0x10(%rsp), %r8
movaps %xmm0, (%r8)
incl %r14d
movl %r14d, %edi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x8540
testl %eax, %eax
js 0x162e9
testl %eax, %eax
je 0x16346
movl 0x8(%rbx), %edi
callq 0x18482
jmp 0x16348
callq 0x8060
cmpl $0x4, (%rax)
jne 0x16346
movq %rax, %r15
movq %rsp, %r12
leaq 0x20(%rsp), %r13
leaq 0x10(%rsp), %rbp
movq $0x0, (%rsp)
movq $0x3e8, 0x8(%rsp) # imm = 0x3E8
movq %r12, %rdi
movq %r12, %rsi
callq 0x8130
cmpl $-0x1, %eax
jne 0x1632a
cmpl $0x4, (%r15)
je 0x16314
movl %r14d, %edi
xorl %esi, %esi
movq %r13, %rdx
xorl %ecx, %ecx
movq %rbp, %r8
callq 0x8540
testl %eax, %eax
jns 0x162db
cmpl $0x4, (%r15)
je 0x16303
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZNK7httplib6detail12SocketStream11is_writableEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov r14d, [rdi+8]
cmp r14d, 3FFh
jg loc_16346
mov rbx, rdi
xorps xmm0, xmm0
lea rdx, [rsp+0D8h+var_B8]
movaps xmmword ptr [rdx+70h], xmm0
movaps xmmword ptr [rdx+60h], xmm0
movaps xmmword ptr [rdx+50h], xmm0
movaps xmmword ptr [rdx+40h], xmm0
movaps xmmword ptr [rdx+30h], xmm0
movaps xmmword ptr [rdx+20h], xmm0
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
lea eax, [r14+3Fh]
test r14d, r14d
cmovns eax, r14d
mov esi, eax
and esi, 0FFFFFFC0h
mov ecx, r14d
sub ecx, esi
mov esi, 1
shl rsi, cl
sar eax, 6
cdqe
or [rsp+rax*8+0D8h+var_B8], rsi
movups xmm0, xmmword ptr [rdi+20h]
lea r8, [rsp+0D8h+var_C8]
movaps xmmword ptr [r8], xmm0
inc r14d
mov edi, r14d
xor esi, esi; int
xor ecx, ecx
call _select
test eax, eax
js short loc_162E9
loc_162DB:
test eax, eax
jz short loc_16346
mov edi, [rbx+8]; this
call _ZN7httplib6detail15is_socket_aliveEi; httplib::detail::is_socket_alive(int)
jmp short loc_16348
loc_162E9:
call ___errno_location
cmp dword ptr [rax], 4
jnz short loc_16346
mov r15, rax
mov r12, rsp
lea r13, [rsp+0D8h+var_B8]
lea rbp, [rsp+0D8h+var_C8]
loc_16303:
mov [rsp+0D8h+var_D8], 0
mov [rsp+0D8h+var_D0], 3E8h
loc_16314:
mov rdi, r12
mov rsi, r12
call _nanosleep
cmp eax, 0FFFFFFFFh
jnz short loc_1632A
cmp dword ptr [r15], 4
jz short loc_16314
loc_1632A:
mov edi, r14d
xor esi, esi
mov rdx, r13
xor ecx, ecx
mov r8, rbp
call _select
test eax, eax
jns short loc_162DB
cmp dword ptr [r15], 4
jz short loc_16303
loc_16346:
xor eax, eax
loc_16348:
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long httplib::detail::SocketStream::is_writable(httplib::detail::SocketStream *this)
{
char v1; // al
int v2; // r14d
unsigned int v3; // r14d
int v4; // eax
_DWORD *v6; // rax
_DWORD *v7; // r15
_QWORD v8[2]; // [rsp+0h] [rbp-D8h] BYREF
__int128 v9; // [rsp+10h] [rbp-C8h]
_QWORD v10[23]; // [rsp+20h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 2);
if ( v2 > 1023 )
return 0LL;
memset(v10, 0, 128);
v10[v2 / 64] |= 1LL << (v2 - (v1 & 0xC0u));
v9 = *((_OWORD *)this + 2);
v3 = v2 + 1;
v4 = select(v3, 0LL, v10, 0LL);
if ( v4 < 0 )
{
v6 = (_DWORD *)__errno_location(v3, 0LL);
if ( *v6 != 4 )
return 0LL;
v7 = v6;
while ( 1 )
{
v8[0] = 0LL;
v8[1] = 1000LL;
while ( (unsigned int)nanosleep(v8, v8) == -1 && *v7 == 4 )
;
v4 = select(v3, 0LL, v10, 0LL);
if ( v4 >= 0 )
break;
if ( *v7 != 4 )
return 0LL;
}
}
if ( v4 )
return httplib::detail::is_socket_alive((httplib::detail *)*((unsigned int *)this + 2), 0);
return 0LL;
}
| is_writable:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R14D,dword ptr [RDI + 0x8]
CMP R14D,0x3ff
JG 0x00116346
MOV RBX,RDI
XORPS XMM0,XMM0
LEA RDX,[RSP + 0x20]
MOVAPS xmmword ptr [RDX + 0x70],XMM0
MOVAPS xmmword ptr [RDX + 0x60],XMM0
MOVAPS xmmword ptr [RDX + 0x50],XMM0
MOVAPS xmmword ptr [RDX + 0x40],XMM0
MOVAPS xmmword ptr [RDX + 0x30],XMM0
MOVAPS xmmword ptr [RDX + 0x20],XMM0
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
LEA EAX,[R14 + 0x3f]
TEST R14D,R14D
CMOVNS EAX,R14D
MOV ESI,EAX
AND ESI,0xffffffc0
MOV ECX,R14D
SUB ECX,ESI
MOV ESI,0x1
SHL RSI,CL
SAR EAX,0x6
CDQE
OR qword ptr [RSP + RAX*0x8 + 0x20],RSI
MOVUPS XMM0,xmmword ptr [RDI + 0x20]
LEA R8,[RSP + 0x10]
MOVAPS xmmword ptr [R8],XMM0
INC R14D
MOV EDI,R14D
XOR ESI,ESI
XOR ECX,ECX
CALL 0x00108540
TEST EAX,EAX
JS 0x001162e9
LAB_001162db:
TEST EAX,EAX
JZ 0x00116346
MOV EDI,dword ptr [RBX + 0x8]
CALL 0x00118482
JMP 0x00116348
LAB_001162e9:
CALL 0x00108060
CMP dword ptr [RAX],0x4
JNZ 0x00116346
MOV R15,RAX
MOV R12,RSP
LEA R13,[RSP + 0x20]
LEA RBP,[RSP + 0x10]
LAB_00116303:
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x3e8
LAB_00116314:
MOV RDI,R12
MOV RSI,R12
CALL 0x00108130
CMP EAX,-0x1
JNZ 0x0011632a
CMP dword ptr [R15],0x4
JZ 0x00116314
LAB_0011632a:
MOV EDI,R14D
XOR ESI,ESI
MOV RDX,R13
XOR ECX,ECX
MOV R8,RBP
CALL 0x00108540
TEST EAX,EAX
JNS 0x001162db
CMP dword ptr [R15],0x4
JZ 0x00116303
LAB_00116346:
XOR EAX,EAX
LAB_00116348:
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* httplib::detail::SocketStream::is_writable() const */
int8 __thiscall httplib::detail::SocketStream::is_writable(SocketStream *this)
{
int iVar1;
int iVar2;
int8 uVar3;
int *piVar4;
timespec local_d8;
timeval local_c8;
fd_set local_b8;
iVar1 = *(int *)(this + 8);
if (iVar1 < 0x400) {
local_b8.fds_bits[0xe] = 0;
local_b8.fds_bits[0xf] = 0;
local_b8.fds_bits[0xc] = 0;
local_b8.fds_bits[0xd] = 0;
local_b8.fds_bits[10] = 0;
local_b8.fds_bits[0xb] = 0;
local_b8.fds_bits[8] = 0;
local_b8.fds_bits[9] = 0;
local_b8.fds_bits[6] = 0;
local_b8.fds_bits[7] = 0;
local_b8.fds_bits[4] = 0;
local_b8.fds_bits[5] = 0;
local_b8.fds_bits[2] = 0;
local_b8.fds_bits[3] = 0;
local_b8.fds_bits[0] = 0;
local_b8.fds_bits[1] = 0;
iVar2 = iVar1 + 0x3f;
if (-1 < iVar1) {
iVar2 = iVar1;
}
local_b8.fds_bits[iVar2 >> 6] =
local_b8.fds_bits[iVar2 >> 6] | 1L << ((byte)(iVar1 % 0x40) & 0x3f);
local_c8.tv_sec = *(__time_t *)(this + 0x20);
local_c8.tv_usec = *(__suseconds_t *)(this + 0x28);
iVar2 = select(iVar1 + 1,(fd_set *)0x0,&local_b8,(fd_set *)0x0,&local_c8);
if (iVar2 < 0) {
piVar4 = __errno_location();
if (*piVar4 == 4) {
do {
local_d8.tv_sec = 0;
local_d8.tv_nsec = 1000;
do {
iVar2 = nanosleep(&local_d8,&local_d8);
if (iVar2 != -1) break;
} while (*piVar4 == 4);
iVar2 = select(iVar1 + 1,(fd_set *)0x0,&local_b8,(fd_set *)0x0,&local_c8);
if (-1 < iVar2) goto LAB_001162db;
} while (*piVar4 == 4);
}
}
else {
LAB_001162db:
if (iVar2 != 0) {
uVar3 = is_socket_alive(*(int *)(this + 8));
return uVar3;
}
}
}
return 0;
}
| |
37,437 | mysql_data_seek | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void STDCALL
mysql_data_seek(MYSQL_RES *result, unsigned long long row)
{
MYSQL_ROWS *tmp=0;
if (result->data)
for (tmp=result->data->data; row-- && tmp ; tmp = tmp->next) ;
result->current_row=0;
result->data_cursor = tmp;
} | O0 | c | mysql_data_seek:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x43dbd
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x19(%rbp)
je 0x43da3
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x43dac
jmp 0x43dbb
jmp 0x43dae
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x43d7e
jmp 0x43dbd
movq -0x8(%rbp), %rax
movq $0x0, 0x68(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopw (%rax,%rax)
| mysql_data_seek:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+18h], 0
jz short loc_43DBD
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov rax, [rax]
mov [rbp+var_18], rax
loc_43D7E:
mov rcx, [rbp+var_10]
mov rax, rcx
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rax
xor eax, eax
cmp rcx, 0
mov [rbp+var_19], al
jz short loc_43DA3
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_19], al
loc_43DA3:
mov al, [rbp+var_19]
test al, 1
jnz short loc_43DAC
jmp short loc_43DBB
loc_43DAC:
jmp short $+2
loc_43DAE:
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_43D7E
loc_43DBB:
jmp short $+2
loc_43DBD:
mov rax, [rbp+var_8]
mov qword ptr [rax+68h], 0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+20h], rcx
pop rbp
retn
| long long mysql_data_seek(long long a1, long long a2)
{
long long v2; // rcx
long long result; // rax
bool v4; // [rsp+1h] [rbp-19h]
_QWORD *i; // [rsp+2h] [rbp-18h]
i = 0LL;
if ( *(_QWORD *)(a1 + 24) )
{
for ( i = **(_QWORD ***)(a1 + 24); ; i = (_QWORD *)*i )
{
v2 = a2--;
v4 = 0;
if ( v2 )
v4 = i != 0LL;
if ( !v4 )
break;
}
}
*(_QWORD *)(a1 + 104) = 0LL;
result = a1;
*(_QWORD *)(a1 + 32) = i;
return result;
}
| mysql_data_seek:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x00143dbd
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_00143d7e:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,RCX
ADD RAX,-0x1
MOV qword ptr [RBP + -0x10],RAX
XOR EAX,EAX
CMP RCX,0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x00143da3
CMP qword ptr [RBP + -0x18],0x0
SETNZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_00143da3:
MOV AL,byte ptr [RBP + -0x19]
TEST AL,0x1
JNZ 0x00143dac
JMP 0x00143dbb
LAB_00143dac:
JMP 0x00143dae
LAB_00143dae:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00143d7e
LAB_00143dbb:
JMP 0x00143dbd
LAB_00143dbd:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x68],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
POP RBP
RET
|
void mysql_data_seek(long param_1,long param_2)
{
int8 *local_20;
long local_18;
local_20 = (int8 *)0x0;
if (*(long *)(param_1 + 0x18) != 0) {
local_18 = param_2;
for (local_20 = (int8 *)**(int8 **)(param_1 + 0x18);
local_18 != 0 && local_20 != (int8 *)0x0; local_20 = (int8 *)*local_20) {
local_18 = local_18 + -1;
}
}
*(int8 *)(param_1 + 0x68) = 0;
*(int8 **)(param_1 + 0x20) = local_20;
return;
}
| |
37,438 | engine_check | navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/engine.c | uint32_t
engine_check(const char ** name)
{
int i ;
uint32_t max = 0 ;
for (i=0; i<ENGINE_MAX_INSTANCES; i++) {
if (_engine_instance[i].statemachine) {
if (_engine_instance[i].timer) {
uint32_t time = engine_timestamp() - _engine_instance[i].timer ;
if (time > max) {
max = time ;
if (*name) *name = parts_get_action_name(_engine_instance[i].action & STATES_ACTION_ID_MASK) ;
}
}
} else {
break ;
}
}
return max ;
} | O3 | c | engine_check:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movl $0xd4, %r12d
leaq 0x2f5b3(%rip), %r13 # 0x3f730
cmpq $0x0, -0xcc(%r12,%r13)
je 0x101ce
cmpl $0x0, -0x4(%r12,%r13)
je 0x101be
callq 0xdebf
movl %eax, %r15d
subl -0x4(%r12,%r13), %r15d
cmpl %r14d, %r15d
jbe 0x101be
cmpq $0x0, (%rbx)
je 0x101bb
movzwl (%r12,%r13), %edi
andl $0xfff, %edi # imm = 0xFFF
callq 0x812a
movq %rax, (%rbx)
movl %r15d, %r14d
addq $0xd8, %r12
cmpq $0x11b4, %r12 # imm = 0x11B4
jne 0x1017d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| engine_check:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
xor r14d, r14d
mov r12d, 0D4h
lea r13, _engine_instance
loc_1017D:
cmp qword ptr [r12+r13-0CCh], 0
jz short loc_101CE
cmp dword ptr [r12+r13-4], 0
jz short loc_101BE
call engine_timestamp
mov r15d, eax
sub r15d, [r12+r13-4]
cmp r15d, r14d
jbe short loc_101BE
cmp qword ptr [rbx], 0
jz short loc_101BB
movzx edi, word ptr [r12+r13]
and edi, 0FFFh
call parts_get_action_name
mov [rbx], rax
loc_101BB:
mov r14d, r15d
loc_101BE:
add r12, 0D8h
cmp r12, 11B4h
jnz short loc_1017D
loc_101CE:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long engine_check(long long *a1)
{
long long *v1; // rbx
unsigned int v2; // r14d
long long i; // r12
unsigned int v4; // r15d
v1 = a1;
v2 = 0;
for ( i = 212LL; i != 4532; i += 216LL )
{
if ( !*(_QWORD *)((char *)&engine_instance + i - 204) )
break;
if ( *(_DWORD *)((char *)&engine_instance + i - 4) )
{
v4 = engine_timestamp(a1) - *(_DWORD *)((char *)&engine_instance + i - 4);
if ( v4 > v2 )
{
if ( *v1 )
{
a1 = (long long *)(*(_WORD *)((_BYTE *)&engine_instance + i) & 0xFFF);
*v1 = parts_get_action_name((__int16)a1);
}
v2 = v4;
}
}
}
return v2;
}
| engine_check:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
XOR R14D,R14D
MOV R12D,0xd4
LEA R13,[0x13f730]
LAB_0011017d:
CMP qword ptr [R12 + R13*0x1 + -0xcc],0x0
JZ 0x001101ce
CMP dword ptr [R12 + R13*0x1 + -0x4],0x0
JZ 0x001101be
CALL 0x0010debf
MOV R15D,EAX
SUB R15D,dword ptr [R12 + R13*0x1 + -0x4]
CMP R15D,R14D
JBE 0x001101be
CMP qword ptr [RBX],0x0
JZ 0x001101bb
MOVZX EDI,word ptr [R12 + R13*0x1]
AND EDI,0xfff
CALL 0x0010812a
MOV qword ptr [RBX],RAX
LAB_001101bb:
MOV R14D,R15D
LAB_001101be:
ADD R12,0xd8
CMP R12,0x11b4
JNZ 0x0011017d
LAB_001101ce:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint engine_check(long *param_1)
{
int iVar1;
long lVar2;
long lVar3;
uint uVar4;
uint uVar5;
uVar4 = 0;
lVar3 = 0xd4;
do {
if (*(long *)(lVar3 + 0x13f664) == 0) {
return uVar4;
}
if (*(int *)(lVar3 + 0x13f72c) != 0) {
iVar1 = engine_timestamp();
uVar5 = iVar1 - *(int *)(lVar3 + 0x13f72c);
if ((uVar4 < uVar5) && (uVar4 = uVar5, *param_1 != 0)) {
lVar2 = parts_get_action_name(*(ushort *)((long)&_engine_instance + lVar3) & 0xfff);
*param_1 = lVar2;
}
}
lVar3 = lVar3 + 0xd8;
} while (lVar3 != 0x11b4);
return uVar4;
}
| |
37,439 | blst_p2_affine_compress | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e2.c | void blst_p2_affine_compress(unsigned char out[96], const POINTonE2_affine *in)
{
if (vec_is_zero(in->X, 2*sizeof(in->X))) {
bytes_zero(out, 96);
out[0] = 0xc0; /* compressed and infinity bits */
} else {
limb_t sign = POINTonE2_affine_Compress_BE(out, in);
out[0] |= (unsigned char)(0x80 | ((sign & 2) << 4));
}
} | O0 | c | blst_p2_affine_compress:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0xc0, %esi
callq 0xa8cd0
cmpq $0x0, %rax
je 0xabffb
movq -0x8(%rbp), %rdi
movl $0x60, %esi
callq 0xa8f80
movq -0x8(%rbp), %rax
movb $-0x40, (%rax)
jmp 0xac02c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xac040
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x2, %rax
shlq $0x4, %rax
orq $0x80, %rax
movzbl %al, %edx
movq -0x8(%rbp), %rax
movzbl (%rax), %ecx
orl %edx, %ecx
movb %cl, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| blst_p2_affine_compress:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_10]
mov esi, 0C0h
call vec_is_zero
cmp rax, 0
jz short loc_ABFFB
mov rdi, [rbp+var_8]
mov esi, 60h ; '`'
call bytes_zero
mov rax, [rbp+var_8]
mov byte ptr [rax], 0C0h
jmp short loc_AC02C
loc_ABFFB:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call POINTonE2_affine_Compress_BE
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
and rax, 2
shl rax, 4
or rax, 80h
movzx edx, al
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax]
or ecx, edx
mov [rax], cl
loc_AC02C:
add rsp, 20h
pop rbp
retn
| _BYTE * blst_p2_affine_compress(_BYTE *a1, long long a2)
{
_BYTE *result; // rax
char v3; // dl
if ( vec_is_zero(a2, 0xC0uLL) )
{
bytes_zero((long long)a1, 0x60uLL);
result = a1;
*a1 = -64;
}
else
{
v3 = (16 * (POINTonE2_affine_Compress_BE(a1, a2) & 2)) | 0x80;
result = a1;
*a1 |= v3;
}
return result;
}
| blst_p2_affine_compress:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0xc0
CALL 0x001a8cd0
CMP RAX,0x0
JZ 0x001abffb
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x60
CALL 0x001a8f80
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0xc0
JMP 0x001ac02c
LAB_001abffb:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001ac040
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x2
SHL RAX,0x4
OR RAX,0x80
MOVZX EDX,AL
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX]
OR ECX,EDX
MOV byte ptr [RAX],CL
LAB_001ac02c:
ADD RSP,0x20
POP RBP
RET
|
void blst_p2_affine_compress(byte *param_1,int8 param_2)
{
long lVar1;
ulong uVar2;
lVar1 = vec_is_zero(param_2,0xc0);
if (lVar1 == 0) {
uVar2 = POINTonE2_affine_Compress_BE(param_1,param_2);
*param_1 = *param_1 | (byte)((uVar2 & 2) << 4) | 0x80;
}
else {
bytes_zero(param_1,0x60);
*param_1 = 0xc0;
}
return;
}
| |
37,440 | my_coll_lexem_next | eloqsql/strings/ctype-uca.c | static my_coll_lexem_num my_coll_lexem_next(MY_COLL_LEXEM *lexem)
{
const char *beg;
my_coll_lexem_num rc;
for (beg= lexem->beg ; beg < lexem->end ; beg++)
{
switch (*beg)
{
case ' ':
case '\t':
case '\r':
case '\n':
continue;
case '[': /* Bracket expression, e.g. "[optimize [a-z]]" */
{
size_t nbrackets; /* Indicates nested recursion level */
for (beg++, nbrackets= 1 ; beg < lexem->end; beg++)
{
if (*beg == '[') /* Enter nested bracket expression */
nbrackets++;
else if (*beg == ']')
{
if (--nbrackets == 0)
{
rc= MY_COLL_LEXEM_OPTION;
beg++;
goto ex;
}
}
}
rc= MY_COLL_LEXEM_ERROR;
goto ex;
}
case '&':
beg++;
rc= MY_COLL_LEXEM_RESET;
goto ex;
case '=':
beg++;
lexem->diff= 0;
rc= MY_COLL_LEXEM_SHIFT;
goto ex;
case '/':
beg++;
rc= MY_COLL_LEXEM_EXTEND;
goto ex;
case '|':
beg++;
rc= MY_COLL_LEXEM_CONTEXT;
goto ex;
case '<': /* Shift: '<' or '<<' or '<<<' or '<<<<' */
{
/* Scan up to 3 additional '<' characters */
for (beg++, lexem->diff= 1;
(beg < lexem->end) && (*beg == '<') && (lexem->diff <= 3);
beg++, lexem->diff++);
rc= MY_COLL_LEXEM_SHIFT;
goto ex;
}
default:
break;
}
/* Escaped character, e.g. \u1234 */
if ((*beg == '\\') && (beg + 2 < lexem->end) &&
(beg[1] == 'u') && my_isxdigit(&my_charset_utf8mb3_general_ci, beg[2]))
{
int ch;
beg+= 2;
lexem->code= 0;
while ((beg < lexem->end) && ((ch= ch2x(beg[0])) >= 0))
{
lexem->code= (lexem->code << 4) + ch;
beg++;
}
rc= MY_COLL_LEXEM_CHAR;
goto ex;
}
/*
Unescaped single byte character:
allow printable ASCII range except SPACE and
special characters parsed above []<&/|=
*/
if (*beg >= 0x21 && *beg <= 0x7E)
{
lexem->code= *beg++;
rc= MY_COLL_LEXEM_CHAR;
goto ex;
}
if (((uchar) *beg) > 0x7F) /* Unescaped multibyte character */
{
CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci;
my_wc_t wc;
int nbytes= my_ci_mb_wc(cs, &wc, (uchar *) beg, (uchar *) lexem->end);
if (nbytes > 0)
{
rc= MY_COLL_LEXEM_CHAR;
beg+= nbytes;
lexem->code= (int) wc;
goto ex;
}
}
rc= MY_COLL_LEXEM_ERROR;
goto ex;
}
rc= MY_COLL_LEXEM_EOF;
ex:
lexem->prev= lexem->beg;
lexem->beg= beg;
lexem->term= rc;
return rc;
} | O0 | c | my_coll_lexem_next:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x5a7eb
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x40(%rbp)
addl $-0x9, %eax
subl $0x2, %eax
jb 0x5a4d5
jmp 0x5a46e
movl -0x40(%rbp), %eax
subl $0xd, %eax
je 0x5a4d5
jmp 0x5a478
movl -0x40(%rbp), %eax
subl $0x20, %eax
je 0x5a4d5
jmp 0x5a482
movl -0x40(%rbp), %eax
subl $0x26, %eax
je 0x5a56c
jmp 0x5a490
movl -0x40(%rbp), %eax
subl $0x2f, %eax
je 0x5a5a7
jmp 0x5a49e
movl -0x40(%rbp), %eax
subl $0x3c, %eax
je 0x5a5d7
jmp 0x5a4ac
movl -0x40(%rbp), %eax
subl $0x3d, %eax
je 0x5a584
jmp 0x5a4ba
movl -0x40(%rbp), %eax
subl $0x5b, %eax
je 0x5a4da
jmp 0x5a4c4
movl -0x40(%rbp), %eax
subl $0x7c, %eax
je 0x5a5bf
jmp 0x5a652
jmp 0x5a7da
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq $0x1, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x5a560
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0x5a516
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x5a550
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5d, %eax
jne 0x5a54e
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x5a54c
movl $0x7, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x5a7f2
jmp 0x5a54e
jmp 0x5a550
jmp 0x5a552
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x5a4ee
movl $0x6, -0x14(%rbp)
jmp 0x5a7f2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl $0x4, -0x14(%rbp)
jmp 0x5a7f2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x20(%rax)
movl $0x1, -0x14(%rbp)
jmp 0x5a7f2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl $0x8, -0x14(%rbp)
jmp 0x5a7f2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl $0x9, -0x14(%rbp)
jmp 0x5a7f2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl $0x1, 0x20(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x10(%rdx), %rcx
movb %al, -0x41(%rbp)
jae 0x5a620
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x3c, %ecx
movb %al, -0x41(%rbp)
jne 0x5a620
movq -0x8(%rbp), %rax
cmpl $0x3, 0x20(%rax)
setle %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x5a629
jmp 0x5a646
jmp 0x5a62b
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
jmp 0x5a5ee
movl $0x1, -0x14(%rbp)
jmp 0x5a7f2
jmp 0x5a654
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x5a726
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x5a726
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x75, %eax
jne 0x5a726
leaq 0x33439e(%rip), %rax # 0x38ea30
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x5a726
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x10(%rdx), %rcx
movb %al, -0x42(%rbp)
jae 0x5a6ef
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x5a840
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
setge %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0x5a6f8
jmp 0x5a71a
movq -0x8(%rbp), %rax
movl 0x24(%rax), %ecx
shll $0x4, %ecx
addl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x5a6c4
movl $0x5, -0x14(%rbp)
jmp 0x5a7f2
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x21, %eax
jl 0x5a763
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jg 0x5a763
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movsbl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movl $0x5, -0x14(%rbp)
jmp 0x5a7f2
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x7f, %eax
jle 0x5a7d1
leaq 0x3342ba(%rip), %rax # 0x38ea30
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
leaq -0x38(%rbp), %rsi
callq *%rax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jle 0x5a7cf
movl $0x5, -0x14(%rbp)
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x5a7f2
jmp 0x5a7d1
movl $0x6, -0x14(%rbp)
jmp 0x5a7f2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x5a448
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x14(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
| my_coll_lexem_next:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_10], rax
loc_5A448:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jnb loc_5A7EB
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
mov [rbp+var_40], eax
add eax, 0FFFFFFF7h
sub eax, 2
jb short loc_5A4D5
jmp short $+2
loc_5A46E:
mov eax, [rbp+var_40]
sub eax, 0Dh
jz short loc_5A4D5
jmp short $+2
loc_5A478:
mov eax, [rbp+var_40]
sub eax, 20h ; ' '
jz short loc_5A4D5
jmp short $+2
loc_5A482:
mov eax, [rbp+var_40]
sub eax, 26h ; '&'
jz loc_5A56C
jmp short $+2
loc_5A490:
mov eax, [rbp+var_40]
sub eax, 2Fh ; '/'
jz loc_5A5A7
jmp short $+2
loc_5A49E:
mov eax, [rbp+var_40]
sub eax, 3Ch ; '<'
jz loc_5A5D7
jmp short $+2
loc_5A4AC:
mov eax, [rbp+var_40]
sub eax, 3Dh ; '='
jz loc_5A584
jmp short $+2
loc_5A4BA:
mov eax, [rbp+var_40]
sub eax, 5Bh ; '['
jz short loc_5A4DA
jmp short $+2
loc_5A4C4:
mov eax, [rbp+var_40]
sub eax, 7Ch ; '|'
jz loc_5A5BF
jmp loc_5A652
loc_5A4D5:
jmp loc_5A7DA
loc_5A4DA:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov [rbp+var_20], 1
loc_5A4EE:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jnb short loc_5A560
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Bh ; '['
jnz short loc_5A516
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_5A550
loc_5A516:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Dh ; ']'
jnz short loc_5A54E
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_5A54C
mov [rbp+var_14], 7
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_5A7F2
loc_5A54C:
jmp short $+2
loc_5A54E:
jmp short $+2
loc_5A550:
jmp short $+2
loc_5A552:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_5A4EE
loc_5A560:
mov [rbp+var_14], 6
jmp loc_5A7F2
loc_5A56C:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov [rbp+var_14], 4
jmp loc_5A7F2
loc_5A584:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov dword ptr [rax+20h], 0
mov [rbp+var_14], 1
jmp loc_5A7F2
loc_5A5A7:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov [rbp+var_14], 8
jmp loc_5A7F2
loc_5A5BF:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov [rbp+var_14], 9
jmp loc_5A7F2
loc_5A5D7:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov dword ptr [rax+20h], 1
loc_5A5EE:
mov rcx, [rbp+var_10]
mov rdx, [rbp+var_8]
xor eax, eax
cmp rcx, [rdx+10h]
mov [rbp+var_41], al
jnb short loc_5A620
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 3Ch ; '<'
mov [rbp+var_41], al
jnz short loc_5A620
mov rax, [rbp+var_8]
cmp dword ptr [rax+20h], 3
setle al
mov [rbp+var_41], al
loc_5A620:
mov al, [rbp+var_41]
test al, 1
jnz short loc_5A629
jmp short loc_5A646
loc_5A629:
jmp short $+2
loc_5A62B:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov ecx, [rax+20h]
add ecx, 1
mov [rax+20h], ecx
jmp short loc_5A5EE
loc_5A646:
mov [rbp+var_14], 1
jmp loc_5A7F2
loc_5A652:
jmp short $+2
loc_5A654:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Ch ; '\'
jnz loc_5A726
mov rax, [rbp+var_10]
add rax, 2
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jnb loc_5A726
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
cmp eax, 75h ; 'u'
jnz loc_5A726
lea rax, my_charset_utf8mb3_general_ci
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+2]
movzx eax, byte ptr [rax+rcx+1]
and eax, 80h
cmp eax, 0
jz short loc_5A726
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov dword ptr [rax+24h], 0
loc_5A6C4:
mov rcx, [rbp+var_10]
mov rdx, [rbp+var_8]
xor eax, eax
cmp rcx, [rdx+10h]
mov [rbp+var_42], al
jnb short loc_5A6EF
mov rax, [rbp+var_10]
movsx edi, byte ptr [rax]
call ch2x
mov [rbp+var_24], eax
cmp eax, 0
setnl al
mov [rbp+var_42], al
loc_5A6EF:
mov al, [rbp+var_42]
test al, 1
jnz short loc_5A6F8
jmp short loc_5A71A
loc_5A6F8:
mov rax, [rbp+var_8]
mov ecx, [rax+24h]
shl ecx, 4
add ecx, [rbp+var_24]
mov rax, [rbp+var_8]
mov [rax+24h], ecx
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_5A6C4
loc_5A71A:
mov [rbp+var_14], 5
jmp loc_5A7F2
loc_5A726:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 21h ; '!'
jl short loc_5A763
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 7Eh ; '~'
jg short loc_5A763
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movsx ecx, byte ptr [rax]
mov rax, [rbp+var_8]
mov [rax+24h], ecx
mov [rbp+var_14], 5
jmp loc_5A7F2
loc_5A763:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 7Fh
jle short loc_5A7D1
lea rax, my_charset_utf8mb3_general_ci
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov rdi, [rbp+var_30]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_8]
mov rcx, [rcx+10h]
lea rsi, [rbp+var_38]
call rax
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jle short loc_5A7CF
mov [rbp+var_14], 5
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_38]
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+24h], ecx
jmp short loc_5A7F2
loc_5A7CF:
jmp short $+2
loc_5A7D1:
mov [rbp+var_14], 6
jmp short loc_5A7F2
loc_5A7DA:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_5A448
loc_5A7EB:
mov [rbp+var_14], 0
loc_5A7F2:
mov rax, [rbp+var_8]
mov rcx, [rax+8]
mov rax, [rbp+var_8]
mov [rax+18h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+8], rcx
mov ecx, [rbp+var_14]
mov rax, [rbp+var_8]
mov [rax], ecx
mov eax, [rbp+var_14]
add rsp, 50h
pop rbp
retn
| long long my_coll_lexem_next(long long a1)
{
char *v1; // rax
bool v3; // [rsp+Eh] [rbp-42h]
bool v4; // [rsp+Fh] [rbp-41h]
int v5; // [rsp+10h] [rbp-40h]
int v6; // [rsp+14h] [rbp-3Ch]
_QWORD v7[2]; // [rsp+18h] [rbp-38h] BYREF
int v8; // [rsp+2Ch] [rbp-24h]
long long v9; // [rsp+30h] [rbp-20h]
unsigned int v10; // [rsp+3Ch] [rbp-14h]
unsigned __int8 *i; // [rsp+40h] [rbp-10h]
long long v12; // [rsp+48h] [rbp-8h]
v12 = a1;
for ( i = *(unsigned __int8 **)(a1 + 8); ; ++i )
{
if ( (unsigned long long)i >= *(_QWORD *)(v12 + 16) )
{
v10 = 0;
goto LABEL_52;
}
v5 = (char)*i;
if ( (unsigned int)(v5 - 9) >= 2 && v5 != 13 && v5 != 32 )
break;
}
switch ( v5 )
{
case '&':
++i;
v10 = 4;
break;
case '/':
++i;
v10 = 8;
break;
case '<':
++i;
for ( *(_DWORD *)(v12 + 32) = 1; ; ++*(_DWORD *)(v12 + 32) )
{
v4 = 0;
if ( (unsigned long long)i < *(_QWORD *)(v12 + 16) )
{
v4 = 0;
if ( *i == 60 )
v4 = *(_DWORD *)(v12 + 32) <= 3;
}
if ( !v4 )
break;
++i;
}
v10 = 1;
break;
case '=':
++i;
*(_DWORD *)(v12 + 32) = 0;
v10 = 1;
break;
case '[':
++i;
v9 = 1LL;
while ( (unsigned long long)i < *(_QWORD *)(v12 + 16) )
{
if ( *i == 91 )
{
++v9;
}
else if ( *i == 93 && !--v9 )
{
v10 = 7;
++i;
goto LABEL_52;
}
++i;
}
v10 = 6;
break;
case '|':
++i;
v10 = 9;
break;
default:
if ( *i == 92
&& (unsigned long long)(i + 2) < *(_QWORD *)(v12 + 16)
&& i[1] == 117
&& (*(_BYTE *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + i[2] + 1LL) & 0x80) != 0 )
{
i += 2;
*(_DWORD *)(v12 + 36) = 0;
while ( 1 )
{
v3 = 0;
if ( (unsigned long long)i < *(_QWORD *)(v12 + 16) )
{
v8 = ch2x((unsigned int)(char)*i);
v3 = v8 >= 0;
}
if ( !v3 )
break;
*(_DWORD *)(v12 + 36) = v8 + 16 * *(_DWORD *)(v12 + 36);
++i;
}
v10 = 5;
}
else if ( (char)*i < 33 || *i == 127 )
{
if ( *i <= 0x7Fu
|| (v7[1] = my_charset_utf8mb3_general_ci,
v6 = (*(long long ( **)(unsigned int *, _QWORD *, unsigned __int8 *, _QWORD))(*(_QWORD *)&my_charset_utf8mb3_general_ci[46]
+ 40LL))(
my_charset_utf8mb3_general_ci,
v7,
i,
*(_QWORD *)(v12 + 16)),
v6 <= 0) )
{
v10 = 6;
}
else
{
v10 = 5;
i += v6;
*(_DWORD *)(v12 + 36) = v7[0];
}
}
else
{
v1 = (char *)i++;
*(_DWORD *)(v12 + 36) = *v1;
v10 = 5;
}
break;
}
LABEL_52:
*(_QWORD *)(v12 + 24) = *(_QWORD *)(v12 + 8);
*(_QWORD *)(v12 + 8) = i;
*(_DWORD *)v12 = v10;
return v10;
}
| my_coll_lexem_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x10],RAX
LAB_0015a448:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x0015a7eb
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x40],EAX
ADD EAX,-0x9
SUB EAX,0x2
JC 0x0015a4d5
JMP 0x0015a46e
LAB_0015a46e:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0xd
JZ 0x0015a4d5
JMP 0x0015a478
LAB_0015a478:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x20
JZ 0x0015a4d5
JMP 0x0015a482
LAB_0015a482:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x26
JZ 0x0015a56c
JMP 0x0015a490
LAB_0015a490:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x2f
JZ 0x0015a5a7
JMP 0x0015a49e
LAB_0015a49e:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x3c
JZ 0x0015a5d7
JMP 0x0015a4ac
LAB_0015a4ac:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x3d
JZ 0x0015a584
JMP 0x0015a4ba
LAB_0015a4ba:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x5b
JZ 0x0015a4da
JMP 0x0015a4c4
LAB_0015a4c4:
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,0x7c
JZ 0x0015a5bf
JMP 0x0015a652
LAB_0015a4d5:
JMP 0x0015a7da
LAB_0015a4da:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV qword ptr [RBP + -0x20],0x1
LAB_0015a4ee:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x0015a560
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5b
JNZ 0x0015a516
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0015a550
LAB_0015a516:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5d
JNZ 0x0015a54e
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x0015a54c
MOV dword ptr [RBP + -0x14],0x7
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0015a7f2
LAB_0015a54c:
JMP 0x0015a54e
LAB_0015a54e:
JMP 0x0015a550
LAB_0015a550:
JMP 0x0015a552
LAB_0015a552:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0015a4ee
LAB_0015a560:
MOV dword ptr [RBP + -0x14],0x6
JMP 0x0015a7f2
LAB_0015a56c:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV dword ptr [RBP + -0x14],0x4
JMP 0x0015a7f2
LAB_0015a584:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x20],0x0
MOV dword ptr [RBP + -0x14],0x1
JMP 0x0015a7f2
LAB_0015a5a7:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV dword ptr [RBP + -0x14],0x8
JMP 0x0015a7f2
LAB_0015a5bf:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV dword ptr [RBP + -0x14],0x9
JMP 0x0015a7f2
LAB_0015a5d7:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x20],0x1
LAB_0015a5ee:
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x10]
MOV byte ptr [RBP + -0x41],AL
JNC 0x0015a620
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x3c
MOV byte ptr [RBP + -0x41],AL
JNZ 0x0015a620
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x20],0x3
SETLE AL
MOV byte ptr [RBP + -0x41],AL
LAB_0015a620:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x0015a629
JMP 0x0015a646
LAB_0015a629:
JMP 0x0015a62b
LAB_0015a62b:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x20]
ADD ECX,0x1
MOV dword ptr [RAX + 0x20],ECX
JMP 0x0015a5ee
LAB_0015a646:
MOV dword ptr [RBP + -0x14],0x1
JMP 0x0015a7f2
LAB_0015a652:
JMP 0x0015a654
LAB_0015a654:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5c
JNZ 0x0015a726
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x0015a726
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x75
JNZ 0x0015a726
LEA RAX,[0x48ea30]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x2]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0015a726
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x24],0x0
LAB_0015a6c4:
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x10]
MOV byte ptr [RBP + -0x42],AL
JNC 0x0015a6ef
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EDI,byte ptr [RAX]
CALL 0x0015a840
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
SETGE AL
MOV byte ptr [RBP + -0x42],AL
LAB_0015a6ef:
MOV AL,byte ptr [RBP + -0x42]
TEST AL,0x1
JNZ 0x0015a6f8
JMP 0x0015a71a
LAB_0015a6f8:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x24]
SHL ECX,0x4
ADD ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0015a6c4
LAB_0015a71a:
MOV dword ptr [RBP + -0x14],0x5
JMP 0x0015a7f2
LAB_0015a726:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x21
JL 0x0015a763
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7e
JG 0x0015a763
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVSX ECX,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x24],ECX
MOV dword ptr [RBP + -0x14],0x5
JMP 0x0015a7f2
LAB_0015a763:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x7f
JLE 0x0015a7d1
LEA RAX,[0x48ea30]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x10]
LEA RSI,[RBP + -0x38]
CALL RAX
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JLE 0x0015a7cf
MOV dword ptr [RBP + -0x14],0x5
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 + -0x38]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x0015a7f2
LAB_0015a7cf:
JMP 0x0015a7d1
LAB_0015a7d1:
MOV dword ptr [RBP + -0x14],0x6
JMP 0x0015a7f2
LAB_0015a7da:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0015a448
LAB_0015a7eb:
MOV dword ptr [RBP + -0x14],0x0
LAB_0015a7f2:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0x50
POP RBP
RET
|
int4 my_coll_lexem_next(int4 *param_1)
{
byte *pbVar1;
int iVar2;
bool bVar3;
int4 local_40 [2];
int1 *local_38;
int local_2c;
long local_28;
int4 local_1c;
byte *local_18;
int4 *local_10;
local_18 = *(byte **)(param_1 + 2);
while( true ) {
local_10 = param_1;
if (*(byte **)(param_1 + 4) <= local_18) goto LAB_0015a7eb;
iVar2 = (int)(char)*local_18;
if (((1 < iVar2 - 9U) && (iVar2 != 0xd)) && (iVar2 != 0x20)) break;
local_18 = local_18 + 1;
}
if (iVar2 == 0x26) {
local_18 = local_18 + 1;
local_1c = 4;
goto LAB_0015a7f2;
}
if (iVar2 == 0x2f) {
local_18 = local_18 + 1;
local_1c = 8;
goto LAB_0015a7f2;
}
if (iVar2 != 0x3c) {
if (iVar2 == 0x3d) {
local_18 = local_18 + 1;
param_1[8] = 0;
local_1c = 1;
goto LAB_0015a7f2;
}
if (iVar2 == 0x5b) {
local_28 = 1;
goto LAB_0015a4ee;
}
if (iVar2 == 0x7c) {
local_18 = local_18 + 1;
local_1c = 9;
goto LAB_0015a7f2;
}
if ((((*local_18 == 0x5c) && (local_18 + 2 < *(byte **)(param_1 + 4))) && (local_18[1] == 0x75))
&& ((*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)local_18[2]) & 0x80) != 0))
{
local_18 = local_18 + 2;
param_1[9] = 0;
while( true ) {
bVar3 = false;
if (local_18 < *(byte **)(local_10 + 4)) {
local_2c = ch2x((int)(char)*local_18);
bVar3 = -1 < local_2c;
}
if (!bVar3) break;
local_10[9] = local_10[9] * 0x10 + local_2c;
local_18 = local_18 + 1;
}
local_1c = 5;
goto LAB_0015a7f2;
}
if ((' ' < (char)*local_18) && ((char)*local_18 < '\x7f')) {
param_1[9] = (int)(char)*local_18;
local_1c = 5;
local_18 = local_18 + 1;
goto LAB_0015a7f2;
}
if (0x7f < *local_18) {
local_38 = my_charset_utf8mb3_general_ci;
iVar2 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28))
(my_charset_utf8mb3_general_ci,local_40,local_18,
*(int8 *)(param_1 + 4));
if (0 < iVar2) {
local_1c = 5;
local_18 = local_18 + iVar2;
local_10[9] = local_40[0];
goto LAB_0015a7f2;
}
}
local_1c = 6;
goto LAB_0015a7f2;
}
param_1[8] = 1;
while( true ) {
local_18 = local_18 + 1;
bVar3 = false;
if ((local_18 < *(byte **)(param_1 + 4)) && (bVar3 = false, *local_18 == 0x3c)) {
bVar3 = (int)param_1[8] < 4;
}
if (!bVar3) break;
param_1[8] = param_1[8] + 1;
}
local_1c = 1;
goto LAB_0015a7f2;
LAB_0015a7eb:
local_1c = 0;
goto LAB_0015a7f2;
while ((*local_18 != 0x5d || (local_28 = local_28 + -1, local_28 != 0))) {
LAB_0015a4ee:
pbVar1 = local_18;
local_18 = pbVar1 + 1;
if (*(byte **)(param_1 + 4) <= local_18) {
local_1c = 6;
goto LAB_0015a7f2;
}
if (*local_18 == 0x5b) {
local_28 = local_28 + 1;
goto LAB_0015a4ee;
}
}
local_1c = 7;
local_18 = pbVar1 + 2;
LAB_0015a7f2:
*(int8 *)(local_10 + 6) = *(int8 *)(local_10 + 2);
*(byte **)(local_10 + 2) = local_18;
*local_10 = local_1c;
return local_1c;
}
| |
37,441 | my_coll_lexem_next | eloqsql/strings/ctype-uca.c | static my_coll_lexem_num my_coll_lexem_next(MY_COLL_LEXEM *lexem)
{
const char *beg;
my_coll_lexem_num rc;
for (beg= lexem->beg ; beg < lexem->end ; beg++)
{
switch (*beg)
{
case ' ':
case '\t':
case '\r':
case '\n':
continue;
case '[': /* Bracket expression, e.g. "[optimize [a-z]]" */
{
size_t nbrackets; /* Indicates nested recursion level */
for (beg++, nbrackets= 1 ; beg < lexem->end; beg++)
{
if (*beg == '[') /* Enter nested bracket expression */
nbrackets++;
else if (*beg == ']')
{
if (--nbrackets == 0)
{
rc= MY_COLL_LEXEM_OPTION;
beg++;
goto ex;
}
}
}
rc= MY_COLL_LEXEM_ERROR;
goto ex;
}
case '&':
beg++;
rc= MY_COLL_LEXEM_RESET;
goto ex;
case '=':
beg++;
lexem->diff= 0;
rc= MY_COLL_LEXEM_SHIFT;
goto ex;
case '/':
beg++;
rc= MY_COLL_LEXEM_EXTEND;
goto ex;
case '|':
beg++;
rc= MY_COLL_LEXEM_CONTEXT;
goto ex;
case '<': /* Shift: '<' or '<<' or '<<<' or '<<<<' */
{
/* Scan up to 3 additional '<' characters */
for (beg++, lexem->diff= 1;
(beg < lexem->end) && (*beg == '<') && (lexem->diff <= 3);
beg++, lexem->diff++);
rc= MY_COLL_LEXEM_SHIFT;
goto ex;
}
default:
break;
}
/* Escaped character, e.g. \u1234 */
if ((*beg == '\\') && (beg + 2 < lexem->end) &&
(beg[1] == 'u') && my_isxdigit(&my_charset_utf8mb3_general_ci, beg[2]))
{
int ch;
beg+= 2;
lexem->code= 0;
while ((beg < lexem->end) && ((ch= ch2x(beg[0])) >= 0))
{
lexem->code= (lexem->code << 4) + ch;
beg++;
}
rc= MY_COLL_LEXEM_CHAR;
goto ex;
}
/*
Unescaped single byte character:
allow printable ASCII range except SPACE and
special characters parsed above []<&/|=
*/
if (*beg >= 0x21 && *beg <= 0x7E)
{
lexem->code= *beg++;
rc= MY_COLL_LEXEM_CHAR;
goto ex;
}
if (((uchar) *beg) > 0x7F) /* Unescaped multibyte character */
{
CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci;
my_wc_t wc;
int nbytes= my_ci_mb_wc(cs, &wc, (uchar *) beg, (uchar *) lexem->end);
if (nbytes > 0)
{
rc= MY_COLL_LEXEM_CHAR;
beg+= nbytes;
lexem->code= (int) wc;
goto ex;
}
}
rc= MY_COLL_LEXEM_ERROR;
goto ex;
}
rc= MY_COLL_LEXEM_EOF;
ex:
lexem->prev= lexem->beg;
lexem->beg= beg;
lexem->term= rc;
return rc;
} | O3 | c | my_coll_lexem_next:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %rcx
xorl %r15d, %r15d
cmpq %rcx, %r14
jae 0x465c1
movzbl (%r14), %edx
cmpl $0xc, %edx
jle 0x463c9
cmpl $0x1f, %edx
jle 0x463d6
cmpl $0x25, %edx
jg 0x463ef
cmpl $0x20, %edx
je 0x463df
jmp 0x4657b
leal -0x9(%rdx), %eax
cmpl $0x2, %eax
jb 0x463df
jmp 0x4657b
cmpl $0xd, %edx
jne 0x4657b
incq %r14
cmpq %rcx, %r14
jne 0x463ac
movq %rcx, %rax
jmp 0x465c4
cmpl $0x3c, %edx
jle 0x4644c
cmpl $0x5b, %edx
jg 0x464ad
cmpl $0x3d, %edx
je 0x464c9
cmpl $0x5b, %edx
jne 0x4657b
incq %r14
movl $0x6, %r15d
cmpq %rcx, %r14
jae 0x465c1
movl $0x1, %eax
movzbl (%r14), %edx
cmpl $0x5d, %edx
je 0x46439
cmpl $0x5b, %edx
jne 0x46442
incq %rax
jmp 0x46442
decq %rax
je 0x465de
incq %r14
cmpq %rcx, %r14
jb 0x46426
jmp 0x463e7
cmpl $0x26, %edx
je 0x46570
cmpl $0x2f, %edx
je 0x46565
cmpl $0x3c, %edx
jne 0x4657b
incq %r14
movl $0x1, 0x20(%rbx)
movl $0x1, %r15d
cmpq %rcx, %r14
jae 0x465c1
movl $0x2, %eax
cmpb $0x3c, (%r14)
jne 0x465c1
leal -0x1(%rax), %edx
cmpl $0x4, %edx
jae 0x465c1
incq %r14
movl %eax, 0x20(%rbx)
incl %eax
cmpq %rcx, %r14
jb 0x46485
jmp 0x463e7
cmpl $0x5c, %edx
je 0x464de
cmpl $0x7c, %edx
jne 0x4657b
incq %r14
movl $0x9, %r15d
jmp 0x465c1
incq %r14
movl $0x0, 0x20(%rbx)
movl $0x1, %r15d
jmp 0x465c1
leaq 0x2(%r14), %rax
cmpq %rcx, %rax
jae 0x465b5
cmpb $0x75, 0x1(%r14)
jne 0x465b5
leaq 0x323423(%rip), %rsi # 0x369920
movq 0x40(%rsi), %rsi
movzbl (%rax), %edi
cmpb $0x0, 0x1(%rsi,%rdi)
jns 0x465b5
movl $0x0, 0x24(%rbx)
xorl %edx, %edx
movsbl (%rax), %esi
leal -0x30(%rsi), %edi
cmpl $0xa, %edi
jb 0x4654d
leal -0x61(%rsi), %edi
cmpl $0x5, %edi
ja 0x46530
addl $-0x57, %esi
jmp 0x4654b
movl $0x5, %r15d
cmpb $0x37, %sil
jl 0x465c4
leal -0x41(%rsi), %edi
cmpl $0x5, %edi
ja 0x465c4
addl $-0x37, %esi
movl %esi, %edi
shll $0x4, %edx
addl %edi, %edx
movl %edx, 0x24(%rbx)
incq %rax
movl $0x5, %r15d
cmpq %rcx, %rax
jb 0x46518
jmp 0x465c4
incq %r14
movl $0x8, %r15d
jmp 0x465c1
incq %r14
movl $0x4, %r15d
jmp 0x465c1
leal -0x7f(%rdx), %eax
cmpb $-0x5e, %al
jae 0x465b5
movl $0x6, %r15d
testb %dl, %dl
jns 0x465c1
leaq 0x32338d(%rip), %rdi # 0x369920
movq 0xb8(%rdi), %rax
leaq -0x20(%rbp), %rsi
movq %r14, %rdx
callq *0x28(%rax)
testl %eax, %eax
jle 0x465c1
movl %eax, %eax
addq %rax, %r14
movl -0x20(%rbp), %eax
movl %eax, 0x24(%rbx)
jmp 0x465bb
incq %r14
movl %edx, 0x24(%rbx)
movl $0x5, %r15d
movq %r14, %rax
movq 0x8(%rbx), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x8(%rbx)
movl %r15d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
incq %r14
movl $0x7, %r15d
jmp 0x465c1
| my_coll_lexem_next:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+8]
mov rcx, [rdi+10h]
xor r15d, r15d
cmp r14, rcx
jnb loc_465C1
loc_463AC:
movzx edx, byte ptr [r14]
cmp edx, 0Ch
jle short loc_463C9
cmp edx, 1Fh
jle short loc_463D6
cmp edx, 25h ; '%'
jg short loc_463EF
cmp edx, 20h ; ' '
jz short loc_463DF
jmp loc_4657B
loc_463C9:
lea eax, [rdx-9]
cmp eax, 2
jb short loc_463DF
jmp loc_4657B
loc_463D6:
cmp edx, 0Dh
jnz loc_4657B
loc_463DF:
inc r14
cmp r14, rcx
jnz short loc_463AC
loc_463E7:
mov rax, rcx
jmp loc_465C4
loc_463EF:
cmp edx, 3Ch ; '<'
jle short loc_4644C
cmp edx, 5Bh ; '['
jg loc_464AD
cmp edx, 3Dh ; '='
jz loc_464C9
cmp edx, 5Bh ; '['
jnz loc_4657B
inc r14
mov r15d, 6
cmp r14, rcx
jnb loc_465C1
mov eax, 1
loc_46426:
movzx edx, byte ptr [r14]
cmp edx, 5Dh ; ']'
jz short loc_46439
cmp edx, 5Bh ; '['
jnz short loc_46442
inc rax
jmp short loc_46442
loc_46439:
dec rax
jz loc_465DE
loc_46442:
inc r14
cmp r14, rcx
jb short loc_46426
jmp short loc_463E7
loc_4644C:
cmp edx, 26h ; '&'
jz loc_46570
cmp edx, 2Fh ; '/'
jz loc_46565
cmp edx, 3Ch ; '<'
jnz loc_4657B
inc r14
mov dword ptr [rbx+20h], 1
mov r15d, 1
cmp r14, rcx
jnb loc_465C1
mov eax, 2
loc_46485:
cmp byte ptr [r14], 3Ch ; '<'
jnz loc_465C1
lea edx, [rax-1]
cmp edx, 4
jnb loc_465C1
inc r14
mov [rbx+20h], eax
inc eax
cmp r14, rcx
jb short loc_46485
jmp loc_463E7
loc_464AD:
cmp edx, 5Ch ; '\'
jz short loc_464DE
cmp edx, 7Ch ; '|'
jnz loc_4657B
inc r14
mov r15d, 9
jmp loc_465C1
loc_464C9:
inc r14
mov dword ptr [rbx+20h], 0
mov r15d, 1
jmp loc_465C1
loc_464DE:
lea rax, [r14+2]
cmp rax, rcx
jnb loc_465B5
cmp byte ptr [r14+1], 75h ; 'u'
jnz loc_465B5
lea rsi, my_charset_utf8mb3_general_ci
mov rsi, [rsi+40h]
movzx edi, byte ptr [rax]
cmp byte ptr [rsi+rdi+1], 0
jns loc_465B5
mov dword ptr [rbx+24h], 0
xor edx, edx
loc_46518:
movsx esi, byte ptr [rax]
lea edi, [rsi-30h]
cmp edi, 0Ah
jb short loc_4654D
lea edi, [rsi-61h]
cmp edi, 5
ja short loc_46530
add esi, 0FFFFFFA9h
jmp short loc_4654B
loc_46530:
mov r15d, 5
cmp sil, 37h ; '7'
jl loc_465C4
lea edi, [rsi-41h]
cmp edi, 5
ja short loc_465C4
add esi, 0FFFFFFC9h
loc_4654B:
mov edi, esi
loc_4654D:
shl edx, 4
add edx, edi
mov [rbx+24h], edx
inc rax
mov r15d, 5
cmp rax, rcx
jb short loc_46518
jmp short loc_465C4
loc_46565:
inc r14
mov r15d, 8
jmp short loc_465C1
loc_46570:
inc r14
mov r15d, 4
jmp short loc_465C1
loc_4657B:
lea eax, [rdx-7Fh]
cmp al, 0A2h
jnb short loc_465B5
mov r15d, 6
test dl, dl
jns short loc_465C1
lea rdi, my_charset_utf8mb3_general_ci
mov rax, [rdi+0B8h]
lea rsi, [rbp+var_20]
mov rdx, r14
call qword ptr [rax+28h]
test eax, eax
jle short loc_465C1
mov eax, eax
add r14, rax
mov eax, [rbp+var_20]
mov [rbx+24h], eax
jmp short loc_465BB
loc_465B5:
inc r14
mov [rbx+24h], edx
loc_465BB:
mov r15d, 5
loc_465C1:
mov rax, r14
loc_465C4:
mov rcx, [rbx+8]
mov [rbx+18h], rcx
mov [rbx+8], rax
mov [rbx], r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_465DE:
inc r14
mov r15d, 7
jmp short loc_465C1
| unsigned __int8 * my_coll_lexem_next(long long a1)
{
long long v1; // rax
unsigned __int8 *v3; // r14
unsigned long long v4; // rcx
int v5; // r15d
unsigned int v6; // edx
unsigned __int8 *result; // rax
long long v8; // rax
int v9; // edx
int v10; // eax
int v11; // edx
int v12; // esi
int v13; // edi
int v14; // esi
int v15; // eax
_QWORD v16[4]; // [rsp+0h] [rbp-20h] BYREF
v16[0] = v1;
v3 = *(unsigned __int8 **)(a1 + 8);
v4 = *(_QWORD *)(a1 + 16);
v5 = 0;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_58;
do
{
v6 = *v3;
if ( v6 <= 0xC )
{
if ( v6 - 9 >= 2 )
goto LABEL_52;
}
else
{
if ( *v3 > 0x1Fu )
{
if ( *v3 <= 0x25u )
{
if ( v6 != 32 )
goto LABEL_52;
goto LABEL_10;
}
if ( *v3 <= 0x3Cu )
{
switch ( v6 )
{
case '&':
++v3;
v5 = 4;
goto LABEL_58;
case '/':
++v3;
v5 = 8;
goto LABEL_58;
case '<':
++v3;
*(_DWORD *)(a1 + 32) = 1;
v5 = 1;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_58;
v10 = 2;
while ( *v3 == 60 && (unsigned int)(v10 - 1) < 4 )
{
++v3;
*(_DWORD *)(a1 + 32) = v10++;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_11;
}
goto LABEL_58;
}
}
else if ( *v3 > 0x5Bu )
{
if ( v6 == 92 )
{
result = v3 + 2;
if ( (unsigned long long)(v3 + 2) < v4
&& v3[1] == 117
&& *(char *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + *result + 1LL) < 0 )
{
*(_DWORD *)(a1 + 36) = 0;
v11 = 0;
while ( 1 )
{
v12 = (char)*result;
v13 = v12 - 48;
if ( (unsigned int)(v12 - 48) >= 0xA )
{
if ( (unsigned int)(v12 - 97) > 5 )
{
v5 = 5;
if ( (char)v12 < 55 || (unsigned int)(v12 - 65) > 5 )
goto LABEL_59;
v14 = v12 - 55;
}
else
{
v14 = v12 - 87;
}
v13 = v14;
}
v11 = v13 + 16 * v11;
*(_DWORD *)(a1 + 36) = v11;
++result;
v5 = 5;
if ( (unsigned long long)result >= v4 )
goto LABEL_59;
}
}
goto LABEL_56;
}
if ( v6 == 124 )
{
++v3;
v5 = 9;
goto LABEL_58;
}
}
else
{
if ( v6 == 61 )
{
++v3;
*(_DWORD *)(a1 + 32) = 0;
v5 = 1;
goto LABEL_58;
}
if ( v6 == 91 )
{
++v3;
v5 = 6;
if ( (unsigned long long)v3 >= v4 )
goto LABEL_58;
v8 = 1LL;
while ( 1 )
{
v9 = *v3;
if ( v9 == 93 )
{
if ( !--v8 )
{
++v3;
v5 = 7;
goto LABEL_58;
}
}
else if ( v9 == 91 )
{
++v8;
}
if ( (unsigned long long)++v3 >= v4 )
goto LABEL_11;
}
}
}
LABEL_52:
if ( (unsigned __int8)(v6 - 127) < 0xA2u )
{
v5 = 6;
if ( (v6 & 0x80u) != 0 )
{
v15 = (*(long long ( **)(unsigned int *, _QWORD *, unsigned __int8 *))(*(_QWORD *)&my_charset_utf8mb3_general_ci[46]
+ 40LL))(
my_charset_utf8mb3_general_ci,
v16,
v3);
if ( v15 > 0 )
{
v3 += (unsigned int)v15;
*(_DWORD *)(a1 + 36) = v16[0];
LABEL_57:
v5 = 5;
}
}
LABEL_58:
result = v3;
goto LABEL_59;
}
LABEL_56:
++v3;
*(_DWORD *)(a1 + 36) = v6;
goto LABEL_57;
}
if ( v6 != 13 )
goto LABEL_52;
}
LABEL_10:
++v3;
}
while ( v3 != (unsigned __int8 *)v4 );
LABEL_11:
result = (unsigned __int8 *)v4;
LABEL_59:
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a1 + 8);
*(_QWORD *)(a1 + 8) = result;
*(_DWORD *)a1 = v5;
return result;
}
| my_coll_lexem_next:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI + 0x10]
XOR R15D,R15D
CMP R14,RCX
JNC 0x001465c1
LAB_001463ac:
MOVZX EDX,byte ptr [R14]
CMP EDX,0xc
JLE 0x001463c9
CMP EDX,0x1f
JLE 0x001463d6
CMP EDX,0x25
JG 0x001463ef
CMP EDX,0x20
JZ 0x001463df
JMP 0x0014657b
LAB_001463c9:
LEA EAX,[RDX + -0x9]
CMP EAX,0x2
JC 0x001463df
JMP 0x0014657b
LAB_001463d6:
CMP EDX,0xd
JNZ 0x0014657b
LAB_001463df:
INC R14
CMP R14,RCX
JNZ 0x001463ac
LAB_001463e7:
MOV RAX,RCX
JMP 0x001465c4
LAB_001463ef:
CMP EDX,0x3c
JLE 0x0014644c
CMP EDX,0x5b
JG 0x001464ad
CMP EDX,0x3d
JZ 0x001464c9
CMP EDX,0x5b
JNZ 0x0014657b
INC R14
MOV R15D,0x6
CMP R14,RCX
JNC 0x001465c1
MOV EAX,0x1
LAB_00146426:
MOVZX EDX,byte ptr [R14]
CMP EDX,0x5d
JZ 0x00146439
CMP EDX,0x5b
JNZ 0x00146442
INC RAX
JMP 0x00146442
LAB_00146439:
DEC RAX
JZ 0x001465de
LAB_00146442:
INC R14
CMP R14,RCX
JC 0x00146426
JMP 0x001463e7
LAB_0014644c:
CMP EDX,0x26
JZ 0x00146570
CMP EDX,0x2f
JZ 0x00146565
CMP EDX,0x3c
JNZ 0x0014657b
INC R14
MOV dword ptr [RBX + 0x20],0x1
MOV R15D,0x1
CMP R14,RCX
JNC 0x001465c1
MOV EAX,0x2
LAB_00146485:
CMP byte ptr [R14],0x3c
JNZ 0x001465c1
LEA EDX,[RAX + -0x1]
CMP EDX,0x4
JNC 0x001465c1
INC R14
MOV dword ptr [RBX + 0x20],EAX
INC EAX
CMP R14,RCX
JC 0x00146485
JMP 0x001463e7
LAB_001464ad:
CMP EDX,0x5c
JZ 0x001464de
CMP EDX,0x7c
JNZ 0x0014657b
INC R14
MOV R15D,0x9
JMP 0x001465c1
LAB_001464c9:
INC R14
MOV dword ptr [RBX + 0x20],0x0
MOV R15D,0x1
JMP 0x001465c1
LAB_001464de:
LEA RAX,[R14 + 0x2]
CMP RAX,RCX
JNC 0x001465b5
CMP byte ptr [R14 + 0x1],0x75
JNZ 0x001465b5
LEA RSI,[0x469920]
MOV RSI,qword ptr [RSI + 0x40]
MOVZX EDI,byte ptr [RAX]
CMP byte ptr [RSI + RDI*0x1 + 0x1],0x0
JNS 0x001465b5
MOV dword ptr [RBX + 0x24],0x0
XOR EDX,EDX
LAB_00146518:
MOVSX ESI,byte ptr [RAX]
LEA EDI,[RSI + -0x30]
CMP EDI,0xa
JC 0x0014654d
LEA EDI,[RSI + -0x61]
CMP EDI,0x5
JA 0x00146530
ADD ESI,-0x57
JMP 0x0014654b
LAB_00146530:
MOV R15D,0x5
CMP SIL,0x37
JL 0x001465c4
LEA EDI,[RSI + -0x41]
CMP EDI,0x5
JA 0x001465c4
ADD ESI,-0x37
LAB_0014654b:
MOV EDI,ESI
LAB_0014654d:
SHL EDX,0x4
ADD EDX,EDI
MOV dword ptr [RBX + 0x24],EDX
INC RAX
MOV R15D,0x5
CMP RAX,RCX
JC 0x00146518
JMP 0x001465c4
LAB_00146565:
INC R14
MOV R15D,0x8
JMP 0x001465c1
LAB_00146570:
INC R14
MOV R15D,0x4
JMP 0x001465c1
LAB_0014657b:
LEA EAX,[RDX + -0x7f]
CMP AL,0xa2
JNC 0x001465b5
MOV R15D,0x6
TEST DL,DL
JNS 0x001465c1
LEA RDI,[0x469920]
MOV RAX,qword ptr [RDI + 0xb8]
LEA RSI,[RBP + -0x20]
MOV RDX,R14
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
JLE 0x001465c1
MOV EAX,EAX
ADD R14,RAX
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBX + 0x24],EAX
JMP 0x001465bb
LAB_001465b5:
INC R14
MOV dword ptr [RBX + 0x24],EDX
LAB_001465bb:
MOV R15D,0x5
LAB_001465c1:
MOV RAX,R14
LAB_001465c4:
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x18],RCX
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001465de:
INC R14
MOV R15D,0x7
JMP 0x001465c1
|
void my_coll_lexem_next(int4 *param_1)
{
byte bVar1;
byte *pbVar2;
int4 in_EAX;
uint uVar3;
long lVar4;
int iVar5;
int iVar6;
byte *pbVar7;
byte *pbVar8;
int4 uVar9;
int4 local_28 [2];
pbVar7 = *(byte **)(param_1 + 2);
pbVar2 = *(byte **)(param_1 + 4);
uVar9 = 0;
pbVar8 = pbVar7;
if (pbVar7 < pbVar2) {
do {
bVar1 = *pbVar7;
uVar3 = (uint)bVar1;
if (0xc < bVar1) {
if (bVar1 < 0x20) {
if (uVar3 == 0xd) goto LAB_001463df;
LAB_0014657b:
if (0xa1 < (byte)(bVar1 + 0x81)) goto LAB_001465b5;
uVar9 = 6;
pbVar8 = pbVar7;
if ((-1 < (char)bVar1) ||
(local_28[0] = in_EAX,
uVar3 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28))
(my_charset_utf8mb3_general_ci,local_28,pbVar7), (int)uVar3 < 1))
break;
pbVar8 = pbVar7 + uVar3;
param_1[9] = local_28[0];
}
else {
if (bVar1 < 0x26) {
if (uVar3 == 0x20) goto LAB_001463df;
goto LAB_0014657b;
}
if (bVar1 < 0x3d) {
if (uVar3 == 0x26) {
uVar9 = 4;
pbVar8 = pbVar7 + 1;
}
else if (uVar3 == 0x2f) {
uVar9 = 8;
pbVar8 = pbVar7 + 1;
}
else {
if (uVar3 != 0x3c) goto LAB_0014657b;
pbVar7 = pbVar7 + 1;
param_1[8] = 1;
uVar9 = 1;
pbVar8 = pbVar7;
if (pbVar7 < pbVar2) {
iVar5 = 2;
goto LAB_00146485;
}
}
break;
}
if (bVar1 < 0x5c) {
if (uVar3 == 0x3d) {
param_1[8] = 0;
uVar9 = 1;
pbVar8 = pbVar7 + 1;
}
else {
if (uVar3 != 0x5b) goto LAB_0014657b;
pbVar7 = pbVar7 + 1;
uVar9 = 6;
pbVar8 = pbVar7;
if (pbVar7 < pbVar2) {
lVar4 = 1;
goto LAB_00146426;
}
}
break;
}
if (uVar3 != 0x5c) {
if (uVar3 != 0x7c) goto LAB_0014657b;
uVar9 = 9;
pbVar8 = pbVar7 + 1;
break;
}
pbVar8 = pbVar7 + 2;
if (((pbVar8 < pbVar2) && (pbVar7[1] == 0x75)) &&
(*(char *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)*pbVar8) < '\0')) {
param_1[9] = 0;
iVar5 = 0;
goto LAB_00146518;
}
LAB_001465b5:
pbVar8 = pbVar7 + 1;
param_1[9] = uVar3;
}
uVar9 = 5;
break;
}
if (1 < bVar1 - 9) goto LAB_0014657b;
LAB_001463df:
pbVar7 = pbVar7 + 1;
pbVar8 = pbVar2;
} while (pbVar7 != pbVar2);
}
goto LAB_001465c4;
while( true ) {
pbVar7 = pbVar7 + 1;
param_1[8] = iVar5;
iVar5 = iVar5 + 1;
pbVar8 = pbVar2;
if (pbVar2 <= pbVar7) break;
LAB_00146485:
pbVar8 = pbVar7;
if ((*pbVar7 != 0x3c) || (3 < iVar5 - 1U)) break;
}
goto LAB_001465c4;
LAB_00146426:
do {
if (*pbVar7 == 0x5d) {
lVar4 = lVar4 + -1;
if (lVar4 == 0) {
uVar9 = 7;
pbVar8 = pbVar7 + 1;
break;
}
}
else if (*pbVar7 == 0x5b) {
lVar4 = lVar4 + 1;
}
pbVar7 = pbVar7 + 1;
pbVar8 = pbVar2;
} while (pbVar7 < pbVar2);
goto LAB_001465c4;
LAB_00146518:
do {
iVar6 = (int)(char)*pbVar8;
uVar3 = iVar6 - 0x30;
if (9 < uVar3) {
if (iVar6 - 0x61U < 6) {
uVar3 = iVar6 - 0x57;
}
else {
uVar9 = 5;
if (((char)*pbVar8 < '7') || (5 < iVar6 - 0x41U)) break;
uVar3 = iVar6 - 0x37;
}
}
iVar5 = iVar5 * 0x10 + uVar3;
param_1[9] = iVar5;
pbVar8 = pbVar8 + 1;
uVar9 = 5;
} while (pbVar8 < pbVar2);
LAB_001465c4:
*(int8 *)(param_1 + 6) = *(int8 *)(param_1 + 2);
*(byte **)(param_1 + 2) = pbVar8;
*param_1 = uVar9;
return;
}
| |
37,442 | update_token_ident | bluesky950520[P]quickjs/quickjs.c | static void update_token_ident(JSParseState *s)
{
if (s->token.u.ident.atom <= JS_ATOM_LAST_KEYWORD ||
(s->token.u.ident.atom <= JS_ATOM_LAST_STRICT_KEYWORD &&
s->cur_func->is_strict_mode) ||
(s->token.u.ident.atom == JS_ATOM_yield &&
((s->cur_func->func_kind & JS_FUNC_GENERATOR) ||
(s->cur_func->func_type == JS_PARSE_FUNC_ARROW &&
!s->cur_func->in_function_body && s->cur_func->parent &&
(s->cur_func->parent->func_kind & JS_FUNC_GENERATOR)))) ||
(s->token.u.ident.atom == JS_ATOM_await &&
(s->is_module ||
(s->cur_func->func_kind & JS_FUNC_ASYNC) ||
s->cur_func->func_type == JS_PARSE_FUNC_CLASS_STATIC_INIT ||
(s->cur_func->func_type == JS_PARSE_FUNC_ARROW &&
!s->cur_func->in_function_body && s->cur_func->parent &&
((s->cur_func->parent->func_kind & JS_FUNC_ASYNC) ||
s->cur_func->parent->func_type == JS_PARSE_FUNC_CLASS_STATIC_INIT))))) {
if (s->token.u.ident.has_escape) {
s->token.u.ident.is_reserved = TRUE;
s->token.val = TOK_IDENT;
} else {
/* The keywords atoms are pre allocated */
s->token.val = s->token.u.ident.atom - 1 + TOK_FIRST_KEYWORD;
}
}
} | O2 | c | update_token_ident:
movl 0x38(%rdi), %eax
cmpl $0x25, %eax
jae 0x519db
cmpl $0x0, 0x3c(%rdi)
je 0x51a24
movl $0x1, 0x40(%rdi)
pushq $-0x7d
popq %rax
jmp 0x51a27
cmpl $0x2d, %eax
ja 0x51a2b
movq 0x90(%rdi), %rcx
movzwl 0x84(%rcx), %edx
testw %dx, %dx
js 0x519c9
cmpl $0x2d, %eax
jne 0x51a2a
testb $0x1, %dl
jne 0x519c9
andl $0x7f00, %edx # imm = 0x7F00
cmpw $0x300, %dx # imm = 0x300
jne 0x51a2a
cmpl $0x0, 0x7c(%rcx)
jne 0x51a2a
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
je 0x51a2a
testb $0x1, 0x84(%rcx)
jne 0x519c9
jmp 0x51a2a
addl $-0x56, %eax
movl %eax, 0x20(%rdi)
retq
cmpl $0x2e, %eax
jne 0x51a2a
cmpl $0x0, 0x98(%rdi)
jne 0x519c9
movq 0x90(%rdi), %rcx
movzwl 0x84(%rcx), %edx
testb $0x2, %dl
jne 0x519c9
shrl $0x8, %edx
andl $0x7f, %edx
cmpl $0x7, %edx
je 0x519c9
cmpl $0x3, %edx
jne 0x51a2a
cmpl $0x0, 0x7c(%rcx)
jne 0x51a2a
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
je 0x51a2a
movzwl 0x84(%rcx), %ecx
testb $0x2, %cl
sete %dl
andl $0x7f00, %ecx # imm = 0x7F00
cmpw $0x700, %cx # imm = 0x700
setne %cl
testb %cl, %dl
je 0x519c9
jmp 0x51a2a
| update_token_ident:
mov eax, [rdi+38h]
cmp eax, 25h ; '%'
jnb short loc_519DB
loc_519C9:
cmp dword ptr [rdi+3Ch], 0
jz short loc_51A24
mov dword ptr [rdi+40h], 1
push 0FFFFFFFFFFFFFF83h
pop rax
jmp short loc_51A27
loc_519DB:
cmp eax, 2Dh ; '-'
ja short loc_51A2B
mov rcx, [rdi+90h]
movzx edx, word ptr [rcx+84h]
test dx, dx
js short loc_519C9
cmp eax, 2Dh ; '-'
jnz short locret_51A2A
test dl, 1
jnz short loc_519C9
and edx, 7F00h
cmp dx, 300h
jnz short locret_51A2A
cmp dword ptr [rcx+7Ch], 0
jnz short locret_51A2A
mov rcx, [rcx+8]
test rcx, rcx
jz short locret_51A2A
test byte ptr [rcx+84h], 1
jnz short loc_519C9
jmp short locret_51A2A
loc_51A24:
add eax, 0FFFFFFAAh
loc_51A27:
mov [rdi+20h], eax
locret_51A2A:
retn
loc_51A2B:
cmp eax, 2Eh ; '.'
jnz short locret_51A2A
cmp dword ptr [rdi+98h], 0
jnz short loc_519C9
mov rcx, [rdi+90h]
movzx edx, word ptr [rcx+84h]
test dl, 2
jnz loc_519C9
shr edx, 8
and edx, 7Fh
cmp edx, 7
jz loc_519C9
cmp edx, 3
jnz short locret_51A2A
cmp dword ptr [rcx+7Ch], 0
jnz short locret_51A2A
mov rcx, [rcx+8]
test rcx, rcx
jz short locret_51A2A
movzx ecx, word ptr [rcx+84h]
test cl, 2
setz dl
and ecx, 7F00h
cmp cx, 700h
setnz cl
test dl, cl
jz loc_519C9
jmp short locret_51A2A
| long long update_token_ident(long long a1)
{
long long result; // rax
long long v2; // rcx
__int16 v3; // dx
long long v4; // rcx
long long v5; // rcx
unsigned int v6; // edx
int v7; // edx
long long v8; // rcx
result = *(unsigned int *)(a1 + 56);
if ( (unsigned int)result >= 0x25 )
{
if ( (unsigned int)result > 0x2D )
{
if ( (_DWORD)result != 46 )
return result;
if ( !*(_DWORD *)(a1 + 152) )
{
v5 = *(_QWORD *)(a1 + 144);
v6 = *(unsigned __int16 *)(v5 + 132);
if ( (v6 & 2) == 0 )
{
v7 = (v6 >> 8) & 0x7F;
if ( v7 != 7 )
{
if ( v7 != 3 )
return result;
if ( *(_DWORD *)(v5 + 124) )
return result;
v8 = *(_QWORD *)(v5 + 8);
if ( !v8 || (*(_WORD *)(v8 + 132) & 0x7F00) != 1792 && (*(_WORD *)(v8 + 132) & 2) == 0 )
return result;
}
}
}
}
else
{
v2 = *(_QWORD *)(a1 + 144);
v3 = *(_WORD *)(v2 + 132);
if ( v3 >= 0 )
{
if ( (_DWORD)result != 45 )
return result;
if ( (v3 & 1) == 0 )
{
if ( (v3 & 0x7F00) != 0x300 )
return result;
if ( *(_DWORD *)(v2 + 124) )
return result;
v4 = *(_QWORD *)(v2 + 8);
if ( !v4 || (*(_BYTE *)(v4 + 132) & 1) == 0 )
return result;
}
}
}
}
if ( *(_DWORD *)(a1 + 60) )
{
*(_DWORD *)(a1 + 64) = 1;
result = -125LL;
}
else
{
result = (unsigned int)(result - 86);
}
*(_DWORD *)(a1 + 32) = result;
return result;
}
| update_token_ident:
MOV EAX,dword ptr [RDI + 0x38]
CMP EAX,0x25
JNC 0x001519db
LAB_001519c9:
CMP dword ptr [RDI + 0x3c],0x0
JZ 0x00151a24
MOV dword ptr [RDI + 0x40],0x1
PUSH -0x7d
POP RAX
JMP 0x00151a27
LAB_001519db:
CMP EAX,0x2d
JA 0x00151a2b
MOV RCX,qword ptr [RDI + 0x90]
MOVZX EDX,word ptr [RCX + 0x84]
TEST DX,DX
JS 0x001519c9
CMP EAX,0x2d
JNZ 0x00151a2a
TEST DL,0x1
JNZ 0x001519c9
AND EDX,0x7f00
CMP DX,0x300
JNZ 0x00151a2a
CMP dword ptr [RCX + 0x7c],0x0
JNZ 0x00151a2a
MOV RCX,qword ptr [RCX + 0x8]
TEST RCX,RCX
JZ 0x00151a2a
TEST byte ptr [RCX + 0x84],0x1
JNZ 0x001519c9
JMP 0x00151a2a
LAB_00151a24:
ADD EAX,-0x56
LAB_00151a27:
MOV dword ptr [RDI + 0x20],EAX
LAB_00151a2a:
RET
LAB_00151a2b:
CMP EAX,0x2e
JNZ 0x00151a2a
CMP dword ptr [RDI + 0x98],0x0
JNZ 0x001519c9
MOV RCX,qword ptr [RDI + 0x90]
MOVZX EDX,word ptr [RCX + 0x84]
TEST DL,0x2
JNZ 0x001519c9
SHR EDX,0x8
AND EDX,0x7f
CMP EDX,0x7
JZ 0x001519c9
CMP EDX,0x3
JNZ 0x00151a2a
CMP dword ptr [RCX + 0x7c],0x0
JNZ 0x00151a2a
MOV RCX,qword ptr [RCX + 0x8]
TEST RCX,RCX
JZ 0x00151a2a
MOVZX ECX,word ptr [RCX + 0x84]
TEST CL,0x2
SETZ DL
AND ECX,0x7f00
CMP CX,0x700
SETNZ CL
TEST DL,CL
JZ 0x001519c9
JMP 0x00151a2a
|
void update_token_ident(long param_1)
{
uint uVar1;
long lVar2;
int iVar3;
ushort uVar4;
uVar1 = *(uint *)(param_1 + 0x38);
if (0x24 < uVar1) {
if (uVar1 < 0x2e) {
lVar2 = *(long *)(param_1 + 0x90);
uVar4 = *(ushort *)(lVar2 + 0x84);
if (-1 < (short)uVar4) {
if (uVar1 != 0x2d) {
return;
}
if ((uVar4 & 1) == 0) {
if ((uVar4 & 0x7f00) != 0x300) {
return;
}
if (*(int *)(lVar2 + 0x7c) != 0) {
return;
}
if (*(long *)(lVar2 + 8) == 0) {
return;
}
if ((*(byte *)(*(long *)(lVar2 + 8) + 0x84) & 1) == 0) {
return;
}
}
}
}
else {
if (uVar1 != 0x2e) {
return;
}
if (*(int *)(param_1 + 0x98) == 0) {
lVar2 = *(long *)(param_1 + 0x90);
if (((*(ushort *)(lVar2 + 0x84) & 2) == 0) &&
(uVar4 = *(ushort *)(lVar2 + 0x84) >> 8 & 0x7f, uVar4 != 7)) {
if (uVar4 != 3) {
return;
}
if (*(int *)(lVar2 + 0x7c) != 0) {
return;
}
if (*(long *)(lVar2 + 8) == 0) {
return;
}
uVar4 = *(ushort *)(*(long *)(lVar2 + 8) + 0x84);
if ((uVar4 & 2) == 0 && (uVar4 & 0x7f00) != 0x700) {
return;
}
}
}
}
}
if (*(int *)(param_1 + 0x3c) == 0) {
iVar3 = uVar1 - 0x56;
}
else {
*(int4 *)(param_1 + 0x40) = 1;
iVar3 = -0x7d;
}
*(int *)(param_1 + 0x20) = iVar3;
return;
}
| |
37,443 | ma_check_print_error | eloqsql/storage/maria/ma_check_standalone.h | void _ma_check_print_error(HA_CHECK *param, const char *fmt,...)
{
va_list args;
DBUG_ENTER("_ma_check_print_error");
DBUG_PRINT("enter", ("format: %s", fmt));
fflush(stdout);
if (!param->warning_printed && !param->error_printed)
{
if (param->testflag & T_SILENT)
fprintf(stderr,"%s: Aria file %s\n",my_progname_short,param->isam_file_name);
param->out_flag|= O_DATA_LOST;
}
param->error_printed++;
va_start(args,fmt);
fprintf(stderr,"%s: error: ",my_progname_short);
vfprintf(stderr, fmt, args);
fputc('\n',stderr);
fflush(stderr);
va_end(args);
DBUG_VOID_RETURN;
} | O3 | c | ma_check_print_error:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, -0xd0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %r8, -0xc0(%rbp)
movq %r9, -0xb8(%rbp)
testb %al, %al
je 0x33874
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq 0x35d725(%rip), %rax # 0x390fa0
movq (%rax), %rdi
callq 0x2a400
cmpb $0x0, 0x209a2(%r14)
jne 0x338d3
cmpl $0x0, 0x2096c(%r14)
jne 0x338d3
testb $0x40, 0xb12(%r14)
je 0x338cb
movq 0x35d700(%rip), %rax # 0x390fa8
movq (%rax), %rdi
leaq 0xbe1fe6(%rip), %rax # 0xc15898
movq (%rax), %rcx
movq (%r14), %r8
leaq 0xafa9e(%rip), %rdx # 0xe335d
movl $0x1, %esi
xorl %eax, %eax
callq 0x2a1f0
orb $0x4, 0x20968(%r14)
incl 0x2096c(%r14)
leaq -0xe0(%rbp), %rax
leaq -0x30(%rbp), %r14
movq %rax, 0x10(%r14)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%r14)
movq 0x35d6a3(%rip), %r15 # 0x390fa8
movq (%r15), %rdi
leaq 0xbe1f89(%rip), %rax # 0xc15898
movq (%rax), %rcx
leaq 0xafa64(%rip), %rdx # 0xe337d
movl $0x1, %esi
xorl %eax, %eax
callq 0x2a1f0
movq (%r15), %rdi
movl $0x1, %esi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x2a790
movq (%r15), %rsi
movl $0xa, %edi
callq 0x2a700
movq (%r15), %rdi
callq 0x2a400
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ma_check_print_error:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 0C8h
mov rbx, rsi
mov r14, rdi
mov [rbp+var_D0], rdx
mov [rbp+var_C8], rcx
mov [rbp+var_C0], r8
mov [rbp+var_B8], r9
test al, al
jz short loc_33874
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_33874:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
cmp byte ptr [r14+209A2h], 0
jnz short loc_338D3
cmp dword ptr [r14+2096Ch], 0
jnz short loc_338D3
test byte ptr [r14+0B12h], 40h
jz short loc_338CB
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rax, my_progname_short
mov rcx, [rax]
mov r8, [r14]
lea rdx, aSAriaFileS; "%s: Aria file %s\n"
mov esi, 1
xor eax, eax
call ___fprintf_chk
loc_338CB:
or byte ptr ds:stru_20968.r_offset[r14], 4
loc_338D3:
inc dword ptr [r14+2096Ch]
lea rax, [rbp+var_E0]
lea r14, [rbp+var_30]
mov [r14+10h], rax
lea rax, [rbp+arg_0]
mov [r14+8], rax
mov rax, 3000000010h
mov [r14], rax
mov r15, cs:stderr_ptr
mov rdi, [r15]
lea rax, my_progname_short
mov rcx, [rax]
lea rdx, aSError; "%s: error: "
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [r15]
mov esi, 1
mov rdx, rbx
mov rcx, r14
call ___vfprintf_chk
mov rsi, [r15]
mov edi, 0Ah
call _fputc
mov rdi, [r15]
call _fflush
add rsp, 0C8h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long ma_check_print_error(long long a1, long long a2, ...)
{
va_list va; // [rsp+B0h] [rbp-30h] BYREF
fflush(stdout);
if ( !*(_BYTE *)(a1 + 133538) && !*(_DWORD *)(a1 + 133484) )
{
if ( (*(_BYTE *)(a1 + 2834) & 0x40) != 0 )
__fprintf_chk(stderr, 1LL, "%s: Aria file %s\n", my_progname_short, *(const char **)a1);
*((_BYTE *)&stru_20968.r_offset + a1) |= 4u;
}
++*(_DWORD *)(a1 + 133484);
va_start(va, a2);
__fprintf_chk(stderr, 1LL, "%s: error: ", my_progname_short);
__vfprintf_chk(stderr, 1LL, a2, va);
fputc(10LL, stderr);
return fflush(stderr);
}
| _ma_check_print_error:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xc8
MOV RBX,RSI
MOV R14,RDI
MOV qword ptr [RBP + -0xd0],RDX
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xb8],R9
TEST AL,AL
JZ 0x00133874
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_00133874:
MOV RAX,qword ptr [0x00490fa0]
MOV RDI,qword ptr [RAX]
CALL 0x0012a400
CMP byte ptr [R14 + 0x209a2],0x0
JNZ 0x001338d3
CMP dword ptr [R14 + 0x2096c],0x0
JNZ 0x001338d3
TEST byte ptr [R14 + 0xb12],0x40
JZ 0x001338cb
MOV RAX,qword ptr [0x00490fa8]
MOV RDI,qword ptr [RAX]
LEA RAX,[0xd15898]
MOV RCX,qword ptr [RAX]
MOV R8,qword ptr [R14]
LEA RDX,[0x1e335d]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x0012a1f0
LAB_001338cb:
OR byte ptr [R14 + 0x20968],0x4
LAB_001338d3:
INC dword ptr [R14 + 0x2096c]
LEA RAX,[RBP + -0xe0]
LEA R14,[RBP + -0x30]
MOV qword ptr [R14 + 0x10],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [R14 + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [R14],RAX
MOV R15,qword ptr [0x00490fa8]
MOV RDI,qword ptr [R15]
LEA RAX,[0xd15898]
MOV RCX,qword ptr [RAX]
LEA RDX,[0x1e337d]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x0012a1f0
MOV RDI,qword ptr [R15]
MOV ESI,0x1
MOV RDX,RBX
MOV RCX,R14
CALL 0x0012a790
MOV RSI,qword ptr [R15]
MOV EDI,0xa
CALL 0x0012a700
MOV RDI,qword ptr [R15]
CALL 0x0012a400
ADD RSP,0xc8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void _ma_check_print_error
(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)
{
int *puVar1;
char in_AL;
int1 local_e8 [16];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int1 *local_30;
int1 *local_28;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
fflush(*(FILE **)PTR_stdout_00490fa0);
if ((*(char *)((long)param_9 + 0x209a2) == '\0') && (*(int *)((long)param_9 + 0x2096c) == 0)) {
if ((*(byte *)((long)param_9 + 0xb12) & 0x40) != 0) {
__fprintf_chk(*(int8 *)PTR_stderr_00490fa8,1,"%s: Aria file %s\n",my_progname_short,
*param_9);
}
*(byte *)(param_9 + 0x412d) = *(byte *)(param_9 + 0x412d) | 4;
}
*(int *)((long)param_9 + 0x2096c) = *(int *)((long)param_9 + 0x2096c) + 1;
puVar1 = PTR_stderr_00490fa8;
local_28 = local_e8;
local_30 = &stack0x00000008;
local_38 = 0x3000000010;
__fprintf_chk(*(int8 *)PTR_stderr_00490fa8,1,"%s: error: ",my_progname_short);
__vfprintf_chk(*(int8 *)puVar1,1,param_10,&local_38);
fputc(10,*(FILE **)puVar1);
fflush(*(FILE **)puVar1);
return;
}
| |
37,444 | resolve_charset | eloqsql/mysys/charset.c | my_bool resolve_charset(const char *cs_name,
CHARSET_INFO *default_cs,
CHARSET_INFO **cs,
myf flags)
{
*cs= get_charset_by_csname(cs_name, MY_CS_PRIMARY, flags);
if (*cs == NULL)
{
*cs= default_cs;
return TRUE;
}
return FALSE;
} | O3 | c | resolve_charset:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq -0xc8(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0x12f0(%rip), %rax # 0x94c62
movq %rax, 0x80(%rdi)
leaq -0x12ef(%rip), %rax # 0x94c71
movq %rax, 0x88(%rdi)
leaq -0x12e2(%rip), %rax # 0x94c8c
movq %rax, 0x90(%rdi)
leaq 0xcd46(%rip), %rax # 0xa2cc2
movq %rax, 0x98(%rdi)
leaq 0x2f27be(%rip), %rax # 0x388748
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0x12f1(%rip), %rax # 0x94caa
movq %rax, 0xa8(%rdi)
movl $0x20, %edx
callq 0x95da4
movq %rax, %rcx
testq %rax, %rax
sete %al
cmovneq %rcx, %r14
movq %r14, (%rbx)
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x95fd7
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x29240
| resolve_charset:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 0C0h
mov rbx, rdx
mov r14, rsi
mov rsi, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
lea rdi, [rbp+var_C8]
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
mov edx, 20h ; ' '
call my_charset_get_by_name
mov rcx, rax
test rax, rax
setz al
cmovnz r14, rcx
mov [rbx], r14
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_95FD7
add rsp, 0C0h
pop rbx
pop r14
pop rbp
retn
loc_95FD7:
call ___stack_chk_fail
| bool resolve_charset(long long a1, long long a2, long long *a3, long long a4)
{
long long v6; // rcx
bool result; // al
char v8[128]; // [rsp+8h] [rbp-C8h] BYREF
long long ( *v9)(long long); // [rsp+88h] [rbp-48h]
long long ( *v10)(long long); // [rsp+90h] [rbp-40h]
long long ( *v11)(long long, long long); // [rsp+98h] [rbp-38h]
long long ( *v12)(_QWORD); // [rsp+A0h] [rbp-30h]
long long ( *v13)(); // [rsp+A8h] [rbp-28h]
long long ( *v14)(unsigned int *); // [rsp+B0h] [rbp-20h]
unsigned long long v15; // [rsp+B8h] [rbp-18h]
v15 = __readfsqword(0x28u);
v8[0] = 0;
v9 = my_once_alloc_c;
v10 = my_malloc_c;
v11 = my_realloc_c;
v12 = my_free;
v13 = my_charset_error_reporter;
v14 = add_collation;
v6 = my_charset_get_by_name((long long)v8, a1, 0x20u, a4);
result = v6 == 0;
if ( v6 )
a2 = v6;
*a3 = a2;
return result;
}
| resolve_charset:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0xc0
MOV RBX,RDX
MOV R14,RSI
MOV RSI,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[RBP + -0xc8]
MOV byte ptr [RDI],0x0
LEA RAX,[0x194c62]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x194c71]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x194c8c]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x1a2cc2]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x488748]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x194caa]
MOV qword ptr [RDI + 0xa8],RAX
MOV EDX,0x20
CALL 0x00195da4
MOV RCX,RAX
TEST RAX,RAX
SETZ AL
CMOVNZ R14,RCX
MOV qword ptr [RBX],R14
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x00195fd7
ADD RSP,0xc0
POP RBX
POP R14
POP RBP
RET
LAB_00195fd7:
CALL 0x00129240
|
bool resolve_charset(int8 param_1,long param_2,long *param_3)
{
long lVar1;
long in_FS_OFFSET;
int1 local_d0 [128];
code *local_50;
code *local_48;
code *local_40;
code *local_38;
int *local_30;
code *local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_d0[0] = 0;
local_50 = my_once_alloc_c;
local_48 = my_malloc_c;
local_40 = my_realloc_c;
local_38 = my_free;
local_30 = my_charset_error_reporter;
local_28 = add_collation;
lVar1 = my_charset_get_by_name(local_d0,param_1,0x20);
if (lVar1 != 0) {
param_2 = lVar1;
}
*param_3 = param_2;
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return lVar1 == 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
37,445 | mysql_real_query_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_real_query_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_real_query,
(parms->mysql, parms->stmt_str, parms->length),
parms->mysql,
int,
r_int)
} | O3 | c | mysql_real_query_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %rbx
movq 0x10(%rdi), %rdx
movq %rax, %rdi
callq 0x19a5e
movl %eax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_real_query_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi]
mov rsi, [rdi+8]
mov rcx, [rax+480h]
mov rbx, [rcx+28h]
mov rdx, [rdi+10h]
mov rdi, rax
call mysql_real_query
mov [rbx+8], eax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_real_query_start_internal(long long *a1)
{
_DWORD *v1; // rbx
long long result; // rax
v1 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL);
result = mysql_real_query(*a1, a1[1], a1[2]);
v1[2] = result;
*v1 = 0;
return result;
}
| mysql_real_query_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RCX + 0x28]
MOV RDX,qword ptr [RDI + 0x10]
MOV RDI,RAX
CALL 0x00119a5e
MOV dword ptr [RBX + 0x8],EAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_real_query_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_real_query(*param_1,param_1[1],param_1[2]);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
| |
37,446 | expand_fast_array | bluesky950520[P]quickjs/quickjs.c | static int expand_fast_array(JSContext *ctx, JSObject *p, uint32_t new_len)
{
uint32_t new_size;
size_t slack;
JSValue *new_array_prop;
/* XXX: potential arithmetic overflow */
new_size = max_int(new_len, p->u.array.u1.size * 3 / 2);
new_array_prop = js_realloc2(ctx, p->u.array.u.values, sizeof(JSValue) * new_size, &slack);
if (!new_array_prop)
return -1;
new_size += slack / sizeof(*new_array_prop);
p->u.array.u.values = new_array_prop;
p->u.array.u1.size = new_size;
return 0;
} | O1 | c | expand_fast_array:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl 0x30(%rsi), %eax
leal (%rax,%rax,2), %r14d
shrl %r14d
cmpl %r14d, %edx
cmovgl %edx, %r14d
movq 0x38(%rsi), %rsi
movq %r14, %rdx
shlq $0x4, %rdx
movq %rsp, %rcx
callq 0x1cc0f
testq %rax, %rax
je 0x3dbff
movq (%rsp), %rcx
shrq $0x4, %rcx
addl %ecx, %r14d
movq %rax, 0x38(%rbx)
movl %r14d, 0x30(%rbx)
xorl %eax, %eax
jmp 0x3dc04
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| expand_fast_array:
push r14
push rbx
push rax
mov rbx, rsi
mov eax, [rsi+30h]
lea r14d, [rax+rax*2]
shr r14d, 1
cmp edx, r14d
cmovg r14d, edx
mov rsi, [rsi+38h]
mov rdx, r14
shl rdx, 4
mov rcx, rsp
call js_realloc2
test rax, rax
jz short loc_3DBFF
mov rcx, [rsp+18h+var_18]
shr rcx, 4
add r14d, ecx
mov [rbx+38h], rax
mov [rbx+30h], r14d
xor eax, eax
jmp short loc_3DC04
loc_3DBFF:
mov eax, 0FFFFFFFFh
loc_3DC04:
add rsp, 8
pop rbx
pop r14
retn
| long long expand_fast_array(long long a1, long long a2, int a3)
{
unsigned long long v3; // rax
long long v4; // r14
long long v5; // rax
int v6; // r14d
unsigned long long v8[3]; // [rsp+0h] [rbp-18h] BYREF
v8[0] = v3;
v4 = (unsigned int)(3 * *(_DWORD *)(a2 + 48)) >> 1;
if ( a3 > (int)v4 )
v4 = (unsigned int)a3;
v5 = js_realloc2(a1, *(_QWORD *)(a2 + 56), 16 * v4, v8);
if ( !v5 )
return 0xFFFFFFFFLL;
v6 = (v8[0] >> 4) + v4;
*(_QWORD *)(a2 + 56) = v5;
*(_DWORD *)(a2 + 48) = v6;
return 0LL;
}
| expand_fast_array:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV EAX,dword ptr [RSI + 0x30]
LEA R14D,[RAX + RAX*0x2]
SHR R14D,0x1
CMP EDX,R14D
CMOVG R14D,EDX
MOV RSI,qword ptr [RSI + 0x38]
MOV RDX,R14
SHL RDX,0x4
MOV RCX,RSP
CALL 0x0011cc0f
TEST RAX,RAX
JZ 0x0013dbff
MOV RCX,qword ptr [RSP]
SHR RCX,0x4
ADD R14D,ECX
MOV qword ptr [RBX + 0x38],RAX
MOV dword ptr [RBX + 0x30],R14D
XOR EAX,EAX
JMP 0x0013dc04
LAB_0013dbff:
MOV EAX,0xffffffff
LAB_0013dc04:
ADD RSP,0x8
POP RBX
POP R14
RET
|
int8 expand_fast_array(int8 param_1,long param_2,uint param_3)
{
ulong in_RAX;
long lVar1;
int8 uVar2;
uint uVar3;
ulong uVar4;
ulong local_18;
uVar3 = (uint)(*(int *)(param_2 + 0x30) * 3) >> 1;
uVar4 = (ulong)uVar3;
if ((int)uVar3 < (int)param_3) {
uVar4 = (ulong)param_3;
}
local_18 = in_RAX;
lVar1 = js_realloc2(param_1,*(int8 *)(param_2 + 0x38),uVar4 << 4,&local_18);
if (lVar1 == 0) {
uVar2 = 0xffffffff;
}
else {
*(long *)(param_2 + 0x38) = lVar1;
*(int *)(param_2 + 0x30) = (int)uVar4 + (int)(local_18 >> 4);
uVar2 = 0;
}
return uVar2;
}
| |
37,447 | expand_fast_array | bluesky950520[P]quickjs/quickjs.c | static int expand_fast_array(JSContext *ctx, JSObject *p, uint32_t new_len)
{
uint32_t new_size;
size_t slack;
JSValue *new_array_prop;
/* XXX: potential arithmetic overflow */
new_size = max_int(new_len, p->u.array.u1.size * 3 / 2);
new_array_prop = js_realloc2(ctx, p->u.array.u.values, sizeof(JSValue) * new_size, &slack);
if (!new_array_prop)
return -1;
new_size += slack / sizeof(*new_array_prop);
p->u.array.u.values = new_array_prop;
p->u.array.u1.size = new_size;
return 0;
} | O2 | c | expand_fast_array:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
imull $0x3, 0x30(%rsi), %r14d
shrl %r14d
cmpl %r14d, %edx
cmovgl %edx, %r14d
movq 0x38(%rsi), %rsi
movq %r14, %rdx
shlq $0x4, %rdx
movq %rsp, %rcx
callq 0x172b1
testq %rax, %rax
je 0x363ea
movq (%rsp), %rcx
shrq $0x4, %rcx
addl %ecx, %r14d
movq %rax, 0x38(%rbx)
movl %r14d, 0x30(%rbx)
xorl %eax, %eax
jmp 0x363ed
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| expand_fast_array:
push r14
push rbx
push rax
mov rbx, rsi
imul r14d, [rsi+30h], 3
shr r14d, 1
cmp edx, r14d
cmovg r14d, edx
mov rsi, [rsi+38h]
mov rdx, r14
shl rdx, 4
mov rcx, rsp
call js_realloc2
test rax, rax
jz short loc_363EA
mov rcx, [rsp+18h+var_18]
shr rcx, 4
add r14d, ecx
mov [rbx+38h], rax
mov [rbx+30h], r14d
xor eax, eax
jmp short loc_363ED
loc_363EA:
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_363ED:
add rsp, 8
pop rbx
pop r14
retn
| long long expand_fast_array(long long a1, long long a2, int a3)
{
unsigned long long v3; // rax
long long v4; // r14
long long v5; // rax
int v6; // r14d
unsigned long long v8[3]; // [rsp+0h] [rbp-18h] BYREF
v8[0] = v3;
v4 = (unsigned int)(3 * *(_DWORD *)(a2 + 48)) >> 1;
if ( a3 > (int)v4 )
v4 = (unsigned int)a3;
v5 = js_realloc2(a1, *(_QWORD *)(a2 + 56), 16 * v4, v8);
if ( !v5 )
return -1LL;
v6 = (v8[0] >> 4) + v4;
*(_QWORD *)(a2 + 56) = v5;
*(_DWORD *)(a2 + 48) = v6;
return 0LL;
}
| expand_fast_array:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
IMUL R14D,dword ptr [RSI + 0x30],0x3
SHR R14D,0x1
CMP EDX,R14D
CMOVG R14D,EDX
MOV RSI,qword ptr [RSI + 0x38]
MOV RDX,R14
SHL RDX,0x4
MOV RCX,RSP
CALL 0x001172b1
TEST RAX,RAX
JZ 0x001363ea
MOV RCX,qword ptr [RSP]
SHR RCX,0x4
ADD R14D,ECX
MOV qword ptr [RBX + 0x38],RAX
MOV dword ptr [RBX + 0x30],R14D
XOR EAX,EAX
JMP 0x001363ed
LAB_001363ea:
PUSH -0x1
POP RAX
LAB_001363ed:
ADD RSP,0x8
POP RBX
POP R14
RET
|
int8 expand_fast_array(int8 param_1,long param_2,uint param_3)
{
ulong in_RAX;
long lVar1;
int8 uVar2;
uint uVar3;
ulong uVar4;
ulong local_18;
uVar3 = (uint)(*(int *)(param_2 + 0x30) * 3) >> 1;
uVar4 = (ulong)uVar3;
if ((int)uVar3 < (int)param_3) {
uVar4 = (ulong)param_3;
}
local_18 = in_RAX;
lVar1 = js_realloc2(param_1,*(int8 *)(param_2 + 0x38),uVar4 << 4,&local_18);
if (lVar1 == 0) {
uVar2 = 0xffffffffffffffff;
}
else {
*(long *)(param_2 + 0x38) = lVar1;
*(int *)(param_2 + 0x30) = (int)uVar4 + (int)(local_18 >> 4);
uVar2 = 0;
}
return uVar2;
}
| |
37,448 | expand_fast_array | bluesky950520[P]quickjs/quickjs.c | static int expand_fast_array(JSContext *ctx, JSObject *p, uint32_t new_len)
{
uint32_t new_size;
size_t slack;
JSValue *new_array_prop;
/* XXX: potential arithmetic overflow */
new_size = max_int(new_len, p->u.array.u1.size * 3 / 2);
new_array_prop = js_realloc2(ctx, p->u.array.u.values, sizeof(JSValue) * new_size, &slack);
if (!new_array_prop)
return -1;
new_size += slack / sizeof(*new_array_prop);
p->u.array.u.values = new_array_prop;
p->u.array.u1.size = new_size;
return 0;
} | O3 | c | expand_fast_array:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl 0x30(%rsi), %eax
leal (%rax,%rax,2), %r14d
shrl %r14d
cmpl %r14d, %edx
cmovgl %edx, %r14d
movq 0x38(%rsi), %rsi
movq %r14, %rdx
shlq $0x4, %rdx
movq %rsp, %rcx
callq 0x1d4fa
testq %rax, %rax
je 0x3f251
movq (%rsp), %rcx
shrq $0x4, %rcx
addl %ecx, %r14d
movq %rax, 0x38(%rbx)
movl %r14d, 0x30(%rbx)
xorl %eax, %eax
jmp 0x3f256
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| expand_fast_array:
push r14
push rbx
push rax
mov rbx, rsi
mov eax, [rsi+30h]
lea r14d, [rax+rax*2]
shr r14d, 1
cmp edx, r14d
cmovg r14d, edx
mov rsi, [rsi+38h]
mov rdx, r14
shl rdx, 4
mov rcx, rsp
call js_realloc2
test rax, rax
jz short loc_3F251
mov rcx, [rsp+18h+var_18]
shr rcx, 4
add r14d, ecx
mov [rbx+38h], rax
mov [rbx+30h], r14d
xor eax, eax
jmp short loc_3F256
loc_3F251:
mov eax, 0FFFFFFFFh
loc_3F256:
add rsp, 8
pop rbx
pop r14
retn
| long long expand_fast_array(long long a1, long long a2, int a3)
{
unsigned long long v3; // rax
long long v4; // r14
long long v5; // rax
int v6; // r14d
unsigned long long v8[3]; // [rsp+0h] [rbp-18h] BYREF
v8[0] = v3;
v4 = (unsigned int)(3 * *(_DWORD *)(a2 + 48)) >> 1;
if ( a3 > (int)v4 )
v4 = (unsigned int)a3;
v5 = js_realloc2(a1, *(_QWORD *)(a2 + 56), 16 * v4, v8);
if ( !v5 )
return 0xFFFFFFFFLL;
v6 = (v8[0] >> 4) + v4;
*(_QWORD *)(a2 + 56) = v5;
*(_DWORD *)(a2 + 48) = v6;
return 0LL;
}
| expand_fast_array:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV EAX,dword ptr [RSI + 0x30]
LEA R14D,[RAX + RAX*0x2]
SHR R14D,0x1
CMP EDX,R14D
CMOVG R14D,EDX
MOV RSI,qword ptr [RSI + 0x38]
MOV RDX,R14
SHL RDX,0x4
MOV RCX,RSP
CALL 0x0011d4fa
TEST RAX,RAX
JZ 0x0013f251
MOV RCX,qword ptr [RSP]
SHR RCX,0x4
ADD R14D,ECX
MOV qword ptr [RBX + 0x38],RAX
MOV dword ptr [RBX + 0x30],R14D
XOR EAX,EAX
JMP 0x0013f256
LAB_0013f251:
MOV EAX,0xffffffff
LAB_0013f256:
ADD RSP,0x8
POP RBX
POP R14
RET
|
int8 expand_fast_array(int8 param_1,long param_2,uint param_3)
{
ulong in_RAX;
long lVar1;
int8 uVar2;
uint uVar3;
ulong uVar4;
ulong local_18;
uVar3 = (uint)(*(int *)(param_2 + 0x30) * 3) >> 1;
uVar4 = (ulong)uVar3;
if ((int)uVar3 < (int)param_3) {
uVar4 = (ulong)param_3;
}
local_18 = in_RAX;
lVar1 = js_realloc2(param_1,*(int8 *)(param_2 + 0x38),uVar4 << 4,&local_18);
if (lVar1 == 0) {
uVar2 = 0xffffffff;
}
else {
*(long *)(param_2 + 0x38) = lVar1;
*(int *)(param_2 + 0x30) = (int)uVar4 + (int)(local_18 >> 4);
uVar2 = 0;
}
return uVar2;
}
| |
37,449 | end_io_cache | eloqsql/mysys/mf_iocache.c | int end_io_cache(IO_CACHE *info)
{
int error=0;
DBUG_ENTER("end_io_cache");
DBUG_PRINT("enter",("cache: %p", info));
/*
Every thread must call remove_io_thread(). The last one destroys
the share elements.
*/
DBUG_ASSERT(!info->share || !info->share->total_threads);
if (info->alloced_buffer)
{
info->alloced_buffer=0;
if (info->file != -1) /* File doesn't exist */
error= my_b_flush_io_cache(info,1);
my_free(info->buffer);
info->buffer=info->read_pos=(uchar*) 0;
}
if (info->type == SEQ_READ_APPEND)
{
/* Destroy allocated mutex */
mysql_mutex_destroy(&info->append_buffer_lock);
}
info->share= 0;
info->type= TYPE_NOT_SET; /* Ensure that flush_io_cache() does nothing */
info->write_end= 0; /* Ensure that my_b_write() fails */
info->write_function= 0; /* my_b_write will crash if used */
DBUG_RETURN(error);
} | O3 | c | end_io_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x100(%rdi)
je 0x5446c
movq $0x0, 0x100(%rbx)
cmpl $-0x1, 0xd4(%rbx)
je 0x54471
movq %rbx, %rdi
movl $0x1, %esi
callq 0x53489
movl %eax, %r14d
jmp 0x54474
xorl %r14d, %r14d
jmp 0x54487
xorl %r14d, %r14d
movq 0x20(%rbx), %rdi
callq 0x5d26a
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq %rax, 0x20(%rbx)
cmpl $0x3, 0xb0(%rbx)
jne 0x544c0
leaq 0x50(%rbx), %r15
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x544b8
leaq 0x2df9b9(%rip), %rax # 0x333e60
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x90(%rbx)
movq %r15, %rdi
callq 0x28430
xorl %eax, %eax
movq %rax, 0x98(%rbx)
movl $0x0, 0xb0(%rbx)
movq %rax, 0x48(%rbx)
movq %rax, 0xa8(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| end_io_cache:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
cmp qword ptr [rdi+100h], 0
jz short loc_5446C
mov qword ptr [rbx+100h], 0
cmp dword ptr [rbx+0D4h], 0FFFFFFFFh
jz short loc_54471
mov rdi, rbx
mov esi, 1
call my_b_flush_io_cache
mov r14d, eax
jmp short loc_54474
loc_5446C:
xor r14d, r14d
jmp short loc_54487
loc_54471:
xor r14d, r14d
loc_54474:
mov rdi, [rbx+20h]
call my_free
xor eax, eax
mov [rbx+10h], rax
mov [rbx+20h], rax
loc_54487:
cmp dword ptr [rbx+0B0h], 3
jnz short loc_544C0
lea r15, [rbx+50h]
mov rdi, [rbx+90h]
test rdi, rdi
jz short loc_544B8
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+90h], 0
loc_544B8:
mov rdi, r15
call _pthread_mutex_destroy
loc_544C0:
xor eax, eax
mov [rbx+98h], rax
mov dword ptr [rbx+0B0h], 0
mov [rbx+48h], rax
mov [rbx+0A8h], rax
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long end_io_cache(long long a1)
{
unsigned int v2; // r14d
long long v3; // rdi
if ( *(_QWORD *)(a1 + 256) )
{
*(_QWORD *)(a1 + 256) = 0LL;
if ( *(_DWORD *)(a1 + 212) == -1 )
v2 = 0;
else
v2 = my_b_flush_io_cache((long long *)a1, 1);
my_free(*(_QWORD *)(a1 + 32));
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
}
else
{
v2 = 0;
}
if ( *(_DWORD *)(a1 + 176) == 3 )
{
v3 = *(_QWORD *)(a1 + 144);
if ( v3 )
{
((void ( *)(long long))PSI_server[9])(v3);
*(_QWORD *)(a1 + 144) = 0LL;
}
pthread_mutex_destroy(a1 + 80);
}
*(_QWORD *)(a1 + 152) = 0LL;
*(_DWORD *)(a1 + 176) = 0;
*(_QWORD *)(a1 + 72) = 0LL;
*(_QWORD *)(a1 + 168) = 0LL;
return v2;
}
| end_io_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP qword ptr [RDI + 0x100],0x0
JZ 0x0015446c
MOV qword ptr [RBX + 0x100],0x0
CMP dword ptr [RBX + 0xd4],-0x1
JZ 0x00154471
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00153489
MOV R14D,EAX
JMP 0x00154474
LAB_0015446c:
XOR R14D,R14D
JMP 0x00154487
LAB_00154471:
XOR R14D,R14D
LAB_00154474:
MOV RDI,qword ptr [RBX + 0x20]
CALL 0x0015d26a
XOR EAX,EAX
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [RBX + 0x20],RAX
LAB_00154487:
CMP dword ptr [RBX + 0xb0],0x3
JNZ 0x001544c0
LEA R15,[RBX + 0x50]
MOV RDI,qword ptr [RBX + 0x90]
TEST RDI,RDI
JZ 0x001544b8
LEA RAX,[0x433e60]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x90],0x0
LAB_001544b8:
MOV RDI,R15
CALL 0x00128430
LAB_001544c0:
XOR EAX,EAX
MOV qword ptr [RBX + 0x98],RAX
MOV dword ptr [RBX + 0xb0],0x0
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0xa8],RAX
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 end_io_cache(long param_1)
{
int4 uVar1;
if (*(long *)(param_1 + 0x100) == 0) {
uVar1 = 0;
}
else {
*(int8 *)(param_1 + 0x100) = 0;
if (*(int *)(param_1 + 0xd4) == -1) {
uVar1 = 0;
}
else {
uVar1 = my_b_flush_io_cache(param_1,1);
}
my_free(*(int8 *)(param_1 + 0x20));
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x20) = 0;
}
if (*(int *)(param_1 + 0xb0) == 3) {
if (*(long *)(param_1 + 0x90) != 0) {
(**(code **)(PSI_server + 0x48))();
*(int8 *)(param_1 + 0x90) = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x50));
}
*(int8 *)(param_1 + 0x98) = 0;
*(int4 *)(param_1 + 0xb0) = 0;
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)(param_1 + 0xa8) = 0;
return uVar1;
}
| |
37,450 | mju_compressSparse | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_util_sparse.c | void mju_compressSparse(mjtNum* mat, int nr, int nc, int* rownnz, int* rowadr, int* colind) {
rowadr[0] = 0;
int adr = rownnz[0];
for (int r=1; r < nr; r++) {
// save old rowadr, record new
int rowadr1 = rowadr[r];
rowadr[r] = adr;
// shift mat and mat_colind
for (int adr1=rowadr1; adr1 < rowadr1+rownnz[r]; adr1++) {
mat[adr] = mat[adr1];
colind[adr] = colind[adr1];
adr++;
}
}
} | O3 | c | mju_compressSparse:
movl $0x0, (%r8)
cmpl $0x2, %esi
jl 0xa3a0a
pushq %rbx
movl (%rcx), %eax
movl %esi, %edx
movl $0x1, %esi
movslq (%r8,%rsi,4), %r10
movl %eax, (%r8,%rsi,4)
cmpl $0x0, (%rcx,%rsi,4)
jle 0xa3a01
cltq
movq %r10, %r11
vmovsd (%rdi,%r11,8), %xmm0
vmovsd %xmm0, (%rdi,%rax,8)
movl (%r9,%r11,4), %ebx
movl %ebx, (%r9,%rax,4)
incq %rax
incq %r11
movslq (%rcx,%rsi,4), %rbx
addq %r10, %rbx
cmpq %rbx, %r11
jl 0xa39dc
incq %rsi
cmpq %rdx, %rsi
jne 0xa39c9
popq %rbx
retq
| mju_compressSparse:
mov dword ptr [r8], 0
cmp esi, 2
jl short locret_A3A0A
push rbx
mov eax, [rcx]
mov edx, esi
mov esi, 1
loc_A39C9:
movsxd r10, dword ptr [r8+rsi*4]
mov [r8+rsi*4], eax
cmp dword ptr [rcx+rsi*4], 0
jle short loc_A3A01
cdqe
mov r11, r10
loc_A39DC:
vmovsd xmm0, qword ptr [rdi+r11*8]
vmovsd qword ptr [rdi+rax*8], xmm0
mov ebx, [r9+r11*4]
mov [r9+rax*4], ebx
inc rax
inc r11
movsxd rbx, dword ptr [rcx+rsi*4]
add rbx, r10
cmp r11, rbx
jl short loc_A39DC
loc_A3A01:
inc rsi
cmp rsi, rdx
jnz short loc_A39C9
pop rbx
locret_A3A0A:
retn
| void mju_compressSparse(long long _RDI, int a2, long long a3, _DWORD *a4, _DWORD *a5, long long a6)
{
long long v7; // rdx
long long i; // rsi
long long v9; // r10
*a5 = 0;
if ( a2 >= 2 )
{
LODWORD(_RAX) = *a4;
v7 = (unsigned int)a2;
for ( i = 1LL; i != v7; ++i )
{
v9 = (int)a5[i];
a5[i] = _RAX;
if ( (int)a4[i] > 0 )
{
_RAX = (int)_RAX;
_R11 = v9;
do
{
__asm
{
vmovsd xmm0, qword ptr [rdi+r11*8]
vmovsd qword ptr [rdi+rax*8], xmm0
}
*(_DWORD *)(a6 + 4 * _RAX++) = *(_DWORD *)(a6 + 4 * _R11++);
}
while ( _R11 < v9 + (int)a4[i] );
}
}
}
}
| mju_compressSparse:
MOV dword ptr [R8],0x0
CMP ESI,0x2
JL 0x001a3a0a
PUSH RBX
MOV EAX,dword ptr [RCX]
MOV EDX,ESI
MOV ESI,0x1
LAB_001a39c9:
MOVSXD R10,dword ptr [R8 + RSI*0x4]
MOV dword ptr [R8 + RSI*0x4],EAX
CMP dword ptr [RCX + RSI*0x4],0x0
JLE 0x001a3a01
CDQE
MOV R11,R10
LAB_001a39dc:
VMOVSD XMM0,qword ptr [RDI + R11*0x8]
VMOVSD qword ptr [RDI + RAX*0x8],XMM0
MOV EBX,dword ptr [R9 + R11*0x4]
MOV dword ptr [R9 + RAX*0x4],EBX
INC RAX
INC R11
MOVSXD RBX,dword ptr [RCX + RSI*0x4]
ADD RBX,R10
CMP R11,RBX
JL 0x001a39dc
LAB_001a3a01:
INC RSI
CMP RSI,RDX
JNZ 0x001a39c9
POP RBX
LAB_001a3a0a:
RET
|
void mju_compressSparse(long param_1,uint param_2,int8 param_3,uint *param_4,
int4 *param_5,long param_6)
{
int iVar1;
ulong uVar2;
ulong uVar3;
long lVar4;
*param_5 = 0;
if (1 < (int)param_2) {
uVar2 = (ulong)*param_4;
uVar3 = 1;
do {
iVar1 = param_5[uVar3];
param_5[uVar3] = (int)uVar2;
if (0 < (int)param_4[uVar3]) {
uVar2 = (ulong)(int)uVar2;
lVar4 = (long)iVar1;
do {
*(int8 *)(param_1 + uVar2 * 8) = *(int8 *)(param_1 + lVar4 * 8);
*(int4 *)(param_6 + uVar2 * 4) = *(int4 *)(param_6 + lVar4 * 4);
uVar2 = uVar2 + 1;
lVar4 = lVar4 + 1;
} while (lVar4 < (long)(int)param_4[uVar3] + (long)iVar1);
}
uVar3 = uVar3 + 1;
} while (uVar3 != param_2);
}
return;
}
| |
37,451 | FTB_WORD_cmp_list | eloqsql/storage/myisam/ft_boolean_search.c | static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b)
{
/* ORDER BY word, ndepth */
int i= ha_compare_text(cs, (uchar*) (*a)->word + 1, (*a)->len - 1,
(uchar*) (*b)->word + 1, (*b)->len - 1, 0);
if (!i)
i= CMP_NUM((*a)->ndepth, (*b)->ndepth);
return i;
} | O0 | c | FTB_WORD_cmp_list:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
addq $0x4d, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x48(%rax), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x4d, %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x48(%rax), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0xf0450
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x9e683
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x44(%rax), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x44(%rcx), %eax
jae 0x9e65a
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, -0x20(%rbp)
jmp 0x9e67d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x44(%rax), %edx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x44(%rax), %esi
movl $0x1, %eax
xorl %ecx, %ecx
cmpl %esi, %edx
cmovel %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| FTB_WORD_cmp_list:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
mov rsi, [rax]
add rsi, 4Dh ; 'M'
add rsi, 1
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+48h]
sub eax, 1
mov eax, eax
mov edx, eax
mov rax, [rbp+var_18]
mov rcx, [rax]
add rcx, 4Dh ; 'M'
add rcx, 1
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax+48h]
sub eax, 1
mov eax, eax
mov r8d, eax
xor r9d, r9d
call ha_compare_text
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jnz short loc_9E683
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+44h]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
cmp eax, [rcx+44h]
jnb short loc_9E65A
mov eax, 0FFFFFFFFh
mov [rbp+var_20], eax
jmp short loc_9E67D
loc_9E65A:
mov rax, [rbp+var_10]
mov rax, [rax]
mov edx, [rax+44h]
mov rax, [rbp+var_18]
mov rax, [rax]
mov esi, [rax+44h]
mov eax, 1
xor ecx, ecx
cmp edx, esi
cmovz eax, ecx
mov [rbp+var_20], eax
loc_9E67D:
mov eax, [rbp+var_20]
mov [rbp+var_1C], eax
loc_9E683:
mov eax, [rbp+var_1C]
add rsp, 20h
pop rbp
retn
| long long FTB_WORD_cmp_list(long long a1, long long a2, long long a3)
{
unsigned int v5; // [rsp+4h] [rbp-1Ch]
v5 = ha_compare_text(
a1,
*(_QWORD *)a2 + 78LL,
(unsigned int)(*(_DWORD *)(*(_QWORD *)a2 + 72LL) - 1),
*(_QWORD *)a3 + 78LL,
(unsigned int)(*(_DWORD *)(*(_QWORD *)a3 + 72LL) - 1),
0LL);
if ( !v5 )
{
if ( *(_DWORD *)(*(_QWORD *)a2 + 68LL) >= *(_DWORD *)(*(_QWORD *)a3 + 68LL) )
return *(_DWORD *)(*(_QWORD *)a2 + 68LL) != *(_DWORD *)(*(_QWORD *)a3 + 68LL);
else
return (unsigned int)-1;
}
return v5;
}
| FTB_WORD_cmp_list:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
ADD RSI,0x4d
ADD RSI,0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x48]
SUB EAX,0x1
MOV EAX,EAX
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4d
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x48]
SUB EAX,0x1
MOV EAX,EAX
MOV R8D,EAX
XOR R9D,R9D
CALL 0x001f0450
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x0019e683
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x44]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
CMP EAX,dword ptr [RCX + 0x44]
JNC 0x0019e65a
MOV EAX,0xffffffff
MOV dword ptr [RBP + -0x20],EAX
JMP 0x0019e67d
LAB_0019e65a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EDX,dword ptr [RAX + 0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV ESI,dword ptr [RAX + 0x44]
MOV EAX,0x1
XOR ECX,ECX
CMP EDX,ESI
CMOVZ EAX,ECX
MOV dword ptr [RBP + -0x20],EAX
LAB_0019e67d:
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0019e683:
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x20
POP RBP
RET
|
uint FTB_WORD_cmp_list(int8 param_1,long *param_2,long *param_3)
{
uint local_28;
uint local_24;
local_24 = ha_compare_text(param_1,*param_2 + 0x4e,*(int *)(*param_2 + 0x48) + -1,*param_3 + 0x4e,
*(int *)(*param_3 + 0x48) + -1,0);
if (local_24 == 0) {
if (*(uint *)(*param_2 + 0x44) < *(uint *)(*param_3 + 0x44)) {
local_28 = 0xffffffff;
}
else {
local_28 = (uint)(*(int *)(*param_2 + 0x44) != *(int *)(*param_3 + 0x44));
}
local_24 = local_28;
}
return local_24;
}
| |
37,452 | type_apply_conversion | tsotchke[P]eshkol/src/core/utils/type_conversion.c | char* type_apply_conversion(Arena* arena, const char* expr, Type* from, Type* to) {
assert(arena != NULL);
assert(expr != NULL);
assert(from != NULL);
assert(to != NULL);
// Same type, no conversion needed
if (type_equals(from, to)) {
char* result = arena_alloc(arena, strlen(expr) + 1);
if (!result) return NULL;
strcpy(result, expr);
return result;
}
// Generate conversion code
char buffer[1024];
// Integer to float
if (from->kind == TYPE_INTEGER && to->kind == TYPE_FLOAT) {
snprintf(buffer, sizeof(buffer), "(float)(%s)", expr);
}
// Float to integer
else if (from->kind == TYPE_FLOAT && to->kind == TYPE_INTEGER) {
snprintf(buffer, sizeof(buffer), "(int)(%s)", expr);
}
// Char to integer
else if (from->kind == TYPE_CHAR && to->kind == TYPE_INTEGER) {
snprintf(buffer, sizeof(buffer), "(int)(%s)", expr);
}
// Integer to char
else if (from->kind == TYPE_INTEGER && to->kind == TYPE_CHAR) {
snprintf(buffer, sizeof(buffer), "(char)(%s)", expr);
}
// String to any
else if (from->kind == TYPE_STRING && to->kind == TYPE_ANY) {
snprintf(buffer, sizeof(buffer), "(void*)(char*)(%s)", expr);
}
// Numeric to any
else if ((from->kind == TYPE_INTEGER || from->kind == TYPE_FLOAT) && to->kind == TYPE_ANY) {
const char* type_str = from->kind == TYPE_INTEGER ? "int" : "float";
snprintf(buffer, sizeof(buffer), "({ %s temp = (%s); (void*)&temp; })", type_str, expr);
}
// Any other conversion
else {
char* to_str = type_to_string(arena, to);
if (!to_str) return NULL;
snprintf(buffer, sizeof(buffer), "(%s)(%s)", to_str, expr);
}
// Allocate memory for the result
char* result = arena_alloc(arena, strlen(buffer) + 1);
if (!result) return NULL;
// Copy the result
strcpy(result, buffer);
return result;
} | O1 | c | type_apply_conversion:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x408, %rsp # imm = 0x408
testq %rdi, %rdi
je 0x19875
movq %rsi, %r14
testq %rsi, %rsi
je 0x19894
movq %rdx, %r12
testq %rdx, %rdx
je 0x198b3
movq %rcx, %r15
testq %rcx, %rcx
je 0x198d2
movq %rdi, %rbx
movq %r12, %rdi
movq %r15, %rsi
callq 0x181b4
testb %al, %al
je 0x19760
movq %r14, %rdi
callq 0x2100
leaq 0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x33af
testq %rax, %rax
je 0x19861
movq %rax, %rdi
movq %r14, %rsi
addq $0x408, %rsp # imm = 0x408
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2090
movl (%r12), %eax
cmpl $0x2, %eax
jne 0x19778
cmpl $0x3, (%r15)
jne 0x19778
leaq 0x972a(%rip), %rdx # 0x22ea0
jmp 0x197c2
cmpl $0x4, %eax
je 0x1978d
cmpl $0x3, %eax
jne 0x1979c
cmpl $0x2, (%r15)
je 0x19793
cmpl $0x4, %eax
jne 0x1979c
cmpl $0x2, (%r15)
jne 0x1979c
leaq 0x9712(%rip), %rdx # 0x22eac
jmp 0x197c2
cmpl $0x2, %eax
jne 0x197b0
cmpl $0x4, (%r15)
jne 0x197b0
leaq 0x9708(%rip), %rdx # 0x22eb6
jmp 0x197c2
cmpl $0x5, %eax
jne 0x197d6
cmpl $0xc, (%r15)
jne 0x197d6
leaq 0x96ff(%rip), %rdx # 0x22ec1
movq %rsp, %rdi
movl $0x400, %esi # imm = 0x400
movq %r14, %rcx
xorl %eax, %eax
callq 0x2160
jmp 0x19838
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x2, %ecx
jne 0x1980c
cmpl $0xc, (%r15)
jne 0x1980c
cmpl $0x2, %eax
leaq 0x3713(%rip), %rax # 0x1cf03
leaq 0x4f86(%rip), %rcx # 0x1e77d
cmoveq %rax, %rcx
leaq 0x96d2(%rip), %rdx # 0x22ed4
movq %rsp, %rdi
movl $0x400, %esi # imm = 0x400
jmp 0x1982e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18970
testq %rax, %rax
je 0x19861
leaq 0x96d5(%rip), %rdx # 0x22ef8
movq %rsp, %rdi
movl $0x400, %esi # imm = 0x400
movq %rax, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x2160
movq %rsp, %rdi
callq 0x2100
leaq 0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x33af
testq %rax, %rax
je 0x19861
movq %rax, %rbx
movq %rsp, %rsi
movq %rax, %rdi
callq 0x2090
jmp 0x19863
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x408, %rsp # imm = 0x408
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x106f(%rip), %rdi # 0x1a8eb
leaq 0x957f(%rip), %rsi # 0x22e02
leaq 0x95d3(%rip), %rcx # 0x22e5d
movl $0x1f5, %edx # imm = 0x1F5
callq 0x2180
leaq 0x89b7(%rip), %rdi # 0x22252
leaq 0x9560(%rip), %rsi # 0x22e02
leaq 0x95b4(%rip), %rcx # 0x22e5d
movl $0x1f6, %edx # imm = 0x1F6
callq 0x2180
leaq 0x8878(%rip), %rdi # 0x22132
leaq 0x9541(%rip), %rsi # 0x22e02
leaq 0x9595(%rip), %rcx # 0x22e5d
movl $0x1f7, %edx # imm = 0x1F7
callq 0x2180
leaq 0x8895(%rip), %rdi # 0x2216e
leaq 0x9522(%rip), %rsi # 0x22e02
leaq 0x9576(%rip), %rcx # 0x22e5d
movl $0x1f8, %edx # imm = 0x1F8
callq 0x2180
| type_apply_conversion:
push r15
push r14
push r12
push rbx
sub rsp, 408h
test rdi, rdi
jz loc_19875
mov r14, rsi
test rsi, rsi
jz loc_19894
mov r12, rdx
test rdx, rdx
jz loc_198B3
mov r15, rcx
test rcx, rcx
jz loc_198D2
mov rbx, rdi
mov rdi, r12
mov rsi, r15
call type_equals
test al, al
jz short loc_19760
mov rdi, r14
call _strlen
lea rsi, [rax+1]
mov rdi, rbx
call arena_alloc
test rax, rax
jz loc_19861
mov rdi, rax
mov rsi, r14
add rsp, 408h
pop rbx
pop r12
pop r14
pop r15
jmp _strcpy
loc_19760:
mov eax, [r12]
cmp eax, 2
jnz short loc_19778
cmp dword ptr [r15], 3
jnz short loc_19778
lea rdx, aFloatS; "(float)(%s)"
jmp short loc_197C2
loc_19778:
cmp eax, 4
jz short loc_1978D
cmp eax, 3
jnz short loc_1979C
cmp dword ptr [r15], 2
jz short loc_19793
cmp eax, 4
jnz short loc_1979C
loc_1978D:
cmp dword ptr [r15], 2
jnz short loc_1979C
loc_19793:
lea rdx, aIntS; "(int)(%s)"
jmp short loc_197C2
loc_1979C:
cmp eax, 2
jnz short loc_197B0
cmp dword ptr [r15], 4
jnz short loc_197B0
lea rdx, aCharS; "(char)(%s)"
jmp short loc_197C2
loc_197B0:
cmp eax, 5
jnz short loc_197D6
cmp dword ptr [r15], 0Ch
jnz short loc_197D6
lea rdx, aVoidCharS; "(void*)(char*)(%s)"
loc_197C2:
mov rdi, rsp
mov esi, 400h
mov rcx, r14
xor eax, eax
call _snprintf
jmp short loc_19838
loc_197D6:
mov ecx, eax
and ecx, 0FFFFFFFEh
cmp ecx, 2
jnz short loc_1980C
cmp dword ptr [r15], 0Ch
jnz short loc_1980C
cmp eax, 2
lea rax, aInt; "int"
lea rcx, aFloat; "float"
cmovz rcx, rax
lea rdx, aSTempSVoidTemp; "({ %s temp = (%s); (void*)&temp; })"
mov rdi, rsp
mov esi, 400h
jmp short loc_1982E
loc_1980C:
mov rdi, rbx
mov rsi, r15
call type_to_string
test rax, rax
jz short loc_19861
lea rdx, aSS_3; "(%s)(%s)"
mov rdi, rsp
mov esi, 400h
mov rcx, rax
loc_1982E:
mov r8, r14
xor eax, eax
call _snprintf
loc_19838:
mov rdi, rsp
call _strlen
lea rsi, [rax+1]
mov rdi, rbx
call arena_alloc
test rax, rax
jz short loc_19861
mov rbx, rax
mov rsi, rsp
mov rdi, rax
call _strcpy
jmp short loc_19863
loc_19861:
xor ebx, ebx
loc_19863:
mov rax, rbx
add rsp, 408h
pop rbx
pop r12
pop r14
pop r15
retn
loc_19875:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCharTypeApplyC; "char *type_apply_conversion(Arena *, co"...
mov edx, 1F5h
call ___assert_fail
loc_19894:
lea rdi, aExprNull; "expr != NULL"
lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCharTypeApplyC; "char *type_apply_conversion(Arena *, co"...
mov edx, 1F6h
call ___assert_fail
loc_198B3:
lea rdi, aFromNull; "from != NULL"
lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCharTypeApplyC; "char *type_apply_conversion(Arena *, co"...
mov edx, 1F7h
call ___assert_fail
loc_198D2:
lea rdi, aToNull; "to != NULL"
lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCharTypeApplyC; "char *type_apply_conversion(Arena *, co"...
mov edx, 1F8h
call ___assert_fail
| long long type_apply_conversion(long long a1, long long a2, int *a3, _DWORD *a4)
{
long long v6; // rax
long long v7; // rax
int v9; // eax
const char *v10; // rcx
long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v14; // rbx
_BYTE v15[1064]; // [rsp+0h] [rbp-428h] BYREF
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c",
501LL,
"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
if ( !a2 )
__assert_fail(
"expr != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c",
502LL,
"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
if ( !a3 )
__assert_fail(
"from != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c",
503LL,
"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
if ( !a4 )
__assert_fail(
"to != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c",
504LL,
"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
if ( (unsigned __int8)type_equals(a3, (long long)a4) )
{
v6 = strlen(a2);
v7 = arena_alloc(a1, v6 + 1);
if ( v7 )
return strcpy(v7, a2);
return 0LL;
}
v9 = *a3;
if ( *a3 == 2 && *a4 == 3 )
{
snprintf(v15, 1024LL, "(float)(%s)", a2);
goto LABEL_31;
}
if ( v9 == 4 )
{
if ( *a4 != 2 )
goto LABEL_17;
LABEL_16:
snprintf(v15, 1024LL, "(int)(%s)", a2);
goto LABEL_31;
}
if ( v9 == 3 && *a4 == 2 )
goto LABEL_16;
LABEL_17:
if ( v9 == 2 && *a4 == 4 )
{
snprintf(v15, 1024LL, "(char)(%s)", a2);
}
else if ( v9 == 5 && *a4 == 12 )
{
snprintf(v15, 1024LL, "(void*)(char*)(%s)", a2);
}
else if ( (v9 & 0xFFFFFFFE) == 2 && *a4 == 12 )
{
v10 = "float";
if ( v9 == 2 )
v10 = "int";
snprintf(v15, 1024LL, "({ %s temp = (%s); (void*)&temp; })", v10, a2);
}
else
{
v11 = type_to_string(a1, (long long)a4);
if ( !v11 )
return 0LL;
snprintf(v15, 1024LL, "(%s)(%s)", v11, a2);
}
LABEL_31:
v12 = strlen(v15);
v13 = arena_alloc(a1, v12 + 1);
if ( !v13 )
return 0LL;
v14 = v13;
strcpy(v13, v15);
return v14;
}
| type_apply_conversion:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x408
TEST RDI,RDI
JZ 0x00119875
MOV R14,RSI
TEST RSI,RSI
JZ 0x00119894
MOV R12,RDX
TEST RDX,RDX
JZ 0x001198b3
MOV R15,RCX
TEST RCX,RCX
JZ 0x001198d2
MOV RBX,RDI
MOV RDI,R12
MOV RSI,R15
CALL 0x001181b4
TEST AL,AL
JZ 0x00119760
MOV RDI,R14
CALL 0x00102100
LEA RSI,[RAX + 0x1]
MOV RDI,RBX
CALL 0x001033af
TEST RAX,RAX
JZ 0x00119861
MOV RDI,RAX
MOV RSI,R14
ADD RSP,0x408
POP RBX
POP R12
POP R14
POP R15
JMP 0x00102090
LAB_00119760:
MOV EAX,dword ptr [R12]
CMP EAX,0x2
JNZ 0x00119778
CMP dword ptr [R15],0x3
JNZ 0x00119778
LEA RDX,[0x122ea0]
JMP 0x001197c2
LAB_00119778:
CMP EAX,0x4
JZ 0x0011978d
CMP EAX,0x3
JNZ 0x0011979c
CMP dword ptr [R15],0x2
JZ 0x00119793
CMP EAX,0x4
JNZ 0x0011979c
LAB_0011978d:
CMP dword ptr [R15],0x2
JNZ 0x0011979c
LAB_00119793:
LEA RDX,[0x122eac]
JMP 0x001197c2
LAB_0011979c:
CMP EAX,0x2
JNZ 0x001197b0
CMP dword ptr [R15],0x4
JNZ 0x001197b0
LEA RDX,[0x122eb6]
JMP 0x001197c2
LAB_001197b0:
CMP EAX,0x5
JNZ 0x001197d6
CMP dword ptr [R15],0xc
JNZ 0x001197d6
LEA RDX,[0x122ec1]
LAB_001197c2:
MOV RDI,RSP
MOV ESI,0x400
MOV RCX,R14
XOR EAX,EAX
CALL 0x00102160
JMP 0x00119838
LAB_001197d6:
MOV ECX,EAX
AND ECX,0xfffffffe
CMP ECX,0x2
JNZ 0x0011980c
CMP dword ptr [R15],0xc
JNZ 0x0011980c
CMP EAX,0x2
LEA RAX,[0x11cf03]
LEA RCX,[0x11e77d]
CMOVZ RCX,RAX
LEA RDX,[0x122ed4]
MOV RDI,RSP
MOV ESI,0x400
JMP 0x0011982e
LAB_0011980c:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00118970
TEST RAX,RAX
JZ 0x00119861
LEA RDX,[0x122ef8]
MOV RDI,RSP
MOV ESI,0x400
MOV RCX,RAX
LAB_0011982e:
MOV R8,R14
XOR EAX,EAX
CALL 0x00102160
LAB_00119838:
MOV RDI,RSP
CALL 0x00102100
LEA RSI,[RAX + 0x1]
MOV RDI,RBX
CALL 0x001033af
TEST RAX,RAX
JZ 0x00119861
MOV RBX,RAX
MOV RSI,RSP
MOV RDI,RAX
CALL 0x00102090
JMP 0x00119863
LAB_00119861:
XOR EBX,EBX
LAB_00119863:
MOV RAX,RBX
ADD RSP,0x408
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00119875:
LEA RDI,[0x11a8eb]
LEA RSI,[0x122e02]
LEA RCX,[0x122e5d]
MOV EDX,0x1f5
CALL 0x00102180
LAB_00119894:
LEA RDI,[0x122252]
LEA RSI,[0x122e02]
LEA RCX,[0x122e5d]
MOV EDX,0x1f6
CALL 0x00102180
LAB_001198b3:
LEA RDI,[0x122132]
LEA RSI,[0x122e02]
LEA RCX,[0x122e5d]
MOV EDX,0x1f7
CALL 0x00102180
LAB_001198d2:
LEA RDI,[0x12216e]
LEA RSI,[0x122e02]
LEA RCX,[0x122e5d]
MOV EDX,0x1f8
CALL 0x00102180
|
char * type_apply_conversion(long param_1,char *param_2,uint *param_3,int *param_4)
{
uint uVar1;
int iVar2;
char cVar3;
size_t sVar4;
char *pcVar5;
char *__format;
char acStack_428 [1032];
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c"
,0x1f5,"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
}
if (param_2 == (char *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("expr != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c"
,0x1f6,"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
}
if (param_3 == (uint *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("from != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c"
,0x1f7,"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
}
if (param_4 == (int *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("to != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c"
,0x1f8,"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
}
cVar3 = type_equals(param_3,param_4);
if (cVar3 != '\0') {
sVar4 = strlen(param_2);
pcVar5 = (char *)arena_alloc(param_1,sVar4 + 1);
if (pcVar5 == (char *)0x0) {
return (char *)0x0;
}
pcVar5 = strcpy(pcVar5,param_2);
return pcVar5;
}
uVar1 = *param_3;
if ((uVar1 == 2) && (*param_4 == 3)) {
pcVar5 = "(float)(%s)";
}
else {
if (uVar1 == 4) {
iVar2 = *param_4;
joined_r0x00119791:
if (iVar2 == 2) {
pcVar5 = "(int)(%s)";
goto LAB_001197c2;
}
}
else if (uVar1 == 3) {
iVar2 = *param_4;
goto joined_r0x00119791;
}
if ((uVar1 == 2) && (*param_4 == 4)) {
pcVar5 = "(char)(%s)";
}
else {
if ((uVar1 != 5) || (*param_4 != 0xc)) {
if (((uVar1 & 0xfffffffe) == 2) && (*param_4 == 0xc)) {
pcVar5 = "float";
if (uVar1 == 2) {
pcVar5 = "int";
}
__format = "({ %s temp = (%s); (void*)&temp; })";
}
else {
pcVar5 = (char *)type_to_string(param_1,param_4);
if (pcVar5 == (char *)0x0) {
return (char *)0x0;
}
__format = "(%s)(%s)";
}
snprintf(acStack_428,0x400,__format,pcVar5,param_2);
goto LAB_00119838;
}
pcVar5 = "(void*)(char*)(%s)";
}
}
LAB_001197c2:
snprintf(acStack_428,0x400,pcVar5,param_2);
LAB_00119838:
sVar4 = strlen(acStack_428);
pcVar5 = (char *)arena_alloc(param_1,sVar4 + 1);
if (pcVar5 == (char *)0x0) {
return (char *)0x0;
}
strcpy(pcVar5,acStack_428);
return pcVar5;
}
| |
37,453 | type_apply_conversion | tsotchke[P]eshkol/src/core/utils/type_conversion.c | char* type_apply_conversion(Arena* arena, const char* expr, Type* from, Type* to) {
assert(arena != NULL);
assert(expr != NULL);
assert(from != NULL);
assert(to != NULL);
// Same type, no conversion needed
if (type_equals(from, to)) {
char* result = arena_alloc(arena, strlen(expr) + 1);
if (!result) return NULL;
strcpy(result, expr);
return result;
}
// Generate conversion code
char buffer[1024];
// Integer to float
if (from->kind == TYPE_INTEGER && to->kind == TYPE_FLOAT) {
snprintf(buffer, sizeof(buffer), "(float)(%s)", expr);
}
// Float to integer
else if (from->kind == TYPE_FLOAT && to->kind == TYPE_INTEGER) {
snprintf(buffer, sizeof(buffer), "(int)(%s)", expr);
}
// Char to integer
else if (from->kind == TYPE_CHAR && to->kind == TYPE_INTEGER) {
snprintf(buffer, sizeof(buffer), "(int)(%s)", expr);
}
// Integer to char
else if (from->kind == TYPE_INTEGER && to->kind == TYPE_CHAR) {
snprintf(buffer, sizeof(buffer), "(char)(%s)", expr);
}
// String to any
else if (from->kind == TYPE_STRING && to->kind == TYPE_ANY) {
snprintf(buffer, sizeof(buffer), "(void*)(char*)(%s)", expr);
}
// Numeric to any
else if ((from->kind == TYPE_INTEGER || from->kind == TYPE_FLOAT) && to->kind == TYPE_ANY) {
const char* type_str = from->kind == TYPE_INTEGER ? "int" : "float";
snprintf(buffer, sizeof(buffer), "({ %s temp = (%s); (void*)&temp; })", type_str, expr);
}
// Any other conversion
else {
char* to_str = type_to_string(arena, to);
if (!to_str) return NULL;
snprintf(buffer, sizeof(buffer), "(%s)(%s)", to_str, expr);
}
// Allocate memory for the result
char* result = arena_alloc(arena, strlen(buffer) + 1);
if (!result) return NULL;
// Copy the result
strcpy(result, buffer);
return result;
} | O2 | c | type_apply_conversion:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x408, %rsp # imm = 0x408
testq %rdi, %rdi
je 0x16c62
movq %rsi, %r14
testq %rsi, %rsi
je 0x16c81
movq %rdx, %r12
testq %rdx, %rdx
je 0x16ca0
movq %rcx, %r15
testq %rcx, %rcx
je 0x16cbf
movq %rdi, %rbx
movq %r12, %rdi
movq %r15, %rsi
callq 0x15824
testb %al, %al
je 0x16b5f
movq %r14, %rdi
callq 0x2100
leaq 0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x2fb9
testq %rax, %rax
je 0x16c4e
movq %rax, %rdi
movq %r14, %rsi
addq $0x408, %rsp # imm = 0x408
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2090
movl (%r12), %eax
cmpl $0x2, %eax
jne 0x16b7e
movl (%r15), %ecx
cmpl $0x4, %ecx
je 0x16bc0
cmpl $0x3, %ecx
jne 0x16b95
leaq 0x9389(%rip), %rdx # 0x1ff05
jmp 0x16be5
cmpl $0x5, %eax
je 0x16bd8
cmpl $0x4, %eax
je 0x16bc9
cmpl $0x3, %eax
jne 0x16bf9
movl (%r15), %ecx
cmpl $0x2, %ecx
je 0x16bcf
cmpl $0xc, %ecx
jne 0x16bf9
cmpl $0x2, %eax
leaq 0x3367(%rip), %rax # 0x19f0b
leaq 0x4bd2(%rip), %rcx # 0x1b77d
cmoveq %rax, %rcx
leaq 0x9383(%rip), %rdx # 0x1ff39
movq %rsp, %rdi
movl $0x400, %esi # imm = 0x400
jmp 0x16c1b
leaq 0x9354(%rip), %rdx # 0x1ff1b
jmp 0x16be5
cmpl $0x2, (%r15)
jne 0x16bf9
leaq 0x933b(%rip), %rdx # 0x1ff11
jmp 0x16be5
cmpl $0xc, (%r15)
jne 0x16bf9
leaq 0x9341(%rip), %rdx # 0x1ff26
movq %rsp, %rdi
movl $0x400, %esi # imm = 0x400
movq %r14, %rcx
xorl %eax, %eax
callq 0x2160
jmp 0x16c25
movq %rbx, %rdi
movq %r15, %rsi
callq 0x15e5c
testq %rax, %rax
je 0x16c4e
leaq 0x934d(%rip), %rdx # 0x1ff5d
movq %rsp, %rdi
movl $0x400, %esi # imm = 0x400
movq %rax, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x2160
movq %rsp, %rdi
callq 0x2100
leaq 0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x2fb9
testq %rax, %rax
je 0x16c4e
movq %rax, %rbx
movq %rsp, %rsi
movq %rax, %rdi
callq 0x2090
jmp 0x16c50
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x408, %rsp # imm = 0x408
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0xc97(%rip), %rdi # 0x17900
leaq 0x91f7(%rip), %rsi # 0x1fe67
leaq 0x924b(%rip), %rcx # 0x1fec2
movl $0x1f5, %edx # imm = 0x1F5
callq 0x2180
leaq 0x864e(%rip), %rdi # 0x1f2d6
leaq 0x91d8(%rip), %rsi # 0x1fe67
leaq 0x922c(%rip), %rcx # 0x1fec2
movl $0x1f6, %edx # imm = 0x1F6
callq 0x2180
leaq 0x850f(%rip), %rdi # 0x1f1b6
leaq 0x91b9(%rip), %rsi # 0x1fe67
leaq 0x920d(%rip), %rcx # 0x1fec2
movl $0x1f7, %edx # imm = 0x1F7
callq 0x2180
leaq 0x852c(%rip), %rdi # 0x1f1f2
leaq 0x919a(%rip), %rsi # 0x1fe67
leaq 0x91ee(%rip), %rcx # 0x1fec2
movl $0x1f8, %edx # imm = 0x1F8
callq 0x2180
| type_apply_conversion:
push r15
push r14
push r12
push rbx
sub rsp, 408h
test rdi, rdi
jz loc_16C62
mov r14, rsi
test rsi, rsi
jz loc_16C81
mov r12, rdx
test rdx, rdx
jz loc_16CA0
mov r15, rcx
test rcx, rcx
jz loc_16CBF
mov rbx, rdi
mov rdi, r12
mov rsi, r15
call type_equals
test al, al
jz short loc_16B5F
mov rdi, r14
call _strlen
lea rsi, [rax+1]
mov rdi, rbx
call arena_alloc
test rax, rax
jz loc_16C4E
mov rdi, rax
mov rsi, r14
add rsp, 408h
pop rbx
pop r12
pop r14
pop r15
jmp _strcpy
loc_16B5F:
mov eax, [r12]
cmp eax, 2
jnz short loc_16B7E
mov ecx, [r15]
cmp ecx, 4
jz short loc_16BC0
cmp ecx, 3
jnz short loc_16B95
lea rdx, aFloatS; "(float)(%s)"
jmp short loc_16BE5
loc_16B7E:
cmp eax, 5
jz short loc_16BD8
cmp eax, 4
jz short loc_16BC9
cmp eax, 3
jnz short loc_16BF9
mov ecx, [r15]
cmp ecx, 2
jz short loc_16BCF
loc_16B95:
cmp ecx, 0Ch
jnz short loc_16BF9
cmp eax, 2
lea rax, aInt; "int"
lea rcx, aFloat; "float"
cmovz rcx, rax
lea rdx, aSTempSVoidTemp; "({ %s temp = (%s); (void*)&temp; })"
mov rdi, rsp
mov esi, 400h
jmp short loc_16C1B
loc_16BC0:
lea rdx, aCharS; "(char)(%s)"
jmp short loc_16BE5
loc_16BC9:
cmp dword ptr [r15], 2
jnz short loc_16BF9
loc_16BCF:
lea rdx, aIntS; "(int)(%s)"
jmp short loc_16BE5
loc_16BD8:
cmp dword ptr [r15], 0Ch
jnz short loc_16BF9
lea rdx, aVoidCharS; "(void*)(char*)(%s)"
loc_16BE5:
mov rdi, rsp
mov esi, 400h
mov rcx, r14
xor eax, eax
call _snprintf
jmp short loc_16C25
loc_16BF9:
mov rdi, rbx
mov rsi, r15
call type_to_string
test rax, rax
jz short loc_16C4E
lea rdx, aSS_3; "(%s)(%s)"
mov rdi, rsp
mov esi, 400h
mov rcx, rax
loc_16C1B:
mov r8, r14
xor eax, eax
call _snprintf
loc_16C25:
mov rdi, rsp
call _strlen
lea rsi, [rax+1]
mov rdi, rbx
call arena_alloc
test rax, rax
jz short loc_16C4E
mov rbx, rax
mov rsi, rsp
mov rdi, rax
call _strcpy
jmp short loc_16C50
loc_16C4E:
xor ebx, ebx
loc_16C50:
mov rax, rbx
add rsp, 408h
pop rbx
pop r12
pop r14
pop r15
retn
loc_16C62:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCharTypeApplyC; "char *type_apply_conversion(Arena *, co"...
mov edx, 1F5h
call ___assert_fail
loc_16C81:
lea rdi, aExprNull; "expr != NULL"
lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCharTypeApplyC; "char *type_apply_conversion(Arena *, co"...
mov edx, 1F6h
call ___assert_fail
loc_16CA0:
lea rdi, aFromNull; "from != NULL"
lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCharTypeApplyC; "char *type_apply_conversion(Arena *, co"...
mov edx, 1F7h
call ___assert_fail
loc_16CBF:
lea rdi, aToNull; "to != NULL"
lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCharTypeApplyC; "char *type_apply_conversion(Arena *, co"...
mov edx, 1F8h
call ___assert_fail
| long long type_apply_conversion(long long a1, long long a2, int *a3, int *a4)
{
long long v6; // rax
long long v7; // rax
int v9; // eax
int v10; // ecx
const char *v11; // rcx
long long v12; // rax
long long v13; // rax
long long v14; // rax
long long v15; // rbx
_BYTE v16[1064]; // [rsp+0h] [rbp-428h] BYREF
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c",
501LL,
"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
if ( !a2 )
__assert_fail(
"expr != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c",
502LL,
"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
if ( !a3 )
__assert_fail(
"from != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c",
503LL,
"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
if ( !a4 )
__assert_fail(
"to != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c",
504LL,
"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
if ( (unsigned __int8)type_equals((long long)a3, (long long)a4) )
{
v6 = strlen(a2);
v7 = arena_alloc(a1, v6 + 1);
if ( v7 )
return strcpy(v7, a2);
return 0LL;
}
v9 = *a3;
if ( *a3 == 2 )
{
v10 = *a4;
if ( *a4 == 4 )
{
snprintf(v16, 1024LL, "(char)(%s)", a2);
goto LABEL_28;
}
if ( v10 == 3 )
{
snprintf(v16, 1024LL, "(float)(%s)", a2);
goto LABEL_28;
}
goto LABEL_16;
}
if ( v9 == 5 )
{
if ( *a4 == 12 )
{
snprintf(v16, 1024LL, "(void*)(char*)(%s)", a2);
goto LABEL_28;
}
goto LABEL_26;
}
if ( v9 == 4 )
{
if ( *a4 != 2 )
goto LABEL_26;
goto LABEL_22;
}
if ( v9 != 3 )
goto LABEL_26;
v10 = *a4;
if ( *a4 == 2 )
{
LABEL_22:
snprintf(v16, 1024LL, "(int)(%s)", a2);
goto LABEL_28;
}
LABEL_16:
if ( v10 == 12 )
{
v11 = "float";
if ( v9 == 2 )
v11 = "int";
snprintf(v16, 1024LL, "({ %s temp = (%s); (void*)&temp; })", v11, a2);
goto LABEL_28;
}
LABEL_26:
v12 = type_to_string(a1, (long long)a4);
if ( !v12 )
return 0LL;
snprintf(v16, 1024LL, "(%s)(%s)", v12, a2);
LABEL_28:
v13 = strlen(v16);
v14 = arena_alloc(a1, v13 + 1);
if ( !v14 )
return 0LL;
v15 = v14;
strcpy(v14, v16);
return v15;
}
| type_apply_conversion:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x408
TEST RDI,RDI
JZ 0x00116c62
MOV R14,RSI
TEST RSI,RSI
JZ 0x00116c81
MOV R12,RDX
TEST RDX,RDX
JZ 0x00116ca0
MOV R15,RCX
TEST RCX,RCX
JZ 0x00116cbf
MOV RBX,RDI
MOV RDI,R12
MOV RSI,R15
CALL 0x00115824
TEST AL,AL
JZ 0x00116b5f
MOV RDI,R14
CALL 0x00102100
LEA RSI,[RAX + 0x1]
MOV RDI,RBX
CALL 0x00102fb9
TEST RAX,RAX
JZ 0x00116c4e
MOV RDI,RAX
MOV RSI,R14
ADD RSP,0x408
POP RBX
POP R12
POP R14
POP R15
JMP 0x00102090
LAB_00116b5f:
MOV EAX,dword ptr [R12]
CMP EAX,0x2
JNZ 0x00116b7e
MOV ECX,dword ptr [R15]
CMP ECX,0x4
JZ 0x00116bc0
CMP ECX,0x3
JNZ 0x00116b95
LEA RDX,[0x11ff05]
JMP 0x00116be5
LAB_00116b7e:
CMP EAX,0x5
JZ 0x00116bd8
CMP EAX,0x4
JZ 0x00116bc9
CMP EAX,0x3
JNZ 0x00116bf9
MOV ECX,dword ptr [R15]
CMP ECX,0x2
JZ 0x00116bcf
LAB_00116b95:
CMP ECX,0xc
JNZ 0x00116bf9
CMP EAX,0x2
LEA RAX,[0x119f0b]
LEA RCX,[0x11b77d]
CMOVZ RCX,RAX
LEA RDX,[0x11ff39]
MOV RDI,RSP
MOV ESI,0x400
JMP 0x00116c1b
LAB_00116bc0:
LEA RDX,[0x11ff1b]
JMP 0x00116be5
LAB_00116bc9:
CMP dword ptr [R15],0x2
JNZ 0x00116bf9
LAB_00116bcf:
LEA RDX,[0x11ff11]
JMP 0x00116be5
LAB_00116bd8:
CMP dword ptr [R15],0xc
JNZ 0x00116bf9
LEA RDX,[0x11ff26]
LAB_00116be5:
MOV RDI,RSP
MOV ESI,0x400
MOV RCX,R14
XOR EAX,EAX
CALL 0x00102160
JMP 0x00116c25
LAB_00116bf9:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00115e5c
TEST RAX,RAX
JZ 0x00116c4e
LEA RDX,[0x11ff5d]
MOV RDI,RSP
MOV ESI,0x400
MOV RCX,RAX
LAB_00116c1b:
MOV R8,R14
XOR EAX,EAX
CALL 0x00102160
LAB_00116c25:
MOV RDI,RSP
CALL 0x00102100
LEA RSI,[RAX + 0x1]
MOV RDI,RBX
CALL 0x00102fb9
TEST RAX,RAX
JZ 0x00116c4e
MOV RBX,RAX
MOV RSI,RSP
MOV RDI,RAX
CALL 0x00102090
JMP 0x00116c50
LAB_00116c4e:
XOR EBX,EBX
LAB_00116c50:
MOV RAX,RBX
ADD RSP,0x408
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00116c62:
LEA RDI,[0x117900]
LEA RSI,[0x11fe67]
LEA RCX,[0x11fec2]
MOV EDX,0x1f5
CALL 0x00102180
LAB_00116c81:
LEA RDI,[0x11f2d6]
LEA RSI,[0x11fe67]
LEA RCX,[0x11fec2]
MOV EDX,0x1f6
CALL 0x00102180
LAB_00116ca0:
LEA RDI,[0x11f1b6]
LEA RSI,[0x11fe67]
LEA RCX,[0x11fec2]
MOV EDX,0x1f7
CALL 0x00102180
LAB_00116cbf:
LEA RDI,[0x11f1f2]
LEA RSI,[0x11fe67]
LEA RCX,[0x11fec2]
MOV EDX,0x1f8
CALL 0x00102180
|
char * type_apply_conversion(long param_1,char *param_2,int *param_3,int *param_4)
{
int iVar1;
char cVar2;
size_t sVar3;
char *pcVar4;
int iVar5;
char *__format;
char acStack_428 [1032];
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c"
,0x1f5,"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
}
if (param_2 == (char *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("expr != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c"
,0x1f6,"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
}
if (param_3 == (int *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("from != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c"
,0x1f7,"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
}
if (param_4 == (int *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("to != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c"
,0x1f8,"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
}
cVar2 = type_equals(param_3,param_4);
if (cVar2 != '\0') {
sVar3 = strlen(param_2);
pcVar4 = (char *)arena_alloc(param_1,sVar3 + 1);
if (pcVar4 == (char *)0x0) {
return (char *)0x0;
}
pcVar4 = strcpy(pcVar4,param_2);
return pcVar4;
}
iVar1 = *param_3;
if (iVar1 == 2) {
iVar5 = *param_4;
if (iVar5 == 4) {
pcVar4 = "(char)(%s)";
}
else {
if (iVar5 != 3) {
LAB_00116b95:
if (iVar5 != 0xc) goto LAB_00116bf9;
pcVar4 = "float";
if (iVar1 == 2) {
pcVar4 = "int";
}
__format = "({ %s temp = (%s); (void*)&temp; })";
goto LAB_00116c1b;
}
pcVar4 = "(float)(%s)";
}
}
else {
if (iVar1 != 5) {
if (iVar1 == 4) {
if (*param_4 == 2) goto LAB_00116bcf;
}
else if (iVar1 == 3) {
iVar5 = *param_4;
if (iVar5 != 2) goto LAB_00116b95;
LAB_00116bcf:
pcVar4 = "(int)(%s)";
goto LAB_00116be5;
}
LAB_00116bf9:
pcVar4 = (char *)type_to_string(param_1,param_4);
if (pcVar4 == (char *)0x0) {
return (char *)0x0;
}
__format = "(%s)(%s)";
LAB_00116c1b:
snprintf(acStack_428,0x400,__format,pcVar4,param_2);
goto LAB_00116c25;
}
if (*param_4 != 0xc) goto LAB_00116bf9;
pcVar4 = "(void*)(char*)(%s)";
}
LAB_00116be5:
snprintf(acStack_428,0x400,pcVar4,param_2);
LAB_00116c25:
sVar3 = strlen(acStack_428);
pcVar4 = (char *)arena_alloc(param_1,sVar3 + 1);
if (pcVar4 == (char *)0x0) {
return (char *)0x0;
}
strcpy(pcVar4,acStack_428);
return pcVar4;
}
| |
37,454 | JS_NewCFunctionData | bluesky950520[P]quickjs/quickjs.c | JSValue JS_NewCFunctionData(JSContext *ctx, JSCFunctionData *func,
int length, int magic, int data_len,
JSValue *data)
{
JSCFunctionDataRecord *s;
JSValue func_obj;
int i;
func_obj = JS_NewObjectProtoClass(ctx, ctx->function_proto,
JS_CLASS_C_FUNCTION_DATA);
if (JS_IsException(func_obj))
return func_obj;
s = js_malloc(ctx, sizeof(*s) + data_len * sizeof(JSValue));
if (!s) {
JS_FreeValue(ctx, func_obj);
return JS_EXCEPTION;
}
s->func = func;
s->length = length;
s->data_len = data_len;
s->magic = magic;
for(i = 0; i < data_len; i++)
s->data[i] = js_dup(data[i]);
JS_SetOpaqueInternal(func_obj, s);
js_function_set_properties(ctx, func_obj,
JS_ATOM_empty_string, length);
return func_obj;
} | O0 | c | JS_NewCFunctionData:
subq $0x88, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl %edx, 0x64(%rsp)
movl %ecx, 0x60(%rsp)
movl %r8d, 0x5c(%rsp)
movq %r9, 0x50(%rsp)
movq 0x70(%rsp), %rdi
movq 0x70(%rsp), %rax
movq 0x48(%rax), %rsi
movq 0x50(%rax), %rdx
movl $0xf, %ecx
callq 0x29ea0
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x2a83d
movq 0x38(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x2a989
movq 0x70(%rsp), %rdi
movslq 0x5c(%rsp), %rsi
shlq $0x4, %rsi
addq $0x10, %rsi
callq 0x21cb0
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x2a88e
movq 0x70(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x23c90
movl $0x0, 0x78(%rsp)
movq $0x6, 0x80(%rsp)
jmp 0x2a989
movq 0x68(%rsp), %rcx
movq 0x48(%rsp), %rax
movq %rcx, (%rax)
movl 0x64(%rsp), %eax
movb %al, %cl
movq 0x48(%rsp), %rax
movb %cl, 0x8(%rax)
movl 0x5c(%rsp), %eax
movb %al, %cl
movq 0x48(%rsp), %rax
movb %cl, 0x9(%rax)
movl 0x60(%rsp), %eax
movw %ax, %cx
movq 0x48(%rsp), %rax
movw %cx, 0xa(%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x5c(%rsp), %eax
jge 0x2a940
movq 0x48(%rsp), %rax
addq $0x10, %rax
movslq 0x34(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rax
movslq 0x34(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x216d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, (%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x2a8cf
movq 0x48(%rsp), %rdx
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x2a9a0
movq 0x70(%rsp), %rdi
movl 0x64(%rsp), %r8d
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movl $0x2f, %ecx
callq 0x2a9d0
movq 0x38(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rdx
addq $0x88, %rsp
retq
nop
| JS_NewCFunctionData:
sub rsp, 88h
mov [rsp+88h+var_18], rdi
mov [rsp+88h+var_20], rsi
mov [rsp+88h+var_24], edx
mov [rsp+88h+var_28], ecx
mov [rsp+88h+var_2C], r8d
mov [rsp+88h+var_38], r9
mov rdi, [rsp+88h+var_18]
mov rax, [rsp+88h+var_18]
mov rsi, [rax+48h]
mov rdx, [rax+50h]
mov ecx, 0Fh
call JS_NewObjectProtoClass
mov [rsp+88h+var_68], rax
mov [rsp+88h+var_60], rdx
mov rax, [rsp+88h+var_68]
mov [rsp+88h+var_50], rax
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_48], rax
mov rdi, [rsp+88h+var_50]
mov rsi, [rsp+88h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_2A83D
mov rax, [rsp+88h+var_50]
mov [rsp+88h+var_10], rax
mov rax, [rsp+88h+var_48]
mov [rsp+88h+var_8], rax
jmp loc_2A989
loc_2A83D:
mov rdi, [rsp+88h+var_18]
movsxd rsi, [rsp+88h+var_2C]
shl rsi, 4
add rsi, 10h
call js_malloc
mov [rsp+88h+var_40], rax
cmp [rsp+88h+var_40], 0
jnz short loc_2A88E
mov rdi, [rsp+88h+var_18]
mov rsi, [rsp+88h+var_50]
mov rdx, [rsp+88h+var_48]
call JS_FreeValue
mov dword ptr [rsp+88h+var_10], 0
mov [rsp+88h+var_8], 6
jmp loc_2A989
loc_2A88E:
mov rcx, [rsp+88h+var_20]
mov rax, [rsp+88h+var_40]
mov [rax], rcx
mov eax, [rsp+88h+var_24]
mov cl, al
mov rax, [rsp+88h+var_40]
mov [rax+8], cl
mov eax, [rsp+88h+var_2C]
mov cl, al
mov rax, [rsp+88h+var_40]
mov [rax+9], cl
mov eax, [rsp+88h+var_28]
mov cx, ax
mov rax, [rsp+88h+var_40]
mov [rax+0Ah], cx
mov [rsp+88h+var_54], 0
loc_2A8CF:
mov eax, [rsp+88h+var_54]
cmp eax, [rsp+88h+var_2C]
jge short loc_2A940
mov rax, [rsp+88h+var_40]
add rax, 10h
movsxd rcx, [rsp+88h+var_54]
shl rcx, 4
add rax, rcx
mov [rsp+88h+var_80], rax
mov rax, [rsp+88h+var_38]
movsxd rcx, [rsp+88h+var_54]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov rcx, rax
mov rax, [rsp+88h+var_80]
mov [rsp+88h+var_78], rcx
mov [rsp+88h+var_70], rdx
mov rcx, [rsp+88h+var_78]
mov [rax], rcx
mov rcx, [rsp+88h+var_70]
mov [rax+8], rcx
mov eax, [rsp+88h+var_54]
add eax, 1
mov [rsp+88h+var_54], eax
jmp short loc_2A8CF
loc_2A940:
mov rdx, [rsp+88h+var_40]
mov rdi, [rsp+88h+var_50]
mov rsi, [rsp+88h+var_48]
call JS_SetOpaqueInternal
mov rdi, [rsp+88h+var_18]
mov r8d, [rsp+88h+var_24]
mov rsi, [rsp+88h+var_50]
mov rdx, [rsp+88h+var_48]
mov ecx, 2Fh ; '/'
call js_function_set_properties
mov rax, [rsp+88h+var_50]
mov [rsp+88h+var_10], rax
mov rax, [rsp+88h+var_48]
mov [rsp+88h+var_8], rax
loc_2A989:
mov rax, [rsp+88h+var_10]
mov rdx, [rsp+88h+var_8]
add rsp, 88h
retn
| long long JS_NewCFunctionData(long long a1, long long a2, unsigned int a3, __int16 a4, int a5, long long a6)
{
long long v6; // rdx
long long v7; // rdx
_QWORD *v9; // [rsp+8h] [rbp-80h]
long long v10; // [rsp+20h] [rbp-68h]
int i; // [rsp+34h] [rbp-54h]
long long v12; // [rsp+40h] [rbp-48h]
long long v13; // [rsp+48h] [rbp-40h]
long long v18; // [rsp+78h] [rbp-10h]
v10 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 80), 0xFu);
v12 = v6;
if ( JS_IsException_1(v10, v6) )
return v10;
v13 = js_malloc(a1, 16LL * a5 + 16);
if ( v13 )
{
*(_QWORD *)v13 = a2;
*(_BYTE *)(v13 + 8) = a3;
*(_BYTE *)(v13 + 9) = a5;
*(_WORD *)(v13 + 10) = a4;
for ( i = 0; i < a5; ++i )
{
v9 = (_QWORD *)(16LL * i + v13 + 16);
*v9 = js_dup(*(_DWORD **)(16LL * i + a6), *(_QWORD *)(16LL * i + a6 + 8));
v9[1] = v7;
}
JS_SetOpaqueInternal(v10, v12, v13);
js_function_set_properties(a1, v10, v12, 47LL, a3);
return v10;
}
else
{
JS_FreeValue(a1, v10, v12);
LODWORD(v18) = 0;
}
return v18;
}
| JS_NewCFunctionData:
SUB RSP,0x88
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
MOV dword ptr [RSP + 0x64],EDX
MOV dword ptr [RSP + 0x60],ECX
MOV dword ptr [RSP + 0x5c],R8D
MOV qword ptr [RSP + 0x50],R9
MOV RDI,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RAX + 0x48]
MOV RDX,qword ptr [RAX + 0x50]
MOV ECX,0xf
CALL 0x00129ea0
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x0012a83d
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x80],RAX
JMP 0x0012a989
LAB_0012a83d:
MOV RDI,qword ptr [RSP + 0x70]
MOVSXD RSI,dword ptr [RSP + 0x5c]
SHL RSI,0x4
ADD RSI,0x10
CALL 0x00121cb0
MOV qword ptr [RSP + 0x48],RAX
CMP qword ptr [RSP + 0x48],0x0
JNZ 0x0012a88e
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x00123c90
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x6
JMP 0x0012a989
LAB_0012a88e:
MOV RCX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RSP + 0x64]
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x48]
MOV byte ptr [RAX + 0x8],CL
MOV EAX,dword ptr [RSP + 0x5c]
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x48]
MOV byte ptr [RAX + 0x9],CL
MOV EAX,dword ptr [RSP + 0x60]
MOV CX,AX
MOV RAX,qword ptr [RSP + 0x48]
MOV word ptr [RAX + 0xa],CX
MOV dword ptr [RSP + 0x34],0x0
LAB_0012a8cf:
MOV EAX,dword ptr [RSP + 0x34]
CMP EAX,dword ptr [RSP + 0x5c]
JGE 0x0012a940
MOV RAX,qword ptr [RSP + 0x48]
ADD RAX,0x10
MOVSXD RCX,dword ptr [RSP + 0x34]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOVSXD RCX,dword ptr [RSP + 0x34]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001216d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x18],RDX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RSP + 0x34]
ADD EAX,0x1
MOV dword ptr [RSP + 0x34],EAX
JMP 0x0012a8cf
LAB_0012a940:
MOV RDX,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x0012a9a0
MOV RDI,qword ptr [RSP + 0x70]
MOV R8D,dword ptr [RSP + 0x64]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
MOV ECX,0x2f
CALL 0x0012a9d0
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x80],RAX
LAB_0012a989:
MOV RAX,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
ADD RSP,0x88
RET
|
int1 [16]
JS_NewCFunctionData(long param_1,int8 param_2,int4 param_3,int2 param_4,
int param_5,long param_6)
{
int4 uVar1;
int iVar2;
int8 *puVar4;
int8 *puVar5;
int1 auVar6 [16];
int local_54;
int4 local_10;
int4 uStack_c;
int8 local_8;
int8 uVar3;
uVar1 = uStack_c;
auVar6 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),0xf);
local_8 = auVar6._8_8_;
uVar3 = auVar6._0_8_;
iVar2 = JS_IsException(uVar3,local_8);
local_10 = auVar6._0_4_;
uStack_c = auVar6._4_4_;
if (iVar2 == 0) {
puVar4 = (int8 *)js_malloc(param_1,(long)param_5 * 0x10 + 0x10);
if (puVar4 == (int8 *)0x0) {
JS_FreeValue(param_1,uVar3,local_8);
local_10 = 0;
local_8 = 6;
uStack_c = uVar1;
}
else {
*puVar4 = param_2;
*(char *)(puVar4 + 1) = (char)param_3;
*(char *)((long)puVar4 + 9) = (char)param_5;
*(int2 *)((long)puVar4 + 10) = param_4;
for (local_54 = 0; local_54 < param_5; local_54 = local_54 + 1) {
puVar5 = (int8 *)(param_6 + (long)local_54 * 0x10);
auVar6 = js_dup(*puVar5,puVar5[1]);
*(int1 (*) [16])(puVar4 + (long)local_54 * 2 + 2) = auVar6;
}
JS_SetOpaqueInternal(uVar3,local_8,puVar4);
js_function_set_properties(param_1,uVar3,local_8,0x2f,param_3);
}
}
auVar6._4_4_ = uStack_c;
auVar6._0_4_ = local_10;
auVar6._8_8_ = local_8;
return auVar6;
}
| |
37,455 | JS_NewCFunctionData | bluesky950520[P]quickjs/quickjs.c | JSValue JS_NewCFunctionData(JSContext *ctx, JSCFunctionData *func,
int length, int magic, int data_len,
JSValue *data)
{
JSCFunctionDataRecord *s;
JSValue func_obj;
int i;
func_obj = JS_NewObjectProtoClass(ctx, ctx->function_proto,
JS_CLASS_C_FUNCTION_DATA);
if (JS_IsException(func_obj))
return func_obj;
s = js_malloc(ctx, sizeof(*s) + data_len * sizeof(JSValue));
if (!s) {
JS_FreeValue(ctx, func_obj);
return JS_EXCEPTION;
}
s->func = func;
s->length = length;
s->data_len = data_len;
s->magic = magic;
for(i = 0; i < data_len; i++)
s->data[i] = js_dup(data[i]);
JS_SetOpaqueInternal(func_obj, s);
js_function_set_properties(ctx, func_obj,
JS_ATOM_empty_string, length);
return func_obj;
} | O2 | c | JS_NewCFunctionData:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r12
movl %r8d, %r13d
movl %ecx, (%rsp)
movl %edx, 0x4(%rsp)
movq %rsi, %rbp
movq %rdi, %r15
movq 0x48(%rdi), %rsi
movq 0x50(%rdi), %rdx
pushq $0xf
popq %rcx
callq 0x1b069
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x1b46d
movslq %r13d, %rsi
shlq $0x4, %rsi
addq $0x10, %rsi
movq %r15, %rdi
callq 0x17214
testq %rax, %rax
je 0x1b495
movq %rbp, (%rax)
movl 0x4(%rsp), %r8d
movb %r8b, 0x8(%rax)
movb %r13b, 0x9(%rax)
movl (%rsp), %ecx
movw %cx, 0xa(%rax)
xorl %ecx, %ecx
testl %r13d, %r13d
cmovlel %ecx, %r13d
shlq $0x4, %r13
cmpq %rcx, %r13
je 0x1b458
movq (%r12,%rcx), %rdx
movq 0x8(%r12,%rcx), %rsi
cmpl $-0x9, %esi
jb 0x1b448
incl (%rdx)
movq %rdx, 0x10(%rax,%rcx)
movq %rsi, 0x18(%rax,%rcx)
addq $0x10, %rcx
jmp 0x1b433
movq %rax, 0x30(%r14)
pushq $0x2f
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1b4ad
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r14, %rcx
andq %rax, %rcx
movl %r14d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1801e
pushq $0x6
popq %rbx
xorl %r14d, %r14d
xorl %ecx, %ecx
jmp 0x1b47d
| JS_NewCFunctionData:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, r9
mov r13d, r8d
mov [rsp+38h+var_38], ecx
mov [rsp+38h+var_34], edx
mov rbp, rsi
mov r15, rdi
mov rsi, [rdi+48h]
mov rdx, [rdi+50h]
push 0Fh
pop rcx
call JS_NewObjectProtoClass
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jz short loc_1B46D
movsxd rsi, r13d
shl rsi, 4
add rsi, 10h
mov rdi, r15
call js_malloc
test rax, rax
jz loc_1B495
mov [rax], rbp
mov r8d, [rsp+38h+var_34]
mov [rax+8], r8b
mov [rax+9], r13b
mov ecx, [rsp+38h+var_38]
mov [rax+0Ah], cx
xor ecx, ecx
test r13d, r13d
cmovle r13d, ecx
shl r13, 4
loc_1B433:
cmp r13, rcx
jz short loc_1B458
mov rdx, [r12+rcx]
mov rsi, [r12+rcx+8]
cmp esi, 0FFFFFFF7h
jb short loc_1B448
inc dword ptr [rdx]
loc_1B448:
mov [rax+rcx+10h], rdx
mov [rax+rcx+18h], rsi
add rcx, 10h
jmp short loc_1B433
loc_1B458:
mov [r14+30h], rax
push 2Fh ; '/'
pop rcx
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call js_function_set_properties
loc_1B46D:
mov rax, 0FFFFFFFF00000000h
mov rcx, r14
and rcx, rax
loc_1B47D:
mov eax, r14d
or rax, rcx
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1B495:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_FreeValue
push 6
pop rbx
xor r14d, r14d
xor ecx, ecx
jmp short loc_1B47D
| unsigned long long JS_NewCFunctionData(
long long a1,
long long a2,
unsigned int a3,
__int16 a4,
unsigned int a5,
long long a6)
{
long long v7; // r13
long long v8; // r14
long long v9; // rdx
long long v10; // rbx
long long v11; // rax
long long v12; // rcx
long long v13; // r13
_DWORD *v14; // rdx
long long v15; // rsi
unsigned long long v16; // rcx
v7 = a5;
v8 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1 + 72), *(_QWORD *)(a1 + 80), 0xFu);
v10 = v9;
if ( (_DWORD)v9 != 6 )
{
v11 = js_malloc(a1, 16LL * (int)v7 + 16);
if ( !v11 )
{
JS_FreeValue(a1, v8, v10);
LODWORD(v8) = 0;
v16 = 0LL;
return v16 | (unsigned int)v8;
}
*(_QWORD *)v11 = a2;
*(_BYTE *)(v11 + 8) = a3;
*(_BYTE *)(v11 + 9) = v7;
*(_WORD *)(v11 + 10) = a4;
v12 = 0LL;
if ( (int)v7 <= 0 )
v7 = 0LL;
v13 = 16 * v7;
while ( v13 != v12 )
{
v14 = *(_DWORD **)(a6 + v12);
v15 = *(_QWORD *)(a6 + v12 + 8);
if ( (unsigned int)v15 >= 0xFFFFFFF7 )
++*v14;
*(_QWORD *)(v11 + v12 + 16) = v14;
*(_QWORD *)(v11 + v12 + 24) = v15;
v12 += 16LL;
}
*(_QWORD *)(v8 + 48) = v11;
js_function_set_properties(a1, v8, v10, 47LL, a3);
}
v16 = v8 & 0xFFFFFFFF00000000LL;
return v16 | (unsigned int)v8;
}
| JS_NewCFunctionData:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,R9
MOV R13D,R8D
MOV dword ptr [RSP],ECX
MOV dword ptr [RSP + 0x4],EDX
MOV RBP,RSI
MOV R15,RDI
MOV RSI,qword ptr [RDI + 0x48]
MOV RDX,qword ptr [RDI + 0x50]
PUSH 0xf
POP RCX
CALL 0x0011b069
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x0011b46d
MOVSXD RSI,R13D
SHL RSI,0x4
ADD RSI,0x10
MOV RDI,R15
CALL 0x00117214
TEST RAX,RAX
JZ 0x0011b495
MOV qword ptr [RAX],RBP
MOV R8D,dword ptr [RSP + 0x4]
MOV byte ptr [RAX + 0x8],R8B
MOV byte ptr [RAX + 0x9],R13B
MOV ECX,dword ptr [RSP]
MOV word ptr [RAX + 0xa],CX
XOR ECX,ECX
TEST R13D,R13D
CMOVLE R13D,ECX
SHL R13,0x4
LAB_0011b433:
CMP R13,RCX
JZ 0x0011b458
MOV RDX,qword ptr [R12 + RCX*0x1]
MOV RSI,qword ptr [R12 + RCX*0x1 + 0x8]
CMP ESI,-0x9
JC 0x0011b448
INC dword ptr [RDX]
LAB_0011b448:
MOV qword ptr [RAX + RCX*0x1 + 0x10],RDX
MOV qword ptr [RAX + RCX*0x1 + 0x18],RSI
ADD RCX,0x10
JMP 0x0011b433
LAB_0011b458:
MOV qword ptr [R14 + 0x30],RAX
PUSH 0x2f
POP RCX
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011b4ad
LAB_0011b46d:
MOV RAX,-0x100000000
MOV RCX,R14
AND RCX,RAX
LAB_0011b47d:
MOV EAX,R14D
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011b495:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011801e
PUSH 0x6
POP RBX
XOR R14D,R14D
XOR ECX,ECX
JMP 0x0011b47d
|
int1 [16]
JS_NewCFunctionData(long param_1,int8 param_2,int1 param_3,int2 param_4,
uint param_5,long param_6)
{
int *piVar1;
int8 uVar2;
int8 *puVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
auVar7 = JS_NewObjectProtoClass
(param_1,*(int8 *)(param_1 + 0x48),*(int8 *)(param_1 + 0x50),0xf);
uVar5 = auVar7._0_8_;
if (auVar7._8_4_ != 6) {
puVar3 = (int8 *)js_malloc(param_1,(long)(int)param_5 * 0x10 + 0x10);
if (puVar3 == (int8 *)0x0) {
JS_FreeValue(param_1,uVar5,auVar7._8_8_);
auVar7 = ZEXT816(6) << 0x40;
uVar5 = 0;
goto LAB_0011b47d;
}
*puVar3 = param_2;
*(int1 *)(puVar3 + 1) = param_3;
*(char *)((long)puVar3 + 9) = (char)param_5;
*(int2 *)((long)puVar3 + 10) = param_4;
lVar4 = 0;
uVar6 = (ulong)param_5;
if ((int)param_5 < 1) {
uVar6 = 0;
}
for (; uVar6 * 0x10 != lVar4; lVar4 = lVar4 + 0x10) {
piVar1 = *(int **)(param_6 + lVar4);
uVar2 = *(int8 *)(param_6 + 8 + lVar4);
if (0xfffffff6 < (uint)uVar2) {
*piVar1 = *piVar1 + 1;
}
*(int **)((long)puVar3 + lVar4 + 0x10) = piVar1;
*(int8 *)((long)puVar3 + lVar4 + 0x18) = uVar2;
}
*(int8 **)(uVar5 + 0x30) = puVar3;
js_function_set_properties(param_1,uVar5,auVar7._8_8_,0x2f);
}
uVar5 = uVar5 & 0xffffffff00000000;
LAB_0011b47d:
auVar8._0_8_ = auVar7._0_8_ & 0xffffffff | uVar5;
auVar8._8_8_ = auVar7._8_8_;
return auVar8;
}
| |
37,456 | nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...) | ng-log[P]ng-log/src/raw_logging.cc | void RawLog(LogSeverity severity, const char* file, int line,
const char* format, ...) {
if (!(FLAGS_logtostdout || FLAGS_logtostderr ||
severity >= FLAGS_stderrthreshold || FLAGS_alsologtostderr ||
!IsLoggingInitialized())) {
return; // this stderr log message is suppressed
}
// We do not have any any option other that string streams to obtain the
// thread identifier as the corresponding value is not convertible to an
// integer. Use a statically allocated buffer to avoid dynamic memory
// allocations.
StaticStringBuf<kLogBufSize> sbuf;
std::ostream oss(&sbuf);
oss << std::setw(5) << std::this_thread::get_id();
// can't call localtime_r here: it can allocate
char buffer[kLogBufSize];
char* buf = buffer;
size_t size = sizeof(buffer);
// NOTE: this format should match the specification in base/logging.h
DoRawLog(&buf, &size, "%c00000000 00:00:00.000000 %s %s:%d] RAW: ",
GetLogSeverityName(severity)[0], sbuf.data(),
const_basename(const_cast<char*>(file)), line);
// Record the position and size of the buffer after the prefix
const char* msg_start = buf;
const size_t msg_size = size;
va_list ap;
va_start(ap, format);
bool no_chop = VADoRawLog(&buf, &size, format, ap);
va_end(ap);
if (no_chop) {
DoRawLog(&buf, &size, "\n");
} else {
DoRawLog(&buf, &size, "RAW_LOG ERROR: The Message was too long!\n");
}
// We make a raw syscall to write directly to the stderr file descriptor,
// avoiding FILE buffering (to avoid invoking malloc()), and bypassing
// libc (to side-step any libc interception).
// We write just once to avoid races with other invocations of RawLog.
safe_write(fileno(stderr), buffer, strlen(buffer));
if (severity == NGLOG_FATAL) {
std::call_once(crashed, [file, line, msg_start, msg_size] {
crash_reason.filename = file;
crash_reason.line_number = line;
memcpy(crash_buf, msg_start, msg_size); // Don't include prefix
crash_reason.message = crash_buf;
#ifdef HAVE_STACKTRACE
crash_reason.depth =
GetStackTrace(crash_reason.stack, ARRAYSIZE(crash_reason.stack), 1);
#else
crash_reason.depth = 0;
#endif
SetCrashReason(&crash_reason);
});
LogMessage::Fail(); // abort()
}
} | O3 | cpp | nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x19e8, %rsp # imm = 0x19E8
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, 0x28(%rsp)
movl %edi, 0xc(%rsp)
testb %al, %al
je 0x1f25c
movaps %xmm0, 0x1b0(%rsp)
movaps %xmm1, 0x1c0(%rsp)
movaps %xmm2, 0x1d0(%rsp)
movaps %xmm3, 0x1e0(%rsp)
movaps %xmm4, 0x1f0(%rsp)
movaps %xmm5, 0x200(%rsp)
movaps %xmm6, 0x210(%rsp)
movaps %xmm7, 0x220(%rsp)
movq %r8, 0x1a0(%rsp)
movq %r9, 0x1a8(%rsp)
leaq 0x1071f(%rip), %rax # 0x2f992
cmpb $0x0, (%rax)
je 0x1f320
movq 0xfcc5(%rip), %rbx # 0x2ef48
addq $0x10, %rbx
leaq 0x270(%rsp), %r14
movq %rbx, -0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, -0x30(%r14)
movups %xmm0, -0x20(%r14)
movups %xmm0, -0x10(%r14)
movq %r14, %rdi
callq 0x7a40
leaq 0xf964(%rip), %rax # 0x2ec18
movq %rax, -0x38(%r14)
leaq 0x278(%rsp), %r13
leaq 0xe30(%rsp), %rax
movq %r13, -0x18(%r13)
movq %r13, -0x20(%r13)
movq %rax, -0x10(%r13)
movq %r13, -0x38(%r13)
movq %r13, -0x30(%r13)
movq %rax, -0x28(%r13)
leaq 0x70(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x71c0
movq 0x70(%rsp), %rax
movq -0x18(%rax), %rax
movq $0x5, 0x80(%rsp,%rax)
callq 0x7460
testq %rax, %rax
je 0x1f365
leaq 0x70(%rsp), %rdi
movq %rax, %rsi
callq 0x7360
jmp 0x1f37b
leaq 0x10663(%rip), %rax # 0x2f98a
cmpb $0x0, (%rax)
jne 0x1f27c
leaq 0x10661(%rip), %rax # 0x2f998
movl 0xc(%rsp), %ecx
cmpl %ecx, (%rax)
jle 0x1f27c
leaq 0x10642(%rip), %rax # 0x2f98c
cmpb $0x0, (%rax)
jne 0x1f27c
callq 0x20fe0
testb %al, %al
je 0x1f27c
jmp 0x1f4e5
leaq 0x2da6(%rip), %rsi # 0x22112
leaq 0x70(%rsp), %rdi
movl $0x24, %edx
callq 0x7610
leaq 0xe30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0xbb8, 0x10(%rsp) # imm = 0xBB8
movl 0xc(%rsp), %edi
callq 0x956c
movsbl (%rax), %ebp
movq 0x260(%rsp), %rax
cmpq 0x258(%rsp), %rax
je 0x1f3d6
movq 0x268(%rsp), %rcx
cmpq %rcx, %rax
je 0x1f3d6
cmpb $0x0, -0x1(%rax)
je 0x1f3d6
cmpq %rcx, %rax
jae 0x1f4f7
movb $0x0, (%rax)
incq 0x260(%rsp)
movq 0x28(%rsp), %rdi
callq 0x20fed
movl %r12d, 0x24(%rsp)
movl %r12d, (%rsp)
leaq 0x486d(%rip), %rdx # 0x23c5d
leaq 0x18(%rsp), %r14
leaq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %ecx
movq %r13, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x1f56f
movq (%r14), %r13
movq (%r12), %rbp
leaq 0x180(%rsp), %rax
leaq 0x30(%rsp), %rcx
movq %rax, 0x10(%rcx)
leaq 0x1a20(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000020, %rax # imm = 0x3000000020
movq %rax, (%rcx)
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x7300
leaq 0x4833(%rip), %rdx # 0x23c88
testl %eax, %eax
js 0x1f477
movl %eax, %eax
movq %rbp, %rcx
subq %rax, %rcx
jb 0x1f477
movq %rcx, 0x10(%rsp)
addq %r13, %rax
movq %rax, 0x18(%rsp)
leaq 0x37a7(%rip), %rdx # 0x22c1e
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x1f56f
movq 0xfb09(%rip), %rax # 0x2ef98
movq (%rax), %rdi
callq 0x7590
movl %eax, %r14d
leaq 0xe30(%rsp), %r12
movq %r12, %rdi
callq 0x71f0
movl $0x1, %edi
movl %r14d, %esi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x7080
cmpl $0x3, 0xc(%rsp)
je 0x1f50c
leaq 0x78(%rsp), %rdi
callq 0x7170
movq %rbx, 0x238(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x7790
addq $0x19e8, %rsp # imm = 0x19E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x238(%rsp), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x68(%rax)
jmp 0x1f3d6
leaq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, (%rdi)
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rdi)
movq %r13, 0x10(%rdi)
movq %rbp, 0x18(%rdi)
callq 0x1f615
callq 0xac10
movq %rax, %rdi
callq 0x9221
jmp 0x1f545
jmp 0x1f545
jmp 0x1f545
movq %rax, %r14
jmp 0x1f552
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0x7170
movq %rbx, 0x238(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x7790
movq %r14, %rdi
callq 0x7970
| _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 19E8h
mov r15, rcx
mov r12d, edx
mov [rsp+1A18h+var_19F0], rsi
mov [rsp+1A18h+var_1A0C], edi
test al, al
jz short loc_1F25C
movaps [rsp+1A18h+var_1868], xmm0
movaps [rsp+1A18h+var_1858], xmm1
movaps [rsp+1A18h+var_1848], xmm2
movaps [rsp+1A18h+var_1838], xmm3
movaps [rsp+1A18h+var_1828], xmm4
movaps [rsp+1A18h+var_1818], xmm5
movaps [rsp+1A18h+var_1808], xmm6
movaps [rsp+1A18h+var_17F8], xmm7
loc_1F25C:
mov [rsp+1A18h+var_1878], r8
mov [rsp+1A18h+var_1870], r9
lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout
cmp byte ptr [rax], 0
jz loc_1F320
loc_1F27C:
mov rbx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rbx, 10h
lea r14, [rsp+1A18h+var_17A8]
mov [r14-38h], rbx
xorps xmm0, xmm0
movups xmmword ptr [r14-30h], xmm0
movups xmmword ptr [r14-20h], xmm0
movups xmmword ptr [r14-10h], xmm0
mov rdi, r14; this
call __ZNSt6localeC1Ev; std::locale::locale(void)
lea rax, off_2EC18
mov [r14-38h], rax
lea r13, [rsp+1A18h+var_17A0]
lea rax, [rsp+1A18h+var_BE8]
mov [r13-18h], r13
mov [r13-20h], r13
mov [r13-10h], rax
mov [r13-38h], r13
mov [r13-30h], r13
mov [r13-28h], rax
lea rdi, [rsp+1A18h+var_19A8]
lea rsi, [rsp+1A18h+var_17E0]
call __ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE; std::ostream::ostream(std::streambuf *)
mov rax, [rsp+1A18h+var_19A8]
mov rax, [rax-18h]
mov [rsp+rax+1A18h+var_1998], 5
call _pthread_self
test rax, rax
jz short loc_1F365
lea rdi, [rsp+1A18h+var_19A8]; this
mov rsi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
jmp short loc_1F37B
loc_1F320:
lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr
cmp byte ptr [rax], 0
jnz loc_1F27C
lea rax, _ZN3fLI21FLAGS_stderrthresholdE; fLI::FLAGS_stderrthreshold
mov ecx, [rsp+1A18h+var_1A0C]
cmp [rax], ecx
jle loc_1F27C
lea rax, _ZN3fLB21FLAGS_alsologtostderrE; fLB::FLAGS_alsologtostderr
cmp byte ptr [rax], 0
jnz loc_1F27C
call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void)
test al, al
jz loc_1F27C
jmp loc_1F4E5
loc_1F365:
lea rsi, aThreadIdOfANon; "thread::id of a non-executing thread"
lea rdi, [rsp+1A18h+var_19A8]
mov edx, 24h ; '$'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_1F37B:
lea rax, [rsp+1A18h+var_BE8]
mov [rsp+1A18h+var_1A00], rax
mov [rsp+1A18h+var_1A08], 0BB8h
mov edi, [rsp+1A18h+var_1A0C]
call _ZN5nglog18GetLogSeverityNameENS_11LogSeverityE; nglog::GetLogSeverityName(nglog::LogSeverity)
movsx ebp, byte ptr [rax]
mov rax, [rsp+1A18h+var_17B8]
cmp rax, [rsp+1A18h+var_17C0]
jz short loc_1F3D6
mov rcx, [rsp+1A18h+var_17B0]
cmp rax, rcx
jz short loc_1F3D6
cmp byte ptr [rax-1], 0
jz short loc_1F3D6
cmp rax, rcx
jnb loc_1F4F7
mov byte ptr [rax], 0
inc [rsp+1A18h+var_17B8]
loc_1F3D6:
mov rdi, [rsp+1A18h+var_19F0]; this
call _ZN5nglog5tools14const_basenameEPKc; nglog::tools::const_basename(char const*)
mov [rsp+1A18h+var_19F4], r12d
mov [rsp+1A18h+var_1A18], r12d
lea rdx, aC0000000000000; "%c00000000 00:00:00.000000 %s %s:%d] RA"...
lea r14, [rsp+1A18h+var_1A00]
lea r12, [rsp+1A18h+var_1A08]
mov rdi, r14; this
mov rsi, r12; char **
mov ecx, ebp; char *
mov r8, r13
mov r9, rax
xor eax, eax
call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...)
mov r13, [r14]
mov rbp, [r12]
lea rax, [rsp+1A18h+var_1898]
lea rcx, [rsp+1A18h+var_19E8]
mov [rcx+10h], rax
lea rax, [rsp+1A18h+arg_0]
mov [rcx+8], rax
mov rax, 3000000020h
mov [rcx], rax
mov rdi, r13
mov rsi, rbp
mov rdx, r15
call _vsnprintf
lea rdx, aRawLogErrorThe; "RAW_LOG ERROR: The Message was too long"...
test eax, eax
js short loc_1F477
mov eax, eax
mov rcx, rbp
sub rcx, rax; char *
jb short loc_1F477
mov [rsp+1A18h+var_1A08], rcx
add rax, r13
mov [rsp+1A18h+var_1A00], rax
lea rdx, asc_22C1D+1; unsigned __int64 *
loc_1F477:
lea rdi, [rsp+1A18h+var_1A00]; this
lea rsi, [rsp+1A18h+var_1A08]; char **
xor eax, eax
call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...)
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fileno
mov r14d, eax
lea r12, [rsp+1A18h+var_BE8]
mov rdi, r12
call _strlen
mov edi, 1
mov esi, r14d
mov rdx, r12
mov rcx, rax
xor eax, eax
call _syscall
cmp [rsp+1A18h+var_1A0C], 3
jz short loc_1F50C
lea rdi, [rsp+1A18h+var_19A0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov [rsp+1A18h+var_17E0], rbx
lea rdi, [rsp+1A18h+var_17A8]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
loc_1F4E5:
add rsp, 19E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1F4F7:
lea rdi, [rsp+1A18h+var_17E0]
mov rax, [rdi]
xor esi, esi
call qword ptr [rax+68h]
jmp loc_1F3D6
loc_1F50C:
lea rdi, [rsp+1A18h+var_19C8]; this
mov rax, [rsp+1A18h+var_19F0]
mov [rdi], rax
mov eax, [rsp+1A18h+var_19F4]
mov [rdi+8], eax
mov [rdi+10h], r13
mov [rdi+18h], rbp
call _ZSt9call_onceIZN5nglog6RawLogENS0_11LogSeverityEPKciS3_zE3$_0JEEvRSt9once_flagOT_DpOT0_; std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>(std::once_flag &,nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0 &&)
call _ZN5nglog10LogMessage4FailEv; nglog::LogMessage::Fail(void)
mov rdi, rax
call __clang_call_terminate
jmp short loc_1F545
jmp short loc_1F545
jmp short loc_1F545
mov r14, rax
jmp short loc_1F552
loc_1F545:
mov r14, rax
lea rdi, [rsp+1A18h+var_19A0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_1F552:
mov [rsp+1A18h+var_17E0], rbx
lea rdi, [rsp+1A18h+var_17A8]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rdi, r14
call __Unwind_Resume
| void nglog::RawLog(
nglog *a1,
nglog::tools *a2,
int a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
long long v17; // rax
const char *v18; // rsi
unsigned int v19; // ebp
long long v20; // rax
_BYTE *v21; // r13
char *v22; // rbp
unsigned int v23; // eax
const char *v24; // rcx
char *v25; // rdx
unsigned int v26; // r14d
long long v27; // rax
char *v28; // [rsp+10h] [rbp-1A08h] BYREF
_BYTE *v29; // [rsp+18h] [rbp-1A00h] BYREF
int v30; // [rsp+24h] [rbp-19F4h]
nglog::tools *v31; // [rsp+28h] [rbp-19F0h]
_QWORD v32[4]; // [rsp+30h] [rbp-19E8h] BYREF
nglog::tools *v33; // [rsp+50h] [rbp-19C8h] BYREF
int v34; // [rsp+58h] [rbp-19C0h]
_BYTE *v35; // [rsp+60h] [rbp-19B8h]
char *v36; // [rsp+68h] [rbp-19B0h]
long long v37; // [rsp+70h] [rbp-19A8h] BYREF
_BYTE v38[264]; // [rsp+78h] [rbp-19A0h] BYREF
char v39; // [rsp+180h] [rbp-1898h] BYREF
long long v40; // [rsp+1A0h] [rbp-1878h]
long long v41; // [rsp+1A8h] [rbp-1870h]
__m128 v42; // [rsp+1B0h] [rbp-1868h]
__m128 v43; // [rsp+1C0h] [rbp-1858h]
__m128 v44; // [rsp+1D0h] [rbp-1848h]
__m128 v45; // [rsp+1E0h] [rbp-1838h]
__m128 v46; // [rsp+1F0h] [rbp-1828h]
__m128 v47; // [rsp+200h] [rbp-1818h]
__m128 v48; // [rsp+210h] [rbp-1808h]
__m128 v49; // [rsp+220h] [rbp-17F8h]
_QWORD v50[4]; // [rsp+238h] [rbp-17E0h] BYREF
_BYTE *v51; // [rsp+258h] [rbp-17C0h]
_BYTE *v52; // [rsp+260h] [rbp-17B8h]
_BYTE *v53; // [rsp+268h] [rbp-17B0h]
char v54[8]; // [rsp+270h] [rbp-17A8h] BYREF
_BYTE v55[3000]; // [rsp+278h] [rbp-17A0h] BYREF
_BYTE v56[3048]; // [rsp+E30h] [rbp-BE8h] BYREF
v42 = a7;
v43 = a8;
v44 = a9;
v45 = a10;
v46 = a11;
v47 = a12;
v48 = a13;
v49 = a14;
v31 = a2;
v40 = a5;
v41 = a6;
if ( fLB::FLAGS_logtostdout
|| fLB::FLAGS_logtostderr
|| fLI::FLAGS_stderrthreshold <= (int)a1
|| fLB::FLAGS_alsologtostderr
|| !(unsigned __int8)nglog::IsLoggingInitialized(a1) )
{
std::locale::locale((std::locale *)v54);
v50[0] = &off_2EC18;
v52 = v55;
v51 = v55;
v53 = v56;
v50[1] = v55;
v50[2] = v55;
v50[3] = v56;
std::ostream::ostream(&v37, v50);
*(_QWORD *)&v38[*(_QWORD *)(v37 - 24) + 8] = 5LL;
v17 = pthread_self();
if ( v17 )
{
v18 = (const char *)v17;
std::ostream::_M_insert<unsigned long>(&v37, v17);
}
else
{
v18 = "thread::id of a non-executing thread";
std::__ostream_insert<char,std::char_traits<char>>(&v37, "thread::id of a non-executing thread", 36LL);
}
v29 = v56;
v28 = (_BYTE *)(&stru_BB0 + 8);
v19 = *nglog::GetLogSeverityName((int)a1);
if ( v52 != v51 && v52 != v53 && *(v52 - 1) )
{
if ( v52 >= v53 )
{
v18 = 0LL;
(*(void ( **)(_QWORD *, _QWORD))(v50[0] + 104LL))(v50, 0LL);
}
else
{
*v52++ = 0;
}
}
v20 = nglog::tools::const_basename(v31, v18);
v30 = a3;
nglog::DoRawLog(
(nglog *)&v29,
&v28,
(unsigned long long *)"%c00000000 00:00:00.000000 %s %s:%d] RAW: ",
(const char *)v19,
v55,
v20,
a3);
v21 = v29;
v22 = v28;
v32[2] = &v39;
v32[1] = &a15;
v32[0] = 0x3000000020LL;
v23 = vsnprintf(v29, v28, a4, v32);
v25 = "RAW_LOG ERROR: The Message was too long!\n";
if ( (v23 & 0x80000000) == 0 )
{
v24 = &v22[-v23];
if ( (unsigned long long)v22 >= v23 )
{
v28 = &v22[-v23];
v29 = &v21[v23];
v25 = "\n";
}
}
nglog::DoRawLog((nglog *)&v29, &v28, (unsigned long long *)v25, v24);
v26 = fileno(stderr);
v27 = strlen(v56);
syscall(1LL, v26, v56, v27);
if ( (_DWORD)a1 == 3 )
{
v33 = v31;
v34 = v30;
v35 = v21;
v36 = v22;
std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>();
nglog::LogMessage::Fail((nglog::LogMessage *)&v33);
}
std::ios_base::~ios_base((std::ios_base *)v38);
v50[0] = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((std::locale *)v54);
}
}
| RawLog:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x19e8
MOV R15,RCX
MOV R12D,EDX
MOV qword ptr [RSP + 0x28],RSI
MOV dword ptr [RSP + 0xc],EDI
TEST AL,AL
JZ 0x0011f25c
MOVAPS xmmword ptr [RSP + 0x1b0],XMM0
MOVAPS xmmword ptr [RSP + 0x1c0],XMM1
MOVAPS xmmword ptr [RSP + 0x1d0],XMM2
MOVAPS xmmword ptr [RSP + 0x1e0],XMM3
MOVAPS xmmword ptr [RSP + 0x1f0],XMM4
MOVAPS xmmword ptr [RSP + 0x200],XMM5
MOVAPS xmmword ptr [RSP + 0x210],XMM6
MOVAPS xmmword ptr [RSP + 0x220],XMM7
LAB_0011f25c:
MOV qword ptr [RSP + 0x1a0],R8
MOV qword ptr [RSP + 0x1a8],R9
LEA RAX,[0x12f992]
CMP byte ptr [RAX],0x0
JZ 0x0011f320
LAB_0011f27c:
MOV RBX,qword ptr [0x0012ef48]
ADD RBX,0x10
LEA R14,[RSP + 0x270]
MOV qword ptr [R14 + -0x38],RBX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + -0x30],XMM0
MOVUPS xmmword ptr [R14 + -0x20],XMM0
MOVUPS xmmword ptr [R14 + -0x10],XMM0
MOV RDI,R14
CALL 0x00107a40
LEA RAX,[0x12ec18]
MOV qword ptr [R14 + -0x38],RAX
LEA R13,[RSP + 0x278]
LEA RAX,[RSP + 0xe30]
MOV qword ptr [R13 + -0x18],R13
MOV qword ptr [R13 + -0x20],R13
MOV qword ptr [R13 + -0x10],RAX
MOV qword ptr [R13 + -0x38],R13
MOV qword ptr [R13 + -0x30],R13
MOV qword ptr [R13 + -0x28],RAX
LAB_0011f2e0:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x238]
CALL 0x001071c0
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RSP + RAX*0x1 + 0x80],0x5
CALL 0x00107460
TEST RAX,RAX
JZ 0x0011f365
LAB_0011f311:
LEA RDI,[RSP + 0x70]
MOV RSI,RAX
CALL 0x00107360
LAB_0011f31e:
JMP 0x0011f37b
LAB_0011f320:
LEA RAX,[0x12f98a]
CMP byte ptr [RAX],0x0
JNZ 0x0011f27c
LEA RAX,[0x12f998]
MOV ECX,dword ptr [RSP + 0xc]
CMP dword ptr [RAX],ECX
JLE 0x0011f27c
LEA RAX,[0x12f98c]
CMP byte ptr [RAX],0x0
JNZ 0x0011f27c
CALL 0x00120fe0
TEST AL,AL
JZ 0x0011f27c
JMP 0x0011f4e5
LAB_0011f365:
LEA RSI,[0x122112]
LEA RDI,[RSP + 0x70]
MOV EDX,0x24
CALL 0x00107610
LAB_0011f37b:
LEA RAX,[RSP + 0xe30]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x10],0xbb8
LAB_0011f391:
MOV EDI,dword ptr [RSP + 0xc]
CALL 0x0010956c
MOVSX EBP,byte ptr [RAX]
MOV RAX,qword ptr [RSP + 0x260]
CMP RAX,qword ptr [RSP + 0x258]
JZ 0x0011f3d6
MOV RCX,qword ptr [RSP + 0x268]
CMP RAX,RCX
JZ 0x0011f3d6
CMP byte ptr [RAX + -0x1],0x0
JZ 0x0011f3d6
CMP RAX,RCX
JNC 0x0011f4f7
MOV byte ptr [RAX],0x0
INC qword ptr [RSP + 0x260]
LAB_0011f3d6:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00120fed
MOV dword ptr [RSP + 0x24],R12D
MOV dword ptr [RSP],R12D
LEA RDX,[0x123c5d]
LEA R14,[RSP + 0x18]
LEA R12,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R12
MOV ECX,EBP
MOV R8,R13
MOV R9,RAX
XOR EAX,EAX
CALL 0x0011f56f
MOV R13,qword ptr [R14]
MOV RBP,qword ptr [R12]
LEA RAX,[RSP + 0x180]
LEA RCX,[RSP + 0x30]
MOV qword ptr [RCX + 0x10],RAX
LEA RAX,[RSP + 0x1a20]
MOV qword ptr [RCX + 0x8],RAX
MOV RAX,0x3000000020
MOV qword ptr [RCX],RAX
MOV RDI,R13
MOV RSI,RBP
MOV RDX,R15
CALL 0x00107300
LEA RDX,[0x123c88]
TEST EAX,EAX
JS 0x0011f477
MOV EAX,EAX
MOV RCX,RBP
SUB RCX,RAX
JC 0x0011f477
MOV qword ptr [RSP + 0x10],RCX
ADD RAX,R13
MOV qword ptr [RSP + 0x18],RAX
LEA RDX,[0x122c1e]
LAB_0011f477:
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x10]
XOR EAX,EAX
CALL 0x0011f56f
MOV RAX,qword ptr [0x0012ef98]
MOV RDI,qword ptr [RAX]
CALL 0x00107590
MOV R14D,EAX
LEA R12,[RSP + 0xe30]
MOV RDI,R12
CALL 0x001071f0
MOV EDI,0x1
MOV ESI,R14D
MOV RDX,R12
MOV RCX,RAX
XOR EAX,EAX
CALL 0x00107080
CMP dword ptr [RSP + 0xc],0x3
JZ 0x0011f50c
LEA RDI,[RSP + 0x78]
CALL 0x00107170
MOV qword ptr [RSP + 0x238],RBX
LEA RDI,[RSP + 0x270]
CALL 0x00107790
LAB_0011f4e5:
ADD RSP,0x19e8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011f4f7:
LEA RDI,[RSP + 0x238]
MOV RAX,qword ptr [RDI]
LAB_0011f502:
XOR ESI,ESI
CALL qword ptr [RAX + 0x68]
JMP 0x0011f3d6
LAB_0011f50c:
LEA RDI,[RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RDI],RAX
MOV EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RDI + 0x8],EAX
MOV qword ptr [RDI + 0x10],R13
MOV qword ptr [RDI + 0x18],RBP
LAB_0011f528:
CALL 0x0011f615
LAB_0011f52d:
CALL 0x0010ac10
LAB_0011f532:
MOV RDI,RAX
CALL 0x00109221
|
/* nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...) */
void nglog::RawLog(int4 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int param_9,char *param_10,int4 param_11,char *param_12,int8 param_13,
int8 param_14,...)
{
ulong uVar1;
char in_AL;
char cVar2;
uint uVar3;
pthread_t pVar4;
char *pcVar5;
int8 uVar6;
ulong uVar7;
size_t sVar8;
char *pcVar9;
int **ppuVar10;
__0 *p_Var11;
ulong local_1a08;
char *local_1a00;
int4 local_19f4;
char *local_19f0;
int8 local_19e8;
int1 *local_19e0;
int1 *local_19d8;
char *local_19c8;
int4 local_19c0;
char *local_19b8;
ulong local_19b0;
long local_19a8;
ios_base local_19a0 [8];
int8 auStack_1998 [32];
int1 local_1898 [32];
int8 local_1878;
int8 local_1870;
int4 local_1868;
int8 local_1858;
int8 local_1848;
int8 local_1838;
int8 local_1828;
int8 local_1818;
int8 local_1808;
int8 local_17f8;
int **local_17e0;
char *local_17d8;
char *pcStack_17d0;
char *local_17c8;
char *pcStack_17c0;
char *local_17b8;
char *pcStack_17b0;
locale local_17a8 [8];
char local_17a0 [3000];
char local_be8 [3000];
if (in_AL != '\0') {
local_1868 = param_1;
local_1858 = param_2;
local_1848 = param_3;
local_1838 = param_4;
local_1828 = param_5;
local_1818 = param_6;
local_1808 = param_7;
local_17f8 = param_8;
}
local_19f0 = param_10;
local_1878 = param_13;
local_1870 = param_14;
if ((((fLB::FLAGS_logtostdout != '\0') || (fLB::FLAGS_logtostderr != '\0')) ||
(fLI::FLAGS_stderrthreshold <= param_9)) ||
((fLB::FLAGS_alsologtostderr != '\0' || (cVar2 = IsLoggingInitialized(), cVar2 == '\0')))) {
ppuVar10 = (int **)(PTR_vtable_0012ef48 + 0x10);
local_17d8 = (char *)0x0;
pcStack_17d0 = (char *)0x0;
local_17c8 = (char *)0x0;
pcStack_17c0 = (char *)0x0;
local_17b8 = (char *)0x0;
pcStack_17b0 = (char *)0x0;
local_17e0 = ppuVar10;
std::locale::locale(local_17a8);
local_17e0 = &PTR__streambuf_0012ec18;
local_17c8 = local_be8;
/* try { // try from 0011f2e0 to 0011f2f1 has its CatchHandler @ 0011f540 */
local_17d8 = local_17a0;
pcStack_17d0 = local_17a0;
pcStack_17c0 = local_17a0;
local_17b8 = local_17a0;
pcStack_17b0 = local_17c8;
std::ostream::ostream((ostream *)&local_19a8,(streambuf *)&local_17e0);
*(int8 *)((long)auStack_1998 + *(long *)(local_19a8 + -0x18)) = 5;
pVar4 = pthread_self();
if (pVar4 == 0) {
/* try { // try from 0011f365 to 0011f37a has its CatchHandler @ 0011f53e */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_19a8,"thread::id of a non-executing thread",0x24);
}
else {
/* try { // try from 0011f311 to 0011f31d has its CatchHandler @ 0011f53e */
std::ostream::_M_insert<unsigned_long>((ulong)&local_19a8);
}
local_1a00 = local_be8;
local_1a08 = 3000;
/* try { // try from 0011f391 to 0011f3df has its CatchHandler @ 0011f545 */
pcVar5 = (char *)GetLogSeverityName(param_9);
cVar2 = *pcVar5;
if (((local_17b8 != pcStack_17c0) && (local_17b8 != pcStack_17b0)) && (local_17b8[-1] != '\0'))
{
if (local_17b8 < pcStack_17b0) {
*local_17b8 = '\0';
local_17b8 = local_17b8 + 1;
}
else {
/* try { // try from 0011f502 to 0011f506 has its CatchHandler @ 0011f532 */
(*(code *)local_17e0[0xd])(&local_17e0,0);
}
}
uVar6 = tools::const_basename(local_19f0);
local_19f4 = param_11;
DoRawLog(&local_1a00,&local_1a08,"%c00000000 00:00:00.000000 %s %s:%d] RAW: ",
(ulong)(uint)(int)cVar2,local_17a0,uVar6,param_11);
pcVar5 = local_1a00;
uVar1 = local_1a08;
local_19d8 = local_1898;
local_19e0 = &stack0x00000008;
local_19e8 = 0x3000000020;
uVar3 = vsnprintf(local_1a00,local_1a08,param_12,&local_19e8);
pcVar9 = "RAW_LOG ERROR: The Message was too long!\n";
if (-1 < (int)uVar3) {
uVar7 = (ulong)uVar3;
if (uVar7 <= uVar1) {
local_1a00 = pcVar5 + uVar7;
pcVar9 = "\n";
local_1a08 = uVar1 - uVar7;
}
}
DoRawLog(&local_1a00,&local_1a08,pcVar9);
uVar3 = fileno(*(FILE **)PTR_stderr_0012ef98);
sVar8 = strlen(local_be8);
p_Var11 = (__0 *)(ulong)uVar3;
syscall(1,p_Var11,local_be8,sVar8);
if (param_9 == 3) {
local_19c8 = local_19f0;
local_19c0 = local_19f4;
local_19b8 = pcVar5;
local_19b0 = uVar1;
/* try { // try from 0011f528 to 0011f52c has its CatchHandler @ 0011f53c */
std::call_once<nglog::RawLog(nglog::LogSeverity,char_const*,int,char_const*,___)::__0>
((once_flag *)&local_19c8,p_Var11);
/* try { // try from 0011f52d to 0011f531 has its CatchHandler @ 0011f53a */
uVar6 = LogMessage::Fail();
/* catch(type#1 @ 00000000) { ... } // from try @ 0011f502 with catch @ 0011f532
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar6);
}
std::ios_base::~ios_base(local_19a0);
local_17e0 = ppuVar10;
std::locale::~locale(local_17a8);
}
return;
}
| |
37,457 | nlohmann::json_abi_v3_11_3::detail::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>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/./json.hpp | std::string exception_message(const token_type expected, const std::string& context)
{
std::string error_msg = "syntax error ";
if (!context.empty())
{
error_msg += concat("while parsing ", context, ' ');
}
error_msg += "- ";
if (last_token == token_type::parse_error)
{
error_msg += concat(m_lexer.get_error_message(), "; last read: '",
m_lexer.get_token_string(), '\'');
}
else
{
error_msg += concat("unexpected ", lexer_t::token_type_name(last_token));
}
if (expected != token_type::uninitialized)
{
error_msg += concat("; expected ", lexer_t::token_type_name(expected));
}
return error_msg;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::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>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x128, %rsp # imm = 0x128
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x120(%rsp)
movq %rsi, 0x118(%rsp)
movl %edx, 0x114(%rsp)
movq %rcx, 0x108(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0x10(%rsp)
movb $0x0, 0x107(%rsp)
leaq 0x106(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x50d60
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x11c1d3(%rip), %rsi # 0x1cfc8e
callq 0x61bd0
jmp 0xb3ac2
leaq 0x106(%rsp), %rdi
callq 0x510a0
movq 0x108(%rsp), %rdi
callq 0x503b0
testb $0x1, %al
jne 0xb3b9a
movq 0x108(%rsp), %rdx
movb $0x20, 0xcf(%rsp)
leaq 0x12a585(%rip), %rsi # 0x1de080
leaq 0xd0(%rsp), %rdi
leaq 0xcf(%rsp), %rcx
callq 0xc12a0
jmp 0xb3b12
movq 0x18(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x50110
jmp 0xb3b26
leaq 0xd0(%rsp), %rdi
callq 0x510c0
jmp 0xb3b9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x106(%rsp), %rdi
callq 0x510a0
jmp 0xb3da2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0xb3d98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x510c0
jmp 0xb3d98
movq 0x18(%rsp), %rdi
leaq 0x11c0f6(%rip), %rsi # 0x1cfc9c
callq 0x501c0
jmp 0xb3bad
movq 0x10(%rsp), %rax
cmpl $0xe, 0x20(%rax)
jne 0xb3c95
movq 0x10(%rsp), %rdi
addq $0x28, %rdi
movq %rdi, (%rsp)
callq 0xc1430
movq (%rsp), %rsi
movq %rax, 0xa0(%rsp)
leaq 0x80(%rsp), %rdi
callq 0xb36a0
jmp 0xb3be9
movb $0x27, 0x7f(%rsp)
leaq 0x11c0aa(%rip), %rdx # 0x1cfc9f
leaq 0xa8(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0x80(%rsp), %rcx
leaq 0x7f(%rsp), %r8
callq 0xc1360
jmp 0xb3c19
movq 0x18(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x50110
jmp 0xb3c2d
leaq 0xa8(%rsp), %rdi
callq 0x510c0
leaq 0x80(%rsp), %rdi
callq 0x510c0
jmp 0xb3cff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0xb3c83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x510c0
leaq 0x80(%rsp), %rdi
callq 0x510c0
jmp 0xb3d98
movq 0x10(%rsp), %rax
movl 0x20(%rax), %edi
callq 0xc14f0
movq %rax, 0x50(%rsp)
leaq 0x11c000(%rip), %rsi # 0x1cfcae
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0xc1440
jmp 0xb3cbf
movq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x50110
jmp 0xb3cd0
leaq 0x58(%rsp), %rdi
callq 0x510c0
jmp 0xb3cff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x510c0
jmp 0xb3d98
cmpl $0x0, 0x114(%rsp)
je 0xb3d6f
movl 0x114(%rsp), %edi
callq 0xc14f0
movq %rax, 0x28(%rsp)
leaq 0x11bf99(%rip), %rsi # 0x1cfcba
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0xc1440
jmp 0xb3d32
movq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x50110
jmp 0xb3d43
leaq 0x30(%rsp), %rdi
callq 0x510c0
jmp 0xb3d6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x510c0
jmp 0xb3d98
movb $0x1, 0x107(%rsp)
testb $0x1, 0x107(%rsp)
jne 0xb3d8b
movq 0x18(%rsp), %rdi
callq 0x510c0
movq 0x8(%rsp), %rax
addq $0x128, %rsp # imm = 0x128
retq
movq 0x18(%rsp), %rdi
callq 0x510c0
movq 0xf8(%rsp), %rdi
callq 0x50940
nop
| _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_:
sub rsp, 128h
mov [rsp+128h+var_110], rdi; __int64
mov rax, rdi
mov [rsp+128h+var_120], rax; void *
mov [rsp+128h+var_8], rdi
mov qword ptr [rsp+128h+var_10], rsi
mov [rsp+128h+var_14], edx
mov [rsp+128h+var_22+2], rcx
mov rax, qword ptr [rsp+128h+var_10]
mov qword ptr [rsp+128h+var_118], rax; int
mov byte ptr [rsp+128h+var_22+1], 0
lea rdi, [rsp+128h+var_22]
mov [rsp+128h+var_108], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+128h+var_110]
mov rdx, [rsp+128h+var_108]
lea rsi, aSyntaxError; "syntax error "
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_B3AC2:
lea rdi, [rsp+128h+var_22]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rsp+128h+var_22+2]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_B3B9A
mov rdx, [rsp+128h+var_22+2]; int
mov byte ptr [rsp+128h+var_59], 20h ; ' '
lea rsi, aSyntaxErrorWhi+0Dh; int
lea rdi, [rsp+128h+var_59+1]; int
lea rcx, [rsp+128h+var_59]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA15_KcRKS8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(char const(&)[15],std::string const&,char &&)
jmp short $+2
loc_B3B12:
mov rdi, [rsp+128h+var_110]
lea rsi, [rsp+128h+var_59+1]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_B3B26:
lea rdi, [rsp+128h+var_59+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_B3B9A
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_FE]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_B3DA2
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
jmp loc_B3D98
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_B3D98
loc_B3B9A:
mov rdi, [rsp+128h+var_110]
lea rsi, asc_1CFC9C; "- "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_B3BAD:
mov rax, qword ptr [rsp+128h+var_118]
cmp dword ptr [rax+20h], 0Eh
jnz loc_B3C95
mov rdi, qword ptr [rsp+128h+var_118]
add rdi, 28h ; '('
mov qword ptr [rsp+128h+var_128], rdi; int
call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_error_messageEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_error_message(void)
mov rsi, qword ptr [rsp+128h+var_128]; int
mov [rsp+128h+var_88], rax
lea rdi, [rsp+128h+var_A8]; int
call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void)
jmp short $+2
loc_B3BE9:
mov [rsp+128h+var_A9], 27h ; '''
lea rdx, aLastRead; "; last read: '"
lea rdi, [rsp+128h+var_80]
lea rsi, [rsp+128h+var_88]
lea rcx, [rsp+128h+var_A8]
lea r8, [rsp+128h+var_A9]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&)
jmp short $+2
loc_B3C19:
mov rdi, [rsp+128h+var_110]
lea rsi, [rsp+128h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_B3C2D:
lea rdi, [rsp+128h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+128h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_B3CFF
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
jmp short loc_B3C83
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_B3C83:
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_B3D98
loc_B3C95:
mov rax, qword ptr [rsp+128h+var_118]
mov edi, [rax+20h]
call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type)
mov qword ptr [rsp+128h+var_D8], rax
lea rsi, aUnexpected; "unexpected "
lea rdi, [rsp+128h+var_D0]; int
lea rdx, [rsp+128h+var_D8]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&)
jmp short $+2
loc_B3CBF:
mov rdi, [rsp+128h+var_110]
lea rsi, [rsp+128h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_B3CD0:
lea rdi, [rsp+128h+var_D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_B3CFF
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_B3D98
loc_B3CFF:
cmp [rsp+128h+var_14], 0
jz short loc_B3D6F
mov edi, [rsp+128h+var_14]
call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type)
mov qword ptr [rsp+128h+var_100], rax
lea rsi, aExpected; "; expected "
lea rdi, [rsp+128h+var_F8]; int
lea rdx, [rsp+128h+var_100]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&)
jmp short $+2
loc_B3D32:
mov rdi, [rsp+128h+var_110]
lea rsi, [rsp+128h+var_F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_B3D43:
lea rdi, [rsp+128h+var_F8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_B3D6F
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_B3D98
loc_B3D6F:
mov byte ptr [rsp+128h+var_22+1], 1
test byte ptr [rsp+128h+var_22+1], 1
jnz short loc_B3D8B
mov rdi, [rsp+128h+var_110]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_B3D8B:
mov rax, [rsp+128h+var_120]
add rsp, 128h
retn
loc_B3D98:
mov rdi, [rsp+arg_10]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_B3DA2:
mov rdi, [rsp+arg_F0]
call __Unwind_Resume
| void * nlohmann::json_abi_v3_11_3::detail::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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message(
long long a1,
long long a2,
unsigned int a3,
long long a4)
{
int v4; // r8d
int v5; // r9d
int v6; // r9d
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v10; // ecx
int v11; // r8d
int v12; // r9d
void *v14; // [rsp+0h] [rbp-128h]
int v15; // [rsp+0h] [rbp-128h]
void *v16; // [rsp+8h] [rbp-120h]
void *v17; // [rsp+8h] [rbp-120h]
int v18[2]; // [rsp+10h] [rbp-118h]
int v19; // [rsp+10h] [rbp-118h]
void *v20; // [rsp+18h] [rbp-110h]
void *v21; // [rsp+18h] [rbp-110h]
void *v22; // [rsp+18h] [rbp-110h]
int v23[2]; // [rsp+28h] [rbp-100h] BYREF
int v24[8]; // [rsp+30h] [rbp-F8h] BYREF
int v25[2]; // [rsp+50h] [rbp-D8h] BYREF
int v26[9]; // [rsp+58h] [rbp-D0h] BYREF
char v27; // [rsp+7Fh] [rbp-A9h] BYREF
int v28[8]; // [rsp+80h] [rbp-A8h] BYREF
long long error_message; // [rsp+A0h] [rbp-88h] BYREF
_BYTE v30[39]; // [rsp+A8h] [rbp-80h] BYREF
char v31; // [rsp+CFh] [rbp-59h] BYREF
_BYTE v32[54]; // [rsp+D0h] [rbp-58h] BYREF
_BYTE v33[14]; // [rsp+106h] [rbp-22h] BYREF
unsigned int v34; // [rsp+114h] [rbp-14h]
int v35[2]; // [rsp+118h] [rbp-10h]
long long v36; // [rsp+120h] [rbp-8h]
v20 = (void *)a1;
v16 = (void *)a1;
v36 = a1;
*(_QWORD *)v35 = a2;
v34 = a3;
*(_QWORD *)&v33[2] = a4;
*(_QWORD *)v18 = a2;
v33[1] = 0;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"syntax error ", (long long)v33);
std::allocator<char>::~allocator(v33);
if ( (std::string::empty(*(_QWORD *)&v33[2]) & 1) == 0 )
{
v31 = 32;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(
(int)v32,
(int)"while parsing ",
*(int *)&v33[2],
(int)&v31,
v4,
v5,
v14,
a1,
a2,
a1,
(long long)v33);
std::string::operator+=(v20, v32);
std::string::~string(v32);
}
std::string::operator+=(v20, "- ");
if ( *(_DWORD *)(*(_QWORD *)v18 + 32LL) == 14 )
{
error_message = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_error_message();
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(
(long long)v28,
*(_QWORD *)v18 + 40LL);
v27 = 39;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(
(unsigned int)v30,
(unsigned int)&error_message,
(unsigned int)"; last read: '",
(unsigned int)v28,
(unsigned int)&v27,
v6,
v18[0] + 40,
(_DWORD)v16,
v18[0],
(long long)v20);
std::string::operator+=(v21, v30);
std::string::~string(v30);
std::string::~string(v28);
}
else
{
*(_QWORD *)v25 = nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(*(unsigned int *)(*(_QWORD *)v18 + 32LL));
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(
(int)v26,
(int)"unexpected ",
(int)v25,
v7,
v8,
v9,
(int)v14,
v16,
v18[0],
(long long)v20);
std::string::operator+=(v21, v26);
std::string::~string(v26);
}
if ( v34 )
{
*(_QWORD *)v23 = nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(v34);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(
(int)v24,
(int)"; expected ",
(int)v23,
v10,
v11,
v12,
v15,
v17,
v19,
(long long)v21);
std::string::operator+=(v22, v24);
std::string::~string(v24);
}
return v17;
}
| exception_message:
SUB RSP,0x128
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x120],RDI
MOV qword ptr [RSP + 0x118],RSI
MOV dword ptr [RSP + 0x114],EDX
MOV qword ptr [RSP + 0x108],RCX
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0x10],RAX
MOV byte ptr [RSP + 0x107],0x0
LEA RDI,[RSP + 0x106]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x00150d60
MOV RDI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
LAB_001b3ab4:
LEA RSI,[0x2cfc8e]
CALL 0x00161bd0
JMP 0x001b3ac2
LAB_001b3ac2:
LEA RDI,[RSP + 0x106]
CALL 0x001510a0
MOV RDI,qword ptr [RSP + 0x108]
CALL 0x001503b0
TEST AL,0x1
JNZ 0x001b3b9a
MOV RDX,qword ptr [RSP + 0x108]
MOV byte ptr [RSP + 0xcf],0x20
LAB_001b3af4:
LEA RSI,[0x2de080]
LEA RDI,[RSP + 0xd0]
LEA RCX,[RSP + 0xcf]
CALL 0x001c12a0
JMP 0x001b3b12
LAB_001b3b12:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0xd0]
CALL 0x00150110
JMP 0x001b3b26
LAB_001b3b26:
LEA RDI,[RSP + 0xd0]
CALL 0x001510c0
JMP 0x001b3b9a
LAB_001b3b9a:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x2cfc9c]
CALL 0x001501c0
JMP 0x001b3bad
LAB_001b3bad:
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x20],0xe
JNZ 0x001b3c95
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x28
MOV qword ptr [RSP],RDI
CALL 0x001c1430
MOV RSI,qword ptr [RSP]
MOV qword ptr [RSP + 0xa0],RAX
LEA RDI,[RSP + 0x80]
CALL 0x001b36a0
JMP 0x001b3be9
LAB_001b3be9:
MOV byte ptr [RSP + 0x7f],0x27
LAB_001b3bee:
LEA RDX,[0x2cfc9f]
LEA RDI,[RSP + 0xa8]
LEA RSI,[RSP + 0xa0]
LEA RCX,[RSP + 0x80]
LEA R8,[RSP + 0x7f]
CALL 0x001c1360
JMP 0x001b3c19
LAB_001b3c19:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0xa8]
CALL 0x00150110
JMP 0x001b3c2d
LAB_001b3c2d:
LEA RDI,[RSP + 0xa8]
CALL 0x001510c0
LEA RDI,[RSP + 0x80]
CALL 0x001510c0
JMP 0x001b3cff
LAB_001b3c95:
MOV RAX,qword ptr [RSP + 0x10]
MOV EDI,dword ptr [RAX + 0x20]
CALL 0x001c14f0
MOV qword ptr [RSP + 0x50],RAX
LAB_001b3ca7:
LEA RSI,[0x2cfcae]
LEA RDI,[RSP + 0x58]
LEA RDX,[RSP + 0x50]
CALL 0x001c1440
JMP 0x001b3cbf
LAB_001b3cbf:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x58]
CALL 0x00150110
JMP 0x001b3cd0
LAB_001b3cd0:
LEA RDI,[RSP + 0x58]
CALL 0x001510c0
JMP 0x001b3cff
LAB_001b3cff:
CMP dword ptr [RSP + 0x114],0x0
JZ 0x001b3d6f
MOV EDI,dword ptr [RSP + 0x114]
CALL 0x001c14f0
MOV qword ptr [RSP + 0x28],RAX
LAB_001b3d1a:
LEA RSI,[0x2cfcba]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x28]
CALL 0x001c1440
JMP 0x001b3d32
LAB_001b3d32:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x30]
CALL 0x00150110
LAB_001b3d41:
JMP 0x001b3d43
LAB_001b3d43:
LEA RDI,[RSP + 0x30]
CALL 0x001510c0
JMP 0x001b3d6f
LAB_001b3d6f:
MOV byte ptr [RSP + 0x107],0x1
TEST byte ptr [RSP + 0x107],0x1
JNZ 0x001b3d8b
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001510c0
LAB_001b3d8b:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x128
RET
|
/* WARNING: Removing unreachable block (ram,0x001b3d81) */
/* nlohmann::json_abi_v3_11_3::detail::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>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >
>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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> >::token_type, std::__cxx11::string const&) */
string * nlohmann::json_abi_v3_11_3::detail::
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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::exception_message(string *param_1,long param_2,int param_3,string *param_4)
{
ulong uVar1;
char *local_100;
detail local_f8 [32];
char *local_d8;
detail local_d0 [39];
char local_a9;
string local_a8 [32];
char *local_88;
detail local_80 [39];
char local_59;
detail local_58 [54];
allocator local_22;
int1 local_21;
string *local_20;
int local_14;
long local_10;
string *local_8;
local_21 = 0;
local_20 = param_4;
local_14 = param_3;
local_10 = param_2;
local_8 = param_1;
std::allocator<char>::allocator();
/* try { // try from 001b3ab4 to 001b3abf has its CatchHandler @ 001b3b35 */
std::__cxx11::string::string<std::allocator<char>>(param_1,"syntax error ",&local_22);
std::allocator<char>::~allocator((allocator<char> *)&local_22);
uVar1 = std::__cxx11::string::empty();
if ((uVar1 & 1) == 0) {
local_59 = ' ';
/* try { // try from 001b3af4 to 001b3b0f has its CatchHandler @ 001b3b5b */
concat<std::__cxx11::string,char_const(&)[15],std::__cxx11::string_const&,char>
(local_58,"while parsing ",local_20,&local_59);
/* try { // try from 001b3b12 to 001b3b23 has its CatchHandler @ 001b3b74 */
std::__cxx11::string::operator+=(param_1,(string *)local_58);
std::__cxx11::string::~string((string *)local_58);
}
/* try { // try from 001b3b9a to 001b3be6 has its CatchHandler @ 001b3b5b */
std::__cxx11::string::operator+=(param_1,"- ");
if (*(int *)(param_2 + 0x20) == 0xe) {
local_88 = (char *)lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get_error_message((lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*)(param_2 + 0x28));
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get_token_string();
local_a9 = '\'';
/* try { // try from 001b3bee to 001b3c16 has its CatchHandler @ 001b3c4c */
concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char>
(local_80,&local_88,"; last read: \'",local_a8,&local_a9);
/* try { // try from 001b3c19 to 001b3c2a has its CatchHandler @ 001b3c62 */
std::__cxx11::string::operator+=(param_1,(string *)local_80);
std::__cxx11::string::~string((string *)local_80);
std::__cxx11::string::~string(local_a8);
}
else {
local_d8 = (char *)lexer_base<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>>
::token_type_name(*(int4 *)(param_2 + 0x20));
/* try { // try from 001b3ca7 to 001b3cbc has its CatchHandler @ 001b3b5b */
concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_d0,"unexpected ",&local_d8);
/* try { // try from 001b3cbf to 001b3ccd has its CatchHandler @ 001b3cdc */
std::__cxx11::string::operator+=(param_1,(string *)local_d0);
std::__cxx11::string::~string((string *)local_d0);
}
if (local_14 != 0) {
local_100 = (char *)lexer_base<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>>
::token_type_name(local_14);
/* try { // try from 001b3d1a to 001b3d2f has its CatchHandler @ 001b3b5b */
concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_f8,"; expected ",&local_100);
/* try { // try from 001b3d32 to 001b3d40 has its CatchHandler @ 001b3d4f */
std::__cxx11::string::operator+=(param_1,(string *)local_f8);
std::__cxx11::string::~string((string *)local_f8);
}
return param_1;
}
| |
37,458 | JS_SetObjectData | bluesky950520[P]quickjs/quickjs.c | static int JS_SetObjectData(JSContext *ctx, JSValue obj, JSValue val)
{
JSObject *p;
if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) {
p = JS_VALUE_GET_OBJ(obj);
switch(p->class_id) {
case JS_CLASS_NUMBER:
case JS_CLASS_STRING:
case JS_CLASS_BOOLEAN:
case JS_CLASS_SYMBOL:
case JS_CLASS_DATE:
case JS_CLASS_BIG_INT:
JS_FreeValue(ctx, p->u.object_data);
p->u.object_data = val;
return 0;
}
}
JS_FreeValue(ctx, val);
if (!JS_IsException(obj))
JS_ThrowTypeError(ctx, "invalid object type");
return -1;
} | O1 | c | JS_SetObjectData:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq %rcx, %r15
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movl %edx, %r12d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %r12
jne 0x362b1
movq 0x8(%rsp), %r13
movzwl 0x6(%r13), %eax
cmpq $0x22, %rax
ja 0x362b1
movabsq $0x4000004f0, %rcx # imm = 0x4000004F0
btq %rax, %rcx
jae 0x362b1
movq 0x30(%r13), %rsi
movq 0x38(%r13), %rdx
movq 0x18(%r14), %rdi
callq 0x1ccb2
movq %r15, 0x30(%r13)
movq %rbx, 0x38(%r13)
jmp 0x362c6
movq 0x18(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1ccb2
cmpl $0x6, %r12d
jne 0x362d4
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x68a1c(%rip), %rsi # 0x9ecf7
movq %r14, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x21953
| JS_SetObjectData:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov rbx, r8
mov r15, rcx
mov r14, rdi
mov [rsp+38h+var_30], rsi
mov r12d, edx
mov eax, 0FFFFFFFFh
cmp r12, rax
jnz short loc_362B1
mov r13, [rsp+38h+var_30]
movzx eax, word ptr [r13+6]
cmp rax, 22h ; '"'
ja short loc_362B1
mov rcx, 4000004F0h
bt rcx, rax
jnb short loc_362B1
mov rsi, [r13+30h]
mov rdx, [r13+38h]
mov rdi, [r14+18h]
call JS_FreeValueRT
mov [r13+30h], r15
mov [r13+38h], rbx
jmp short loc_362C6
loc_362B1:
mov rdi, [r14+18h]
mov rsi, r15
mov rdx, rbx
call JS_FreeValueRT
cmp r12d, 6
jnz short loc_362D4
loc_362C6:
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_362D4:
lea rsi, aInvalidObjectT; "invalid object type"
mov rdi, r14
xor eax, eax
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp JS_ThrowTypeError
| long long JS_SetObjectData(
long long a1,
long long a2,
int a3,
_DWORD *a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13,
long long a14,
char a15)
{
unsigned long long v18; // rax
long long v19; // rcx
long long result; // rax
long long v21; // rdx
long long v22; // rcx
long long v23; // r8
long long v24; // r9
__m128 v25; // xmm4
__m128 v26; // xmm5
if ( a3 == 0xFFFFFFFFLL
&& (v18 = *(unsigned __int16 *)(a2 + 6), v18 <= 0x22)
&& (v19 = 0x4000004F0LL, _bittest64(&v19, v18)) )
{
result = JS_FreeValueRT(*(_QWORD *)(a1 + 24), *(_DWORD **)(a2 + 48), *(_QWORD *)(a2 + 56));
*(_QWORD *)(a2 + 48) = a4;
*(_QWORD *)(a2 + 56) = a5;
}
else
{
result = JS_FreeValueRT(*(_QWORD *)(a1 + 24), a4, a5);
if ( a3 != 6 )
return JS_ThrowTypeError(
a1,
(long long)"invalid object type",
v21,
v22,
v23,
v24,
a6,
a7,
a8,
a9,
v25,
v26,
a12,
a13,
a15);
}
return result;
}
| JS_SetObjectData:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,R8
MOV R15,RCX
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV R12D,EDX
MOV EAX,0xffffffff
CMP R12,RAX
JNZ 0x001362b1
MOV R13,qword ptr [RSP + 0x8]
MOVZX EAX,word ptr [R13 + 0x6]
CMP RAX,0x22
JA 0x001362b1
MOV RCX,0x4000004f0
BT RCX,RAX
JNC 0x001362b1
MOV RSI,qword ptr [R13 + 0x30]
MOV RDX,qword ptr [R13 + 0x38]
MOV RDI,qword ptr [R14 + 0x18]
CALL 0x0011ccb2
MOV qword ptr [R13 + 0x30],R15
MOV qword ptr [R13 + 0x38],RBX
JMP 0x001362c6
LAB_001362b1:
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R15
MOV RDX,RBX
CALL 0x0011ccb2
CMP R12D,0x6
JNZ 0x001362d4
LAB_001362c6:
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001362d4:
LEA RSI,[0x19ecf7]
MOV RDI,R14
XOR EAX,EAX
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x00121953
|
void JS_SetObjectData(long param_1,long param_2,int param_3,int8 param_4,int8 param_5)
{
if (((param_3 == -1) && ((ulong)*(ushort *)(param_2 + 6) < 0x23)) &&
((0x4000004f0U >> ((ulong)*(ushort *)(param_2 + 6) & 0x3f) & 1) != 0)) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),*(int8 *)(param_2 + 0x30),
*(int8 *)(param_2 + 0x38));
*(int8 *)(param_2 + 0x30) = param_4;
*(int8 *)(param_2 + 0x38) = param_5;
return;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_4,param_5);
if (param_3 == 6) {
return;
}
JS_ThrowTypeError(param_1,"invalid object type");
return;
}
| |
37,459 | JS_SetObjectData | bluesky950520[P]quickjs/quickjs.c | static int JS_SetObjectData(JSContext *ctx, JSValue obj, JSValue val)
{
JSObject *p;
if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) {
p = JS_VALUE_GET_OBJ(obj);
switch(p->class_id) {
case JS_CLASS_NUMBER:
case JS_CLASS_STRING:
case JS_CLASS_BOOLEAN:
case JS_CLASS_SYMBOL:
case JS_CLASS_DATE:
case JS_CLASS_BIG_INT:
JS_FreeValue(ctx, p->u.object_data);
p->u.object_data = val;
return 0;
}
}
JS_FreeValue(ctx, val);
if (!JS_IsException(obj))
JS_ThrowTypeError(ctx, "invalid object type");
return -1;
} | O3 | c | JS_SetObjectData:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r15
movl %edx, %r13d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %r13
jne 0x375ba
movq %rsi, %r12
movzwl 0x6(%rsi), %eax
cmpq $0x22, %rax
ja 0x375ec
movabsq $0x4000004f0, %rcx # imm = 0x4000004F0
btq %rax, %rcx
jae 0x375ec
movq 0x38(%r12), %rdx
cmpl $-0x9, %edx
jb 0x375ae
movq 0x30(%r12), %rsi
movq 0x18(%r15), %rdi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x375ae
callq 0x20d90
movq %r14, 0x30(%r12)
movq %rbx, 0x38(%r12)
jmp 0x375e2
cmpl $-0x9, %ebx
jb 0x375dc
movq 0x18(%r15), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x375dc
movq %r14, %rsi
movq %rbx, %rdx
callq 0x20d90
cmpl $0x6, %r13d
jne 0x3760e
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
cmpl $-0x9, %ebx
jb 0x3760e
movq 0x18(%r15), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x3760e
movq %r14, %rsi
movq %rbx, %rdx
callq 0x20d90
leaq 0x6a69c(%rip), %rsi # 0xa1cb1
movq %r15, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2214f
| JS_SetObjectData:
push r15
push r14
push r13
push r12
push rbx
mov rbx, r8
mov r14, rcx
mov r15, rdi
mov r13d, edx
mov eax, 0FFFFFFFFh
cmp r13, rax
jnz short loc_375BA
mov r12, rsi
movzx eax, word ptr [rsi+6]
cmp rax, 22h ; '"'
ja short loc_375EC
mov rcx, 4000004F0h
bt rcx, rax
jnb short loc_375EC
mov rdx, [r12+38h]
cmp edx, 0FFFFFFF7h
jb short loc_375AE
mov rsi, [r12+30h]
mov rdi, [r15+18h]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_375AE
call js_free_value_rt
loc_375AE:
mov [r12+30h], r14
mov [r12+38h], rbx
jmp short loc_375E2
loc_375BA:
cmp ebx, 0FFFFFFF7h
jb short loc_375DC
mov rdi, [r15+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_375DC
mov rsi, r14
mov rdx, rbx
call js_free_value_rt
loc_375DC:
cmp r13d, 6
jnz short loc_3760E
loc_375E2:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_375EC:
cmp ebx, 0FFFFFFF7h
jb short loc_3760E
mov rdi, [r15+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_3760E
mov rsi, r14
mov rdx, rbx
call js_free_value_rt
loc_3760E:
lea rsi, aInvalidObjectT; "invalid object type"
mov rdi, r15
xor eax, eax
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp JS_ThrowTypeError
| unsigned long long JS_SetObjectData(
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,
char a15)
{
_QWORD *v16; // r14
int v18; // r13d
unsigned long long result; // rax
long long v21; // rdx
_QWORD *v22; // rsi
long long v23; // rdi
long long v24; // rcx
long long v25; // rdi
long long v26; // rdi
int v27; // eax
v16 = (_QWORD *)a4;
v18 = a3;
result = 0xFFFFFFFFLL;
if ( (unsigned int)a3 == 0xFFFFFFFFLL )
{
result = *(unsigned __int16 *)(a2 + 6);
if ( result <= 0x22 )
{
a4 = 0x4000004F0LL;
if ( _bittest64(&a4, result) )
{
v21 = *(_QWORD *)(a2 + 56);
if ( (unsigned int)v21 >= 0xFFFFFFF7 )
{
v22 = *(_QWORD **)(a2 + 48);
v23 = *(_QWORD *)(a1 + 24);
result = *(unsigned int *)v22;
v24 = (unsigned int)(result - 1);
*(_DWORD *)v22 = v24;
if ( (int)result <= 1 )
result = js_free_value_rt(v23, v22, v21, v24, a5, a6);
}
*(_QWORD *)(a2 + 48) = v16;
*(_QWORD *)(a2 + 56) = a5;
return result;
}
}
if ( (unsigned int)a5 >= 0xFFFFFFF7 )
{
v26 = *(_QWORD *)(a1 + 24);
v27 = *(_DWORD *)v16;
a4 = (unsigned int)(*(_DWORD *)v16 - 1);
*(_DWORD *)v16 = a4;
if ( v27 <= 1 )
js_free_value_rt(v26, v16, a5, a4, a5, a6);
}
return JS_ThrowTypeError(
a1,
(long long)"invalid object type",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
a15);
}
if ( (unsigned int)a5 >= 0xFFFFFFF7 )
{
v25 = *(_QWORD *)(a1 + 24);
result = *(unsigned int *)a4;
a4 = (unsigned int)(result - 1);
*(_DWORD *)v16 = a4;
if ( (int)result <= 1 )
result = js_free_value_rt(v25, v16, a5, a4, a5, a6);
}
if ( v18 != 6 )
return JS_ThrowTypeError(
a1,
(long long)"invalid object type",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
a15);
return result;
}
| JS_SetObjectData:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,R8
MOV R14,RCX
MOV R15,RDI
MOV R13D,EDX
MOV EAX,0xffffffff
CMP R13,RAX
JNZ 0x001375ba
MOV R12,RSI
MOVZX EAX,word ptr [RSI + 0x6]
CMP RAX,0x22
JA 0x001375ec
MOV RCX,0x4000004f0
BT RCX,RAX
JNC 0x001375ec
MOV RDX,qword ptr [R12 + 0x38]
CMP EDX,-0x9
JC 0x001375ae
MOV RSI,qword ptr [R12 + 0x30]
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x001375ae
CALL 0x00120d90
LAB_001375ae:
MOV qword ptr [R12 + 0x30],R14
MOV qword ptr [R12 + 0x38],RBX
JMP 0x001375e2
LAB_001375ba:
CMP EBX,-0x9
JC 0x001375dc
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x001375dc
MOV RSI,R14
MOV RDX,RBX
CALL 0x00120d90
LAB_001375dc:
CMP R13D,0x6
JNZ 0x0013760e
LAB_001375e2:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001375ec:
CMP EBX,-0x9
JC 0x0013760e
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x0013760e
MOV RSI,R14
MOV RDX,RBX
CALL 0x00120d90
LAB_0013760e:
LEA RSI,[0x1a1cb1]
MOV RDI,R15
XOR EAX,EAX
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x0012214f
|
void JS_SetObjectData(long param_1,long param_2,int param_3,int *param_4,int8 param_5)
{
int iVar1;
int8 uVar2;
if (param_3 == -1) {
if ((0x22 < (ulong)*(ushort *)(param_2 + 6)) ||
((0x4000004f0U >> ((ulong)*(ushort *)(param_2 + 6) & 0x3f) & 1) == 0)) {
if (0xfffffff6 < (uint)param_5) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *param_4;
*param_4 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,param_4,param_5);
}
}
LAB_0013760e:
JS_ThrowTypeError(param_1,"invalid object type");
return;
}
if (0xfffffff6 < (uint)*(int8 *)(param_2 + 0x38)) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = **(int **)(param_2 + 0x30);
**(int **)(param_2 + 0x30) = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2);
}
}
*(int **)(param_2 + 0x30) = param_4;
*(int8 *)(param_2 + 0x38) = param_5;
}
else {
if (0xfffffff6 < (uint)param_5) {
uVar2 = *(int8 *)(param_1 + 0x18);
iVar1 = *param_4;
*param_4 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(uVar2,param_4,param_5);
}
}
if (param_3 != 6) goto LAB_0013760e;
}
return;
}
| |
37,460 | rw_pr_rdlock | eloqsql/mysys/thr_rwlock.c | int rw_pr_rdlock(rw_pr_lock_t *rwlock)
{
pthread_mutex_lock(&rwlock->lock);
/*
The fact that we were able to acquire 'lock' mutex means
that there are no active writers and we can acquire rd-lock.
Increment active readers counter to prevent requests for
wr-lock from succeeding and unlock mutex.
*/
rwlock->active_readers++;
pthread_mutex_unlock(&rwlock->lock);
return 0;
} | O0 | c | rw_pr_rdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x25600
movq -0x8(%rbp), %rax
movl 0x58(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x58(%rax)
movq -0x8(%rbp), %rdi
callq 0x252f0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rw_pr_rdlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov rax, [rbp+var_8]
mov ecx, [rax+58h]
add ecx, 1
mov [rax+58h], ecx
mov rdi, [rbp+var_8]
call _pthread_mutex_unlock
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long rw_pr_rdlock(long long a1)
{
pthread_mutex_lock(a1);
++*(_DWORD *)(a1 + 88);
pthread_mutex_unlock(a1);
return 0LL;
}
| rw_pr_rdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00125600
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x58]
ADD ECX,0x1
MOV dword ptr [RAX + 0x58],ECX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001252f0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 rw_pr_rdlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
*(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + 1;
pthread_mutex_unlock(param_1);
return 0;
}
| |
37,461 | JS_NewBigInt64 | bluesky950520[P]quickjs/quickjs.c | JSValue JS_NewBigInt64(JSContext *ctx, int64_t v)
{
JSValue val;
bf_t *a;
val = JS_NewBigInt(ctx);
if (JS_IsException(val))
return val;
a = JS_GetBigInt(val);
if (bf_set_si(a, v)) {
JS_FreeValue(ctx, val);
return JS_ThrowOutOfMemory(ctx);
}
return val;
} | O3 | c | JS_NewBigInt64:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r15
callq 0x10031
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x28a0c
movq %r14, %rdi
addq $0x8, %rdi
movq %r12, %rsi
callq 0x87626
testl %eax, %eax
je 0x28a0c
cmpl $-0x9, %ebx
jb 0x289fc
movq 0x18(%r15), %rdi
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x289fc
movq %r14, %rsi
movq %rbx, %rdx
callq 0x219cc
movq %r15, %rdi
callq 0x1d44b
movl $0x6, %ebx
xorl %r14d, %r14d
movq %r14, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| JS_NewBigInt64:
push r15
push r14
push r12
push rbx
push rax
mov r12, rsi
mov r15, rdi
call JS_NewBigInt
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jz short loc_28A0C
mov rdi, r14
add rdi, 8
mov rsi, r12
call bf_set_si
test eax, eax
jz short loc_28A0C
cmp ebx, 0FFFFFFF7h
jb short loc_289FC
mov rdi, [r15+18h]
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg short loc_289FC
mov rsi, r14
mov rdx, rbx
call js_free_value_rt
loc_289FC:
mov rdi, r15
call JS_ThrowOutOfMemory
mov ebx, 6
xor r14d, r14d
loc_28A0C:
mov rax, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| _QWORD * JS_NewBigInt64(long long a1, long long a2)
{
_DWORD *v3; // rax
_QWORD *v4; // r14
unsigned int v5; // edx
unsigned int v6; // ebx
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v11; // rdi
int v12; // eax
v3 = JS_NewBigInt(a1);
v4 = v3;
v6 = v5;
if ( v5 != 6 && (unsigned int)bf_set_si(v3 + 2, a2) )
{
if ( v6 >= 0xFFFFFFF7 )
{
v11 = *(_QWORD *)(a1 + 24);
v12 = *(_DWORD *)v4;
v8 = *(_DWORD *)v4 - 1;
*(_DWORD *)v4 = v8;
if ( v12 <= 1 )
{
a2 = (long long)v4;
js_free_value_rt(v11, v4, v6);
}
}
JS_ThrowOutOfMemory(a1, a2, v7, v8, v9, v10);
return 0LL;
}
return v4;
}
| JS_NewBigInt64:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RSI
MOV R15,RDI
CALL 0x00110031
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x00128a0c
MOV RDI,R14
ADD RDI,0x8
MOV RSI,R12
CALL 0x00187626
TEST EAX,EAX
JZ 0x00128a0c
CMP EBX,-0x9
JC 0x001289fc
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x001289fc
MOV RSI,R14
MOV RDX,RBX
CALL 0x001219cc
LAB_001289fc:
MOV RDI,R15
CALL 0x0011d44b
MOV EBX,0x6
XOR R14D,R14D
LAB_00128a0c:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int1 [16] JS_NewBigInt64(long param_1,int8 param_2)
{
int8 uVar1;
int iVar2;
int *piVar3;
int1 auVar4 [16];
auVar4 = JS_NewBigInt();
piVar3 = auVar4._0_8_;
if (auVar4._8_4_ != 6) {
iVar2 = bf_set_si(piVar3 + 2,param_2);
if (iVar2 != 0) {
if (0xfffffff6 < auVar4._8_4_) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar3;
*piVar3 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar1,piVar3,auVar4._8_8_);
}
}
JS_ThrowOutOfMemory(param_1);
auVar4 = ZEXT816(6) << 0x40;
}
}
return auVar4;
}
| |
37,462 | my_xml_error_lineno | eloqsql/strings/xml.c | uint my_xml_error_lineno(MY_XML_PARSER *p)
{
uint res=0;
const char *s;
for (s=p->beg ; s<p->cur; s++)
{
if (s[0] == '\n')
res++;
}
return res;
} | O3 | c | my_xml_error_lineno:
movq 0x128(%rdi), %rcx
movq 0x130(%rdi), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
jae 0x5b35c
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %esi, %esi
cmpb $0xa, (%rcx)
sete %sil
addl %esi, %eax
incq %rcx
cmpq %rdx, %rcx
jne 0x5b348
popq %rbp
retq
nopl (%rax)
| my_xml_error_lineno:
mov rcx, [rdi+128h]
mov rdx, [rdi+130h]
xor eax, eax
cmp rcx, rdx
jnb short locret_5B35C
push rbp
mov rbp, rsp
xor eax, eax
loc_5B348:
xor esi, esi
cmp byte ptr [rcx], 0Ah
setz sil
add eax, esi
inc rcx
cmp rcx, rdx
jnz short loc_5B348
pop rbp
locret_5B35C:
retn
| long long my_xml_error_lineno(long long a1)
{
_BYTE *v1; // rcx
_BYTE *v2; // rdx
long long result; // rax
v1 = *(_BYTE **)(a1 + 296);
v2 = *(_BYTE **)(a1 + 304);
result = 0LL;
if ( v1 < v2 )
{
LODWORD(result) = 0;
do
result = (*v1++ == 10) + (unsigned int)result;
while ( v1 != v2 );
}
return result;
}
| my_xml_error_lineno:
MOV RCX,qword ptr [RDI + 0x128]
MOV RDX,qword ptr [RDI + 0x130]
XOR EAX,EAX
CMP RCX,RDX
JNC 0x0015b35c
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_0015b348:
XOR ESI,ESI
CMP byte ptr [RCX],0xa
SETZ SIL
ADD EAX,ESI
INC RCX
CMP RCX,RDX
JNZ 0x0015b348
POP RBP
LAB_0015b35c:
RET
|
int my_xml_error_lineno(long param_1)
{
int iVar1;
char *pcVar2;
pcVar2 = *(char **)(param_1 + 0x128);
iVar1 = 0;
if (pcVar2 < *(char **)(param_1 + 0x130)) {
iVar1 = 0;
do {
iVar1 = iVar1 + (uint)(*pcVar2 == '\n');
pcVar2 = pcVar2 + 1;
} while (pcVar2 != *(char **)(param_1 + 0x130));
}
return iVar1;
}
| |
37,463 | my_strtoll | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static long long my_strtoll(const char *str, size_t len, const char **end, int *err)
{
unsigned long long uval = 0;
const char *p = str;
const char *end_str = p + len;
int neg;
while (p < end_str && isspace(*p))
p++;
if (p == end_str)
{
*end = p;
*err = ERANGE;
return 0;
}
neg = *p == '-';
if (neg)
p++;
uval = my_strtoull(p, (end_str - p), &p, err);
*end = p;
if (*err)
return uval;
if (!neg)
{
/* Overflow of the long long range. */
if (uval > LONGLONG_MAX)
{
*end = p - 1;
uval = LONGLONG_MAX;
*err = ERANGE;
}
return uval;
}
if (uval == (unsigned long long) LONGLONG_MIN)
return LONGLONG_MIN;
if (uval > LONGLONG_MAX)
{
*end = p - 1;
uval = LONGLONG_MIN;
*err = ERANGE;
}
return -1LL * uval;
} | O0 | c | my_strtoll:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x45(%rbp)
jae 0x307c7
callq 0x13470
movq (%rax), %rax
movq -0x38(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0x307d0
jmp 0x307de
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x30794
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x3080a
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movl $0x22, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x30919
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0x30831
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rax
subq %rax, %rsi
movq -0x28(%rbp), %rcx
leaq -0x38(%rbp), %rdx
callq 0x2f730
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x30872
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x30919
cmpl $0x0, -0x44(%rbp)
jne 0x308b9
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x30(%rbp)
jbe 0x308af
movq -0x38(%rbp), %rcx
addq $-0x1, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movl $0x22, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x30919
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x30(%rbp)
jne 0x308d9
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, -0x8(%rbp)
jmp 0x30919
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x30(%rbp)
jbe 0x30910
movq -0x38(%rbp), %rcx
addq $-0x1, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movl $0x22, (%rax)
imulq $-0x1, -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strtoll:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], 0
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
loc_30794:
mov rcx, [rbp+var_38]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_45], al
jnb short loc_307C7
call ___ctype_b_loc
mov rax, [rax]
mov rcx, [rbp+var_38]
movsx ecx, byte ptr [rcx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 2000h
cmp eax, 0
setnz al
mov [rbp+var_45], al
loc_307C7:
mov al, [rbp+var_45]
test al, 1
jnz short loc_307D0
jmp short loc_307DE
loc_307D0:
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp short loc_30794
loc_307DE:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
jnz short loc_3080A
mov rcx, [rbp+var_38]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rax, [rbp+var_28]
mov dword ptr [rax], 22h ; '"'
mov [rbp+var_8], 0
jmp loc_30919
loc_3080A:
mov rax, [rbp+var_38]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
setz al
and al, 1
movzx eax, al
mov [rbp+var_44], eax
cmp [rbp+var_44], 0
jz short loc_30831
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
loc_30831:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_40]
mov rax, [rbp+var_38]
sub rsi, rax
mov rcx, [rbp+var_28]
lea rdx, [rbp+var_38]
call my_strtoull
mov [rbp+var_30], rax
mov rcx, [rbp+var_38]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rax, [rbp+var_28]
cmp dword ptr [rax], 0
jz short loc_30872
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
jmp loc_30919
loc_30872:
cmp [rbp+var_44], 0
jnz short loc_308B9
mov rax, 7FFFFFFFFFFFFFFFh
cmp [rbp+var_30], rax
jbe short loc_308AF
mov rcx, [rbp+var_38]
add rcx, 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_20]
mov [rax], rcx
mov rax, 7FFFFFFFFFFFFFFFh
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
mov dword ptr [rax], 22h ; '"'
loc_308AF:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
jmp short loc_30919
loc_308B9:
mov rax, 8000000000000000h
cmp [rbp+var_30], rax
jnz short loc_308D9
mov rax, 8000000000000000h
mov [rbp+var_8], rax
jmp short loc_30919
loc_308D9:
mov rax, 7FFFFFFFFFFFFFFFh
cmp [rbp+var_30], rax
jbe short loc_30910
mov rcx, [rbp+var_38]
add rcx, 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_20]
mov [rax], rcx
mov rax, 8000000000000000h
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
mov dword ptr [rax], 22h ; '"'
loc_30910:
imul rax, [rbp+var_30], -1
mov [rbp+var_8], rax
loc_30919:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| unsigned long long my_strtoll(char *a1, long long a2, _QWORD *a3, _DWORD *a4)
{
bool v5; // [rsp+Bh] [rbp-45h]
BOOL v6; // [rsp+Ch] [rbp-44h]
char *v7; // [rsp+10h] [rbp-40h]
char *v8; // [rsp+18h] [rbp-38h] BYREF
unsigned long long v9; // [rsp+20h] [rbp-30h]
_DWORD *v10; // [rsp+28h] [rbp-28h]
_QWORD *v11; // [rsp+30h] [rbp-20h]
long long v12; // [rsp+38h] [rbp-18h]
char *v13; // [rsp+40h] [rbp-10h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v9 = 0LL;
v8 = a1;
v7 = &a1[a2];
while ( 1 )
{
v5 = 0;
if ( v8 < v7 )
v5 = (*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * *v8) & 0x2000) != 0;
if ( !v5 )
break;
++v8;
}
if ( v8 == v7 )
{
*v11 = v8;
*v10 = 34;
return 0LL;
}
else
{
v6 = *v8 == 45;
if ( *v8 == 45 )
++v8;
v9 = my_strtoull(v8, v7 - v8, &v8, v10);
*v11 = v8;
if ( *v10 )
{
return v9;
}
else if ( v6 )
{
if ( v9 == 0x8000000000000000LL )
{
return 0x8000000000000000LL;
}
else
{
if ( v9 > 0x7FFFFFFFFFFFFFFFLL )
{
*v11 = v8 - 1;
v9 = 0x8000000000000000LL;
*v10 = 34;
}
return -(long long)v9;
}
}
else
{
if ( v9 > 0x7FFFFFFFFFFFFFFFLL )
{
*v11 = v8 - 1;
v9 = 0x7FFFFFFFFFFFFFFFLL;
*v10 = 34;
}
return v9;
}
}
}
| my_strtoll:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
LAB_00130794:
MOV RCX,qword ptr [RBP + -0x38]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x45],AL
JNC 0x001307c7
CALL 0x00113470
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x38]
MOVSX ECX,byte ptr [RCX]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x2000
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x45],AL
LAB_001307c7:
MOV AL,byte ptr [RBP + -0x45]
TEST AL,0x1
JNZ 0x001307d0
JMP 0x001307de
LAB_001307d0:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00130794
LAB_001307de:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JNZ 0x0013080a
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0x22
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00130919
LAB_0013080a:
MOV RAX,qword ptr [RBP + -0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x44],EAX
CMP dword ptr [RBP + -0x44],0x0
JZ 0x00130831
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
LAB_00130831:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
SUB RSI,RAX
MOV RCX,qword ptr [RBP + -0x28]
LEA RDX,[RBP + -0x38]
CALL 0x0012f730
MOV qword ptr [RBP + -0x30],RAX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX],0x0
JZ 0x00130872
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00130919
LAB_00130872:
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x001308b9
MOV RAX,0x7fffffffffffffff
CMP qword ptr [RBP + -0x30],RAX
JBE 0x001308af
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,-0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RAX,0x7fffffffffffffff
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0x22
LAB_001308af:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00130919
LAB_001308b9:
MOV RAX,-0x8000000000000000
CMP qword ptr [RBP + -0x30],RAX
JNZ 0x001308d9
MOV RAX,-0x8000000000000000
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00130919
LAB_001308d9:
MOV RAX,0x7fffffffffffffff
CMP qword ptr [RBP + -0x30],RAX
JBE 0x00130910
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,-0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RAX,-0x8000000000000000
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0x22
LAB_00130910:
IMUL RAX,qword ptr [RBP + -0x30],-0x1
MOV qword ptr [RBP + -0x8],RAX
LAB_00130919:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
ulong my_strtoll(char *param_1,long param_2,int8 *param_3,int *param_4)
{
char cVar1;
char *pcVar2;
ushort **ppuVar3;
bool bVar4;
char *local_40;
ulong local_38;
int *local_30;
int8 *local_28;
long local_20;
char *local_18;
ulong local_10;
local_38 = 0;
pcVar2 = param_1 + param_2;
local_40 = param_1;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
while( true ) {
bVar4 = false;
if (local_40 < pcVar2) {
ppuVar3 = __ctype_b_loc();
bVar4 = ((*ppuVar3)[(int)*local_40] & 0x2000) != 0;
}
if (!bVar4) break;
local_40 = local_40 + 1;
}
if (local_40 == pcVar2) {
*local_28 = local_40;
*local_30 = 0x22;
local_10 = 0;
}
else {
cVar1 = *local_40;
if (cVar1 == '-') {
local_40 = local_40 + 1;
}
local_38 = my_strtoull(local_40,(long)pcVar2 - (long)local_40,&local_40,local_30);
*local_28 = local_40;
local_10 = local_38;
if (*local_30 == 0) {
if (cVar1 == '-') {
if (local_38 == 0x8000000000000000) {
local_10 = 0x8000000000000000;
}
else {
if (0x7fffffffffffffff < local_38) {
*local_28 = local_40 + -1;
local_38 = 0x8000000000000000;
*local_30 = 0x22;
}
local_10 = -local_38;
}
}
else {
if (0x7fffffffffffffff < local_38) {
*local_28 = local_40 + -1;
local_38 = 0x7fffffffffffffff;
*local_30 = 0x22;
}
local_10 = local_38;
}
}
}
return local_10;
}
| |
37,464 | minja::Value::operator/(minja::Value const&) const | monkey531[P]llama/common/minja.hpp | Value operator/(const Value& rhs) const {
if (is_number_integer() && rhs.is_number_integer())
return get<int64_t>() / rhs.get<int64_t>();
else
return get<double>() / rhs.get<double>();
} | O2 | cpp | minja::Value::operator/(minja::Value const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movb 0x40(%rsi), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0x7133c
movb 0x40(%r14), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0x7133c
movq %rsi, %rdi
callq 0x639e0
movq %rax, %r15
movq %r14, %rdi
callq 0x639e0
movq %rax, %rcx
movq %r15, %rax
cqto
idivq %rcx
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x63a96
jmp 0x7136b
movq %rsi, %rdi
callq 0x63ab4
movsd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x63ab4
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
leaq 0x8(%rsp), %rsi
movsd %xmm1, (%rsi)
movq %rbx, %rdi
callq 0x63b6a
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| _ZNK5minja5ValuedvERKS0_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rdx
mov rbx, rdi
mov al, [rsi+40h]
add al, 0FBh
cmp al, 1
ja short loc_7133C
mov al, [r14+40h]
add al, 0FBh
cmp al, 1
ja short loc_7133C
mov rdi, rsi
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r15, rax
mov rdi, r14
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov rcx, rax
mov rax, r15
cqo
idiv rcx
lea rsi, [rsp+28h+var_20]; __int64 *
mov [rsi], rax
mov rdi, rbx; this
call _ZN5minja5ValueC2ERKl; minja::Value::Value(long const&)
jmp short loc_7136B
loc_7133C:
mov rdi, rsi
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd [rsp+28h+var_28], xmm0
mov rdi, r14
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd xmm1, [rsp+28h+var_28]
divsd xmm1, xmm0
lea rsi, [rsp+28h+var_20]; double *
movsd qword ptr [rsi], xmm1
mov rdi, rbx; this
call _ZN5minja5ValueC2ERKd; minja::Value::Value(double const&)
loc_7136B:
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| minja::Value * minja::Value::operator/(minja::Value *this, minja::Value *a2, minja::Value *a3, double a4)
{
long long v5; // r15
long long v7[4]; // [rsp+8h] [rbp-20h] BYREF
if ( (unsigned __int8)(*((_BYTE *)a2 + 64) - 5) > 1u || (unsigned __int8)(*((_BYTE *)a3 + 64) - 5) > 1u )
{
minja::Value::get<double>(a2);
minja::Value::get<double>(a3);
*(double *)v7 = a4 / a4;
minja::Value::Value(this, (const double *)v7);
}
else
{
v5 = minja::Value::get<long>(a2);
v7[0] = v5 / minja::Value::get<long>(a3);
minja::Value::Value(this, v7);
}
return this;
}
| operator/:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDX
MOV RBX,RDI
MOV AL,byte ptr [RSI + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x0017133c
MOV AL,byte ptr [R14 + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x0017133c
MOV RDI,RSI
CALL 0x001639e0
MOV R15,RAX
MOV RDI,R14
CALL 0x001639e0
MOV RCX,RAX
MOV RAX,R15
CQO
IDIV RCX
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
MOV RDI,RBX
CALL 0x00163a96
JMP 0x0017136b
LAB_0017133c:
MOV RDI,RSI
CALL 0x00163ab4
MOVSD qword ptr [RSP],XMM0
MOV RDI,R14
CALL 0x00163ab4
MOVSD XMM1,qword ptr [RSP]
DIVSD XMM1,XMM0
LEA RSI,[RSP + 0x8]
MOVSD qword ptr [RSI],XMM1
MOV RDI,RBX
CALL 0x00163b6a
LAB_0017136b:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
Value * __thiscall minja::Value::operator/(Value *this,Value *param_1)
{
long lVar1;
long lVar2;
Value *in_RDX;
double dVar3;
double local_20;
if (((byte)((char)param_1[0x40] - 5U) < 2) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) {
lVar1 = get<long>(param_1);
lVar2 = get<long>(in_RDX);
local_20 = (double)(lVar1 / lVar2);
Value(this,(long *)&local_20);
}
else {
dVar3 = get<double>(param_1);
local_20 = get<double>(in_RDX);
local_20 = dVar3 / local_20;
Value(this,&local_20);
}
return this;
}
| |
37,465 | my_uni_utf16le | eloqsql/strings/ctype-ucs2.c | static int
my_uni_utf16le(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
uint32 first, second, total;
if (wc < MY_UTF16_SURROGATE_HIGH_FIRST ||
(wc > MY_UTF16_SURROGATE_LOW_LAST &&
wc <= 0xFFFF))
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
int2store(s, wc);
return 2; /* [0000-D7FF,E000-FFFF] */
}
if (wc < 0xFFFF || wc > 0x10FFFF)
return MY_CS_ILUNI; /* [D800-DFFF,10FFFF+] */
if (s + 4 > e)
return MY_CS_TOOSMALL4;
wc-= 0x10000;
first= (0xD800 | ((wc >> 10) & 0x3FF));
second= (0xDC00 | (wc & 0x3FF));
total= first | (second << 16);
int4store(s, total);
return 4; /* [010000-10FFFF] */
} | O0 | c | my_uni_utf16le:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0xd800, -0x18(%rbp) # imm = 0xD800
jb 0xadd42
cmpq $0xdfff, -0x18(%rbp) # imm = 0xDFFF
jbe 0xadd80
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
ja 0xadd80
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0xadd5c
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0xade12
jmp 0xadd5e
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movw %ax, %cx
movq -0x40(%rbp), %rax
movw %cx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0xade12
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jb 0xadd94
cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF
jbe 0xadd9d
movl $0x0, -0x4(%rbp)
jmp 0xade12
movq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x28(%rbp), %rax
jbe 0xaddb4
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0xade12
movq -0x18(%rbp), %rax
subq $0x10000, %rax # imm = 0x10000
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
shrq $0xa, %rax
andq $0x3ff, %rax # imm = 0x3FF
orq $0xd800, %rax # imm = 0xD800
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
andq $0x3ff, %rax # imm = 0x3FF
orq $0xdc00, %rax # imm = 0xDC00
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
movl -0x30(%rbp), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x34(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, (%rax)
movl $0x4, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| my_uni_utf16le:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
cmp [rbp+var_18], 0D800h
jb short loc_ADD42
cmp [rbp+var_18], 0DFFFh
jbe short loc_ADD80
cmp [rbp+var_18], 0FFFFh
ja short loc_ADD80
loc_ADD42:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_ADD5C
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_ADE12
loc_ADD5C:
jmp short $+2
loc_ADD5E:
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov cx, ax
mov rax, [rbp+var_40]
mov [rax], cx
mov [rbp+var_4], 2
jmp loc_ADE12
loc_ADD80:
cmp [rbp+var_18], 0FFFFh
jb short loc_ADD94
cmp [rbp+var_18], offset unk_10FFFF
jbe short loc_ADD9D
loc_ADD94:
mov [rbp+var_4], 0
jmp short loc_ADE12
loc_ADD9D:
mov rax, [rbp+var_20]
add rax, 4
cmp rax, [rbp+var_28]
jbe short loc_ADDB4
mov [rbp+var_4], 0FFFFFF98h
jmp short loc_ADE12
loc_ADDB4:
mov rax, [rbp+var_18]
sub rax, 10000h
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
shr rax, 0Ah
and rax, 3FFh
or rax, 0D800h
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
and rax, 3FFh
or rax, 0DC00h
mov [rbp+var_30], eax
mov eax, [rbp+var_2C]
mov ecx, [rbp+var_30]
shl ecx, 10h
or eax, ecx
mov [rbp+var_34], eax
mov rax, [rbp+var_20]
mov [rbp+var_48], rax
mov ecx, [rbp+var_34]
mov rax, [rbp+var_48]
mov [rax], ecx
mov [rbp+var_4], 4
loc_ADE12:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_uni_utf16le(long long a1, unsigned long long a2, _DWORD *a3, unsigned long long a4)
{
if ( a2 >= 0xD800 && (a2 <= 0xDFFF || a2 > 0xFFFF) )
{
if ( a2 >= 0xFFFF && a2 <= (unsigned long long)&unk_10FFFF )
{
if ( (unsigned long long)(a3 + 1) <= a4 )
{
*a3 = ((a2 & 0x3FF | 0xDC00) << 16) | ((a2 - 0x10000) >> 10) & 0x3FF | 0xD800;
return 4;
}
else
{
return (unsigned int)-104;
}
}
else
{
return 0;
}
}
else if ( (unsigned long long)a3 + 2 <= a4 )
{
*(_WORD *)a3 = a2;
return 2;
}
else
{
return (unsigned int)-102;
}
}
| my_uni_utf16le:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
CMP qword ptr [RBP + -0x18],0xd800
JC 0x001add42
CMP qword ptr [RBP + -0x18],0xdfff
JBE 0x001add80
CMP qword ptr [RBP + -0x18],0xffff
JA 0x001add80
LAB_001add42:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001add5c
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001ade12
LAB_001add5c:
JMP 0x001add5e
LAB_001add5e:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x40]
MOV word ptr [RAX],CX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001ade12
LAB_001add80:
CMP qword ptr [RBP + -0x18],0xffff
JC 0x001add94
CMP qword ptr [RBP + -0x18],0x10ffff
JBE 0x001add9d
LAB_001add94:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001ade12
LAB_001add9d:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001addb4
MOV dword ptr [RBP + -0x4],0xffffff98
JMP 0x001ade12
LAB_001addb4:
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x10000
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0xa
AND RAX,0x3ff
OR RAX,0xd800
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3ff
OR RAX,0xdc00
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,dword ptr [RBP + -0x30]
SHL ECX,0x10
OR EAX,ECX
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x48],RAX
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x4],0x4
LAB_001ade12:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_uni_utf16le(int8 param_1,ulong param_2,uint *param_3,uint *param_4)
{
int4 local_c;
if ((param_2 < 0xd800) || ((0xdfff < param_2 && (param_2 < 0x10000)))) {
if (param_4 < (uint *)((long)param_3 + 2)) {
local_c = 0xffffff9a;
}
else {
*(short *)param_3 = (short)param_2;
local_c = 2;
}
}
else if ((param_2 < 0xffff) || (0x10ffff < param_2)) {
local_c = 0;
}
else if (param_4 < param_3 + 1) {
local_c = 0xffffff98;
}
else {
*param_3 = (uint)(param_2 - 0x10000 >> 10) & 0x3ff | 0xd800 |
((uint)(param_2 - 0x10000) & 0x3ff | 0xdc00) << 0x10;
local_c = 4;
}
return local_c;
}
| |
37,466 | ftxui::text(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>) | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/text.cpp | Element text(std::wstring text) { // NOLINT
return std::make_shared<Text>(to_string(text));
} | O2 | cpp | ftxui::text(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>):
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x318ca
movq %rsp, %rdi
movq %r14, %rsi
callq 0x1ffbf
leaq 0x8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x13452
leaq 0x18(%rsp), %rdi
callq 0xc8c8
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xc8c8
movq %rbx, %rdi
callq 0xc7f0
| _ZN5ftxui4textENSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE:
push r14
push rbx
sub rsp, 38h
mov rbx, rdi
lea r14, [rsp+48h+var_30]
mov rdi, r14
call _ZN5ftxui9to_stringERKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; ftxui::to_string(std::wstring const&)
mov rdi, rsp
mov rsi, r14
call _ZSt11make_sharedIN5ftxui12_GLOBAL__N_14TextEJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt10shared_ptrIT_EDpOT0_; std::make_shared<ftxui::`anonymous namespace'::Text,std::string>(std::string &&)
lea rdi, [rsp+48h+var_40]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+48h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 38h
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+arg_10]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| _OWORD * ftxui::text(_OWORD *a1)
{
__int128 v1; // xmm0
__int128 v3; // [rsp+0h] [rbp-48h] BYREF
_BYTE v4[48]; // [rsp+18h] [rbp-30h] BYREF
ftxui::to_string(v4);
std::make_shared<ftxui::`anonymous namespace'::Text,std::string>(&v3, (long long)v4);
v1 = v3;
*((_QWORD *)&v3 + 1) = 0LL;
*a1 = v1;
*(_QWORD *)&v3 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v3 + 1);
std::string::~string(v4);
return a1;
}
| text:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
LEA R14,[RSP + 0x18]
MOV RDI,R14
CALL 0x001318ca
LAB_001200d6:
MOV RDI,RSP
MOV RSI,R14
CALL 0x0011ffbf
LAB_001200e1:
LEA RDI,[RSP + 0x8]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x00113452
LEA RDI,[RSP + 0x18]
CALL 0x0010c8c8
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* ftxui::text(std::__cxx11::wstring) */
ftxui * __thiscall ftxui::text(ftxui *this,wstring *param_2)
{
int8 uVar1;
int8 local_48;
int8 auStack_40 [2];
ftxui local_30 [32];
to_string(local_30,param_2);
/* try { // try from 001200d6 to 001200e0 has its CatchHandler @ 00120110 */
std::make_shared<ftxui::(anonymous_namespace)::Text,std::__cxx11::string>((string *)&local_48);
uVar1 = auStack_40[0];
auStack_40[0] = 0;
*(int8 *)this = local_48;
*(int8 *)(this + 8) = uVar1;
local_48 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_40);
std::__cxx11::string::~string((string *)local_30);
return this;
}
| |
37,467 | js_malloc | bluesky950520[P]quickjs/quickjs.c | void *js_malloc(JSContext *ctx, size_t size)
{
void *ptr;
ptr = js_malloc_rt(ctx->rt, size);
if (unlikely(!ptr)) {
JS_ThrowOutOfMemory(ctx);
return NULL;
}
return ptr;
} | O2 | c | js_malloc:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
callq 0x1ac29
movq %rax, %r14
testq %rax, %rax
je 0x1ade7
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x1ad90
jmp 0x1addc
| js_malloc:
push r14
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+18h]
call js_malloc_rt
mov r14, rax
test rax, rax
jz short loc_1ADE7
loc_1ADDC:
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
loc_1ADE7:
mov rdi, rbx
call JS_ThrowOutOfMemory
jmp short loc_1ADDC
| long long js_malloc(long long a1, long long a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
long long v6; // r14
v6 = js_malloc_rt(*(_QWORD *)(a1 + 24), a2);
if ( !v6 )
JS_ThrowOutOfMemory(a1, a2, v2, v3, v4, v5);
return v6;
}
| js_malloc:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x18]
CALL 0x0011ac29
MOV R14,RAX
TEST RAX,RAX
JZ 0x0011ade7
LAB_0011addc:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0011ade7:
MOV RDI,RBX
CALL 0x0011ad90
JMP 0x0011addc
|
long js_malloc(long param_1)
{
long lVar1;
lVar1 = js_malloc_rt(*(int8 *)(param_1 + 0x18));
if (lVar1 == 0) {
JS_ThrowOutOfMemory(param_1);
}
return lVar1;
}
| |
37,468 | new_label_fd | bluesky950520[P]quickjs/quickjs.c | static int new_label_fd(JSFunctionDef *fd, int label)
{
LabelSlot *ls;
if (label < 0) {
if (js_resize_array(fd->ctx, (void *)&fd->label_slots,
sizeof(fd->label_slots[0]),
&fd->label_size, fd->label_count + 1))
return -1;
label = fd->label_count++;
ls = &fd->label_slots[label];
ls->ref_count = 0;
ls->pos = -1;
ls->pos2 = -1;
ls->addr = -1;
ls->first_reloc = NULL;
}
return label;
} | O1 | c | new_label_fd:
movl %esi, %eax
testl %esi, %esi
js 0x6bbac
retq
pushq %rbx
movq %rdi, %rbx
movl 0x17c(%rdi), %r8d
cmpl %r8d, 0x178(%rdi)
jle 0x6bbf1
movslq 0x17c(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x17c(%rbx)
movq 0x170(%rbx), %rcx
leaq (%rax,%rax,2), %rdx
movaps 0x3152e(%rip), %xmm0 # 0x9d110
movups %xmm0, (%rcx,%rdx,8)
movq $0x0, 0x10(%rcx,%rdx,8)
popq %rbx
retq
leaq 0x170(%rbx), %rsi
leaq 0x178(%rbx), %rcx
incl %r8d
movq (%rbx), %rdi
movl $0x18, %edx
callq 0x428db
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x6bbef
jmp 0x6bbc0
| new_label_fd:
mov eax, esi
test esi, esi
js short loc_6BBAC
retn
loc_6BBAC:
push rbx
mov rbx, rdi
mov r8d, [rdi+17Ch]
cmp [rdi+178h], r8d
jle short loc_6BBF1
loc_6BBC0:
movsxd rax, dword ptr [rbx+17Ch]
lea ecx, [rax+1]
mov [rbx+17Ch], ecx
mov rcx, [rbx+170h]
lea rdx, [rax+rax*2]
movaps xmm0, cs:xmmword_9D110
movups xmmword ptr [rcx+rdx*8], xmm0
mov qword ptr [rcx+rdx*8+10h], 0
loc_6BBEF:
pop rbx
retn
loc_6BBF1:
lea rsi, [rbx+170h]
lea rcx, [rbx+178h]
inc r8d
mov rdi, [rbx]
mov edx, 18h
call js_realloc_array
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_6BBEF
jmp short loc_6BBC0
| long long new_label_fd(long long a1, int a2)
{
long long result; // rax
int v3; // r8d
long long v4; // rcx
long long v5; // rdx
int v6; // ecx
result = (unsigned int)a2;
if ( a2 < 0 )
{
v3 = *(_DWORD *)(a1 + 380);
if ( *(_DWORD *)(a1 + 376) > v3
|| (v6 = js_realloc_array(*(_QWORD *)a1, (long long *)(a1 + 368), 0x18u, (_DWORD *)(a1 + 376), v3 + 1),
result = 0xFFFFFFFFLL,
!v6) )
{
result = *(int *)(a1 + 380);
*(_DWORD *)(a1 + 380) = result + 1;
v4 = *(_QWORD *)(a1 + 368);
v5 = 3 * result;
*(_OWORD *)(v4 + 8 * v5) = xmmword_9D110;
*(_QWORD *)(v4 + 8 * v5 + 16) = 0LL;
}
}
return result;
}
| new_label_fd:
MOV EAX,ESI
TEST ESI,ESI
JS 0x0016bbac
RET
LAB_0016bbac:
PUSH RBX
MOV RBX,RDI
MOV R8D,dword ptr [RDI + 0x17c]
CMP dword ptr [RDI + 0x178],R8D
JLE 0x0016bbf1
LAB_0016bbc0:
MOVSXD RAX,dword ptr [RBX + 0x17c]
LEA ECX,[RAX + 0x1]
MOV dword ptr [RBX + 0x17c],ECX
MOV RCX,qword ptr [RBX + 0x170]
LEA RDX,[RAX + RAX*0x2]
MOVAPS XMM0,xmmword ptr [0x0019d110]
MOVUPS xmmword ptr [RCX + RDX*0x8],XMM0
MOV qword ptr [RCX + RDX*0x8 + 0x10],0x0
LAB_0016bbef:
POP RBX
RET
LAB_0016bbf1:
LEA RSI,[RBX + 0x170]
LEA RCX,[RBX + 0x178]
INC R8D
MOV RDI,qword ptr [RBX]
MOV EDX,0x18
CALL 0x001428db
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0016bbef
JMP 0x0016bbc0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong new_label_fd(int8 *param_1,uint param_2)
{
int8 *puVar1;
long lVar2;
int8 uVar3;
int iVar4;
ulong uVar5;
if (-1 < (int)param_2) {
return (ulong)param_2;
}
if ((*(int *)(param_1 + 0x2f) <= *(int *)((long)param_1 + 0x17c)) &&
(iVar4 = js_realloc_array(*param_1,param_1 + 0x2e,0x18,param_1 + 0x2f,
*(int *)((long)param_1 + 0x17c) + 1), iVar4 != 0)) {
return 0xffffffff;
}
uVar5 = (ulong)*(int *)((long)param_1 + 0x17c);
*(int *)((long)param_1 + 0x17c) = *(int *)((long)param_1 + 0x17c) + 1;
uVar3 = _UNK_0019d118;
lVar2 = param_1[0x2e];
puVar1 = (int8 *)(lVar2 + uVar5 * 0x18);
*puVar1 = _DAT_0019d110;
puVar1[1] = uVar3;
*(int8 *)(lVar2 + 0x10 + uVar5 * 0x18) = 0;
return uVar5;
}
| |
37,469 | new_label_fd | bluesky950520[P]quickjs/quickjs.c | static int new_label_fd(JSFunctionDef *fd, int label)
{
LabelSlot *ls;
if (label < 0) {
if (js_resize_array(fd->ctx, (void *)&fd->label_slots,
sizeof(fd->label_slots[0]),
&fd->label_size, fd->label_count + 1))
return -1;
label = fd->label_count++;
ls = &fd->label_slots[label];
ls->ref_count = 0;
ls->pos = -1;
ls->pos2 = -1;
ls->addr = -1;
ls->first_reloc = NULL;
}
return label;
} | O2 | c | new_label_fd:
movl %esi, %eax
testl %esi, %esi
js 0x5ad07
retq
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0x170(%rbx), %rsi
leaq 0x178(%rbx), %rcx
movl 0x17c(%rbx), %r8d
incl %r8d
pushq $0x18
popq %rdx
callq 0x3a573
testl %eax, %eax
je 0x5ad37
pushq $-0x1
popq %rax
jmp 0x5ad63
movslq 0x17c(%rbx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x17c(%rbx)
movq 0x170(%rbx), %rcx
imulq $0x18, %rax, %rdx
movaps 0x29327(%rip), %xmm0 # 0x84080
movups %xmm0, (%rcx,%rdx)
andq $0x0, 0x10(%rcx,%rdx)
popq %rbx
retq
| new_label_fd:
mov eax, esi
test esi, esi
js short loc_5AD07
retn
loc_5AD07:
push rbx
mov rbx, rdi
mov rdi, [rdi]
lea rsi, [rbx+170h]
lea rcx, [rbx+178h]
mov r8d, [rbx+17Ch]
inc r8d
push 18h
pop rdx
call js_resize_array
test eax, eax
jz short loc_5AD37
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp short loc_5AD63
loc_5AD37:
movsxd rax, dword ptr [rbx+17Ch]
lea ecx, [rax+1]
mov [rbx+17Ch], ecx
mov rcx, [rbx+170h]
imul rdx, rax, 18h
movaps xmm0, cs:xmmword_84080
movups xmmword ptr [rcx+rdx], xmm0
and qword ptr [rcx+rdx+10h], 0
loc_5AD63:
pop rbx
retn
| long long new_label_fd(long long a1, int a2)
{
long long result; // rax
long long v3; // rcx
long long v4; // rdx
result = (unsigned int)a2;
if ( a2 < 0 )
{
if ( (unsigned int)js_resize_array(*(_QWORD *)a1, a1 + 368, 24LL, (_DWORD *)(a1 + 376), *(_DWORD *)(a1 + 380) + 1) )
{
return -1LL;
}
else
{
result = *(int *)(a1 + 380);
*(_DWORD *)(a1 + 380) = result + 1;
v3 = *(_QWORD *)(a1 + 368);
v4 = 24 * result;
*(_OWORD *)(v3 + v4) = xmmword_84080;
*(_QWORD *)(v3 + v4 + 16) = 0LL;
}
}
return result;
}
| new_label_fd:
MOV EAX,ESI
TEST ESI,ESI
JS 0x0015ad07
RET
LAB_0015ad07:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
LEA RSI,[RBX + 0x170]
LEA RCX,[RBX + 0x178]
MOV R8D,dword ptr [RBX + 0x17c]
INC R8D
PUSH 0x18
POP RDX
CALL 0x0013a573
TEST EAX,EAX
JZ 0x0015ad37
PUSH -0x1
POP RAX
JMP 0x0015ad63
LAB_0015ad37:
MOVSXD RAX,dword ptr [RBX + 0x17c]
LEA ECX,[RAX + 0x1]
MOV dword ptr [RBX + 0x17c],ECX
MOV RCX,qword ptr [RBX + 0x170]
IMUL RDX,RAX,0x18
MOVAPS XMM0,xmmword ptr [0x00184080]
MOVUPS xmmword ptr [RCX + RDX*0x1],XMM0
AND qword ptr [RCX + RDX*0x1 + 0x10],0x0
LAB_0015ad63:
POP RBX
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong new_label_fd(int8 *param_1,uint param_2)
{
int8 *puVar1;
long lVar2;
int8 uVar3;
int iVar4;
ulong uVar5;
if (-1 < (int)param_2) {
return (ulong)param_2;
}
iVar4 = js_resize_array(*param_1,param_1 + 0x2e,0x18,param_1 + 0x2f,
*(int *)((long)param_1 + 0x17c) + 1);
if (iVar4 == 0) {
uVar5 = (ulong)*(int *)((long)param_1 + 0x17c);
*(int *)((long)param_1 + 0x17c) = *(int *)((long)param_1 + 0x17c) + 1;
uVar3 = _UNK_00184088;
lVar2 = param_1[0x2e];
puVar1 = (int8 *)(lVar2 + uVar5 * 0x18);
*puVar1 = _DAT_00184080;
puVar1[1] = uVar3;
*(int8 *)(lVar2 + 0x10 + uVar5 * 0x18) = 0;
}
else {
uVar5 = 0xffffffffffffffff;
}
return uVar5;
}
| |
37,470 | mi_reset | eloqsql/storage/myisam/mi_extra.c | int mi_reset(MI_INFO *info)
{
int error= 0;
MYISAM_SHARE *share=info->s;
DBUG_ENTER("mi_reset");
/*
Free buffers and reset the following flags:
EXTRA_CACHE, EXTRA_WRITE_CACHE, EXTRA_KEYREAD, EXTRA_QUICK
If the row buffer cache is large (for dynamic tables), reduce it
to save memory.
*/
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
{
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
error= end_io_cache(&info->rec_cache);
}
if (share->base.blobs)
mi_alloc_rec_buff(info, -1, &info->rec_buff);
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
if (info->opt_flag & MEMMAP_USED)
madvise((char*) share->file_map, share->state.state.data_file_length,
MADV_RANDOM);
#endif
info->opt_flag&= ~(KEY_READ_USED | REMEMBER_OLD_POS);
info->quick_mode=0;
info->lastinx= 0; /* Use first index as def */
info->last_search_keypage= info->lastpos= HA_OFFSET_ERROR;
info->page_changed= 1;
info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND |
HA_STATE_PREV_FOUND);
DBUG_RETURN(error);
} | O0 | c | mi_reset:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c8(%rax), %eax
andl $0x12, %eax
cmpl $0x0, %eax
je 0x39526
movq -0x8(%rbp), %rax
movl 0x1c8(%rax), %ecx
andl $-0x13, %ecx
movl %ecx, 0x1c8(%rax)
movq -0x8(%rbp), %rdi
addq $0x220, %rdi # imm = 0x220
callq 0x739d0
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x188(%rax)
je 0x3954e
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x120, %rdx # imm = 0x120
movq $-0x1, %rsi
callq 0x42430
movq -0x8(%rbp), %rax
movl 0x1c8(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x3957d
movq -0x18(%rbp), %rax
movq 0x270(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
movl $0x1, %edx
callq 0x28450
movq -0x8(%rbp), %rax
movl 0x1c8(%rax), %ecx
andl $-0x49, %ecx
movl %ecx, 0x1c8(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x33b(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1d4(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x170(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x198(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x33c(%rax)
movq -0x8(%rbp), %rax
movl 0x1d0(%rax), %ecx
andl $0x1, %ecx
orl $0x10, %ecx
orl $0x20, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x1d0(%rax)
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| mi_reset:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov eax, [rax+1C8h]
and eax, 12h
cmp eax, 0
jz short loc_39526
mov rax, [rbp+var_8]
mov ecx, [rax+1C8h]
and ecx, 0FFFFFFEDh
mov [rax+1C8h], ecx
mov rdi, [rbp+var_8]
add rdi, 220h
call end_io_cache
mov [rbp+var_C], eax
loc_39526:
mov rax, [rbp+var_18]
cmp dword ptr [rax+188h], 0
jz short loc_3954E
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_8]
add rdx, 120h
mov rsi, 0FFFFFFFFFFFFFFFFh
call mi_alloc_rec_buff
loc_3954E:
mov rax, [rbp+var_8]
mov eax, [rax+1C8h]
and eax, 20h
cmp eax, 0
jz short loc_3957D
mov rax, [rbp+var_18]
mov rdi, [rax+270h]
mov rax, [rbp+var_18]
mov rsi, [rax+40h]
mov edx, 1
call _madvise
loc_3957D:
mov rax, [rbp+var_8]
mov ecx, [rax+1C8h]
and ecx, 0FFFFFFB7h
mov [rax+1C8h], ecx
mov rax, [rbp+var_8]
mov byte ptr [rax+33Bh], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+1D4h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_8]
mov qword ptr [rax+198h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_8]
mov byte ptr [rax+33Ch], 1
mov rax, [rbp+var_8]
mov ecx, [rax+1D0h]
and ecx, 1
or ecx, 10h
or ecx, 20h
mov rax, [rbp+var_8]
mov [rax+1D0h], ecx
mov eax, [rbp+var_C]
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
add rsp, 20h
pop rbp
retn
| long long mi_reset(long long *a1)
{
long long v2; // [rsp+8h] [rbp-18h]
unsigned int v3; // [rsp+14h] [rbp-Ch]
v3 = 0;
v2 = *a1;
if ( (a1[57] & 0x12) != 0 )
{
*((_DWORD *)a1 + 114) &= 0xFFFFFFED;
v3 = end_io_cache(a1 + 68);
}
if ( *(_DWORD *)(v2 + 392) )
mi_alloc_rec_buff(a1, -1LL, a1 + 36);
if ( (a1[57] & 0x20) != 0 )
madvise(*(_QWORD *)(v2 + 624), *(_QWORD *)(v2 + 64), 1LL);
*((_DWORD *)a1 + 114) &= 0xFFFFFFB7;
*((_BYTE *)a1 + 827) = 0;
*((_DWORD *)a1 + 117) = 0;
a1[46] = -1LL;
a1[51] = -1LL;
*((_BYTE *)a1 + 828) = 1;
*((_DWORD *)a1 + 116) = a1[58] & 1 | 0x30;
return v3;
}
| mi_reset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c8]
AND EAX,0x12
CMP EAX,0x0
JZ 0x00139526
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x1c8]
AND ECX,0xffffffed
MOV dword ptr [RAX + 0x1c8],ECX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x220
CALL 0x001739d0
MOV dword ptr [RBP + -0xc],EAX
LAB_00139526:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x188],0x0
JZ 0x0013954e
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0x120
MOV RSI,-0x1
CALL 0x00142430
LAB_0013954e:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c8]
AND EAX,0x20
CMP EAX,0x0
JZ 0x0013957d
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x270]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1
CALL 0x00128450
LAB_0013957d:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x1c8]
AND ECX,0xffffffb7
MOV dword ptr [RAX + 0x1c8],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x33b],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x1d4],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x170],-0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x198],-0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x33c],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x1d0]
AND ECX,0x1
OR ECX,0x10
OR ECX,0x20
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x1d0],ECX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x20
POP RBP
RET
|
int4 mi_reset(long *param_1)
{
long lVar1;
int4 local_14;
local_14 = 0;
lVar1 = *param_1;
if ((*(uint *)(param_1 + 0x39) & 0x12) != 0) {
*(uint *)(param_1 + 0x39) = *(uint *)(param_1 + 0x39) & 0xffffffed;
local_14 = end_io_cache(param_1 + 0x44);
}
if (*(int *)(lVar1 + 0x188) != 0) {
mi_alloc_rec_buff(param_1,0xffffffffffffffff,param_1 + 0x24);
}
if ((*(uint *)(param_1 + 0x39) & 0x20) != 0) {
madvise(*(void **)(lVar1 + 0x270),*(size_t *)(lVar1 + 0x40),1);
}
*(uint *)(param_1 + 0x39) = *(uint *)(param_1 + 0x39) & 0xffffffb7;
*(int1 *)((long)param_1 + 0x33b) = 0;
*(int4 *)((long)param_1 + 0x1d4) = 0;
param_1[0x2e] = -1;
param_1[0x33] = -1;
*(int1 *)((long)param_1 + 0x33c) = 1;
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 1 | 0x30;
return local_14;
}
| |
37,471 | my_strxfrm_desc_and_reverse | eloqsql/strings/ctype-simple.c | void
my_strxfrm_desc_and_reverse(uchar *str, uchar *strend,
uint flags, uint level)
{
if (flags & (MY_STRXFRM_DESC_LEVEL1 << level))
{
if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level))
{
for (strend--; str <= strend;)
{
uchar tmp= *str;
*str++= ~*strend;
*strend--= ~tmp;
}
}
else
{
for (; str < strend; str++)
*str= ~*str;
}
}
else if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level))
{
for (strend--; str < strend;)
{
uchar tmp= *str;
*str++= *strend;
*strend--= tmp;
}
}
} | O0 | c | my_strxfrm_desc_and_reverse:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
movl $0x100, %edx # imm = 0x100
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x5135c
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
movl $0x10000, %edx # imm = 0x10000
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x5132c
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x10(%rbp), %rax
ja 0x5132a
movq -0x8(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
xorl $-0x1, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movzbl -0x19(%rbp), %eax
xorl $-0x1, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x512de
jmp 0x5135a
jmp 0x5132e
movq -0x8(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x51358
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
xorl $-0x1, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x5132e
jmp 0x5135a
jmp 0x513c2
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
movl $0x10000, %edx # imm = 0x10000
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x513c0
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x513be
movq -0x8(%rbp), %rax
movb (%rax), %al
movb %al, -0x1a(%rbp)
movq -0x10(%rbp), %rax
movb (%rax), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movb -0x1a(%rbp), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x5137e
jmp 0x513c0
jmp 0x513c2
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strxfrm_desc_and_reverse:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
mov eax, [rbp+var_14]
mov ecx, [rbp+var_18]
mov edx, 100h
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jz loc_5135C
mov eax, [rbp+var_14]
mov ecx, [rbp+var_18]
mov edx, 10000h
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jz short loc_5132C
mov rax, [rbp+var_10]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rax
loc_512DE:
mov rax, [rbp+var_8]
cmp rax, [rbp+var_10]
ja short loc_5132A
mov rax, [rbp+var_8]
mov al, [rax]
mov [rbp+var_19], al
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
xor eax, 0FFFFFFFFh
mov cl, al
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
movzx eax, [rbp+var_19]
xor eax, 0FFFFFFFFh
mov cl, al
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_512DE
loc_5132A:
jmp short loc_5135A
loc_5132C:
jmp short $+2
loc_5132E:
mov rax, [rbp+var_8]
cmp rax, [rbp+var_10]
jnb short loc_51358
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax]
xor eax, 0FFFFFFFFh
mov cl, al
mov rax, [rbp+var_8]
mov [rax], cl
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
jmp short loc_5132E
loc_51358:
jmp short $+2
loc_5135A:
jmp short loc_513C2
loc_5135C:
mov eax, [rbp+var_14]
mov ecx, [rbp+var_18]
mov edx, 10000h
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jz short loc_513C0
mov rax, [rbp+var_10]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rax
loc_5137E:
mov rax, [rbp+var_8]
cmp rax, [rbp+var_10]
jnb short loc_513BE
mov rax, [rbp+var_8]
mov al, [rax]
mov [rbp+var_1A], al
mov rax, [rbp+var_10]
mov cl, [rax]
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov cl, [rbp+var_1A]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_5137E
loc_513BE:
jmp short $+2
loc_513C0:
jmp short $+2
loc_513C2:
pop rbp
retn
| _BYTE * my_strxfrm_desc_and_reverse(_BYTE *a1, unsigned long long a2, unsigned int a3, char a4)
{
_BYTE *result; // rax
_BYTE *v5; // rax
_BYTE *v6; // rax
_BYTE *v7; // rax
_BYTE *v8; // rax
char v9; // [rsp+0h] [rbp-1Ah]
char v10; // [rsp+1h] [rbp-19h]
_BYTE *i; // [rsp+Ah] [rbp-10h]
_BYTE *j; // [rsp+Ah] [rbp-10h]
if ( ((256 << a4) & a3) != 0 )
{
if ( ((0x10000 << a4) & a3) != 0 )
{
for ( i = (_BYTE *)(a2 - 1); ; --i )
{
result = a1;
if ( a1 > i )
break;
v10 = *a1;
v5 = a1++;
*v5 = ~*i;
v6 = i;
*v6 = ~v10;
}
}
else
{
while ( 1 )
{
result = a1;
if ( (unsigned long long)a1 >= a2 )
break;
*a1 = ~*a1;
++a1;
}
}
}
else
{
result = (_BYTE *)((0x10000 << a4) & a3);
if ( (_DWORD)result )
{
for ( j = (_BYTE *)(a2 - 1); ; --j )
{
result = a1;
if ( a1 >= j )
break;
v9 = *a1;
v7 = a1++;
*v7 = *j;
v8 = j;
*v8 = v9;
}
}
}
return result;
}
| my_strxfrm_desc_and_reverse:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],ECX
MOV EAX,dword ptr [RBP + -0x14]
MOV ECX,dword ptr [RBP + -0x18]
MOV EDX,0x100
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JZ 0x0015135c
MOV EAX,dword ptr [RBP + -0x14]
MOV ECX,dword ptr [RBP + -0x18]
MOV EDX,0x10000
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JZ 0x0015132c
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x10],RAX
LAB_001512de:
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x10]
JA 0x0015132a
MOV RAX,qword ptr [RBP + -0x8]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x19],AL
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
XOR EAX,0xffffffff
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
MOVZX EAX,byte ptr [RBP + -0x19]
XOR EAX,0xffffffff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x001512de
LAB_0015132a:
JMP 0x0015135a
LAB_0015132c:
JMP 0x0015132e
LAB_0015132e:
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x10]
JNC 0x00151358
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX]
XOR EAX,0xffffffff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015132e
LAB_00151358:
JMP 0x0015135a
LAB_0015135a:
JMP 0x001513c2
LAB_0015135c:
MOV EAX,dword ptr [RBP + -0x14]
MOV ECX,dword ptr [RBP + -0x18]
MOV EDX,0x10000
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JZ 0x001513c0
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x10],RAX
LAB_0015137e:
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x10]
JNC 0x001513be
MOV RAX,qword ptr [RBP + -0x8]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x1a],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV CL,byte ptr [RBP + -0x1a]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x0015137e
LAB_001513be:
JMP 0x001513c0
LAB_001513c0:
JMP 0x001513c2
LAB_001513c2:
POP RBP
RET
|
void my_strxfrm_desc_and_reverse(byte *param_1,byte *param_2,uint param_3,byte param_4)
{
byte bVar1;
byte *local_18;
byte *local_10;
if ((param_3 & 0x100 << (param_4 & 0x1f)) == 0) {
if ((param_3 & 0x10000 << (param_4 & 0x1f)) != 0) {
local_18 = param_2 + -1;
local_10 = param_1;
while (local_10 < local_18) {
bVar1 = *local_10;
*local_10 = *local_18;
*local_18 = bVar1;
local_18 = local_18 + -1;
local_10 = local_10 + 1;
}
}
}
else {
local_10 = param_1;
if ((param_3 & 0x10000 << (param_4 & 0x1f)) == 0) {
for (; local_10 < param_2; local_10 = local_10 + 1) {
*local_10 = *local_10 ^ 0xff;
}
}
else {
local_18 = param_2 + -1;
local_10 = param_1;
while (local_10 <= local_18) {
bVar1 = *local_10;
*local_10 = *local_18 ^ 0xff;
*local_18 = bVar1 ^ 0xff;
local_18 = local_18 + -1;
local_10 = local_10 + 1;
}
}
}
return;
}
| |
37,472 | ma_update_state_lsns | eloqsql/storage/maria/ma_create.c | int _ma_update_state_lsns(MARIA_SHARE *share, LSN lsn, TrID create_trid,
my_bool do_sync, my_bool update_create_rename_lsn)
{
int res;
DBUG_ENTER("_ma_update_state_lsns");
mysql_mutex_lock(&share->intern_lock);
res= _ma_update_state_lsns_sub(share, lsn, create_trid, do_sync,
update_create_rename_lsn);
mysql_mutex_unlock(&share->intern_lock);
DBUG_RETURN(res);
} | O3 | c | ma_update_state_lsns:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r12d
movl %ecx, %r15d
movq %rdx, -0x30(%rbp)
movq %rsi, %r13
movq %rdi, %r14
leaq 0x8f0(%rdi), %rbx
cmpq $0x0, 0x930(%rdi)
jne 0x45ff9
movq %rbx, %rdi
callq 0x29220
movsbl %r15b, %ecx
movsbl %r12b, %r8d
movq %r14, %rdi
movq %r13, %rsi
movq -0x30(%rbp), %rdx
callq 0x45bed
movl %eax, %r15d
movq 0x930(%r14), %rdi
testq %rdi, %rdi
jne 0x4600f
movq %rbx, %rdi
callq 0x291e0
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x938f4(%rip), %rsi # 0xd98f4
movq %rbx, %rdi
movl $0x58d, %edx # imm = 0x58D
callq 0x2eb8f
jmp 0x45fb9
leaq 0x33fffa(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x45fdf
nopl (%rax)
| _ma_update_state_lsns:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12d, r8d
mov r15d, ecx
mov [rbp+var_30], rdx
mov r13, rsi
mov r14, rdi
lea rbx, [rdi+8F0h]
cmp qword ptr [rdi+930h], 0
jnz short loc_45FF9
mov rdi, rbx
call _pthread_mutex_lock
loc_45FB9:
movsx ecx, r15b
movsx r8d, r12b
mov rdi, r14
mov rsi, r13
mov rdx, [rbp+var_30]
call _ma_update_state_lsns_sub
mov r15d, eax
mov rdi, [r14+930h]
test rdi, rdi
jnz short loc_4600F
loc_45FDF:
mov rdi, rbx
call _pthread_mutex_unlock
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_45FF9:
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 58Dh
call psi_mutex_lock
jmp short loc_45FB9
loc_4600F:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_45FDF
| long long ma_update_state_lsns(long long a1, long long a2, long long a3, char a4, char a5)
{
unsigned int updated; // r15d
if ( *(_QWORD *)(a1 + 2352) )
psi_mutex_lock(a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c", 0x58Du);
else
pthread_mutex_lock(a1 + 2288);
updated = ma_update_state_lsns_sub(a1, a2, a3, a4, a5);
if ( *(_QWORD *)(a1 + 2352) )
PSI_server[44]();
pthread_mutex_unlock(a1 + 2288);
return updated;
}
| _ma_update_state_lsns:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12D,R8D
MOV R15D,ECX
MOV qword ptr [RBP + -0x30],RDX
MOV R13,RSI
MOV R14,RDI
LEA RBX,[RDI + 0x8f0]
CMP qword ptr [RDI + 0x930],0x0
JNZ 0x00145ff9
MOV RDI,RBX
CALL 0x00129220
LAB_00145fb9:
MOVSX ECX,R15B
MOVSX R8D,R12B
MOV RDI,R14
MOV RSI,R13
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00145bed
MOV R15D,EAX
MOV RDI,qword ptr [R14 + 0x930]
TEST RDI,RDI
JNZ 0x0014600f
LAB_00145fdf:
MOV RDI,RBX
CALL 0x001291e0
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00145ff9:
LEA RSI,[0x1d98f4]
MOV RDI,RBX
MOV EDX,0x58d
CALL 0x0012eb8f
JMP 0x00145fb9
LAB_0014600f:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00145fdf
|
int4
_ma_update_state_lsns(long param_1,int8 param_2,int8 param_3,char param_4,char param_5)
{
pthread_mutex_t *__mutex;
int4 uVar1;
__mutex = (pthread_mutex_t *)(param_1 + 0x8f0);
if (*(long *)(param_1 + 0x930) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c",
0x58d);
}
uVar1 = _ma_update_state_lsns_sub(param_1,param_2,param_3,(int)param_4,(int)param_5);
if (*(long *)(param_1 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return uVar1;
}
| |
37,473 | google::protobuf::DescriptorBuilder::ValidateFieldOptions(google::protobuf::FieldDescriptor*, google::protobuf::FieldDescriptorProto const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | void DescriptorBuilder::ValidateFieldOptions(
FieldDescriptor* field, const FieldDescriptorProto& proto) {
if (pool_->lazily_build_dependencies_ && (!field || !field->message_type())) {
return;
}
// Only message type fields may be lazy.
if (field->options().lazy() || field->options().unverified_lazy()) {
if (field->type() != FieldDescriptor::TYPE_MESSAGE) {
AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
"[lazy = true] can only be specified for submessage fields.");
}
}
// Only repeated primitive fields may be packed.
if (field->options().packed() && !field->is_packable()) {
AddError(
field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
"[packed = true] can only be specified for repeated primitive fields.");
}
// Note: Default instance may not yet be initialized here, so we have to
// avoid reading from it.
if (field->containing_type_ != nullptr &&
&field->containing_type()->options() !=
&MessageOptions::default_instance() &&
field->containing_type()->options().message_set_wire_format()) {
if (field->is_extension()) {
if (!field->is_optional() ||
field->type() != FieldDescriptor::TYPE_MESSAGE) {
AddError(field->full_name(), proto,
DescriptorPool::ErrorCollector::TYPE,
"Extensions of MessageSets must be optional messages.");
}
} else {
AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::NAME,
"MessageSets cannot have fields, only extensions.");
}
}
// Lite extensions can only be of Lite types.
if (IsLite(field->file()) && field->containing_type_ != nullptr &&
!IsLite(field->containing_type()->file())) {
AddError(field->full_name(), proto,
DescriptorPool::ErrorCollector::EXTENDEE,
"Extensions to non-lite types can only be declared in non-lite "
"files. Note that you cannot extend a non-lite type to contain "
"a lite type, but the reverse is allowed.");
}
// Validate map types.
if (field->is_map()) {
if (!ValidateMapEntry(field, proto)) {
AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
"map_entry should not be set explicitly. Use map<KeyType, "
"ValueType> instead.");
}
}
ValidateJSType(field, proto);
// json_name option is not allowed on extension fields. Note that the
// json_name field in FieldDescriptorProto is always populated by protoc
// when it sends descriptor data to plugins (calculated from field name if
// the option is not explicitly set) so we can't rely on its presence to
// determine whether the json_name option is set on the field. Here we
// compare it against the default calculated json_name value and consider
// the option set if they are different. This won't catch the case when
// an user explicitly sets json_name to the default value, but should be
// good enough to catch common misuses.
if (field->is_extension() &&
(field->has_json_name() &&
field->json_name() != ToJsonName(field->name()))) {
AddError(field->full_name(), proto,
DescriptorPool::ErrorCollector::OPTION_NAME,
"option json_name is not allowed on extension fields.");
}
} | O0 | cpp | google::protobuf::DescriptorBuilder::ValidateFieldOptions(google::protobuf::FieldDescriptor*, google::protobuf::FieldDescriptorProto const&):
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movq (%rax), %rax
testb $0x1, 0x29(%rax)
je 0x268a03
cmpq $0x0, 0x58(%rsp)
je 0x2689fe
movq 0x58(%rsp), %rdi
callq 0x243e40
cmpq $0x0, %rax
jne 0x268a03
jmp 0x268d32
movq 0x58(%rsp), %rdi
callq 0x1bab40
movq %rax, %rdi
callq 0x1bab70
testb $0x1, %al
jne 0x268a31
movq 0x58(%rsp), %rdi
callq 0x1bab40
movq %rax, %rdi
callq 0x1bab50
testb $0x1, %al
jne 0x268a31
jmp 0x268a6a
movq 0x58(%rsp), %rdi
callq 0x1bab90
cmpl $0xb, %eax
je 0x268a68
movq 0x58(%rsp), %rdi
callq 0x1c2040
movq 0x20(%rsp), %rdi
movq %rax, %rsi
movq 0x50(%rsp), %rdx
movl $0x2, %ecx
leaq 0x185042(%rip), %r8 # 0x3edaa5
callq 0x2509e0
jmp 0x268a6a
movq 0x58(%rsp), %rdi
callq 0x1bab40
movq %rax, %rdi
callq 0x1bf700
testb $0x1, %al
jne 0x268a82
jmp 0x268ab8
movq 0x58(%rsp), %rdi
callq 0x201f30
testb $0x1, %al
jne 0x268ab8
movq 0x58(%rsp), %rdi
callq 0x1c2040
movq 0x20(%rsp), %rdi
movq %rax, %rsi
movq 0x50(%rsp), %rdx
movl $0x2, %ecx
leaq 0x18502d(%rip), %r8 # 0x3edae0
callq 0x2509e0
movq 0x58(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x268b98
movq 0x58(%rsp), %rdi
callq 0x1be1f0
movq %rax, %rdi
callq 0x1e62d0
movq %rax, 0x18(%rsp)
callq 0x283a60
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
je 0x268b98
movq 0x58(%rsp), %rdi
callq 0x1be1f0
movq %rax, %rdi
callq 0x1e62d0
movq %rax, %rdi
callq 0x201e70
testb $0x1, %al
jne 0x268b18
jmp 0x268b98
movq 0x58(%rsp), %rdi
callq 0x1bab10
testb $0x1, %al
jne 0x268b28
jmp 0x268b71
movq 0x58(%rsp), %rdi
callq 0x282690
testb $0x1, %al
jne 0x268b38
jmp 0x268b47
movq 0x58(%rsp), %rdi
callq 0x1bab90
cmpl $0xb, %eax
je 0x268b6f
movq 0x58(%rsp), %rdi
callq 0x1c2040
movq 0x20(%rsp), %rdi
movq %rax, %rsi
movq 0x50(%rsp), %rdx
movl $0x2, %ecx
leaq 0x181372(%rip), %r8 # 0x3e9edc
callq 0x2509e0
jmp 0x268b96
movq 0x58(%rsp), %rdi
callq 0x1c2040
movq 0x20(%rsp), %rdi
movq %rax, %rsi
movq 0x50(%rsp), %rdx
xorl %ecx, %ecx
leaq 0x184f94(%rip), %r8 # 0x3edb25
callq 0x2509e0
jmp 0x268b98
movq 0x58(%rsp), %rdi
callq 0x1bf1b0
movq %rax, %rdi
callq 0x268d40
testb $0x1, %al
jne 0x268bb0
jmp 0x268c02
movq 0x58(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x268c02
movq 0x58(%rsp), %rdi
callq 0x1be1f0
movq %rax, %rdi
callq 0x1c1590
movq %rax, %rdi
callq 0x268d40
testb $0x1, %al
jne 0x268c02
movq 0x58(%rsp), %rdi
callq 0x1c2040
movq 0x20(%rsp), %rdi
movq %rax, %rsi
movq 0x50(%rsp), %rdx
movl $0x3, %ecx
leaq 0x184f59(%rip), %r8 # 0x3edb56
callq 0x2509e0
movq 0x58(%rsp), %rdi
callq 0x1c1de0
testb $0x1, %al
jne 0x268c12
jmp 0x268c54
movq 0x20(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x269c20
testb $0x1, %al
jne 0x268c52
movq 0x58(%rsp), %rdi
callq 0x1c2040
movq 0x20(%rsp), %rdi
movq %rax, %rsi
movq 0x50(%rsp), %rdx
movl $0x2, %ecx
leaq 0x184faf(%rip), %r8 # 0x3edbfc
callq 0x2509e0
jmp 0x268c54
movq 0x20(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x26a060
movq 0x58(%rsp), %rdi
callq 0x1bab10
movb %al, %cl
movb $0x0, 0x2f(%rsp)
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x17(%rsp)
jne 0x268c86
jmp 0x268ce5
movq 0x58(%rsp), %rdi
callq 0x286e60
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x16(%rsp)
jne 0x268c9f
jmp 0x268cdd
movq 0x58(%rsp), %rdi
callq 0x1eff70
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rdi
callq 0x1e63d0
movq %rax, %rsi
leaq 0x30(%rsp), %rdi
callq 0x26a1c0
movq 0x8(%rsp), %rdi
movb $0x1, 0x2f(%rsp)
leaq 0x30(%rsp), %rsi
callq 0x92ae0
movb %al, 0x16(%rsp)
movb 0x16(%rsp), %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
movb %al, 0x7(%rsp)
testb $0x1, 0x2f(%rsp)
jne 0x268cf6
jmp 0x268d00
leaq 0x30(%rsp), %rdi
callq 0x921e0
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x268d0a
jmp 0x268d32
movq 0x58(%rsp), %rdi
callq 0x1c2040
movq 0x20(%rsp), %rdi
movq %rax, %rsi
movq 0x50(%rsp), %rdx
movl $0x7, %ecx
leaq 0x184f1c(%rip), %r8 # 0x3edc49
callq 0x2509e0
addq $0x68, %rsp
retq
nopw (%rax,%rax)
| _ZN6google8protobuf17DescriptorBuilder20ValidateFieldOptionsEPNS0_15FieldDescriptorERKNS0_20FieldDescriptorProtoE:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov [rsp+68h+var_18], rdx
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_48], rax
mov rax, [rax]
test byte ptr [rax+29h], 1
jz short loc_268A03
cmp [rsp+68h+var_10], 0
jz short loc_2689FE
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void)
cmp rax, 0
jnz short loc_268A03
loc_2689FE:
jmp loc_268D32
loc_268A03:
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor7optionsEv; google::protobuf::FieldDescriptor::options(void)
mov rdi, rax; this
call _ZNK6google8protobuf12FieldOptions4lazyEv; google::protobuf::FieldOptions::lazy(void)
test al, 1
jnz short loc_268A31
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor7optionsEv; google::protobuf::FieldDescriptor::options(void)
mov rdi, rax; this
call _ZNK6google8protobuf12FieldOptions15unverified_lazyEv; google::protobuf::FieldOptions::unverified_lazy(void)
test al, 1
jnz short loc_268A31
jmp short loc_268A6A
loc_268A31:
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor4typeEv; google::protobuf::FieldDescriptor::type(void)
cmp eax, 0Bh
jz short loc_268A68
mov rdi, [rsp+68h+var_10]
call _ZNK6google8protobuf15FieldDescriptor9full_nameB5cxx11Ev; google::protobuf::FieldDescriptor::full_name(void)
mov rdi, [rsp+68h+var_48]
mov rsi, rax
mov rdx, [rsp+68h+var_18]
mov ecx, 2
lea r8, aLazyTrueCanOnl; "[lazy = true] can only be specified for"...
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_268A68:
jmp short $+2
loc_268A6A:
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor7optionsEv; google::protobuf::FieldDescriptor::options(void)
mov rdi, rax; this
call _ZNK6google8protobuf12FieldOptions6packedEv; google::protobuf::FieldOptions::packed(void)
test al, 1
jnz short loc_268A82
jmp short loc_268AB8
loc_268A82:
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor11is_packableEv; google::protobuf::FieldDescriptor::is_packable(void)
test al, 1
jnz short loc_268AB8
mov rdi, [rsp+68h+var_10]
call _ZNK6google8protobuf15FieldDescriptor9full_nameB5cxx11Ev; google::protobuf::FieldDescriptor::full_name(void)
mov rdi, [rsp+68h+var_48]
mov rsi, rax; google::protobuf::FileDescriptor *
mov rdx, [rsp+68h+var_18]
mov ecx, 2
lea r8, aPackedTrueCanO; "[packed = true] can only be specified f"...
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_268AB8:
mov rax, [rsp+68h+var_10]
cmp qword ptr [rax+20h], 0
jz loc_268B98
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor15containing_typeEv; google::protobuf::FieldDescriptor::containing_type(void)
mov rdi, rax; this
call _ZNK6google8protobuf10Descriptor7optionsEv; google::protobuf::Descriptor::options(void)
mov [rsp+68h+var_50], rax
call _ZN6google8protobuf14MessageOptions16default_instanceEv; google::protobuf::MessageOptions::default_instance(void)
mov rcx, rax
mov rax, [rsp+68h+var_50]
cmp rax, rcx
jz loc_268B98
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor15containing_typeEv; google::protobuf::FieldDescriptor::containing_type(void)
mov rdi, rax; this
call _ZNK6google8protobuf10Descriptor7optionsEv; google::protobuf::Descriptor::options(void)
mov rdi, rax; this
call _ZNK6google8protobuf14MessageOptions23message_set_wire_formatEv; google::protobuf::MessageOptions::message_set_wire_format(void)
test al, 1
jnz short loc_268B18
jmp loc_268B98
loc_268B18:
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor12is_extensionEv; google::protobuf::FieldDescriptor::is_extension(void)
test al, 1
jnz short loc_268B28
jmp short loc_268B71
loc_268B28:
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor11is_optionalEv; google::protobuf::FieldDescriptor::is_optional(void)
test al, 1
jnz short loc_268B38
jmp short loc_268B47
loc_268B38:
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor4typeEv; google::protobuf::FieldDescriptor::type(void)
cmp eax, 0Bh
jz short loc_268B6F
loc_268B47:
mov rdi, [rsp+68h+var_10]
call _ZNK6google8protobuf15FieldDescriptor9full_nameB5cxx11Ev; google::protobuf::FieldDescriptor::full_name(void)
mov rdi, [rsp+68h+var_48]
mov rsi, rax
mov rdx, [rsp+68h+var_18]
mov ecx, 2
lea r8, aExtensionsOfMe; "Extensions of MessageSets must be optio"...
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_268B6F:
jmp short loc_268B96
loc_268B71:
mov rdi, [rsp+68h+var_10]
call _ZNK6google8protobuf15FieldDescriptor9full_nameB5cxx11Ev; google::protobuf::FieldDescriptor::full_name(void)
mov rdi, [rsp+68h+var_48]
mov rsi, rax
mov rdx, [rsp+68h+var_18]
xor ecx, ecx
lea r8, aMessagesetsCan; "MessageSets cannot have fields, only ex"...
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_268B96:
jmp short $+2
loc_268B98:
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor4fileEv; google::protobuf::FieldDescriptor::file(void)
mov rdi, rax; this
call _ZN6google8protobufL6IsLiteEPKNS0_14FileDescriptorE; google::protobuf::IsLite(google::protobuf::FileDescriptor const*)
test al, 1
jnz short loc_268BB0
jmp short loc_268C02
loc_268BB0:
mov rax, [rsp+68h+var_10]
cmp qword ptr [rax+20h], 0
jz short loc_268C02
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor15containing_typeEv; google::protobuf::FieldDescriptor::containing_type(void)
mov rdi, rax; this
call _ZNK6google8protobuf10Descriptor4fileEv; google::protobuf::Descriptor::file(void)
mov rdi, rax; this
call _ZN6google8protobufL6IsLiteEPKNS0_14FileDescriptorE; google::protobuf::IsLite(google::protobuf::FileDescriptor const*)
test al, 1
jnz short loc_268C02
mov rdi, [rsp+68h+var_10]
call _ZNK6google8protobuf15FieldDescriptor9full_nameB5cxx11Ev; google::protobuf::FieldDescriptor::full_name(void)
mov rdi, [rsp+68h+var_48]
mov rsi, rax
mov rdx, [rsp+68h+var_18]
mov ecx, 3
lea r8, aExtensionsToNo; "Extensions to non-lite types can only b"...
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_268C02:
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor6is_mapEv; google::protobuf::FieldDescriptor::is_map(void)
test al, 1
jnz short loc_268C12
jmp short loc_268C54
loc_268C12:
mov rdi, [rsp+68h+var_48]; this
mov rsi, [rsp+68h+var_10]; google::protobuf::FieldDescriptor *
mov rdx, [rsp+68h+var_18]; google::protobuf::FieldDescriptorProto *
call _ZN6google8protobuf17DescriptorBuilder16ValidateMapEntryEPNS0_15FieldDescriptorERKNS0_20FieldDescriptorProtoE; google::protobuf::DescriptorBuilder::ValidateMapEntry(google::protobuf::FieldDescriptor *,google::protobuf::FieldDescriptorProto const&)
test al, 1
jnz short loc_268C52
mov rdi, [rsp+68h+var_10]
call _ZNK6google8protobuf15FieldDescriptor9full_nameB5cxx11Ev; google::protobuf::FieldDescriptor::full_name(void)
mov rdi, [rsp+68h+var_48]
mov rsi, rax
mov rdx, [rsp+68h+var_18]
mov ecx, 2
lea r8, aMapEntryShould; "map_entry should not be set explicitly."...
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_268C52:
jmp short $+2
loc_268C54:
mov rdi, [rsp+68h+var_48]; this
mov rsi, [rsp+68h+var_10]; google::protobuf::FieldDescriptor *
mov rdx, [rsp+68h+var_18]; google::protobuf::FieldDescriptorProto *
call _ZN6google8protobuf17DescriptorBuilder14ValidateJSTypeEPNS0_15FieldDescriptorERKNS0_20FieldDescriptorProtoE; google::protobuf::DescriptorBuilder::ValidateJSType(google::protobuf::FieldDescriptor *,google::protobuf::FieldDescriptorProto const&)
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor12is_extensionEv; google::protobuf::FieldDescriptor::is_extension(void)
mov cl, al
mov [rsp+68h+var_39], 0
xor eax, eax
test cl, 1
mov [rsp+68h+var_51], al
jnz short loc_268C86
jmp short loc_268CE5
loc_268C86:
mov rdi, [rsp+68h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor13has_json_nameEv; google::protobuf::FieldDescriptor::has_json_name(void)
mov cl, al
xor eax, eax
test cl, 1
mov [rsp+68h+var_52], al
jnz short loc_268C9F
jmp short loc_268CDD
loc_268C9F:
mov rdi, [rsp+68h+var_10]
call _ZNK6google8protobuf15FieldDescriptor9json_nameB5cxx11Ev; google::protobuf::FieldDescriptor::json_name(void)
mov [rsp+68h+var_60], rax
mov rdi, [rsp+68h+var_10]
call _ZNK6google8protobuf15FieldDescriptor4nameB5cxx11Ev; google::protobuf::FieldDescriptor::name(void)
mov rsi, rax
lea rdi, [rsp+68h+var_38]
call _ZN6google8protobuf12_GLOBAL__N_110ToJsonNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::`anonymous namespace'::ToJsonName(std::string const&)
mov rdi, [rsp+68h+var_60]
mov [rsp+68h+var_39], 1
lea rsi, [rsp+68h+var_38]
call __ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator!=<char>(std::string const&,std::string const&)
mov [rsp+68h+var_52], al
loc_268CDD:
mov al, [rsp+68h+var_52]
mov [rsp+68h+var_51], al
loc_268CE5:
mov al, [rsp+68h+var_51]
mov [rsp+68h+var_61], al
test [rsp+68h+var_39], 1
jnz short loc_268CF6
jmp short loc_268D00
loc_268CF6:
lea rdi, [rsp+68h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_268D00:
mov al, [rsp+68h+var_61]
test al, 1
jnz short loc_268D0A
jmp short loc_268D32
loc_268D0A:
mov rdi, [rsp+68h+var_10]
call _ZNK6google8protobuf15FieldDescriptor9full_nameB5cxx11Ev; google::protobuf::FieldDescriptor::full_name(void)
mov rdi, [rsp+68h+var_48]
mov rsi, rax
mov rdx, [rsp+68h+var_18]
mov ecx, 7
lea r8, aOptionJsonName; "option json_name is not allowed on exte"...
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_268D32:
add rsp, 68h
retn
| char google::protobuf::DescriptorBuilder::ValidateFieldOptions(
google::protobuf::DescriptorBuilder *this,
google::protobuf::FieldDescriptor *a2,
const google::protobuf::FieldDescriptorProto *a3)
{
long long v3; // rax
google::protobuf::FieldOptions *v4; // rax
google::protobuf::FieldOptions *v5; // rax
google::protobuf::FieldOptions *v6; // rax
google::protobuf::Descriptor *v7; // rdi
google::protobuf::Descriptor *v8; // rax
google::protobuf::MessageOptions *v9; // rax
google::protobuf *v10; // rax
google::protobuf::Descriptor *v11; // rax
google::protobuf *v12; // rax
long long v13; // rax
long long v14; // rax
int v15; // eax
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
long long v20; // rax
long long v22; // [rsp+8h] [rbp-60h]
char v23; // [rsp+16h] [rbp-52h]
char v24; // [rsp+17h] [rbp-51h]
long long v25; // [rsp+18h] [rbp-50h]
char v27; // [rsp+2Fh] [rbp-39h]
_BYTE v28[32]; // [rsp+30h] [rbp-38h] BYREF
google::protobuf::FieldDescriptorProto *v29; // [rsp+50h] [rbp-18h]
google::protobuf::FieldDescriptor *v30; // [rsp+58h] [rbp-10h]
google::protobuf::DescriptorBuilder *v31; // [rsp+60h] [rbp-8h]
v31 = this;
v30 = a2;
v29 = a3;
v3 = *(_QWORD *)this;
if ( (*(_BYTE *)(*(_QWORD *)this + 41LL) & 1) == 0
|| v30 && (v3 = google::protobuf::FieldDescriptor::message_type(v30)) != 0 )
{
v4 = (google::protobuf::FieldOptions *)google::protobuf::FieldDescriptor::options(v30);
if ( (google::protobuf::FieldOptions::lazy(v4) & 1) != 0
|| (v5 = (google::protobuf::FieldOptions *)google::protobuf::FieldDescriptor::options(v30),
(google::protobuf::FieldOptions::unverified_lazy(v5) & 1) != 0) )
{
if ( (unsigned int)google::protobuf::FieldDescriptor::type(v30) != 11 )
{
a2 = (google::protobuf::FieldDescriptor *)google::protobuf::FieldDescriptor::full_name[abi:cxx11]((long long)v30);
google::protobuf::DescriptorBuilder::AddError(
(long long)this,
(long long)a2,
(long long)v29,
2u,
(long long)"[lazy = true] can only be specified for submessage fields.");
}
}
v6 = (google::protobuf::FieldOptions *)google::protobuf::FieldDescriptor::options(v30);
if ( (google::protobuf::FieldOptions::packed(v6) & 1) != 0
&& (google::protobuf::FieldDescriptor::is_packable(v30) & 1) == 0 )
{
a2 = (google::protobuf::FieldDescriptor *)google::protobuf::FieldDescriptor::full_name[abi:cxx11]((long long)v30);
google::protobuf::DescriptorBuilder::AddError(
(long long)this,
(long long)a2,
(long long)v29,
2u,
(long long)"[packed = true] can only be specified for repeated primitive fields.");
}
if ( *((_QWORD *)v30 + 4) )
{
v7 = (google::protobuf::Descriptor *)google::protobuf::FieldDescriptor::containing_type(v30);
v25 = google::protobuf::Descriptor::options(v7);
if ( v25 != google::protobuf::MessageOptions::default_instance(v7) )
{
v8 = (google::protobuf::Descriptor *)google::protobuf::FieldDescriptor::containing_type(v30);
v9 = (google::protobuf::MessageOptions *)google::protobuf::Descriptor::options(v8);
if ( (google::protobuf::MessageOptions::message_set_wire_format(v9) & 1) != 0 )
{
if ( google::protobuf::FieldDescriptor::is_extension(v30) )
{
if ( (google::protobuf::FieldDescriptor::is_optional(v30) & 1) == 0
|| (unsigned int)google::protobuf::FieldDescriptor::type(v30) != 11 )
{
a2 = (google::protobuf::FieldDescriptor *)google::protobuf::FieldDescriptor::full_name[abi:cxx11]((long long)v30);
google::protobuf::DescriptorBuilder::AddError(
(long long)this,
(long long)a2,
(long long)v29,
2u,
(long long)"Extensions of MessageSets must be optional messages.");
}
}
else
{
a2 = (google::protobuf::FieldDescriptor *)google::protobuf::FieldDescriptor::full_name[abi:cxx11]((long long)v30);
google::protobuf::DescriptorBuilder::AddError(
(long long)this,
(long long)a2,
(long long)v29,
0,
(long long)"MessageSets cannot have fields, only extensions.");
}
}
}
}
v10 = (google::protobuf *)google::protobuf::FieldDescriptor::file(v30);
if ( (google::protobuf::IsLite(v10, a2) & 1) != 0 )
{
if ( *((_QWORD *)v30 + 4) )
{
v11 = (google::protobuf::Descriptor *)google::protobuf::FieldDescriptor::containing_type(v30);
v12 = (google::protobuf *)google::protobuf::Descriptor::file(v11);
if ( (google::protobuf::IsLite(v12, a2) & 1) == 0 )
{
v13 = google::protobuf::FieldDescriptor::full_name[abi:cxx11]((long long)v30);
google::protobuf::DescriptorBuilder::AddError(
(long long)this,
v13,
(long long)v29,
3u,
(long long)"Extensions to non-lite types can only be declared in non-lite files. Note that you cannot extend a"
" non-lite type to contain a lite type, but the reverse is allowed.");
}
}
}
if ( (google::protobuf::FieldDescriptor::is_map(v30) & 1) != 0
&& (google::protobuf::DescriptorBuilder::ValidateMapEntry(this, v30, v29) & 1) == 0 )
{
v14 = google::protobuf::FieldDescriptor::full_name[abi:cxx11]((long long)v30);
google::protobuf::DescriptorBuilder::AddError(
(long long)this,
v14,
(long long)v29,
2u,
(long long)"map_entry should not be set explicitly. Use map<KeyType, ValueType> instead.");
}
google::protobuf::DescriptorBuilder::ValidateJSType(this, v30, v29);
v27 = 0;
v24 = 0;
if ( google::protobuf::FieldDescriptor::is_extension(v30) )
{
v23 = 0;
if ( (google::protobuf::FieldDescriptor::has_json_name(v30) & 1) != 0 )
{
v22 = google::protobuf::FieldDescriptor::json_name[abi:cxx11]((long long)v30);
v15 = google::protobuf::FieldDescriptor::name[abi:cxx11]((long long)v30);
google::protobuf::`anonymous namespace'::ToJsonName((unsigned int)v28, v15, v16, v17, v18, v19);
v27 = 1;
v23 = std::operator!=<char>(v22, v28);
}
v24 = v23;
}
if ( (v27 & 1) != 0 )
std::string::~string(v28);
LOBYTE(v3) = v24;
if ( (v24 & 1) != 0 )
{
v20 = google::protobuf::FieldDescriptor::full_name[abi:cxx11]((long long)v30);
LOBYTE(v3) = google::protobuf::DescriptorBuilder::AddError(
(long long)this,
v20,
(long long)v29,
7u,
(long long)"option json_name is not allowed on extension fields.");
}
}
return v3;
}
| |||
37,474 | google::protobuf::DescriptorBuilder::ValidateFieldOptions(google::protobuf::FieldDescriptor*, google::protobuf::FieldDescriptorProto const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | void DescriptorBuilder::ValidateFieldOptions(
FieldDescriptor* field, const FieldDescriptorProto& proto) {
if (pool_->lazily_build_dependencies_ && (!field || !field->message_type())) {
return;
}
// Only message type fields may be lazy.
if (field->options().lazy() || field->options().unverified_lazy()) {
if (field->type() != FieldDescriptor::TYPE_MESSAGE) {
AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
"[lazy = true] can only be specified for submessage fields.");
}
}
// Only repeated primitive fields may be packed.
if (field->options().packed() && !field->is_packable()) {
AddError(
field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
"[packed = true] can only be specified for repeated primitive fields.");
}
// Note: Default instance may not yet be initialized here, so we have to
// avoid reading from it.
if (field->containing_type_ != nullptr &&
&field->containing_type()->options() !=
&MessageOptions::default_instance() &&
field->containing_type()->options().message_set_wire_format()) {
if (field->is_extension()) {
if (!field->is_optional() ||
field->type() != FieldDescriptor::TYPE_MESSAGE) {
AddError(field->full_name(), proto,
DescriptorPool::ErrorCollector::TYPE,
"Extensions of MessageSets must be optional messages.");
}
} else {
AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::NAME,
"MessageSets cannot have fields, only extensions.");
}
}
// Lite extensions can only be of Lite types.
if (IsLite(field->file()) && field->containing_type_ != nullptr &&
!IsLite(field->containing_type()->file())) {
AddError(field->full_name(), proto,
DescriptorPool::ErrorCollector::EXTENDEE,
"Extensions to non-lite types can only be declared in non-lite "
"files. Note that you cannot extend a non-lite type to contain "
"a lite type, but the reverse is allowed.");
}
// Validate map types.
if (field->is_map()) {
if (!ValidateMapEntry(field, proto)) {
AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE,
"map_entry should not be set explicitly. Use map<KeyType, "
"ValueType> instead.");
}
}
ValidateJSType(field, proto);
// json_name option is not allowed on extension fields. Note that the
// json_name field in FieldDescriptorProto is always populated by protoc
// when it sends descriptor data to plugins (calculated from field name if
// the option is not explicitly set) so we can't rely on its presence to
// determine whether the json_name option is set on the field. Here we
// compare it against the default calculated json_name value and consider
// the option set if they are different. This won't catch the case when
// an user explicitly sets json_name to the default value, but should be
// good enough to catch common misuses.
if (field->is_extension() &&
(field->has_json_name() &&
field->json_name() != ToJsonName(field->name()))) {
AddError(field->full_name(), proto,
DescriptorPool::ErrorCollector::OPTION_NAME,
"option json_name is not allowed on extension fields.");
}
} | O3 | cpp | google::protobuf::DescriptorBuilder::ValidateFieldOptions(google::protobuf::FieldDescriptor*, google::protobuf::FieldDescriptorProto const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
cmpb $0x1, 0x29(%rax)
jne 0xd856e
testq %r15, %r15
je 0xd8837
movq %r15, %rdi
callq 0xc0cee
testq %rax, %rax
je 0xd8837
movq 0x38(%r15), %rax
cmpb $0x0, 0x51(%rax)
jne 0xd857e
cmpb $0x1, 0x52(%rax)
jne 0xd85c7
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0xd85a1
leaq 0x4bc6(%rip), %rax # 0xdd154
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdx
movq %r15, (%rdx)
callq 0x97dfb
cmpb $0xb, 0x2(%r15)
je 0xd85c7
movq 0x8(%r15), %rsi
addq $0x20, %rsi
leaq 0x950a5(%rip), %r8 # 0x16d65c
movq %r14, %rdi
movq %rbx, %rdx
movl $0x2, %ecx
callq 0xca012
movq 0x38(%r15), %rax
cmpb $0x1, 0x50(%rax)
jne 0xd862a
movb 0x1(%r15), %al
notb %al
testb $0x60, %al
jne 0xd860b
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0xd85fe
leaq 0x4b69(%rip), %rax # 0xdd154
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdx
movq %r15, (%rdx)
callq 0x97dfb
movzbl 0x2(%r15), %eax
addl $-0xd, %eax
cmpl $-0x4, %eax
jb 0xd862a
movq 0x8(%r15), %rsi
addq $0x20, %rsi
leaq 0x9507d(%rip), %r8 # 0x16d697
movq %r14, %rdi
movq %rbx, %rdx
movl $0x2, %ecx
callq 0xca012
movq 0x20(%r15), %rax
testq %rax, %rax
je 0xd86ba
movq 0x20(%rax), %rax
cmpq 0x13791e(%rip), %rax # 0x20ff60
je 0xd86ba
cmpb $0x1, 0x48(%rax)
jne 0xd86ba
movb 0x1(%r15), %al
testb $0x8, %al
jne 0xd866b
movq 0x8(%r15), %rsi
addq $0x20, %rsi
leaq 0x9507b(%rip), %r8 # 0x16d6dc
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
jmp 0xd86b5
andb $0x60, %al
cmpb $0x20, %al
jne 0xd869b
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0xd8694
leaq 0x4ad3(%rip), %rax # 0xdd154
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdx
movq %r15, (%rdx)
callq 0x97dfb
cmpb $0xb, 0x2(%r15)
je 0xd86ba
movq 0x8(%r15), %rsi
addq $0x20, %rsi
leaq 0x923ba(%rip), %r8 # 0x16aa64
movq %r14, %rdi
movq %rbx, %rdx
movl $0x2, %ecx
callq 0xca012
movq 0x10(%r15), %rax
testq %rax, %rax
je 0xd8720
movq 0x78(%rax), %rax
cmpq 0x13776a(%rip), %rax # 0x20fe38
je 0xd8720
cmpl $0x3, 0xa0(%rax)
jne 0xd8720
movq 0x20(%r15), %rax
testq %rax, %rax
je 0xd8720
movq 0x10(%rax), %rax
testq %rax, %rax
je 0xd8701
movq 0x78(%rax), %rax
cmpq 0x137742(%rip), %rax # 0x20fe38
je 0xd8701
cmpl $0x3, 0xa0(%rax)
je 0xd8720
movq 0x8(%r15), %rsi
addq $0x20, %rsi
leaq 0x94ffd(%rip), %r8 # 0x16d70d
movq %r14, %rdi
movq %rbx, %rdx
movl $0x3, %ecx
callq 0xca012
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0xd8743
leaq 0x4a24(%rip), %rax # 0xdd154
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdx
movq %r15, (%rdx)
callq 0x97dfb
cmpb $0xb, 0x2(%r15)
jne 0xd8789
movq 0x30(%r15), %rax
movq 0x20(%rax), %rax
cmpb $0x1, 0x4b(%rax)
jne 0xd8789
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xd928a
testb %al, %al
jne 0xd8789
movq 0x8(%r15), %rsi
addq $0x20, %rsi
leaq 0x9503a(%rip), %r8 # 0x16d7b3
movq %r14, %rdi
movq %rbx, %rdx
movl $0x2, %ecx
callq 0xca012
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xd94e6
movb 0x1(%r15), %al
notb %al
testb $0xc, %al
jne 0xd8837
movq 0x8(%r15), %r13
movzbl 0x3(%r15), %ebp
andl $0x70, %ebp
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0xd95e8
movq 0x8(%r13,%rbp,2), %rdx
cmpq 0x8(%r12), %rdx
jne 0xd87f5
movq 0x8(%rsp), %r12
testq %rdx, %rdx
je 0xd87ff
leaq (,%rbp,2), %rax
addq %r13, %rax
movq (%rax), %rdi
movq %r12, %rsi
callq 0x2d2f0
testl %eax, %eax
setne %bpl
jmp 0xd8801
movb $0x1, %bpl
movq 0x8(%rsp), %r12
jmp 0xd8801
xorl %ebp, %ebp
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
je 0xd8813
movq %r12, %rdi
callq 0x2d160
testb %bpl, %bpl
je 0xd8837
movq 0x8(%r15), %rsi
addq $0x20, %rsi
leaq 0x94fd9(%rip), %r8 # 0x16d800
movq %r14, %rdi
movq %rbx, %rdx
movl $0x7, %ecx
callq 0xca012
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN6google8protobuf17DescriptorBuilder20ValidateFieldOptionsEPNS0_15FieldDescriptorERKNS0_20FieldDescriptorProtoE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rdi]
cmp byte ptr [rax+29h], 1
jnz short loc_D856E
test r15, r15
jz loc_D8837
mov rdi, r15; this
call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void)
test rax, rax
jz loc_D8837
loc_D856E:
mov rax, [r15+38h]
cmp byte ptr [rax+51h], 0
jnz short loc_D857E
cmp byte ptr [rax+52h], 1
jnz short loc_D85C7
loc_D857E:
mov rdi, [r15+18h]
test rdi, rdi
jz short loc_D85A1
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+58h+var_50]
mov [rsi], rax
mov rdx, rsp
mov [rdx], r15
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_D85A1:
cmp byte ptr [r15+2], 0Bh
jz short loc_D85C7
mov rsi, [r15+8]
add rsi, 20h ; ' '
lea r8, aLazyTrueCanOnl; "[lazy = true] can only be specified for"...
mov rdi, r14
mov rdx, rbx
mov ecx, 2
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_D85C7:
mov rax, [r15+38h]
cmp byte ptr [rax+50h], 1
jnz short loc_D862A
mov al, [r15+1]
not al
test al, 60h
jnz short loc_D860B
mov rdi, [r15+18h]
test rdi, rdi
jz short loc_D85FE
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+58h+var_50]
mov [rsi], rax
mov rdx, rsp
mov [rdx], r15
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_D85FE:
movzx eax, byte ptr [r15+2]
add eax, 0FFFFFFF3h
cmp eax, 0FFFFFFFCh
jb short loc_D862A
loc_D860B:
mov rsi, [r15+8]
add rsi, 20h ; ' '
lea r8, aPackedTrueCanO; "[packed = true] can only be specified f"...
mov rdi, r14
mov rdx, rbx
mov ecx, 2
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_D862A:
mov rax, [r15+20h]
test rax, rax
jz loc_D86BA
mov rax, [rax+20h]
cmp rax, cs:_ZN6google8protobuf33_MessageOptions_default_instance_E_ptr
jz short loc_D86BA
cmp byte ptr [rax+48h], 1
jnz short loc_D86BA
mov al, [r15+1]
test al, 8
jnz short loc_D866B
mov rsi, [r15+8]
add rsi, 20h ; ' '
lea r8, aMessagesetsCan; "MessageSets cannot have fields, only ex"...
mov rdi, r14
mov rdx, rbx
xor ecx, ecx
jmp short loc_D86B5
loc_D866B:
and al, 60h
cmp al, 20h ; ' '
jnz short loc_D869B
mov rdi, [r15+18h]
test rdi, rdi
jz short loc_D8694
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+58h+var_50]
mov [rsi], rax
mov rdx, rsp
mov [rdx], r15
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_D8694:
cmp byte ptr [r15+2], 0Bh
jz short loc_D86BA
loc_D869B:
mov rsi, [r15+8]
add rsi, 20h ; ' '
lea r8, aExtensionsOfMe; "Extensions of MessageSets must be optio"...
mov rdi, r14
mov rdx, rbx
mov ecx, 2
loc_D86B5:
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_D86BA:
mov rax, [r15+10h]
test rax, rax
jz short loc_D8720
mov rax, [rax+78h]
cmp rax, cs:_ZN6google8protobuf30_FileOptions_default_instance_E_ptr
jz short loc_D8720
cmp dword ptr [rax+0A0h], 3
jnz short loc_D8720
mov rax, [r15+20h]
test rax, rax
jz short loc_D8720
mov rax, [rax+10h]
test rax, rax
jz short loc_D8701
mov rax, [rax+78h]
cmp rax, cs:_ZN6google8protobuf30_FileOptions_default_instance_E_ptr
jz short loc_D8701
cmp dword ptr [rax+0A0h], 3
jz short loc_D8720
loc_D8701:
mov rsi, [r15+8]
add rsi, 20h ; ' '
lea r8, aExtensionsToNo; "Extensions to non-lite types can only b"...
mov rdi, r14
mov rdx, rbx
mov ecx, 3
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_D8720:
mov rdi, [r15+18h]
test rdi, rdi
jz short loc_D8743
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+58h+var_50]
mov [rsi], rax
mov rdx, rsp
mov [rdx], r15
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_D8743:
cmp byte ptr [r15+2], 0Bh
jnz short loc_D8789
mov rax, [r15+30h]
mov rax, [rax+20h]
cmp byte ptr [rax+4Bh], 1
jnz short loc_D8789
mov rdi, r14; this
mov rsi, r15; google::protobuf::FieldDescriptor *
mov rdx, rbx; google::protobuf::FieldDescriptorProto *
call _ZN6google8protobuf17DescriptorBuilder16ValidateMapEntryEPNS0_15FieldDescriptorERKNS0_20FieldDescriptorProtoE; google::protobuf::DescriptorBuilder::ValidateMapEntry(google::protobuf::FieldDescriptor *,google::protobuf::FieldDescriptorProto const&)
test al, al
jnz short loc_D8789
mov rsi, [r15+8]
add rsi, 20h ; ' '
lea r8, aMapEntryShould; "map_entry should not be set explicitly."...
mov rdi, r14
mov rdx, rbx
mov ecx, 2
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_D8789:
mov rdi, r14; this
mov rsi, r15; google::protobuf::FieldDescriptor *
mov rdx, rbx; google::protobuf::FieldDescriptorProto *
call _ZN6google8protobuf17DescriptorBuilder14ValidateJSTypeEPNS0_15FieldDescriptorERKNS0_20FieldDescriptorProtoE; google::protobuf::DescriptorBuilder::ValidateJSType(google::protobuf::FieldDescriptor *,google::protobuf::FieldDescriptorProto const&)
mov al, [r15+1]
not al
test al, 0Ch
jnz loc_D8837
mov r13, [r15+8]
movzx ebp, byte ptr [r15+3]
and ebp, 70h
lea r12, [rsp+58h+var_50]
mov rdi, r12
mov rsi, r13
call _ZN6google8protobuf12_GLOBAL__N_110ToJsonNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::`anonymous namespace'::ToJsonName(std::string const&)
mov rdx, [r13+rbp*2+8]
cmp rdx, [r12+8]
jnz short loc_D87F5
mov r12, [rsp+58h+var_50]
test rdx, rdx
jz short loc_D87FF
lea rax, ds:0[rbp*2]
add rax, r13
mov rdi, [rax]
mov rsi, r12
call _bcmp
test eax, eax
setnz bpl
jmp short loc_D8801
loc_D87F5:
mov bpl, 1
mov r12, [rsp+58h+var_50]
jmp short loc_D8801
loc_D87FF:
xor ebp, ebp
loc_D8801:
lea rax, [rsp+58h+var_40]
cmp r12, rax
jz short loc_D8813
mov rdi, r12; void *
call __ZdlPv; operator delete(void *)
loc_D8813:
test bpl, bpl
jz short loc_D8837
mov rsi, [r15+8]
add rsi, 20h ; ' '
lea r8, aOptionJsonName; "option json_name is not allowed on exte"...
mov rdi, r14
mov rdx, rbx
mov ecx, 7
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*)
loc_D8837:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| void google::protobuf::DescriptorBuilder::ValidateFieldOptions(
google::protobuf::DescriptorBuilder *this,
google::protobuf::FieldDescriptor *a2,
const google::protobuf::FieldDescriptorProto *a3)
{
long long v6; // rax
long long v7; // rdi
long long v8; // rdi
long long v9; // rax
long long v10; // rax
char v11; // al
_QWORD *v12; // rsi
const char *v13; // r8
google::protobuf::DescriptorBuilder *v14; // rdi
const google::protobuf::FieldDescriptorProto *v15; // rdx
unsigned int v16; // ecx
long long v17; // rdi
long long v18; // rax
long long v19; // rax
long long v20; // rax
long long v21; // rax
long long v22; // rax
long long v23; // rdi
long long v24; // r13
long long v25; // rbp
void *v26; // rdx
char *v27; // r12
bool v28; // bp
google::protobuf::FieldDescriptor *v29; // [rsp+0h] [rbp-58h] BYREF
void *v30[2]; // [rsp+8h] [rbp-50h] BYREF
char v31; // [rsp+18h] [rbp-40h] BYREF
if ( *(_BYTE *)(*(_QWORD *)this + 41LL) == 1 && (!a2 || !google::protobuf::FieldDescriptor::message_type(a2)) )
return;
v6 = *((_QWORD *)a2 + 7);
if ( *(_BYTE *)(v6 + 81) || *(_BYTE *)(v6 + 82) == 1 )
{
v7 = *((_QWORD *)a2 + 3);
if ( v7 )
{
v30[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v29 = a2;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v7,
(long long)v30,
(long long)&v29);
}
if ( *((_BYTE *)a2 + 2) != 11 )
google::protobuf::DescriptorBuilder::AddError(
(long long)this,
(_QWORD *)(*((_QWORD *)a2 + 1) + 32LL),
(long long)a3,
2u,
(long long)"[lazy = true] can only be specified for submessage fields.");
}
if ( *(_BYTE *)(*((_QWORD *)a2 + 7) + 80LL) == 1 )
{
if ( (~*((_BYTE *)a2 + 1) & 0x60) != 0 )
goto LABEL_15;
v8 = *((_QWORD *)a2 + 3);
if ( v8 )
{
v30[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v29 = a2;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v8,
(long long)v30,
(long long)&v29);
}
if ( (unsigned int)*((unsigned __int8 *)a2 + 2) - 13 >= 0xFFFFFFFC )
LABEL_15:
google::protobuf::DescriptorBuilder::AddError(
(long long)this,
(_QWORD *)(*((_QWORD *)a2 + 1) + 32LL),
(long long)a3,
2u,
(long long)"[packed = true] can only be specified for repeated primitive fields.");
}
v9 = *((_QWORD *)a2 + 4);
if ( v9 )
{
v10 = *(_QWORD *)(v9 + 32);
if ( (void ( ***)(google::protobuf::MessageOptions *__hidden))v10 != &google::protobuf::_MessageOptions_default_instance_
&& *(_BYTE *)(v10 + 72) == 1 )
{
v11 = *((_BYTE *)a2 + 1);
if ( (v11 & 8) != 0 )
{
if ( (v11 & 0x60) == 0x20 )
{
v17 = *((_QWORD *)a2 + 3);
if ( v17 )
{
v30[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v29 = a2;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v17,
(long long)v30,
(long long)&v29);
}
if ( *((_BYTE *)a2 + 2) == 11 )
goto LABEL_27;
}
v12 = (_QWORD *)(*((_QWORD *)a2 + 1) + 32LL);
v13 = "Extensions of MessageSets must be optional messages.";
v14 = this;
v15 = a3;
v16 = 2;
}
else
{
v12 = (_QWORD *)(*((_QWORD *)a2 + 1) + 32LL);
v13 = "MessageSets cannot have fields, only extensions.";
v14 = this;
v15 = a3;
v16 = 0;
}
google::protobuf::DescriptorBuilder::AddError((long long)v14, v12, (long long)v15, v16, (long long)v13);
}
}
LABEL_27:
v18 = *((_QWORD *)a2 + 2);
if ( v18 )
{
v19 = *(_QWORD *)(v18 + 120);
if ( (void ( ***)(google::protobuf::FileOptions *__hidden))v19 != &google::protobuf::_FileOptions_default_instance_
&& *(_DWORD *)(v19 + 160) == 3 )
{
v20 = *((_QWORD *)a2 + 4);
if ( v20 )
{
v21 = *(_QWORD *)(v20 + 16);
if ( !v21
|| (v22 = *(_QWORD *)(v21 + 120),
(void ( ***)(google::protobuf::FileOptions *__hidden))v22 == &google::protobuf::_FileOptions_default_instance_)
|| *(_DWORD *)(v22 + 160) != 3 )
{
google::protobuf::DescriptorBuilder::AddError(
(long long)this,
(_QWORD *)(*((_QWORD *)a2 + 1) + 32LL),
(long long)a3,
3u,
(long long)"Extensions to non-lite types can only be declared in non-lite files. Note that you cannot extend a"
" non-lite type to contain a lite type, but the reverse is allowed.");
}
}
}
}
v23 = *((_QWORD *)a2 + 3);
if ( v23 )
{
v30[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v29 = a2;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v23,
(long long)v30,
(long long)&v29);
}
if ( *((_BYTE *)a2 + 2) == 11
&& *(_BYTE *)(*(_QWORD *)(*((_QWORD *)a2 + 6) + 32LL) + 75LL) == 1
&& !(unsigned __int8)google::protobuf::DescriptorBuilder::ValidateMapEntry(this, a2, a3) )
{
google::protobuf::DescriptorBuilder::AddError(
(long long)this,
(_QWORD *)(*((_QWORD *)a2 + 1) + 32LL),
(long long)a3,
2u,
(long long)"map_entry should not be set explicitly. Use map<KeyType, ValueType> instead.");
}
google::protobuf::DescriptorBuilder::ValidateJSType(this, a2, a3);
if ( (~*((_BYTE *)a2 + 1) & 0xC) == 0 )
{
v24 = *((_QWORD *)a2 + 1);
v25 = *((_BYTE *)a2 + 3) & 0x70;
google::protobuf::`anonymous namespace'::ToJsonName(v30, v24);
v26 = *(void **)(v24 + 2 * v25 + 8);
if ( v26 == v30[1] )
{
v27 = (char *)v30[0];
if ( v26 )
v28 = (unsigned int)bcmp(*(_QWORD *)(v24 + 2 * v25), v30[0], v26) != 0;
else
v28 = 0;
}
else
{
v28 = 1;
v27 = (char *)v30[0];
}
if ( v27 != &v31 )
operator delete(v27);
if ( v28 )
google::protobuf::DescriptorBuilder::AddError(
(long long)this,
(_QWORD *)(*((_QWORD *)a2 + 1) + 32LL),
(long long)a3,
7u,
(long long)"option json_name is not allowed on extension fields.");
}
}
| ValidateFieldOptions:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
CMP byte ptr [RAX + 0x29],0x1
JNZ 0x001d856e
TEST R15,R15
JZ 0x001d8837
MOV RDI,R15
CALL 0x001c0cee
TEST RAX,RAX
JZ 0x001d8837
LAB_001d856e:
MOV RAX,qword ptr [R15 + 0x38]
CMP byte ptr [RAX + 0x51],0x0
JNZ 0x001d857e
CMP byte ptr [RAX + 0x52],0x1
JNZ 0x001d85c7
LAB_001d857e:
MOV RDI,qword ptr [R15 + 0x18]
TEST RDI,RDI
JZ 0x001d85a1
LEA RAX,[0x1dd154]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
MOV RDX,RSP
MOV qword ptr [RDX],R15
CALL 0x00197dfb
LAB_001d85a1:
CMP byte ptr [R15 + 0x2],0xb
JZ 0x001d85c7
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,0x20
LEA R8,[0x26d65c]
MOV RDI,R14
MOV RDX,RBX
MOV ECX,0x2
CALL 0x001ca012
LAB_001d85c7:
MOV RAX,qword ptr [R15 + 0x38]
CMP byte ptr [RAX + 0x50],0x1
JNZ 0x001d862a
MOV AL,byte ptr [R15 + 0x1]
NOT AL
TEST AL,0x60
JNZ 0x001d860b
MOV RDI,qword ptr [R15 + 0x18]
TEST RDI,RDI
JZ 0x001d85fe
LEA RAX,[0x1dd154]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
MOV RDX,RSP
MOV qword ptr [RDX],R15
CALL 0x00197dfb
LAB_001d85fe:
MOVZX EAX,byte ptr [R15 + 0x2]
ADD EAX,-0xd
CMP EAX,-0x4
JC 0x001d862a
LAB_001d860b:
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,0x20
LEA R8,[0x26d697]
MOV RDI,R14
MOV RDX,RBX
MOV ECX,0x2
CALL 0x001ca012
LAB_001d862a:
MOV RAX,qword ptr [R15 + 0x20]
TEST RAX,RAX
JZ 0x001d86ba
MOV RAX,qword ptr [RAX + 0x20]
CMP RAX,qword ptr [0x0030ff60]
JZ 0x001d86ba
CMP byte ptr [RAX + 0x48],0x1
JNZ 0x001d86ba
MOV AL,byte ptr [R15 + 0x1]
TEST AL,0x8
JNZ 0x001d866b
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,0x20
LEA R8,[0x26d6dc]
MOV RDI,R14
MOV RDX,RBX
XOR ECX,ECX
JMP 0x001d86b5
LAB_001d866b:
AND AL,0x60
CMP AL,0x20
JNZ 0x001d869b
MOV RDI,qword ptr [R15 + 0x18]
TEST RDI,RDI
JZ 0x001d8694
LEA RAX,[0x1dd154]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
MOV RDX,RSP
MOV qword ptr [RDX],R15
CALL 0x00197dfb
LAB_001d8694:
CMP byte ptr [R15 + 0x2],0xb
JZ 0x001d86ba
LAB_001d869b:
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,0x20
LEA R8,[0x26aa64]
MOV RDI,R14
MOV RDX,RBX
MOV ECX,0x2
LAB_001d86b5:
CALL 0x001ca012
LAB_001d86ba:
MOV RAX,qword ptr [R15 + 0x10]
TEST RAX,RAX
JZ 0x001d8720
MOV RAX,qword ptr [RAX + 0x78]
CMP RAX,qword ptr [0x0030fe38]
JZ 0x001d8720
CMP dword ptr [RAX + 0xa0],0x3
JNZ 0x001d8720
MOV RAX,qword ptr [R15 + 0x20]
TEST RAX,RAX
JZ 0x001d8720
MOV RAX,qword ptr [RAX + 0x10]
TEST RAX,RAX
JZ 0x001d8701
MOV RAX,qword ptr [RAX + 0x78]
CMP RAX,qword ptr [0x0030fe38]
JZ 0x001d8701
CMP dword ptr [RAX + 0xa0],0x3
JZ 0x001d8720
LAB_001d8701:
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,0x20
LEA R8,[0x26d70d]
MOV RDI,R14
MOV RDX,RBX
MOV ECX,0x3
CALL 0x001ca012
LAB_001d8720:
MOV RDI,qword ptr [R15 + 0x18]
TEST RDI,RDI
JZ 0x001d8743
LEA RAX,[0x1dd154]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
MOV RDX,RSP
MOV qword ptr [RDX],R15
CALL 0x00197dfb
LAB_001d8743:
CMP byte ptr [R15 + 0x2],0xb
JNZ 0x001d8789
MOV RAX,qword ptr [R15 + 0x30]
MOV RAX,qword ptr [RAX + 0x20]
CMP byte ptr [RAX + 0x4b],0x1
JNZ 0x001d8789
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x001d928a
TEST AL,AL
JNZ 0x001d8789
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,0x20
LEA R8,[0x26d7b3]
MOV RDI,R14
MOV RDX,RBX
MOV ECX,0x2
CALL 0x001ca012
LAB_001d8789:
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x001d94e6
MOV AL,byte ptr [R15 + 0x1]
NOT AL
TEST AL,0xc
JNZ 0x001d8837
MOV R13,qword ptr [R15 + 0x8]
MOVZX EBP,byte ptr [R15 + 0x3]
AND EBP,0x70
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R13
CALL 0x001d95e8
MOV RDX,qword ptr [R13 + RBP*0x2 + 0x8]
CMP RDX,qword ptr [R12 + 0x8]
JNZ 0x001d87f5
MOV R12,qword ptr [RSP + 0x8]
TEST RDX,RDX
JZ 0x001d87ff
LEA RAX,[RBP*0x2]
ADD RAX,R13
MOV RDI,qword ptr [RAX]
MOV RSI,R12
CALL 0x0012d2f0
TEST EAX,EAX
SETNZ BPL
JMP 0x001d8801
LAB_001d87f5:
MOV BPL,0x1
MOV R12,qword ptr [RSP + 0x8]
JMP 0x001d8801
LAB_001d87ff:
XOR EBP,EBP
LAB_001d8801:
LEA RAX,[RSP + 0x18]
CMP R12,RAX
JZ 0x001d8813
MOV RDI,R12
CALL 0x0012d160
LAB_001d8813:
TEST BPL,BPL
JZ 0x001d8837
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,0x20
LEA R8,[0x26d800]
MOV RDI,R14
MOV RDX,RBX
MOV ECX,0x7
CALL 0x001ca012
LAB_001d8837:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::DescriptorBuilder::ValidateFieldOptions(google::protobuf::FieldDescriptor*,
google::protobuf::FieldDescriptorProto const&) */
void __thiscall
google::protobuf::DescriptorBuilder::ValidateFieldOptions
(DescriptorBuilder *this,FieldDescriptor *param_1,FieldDescriptorProto *param_2)
{
FieldDescriptor FVar1;
int *puVar2;
string *psVar3;
size_t __n;
code *pcVar4;
char cVar5;
int iVar6;
long lVar7;
int8 uVar8;
char *pcVar9;
bool bVar10;
FieldDescriptor *local_58;
code *local_50;
size_t local_48;
int1 local_40 [16];
if (*(char *)(*(long *)this + 0x29) == '\x01') {
if (param_1 == (FieldDescriptor *)0x0) {
return;
}
lVar7 = FieldDescriptor::message_type(param_1);
if (lVar7 == 0) {
return;
}
}
if ((*(char *)(*(long *)(param_1 + 0x38) + 0x51) != '\0') ||
(*(char *)(*(long *)(param_1 + 0x38) + 0x52) == '\x01')) {
if (*(once_flag **)(param_1 + 0x18) != (once_flag *)0x0) {
local_50 = FieldDescriptor::TypeOnceInit;
local_58 = param_1;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(param_1 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_50,
&local_58);
}
if (param_1[2] != (FieldDescriptor)0xb) {
AddError(this,*(long *)(param_1 + 8) + 0x20,param_2,2,
"[lazy = true] can only be specified for submessage fields.");
}
}
if (*(char *)(*(long *)(param_1 + 0x38) + 0x50) == '\x01') {
if ((~(byte)param_1[1] & 0x60) == 0) {
if (*(once_flag **)(param_1 + 0x18) != (once_flag *)0x0) {
local_50 = FieldDescriptor::TypeOnceInit;
local_58 = param_1;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(param_1 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_50,
&local_58);
}
if ((byte)param_1[2] - 0xd < 0xfffffffc) goto LAB_001d862a;
}
AddError(this,*(long *)(param_1 + 8) + 0x20,param_2,2,
"[packed = true] can only be specified for repeated primitive fields.");
}
LAB_001d862a:
if (((*(long *)(param_1 + 0x20) != 0) &&
(puVar2 = *(int **)(*(long *)(param_1 + 0x20) + 0x20),
puVar2 != PTR__MessageOptions_default_instance__0030ff60)) && (puVar2[0x48] == '\x01')) {
if (((byte)param_1[1] & 8) == 0) {
lVar7 = *(long *)(param_1 + 8);
pcVar9 = "MessageSets cannot have fields, only extensions.";
uVar8 = 0;
}
else {
if (((byte)param_1[1] & 0x60) == 0x20) {
if (*(once_flag **)(param_1 + 0x18) != (once_flag *)0x0) {
local_50 = FieldDescriptor::TypeOnceInit;
local_58 = param_1;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(param_1 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_50,
&local_58);
}
if (param_1[2] == (FieldDescriptor)0xb) goto LAB_001d86ba;
}
lVar7 = *(long *)(param_1 + 8);
pcVar9 = "Extensions of MessageSets must be optional messages.";
uVar8 = 2;
}
AddError(this,lVar7 + 0x20,param_2,uVar8,pcVar9);
}
LAB_001d86ba:
if ((((*(long *)(param_1 + 0x10) != 0) &&
(puVar2 = *(int **)(*(long *)(param_1 + 0x10) + 0x78),
puVar2 != PTR__FileOptions_default_instance__0030fe38)) &&
((*(int *)(puVar2 + 0xa0) == 3 && (*(long *)(param_1 + 0x20) != 0)))) &&
(((lVar7 = *(long *)(*(long *)(param_1 + 0x20) + 0x10), lVar7 == 0 ||
(puVar2 = *(int **)(lVar7 + 0x78),
puVar2 == PTR__FileOptions_default_instance__0030fe38)) || (*(int *)(puVar2 + 0xa0) != 3))))
{
AddError(this,*(long *)(param_1 + 8) + 0x20,param_2,3,
"Extensions to non-lite types can only be declared in non-lite files. Note that you cannot extend a non-lite type to contain a lite type, but the reverse is allowed."
);
}
if (*(once_flag **)(param_1 + 0x18) != (once_flag *)0x0) {
local_50 = FieldDescriptor::TypeOnceInit;
local_58 = param_1;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(param_1 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_50,&local_58
);
}
if (((param_1[2] == (FieldDescriptor)0xb) &&
(*(char *)(*(long *)(*(long *)(param_1 + 0x30) + 0x20) + 0x4b) == '\x01')) &&
(cVar5 = ValidateMapEntry(this,param_1,param_2), cVar5 == '\0')) {
AddError(this,*(long *)(param_1 + 8) + 0x20,param_2,2,
"map_entry should not be set explicitly. Use map<KeyType, ValueType> instead.");
}
ValidateJSType(this,param_1,param_2);
if ((~(byte)param_1[1] & 0xc) == 0) {
psVar3 = *(string **)(param_1 + 8);
FVar1 = param_1[3];
(anonymous_namespace)::ToJsonName((_anonymous_namespace_ *)&local_50,psVar3);
pcVar4 = local_50;
__n = *(size_t *)(psVar3 + (ulong)((byte)FVar1 & 0x70) * 2 + 8);
if (__n == local_48) {
if (__n == 0) {
bVar10 = false;
}
else {
iVar6 = bcmp(*(void **)(psVar3 + (ulong)((byte)FVar1 & 0x70) * 2),local_50,__n);
bVar10 = iVar6 != 0;
}
}
else {
bVar10 = true;
}
if (pcVar4 != (code *)local_40) {
operator_delete(pcVar4);
}
if (bVar10) {
AddError(this,*(long *)(param_1 + 8) + 0x20,param_2,7,
"option json_name is not allowed on extension fields.");
}
}
return;
}
| |
37,475 | mjCFlexcomp::MakeGMSH(mjCModel*, char*, int) | aimrt_mujoco_sim/_deps/mujoco-src/src/user/user_flexcomp.cc | bool mjCFlexcomp::MakeGMSH(mjCModel* model, char* error, int error_sz) {
// strip path
if (!file.empty() && model->spec.strippath) {
file = mjuu_strippath(file);
}
// file is required
if (file.empty()) {
return comperr(error, "File is required", error_sz);
}
// open resource
std::string filename = mjuu_makefullname(mjs_getString(model->spec.modelfiledir),
mjs_getString(model->spec.meshdir), file);
mjResource* resource = nullptr;
try {
resource = mjCBase::LoadResource(filename, 0);
} catch (mjCError err) {
return comperr(error, err.message, error_sz);
}
// try to load, close resource properly
try {
LoadGMSH(model, resource);
mju_closeResource(resource);
} catch (mjCError err) {
mju_closeResource(resource);
return comperr(error, err.message, error_sz);
} catch (...) {
mju_closeResource(resource);
return comperr(error, "exception while reading GMSH file", error_sz);
}
return true;
} | O0 | cpp | mjCFlexcomp::MakeGMSH(mjCModel*, char*, int):
subq $0x578, %rsp # imm = 0x578
movq %rdi, 0x568(%rsp)
movq %rsi, 0x560(%rsp)
movq %rdx, 0x558(%rsp)
movl %ecx, 0x554(%rsp)
movq 0x568(%rsp), %rdi
movq %rdi, 0x48(%rsp)
addq $0x78, %rdi
callq 0x4b7a0
testb $0x1, %al
jne 0x341770
movq 0x560(%rsp), %rax
cmpb $0x0, 0x7d9(%rax)
je 0x341770
movq 0x48(%rsp), %rsi
addq $0x78, %rsi
leaq 0x510(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x4b290
movq 0x40(%rsp), %rsi
leaq 0x530(%rsp), %rdi
callq 0x413a50
jmp 0x341718
movq 0x48(%rsp), %rdi
addq $0x78, %rdi
leaq 0x530(%rsp), %rsi
callq 0x4ac00
leaq 0x530(%rsp), %rdi
callq 0x4a160
leaq 0x510(%rsp), %rdi
callq 0x4a160
jmp 0x341770
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x508(%rsp)
movl %eax, 0x504(%rsp)
leaq 0x510(%rsp), %rdi
callq 0x4a160
jmp 0x341c53
movq 0x48(%rsp), %rdi
addq $0x78, %rdi
callq 0x4b7a0
testb $0x1, %al
jne 0x341784
jmp 0x3417ad
movq 0x558(%rsp), %rdi
movl 0x554(%rsp), %edx
leaq 0x1e8d74(%rip), %rsi # 0x52a50e
callq 0x33f390
andb $0x1, %al
movb %al, 0x577(%rsp)
jmp 0x341c42
movq 0x560(%rsp), %rax
movq 0xc78(%rax), %rdi
callq 0x4b840
movq %rax, 0x30(%rsp)
leaq 0x4bf(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x4a120
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x4c0(%rsp), %rdi
callq 0xe8b30
jmp 0x3417f1
movq 0x560(%rsp), %rax
movq 0x7e0(%rax), %rdi
callq 0x4b840
movq %rax, 0x28(%rsp)
jmp 0x34180c
leaq 0x497(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x4a120
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x498(%rsp), %rdi
callq 0xe8b30
jmp 0x341837
movq 0x48(%rsp), %rsi
addq $0x78, %rsi
leaq 0x470(%rsp), %rdi
callq 0x4b290
jmp 0x34184f
leaq 0x4e0(%rsp), %rdi
leaq 0x4c0(%rsp), %rsi
leaq 0x498(%rsp), %rdx
leaq 0x470(%rsp), %rcx
callq 0x413e40
jmp 0x341876
leaq 0x470(%rsp), %rdi
callq 0x4a160
leaq 0x498(%rsp), %rdi
callq 0x4a160
leaq 0x497(%rsp), %rdi
callq 0x4a140
leaq 0x4c0(%rsp), %rdi
callq 0x4a160
leaq 0x4bf(%rsp), %rdi
callq 0x4a140
movq $0x0, 0x468(%rsp)
leaq 0x448(%rsp), %rdi
leaq 0x4e0(%rsp), %rsi
callq 0x4b290
jmp 0x3418da
xorl %eax, %eax
movl %eax, %esi
leaq 0x448(%rsp), %rdi
callq 0x3e3640
movq %rax, 0x18(%rsp)
jmp 0x3418f2
movq 0x18(%rsp), %rax
movq %rax, 0x468(%rsp)
leaq 0x448(%rsp), %rdi
callq 0x4a160
jmp 0x341ab4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x508(%rsp)
movl %eax, 0x504(%rsp)
jmp 0x3419b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x508(%rsp)
movl %eax, 0x504(%rsp)
jmp 0x3419a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x508(%rsp)
movl %eax, 0x504(%rsp)
jmp 0x34199a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x508(%rsp)
movl %eax, 0x504(%rsp)
jmp 0x34198d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x508(%rsp)
movl %eax, 0x504(%rsp)
leaq 0x470(%rsp), %rdi
callq 0x4a160
leaq 0x498(%rsp), %rdi
callq 0x4a160
leaq 0x497(%rsp), %rdi
callq 0x4a140
leaq 0x4c0(%rsp), %rdi
callq 0x4a160
leaq 0x4bf(%rsp), %rdi
callq 0x4a140
jmp 0x341c53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x508(%rsp)
movl %eax, 0x504(%rsp)
jmp 0x3419fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x508(%rsp)
movl %eax, 0x504(%rsp)
leaq 0x448(%rsp), %rdi
callq 0x4a160
movl 0x504(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x341c33
movq 0x508(%rsp), %rdi
callq 0x4a2b0
movq %rax, %rsi
leaq 0x253(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl $0x1f5, %edx # imm = 0x1F5
callq 0x49570
movq 0x8(%rsp), %rsi
movq 0x558(%rsp), %rdi
movl 0x554(%rsp), %edx
callq 0x33f390
movb %al, 0x17(%rsp)
jmp 0x341a57
movb 0x17(%rsp), %al
andb $0x1, %al
movb %al, 0x577(%rsp)
movl $0x1, 0x24c(%rsp)
callq 0x4a510
jmp 0x341a91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x508(%rsp)
movl %eax, 0x504(%rsp)
callq 0x4a510
jmp 0x341aaf
jmp 0x341c24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x508(%rsp)
movl %eax, 0x504(%rsp)
jmp 0x341c33
jmp 0x341c33
movq 0x48(%rsp), %rdi
movq 0x560(%rsp), %rsi
movq 0x468(%rsp), %rdx
callq 0x342880
jmp 0x341ad0
movq 0x468(%rsp), %rdi
callq 0x4a660
jmp 0x341adf
jmp 0x341c11
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x508(%rsp)
movl %eax, 0x504(%rsp)
movl 0x504(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x341b77
movq 0x508(%rsp), %rdi
callq 0x4a2b0
movq %rax, %rsi
leaq 0x57(%rsp), %rdi
movl $0x1f5, %edx # imm = 0x1F5
callq 0x49570
movq 0x468(%rsp), %rdi
callq 0x4a660
jmp 0x341b36
movq 0x558(%rsp), %rdi
movl 0x554(%rsp), %edx
leaq 0x57(%rsp), %rsi
callq 0x33f390
movb %al, 0x7(%rsp)
jmp 0x341b55
movb 0x7(%rsp), %al
andb $0x1, %al
movb %al, 0x577(%rsp)
movl $0x1, 0x24c(%rsp)
callq 0x4a510
jmp 0x341c0d
movq 0x508(%rsp), %rdi
callq 0x4a2b0
movq 0x468(%rsp), %rdi
callq 0x4a660
jmp 0x341b93
movq 0x558(%rsp), %rdi
movl 0x554(%rsp), %edx
leaq 0x1e8a30(%rip), %rsi # 0x52a5d9
callq 0x33f390
movb %al, 0x6(%rsp)
jmp 0x341bb4
movb 0x6(%rsp), %al
andb $0x1, %al
movb %al, 0x577(%rsp)
movl $0x1, 0x24c(%rsp)
callq 0x4a510
jmp 0x341bee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x508(%rsp)
movl %eax, 0x504(%rsp)
callq 0x4a510
jmp 0x341bf0
jmp 0x341c24
jmp 0x341c33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x508(%rsp)
movl %eax, 0x504(%rsp)
callq 0x4a510
jmp 0x341c0f
jmp 0x341c24
jmp 0x341c33
movb $0x1, 0x577(%rsp)
movl $0x1, 0x24c(%rsp)
leaq 0x4e0(%rsp), %rdi
callq 0x4a160
jmp 0x341c42
leaq 0x4e0(%rsp), %rdi
callq 0x4a160
jmp 0x341c53
movb 0x577(%rsp), %al
andb $0x1, %al
addq $0x578, %rsp # imm = 0x578
retq
movq 0x508(%rsp), %rdi
callq 0x4a070
movq %rax, %rdi
callq 0xe9060
nopl (%rax,%rax)
| _ZN11mjCFlexcomp8MakeGMSHEP8mjCModelPci:
sub rsp, 578h
mov [rsp+578h+var_10], rdi
mov [rsp+578h+var_18], rsi
mov [rsp+578h+var_20], rdx
mov [rsp+578h+var_24], ecx
mov rdi, [rsp+578h+var_10]
mov [rsp+578h+var_530], rdi
add rdi, 78h ; 'x'
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_341770
mov rax, [rsp+578h+var_18]
cmp byte ptr [rax+7D9h], 0
jz loc_341770
mov rsi, [rsp+578h+var_530]
add rsi, 78h ; 'x'
lea rdi, [rsp+578h+var_68]
mov [rsp+578h+var_538], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
mov rsi, [rsp+578h+var_538]
lea rdi, [rsp+578h+var_48]
call _Z14mjuu_strippathNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; mjuu_strippath(std::string)
jmp short $+2
loc_341718:
mov rdi, [rsp+578h+var_530]
add rdi, 78h ; 'x'
lea rsi, [rsp+578h+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rsp+578h+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+578h+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_341770
mov rcx, rax
mov eax, edx
mov [rsp+578h+var_70], rcx
mov [rsp+578h+var_74], eax
lea rdi, [rsp+578h+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_341C53
loc_341770:
mov rdi, [rsp+578h+var_530]
add rdi, 78h ; 'x'
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_341784
jmp short loc_3417AD
loc_341784:
mov rdi, [rsp+578h+var_20]; char *
mov edx, [rsp+578h+var_24]; int
lea rsi, aFileIsRequired; "File is required"
call _ZL7comperrPcPKci_0; comperr(char *,char const*,int)
and al, 1
mov [rsp+578h+var_1], al
jmp loc_341C42
loc_3417AD:
mov rax, [rsp+578h+var_18]
mov rdi, [rax+0C78h]
call _mjs_getString
mov [rsp+578h+var_548], rax
lea rdi, [rsp+578h+var_B9]
mov [rsp+578h+var_540], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+578h+var_548]
mov rdx, [rsp+578h+var_540]
lea rdi, [rsp+578h+var_B8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_3417F1:
mov rax, [rsp+578h+var_18]
mov rdi, [rax+7E0h]
call _mjs_getString
mov [rsp+578h+var_550], rax
jmp short $+2
loc_34180C:
lea rdi, [rsp+578h+var_E1]
mov [rsp+578h+var_558], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+578h+var_550]
mov rdx, [rsp+578h+var_558]
lea rdi, [rsp+578h+var_E0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_341837:
mov rsi, [rsp+578h+var_530]
add rsi, 78h ; 'x'
lea rdi, [rsp+578h+var_108]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_34184F:
lea rdi, [rsp+578h+var_98]
lea rsi, [rsp+578h+var_B8]
lea rdx, [rsp+578h+var_E0]
lea rcx, [rsp+578h+var_108]
call _Z17mjuu_makefullnameNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_S4_; mjuu_makefullname(std::string,std::string,std::string)
jmp short $+2
loc_341876:
lea rdi, [rsp+578h+var_108]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+578h+var_E0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+578h+var_E1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+578h+var_B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+578h+var_B9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov [rsp+578h+var_110], 0
lea rdi, [rsp+578h+var_130]
lea rsi, [rsp+578h+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&)
jmp short $+2
loc_3418DA:
xor eax, eax
mov esi, eax
lea rdi, [rsp+578h+var_130]
call _ZN7mjCBase12LoadResourceENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPK6mjVFS_; mjCBase::LoadResource(std::string,mjVFS_ const*)
mov [rsp+578h+var_560], rax
jmp short $+2
loc_3418F2:
mov rax, [rsp+578h+var_560]
mov [rsp+578h+var_110], rax
lea rdi, [rsp+578h+var_130]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_341AB4
mov rcx, rax
mov eax, edx
mov [rsp+578h+var_70], rcx
mov [rsp+578h+var_74], eax
jmp loc_3419B4
mov rcx, rax
mov eax, edx
mov [rsp+578h+var_70], rcx
mov [rsp+578h+var_74], eax
jmp short loc_3419A7
mov rcx, rax
mov eax, edx
mov [rsp+578h+var_70], rcx
mov [rsp+578h+var_74], eax
jmp short loc_34199A
mov rcx, rax
mov eax, edx
mov [rsp+578h+var_70], rcx
mov [rsp+578h+var_74], eax
jmp short loc_34198D
mov rcx, rax
mov eax, edx
mov [rsp+578h+var_70], rcx
mov [rsp+578h+var_74], eax
lea rdi, [rsp+578h+var_108]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_34198D:
lea rdi, [rsp+578h+var_E0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_34199A:
lea rdi, [rsp+578h+var_E1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_3419A7:
lea rdi, [rsp+578h+var_B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3419B4:
lea rdi, [rsp+578h+var_B9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_341C53
mov rcx, rax
mov eax, edx
mov [rsp+578h+var_70], rcx
mov [rsp+578h+var_74], eax
jmp short loc_3419FD
mov rcx, rax
mov eax, edx
mov [rsp+578h+var_70], rcx
mov [rsp+578h+var_74], eax
lea rdi, [rsp+578h+var_130]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3419FD:
mov eax, [rsp+578h+var_74]
mov ecx, 1
cmp eax, ecx
jnz loc_341C33
mov rdi, [rsp+578h+var_70]; void *
call ___cxa_begin_catch
mov rsi, rax
lea rdi, [rsp+578h+var_325]
mov [rsp+578h+var_570], rdi
mov edx, 1F5h
call _memcpy
mov rsi, [rsp+578h+var_570]; char *
mov rdi, [rsp+578h+var_20]; char *
mov edx, [rsp+578h+var_24]; int
call _ZL7comperrPcPKci_0; comperr(char *,char const*,int)
mov [rsp+578h+var_561], al
jmp short $+2
loc_341A57:
mov al, [rsp+578h+var_561]
and al, 1
mov [rsp+578h+var_1], al
mov [rsp+578h+var_32C], 1
call ___cxa_end_catch
jmp short loc_341A91
mov rcx, rax
mov eax, edx
mov [rsp+578h+var_70], rcx
mov [rsp+578h+var_74], eax
call ___cxa_end_catch
jmp short loc_341AAF
loc_341A91:
jmp loc_341C24
mov rcx, rax
mov eax, edx
mov [rsp+578h+var_70], rcx
mov [rsp+578h+var_74], eax
jmp loc_341C33
loc_341AAF:
jmp loc_341C33
loc_341AB4:
mov rdi, [rsp+578h+var_530]
mov rsi, [rsp+578h+var_18]
mov rdx, [rsp+578h+var_110]
call _ZN11mjCFlexcomp8LoadGMSHEP8mjCModelP11mjResource_; mjCFlexcomp::LoadGMSH(mjCModel *,mjResource_ *)
jmp short $+2
loc_341AD0:
mov rdi, [rsp+578h+var_110]
call _mju_closeResource
jmp short $+2
loc_341ADF:
jmp loc_341C11
mov rcx, rax
mov eax, edx
mov [rsp+578h+var_70], rcx
mov [rsp+578h+var_74], eax
mov eax, [rsp+578h+var_74]
mov ecx, 1
cmp eax, ecx
jnz short loc_341B77
mov rdi, [rsp+578h+var_70]; void *
call ___cxa_begin_catch
mov rsi, rax
lea rdi, [rsp+578h+var_521]
mov edx, 1F5h
call _memcpy
mov rdi, [rsp+578h+var_110]
call _mju_closeResource
jmp short $+2
loc_341B36:
mov rdi, [rsp+578h+var_20]; char *
mov edx, [rsp+578h+var_24]; int
lea rsi, [rsp+578h+var_521]; char *
call _ZL7comperrPcPKci_0; comperr(char *,char const*,int)
mov [rsp+578h+var_571], al
jmp short $+2
loc_341B55:
mov al, [rsp+578h+var_571]
and al, 1
mov [rsp+578h+var_1], al
mov [rsp+578h+var_32C], 1
call ___cxa_end_catch
jmp loc_341C0D
loc_341B77:
mov rdi, [rsp+578h+var_70]; void *
call ___cxa_begin_catch
mov rdi, [rsp+578h+var_110]
call _mju_closeResource
jmp short $+2
loc_341B93:
mov rdi, [rsp+578h+var_20]; char *
mov edx, [rsp+578h+var_24]; int
lea rsi, aExceptionWhile; "exception while reading GMSH file"
call _ZL7comperrPcPKci_0; comperr(char *,char const*,int)
mov [rsp+578h+var_572], al
jmp short $+2
loc_341BB4:
mov al, [rsp+578h+var_572]
and al, 1
mov [rsp+578h+var_1], al
mov [rsp+578h+var_32C], 1
call ___cxa_end_catch
jmp short loc_341BEE
mov rcx, rax
mov eax, edx
mov [rsp+578h+var_70], rcx
mov [rsp+578h+var_74], eax
call ___cxa_end_catch
jmp short loc_341BF0
loc_341BEE:
jmp short loc_341C24
loc_341BF0:
jmp short loc_341C33
mov rcx, rax
mov eax, edx
mov [rsp+578h+var_70], rcx
mov [rsp+578h+var_74], eax
call ___cxa_end_catch
jmp short loc_341C0F
loc_341C0D:
jmp short loc_341C24
loc_341C0F:
jmp short loc_341C33
loc_341C11:
mov [rsp+578h+var_1], 1
mov [rsp+578h+var_32C], 1
loc_341C24:
lea rdi, [rsp+578h+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_341C42
loc_341C33:
lea rdi, [rsp+578h+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_341C53
loc_341C42:
mov al, [rsp+578h+var_1]
and al, 1
add rsp, 578h
retn
loc_341C53:
mov rdi, [rsp+578h+var_70]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| char mjCFlexcomp::MakeGMSH(mjCFlexcomp *this, mjCModel *a2, char *a3, int a4, double a5)
{
int v5; // r8d
int v6; // r9d
int v8; // [rsp+0h] [rbp-578h]
int v9; // [rsp+8h] [rbp-570h]
int v10; // [rsp+10h] [rbp-568h]
int v11; // [rsp+18h] [rbp-560h]
long long v12; // [rsp+28h] [rbp-550h]
long long String; // [rsp+30h] [rbp-548h]
_BYTE *v14; // [rsp+40h] [rbp-538h]
long long v15; // [rsp+48h] [rbp-530h]
char v16; // [rsp+50h] [rbp-528h]
int v17; // [rsp+58h] [rbp-520h]
int v18; // [rsp+60h] [rbp-518h]
_BYTE v19[32]; // [rsp+448h] [rbp-130h] BYREF
long long Resource; // [rsp+468h] [rbp-110h]
_BYTE v21[39]; // [rsp+470h] [rbp-108h] BYREF
char v22; // [rsp+497h] [rbp-E1h] BYREF
_BYTE v23[39]; // [rsp+498h] [rbp-E0h] BYREF
char v24; // [rsp+4BFh] [rbp-B9h] BYREF
_BYTE v25[32]; // [rsp+4C0h] [rbp-B8h] BYREF
_BYTE v26[36]; // [rsp+4E0h] [rbp-98h] BYREF
_BYTE v27[32]; // [rsp+510h] [rbp-68h] BYREF
_BYTE v28[36]; // [rsp+530h] [rbp-48h] BYREF
int v29; // [rsp+554h] [rbp-24h]
char *v30; // [rsp+558h] [rbp-20h]
mjCModel *v31; // [rsp+560h] [rbp-18h]
mjCFlexcomp *v32; // [rsp+568h] [rbp-10h]
char v33; // [rsp+577h] [rbp-1h]
v32 = this;
v31 = a2;
v30 = a3;
v29 = a4;
if ( (std::string::empty((char *)this + 120) & 1) == 0 && *((_BYTE *)v31 + 2009) )
{
v14 = v27;
std::string::basic_string(v27, (char *)this + 120);
mjuu_strippath(v28, v27);
std::string::operator=((char *)this + 120, v28);
std::string::~string(v28);
std::string::~string(v27);
}
if ( (std::string::empty((char *)this + 120) & 1) != 0 )
{
v33 = comperr(v30, "File is required", v29) & 1;
}
else
{
String = mjs_getString(*((_QWORD *)v31 + 399));
std::allocator<char>::allocator(a5);
std::string::basic_string<std::allocator<char>>((long long)v25, String, (long long)&v24);
v12 = mjs_getString(*((_QWORD *)v31 + 252));
std::allocator<char>::allocator(a5);
std::string::basic_string<std::allocator<char>>((long long)v23, v12, (long long)&v22);
std::string::basic_string(v21, (char *)this + 120);
mjuu_makefullname(
(unsigned int)v26,
(unsigned int)v25,
(unsigned int)v23,
(unsigned int)v21,
v5,
v6,
v8,
v9,
v10,
v11,
(unsigned int)&v22,
v12,
String,
(unsigned int)&v24,
(_DWORD)v14,
(_DWORD)this,
v16,
v17,
v18);
std::string::~string(v21);
std::string::~string(v23);
std::allocator<char>::~allocator(&v22);
std::string::~string(v25);
std::allocator<char>::~allocator(&v24);
Resource = 0LL;
std::string::basic_string(v19, v26);
Resource = mjCBase::LoadResource(v19, 0LL);
std::string::~string(v19);
mjCFlexcomp::LoadGMSH(v15, v31, Resource);
mju_closeResource(Resource);
v33 = 1;
std::string::~string(v26);
}
return v33 & 1;
}
| |||
37,476 | mjCFlexcomp::MakeGMSH(mjCModel*, char*, int) | aimrt_mujoco_sim/_deps/mujoco-src/src/user/user_flexcomp.cc | bool mjCFlexcomp::MakeGMSH(mjCModel* model, char* error, int error_sz) {
// strip path
if (!file.empty() && model->spec.strippath) {
file = mjuu_strippath(file);
}
// file is required
if (file.empty()) {
return comperr(error, "File is required", error_sz);
}
// open resource
std::string filename = mjuu_makefullname(mjs_getString(model->spec.modelfiledir),
mjs_getString(model->spec.meshdir), file);
mjResource* resource = nullptr;
try {
resource = mjCBase::LoadResource(filename, 0);
} catch (mjCError err) {
return comperr(error, err.message, error_sz);
}
// try to load, close resource properly
try {
LoadGMSH(model, resource);
mju_closeResource(resource);
} catch (mjCError err) {
mju_closeResource(resource);
return comperr(error, err.message, error_sz);
} catch (...) {
mju_closeResource(resource);
return comperr(error, "exception while reading GMSH file", error_sz);
}
return true;
} | O3 | cpp | mjCFlexcomp::MakeGMSH(mjCModel*, char*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2c8, %rsp # imm = 0x2C8
movl %ecx, %r13d
movq %rdx, %r14
movq 0x80(%rdi), %rdx
testq %rdx, %rdx
je 0xcd4a2
movq %rsi, %r12
movq %rdi, %r15
cmpb $0x0, 0x7d9(%rsi)
je 0xcd343
movq %r14, %rbx
movl %r13d, %r14d
leaq 0x78(%r15), %r13
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r13), %rsi
addq %rsi, %rdx
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
callq 0x2e7a0
leaq 0xd0(%rsp), %rdi
movq %rbp, %rsi
callq 0x128fa2
leaq 0xd0(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2e680
movq (%rbp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0xcd313
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x2ded0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
movl %r14d, %r13d
je 0xcd332
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2ded0
cmpq $0x0, 0x80(%r15)
movq %rbx, %r14
je 0xcd4a2
movq 0xc78(%r12), %rdi
callq 0x2e9b0
leaq 0xb0(%rsp), %rdi
leaq 0xd0(%rsp), %rdx
movq %rax, %rsi
callq 0x7caf2
movq 0x7e0(%r12), %rdi
callq 0x2e9b0
leaq 0x90(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0x7caf2
leaq 0x60(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x78(%r15), %rsi
movq 0x80(%r15), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x2e7a0
leaq 0x70(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x90(%rsp), %rdx
leaq 0x50(%rsp), %rcx
callq 0x129178
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0xcd3e1
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2ded0
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcd402
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x2ded0
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcd423
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x2ded0
leaq 0x40(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x2e7a0
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x1114b0
movq %rax, %r12
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0xcd469
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2ded0
movq %r15, %rdi
movq %r12, %rdx
callq 0xcda18
movb $0x1, %bpl
movq %r12, %rdi
callq 0x2e150
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcd4b6
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x2ded0
jmp 0xcd4b6
leaq 0x102751(%rip), %rsi # 0x1cfbfa
movq %r14, %rdi
movl %r13d, %edx
callq 0x2e4e0
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x2c8, %rsp # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xcd5d0
movq 0x20(%rsp), %rsi
jmp 0xcd5c3
movq %rdx, %r12
movq %rax, %r15
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0xcd50f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2ded0
jmp 0xcd50f
movq %rdx, %r12
movq %rax, %r15
cmpl $0x1, %r12d
jne 0xcd660
movq %r15, %rdi
callq 0x2e700
leaq 0xd0(%rsp), %r15
movl $0x1f5, %edx # imm = 0x1F5
movq %r15, %rdi
movq %rax, %rsi
callq 0x2d3b0
movq %r14, %rdi
movq %r15, %rsi
movl %r13d, %edx
callq 0x2e4e0
callq 0x2e800
jmp 0xcd640
jmp 0xcd649
movq %rax, %r15
callq 0x2e800
jmp 0xcd660
movq %rax, %r15
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0xcd582
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2ded0
jmp 0xcd582
movq %rax, %r15
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcd5aa
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x2ded0
jmp 0xcd5aa
jmp 0xcd5a7
movq %rax, %r15
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcd5d0
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x2ded0
jmp 0xcd5d0
movq %rax, %r15
movq %r15, %rdi
callq 0x2dee0
movq %rax, %rdi
cmpl $0x1, %edx
jne 0xcd61c
callq 0x2e700
leaq 0xd0(%rsp), %rdi
movl $0x1f5, %edx # imm = 0x1F5
movq %rax, %rsi
callq 0x2d3b0
movq %r12, %rdi
callq 0x2e150
leaq 0xd0(%rsp), %rsi
movq %r14, %rdi
movl %r13d, %edx
callq 0x2e4e0
callq 0x2e800
jmp 0xcd640
callq 0x2e700
movq %r12, %rdi
callq 0x2e150
leaq 0x102695(%rip), %rsi # 0x1cfcc5
movq %r14, %rdi
movl %r13d, %edx
callq 0x2e4e0
callq 0x2e800
xorl %ebp, %ebp
jmp 0xcd47f
jmp 0xcd649
movq %rax, %r15
jmp 0xcd660
movq %rax, %r15
callq 0x2e800
jmp 0xcd660
movq %rax, %r15
callq 0x2e800
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcd5d0
movq 0x80(%rsp), %rsi
jmp 0xcd5c3
movq %rax, %rdi
callq 0xb8290
| _ZN11mjCFlexcomp8MakeGMSHEP8mjCModelPci:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2C8h
mov r13d, ecx
mov r14, rdx
mov rdx, [rdi+80h]
test rdx, rdx
jz loc_CD4A2
mov r12, rsi
mov r15, rdi
cmp byte ptr [rsi+7D9h], 0
jz loc_CD343
mov rbx, r14
mov r14d, r13d
lea r13, [r15+78h]
lea rax, [rsp+2F8h+var_2D8]
mov [rax-10h], rax
mov rsi, [r13+0]
add rdx, rsi
lea rbp, [rsp+2F8h+var_2E8]
mov rdi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rsp+2F8h+var_228]
mov rsi, rbp
call _Z14mjuu_strippathNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; mjuu_strippath(std::string)
lea rbp, [rsp+2F8h+var_228]
mov rdi, r13
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rbp+0]; void *
lea rax, [rsp+2F8h+var_218]
cmp rdi, rax
jz short loc_CD313
mov rsi, [rsp+2F8h+var_218]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CD313:
mov rdi, [rsp+2F8h+var_2E8]; void *
lea rax, [rsp+2F8h+var_2D8]
cmp rdi, rax
mov r13d, r14d
jz short loc_CD332
mov rsi, [rsp+2F8h+var_2D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CD332:
cmp qword ptr [r15+80h], 0
mov r14, rbx
jz loc_CD4A2
loc_CD343:
mov rdi, [r12+0C78h]
call _mjs_getString
lea rdi, [rsp+2F8h+var_248]
lea rdx, [rsp+2F8h+var_228]
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, [r12+7E0h]
call _mjs_getString
lea rdi, [rsp+2F8h+var_268]
lea rdx, [rsp+2F8h+var_2E9]
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rbx, [rsp+2F8h+var_298]
mov [rbx-10h], rbx
mov rsi, [r15+78h]
mov rdx, [r15+80h]
add rdx, rsi
lea rdi, [rsp+2F8h+var_2A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rsp+2F8h+var_288]; int
lea rsi, [rsp+2F8h+var_248]; int
lea rdx, [rsp+2F8h+var_268]; int
lea rcx, [rsp+2F8h+var_2A8]; int
call _Z17mjuu_makefullnameNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_S4_; mjuu_makefullname(std::string,std::string,std::string)
mov rdi, [rsp+2F8h+var_2A8]; void *
cmp rdi, rbx
jz short loc_CD3E1
mov rsi, [rsp+2F8h+var_298]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CD3E1:
lea rax, [rsp+2F8h+var_258]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CD402
mov rsi, [rsp+2F8h+var_258]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CD402:
lea rax, [rsp+2F8h+var_238]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CD423
mov rsi, [rsp+2F8h+var_238]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CD423:
lea rbx, [rsp+2F8h+var_2B8]
mov [rbx-10h], rbx
mov rsi, qword ptr [rsp+2F8h+var_288]
mov rdx, [rsp+2F8h+var_280]
add rdx, rsi
lea rdi, [rsp+2F8h+var_2C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rsp+2F8h+var_2C8]
xor esi, esi
call _ZN7mjCBase12LoadResourceENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPK6mjVFS_; mjCBase::LoadResource(std::string,mjVFS_ const*)
mov r12, rax
mov rdi, [rsp+2F8h+var_2C8]; void *
cmp rdi, rbx
jz short loc_CD469
mov rsi, [rsp+2F8h+var_2B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CD469:
mov rdi, r15; this
mov rdx, r12
call _ZN11mjCFlexcomp8LoadGMSHEP8mjCModelP11mjResource_; mjCFlexcomp::LoadGMSH(mjCModel *,mjResource_ *)
mov bpl, 1
mov rdi, r12
call _mju_closeResource
loc_CD47F:
lea rax, [rsp+2F8h+var_278]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CD4B6
mov rsi, [rsp+2F8h+var_278]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CD4B6
loc_CD4A2:
lea rsi, aFileIsRequired; "File is required"
mov rdi, r14
mov edx, r13d
call _mju_strncpy
xor ebp, ebp
loc_CD4B6:
mov eax, ebp
add rsp, 2C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r15, rax
mov rdi, [rsp+2F8h+var_2E8]
lea rax, [rsp+2F8h+var_2D8]
cmp rdi, rax
jz loc_CD5D0
mov rsi, [rsp+2F8h+var_2D8]
jmp loc_CD5C3
mov r12, rdx
mov r15, rax
mov rdi, [rsp+2F8h+var_2C8]; void *
cmp rdi, rbx
jz short loc_CD50F
mov rsi, [rsp+2F8h+var_2B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CD50F
mov r12, rdx
mov r15, rax
loc_CD50F:
cmp r12d, 1
jnz loc_CD660
mov rdi, r15; void *
call ___cxa_begin_catch
lea r15, [rsp+2F8h+var_228]
mov edx, 1F5h
mov rdi, r15
mov rsi, rax
call _memcpy
mov rdi, r14
mov rsi, r15
mov edx, r13d
call _mju_strncpy
call ___cxa_end_catch
jmp loc_CD640
jmp loc_CD649
mov r15, rax
call ___cxa_end_catch
jmp loc_CD660
mov r15, rax
mov rdi, [rsp+2F8h+var_2A8]; void *
cmp rdi, rbx
jz short loc_CD582
mov rsi, [rsp+2F8h+var_298]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CD582
mov r15, rax
loc_CD582:
lea rax, [rsp+2F8h+var_258]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CD5AA
mov rsi, [rsp+2F8h+var_258]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CD5AA
jmp short $+2
loc_CD5A7:
mov r15, rax
loc_CD5AA:
lea rax, [rsp+2F8h+var_238]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CD5D0
mov rsi, [rsp+2F8h+var_238]
loc_CD5C3:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CD5D0
mov r15, rax
loc_CD5D0:
mov rdi, r15
call __Unwind_Resume
mov rdi, rax; void *
cmp edx, 1
jnz short loc_CD61C
call ___cxa_begin_catch
lea rdi, [rsp+2F8h+var_228]
mov edx, 1F5h
mov rsi, rax
call _memcpy
mov rdi, r12
call _mju_closeResource
lea rsi, [rsp+2F8h+var_228]
mov rdi, r14
mov edx, r13d
call _mju_strncpy
call ___cxa_end_catch
jmp short loc_CD640
loc_CD61C:
call ___cxa_begin_catch
mov rdi, r12
call _mju_closeResource
lea rsi, aExceptionWhile; "exception while reading GMSH file"
mov rdi, r14
mov edx, r13d
call _mju_strncpy
call ___cxa_end_catch
loc_CD640:
xor ebp, ebp
jmp loc_CD47F
jmp short $+2
loc_CD649:
mov r15, rax
jmp short loc_CD660
mov r15, rax
call ___cxa_end_catch
jmp short loc_CD660
mov r15, rax
call ___cxa_end_catch
loc_CD660:
lea rax, [rsp+2F8h+var_278]
mov rdi, [rax-10h]
cmp rdi, rax
jz loc_CD5D0
mov rsi, [rsp+2F8h+var_278]
jmp loc_CD5C3
mov rdi, rax
call __clang_call_terminate
| long long mjCFlexcomp::MakeGMSH(mjCFlexcomp *this, mjCModel *a2, char *a3, unsigned int a4)
{
void **v4; // rbp
long long v7; // rdx
double v8; // xmm0_8
long long String; // rax
long long v10; // rax
int v11; // r8d
int v12; // r9d
double v13; // xmm0_8
long long v14; // r12
long long v16; // [rsp+0h] [rbp-2F8h]
int v17; // [rsp+8h] [rbp-2F0h]
void *v18; // [rsp+10h] [rbp-2E8h] BYREF
int v19; // [rsp+18h] [rbp-2E0h]
void *v20; // [rsp+20h] [rbp-2D8h] BYREF
int v21; // [rsp+28h] [rbp-2D0h]
void *v22; // [rsp+30h] [rbp-2C8h] BYREF
int v23; // [rsp+38h] [rbp-2C0h]
long long v24; // [rsp+40h] [rbp-2B8h] BYREF
int v25; // [rsp+48h] [rbp-2B0h]
void *v26[2]; // [rsp+50h] [rbp-2A8h] BYREF
_QWORD v27[2]; // [rsp+60h] [rbp-298h] BYREF
int v28[2]; // [rsp+70h] [rbp-288h] BYREF
long long v29; // [rsp+78h] [rbp-280h]
long long v30; // [rsp+80h] [rbp-278h] BYREF
int v31[4]; // [rsp+90h] [rbp-268h] BYREF
long long v32; // [rsp+A0h] [rbp-258h] BYREF
int v33[4]; // [rsp+B0h] [rbp-248h] BYREF
long long v34; // [rsp+C0h] [rbp-238h] BYREF
void *v35[2]; // [rsp+D0h] [rbp-228h] BYREF
long long v36; // [rsp+E0h] [rbp-218h] BYREF
v7 = *((_QWORD *)this + 16);
if ( !v7 )
goto LABEL_18;
if ( !*((_BYTE *)a2 + 2009) )
goto LABEL_8;
v18 = &v20;
v8 = std::string::_M_construct<char *>(&v18, *((_QWORD *)this + 15), *((_QWORD *)this + 15) + v7);
mjuu_strippath(v35, &v18, v8);
v4 = v35;
std::string::operator=((char *)this + 120, v35);
if ( v35[0] != &v36 )
operator delete(v35[0], v36 + 1);
if ( v18 != &v20 )
operator delete(v18, (unsigned long long)v20 + 1);
if ( *((_QWORD *)this + 16) )
{
LABEL_8:
String = mjs_getString(*((_QWORD *)a2 + 399));
std::string::basic_string<std::allocator<char>>(v33, String);
v10 = mjs_getString(*((_QWORD *)a2 + 252));
std::string::basic_string<std::allocator<char>>(v31, v10);
v26[0] = v27;
std::string::_M_construct<char *>(v26, *((_QWORD *)this + 15), *((_QWORD *)this + 15) + *((_QWORD *)this + 16));
mjuu_makefullname(
(int)v28,
(int)v33,
(int)v31,
(int)v26,
v11,
v12,
v16,
v17,
(long long)v18,
v19,
v20,
v21,
(long long)v22,
v23,
v24,
v25,
(long long)v26[0]);
if ( v26[0] != v27 )
operator delete(v26[0], v27[0] + 1LL);
if ( *(long long **)v31 != &v32 )
operator delete(*(void **)v31, v32 + 1);
if ( *(long long **)v33 != &v34 )
operator delete(*(void **)v33, v34 + 1);
v22 = &v24;
v13 = std::string::_M_construct<char *>(&v22, *(_QWORD *)v28, *(_QWORD *)v28 + v29);
v14 = mjCBase::LoadResource(&v22, 0LL, v13);
if ( v22 != &v24 )
operator delete(v22, v24 + 1);
mjCFlexcomp::LoadGMSH(this);
LOBYTE(v4) = 1;
mju_closeResource(v14, v13);
if ( *(long long **)v28 != &v30 )
operator delete(*(void **)v28, v30 + 1);
}
else
{
LABEL_18:
mju_strncpy((long long)a3, (long long)"File is required", a4);
LODWORD(v4) = 0;
}
return (unsigned int)v4;
}
| MakeGMSH:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2c8
MOV R13D,ECX
MOV R14,RDX
MOV RDX,qword ptr [RDI + 0x80]
TEST RDX,RDX
JZ 0x001cd4a2
MOV R12,RSI
MOV R15,RDI
CMP byte ptr [RSI + 0x7d9],0x0
JZ 0x001cd343
MOV RBX,R14
MOV R14D,R13D
LEA R13,[R15 + 0x78]
LEA RAX,[RSP + 0x20]
MOV qword ptr [RAX + -0x10],RAX
MOV RSI,qword ptr [R13]
ADD RDX,RSI
LEA RBP,[RSP + 0x10]
MOV RDI,RBP
CALL 0x0012e7a0
LAB_001cd2cf:
LEA RDI,[RSP + 0xd0]
MOV RSI,RBP
CALL 0x00228fa2
LAB_001cd2df:
LEA RBP,[RSP + 0xd0]
MOV RDI,R13
MOV RSI,RBP
CALL 0x0012e680
MOV RDI,qword ptr [RBP]
LEA RAX,[RSP + 0xe0]
CMP RDI,RAX
JZ 0x001cd313
MOV RSI,qword ptr [RSP + 0xe0]
INC RSI
CALL 0x0012ded0
LAB_001cd313:
MOV RDI,qword ptr [RSP + 0x10]
LEA RAX,[RSP + 0x20]
CMP RDI,RAX
MOV R13D,R14D
JZ 0x001cd332
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0012ded0
LAB_001cd332:
CMP qword ptr [R15 + 0x80],0x0
MOV R14,RBX
JZ 0x001cd4a2
LAB_001cd343:
MOV RDI,qword ptr [R12 + 0xc78]
CALL 0x0012e9b0
LAB_001cd350:
LEA RDI,[RSP + 0xb0]
LEA RDX,[RSP + 0xd0]
MOV RSI,RAX
CALL 0x0017caf2
MOV RDI,qword ptr [R12 + 0x7e0]
LAB_001cd370:
CALL 0x0012e9b0
LAB_001cd375:
LEA RDI,[RSP + 0x90]
LEA RDX,[RSP + 0xf]
MOV RSI,RAX
CALL 0x0017caf2
LEA RBX,[RSP + 0x60]
MOV qword ptr [RBX + -0x10],RBX
MOV RSI,qword ptr [R15 + 0x78]
MOV RDX,qword ptr [R15 + 0x80]
ADD RDX,RSI
LAB_001cd3a1:
LEA RDI,[RSP + 0x50]
CALL 0x0012e7a0
LAB_001cd3ab:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0xb0]
LEA RDX,[RSP + 0x90]
LEA RCX,[RSP + 0x50]
CALL 0x00229178
MOV RDI,qword ptr [RSP + 0x50]
CMP RDI,RBX
JZ 0x001cd3e1
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x0012ded0
LAB_001cd3e1:
LEA RAX,[RSP + 0xa0]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001cd402
MOV RSI,qword ptr [RSP + 0xa0]
INC RSI
CALL 0x0012ded0
LAB_001cd402:
LEA RAX,[RSP + 0xc0]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001cd423
MOV RSI,qword ptr [RSP + 0xc0]
INC RSI
CALL 0x0012ded0
LAB_001cd423:
LEA RBX,[RSP + 0x40]
MOV qword ptr [RBX + -0x10],RBX
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x78]
ADD RDX,RSI
LAB_001cd439:
LEA RDI,[RSP + 0x30]
CALL 0x0012e7a0
LAB_001cd443:
LEA RDI,[RSP + 0x30]
XOR ESI,ESI
CALL 0x002114b0
MOV R12,RAX
MOV RDI,qword ptr [RSP + 0x30]
CMP RDI,RBX
JZ 0x001cd469
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0012ded0
LAB_001cd469:
MOV RDI,R15
MOV RDX,R12
CALL 0x001cda18
MOV BPL,0x1
MOV RDI,R12
CALL 0x0012e150
LAB_001cd47f:
LEA RAX,[RSP + 0x80]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001cd4b6
MOV RSI,qword ptr [RSP + 0x80]
INC RSI
CALL 0x0012ded0
JMP 0x001cd4b6
LAB_001cd4a2:
LEA RSI,[0x2cfbfa]
MOV RDI,R14
MOV EDX,R13D
CALL 0x0012e4e0
XOR EBP,EBP
LAB_001cd4b6:
MOV EAX,EBP
ADD RSP,0x2c8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* mjCFlexcomp::MakeGMSH(mjCModel*, char*, int) */
ulong __thiscall
mjCFlexcomp::MakeGMSH(mjCFlexcomp *this,mjCModel *param_1,char *param_2,int param_3)
{
long lVar1;
char *pcVar2;
mjResource_ *pmVar3;
string *unaff_RBP;
ulong uVar4;
mjCModel *pmVar5;
allocator local_2e9;
long *local_2e8 [2];
long local_2d8 [2];
long *local_2c8 [2];
long local_2b8 [2];
long *local_2a8 [2];
long local_298 [2];
long *local_288;
long local_280;
long local_278 [2];
long *local_268 [2];
long local_258 [2];
long *local_248 [2];
long local_238 [2];
long *local_228 [2];
long local_218 [61];
if (*(long *)(this + 0x80) == 0) {
LAB_001cd4a2:
mju_strncpy(param_2,"File is required",param_3);
uVar4 = 0;
}
else {
if (param_1[0x7d9] != (mjCModel)0x0) {
local_2e8[0] = local_2d8;
lVar1 = *(long *)(this + 0x78);
std::__cxx11::string::_M_construct<char*>(local_2e8,lVar1,*(long *)(this + 0x80) + lVar1);
/* try { // try from 001cd2cf to 001cd2de has its CatchHandler @ 001cd4ca */
mjuu_strippath(local_228,local_2e8);
unaff_RBP = (string *)local_228;
std::__cxx11::string::operator=((string *)(this + 0x78),unaff_RBP);
if (local_228[0] != local_218) {
operator_delete(local_228[0],local_218[0] + 1);
}
if (local_2e8[0] != local_2d8) {
operator_delete(local_2e8[0],local_2d8[0] + 1);
}
if (*(long *)(this + 0x80) == 0) goto LAB_001cd4a2;
}
pcVar2 = (char *)mjs_getString(*(int8 *)(param_1 + 0xc78));
/* try { // try from 001cd350 to 001cd367 has its CatchHandler @ 001cd5cd */
std::__cxx11::string::string<std::allocator<char>>
((string *)local_248,pcVar2,(allocator *)local_228);
/* try { // try from 001cd370 to 001cd374 has its CatchHandler @ 001cd5a7 */
pcVar2 = (char *)mjs_getString(*(int8 *)(param_1 + 0x7e0));
/* try { // try from 001cd375 to 001cd389 has its CatchHandler @ 001cd5a5 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_268,pcVar2,&local_2e9);
/* try { // try from 001cd3a1 to 001cd3aa has its CatchHandler @ 001cd57f */
local_2a8[0] = local_298;
std::__cxx11::string::_M_construct<char*>
(local_2a8,*(long *)(this + 0x78),*(long *)(this + 0x80) + *(long *)(this + 0x78));
/* try { // try from 001cd3ab to 001cd3c9 has its CatchHandler @ 001cd563 */
mjuu_makefullname(&local_288,local_248,local_268,local_2a8);
if (local_2a8[0] != local_298) {
operator_delete(local_2a8[0],local_298[0] + 1);
}
if (local_268[0] != local_258) {
operator_delete(local_268[0],local_258[0] + 1);
}
if (local_248[0] != local_238) {
operator_delete(local_248[0],local_238[0] + 1);
}
/* try { // try from 001cd439 to 001cd442 has its CatchHandler @ 001cd509 */
local_2c8[0] = local_2b8;
std::__cxx11::string::_M_construct<char*>(local_2c8,local_288,local_280 + (long)local_288);
/* try { // try from 001cd443 to 001cd44e has its CatchHandler @ 001cd4ea */
pmVar5 = (mjCModel *)0x0;
pmVar3 = (mjResource_ *)mjCBase::LoadResource(local_2c8);
if (local_2c8[0] != local_2b8) {
pmVar5 = (mjCModel *)(local_2b8[0] + 1);
operator_delete(local_2c8[0],(ulong)pmVar5);
}
/* try { // try from 001cd469 to 001cd47e has its CatchHandler @ 001cd5d8 */
LoadGMSH(this,pmVar5,pmVar3);
uVar4 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
mju_closeResource(pmVar3);
if (local_288 != local_278) {
operator_delete(local_288,local_278[0] + 1);
}
}
return uVar4 & 0xffffffff;
}
| |
37,477 | translog_write_variable_record_1group | eloqsql/storage/maria/ma_loghandler.c | static my_bool
translog_write_variable_record_1group(LSN *lsn,
enum translog_record_type type,
MARIA_HA *tbl_info,
SHORT_TRANSACTION_ID short_trid,
struct st_translog_parts *parts,
struct st_translog_buffer
*buffer_to_flush, uint16 header_length,
TRN *trn, void *hook_arg)
{
TRANSLOG_ADDRESS horizon;
struct st_buffer_cursor cursor;
int rc= 0;
uint i;
translog_size_t record_rest, full_pages, first_page;
uint additional_chunk3_page= 0;
uchar chunk0_header[1 + 2 + 5 + 2];
DBUG_ENTER("translog_write_variable_record_1group");
translog_lock_assert_owner();
if (buffer_to_flush)
translog_buffer_lock_assert_owner(buffer_to_flush);
set_lsn(lsn, horizon= log_descriptor.horizon);
if (translog_set_lsn_for_files(LSN_FILE_NO(*lsn), LSN_FILE_NO(*lsn),
*lsn, TRUE) ||
(log_record_type_descriptor[type].inwrite_hook &&
(*log_record_type_descriptor[type].inwrite_hook)(type, trn, tbl_info,
lsn, hook_arg)))
{
translog_unlock();
if (buffer_to_flush != NULL)
{
translog_buffer_flush(buffer_to_flush);
translog_buffer_unlock(buffer_to_flush);
}
DBUG_RETURN(1);
}
cursor= log_descriptor.bc;
cursor.chaser= 1;
/* Advance pointer to be able unlock the loghandler */
first_page= translog_get_current_page_rest();
record_rest= parts->record_length - (first_page - header_length);
full_pages= record_rest / log_descriptor.page_capacity_chunk_2;
record_rest= (record_rest % log_descriptor.page_capacity_chunk_2);
if (record_rest + 1 == log_descriptor.page_capacity_chunk_2)
{
DBUG_PRINT("info", ("2 chunks type 3 is needed"));
/* We will write 2 chunks type 3 at the end of this group */
additional_chunk3_page= 1;
record_rest= 1;
}
DBUG_PRINT("info", ("first_page: %u (%u) full_pages: %u (%lu) "
"additional: %u (%u) rest %u = %u",
first_page, first_page - header_length,
full_pages,
(ulong) full_pages *
log_descriptor.page_capacity_chunk_2,
additional_chunk3_page,
additional_chunk3_page *
(log_descriptor.page_capacity_chunk_2 - 1),
record_rest, parts->record_length));
/* record_rest + 3 is chunk type 3 overhead + record_rest */
rc= translog_advance_pointer((int)(full_pages + additional_chunk3_page),
(record_rest ? record_rest + 3 : 0),
&cursor.buffs);
log_descriptor.bc.buffer->last_lsn= *lsn;
DBUG_PRINT("info", ("last_lsn set to " LSN_FMT " buffer: %p",
LSN_IN_PARTS(log_descriptor.bc.buffer->last_lsn),
log_descriptor.bc.buffer));
translog_unlock();
/*
Check if we switched buffer and need process it (current buffer is
unlocked already => we will not delay other threads
*/
if (buffer_to_flush != NULL)
{
if (!rc)
rc= translog_buffer_flush(buffer_to_flush);
translog_buffer_unlock(buffer_to_flush);
}
if (rc)
{
//translog_advance_pointer decreased writers so it is OK
DBUG_ASSERT(cursor.buffs.unlck_ptr == cursor.buffs.wrt_ptr);
DBUG_RETURN(1);
}
translog_write_variable_record_1group_header(parts, type, short_trid,
header_length, chunk0_header);
/* fill the pages */
translog_write_parts_on_page(&horizon, &cursor, first_page, parts);
DBUG_PRINT("info", ("absolute horizon: " LSN_FMT " local: " LSN_FMT,
LSN_IN_PARTS(log_descriptor.horizon),
LSN_IN_PARTS(horizon)));
for (i= 0; i < full_pages; i++)
{
if (translog_write_variable_record_chunk2_page(parts, &horizon, &cursor))
goto error;
DBUG_PRINT("info", ("absolute horizon: " LSN_FMT " local: " LSN_FMT,
LSN_IN_PARTS(log_descriptor.horizon),
LSN_IN_PARTS(horizon)));
}
if (additional_chunk3_page)
{
if (translog_write_variable_record_chunk3_page(parts,
log_descriptor.
page_capacity_chunk_2 - 2,
&horizon, &cursor))
goto error;
DBUG_PRINT("info", ("absolute horizon: " LSN_FMT " local: " LSN_FMT,
LSN_IN_PARTS(log_descriptor.horizon),
LSN_IN_PARTS(horizon)));
DBUG_ASSERT(cursor.current_page_fill == TRANSLOG_PAGE_SIZE);
}
if (translog_write_variable_record_chunk3_page(parts,
record_rest,
&horizon, &cursor))
goto error;
DBUG_PRINT("info", ("absolute horizon: " LSN_FMT " local: " LSN_FMT,
(uint) LSN_FILE_NO(log_descriptor.horizon),
(uint) LSN_OFFSET(log_descriptor.horizon),
(uint) LSN_FILE_NO(horizon),
(uint) LSN_OFFSET(horizon)));
translog_buffer_lock(cursor.buffer);
translog_buffer_decrease_writers(cursor.buffer);
used_buffs_register_unlock(&cursor.buffs, cursor.buffer);
translog_buffer_unlock(cursor.buffer);
DBUG_ASSERT(cursor.buffs.unlck_ptr == cursor.buffs.wrt_ptr);
DBUG_RETURN(0);
error:
used_buffs_urgent_unlock(&cursor.buffs);
DBUG_RETURN(1);
} | O0 | c | translog_write_variable_record_1group:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movw %cx, %ax
movq 0x20(%rbp), %rcx
movq 0x18(%rbp), %rcx
movw 0x10(%rbp), %cx
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movq %rdx, -0x30(%rbp)
movw %ax, -0x32(%rbp)
movq %r8, -0x40(%rbp)
movq %r9, -0x48(%rbp)
movl $0x0, -0x94(%rbp)
movl $0x0, -0xa8(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x9430b
jmp 0x9430b
movq -0x20(%rbp), %rdi
movq 0xbf4d52(%rip), %rsi # 0xc89068
movq %rsi, -0x50(%rbp)
callq 0x95680
movq -0x20(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %edi
movq -0x20(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %esi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movl $0x1, %ecx
callq 0x956b0
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x943a0
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x3f2ec2(%rip), %rax # 0x487220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x943c9
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x3f2ea8(%rip), %rax # 0x487220
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %edi
movq 0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq 0x20(%rbp), %r8
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x943c9
callq 0x8a470
cmpq $0x0, -0x48(%rbp)
je 0x943be
movq -0x48(%rbp), %rdi
callq 0x90630
movq -0x48(%rbp), %rdi
callq 0x8a440
jmp 0x943c0
movb $0x1, -0x13(%rbp)
jmp 0x94654
leaq -0x90(%rbp), %rdi
leaq 0x3f4049(%rip), %rsi # 0x488420
addq $0x800c50, %rsi # imm = 0x800C50
movl $0x40, %edx
callq 0x2a0b0
movb $0x1, -0x59(%rbp)
callq 0x96110
movl %eax, -0xa4(%rbp)
movq -0x40(%rbp), %rax
movl (%rax), %eax
movl -0xa4(%rbp), %ecx
movzwl 0x10(%rbp), %edx
subl %edx, %ecx
subl %ecx, %eax
movl %eax, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
movzwl 0x3f4028(%rip), %ecx # 0x488446
xorl %edx, %edx
divl %ecx
movl %eax, -0xa0(%rbp)
movl -0x9c(%rbp), %eax
movzwl 0x3f4011(%rip), %ecx # 0x488446
xorl %edx, %edx
divl %ecx
movl %edx, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movzwl 0x3f3ff7(%rip), %ecx # 0x488446
cmpl %ecx, %eax
jne 0x9446b
jmp 0x94455
jmp 0x94457
movl $0x1, -0xa8(%rbp)
movl $0x1, -0x9c(%rbp)
jmp 0x9446d
jmp 0x9446f
movl -0xa0(%rbp), %eax
addl -0xa8(%rbp), %eax
movl %eax, -0xac(%rbp)
cmpl $0x0, -0x9c(%rbp)
je 0x9449b
movl -0x9c(%rbp), %eax
addl $0x3, %eax
movl %eax, -0xb0(%rbp)
jmp 0x944a5
xorl %eax, %eax
movl %eax, -0xb0(%rbp)
jmp 0x944a5
movl -0xac(%rbp), %edi
movl -0xb0(%rbp), %eax
leaq -0x90(%rbp), %rdx
movzwl %ax, %esi
callq 0x95b30
movsbl %al, %eax
movl %eax, -0x94(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq 0xbf4bc1(%rip), %rax # 0xc89098
movq %rcx, 0x100000(%rax)
jmp 0x944e0
callq 0x8a470
cmpq $0x0, -0x48(%rbp)
je 0x94510
cmpl $0x0, -0x94(%rbp)
jne 0x94507
movq -0x48(%rbp), %rdi
callq 0x90630
movsbl %al, %eax
movl %eax, -0x94(%rbp)
movq -0x48(%rbp), %rdi
callq 0x8a440
cmpl $0x0, -0x94(%rbp)
je 0x94528
jmp 0x9451b
jmp 0x9451d
jmp 0x9451f
movb $0x1, -0x13(%rbp)
jmp 0x94654
movq -0x40(%rbp), %rdi
movl -0x24(%rbp), %esi
movw -0x32(%rbp), %cx
movw 0x10(%rbp), %ax
leaq -0x12(%rbp), %r8
movzwl %cx, %edx
movzwl %ax, %ecx
callq 0x955b0
movl -0xa4(%rbp), %edx
movq -0x40(%rbp), %rcx
leaq -0x50(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x95850
jmp 0x94562
movl $0x0, -0x98(%rbp)
movl -0x98(%rbp), %eax
cmpl -0xa0(%rbp), %eax
jae 0x945ae
movq -0x40(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0x95eb0
cmpb $0x0, %al
je 0x94597
jmp 0x94644
jmp 0x94599
jmp 0x9459b
jmp 0x9459d
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x9456c
cmpl $0x0, -0xa8(%rbp)
je 0x945e8
movq -0x40(%rbp), %rdi
movzwl 0x3f3e84(%rip), %eax # 0x488446
subl $0x2, %eax
leaq -0x50(%rbp), %rdx
leaq -0x90(%rbp), %rcx
movzwl %ax, %esi
callq 0x95f20
cmpb $0x0, %al
je 0x945de
jmp 0x94644
jmp 0x945e0
jmp 0x945e2
jmp 0x945e4
jmp 0x945e6
jmp 0x945e8
movq -0x40(%rbp), %rdi
movl -0x9c(%rbp), %eax
leaq -0x50(%rbp), %rdx
leaq -0x90(%rbp), %rcx
movzwl %ax, %esi
callq 0x95f20
cmpb $0x0, %al
je 0x9460b
jmp 0x94644
jmp 0x9460d
jmp 0x9460f
movq -0x68(%rbp), %rdi
callq 0x8a400
movq -0x68(%rbp), %rdi
callq 0x96000
leaq -0x90(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x96050
movq -0x68(%rbp), %rdi
callq 0x8a440
jmp 0x9463c
jmp 0x9463e
movb $0x0, -0x13(%rbp)
jmp 0x94654
leaq -0x90(%rbp), %rdi
callq 0x96080
movb $0x1, -0x13(%rbp)
movb -0x13(%rbp), %al
movb %al, -0xb1(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x9467e
movb -0xb1(%rbp), %al
addq $0xc0, %rsp
popq %rbp
retq
callq 0x2a250
nopw %cs:(%rax,%rax)
| translog_write_variable_record_1group:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov ax, cx
mov rcx, [rbp+arg_10]
mov rcx, [rbp+arg_8]
mov cx, [rbp+arg_0]
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_20], rdi
mov [rbp+var_24], esi
mov [rbp+var_30], rdx
mov [rbp+var_32], ax
mov [rbp+var_40], r8
mov [rbp+var_48], r9
mov [rbp+var_94], 0
mov [rbp+var_A8], 0
cmp [rbp+var_48], 0
jz short loc_9430B
jmp short $+2
loc_9430B:
mov rdi, [rbp+var_20]
mov rsi, cs:qword_C89068
mov [rbp+var_50], rsi
call set_lsn
mov rax, [rbp+var_20]
mov rax, [rax]
sar rax, 20h
mov edi, eax
mov rax, [rbp+var_20]
mov rax, [rax]
sar rax, 20h
mov esi, eax
mov rax, [rbp+var_20]
mov rdx, [rax]
mov ecx, 1
call translog_set_lsn_for_files
movsx eax, al
cmp eax, 0
jnz short loc_943A0
mov eax, [rbp+var_24]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
cmp qword ptr [rax+10h], 0
jz short loc_943C9
mov eax, [rbp+var_24]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
mov rax, [rax+10h]
mov edi, [rbp+var_24]
mov rsi, [rbp+arg_8]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_20]
mov r8, [rbp+arg_10]
call rax
movsx eax, al
cmp eax, 0
jz short loc_943C9
loc_943A0:
call translog_unlock
cmp [rbp+var_48], 0
jz short loc_943BE
mov rdi, [rbp+var_48]
call translog_buffer_flush
mov rdi, [rbp+var_48]
call translog_buffer_unlock
loc_943BE:
jmp short $+2
loc_943C0:
mov [rbp+var_13], 1
jmp loc_94654
loc_943C9:
lea rdi, [rbp+var_90]
lea rsi, log_descriptor
add rsi, 800C50h
mov edx, 40h ; '@'
call _memcpy
mov [rbp+var_59], 1
call translog_get_current_page_rest
mov [rbp+var_A4], eax
mov rax, [rbp+var_40]
mov eax, [rax]
mov ecx, [rbp+var_A4]
movzx edx, [rbp+arg_0]
sub ecx, edx
sub eax, ecx
mov [rbp+var_9C], eax
mov eax, [rbp+var_9C]
movzx ecx, cs:word_488446
xor edx, edx
div ecx
mov [rbp+var_A0], eax
mov eax, [rbp+var_9C]
movzx ecx, cs:word_488446
xor edx, edx
div ecx
mov [rbp+var_9C], edx
mov eax, [rbp+var_9C]
add eax, 1
movzx ecx, cs:word_488446
cmp eax, ecx
jnz short loc_9446B
jmp short $+2
loc_94455:
jmp short $+2
loc_94457:
mov [rbp+var_A8], 1
mov [rbp+var_9C], 1
loc_9446B:
jmp short $+2
loc_9446D:
jmp short $+2
loc_9446F:
mov eax, [rbp+var_A0]
add eax, [rbp+var_A8]
mov [rbp+var_AC], eax
cmp [rbp+var_9C], 0
jz short loc_9449B
mov eax, [rbp+var_9C]
add eax, 3
mov [rbp+var_B0], eax
jmp short loc_944A5
loc_9449B:
xor eax, eax
mov [rbp+var_B0], eax
jmp short $+2
loc_944A5:
mov edi, [rbp+var_AC]
mov eax, [rbp+var_B0]
lea rdx, [rbp+var_90]
movzx esi, ax
call translog_advance_pointer
movsx eax, al
mov [rbp+var_94], eax
mov rax, [rbp+var_20]
mov rcx, [rax]
mov rax, cs:qword_C89098
mov [rax+100000h], rcx
jmp short $+2
loc_944E0:
call translog_unlock
cmp [rbp+var_48], 0
jz short loc_94510
cmp [rbp+var_94], 0
jnz short loc_94507
mov rdi, [rbp+var_48]
call translog_buffer_flush
movsx eax, al
mov [rbp+var_94], eax
loc_94507:
mov rdi, [rbp+var_48]
call translog_buffer_unlock
loc_94510:
cmp [rbp+var_94], 0
jz short loc_94528
jmp short $+2
loc_9451B:
jmp short $+2
loc_9451D:
jmp short $+2
loc_9451F:
mov [rbp+var_13], 1
jmp loc_94654
loc_94528:
mov rdi, [rbp+var_40]
mov esi, [rbp+var_24]
mov cx, [rbp+var_32]
mov ax, [rbp+arg_0]
lea r8, [rbp+var_12]
movzx edx, cx
movzx ecx, ax
call translog_write_variable_record_1group_header
mov edx, [rbp+var_A4]
mov rcx, [rbp+var_40]
lea rdi, [rbp+var_50]
lea rsi, [rbp+var_90]
call translog_write_parts_on_page
jmp short $+2
loc_94562:
mov [rbp+var_98], 0
loc_9456C:
mov eax, [rbp+var_98]
cmp eax, [rbp+var_A0]
jnb short loc_945AE
mov rdi, [rbp+var_40]
lea rsi, [rbp+var_50]
lea rdx, [rbp+var_90]
call translog_write_variable_record_chunk2_page
cmp al, 0
jz short loc_94597
jmp loc_94644
loc_94597:
jmp short $+2
loc_94599:
jmp short $+2
loc_9459B:
jmp short $+2
loc_9459D:
mov eax, [rbp+var_98]
add eax, 1
mov [rbp+var_98], eax
jmp short loc_9456C
loc_945AE:
cmp [rbp+var_A8], 0
jz short loc_945E8
mov rdi, [rbp+var_40]
movzx eax, cs:word_488446
sub eax, 2
lea rdx, [rbp+var_50]
lea rcx, [rbp+var_90]
movzx esi, ax
call translog_write_variable_record_chunk3_page
cmp al, 0
jz short loc_945DE
jmp short loc_94644
loc_945DE:
jmp short $+2
loc_945E0:
jmp short $+2
loc_945E2:
jmp short $+2
loc_945E4:
jmp short $+2
loc_945E6:
jmp short $+2
loc_945E8:
mov rdi, [rbp+var_40]
mov eax, [rbp+var_9C]
lea rdx, [rbp+var_50]
lea rcx, [rbp+var_90]
movzx esi, ax
call translog_write_variable_record_chunk3_page
cmp al, 0
jz short loc_9460B
jmp short loc_94644
loc_9460B:
jmp short $+2
loc_9460D:
jmp short $+2
loc_9460F:
mov rdi, [rbp+var_68]
call translog_buffer_lock
mov rdi, [rbp+var_68]
call translog_buffer_decrease_writers
lea rdi, [rbp+var_90]
mov rsi, [rbp+var_68]
call used_buffs_register_unlock
mov rdi, [rbp+var_68]
call translog_buffer_unlock
jmp short $+2
loc_9463C:
jmp short $+2
loc_9463E:
mov [rbp+var_13], 0
jmp short loc_94654
loc_94644:
lea rdi, [rbp+var_90]
call used_buffs_urgent_unlock
mov [rbp+var_13], 1
loc_94654:
mov al, [rbp+var_13]
mov [rbp+var_B1], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_9467E
mov al, [rbp+var_B1]
add rsp, 0C0h
pop rbp
retn
loc_9467E:
call ___stack_chk_fail
| char translog_write_variable_record_1group(
_QWORD *a1,
unsigned int a2,
long long a3,
unsigned __int16 a4,
_DWORD *a5,
long long a6,
unsigned __int16 a7,
long long a8,
long long a9)
{
unsigned __int16 v10; // [rsp+10h] [rbp-B0h]
int v11; // [rsp+18h] [rbp-A8h]
unsigned int current_page_rest; // [rsp+1Ch] [rbp-A4h]
unsigned int v13; // [rsp+20h] [rbp-A0h]
unsigned int v14; // [rsp+24h] [rbp-9Ch]
unsigned int v15; // [rsp+24h] [rbp-9Ch]
unsigned int i; // [rsp+28h] [rbp-98h]
int v17; // [rsp+2Ch] [rbp-94h]
_BYTE v18[40]; // [rsp+30h] [rbp-90h] BYREF
long long v19; // [rsp+58h] [rbp-68h]
char v20; // [rsp+67h] [rbp-59h]
long long v21; // [rsp+70h] [rbp-50h] BYREF
long long v22; // [rsp+78h] [rbp-48h]
_DWORD *v23; // [rsp+80h] [rbp-40h]
unsigned __int16 v24; // [rsp+8Eh] [rbp-32h]
long long v25; // [rsp+90h] [rbp-30h]
unsigned int v26; // [rsp+9Ch] [rbp-24h]
_QWORD *v27; // [rsp+A0h] [rbp-20h]
_BYTE v29[10]; // [rsp+AEh] [rbp-12h] BYREF
unsigned long long v30; // [rsp+B8h] [rbp-8h]
v30 = __readfsqword(0x28u);
v27 = a1;
v26 = a2;
v25 = a3;
v24 = a4;
v23 = a5;
v22 = a6;
v11 = 0;
v21 = qword_C89068;
set_lsn(a1, qword_C89068);
if ( (unsigned __int8)translog_set_lsn_for_files((unsigned int)HIDWORD(*v27), (unsigned int)HIDWORD(*v27), *v27, 1LL)
|| *(_QWORD *)&log_record_type_descriptor[18 * v26 + 4]
&& (*(unsigned __int8 ( **)(_QWORD, long long, long long, _QWORD *, long long))&log_record_type_descriptor[18 * v26 + 4])(
v26,
a8,
v25,
v27,
a9) )
{
translog_unlock();
if ( v22 )
{
translog_buffer_flush(v22);
translog_buffer_unlock(v22);
}
return 1;
}
else
{
memcpy(v18, &log_descriptor[1048970], 64LL);
v20 = 1;
current_page_rest = translog_get_current_page_rest();
v14 = *v23 - (current_page_rest - a7);
v13 = v14 / (unsigned __int16)word_488446;
v15 = v14 % (unsigned __int16)word_488446;
if ( v15 + 1 == (unsigned __int16)word_488446 )
{
v11 = 1;
v15 = 1;
}
if ( v15 )
v10 = v15 + 3;
else
v10 = 0;
v17 = (char)translog_advance_pointer(v11 + v13, v10, v18);
*(_QWORD *)(qword_C89098 + 0x100000) = *v27;
translog_unlock();
if ( v22 )
{
if ( !v17 )
v17 = translog_buffer_flush(v22);
translog_buffer_unlock(v22);
}
if ( v17 )
{
return 1;
}
else
{
translog_write_variable_record_1group_header(v23, v26, v24, a7, v29);
translog_write_parts_on_page(&v21, v18, current_page_rest, v23);
for ( i = 0; i < v13; ++i )
{
if ( (unsigned __int8)translog_write_variable_record_chunk2_page(v23, &v21, v18) )
goto LABEL_26;
}
if ( (!v11
|| !(unsigned __int8)translog_write_variable_record_chunk3_page(
v23,
(unsigned __int16)(word_488446 - 2),
&v21,
v18))
&& !(unsigned __int8)translog_write_variable_record_chunk3_page(v23, (unsigned __int16)v15, &v21, v18) )
{
translog_buffer_lock(v19);
translog_buffer_decrease_writers(v19);
used_buffs_register_unlock(v18, v19);
translog_buffer_unlock(v19);
return 0;
}
LABEL_26:
used_buffs_urgent_unlock(v18);
return 1;
}
}
}
| translog_write_variable_record_1group:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV AX,CX
MOV RCX,qword ptr [RBP + 0x20]
MOV RCX,qword ptr [RBP + 0x18]
MOV CX,word ptr [RBP + 0x10]
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x20],RDI
MOV dword ptr [RBP + -0x24],ESI
MOV qword ptr [RBP + -0x30],RDX
MOV word ptr [RBP + -0x32],AX
MOV qword ptr [RBP + -0x40],R8
MOV qword ptr [RBP + -0x48],R9
MOV dword ptr [RBP + -0x94],0x0
MOV dword ptr [RBP + -0xa8],0x0
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0019430b
JMP 0x0019430b
LAB_0019430b:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [0x00d89068]
MOV qword ptr [RBP + -0x50],RSI
CALL 0x00195680
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX]
MOV ECX,0x1
CALL 0x001956b0
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x001943a0
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
LEA RAX,[0x587220]
IMUL RCX,RCX,0x48
ADD RAX,RCX
CMP qword ptr [RAX + 0x10],0x0
JZ 0x001943c9
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
LEA RAX,[0x587220]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + 0x20]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001943c9
LAB_001943a0:
CALL 0x0018a470
CMP qword ptr [RBP + -0x48],0x0
JZ 0x001943be
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00190630
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0018a440
LAB_001943be:
JMP 0x001943c0
LAB_001943c0:
MOV byte ptr [RBP + -0x13],0x1
JMP 0x00194654
LAB_001943c9:
LEA RDI,[RBP + -0x90]
LEA RSI,[0x588420]
ADD RSI,0x800c50
MOV EDX,0x40
CALL 0x0012a0b0
MOV byte ptr [RBP + -0x59],0x1
CALL 0x00196110
MOV dword ptr [RBP + -0xa4],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xa4]
MOVZX EDX,word ptr [RBP + 0x10]
SUB ECX,EDX
SUB EAX,ECX
MOV dword ptr [RBP + -0x9c],EAX
MOV EAX,dword ptr [RBP + -0x9c]
MOVZX ECX,word ptr [0x00588446]
XOR EDX,EDX
DIV ECX
MOV dword ptr [RBP + -0xa0],EAX
MOV EAX,dword ptr [RBP + -0x9c]
MOVZX ECX,word ptr [0x00588446]
XOR EDX,EDX
DIV ECX
MOV dword ptr [RBP + -0x9c],EDX
MOV EAX,dword ptr [RBP + -0x9c]
ADD EAX,0x1
MOVZX ECX,word ptr [0x00588446]
CMP EAX,ECX
JNZ 0x0019446b
JMP 0x00194455
LAB_00194455:
JMP 0x00194457
LAB_00194457:
MOV dword ptr [RBP + -0xa8],0x1
MOV dword ptr [RBP + -0x9c],0x1
LAB_0019446b:
JMP 0x0019446d
LAB_0019446d:
JMP 0x0019446f
LAB_0019446f:
MOV EAX,dword ptr [RBP + -0xa0]
ADD EAX,dword ptr [RBP + -0xa8]
MOV dword ptr [RBP + -0xac],EAX
CMP dword ptr [RBP + -0x9c],0x0
JZ 0x0019449b
MOV EAX,dword ptr [RBP + -0x9c]
ADD EAX,0x3
MOV dword ptr [RBP + -0xb0],EAX
JMP 0x001944a5
LAB_0019449b:
XOR EAX,EAX
MOV dword ptr [RBP + -0xb0],EAX
JMP 0x001944a5
LAB_001944a5:
MOV EDI,dword ptr [RBP + -0xac]
MOV EAX,dword ptr [RBP + -0xb0]
LEA RDX,[RBP + -0x90]
MOVZX ESI,AX
CALL 0x00195b30
MOVSX EAX,AL
MOV dword ptr [RBP + -0x94],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [0x00d89098]
MOV qword ptr [RAX + 0x100000],RCX
JMP 0x001944e0
LAB_001944e0:
CALL 0x0018a470
CMP qword ptr [RBP + -0x48],0x0
JZ 0x00194510
CMP dword ptr [RBP + -0x94],0x0
JNZ 0x00194507
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00190630
MOVSX EAX,AL
MOV dword ptr [RBP + -0x94],EAX
LAB_00194507:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0018a440
LAB_00194510:
CMP dword ptr [RBP + -0x94],0x0
JZ 0x00194528
JMP 0x0019451b
LAB_0019451b:
JMP 0x0019451d
LAB_0019451d:
JMP 0x0019451f
LAB_0019451f:
MOV byte ptr [RBP + -0x13],0x1
JMP 0x00194654
LAB_00194528:
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x24]
MOV CX,word ptr [RBP + -0x32]
MOV AX,word ptr [RBP + 0x10]
LEA R8,[RBP + -0x12]
MOVZX EDX,CX
MOVZX ECX,AX
CALL 0x001955b0
MOV EDX,dword ptr [RBP + -0xa4]
MOV RCX,qword ptr [RBP + -0x40]
LEA RDI,[RBP + -0x50]
LEA RSI,[RBP + -0x90]
CALL 0x00195850
JMP 0x00194562
LAB_00194562:
MOV dword ptr [RBP + -0x98],0x0
LAB_0019456c:
MOV EAX,dword ptr [RBP + -0x98]
CMP EAX,dword ptr [RBP + -0xa0]
JNC 0x001945ae
MOV RDI,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x50]
LEA RDX,[RBP + -0x90]
CALL 0x00195eb0
CMP AL,0x0
JZ 0x00194597
JMP 0x00194644
LAB_00194597:
JMP 0x00194599
LAB_00194599:
JMP 0x0019459b
LAB_0019459b:
JMP 0x0019459d
LAB_0019459d:
MOV EAX,dword ptr [RBP + -0x98]
ADD EAX,0x1
MOV dword ptr [RBP + -0x98],EAX
JMP 0x0019456c
LAB_001945ae:
CMP dword ptr [RBP + -0xa8],0x0
JZ 0x001945e8
MOV RDI,qword ptr [RBP + -0x40]
MOVZX EAX,word ptr [0x00588446]
SUB EAX,0x2
LEA RDX,[RBP + -0x50]
LEA RCX,[RBP + -0x90]
MOVZX ESI,AX
CALL 0x00195f20
CMP AL,0x0
JZ 0x001945de
JMP 0x00194644
LAB_001945de:
JMP 0x001945e0
LAB_001945e0:
JMP 0x001945e2
LAB_001945e2:
JMP 0x001945e4
LAB_001945e4:
JMP 0x001945e6
LAB_001945e6:
JMP 0x001945e8
LAB_001945e8:
MOV RDI,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x9c]
LEA RDX,[RBP + -0x50]
LEA RCX,[RBP + -0x90]
MOVZX ESI,AX
CALL 0x00195f20
CMP AL,0x0
JZ 0x0019460b
JMP 0x00194644
LAB_0019460b:
JMP 0x0019460d
LAB_0019460d:
JMP 0x0019460f
LAB_0019460f:
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x0018a400
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x00196000
LEA RDI,[RBP + -0x90]
MOV RSI,qword ptr [RBP + -0x68]
CALL 0x00196050
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x0018a440
JMP 0x0019463c
LAB_0019463c:
JMP 0x0019463e
LAB_0019463e:
MOV byte ptr [RBP + -0x13],0x0
JMP 0x00194654
LAB_00194644:
LEA RDI,[RBP + -0x90]
CALL 0x00196080
MOV byte ptr [RBP + -0x13],0x1
LAB_00194654:
MOV AL,byte ptr [RBP + -0x13]
MOV byte ptr [RBP + -0xb1],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0019467e
MOV AL,byte ptr [RBP + -0xb1]
ADD RSP,0xc0
POP RBP
RET
LAB_0019467e:
CALL 0x0012a250
|
int8
translog_write_variable_record_1group
(long *param_1,uint param_2,int8 param_3,int2 param_4,int *param_5,
long param_6,ushort param_7,int8 param_8,int8 param_9)
{
char cVar1;
int iVar2;
uint uVar3;
long in_FS_OFFSET;
bool bVar4;
uint local_b8;
uint local_b0;
uint local_a4;
uint local_a0;
int1 local_98 [40];
int8 local_70;
int1 local_61;
int8 local_58;
long local_50;
int *local_48;
int2 local_3a;
int8 local_38;
uint local_2c;
long *local_28;
int1 local_1b;
int1 local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_58 = DAT_00d89068;
local_50 = param_6;
local_48 = param_5;
local_3a = param_4;
local_38 = param_3;
local_2c = param_2;
local_28 = param_1;
set_lsn(param_1);
cVar1 = translog_set_lsn_for_files
(*local_28 >> 0x20 & 0xffffffff,*local_28 >> 0x20 & 0xffffffff,*local_28,1);
if ((cVar1 == '\0') &&
((*(long *)(log_record_type_descriptor + (ulong)local_2c * 0x48 + 0x10) == 0 ||
(cVar1 = (**(code **)(log_record_type_descriptor + (ulong)local_2c * 0x48 + 0x10))
(local_2c,param_8,local_38,local_28,param_9), cVar1 == '\0')))) {
memcpy(local_98,&DAT_00d89070,0x40);
local_61 = 1;
iVar2 = translog_get_current_page_rest();
local_a4 = *local_48 - (iVar2 - (uint)param_7);
uVar3 = local_a4 / DAT_00588446;
local_a4 = local_a4 % (uint)DAT_00588446;
bVar4 = local_a4 + 1 == (uint)DAT_00588446;
if (bVar4) {
local_a4 = 1;
}
local_b0 = (uint)bVar4;
if (local_a4 == 0) {
local_b8 = 0;
}
else {
local_b8 = local_a4 + 3;
}
cVar1 = translog_advance_pointer(uVar3 + local_b0,local_b8 & 0xffff,local_98);
*(long *)(DAT_00d89098 + 0x100000) = *local_28;
translog_unlock();
if (local_50 != 0) {
if (cVar1 == '\0') {
cVar1 = translog_buffer_flush(local_50);
}
translog_buffer_unlock(local_50);
}
if (cVar1 == '\0') {
translog_write_variable_record_1group_header(local_48,local_2c,local_3a,param_7,local_1a);
translog_write_parts_on_page(&local_58,local_98,iVar2,local_48);
for (local_a0 = 0; local_a0 < uVar3; local_a0 = local_a0 + 1) {
cVar1 = translog_write_variable_record_chunk2_page(local_48,&local_58,local_98);
if (cVar1 != '\0') goto LAB_00194644;
}
if (((local_b0 == 0) ||
(cVar1 = translog_write_variable_record_chunk3_page
(local_48,DAT_00588446 - 2,&local_58,local_98), cVar1 == '\0')) &&
(cVar1 = translog_write_variable_record_chunk3_page(local_48,local_a4,&local_58,local_98),
cVar1 == '\0')) {
translog_buffer_lock(local_70);
translog_buffer_decrease_writers(local_70);
used_buffs_register_unlock(local_98,local_70);
translog_buffer_unlock(local_70);
local_1b = 0;
}
else {
LAB_00194644:
used_buffs_urgent_unlock(local_98);
local_1b = 1;
}
}
else {
local_1b = 1;
}
}
else {
translog_unlock();
if (local_50 != 0) {
translog_buffer_flush(local_50);
translog_buffer_unlock(local_50);
}
local_1b = 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_1b);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
37,478 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget() | monkey531[P]llama/common/json.hpp | void unget()
{
next_unget = true;
--position.chars_read_total;
// in case we "unget" a newline, we have to also decrement the lines_read
if (position.chars_read_current_line == 0)
{
if (position.lines_read > 0)
{
--position.lines_read;
}
}
else
{
--position.chars_read_current_line;
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
}
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget():
movb $0x1, 0x18(%rdi)
decq 0x20(%rdi)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x3f767
leaq 0x28(%rdi), %rcx
jmp 0x3f774
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x3f77a
leaq 0x30(%rdi), %rcx
decq %rax
movq %rax, (%rcx)
cmpl $-0x1, 0x14(%rdi)
je 0x3f791
movq 0x40(%rdi), %rax
cmpq %rax, 0x38(%rdi)
je 0x3f792
decq %rax
movq %rax, 0x40(%rdi)
retq
pushq %rax
leaq 0x724a2(%rip), %rdi # 0xb1c3c
leaq 0x724e5(%rip), %rdx # 0xb1c86
leaq 0x72673(%rip), %rcx # 0xb1e1b
movl $0x2240, %esi # imm = 0x2240
xorl %eax, %eax
callq 0x24ea0
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv:
mov byte ptr [rdi+18h], 1
dec qword ptr [rdi+20h]
mov rax, [rdi+28h]
test rax, rax
jz short loc_3F767
lea rcx, [rdi+28h]
jmp short loc_3F774
loc_3F767:
mov rax, [rdi+30h]
test rax, rax
jz short loc_3F77A
lea rcx, [rdi+30h]
loc_3F774:
dec rax
mov [rcx], rax
loc_3F77A:
cmp dword ptr [rdi+14h], 0FFFFFFFFh
jz short locret_3F791
mov rax, [rdi+40h]
cmp [rdi+38h], rax
jz short loc_3F792
dec rax
mov [rdi+40h], rax
locret_3F791:
retn
loc_3F792:
push rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTokenStringEmp; "!token_string.empty()"
mov esi, 2240h
xor eax, eax
call _ggml_abort
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(
long long a1)
{
long long result; // rax
_QWORD *v2; // rcx
long long v3; // rax
*(_BYTE *)(a1 + 24) = 1;
--*(_QWORD *)(a1 + 32);
result = *(_QWORD *)(a1 + 40);
if ( result )
{
v2 = (_QWORD *)(a1 + 40);
}
else
{
result = *(_QWORD *)(a1 + 48);
if ( !result )
goto LABEL_6;
v2 = (_QWORD *)(a1 + 48);
}
*v2 = --result;
LABEL_6:
if ( *(_DWORD *)(a1 + 20) != -1 )
{
v3 = *(_QWORD *)(a1 + 64);
if ( *(_QWORD *)(a1 + 56) == v3 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8768LL,
"GGML_ASSERT(%s) failed",
"!token_string.empty()");
return std::vector<char>::emplace_back<char>("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
else
{
result = v3 - 1;
*(_QWORD *)(a1 + 64) = result;
}
}
return result;
}
| unget:
MOV byte ptr [RDI + 0x18],0x1
DEC qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x0013f767
LEA RCX,[RDI + 0x28]
JMP 0x0013f774
LAB_0013f767:
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x0013f77a
LEA RCX,[RDI + 0x30]
LAB_0013f774:
DEC RAX
MOV qword ptr [RCX],RAX
LAB_0013f77a:
CMP dword ptr [RDI + 0x14],-0x1
JZ 0x0013f791
MOV RAX,qword ptr [RDI + 0x40]
CMP qword ptr [RDI + 0x38],RAX
JZ 0x0013f792
DEC RAX
MOV qword ptr [RDI + 0x40],RAX
LAB_0013f791:
RET
LAB_0013f792:
PUSH RAX
LEA RDI,[0x1b1c3c]
LEA RDX,[0x1b1c86]
LEA RCX,[0x1b1e1b]
MOV ESI,0x2240
XOR EAX,EAX
CALL 0x00124ea0
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::unget() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::unget(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
long lVar1;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*plVar2;
int8 in_R8;
int8 in_R9;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + -1;
lVar1 = *(long *)(this + 0x28);
if (lVar1 == 0) {
lVar1 = *(long *)(this + 0x30);
if (lVar1 == 0) goto LAB_0013f77a;
plVar2 = this + 0x30;
}
else {
plVar2 = this + 0x28;
}
*(long *)plVar2 = lVar1 + -1;
LAB_0013f77a:
if (*(int *)(this + 0x14) != -1) {
lVar1 = *(long *)(this + 0x40);
if (*(long *)(this + 0x38) == lVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x2240,
"GGML_ASSERT(%s) failed","!token_string.empty()",in_R8,in_R9,lVar1);
}
*(long *)(this + 0x40) = lVar1 + -1;
}
return;
}
| |
37,479 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget() | monkey531[P]llama/common/json.hpp | void unget()
{
next_unget = true;
--position.chars_read_total;
// in case we "unget" a newline, we have to also decrement the lines_read
if (position.chars_read_current_line == 0)
{
if (position.lines_read > 0)
{
--position.lines_read;
}
}
else
{
--position.chars_read_current_line;
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
}
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget():
movb $0x1, 0x18(%rdi)
decq 0x20(%rdi)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x5a13f
leaq 0x28(%rdi), %rcx
jmp 0x5a14c
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x5a152
leaq 0x30(%rdi), %rcx
decq %rax
movq %rax, (%rcx)
cmpl $-0x1, 0x14(%rdi)
je 0x5a169
movq 0x40(%rdi), %rax
cmpq %rax, 0x38(%rdi)
je 0x5a16a
decq %rax
movq %rax, 0x40(%rdi)
retq
pushq %rax
leaq 0x93ac7(%rip), %rdi # 0xedc39
leaq 0x93b0a(%rip), %rdx # 0xedc83
leaq 0x93c89(%rip), %rcx # 0xede09
movl $0x2240, %esi # imm = 0x2240
xorl %eax, %eax
callq 0x1be90
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv:
mov byte ptr [rdi+18h], 1
dec qword ptr [rdi+20h]
mov rax, [rdi+28h]
test rax, rax
jz short loc_5A13F
lea rcx, [rdi+28h]
jmp short loc_5A14C
loc_5A13F:
mov rax, [rdi+30h]
test rax, rax
jz short loc_5A152
lea rcx, [rdi+30h]
loc_5A14C:
dec rax
mov [rcx], rax
loc_5A152:
cmp dword ptr [rdi+14h], 0FFFFFFFFh
jz short locret_5A169
mov rax, [rdi+40h]
cmp [rdi+38h], rax
jz short loc_5A16A
dec rax
mov [rdi+40h], rax
locret_5A169:
retn
loc_5A16A:
push rax
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTokenStringEmp; "!token_string.empty()"
mov esi, 2240h
xor eax, eax
call _ggml_abort
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(
long long a1)
{
long long result; // rax
_QWORD *v2; // rcx
long long v3; // rax
*(_BYTE *)(a1 + 24) = 1;
--*(_QWORD *)(a1 + 32);
result = *(_QWORD *)(a1 + 40);
if ( result )
{
v2 = (_QWORD *)(a1 + 40);
}
else
{
result = *(_QWORD *)(a1 + 48);
if ( !result )
goto LABEL_6;
v2 = (_QWORD *)(a1 + 48);
}
*v2 = --result;
LABEL_6:
if ( *(_DWORD *)(a1 + 20) != -1 )
{
v3 = *(_QWORD *)(a1 + 64);
if ( *(_QWORD *)(a1 + 56) == v3 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8768LL,
"GGML_ASSERT(%s) failed",
"!token_string.empty()");
return std::vector<char>::emplace_back<char>("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
else
{
result = v3 - 1;
*(_QWORD *)(a1 + 64) = result;
}
}
return result;
}
| unget:
MOV byte ptr [RDI + 0x18],0x1
DEC qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x0015a13f
LEA RCX,[RDI + 0x28]
JMP 0x0015a14c
LAB_0015a13f:
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x0015a152
LEA RCX,[RDI + 0x30]
LAB_0015a14c:
DEC RAX
MOV qword ptr [RCX],RAX
LAB_0015a152:
CMP dword ptr [RDI + 0x14],-0x1
JZ 0x0015a169
MOV RAX,qword ptr [RDI + 0x40]
CMP qword ptr [RDI + 0x38],RAX
JZ 0x0015a16a
DEC RAX
MOV qword ptr [RDI + 0x40],RAX
LAB_0015a169:
RET
LAB_0015a16a:
PUSH RAX
LEA RDI,[0x1edc39]
LEA RDX,[0x1edc83]
LEA RCX,[0x1ede09]
MOV ESI,0x2240
XOR EAX,EAX
CALL 0x0011be90
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::unget() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::unget(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
long lVar1;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*plVar2;
int8 in_R8;
int8 in_R9;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + -1;
lVar1 = *(long *)(this + 0x28);
if (lVar1 == 0) {
lVar1 = *(long *)(this + 0x30);
if (lVar1 == 0) goto LAB_0015a152;
plVar2 = this + 0x30;
}
else {
plVar2 = this + 0x28;
}
*(long *)plVar2 = lVar1 + -1;
LAB_0015a152:
if (*(int *)(this + 0x14) != -1) {
lVar1 = *(long *)(this + 0x40);
if (*(long *)(this + 0x38) == lVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x2240,
"GGML_ASSERT(%s) failed","!token_string.empty()",in_R8,in_R9,lVar1);
}
*(long *)(this + 0x40) = lVar1 + -1;
}
return;
}
| |
37,480 | ma_bitmap_set_full_page_bits | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_bitmap_set_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;
uchar *data;
DBUG_ENTER("_ma_bitmap_set_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;
if (page == bitmap_page ||
page + page_count > bitmap_page + bitmap->pages_covered)
{
DBUG_ASSERT(0); /* Wrong in data */
DBUG_RETURN(1);
}
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);
/* Set bits from 'page * 3' -> '(page + page_count) * 3' */
bit_start= offset * 3;
bit_count= page_count * 3;
data= bitmap->map + bit_start / 8;
offset= bit_start & 7;
tmp= (255 << offset); /* Bits to keep */
if (bit_count + offset < 8)
{
/* Only set bits between 'offset' and 'offset+bit_count-1' */
tmp^= (255 << (offset + bit_count));
}
*data|= tmp;
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))
{
bfill(data, fill, 255);
data+= fill;
}
bit_count-= fill * 8; /* Bits left to set */
tmp= (1 << bit_count) - 1;
*data|= tmp;
}
set_if_bigger(bitmap->used_size, (uint) (data - bitmap->map) + 1);
_ma_check_bitmap(bitmap);
bitmap->changed= 1;
DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap););
DBUG_RETURN(0);
} | O0 | c | ma_bitmap_set_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 0x60019
jmp 0x6001b
jmp 0x6001d
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
xorl %edx, %edx
divq 0x138(%rcx)
movq -0x58(%rbp), %rax
subq %rdx, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x60069
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rdx
addq 0x138(%rdx), %rcx
cmpq %rcx, %rax
jbe 0x60078
jmp 0x6006b
jmp 0x6006d
jmp 0x6006f
movb $0x1, -0x1(%rbp)
jmp 0x601f5
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x600aa
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x5fb50
movsbl %al, %eax
cmpl $0x0, %eax
je 0x600aa
jmp 0x600a1
movb $0x1, -0x1(%rbp)
jmp 0x601f5
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)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x38(%rbp), %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x48(%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 0x60116
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
movq -0x48(%rbp), %rax
movzbl (%rax), %ecx
orl %edx, %ecx
movb %cl, (%rax)
movl $0x8, %ecx
subl -0x34(%rbp), %ecx
movl -0x3c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
jle 0x601a5
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movl -0x3c(%rbp), %eax
subl $0x1, %eax
shrl $0x3, %eax
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
je 0x60179
movq -0x48(%rbp), %rdi
movl -0x4c(%rbp), %eax
movl %eax, %edx
movl $0xff, %esi
callq 0x2a2b0
movl -0x4c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl -0x4c(%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
movq -0x48(%rbp), %rax
movzbl (%rax), %ecx
orl %edx, %ecx
movb %cl, (%rax)
jmp 0x601a7
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
movq -0x48(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq 0x8(%rdx), %rdx
subq %rdx, %rcx
addl $0x1, %ecx
cmpl %ecx, %eax
jae 0x601df
movq -0x48(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x601e1
jmp 0x601e3
jmp 0x601e5
movq -0x18(%rbp), %rax
movb $0x1, 0x20(%rax)
jmp 0x601ef
jmp 0x601f1
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nop
| _ma_bitmap_set_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_60019:
jmp short $+2
loc_6001B:
jmp short $+2
loc_6001D:
mov rax, [rbp+var_20]
mov [rbp+var_58], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
xor edx, edx
div qword ptr [rcx+138h]
mov rax, [rbp+var_58]
sub rax, rdx
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jz short loc_60069
mov rax, [rbp+var_20]
mov ecx, [rbp+var_24]
add rax, rcx
mov rcx, [rbp+var_30]
mov rdx, [rbp+var_18]
add rcx, [rdx+138h]
cmp rax, rcx
jbe short loc_60078
loc_60069:
jmp short $+2
loc_6006B:
jmp short $+2
loc_6006D:
jmp short $+2
loc_6006F:
mov [rbp+var_1], 1
jmp loc_601F5
loc_60078:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
cmp rax, [rcx+10h]
jz short loc_600AA
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_600AA
jmp short $+2
loc_600A1:
mov [rbp+var_1], 1
jmp loc_601F5
loc_600AA:
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 rax, [rbp+var_18]
mov rax, [rax+8]
mov ecx, [rbp+var_38]
shr ecx, 3
mov ecx, ecx
add rax, rcx
mov [rbp+var_48], 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_60116
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_60116:
mov edx, [rbp+var_40]
mov rax, [rbp+var_48]
movzx ecx, byte ptr [rax]
or ecx, edx
mov [rax], cl
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_601A5
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
mov eax, [rbp+var_3C]
sub eax, 1
shr eax, 3
mov [rbp+var_4C], eax
cmp eax, 0
jz short loc_60179
mov rdi, [rbp+var_48]
mov eax, [rbp+var_4C]
mov edx, eax
mov esi, 0FFh
call _memset
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_48]
mov ecx, ecx
add rax, rcx
mov [rbp+var_48], rax
loc_60179:
mov ecx, [rbp+var_4C]
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]
mov rax, [rbp+var_48]
movzx ecx, byte ptr [rax]
or ecx, edx
mov [rax], cl
loc_601A5:
jmp short $+2
loc_601A7:
mov rax, [rbp+var_18]
mov eax, [rax+24h]
mov rcx, [rbp+var_48]
mov rdx, [rbp+var_18]
mov rdx, [rdx+8]
sub rcx, rdx
add ecx, 1
cmp eax, ecx
jnb short loc_601DF
mov rax, [rbp+var_48]
mov rcx, [rbp+var_18]
mov rcx, [rcx+8]
sub rax, rcx
mov ecx, eax
add ecx, 1
mov rax, [rbp+var_18]
mov [rax+24h], ecx
loc_601DF:
jmp short $+2
loc_601E1:
jmp short $+2
loc_601E3:
jmp short $+2
loc_601E5:
mov rax, [rbp+var_18]
mov byte ptr [rax+20h], 1
jmp short $+2
loc_601EF:
jmp short $+2
loc_601F1:
mov [rbp+var_1], 0
loc_601F5:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| char ma_bitmap_set_full_page_bits(long long *a1, long long a2, unsigned long long a3, unsigned int a4)
{
unsigned long long v4; // rdx
unsigned int v7; // [rsp+14h] [rbp-4Ch]
_BYTE *v8; // [rsp+18h] [rbp-48h]
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]
long long v14; // [rsp+30h] [rbp-30h]
v4 = a3 % *(_QWORD *)(a2 + 312);
v14 = a3 - v4;
if ( a3 == a3 - v4 || a4 + a3 > *(_QWORD *)(a2 + 312) + v14 )
return 1;
if ( v14 != *(_QWORD *)(a2 + 16) && ma_change_bitmap_page(a1, a2, v14) )
return 1;
v12 = a3 - *(_DWORD *)(a2 + 16) - 1;
v10 = 3 * a4;
v8 = (_BYTE *)(((unsigned int)(3 * v12) >> 3) + *(_QWORD *)(a2 + 8));
v13 = (3 * (_BYTE)v12) & 7;
v9 = 255 << v13;
if ( v13 + 3 * a4 < 8 )
v9 ^= 255 << (v10 + v13);
*v8 |= v9;
v11 = v10 - (8 - v13);
if ( v11 > 0 )
{
++v8;
v7 = (unsigned int)(v11 - 1) >> 3;
if ( v7 )
{
memset(v8, 255LL, v7);
v8 += v7;
}
*v8 |= (1 << (v11 - 8 * v7)) - 1;
}
if ( *(_DWORD *)(a2 + 36) < (unsigned int)v8 - (unsigned int)*(_QWORD *)(a2 + 8) + 1 )
*(_DWORD *)(a2 + 36) = (_DWORD)v8 - *(_QWORD *)(a2 + 8) + 1;
*(_BYTE *)(a2 + 32) = 1;
return 0;
}
| _ma_bitmap_set_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 0x00160019
LAB_00160019:
JMP 0x0016001b
LAB_0016001b:
JMP 0x0016001d
LAB_0016001d:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x58],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 + -0x58]
SUB RAX,RDX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x00160069
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x24]
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x18]
ADD RCX,qword ptr [RDX + 0x138]
CMP RAX,RCX
JBE 0x00160078
LAB_00160069:
JMP 0x0016006b
LAB_0016006b:
JMP 0x0016006d
LAB_0016006d:
JMP 0x0016006f
LAB_0016006f:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001601f5
LAB_00160078:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x001600aa
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x0015fb50
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001600aa
JMP 0x001600a1
LAB_001600a1:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001601f5
LAB_001600aa:
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 RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x38]
SHR ECX,0x3
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],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 0x00160116
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_00160116:
MOV EDX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RAX]
OR ECX,EDX
MOV byte ptr [RAX],CL
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 0x001601a5
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x1
SHR EAX,0x3
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x0
JZ 0x00160179
MOV RDI,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RBP + -0x4c]
MOV EDX,EAX
MOV ESI,0xff
CALL 0x0012a2b0
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
LAB_00160179:
MOV ECX,dword ptr [RBP + -0x4c]
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]
MOV RAX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RAX]
OR ECX,EDX
MOV byte ptr [RAX],CL
LAB_001601a5:
JMP 0x001601a7
LAB_001601a7:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x24]
MOV RCX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RDX + 0x8]
SUB RCX,RDX
ADD ECX,0x1
CMP EAX,ECX
JNC 0x001601df
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,RCX
MOV ECX,EAX
ADD ECX,0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x24],ECX
LAB_001601df:
JMP 0x001601e1
LAB_001601e1:
JMP 0x001601e3
LAB_001601e3:
JMP 0x001601e5
LAB_001601e5:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x20],0x1
JMP 0x001601ef
LAB_001601ef:
JMP 0x001601f1
LAB_001601f1:
MOV byte ptr [RBP + -0x1],0x0
LAB_001601f5:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int1 _ma_bitmap_set_full_page_bits(int8 param_1,long param_2,ulong param_3,uint param_4)
{
char cVar1;
uint uVar2;
int iVar3;
ulong uVar4;
byte *local_50;
byte local_48;
int1 local_9;
uVar4 = param_3 - param_3 % *(ulong *)(param_2 + 0x138);
if ((param_3 == uVar4) || (uVar4 + *(long *)(param_2 + 0x138) < param_3 + param_4)) {
local_9 = 1;
}
else {
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;
iVar3 = param_4 * 3;
local_50 = (byte *)(*(long *)(param_2 + 8) + (ulong)(uVar2 >> 3));
uVar2 = uVar2 & 7;
local_48 = (byte)(0xff << (sbyte)uVar2);
if (iVar3 + uVar2 < 8) {
local_48 = (byte)(0xff << ((sbyte)uVar2 + (char)iVar3 & 0x1fU)) ^ local_48;
}
*local_50 = *local_50 | local_48;
iVar3 = iVar3 - (8 - uVar2);
if (0 < iVar3) {
local_50 = local_50 + 1;
uVar2 = iVar3 - 1U >> 3;
if (uVar2 != 0) {
memset(local_50,0xff,(ulong)uVar2);
local_50 = local_50 + uVar2;
}
*local_50 = *local_50 | (char)(1 << ((char)iVar3 + (char)uVar2 * -8 & 0x1fU)) - 1U;
}
if (*(uint *)(param_2 + 0x24) < ((int)local_50 - (int)*(int8 *)(param_2 + 8)) + 1U) {
*(int *)(param_2 + 0x24) = ((int)local_50 - (int)*(int8 *)(param_2 + 8)) + 1;
}
*(int1 *)(param_2 + 0x20) = 1;
local_9 = 0;
}
return local_9;
}
| |
37,481 | delete_dynamic_with_callback | eloqsql/mysys/array.c | void delete_dynamic_with_callback(DYNAMIC_ARRAY *array, FREE_FUNC f) {
uint i;
char *ptr= (char*) array->buffer;
for (i= 0; i < array->elements; i++, ptr+= array->size_of_element) {
f(ptr);
}
delete_dynamic(array);
} | O3 | c | delete_dynamic_with_callback:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0x2d602
movq %rsi, %r14
movq (%rbx), %r15
xorl %r12d, %r12d
movq %r15, %rdi
callq *%r14
incl %r12d
movl 0x14(%rbx), %eax
addq %rax, %r15
cmpl 0x8(%rbx), %r12d
jb 0x2d5ed
testb $0x1, 0x21(%rbx)
jne 0x2d615
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2d615
callq 0x27eaa
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| delete_dynamic_with_callback:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
cmp dword ptr [rdi+8], 0
jz short loc_2D602
mov r14, rsi
mov r15, [rbx]
xor r12d, r12d
loc_2D5ED:
mov rdi, r15
call r14
inc r12d
mov eax, [rbx+14h]
add r15, rax
cmp r12d, [rbx+8]
jb short loc_2D5ED
loc_2D602:
test byte ptr [rbx+21h], 1
jnz short loc_2D615
mov rdi, [rbx]
test rdi, rdi
jz short loc_2D615
call my_free
loc_2D615:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long delete_dynamic_with_callback(long long a1, void ( *a2)(long long))
{
long long v2; // r15
unsigned int v3; // r12d
long long result; // rax
if ( *(_DWORD *)(a1 + 8) )
{
v2 = *(_QWORD *)a1;
v3 = 0;
do
{
a2(v2);
++v3;
result = *(unsigned int *)(a1 + 20);
v2 += result;
}
while ( v3 < *(_DWORD *)(a1 + 8) );
}
if ( (*(_BYTE *)(a1 + 33) & 1) == 0 && *(_QWORD *)a1 )
result = my_free(*(_QWORD *)a1);
*(_OWORD *)a1 = 0LL;
return result;
}
| delete_dynamic_with_callback:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
CMP dword ptr [RDI + 0x8],0x0
JZ 0x0012d602
MOV R14,RSI
MOV R15,qword ptr [RBX]
XOR R12D,R12D
LAB_0012d5ed:
MOV RDI,R15
CALL R14
INC R12D
MOV EAX,dword ptr [RBX + 0x14]
ADD R15,RAX
CMP R12D,dword ptr [RBX + 0x8]
JC 0x0012d5ed
LAB_0012d602:
TEST byte ptr [RBX + 0x21],0x1
JNZ 0x0012d615
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x0012d615
CALL 0x00127eaa
LAB_0012d615:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void delete_dynamic_with_callback(long *param_1,code *param_2)
{
uint uVar1;
long lVar2;
if ((int)param_1[1] != 0) {
lVar2 = *param_1;
uVar1 = 0;
do {
(*param_2)(lVar2);
uVar1 = uVar1 + 1;
lVar2 = lVar2 + (ulong)*(uint *)((long)param_1 + 0x14);
} while (uVar1 < *(uint *)(param_1 + 1));
}
if (((*(byte *)((long)param_1 + 0x21) & 1) == 0) && (*param_1 != 0)) {
my_free();
}
*param_1 = 0;
param_1[1] = 0;
return;
}
| |
37,482 | JS_AtomIsArrayIndex | bluesky950520[P]quickjs/quickjs.c | static BOOL JS_AtomIsArrayIndex(JSContext *ctx, uint32_t *pval, JSAtom atom)
{
if (__JS_AtomIsTaggedInt(atom)) {
*pval = __JS_AtomToUInt32(atom);
return TRUE;
} else {
JSRuntime *rt = ctx->rt;
JSAtomStruct *p;
uint32_t val;
assert(atom < rt->atom_size);
p = rt->atom_array[atom];
if (p->atom_type == JS_ATOM_TYPE_STRING &&
is_num_string(&val, p) && val != -1) {
*pval = val;
return TRUE;
} else {
*pval = 0;
return FALSE;
}
}
} | O2 | c | JS_AtomIsArrayIndex:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testl %edx, %edx
js 0x360da
movq 0x18(%rdi), %rax
movq 0x68(%rax), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rsi
movq 0x4(%rsi), %rax
shrq $0x3e, %rax
cmpl $0x1, %eax
jne 0x360d2
leaq 0x4(%rsp), %r14
movq %r14, %rdi
callq 0x3464c
testl %eax, %eax
setne %al
movl (%r14), %ecx
cmpl $-0x1, %ecx
setne %dl
testb %dl, %al
je 0x360d2
pushq $0x1
popq %rax
jmp 0x360d6
xorl %ecx, %ecx
xorl %eax, %eax
movl %ecx, (%rbx)
jmp 0x360e5
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
movl %edx, (%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| JS_AtomIsArrayIndex:
push r14
push rbx
push rax
mov rbx, rsi
test edx, edx
js short loc_360DA
mov rax, [rdi+18h]
mov rax, [rax+68h]
mov ecx, edx
mov rsi, [rax+rcx*8]
mov rax, [rsi+4]
shr rax, 3Eh
cmp eax, 1
jnz short loc_360D2
lea r14, [rsp+18h+var_14]
mov rdi, r14
call is_num_string
test eax, eax
setnz al
mov ecx, [r14]
cmp ecx, 0FFFFFFFFh
setnz dl
test al, dl
jz short loc_360D2
push 1
pop rax
jmp short loc_360D6
loc_360D2:
xor ecx, ecx
xor eax, eax
loc_360D6:
mov [rbx], ecx
jmp short loc_360E5
loc_360DA:
and edx, 7FFFFFFFh
mov [rbx], edx
push 1
pop rax
loc_360E5:
add rsp, 8
pop rbx
pop r14
retn
| long long JS_AtomIsArrayIndex(long long a1, int *a2, int a3)
{
long long v3; // rax
long long v5; // rsi
int v6; // eax
int v7; // ecx
long long result; // rax
int v9[5]; // [rsp+0h] [rbp-14h] BYREF
v9[0] = HIDWORD(v3);
if ( a3 < 0 )
{
*a2 = a3 & 0x7FFFFFFF;
return 1LL;
}
else
{
v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a3);
if ( *(_QWORD *)(v5 + 4) >> 62 == 1 && (v6 = is_num_string(v9, v5), v7 = v9[0], v9[0] != -1 && v6 != 0) )
{
result = 1LL;
}
else
{
v7 = 0;
result = 0LL;
}
*a2 = v7;
}
return result;
}
| JS_AtomIsArrayIndex:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
TEST EDX,EDX
JS 0x001360da
MOV RAX,qword ptr [RDI + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,EDX
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSI + 0x4]
SHR RAX,0x3e
CMP EAX,0x1
JNZ 0x001360d2
LEA R14,[RSP + 0x4]
MOV RDI,R14
CALL 0x0013464c
TEST EAX,EAX
SETNZ AL
MOV ECX,dword ptr [R14]
CMP ECX,-0x1
SETNZ DL
TEST AL,DL
JZ 0x001360d2
PUSH 0x1
POP RAX
JMP 0x001360d6
LAB_001360d2:
XOR ECX,ECX
XOR EAX,EAX
LAB_001360d6:
MOV dword ptr [RBX],ECX
JMP 0x001360e5
LAB_001360da:
AND EDX,0x7fffffff
MOV dword ptr [RBX],EDX
PUSH 0x1
POP RAX
LAB_001360e5:
ADD RSP,0x8
POP RBX
POP R14
RET
|
int8 JS_AtomIsArrayIndex(long param_1,uint *param_2,uint param_3)
{
int iVar1;
int8 in_RAX;
int8 uVar2;
uint local_14;
local_14 = (uint)((ulong)in_RAX >> 0x20);
if (-1 < (int)param_3) {
if (((uint)((ulong)*(int8 *)
(*(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_3 * 8)
+ 4) >> 0x3e) == 1) &&
(iVar1 = is_num_string(&local_14), iVar1 != 0 && local_14 != 0xffffffff)) {
uVar2 = 1;
}
else {
local_14 = 0;
uVar2 = 0;
}
*param_2 = local_14;
return uVar2;
}
*param_2 = param_3 & 0x7fffffff;
return 1;
}
| |
37,483 | check_exp_underflow_overflow | bluesky950520[P]quickjs/libbf.c | static int check_exp_underflow_overflow(bf_context_t *s, bf_t *r,
const bf_t *a_low, const bf_t *a_high,
limb_t prec, bf_flags_t flags)
{
bf_t T_s, *T = &T_s;
bf_t log2_s, *log2 = &log2_s;
slimb_t e_min, e_max;
if (a_high->expn <= 0)
return 0;
e_max = (limb_t)1 << (bf_get_exp_bits(flags) - 1);
e_min = -e_max + 3;
if (flags & BF_FLAG_SUBNORMAL)
e_min -= (prec - 1);
bf_init(s, T);
bf_init(s, log2);
bf_const_log2(log2, LIMB_BITS, BF_RNDU);
bf_mul_ui(T, log2, e_max, LIMB_BITS, BF_RNDU);
/* a_low > e_max * log(2) implies exp(a) > e_max */
if (bf_cmp_lt(T, a_low) > 0) {
/* overflow */
bf_delete(T);
bf_delete(log2);
return bf_set_overflow(r, 0, prec, flags);
}
/* a_high < (e_min - 2) * log(2) implies exp(a) < (e_min - 2) */
bf_const_log2(log2, LIMB_BITS, BF_RNDD);
bf_mul_si(T, log2, e_min - 2, LIMB_BITS, BF_RNDD);
if (bf_cmp_lt(a_high, T)) {
int rnd_mode = flags & BF_RND_MASK;
/* underflow */
bf_delete(T);
bf_delete(log2);
if (rnd_mode == BF_RNDU) {
/* set the smallest value */
bf_set_ui(r, 1);
r->expn = e_min;
} else {
bf_set_zero(r, 0);
}
return BF_ST_UNDERFLOW | BF_ST_INEXACT;
}
bf_delete(log2);
bf_delete(T);
return 0;
} | O1 | c | check_exp_underflow_overflow:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
cmpq $0x0, 0x10(%rcx)
jle 0x8ab33
movq %rcx, %r12
movq %rdi, %rax
movq %rsi, 0x10(%rsp)
movl %r9d, %ecx
shrl $0x5, %ecx
andl $0x3f, %ecx
movq %rdx, 0x20(%rsp)
movb $0x3c, %dl
subb %cl, %dl
cmpl $0x3f, %ecx
movzbl %dl, %edx
movl $0x3d, %ecx
cmovnel %edx, %ecx
movl $0x1, %r14d
shlq %cl, %r14
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
movl $0x1, %r13d
leaq -0x1(%r8), %rcx
xorl %edx, %edx
movl %r9d, 0xc(%rsp)
testb $0x8, %r9b
movl $0x0, %ebx
cmovneq %rcx, %rbx
leaq 0x50(%rsp), %rbp
movq %rdi, (%rbp)
movl %edx, 0x8(%rbp)
movq %rsi, 0x10(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbp)
leaq 0x28(%rsp), %r15
movq %rdi, (%r15)
movl %edx, 0x8(%r15)
movq %rsi, 0x10(%r15)
movups %xmm0, 0x18(%r15)
addq $0x10, %rax
movq %r8, 0x18(%rsp)
leaq -0x309(%rip), %r8 # 0x8a73c
movl $0x40, %esi
movq %r15, %rdi
movl $0x3, %edx
movq %rax, %rcx
xorl %r9d, %r9d
callq 0x8a640
movl $0x40, %ecx
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x3, %r8d
callq 0x87f4c
movq %rbp, %rdi
movq 0x20(%rsp), %rsi
callq 0x854f5
testl %eax, %eax
js 0x8ab3a
addq %rbx, %r14
leaq 0x28(%rsp), %rbx
movq (%rbx), %rcx
addq $0x10, %rcx
leaq -0x365(%rip), %r8 # 0x8a73c
movl $0x40, %esi
movq %rbx, %rdi
movl $0x2, %edx
xorl %r9d, %r9d
callq 0x8a640
subq %r14, %r13
leaq 0x50(%rsp), %r15
movl $0x40, %ecx
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl $0x2, %r8d
callq 0x87fdf
movq %r12, %rdi
movq %r15, %rsi
callq 0x854f5
testl %eax, %eax
js 0x8ab94
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x8ab06
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
je 0x8ab06
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq 0x50(%rsp), %rax
xorl %ebx, %ebx
testq %rax, %rax
je 0x8ac39
movq 0x70(%rsp), %rsi
testq %rsi, %rsi
je 0x8ac39
movq (%rax), %rdi
xorl %ebx, %ebx
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x8ac39
xorl %ebx, %ebx
jmp 0x8ac39
movq 0x18(%rsp), %r14
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x8ab5b
movq 0x70(%rsp), %rsi
testq %rsi, %rsi
je 0x8ab5b
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq 0x28(%rsp), %rax
testq %rax, %rax
movq 0x10(%rsp), %rbx
je 0x8ab7c
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
je 0x8ab7c
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movl 0xc(%rsp), %ecx
callq 0x8bf54
movl %eax, %ebx
jmp 0x8ac39
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x8abb0
movq 0x70(%rsp), %rsi
testq %rsi, %rsi
je 0x8abb0
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movl 0xc(%rsp), %ebx
andl $0x7, %ebx
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x8abd3
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
je 0x8abd3
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
cmpl $0x3, %ebx
jne 0x8abf8
movl $0x3, %ebx
subq %r14, %rbx
movl $0x1, %esi
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x84abb
movq %rbx, 0x10(%r14)
jmp 0x8ac34
movq 0x10(%rsp), %rbx
cmpq $0x0, 0x18(%rbx)
je 0x8ac1f
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x18, %ebx
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| check_exp_underflow_overflow:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
cmp qword ptr [rcx+10h], 0
jle loc_8AB33
mov r12, rcx
mov rax, rdi
mov [rsp+0A8h+var_98], rsi
mov ecx, r9d
shr ecx, 5
and ecx, 3Fh
mov [rsp+0A8h+var_88], rdx
mov dl, 3Ch ; '<'
sub dl, cl
cmp ecx, 3Fh ; '?'
movzx edx, dl
mov ecx, 3Dh ; '='
cmovnz ecx, edx
mov r14d, 1
shl r14, cl
mov rsi, 8000000000000000h
mov r13d, 1
lea rcx, [r8-1]
xor edx, edx
mov [rsp+0A8h+var_9C], r9d
test r9b, 8
mov ebx, 0
cmovnz rbx, rcx
lea rbp, [rsp+0A8h+var_58]
mov [rbp+0], rdi
mov [rbp+8], edx
mov [rbp+10h], rsi
xorps xmm0, xmm0
movups xmmword ptr [rbp+18h], xmm0
lea r15, [rsp+0A8h+var_80]
mov [r15], rdi
mov [r15+8], edx
mov [r15+10h], rsi
movups xmmword ptr [r15+18h], xmm0
add rax, 10h
mov [rsp+0A8h+var_90], r8
lea r8, bf_const_log2_internal
mov esi, 40h ; '@'
mov rdi, r15
mov edx, 3
mov rcx, rax
xor r9d, r9d
call bf_const_get
mov ecx, 40h ; '@'
mov rdi, rbp
mov rsi, r15
mov rdx, r14
mov r8d, 3
call bf_mul_ui
mov rdi, rbp
mov rsi, [rsp+0A8h+var_88]
call bf_cmp
test eax, eax
js loc_8AB3A
add r14, rbx
lea rbx, [rsp+0A8h+var_80]
mov rcx, [rbx]
add rcx, 10h
lea r8, bf_const_log2_internal
mov esi, 40h ; '@'
mov rdi, rbx
mov edx, 2
xor r9d, r9d
call bf_const_get
sub r13, r14
lea r15, [rsp+0A8h+var_58]
mov ecx, 40h ; '@'
mov rdi, r15
mov rsi, rbx
mov rdx, r13
mov r8d, 2
call bf_mul_si
mov rdi, r12
mov rsi, r15
call bf_cmp
test eax, eax
js loc_8AB94
mov rax, [rsp+0A8h+var_80]
test rax, rax
jz short loc_8AB06
mov rsi, [rsp+0A8h+var_60]
test rsi, rsi
jz short loc_8AB06
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8AB06:
mov rax, [rsp+0A8h+var_58]
xor ebx, ebx
test rax, rax
jz loc_8AC39
mov rsi, [rsp+0A8h+var_38]
test rsi, rsi
jz loc_8AC39
mov rdi, [rax]
xor ebx, ebx
xor edx, edx
call qword ptr [rax+8]
jmp loc_8AC39
loc_8AB33:
xor ebx, ebx
jmp loc_8AC39
loc_8AB3A:
mov r14, [rsp+0A8h+var_90]
mov rax, [rsp+0A8h+var_58]
test rax, rax
jz short loc_8AB5B
mov rsi, [rsp+0A8h+var_38]
test rsi, rsi
jz short loc_8AB5B
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8AB5B:
mov rax, [rsp+0A8h+var_80]
test rax, rax
mov rbx, [rsp+0A8h+var_98]
jz short loc_8AB7C
mov rsi, [rsp+0A8h+var_60]
test rsi, rsi
jz short loc_8AB7C
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8AB7C:
mov rdi, rbx
xor esi, esi
mov rdx, r14
mov ecx, [rsp+0A8h+var_9C]
call bf_set_overflow
mov ebx, eax
jmp loc_8AC39
loc_8AB94:
mov rax, [rsp+0A8h+var_58]
test rax, rax
jz short loc_8ABB0
mov rsi, [rsp+0A8h+var_38]
test rsi, rsi
jz short loc_8ABB0
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8ABB0:
mov ebx, [rsp+0A8h+var_9C]
and ebx, 7
mov rax, [rsp+0A8h+var_80]
test rax, rax
jz short loc_8ABD3
mov rsi, [rsp+0A8h+var_60]
test rsi, rsi
jz short loc_8ABD3
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8ABD3:
cmp ebx, 3
jnz short loc_8ABF8
mov ebx, 3
sub rbx, r14
mov esi, 1
mov r14, [rsp+0A8h+var_98]
mov rdi, r14
call bf_set_ui
mov [r14+10h], rbx
jmp short loc_8AC34
loc_8ABF8:
mov rbx, [rsp+0A8h+var_98]
cmp qword ptr [rbx+18h], 0
jz short loc_8AC1F
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8AC1F:
mov rax, 8000000000000000h
mov [rbx+10h], rax
mov dword ptr [rbx+8], 0
loc_8AC34:
mov ebx, 18h
loc_8AC39:
mov eax, ebx
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long check_exp_underflow_overflow(
_QWORD *a1,
_QWORD **a2,
long long a3,
long long a4,
long long a5,
unsigned int a6)
{
int v7; // ecx
bool v8; // zf
char v9; // dl
char v10; // cl
unsigned long long v11; // r14
long long v12; // rbx
long long v13; // r14
unsigned int v14; // ebx
_QWORD *v19; // [rsp+28h] [rbp-80h] BYREF
int v20; // [rsp+30h] [rbp-78h]
unsigned long long v21; // [rsp+38h] [rbp-70h]
__int128 v22; // [rsp+40h] [rbp-68h]
__int128 v23; // [rsp+50h] [rbp-58h] BYREF
unsigned long long v24; // [rsp+60h] [rbp-48h]
__int128 v25; // [rsp+68h] [rbp-40h]
if ( *(long long *)(a4 + 16) <= 0 )
{
return 0;
}
else
{
v7 = (a6 >> 5) & 0x3F;
v8 = v7 == 63;
v9 = 60 - v7;
v10 = 61;
if ( !v8 )
v10 = v9;
v11 = 1LL << v10;
v12 = 0LL;
if ( (a6 & 8) != 0 )
v12 = a5 - 1;
*(_QWORD *)&v23 = a1;
DWORD2(v23) = 0;
v24 = 0x8000000000000000LL;
v25 = 0LL;
v19 = a1;
v20 = 0;
v21 = 0x8000000000000000LL;
v22 = 0LL;
bf_const_get(
(long long)&v19,
64LL,
3u,
(long long)(a1 + 2),
(void ( *)(long long, unsigned long long))bf_const_log2_internal,
0);
bf_mul_ui(&v23, (long long)&v19, v11, 64LL, 3u);
if ( (int)bf_cmp((long long)&v23, a3) < 0 )
{
if ( (_QWORD)v23 && *((_QWORD *)&v25 + 1) )
(*(void ( **)(_QWORD, _QWORD, _QWORD))(v23 + 8))(*(_QWORD *)v23, *((_QWORD *)&v25 + 1), 0LL);
if ( v19 && *((_QWORD *)&v22 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD))v19[1])(*v19, *((_QWORD *)&v22 + 1), 0LL);
return (unsigned int)bf_set_overflow(a2, 0LL, a5, a6);
}
else
{
v13 = v12 + v11;
bf_const_get(
(long long)&v19,
64LL,
2u,
(long long)(v19 + 2),
(void ( *)(long long, unsigned long long))bf_const_log2_internal,
0);
bf_mul_si(&v23, (long long)&v19, 1 - v13, 64LL, 2u);
if ( (int)bf_cmp(a4, (long long)&v23) < 0 )
{
if ( (_QWORD)v23 && *((_QWORD *)&v25 + 1) )
(*(void ( **)(_QWORD, _QWORD, _QWORD))(v23 + 8))(*(_QWORD *)v23, *((_QWORD *)&v25 + 1), 0LL);
if ( v19 && *((_QWORD *)&v22 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD))v19[1])(*v19, *((_QWORD *)&v22 + 1), 0LL);
if ( (a6 & 7) == 3 )
{
bf_set_ui(a2, 1uLL);
a2[2] = (_QWORD *)(3 - v13);
}
else
{
if ( a2[3] )
{
a2[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a2)[1])(**a2, a2[4], 0LL);
a2[3] = 0LL;
}
a2[2] = (_QWORD *)0x8000000000000000LL;
*((_DWORD *)a2 + 2) = 0;
}
return 24;
}
else
{
if ( v19 && *((_QWORD *)&v22 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD))v19[1])(*v19, *((_QWORD *)&v22 + 1), 0LL);
v14 = 0;
if ( (_QWORD)v23 && *((_QWORD *)&v25 + 1) )
{
v14 = 0;
(*(void ( **)(_QWORD, _QWORD, _QWORD))(v23 + 8))(*(_QWORD *)v23, *((_QWORD *)&v25 + 1), 0LL);
}
}
}
}
return v14;
}
| check_exp_underflow_overflow:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
CMP qword ptr [RCX + 0x10],0x0
JLE 0x0018ab33
MOV R12,RCX
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RSI
MOV ECX,R9D
SHR ECX,0x5
AND ECX,0x3f
MOV qword ptr [RSP + 0x20],RDX
MOV DL,0x3c
SUB DL,CL
CMP ECX,0x3f
MOVZX EDX,DL
MOV ECX,0x3d
CMOVNZ ECX,EDX
MOV R14D,0x1
SHL R14,CL
MOV RSI,-0x8000000000000000
MOV R13D,0x1
LEA RCX,[R8 + -0x1]
XOR EDX,EDX
MOV dword ptr [RSP + 0xc],R9D
TEST R9B,0x8
MOV EBX,0x0
CMOVNZ RBX,RCX
LEA RBP,[RSP + 0x50]
MOV qword ptr [RBP],RDI
MOV dword ptr [RBP + 0x8],EDX
MOV qword ptr [RBP + 0x10],RSI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP + 0x18],XMM0
LEA R15,[RSP + 0x28]
MOV qword ptr [R15],RDI
MOV dword ptr [R15 + 0x8],EDX
MOV qword ptr [R15 + 0x10],RSI
MOVUPS xmmword ptr [R15 + 0x18],XMM0
ADD RAX,0x10
MOV qword ptr [RSP + 0x18],R8
LEA R8,[0x18a73c]
MOV ESI,0x40
MOV RDI,R15
MOV EDX,0x3
MOV RCX,RAX
XOR R9D,R9D
CALL 0x0018a640
MOV ECX,0x40
MOV RDI,RBP
MOV RSI,R15
MOV RDX,R14
MOV R8D,0x3
CALL 0x00187f4c
MOV RDI,RBP
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001854f5
TEST EAX,EAX
JS 0x0018ab3a
ADD R14,RBX
LEA RBX,[RSP + 0x28]
MOV RCX,qword ptr [RBX]
ADD RCX,0x10
LEA R8,[0x18a73c]
MOV ESI,0x40
MOV RDI,RBX
MOV EDX,0x2
XOR R9D,R9D
CALL 0x0018a640
SUB R13,R14
LEA R15,[RSP + 0x50]
MOV ECX,0x40
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R13
MOV R8D,0x2
CALL 0x00187fdf
MOV RDI,R12
MOV RSI,R15
CALL 0x001854f5
TEST EAX,EAX
JS 0x0018ab94
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x0018ab06
MOV RSI,qword ptr [RSP + 0x48]
TEST RSI,RSI
JZ 0x0018ab06
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018ab06:
MOV RAX,qword ptr [RSP + 0x50]
XOR EBX,EBX
TEST RAX,RAX
JZ 0x0018ac39
MOV RSI,qword ptr [RSP + 0x70]
TEST RSI,RSI
JZ 0x0018ac39
MOV RDI,qword ptr [RAX]
XOR EBX,EBX
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
JMP 0x0018ac39
LAB_0018ab33:
XOR EBX,EBX
JMP 0x0018ac39
LAB_0018ab3a:
MOV R14,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x0018ab5b
MOV RSI,qword ptr [RSP + 0x70]
TEST RSI,RSI
JZ 0x0018ab5b
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018ab5b:
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
MOV RBX,qword ptr [RSP + 0x10]
JZ 0x0018ab7c
MOV RSI,qword ptr [RSP + 0x48]
TEST RSI,RSI
JZ 0x0018ab7c
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018ab7c:
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R14
MOV ECX,dword ptr [RSP + 0xc]
CALL 0x0018bf54
MOV EBX,EAX
JMP 0x0018ac39
LAB_0018ab94:
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x0018abb0
MOV RSI,qword ptr [RSP + 0x70]
TEST RSI,RSI
JZ 0x0018abb0
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018abb0:
MOV EBX,dword ptr [RSP + 0xc]
AND EBX,0x7
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x0018abd3
MOV RSI,qword ptr [RSP + 0x48]
TEST RSI,RSI
JZ 0x0018abd3
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018abd3:
CMP EBX,0x3
JNZ 0x0018abf8
MOV EBX,0x3
SUB RBX,R14
MOV ESI,0x1
MOV R14,qword ptr [RSP + 0x10]
MOV RDI,R14
CALL 0x00184abb
MOV qword ptr [R14 + 0x10],RBX
JMP 0x0018ac34
LAB_0018abf8:
MOV RBX,qword ptr [RSP + 0x10]
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018ac1f
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018ac1f:
MOV RAX,-0x8000000000000000
MOV qword ptr [RBX + 0x10],RAX
MOV dword ptr [RBX + 0x8],0x0
LAB_0018ac34:
MOV EBX,0x18
LAB_0018ac39:
MOV EAX,EBX
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
check_exp_underflow_overflow
(int8 *param_1,long *param_2,int8 param_3,long param_4,long param_5,
uint param_6)
{
int iVar1;
int4 uVar2;
long lVar3;
byte bVar4;
uint uVar5;
long lVar6;
int8 *local_80;
int4 local_78;
int8 local_70;
int8 local_68;
long lStack_60;
int8 *local_58;
int4 local_50;
int8 local_48;
int8 local_40;
long lStack_38;
if (*(long *)(param_4 + 0x10) < 1) {
uVar2 = 0;
}
else {
uVar5 = param_6 >> 5 & 0x3f;
bVar4 = 0x3d;
if (uVar5 != 0x3f) {
bVar4 = 0x3c - (char)uVar5;
}
lVar6 = 1L << (bVar4 & 0x3f);
lVar3 = 0;
if ((param_6 & 8) != 0) {
lVar3 = param_5 + -1;
}
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
lStack_38 = 0;
local_78 = 0;
local_70 = 0x8000000000000000;
local_68 = 0;
lStack_60 = 0;
local_80 = param_1;
local_58 = param_1;
bf_const_get(&local_80,0x40,3,param_1 + 2,bf_const_log2_internal,0);
bf_mul_ui(&local_58,&local_80,lVar6,0x40,3);
iVar1 = bf_cmp(&local_58,param_3);
if (iVar1 < 0) {
if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) {
(*(code *)local_58[1])(*local_58,lStack_38,0);
}
if ((local_80 != (int8 *)0x0) && (lStack_60 != 0)) {
(*(code *)local_80[1])(*local_80,lStack_60,0);
}
uVar2 = bf_set_overflow(param_2,0,param_5,param_6);
}
else {
lVar6 = lVar6 + lVar3;
bf_const_get(&local_80,0x40,2,local_80 + 2,bf_const_log2_internal,0);
bf_mul_si(&local_58,&local_80,1 - lVar6,0x40,2);
iVar1 = bf_cmp(param_4,&local_58);
if (iVar1 < 0) {
if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) {
(*(code *)local_58[1])(*local_58,lStack_38,0);
}
if ((local_80 != (int8 *)0x0) && (lStack_60 != 0)) {
(*(code *)local_80[1])(*local_80,lStack_60,0);
}
if ((param_6 & 7) == 3) {
bf_set_ui(param_2,1);
param_2[2] = 3 - lVar6;
}
else {
if (param_2[3] != 0) {
lVar3 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0);
param_2[4] = lVar3;
param_2[3] = 0;
}
param_2[2] = -0x8000000000000000;
*(int4 *)(param_2 + 1) = 0;
}
uVar2 = 0x18;
}
else {
if ((local_80 != (int8 *)0x0) && (lStack_60 != 0)) {
(*(code *)local_80[1])(*local_80,lStack_60,0);
}
uVar2 = 0;
if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) {
uVar2 = 0;
(*(code *)local_58[1])(*local_58,lStack_38,0);
}
}
}
}
return uVar2;
}
| |
37,484 | rlLoadShaderBuffer | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h | unsigned int rlLoadShaderBuffer(unsigned int size, const void *data, int usageHint)
{
unsigned int ssbo = 0;
#if defined(GRAPHICS_API_OPENGL_43)
glGenBuffers(1, &ssbo);
glBindBuffer(GL_SHADER_STORAGE_BUFFER, ssbo);
glBufferData(GL_SHADER_STORAGE_BUFFER, size, data, usageHint? usageHint : RL_STREAM_COPY);
if (data == NULL) glClearBufferData(GL_SHADER_STORAGE_BUFFER, GL_R8UI, GL_RED_INTEGER, GL_UNSIGNED_BYTE, NULL); // Clear buffer data to 0
glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0);
#else
TRACELOG(RL_LOG_WARNING, "SSBO: SSBO not enabled. Define GRAPHICS_API_OPENGL_43");
#endif
return ssbo;
} | O0 | c | rlLoadShaderBuffer:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x4, %edi
leaq 0xfd79b(%rip), %rsi # 0x1b51b0
movb $0x0, %al
callq 0x182c40
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rlLoadShaderBuffer:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], 0
mov edi, 4
lea rsi, aSsboSsboNotEna; "SSBO: SSBO not enabled. Define GRAPHICS"...
mov al, 0
call TraceLog
mov eax, [rbp+var_18]
add rsp, 20h
pop rbp
retn
| long long rlLoadShaderBuffer(long long a1, long long a2, int a3, int a4, int a5, int a6)
{
TraceLog(4, (unsigned int)"SSBO: SSBO not enabled. Define GRAPHICS_API_OPENGL_43", a3, a4, a5, a6);
return 0LL;
}
| rlLoadShaderBuffer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],0x0
MOV EDI,0x4
LEA RSI,[0x2b51b0]
MOV AL,0x0
CALL 0x00282c40
MOV EAX,dword ptr [RBP + -0x18]
ADD RSP,0x20
POP RBP
RET
|
int4 rlLoadShaderBuffer(void)
{
TraceLog(4,"SSBO: SSBO not enabled. Define GRAPHICS_API_OPENGL_43");
return 0;
}
| |
37,485 | calc_hashnr_caseup | eloqsql/libmariadb/libmariadb/ma_hashtbl.c | static uint calc_hashnr_caseup(const uchar *key,uint length)
{
register uint nr=1, nr2=4;
while (length--)
{
nr^= (((nr & 63)+nr2)*((uint) (uchar) toupper(*key++)))+ (nr << 8);
nr2+=3;
}
return((uint) nr);
} | O0 | c | calc_hashnr_caseup:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x4, -0x14(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0x68864
movl -0x10(%rbp), %eax
andl $0x3f, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movzbl (%rax), %edi
callq 0x36190
movl %eax, %ecx
movl -0x18(%rbp), %eax
movzbl %cl, %ecx
imull %ecx, %eax
movl -0x10(%rbp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
xorl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x14(%rbp)
jmp 0x6880d
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| calc_hashnr_caseup:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], 1
mov [rbp+var_14], 4
loc_6880D:
mov eax, [rbp+var_C]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_C], ecx
cmp eax, 0
jz short loc_68864
mov eax, [rbp+var_10]
and eax, 3Fh
add eax, [rbp+var_14]
mov [rbp+var_18], eax
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movzx edi, byte ptr [rax]
call _toupper
mov ecx, eax
mov eax, [rbp+var_18]
movzx ecx, cl
imul eax, ecx
mov ecx, [rbp+var_10]
shl ecx, 8
add eax, ecx
xor eax, [rbp+var_10]
mov [rbp+var_10], eax
mov eax, [rbp+var_14]
add eax, 3
mov [rbp+var_14], eax
jmp short loc_6880D
loc_68864:
mov eax, [rbp+var_10]
add rsp, 20h
pop rbp
retn
| long long calc_hashnr_caseup(unsigned __int8 *a1, int a2)
{
unsigned __int8 *v3; // rax
int i; // [rsp+Ch] [rbp-14h]
unsigned int v6; // [rsp+10h] [rbp-10h]
v6 = 1;
for ( i = 4; a2--; i += 3 )
{
v3 = a1++;
v6 ^= (v6 << 8) + (unsigned __int8)toupper(*v3) * (i + (v6 & 0x3F));
}
return v6;
}
| calc_hashnr_caseup:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],0x1
MOV dword ptr [RBP + -0x14],0x4
LAB_0016880d:
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0xc],ECX
CMP EAX,0x0
JZ 0x00168864
MOV EAX,dword ptr [RBP + -0x10]
AND EAX,0x3f
ADD EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVZX EDI,byte ptr [RAX]
CALL 0x00136190
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x18]
MOVZX ECX,CL
IMUL EAX,ECX
MOV ECX,dword ptr [RBP + -0x10]
SHL ECX,0x8
ADD EAX,ECX
XOR EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x10],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x3
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0016880d
LAB_00168864:
MOV EAX,dword ptr [RBP + -0x10]
ADD RSP,0x20
POP RBP
RET
|
uint calc_hashnr_caseup(byte *param_1,int param_2)
{
uint uVar1;
int local_1c;
uint local_18;
int local_14;
byte *local_10;
local_18 = 1;
local_1c = 4;
local_14 = param_2;
local_10 = param_1;
while (local_14 != 0) {
uVar1 = toupper((uint)*local_10);
local_18 = ((local_18 & 0x3f) + local_1c) * (uVar1 & 0xff) + local_18 * 0x100 ^ local_18;
local_1c = local_1c + 3;
local_14 = local_14 + -1;
local_10 = local_10 + 1;
}
return local_18;
}
| |
37,486 | common_log::set_colors(bool) | monkey531[P]llama/common/log.cpp | void set_colors(bool colors) {
pause();
if (colors) {
g_col[COMMON_LOG_COL_DEFAULT] = LOG_COL_DEFAULT;
g_col[COMMON_LOG_COL_BOLD] = LOG_COL_BOLD;
g_col[COMMON_LOG_COL_RED] = LOG_COL_RED;
g_col[COMMON_LOG_COL_GREEN] = LOG_COL_GREEN;
g_col[COMMON_LOG_COL_YELLOW] = LOG_COL_YELLOW;
g_col[COMMON_LOG_COL_BLUE] = LOG_COL_BLUE;
g_col[COMMON_LOG_COL_MAGENTA] = LOG_COL_MAGENTA;
g_col[COMMON_LOG_COL_CYAN] = LOG_COL_CYAN;
g_col[COMMON_LOG_COL_WHITE] = LOG_COL_WHITE;
} else {
for (size_t i = 0; i < g_col.size(); i++) {
g_col[i] = "";
}
}
resume();
} | O3 | cpp | common_log::set_colors(bool):
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0xcc8be
testl %ebp, %ebp
je 0xccd7d
movq 0x606ce(%rip), %rax # 0x12d3e0
leaq 0x19b2e(%rip), %rcx # 0xe6847
movq %rcx, (%rax)
movq 0x606bd(%rip), %rax # 0x12d3e0
leaq 0x28625(%rip), %rcx # 0xf534f
movq %rcx, 0x8(%rax)
leaq 0x2861f(%rip), %rcx # 0xf5354
movq %rcx, 0x10(%rax)
leaq 0x2861a(%rip), %rcx # 0xf535a
movq %rcx, 0x18(%rax)
leaq 0x28615(%rip), %rcx # 0xf5360
movq %rcx, 0x20(%rax)
leaq 0x28610(%rip), %rcx # 0xf5366
movq %rcx, 0x28(%rax)
leaq 0x2860b(%rip), %rcx # 0xf536c
movq %rcx, 0x30(%rax)
leaq 0x28606(%rip), %rcx # 0xf5372
movq %rcx, 0x38(%rax)
leaq 0x28601(%rip), %rcx # 0xf5378
movq %rcx, 0x40(%rax)
jmp 0xccdb7
movq 0x6065c(%rip), %rax # 0x12d3e0
cmpq %rax, 0x6065d(%rip) # 0x12d3e8
je 0xccdb7
xorl %ecx, %ecx
leaq 0x1f05c(%rip), %rdx # 0xebdf2
movq %rdx, (%rax,%rcx,8)
incq %rcx
movq 0x60644(%rip), %rsi # 0x12d3e8
movq 0x60635(%rip), %rax # 0x12d3e0
subq %rax, %rsi
sarq $0x3, %rsi
cmpq %rsi, %rcx
jb 0xccd96
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xcc946
nop
| _ZN10common_log10set_colorsEb:
push rbp
push rbx
push rax
mov ebp, esi
mov rbx, rdi
call _ZN10common_log5pauseEv; common_log::pause(void)
test ebp, ebp
jz short loc_CCD7D
mov rax, cs:_ZL5g_col; g_col
lea rcx, a33mwarningNoMo+93h; "\x1B[0m"
mov [rax], rcx
mov rax, cs:_ZL5g_col; g_col
lea rcx, a1m; "\x1B[1m"
mov [rax+8], rcx
lea rcx, a31m; "\x1B[31m"
mov [rax+10h], rcx
lea rcx, a32m; "\x1B[32m"
mov [rax+18h], rcx
lea rcx, a33m; "\x1B[33m"
mov [rax+20h], rcx
lea rcx, a34m; "\x1B[34m"
mov [rax+28h], rcx
lea rcx, a35m; "\x1B[35m"
mov [rax+30h], rcx
lea rcx, a36m; "\x1B[36m"
mov [rax+38h], rcx
lea rcx, a37m; "\x1B[37m"
mov [rax+40h], rcx
jmp short loc_CCDB7
loc_CCD7D:
mov rax, cs:_ZL5g_col; g_col
cmp cs:qword_12D3E8, rax
jz short loc_CCDB7
xor ecx, ecx
lea rdx, aErrorWhileHand_0+34h; ""
loc_CCD96:
mov [rax+rcx*8], rdx
inc rcx
mov rsi, cs:qword_12D3E8
mov rax, cs:_ZL5g_col; g_col
sub rsi, rax
sar rsi, 3
cmp rcx, rsi
jb short loc_CCD96
loc_CCDB7:
mov rdi, rbx; this
add rsp, 8
pop rbx
pop rbp
jmp _ZN10common_log6resumeEv; common_log::resume(void)
| long long common_log::set_colors(common_log *this, int a2)
{
_QWORD *v2; // rax
long long v3; // rax
unsigned long long v4; // rcx
common_log::pause(this);
if ( a2 )
{
*(_QWORD *)g_col = "\x1B[0m";
v2 = (_QWORD *)g_col;
*(_QWORD *)(g_col + 8) = "\x1B[1m";
v2[2] = "\x1B[31m";
v2[3] = "\x1B[32m";
v2[4] = "\x1B[33m";
v2[5] = "\x1B[34m";
v2[6] = "\x1B[35m";
v2[7] = "\x1B[36m";
v2[8] = "\x1B[37m";
}
else
{
v3 = g_col;
if ( qword_12D3E8 != g_col )
{
v4 = 0LL;
do
{
*(_QWORD *)(v3 + 8 * v4++) = "";
v3 = g_col;
}
while ( v4 < (qword_12D3E8 - g_col) >> 3 );
}
}
return common_log::resume(this);
}
| set_colors:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x001cc8be
TEST EBP,EBP
JZ 0x001ccd7d
MOV RAX,qword ptr [0x0022d3e0]
LEA RCX,[0x1e6847]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [0x0022d3e0]
LEA RCX,[0x1f534f]
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x1f5354]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[0x1f535a]
MOV qword ptr [RAX + 0x18],RCX
LEA RCX,[0x1f5360]
MOV qword ptr [RAX + 0x20],RCX
LEA RCX,[0x1f5366]
MOV qword ptr [RAX + 0x28],RCX
LEA RCX,[0x1f536c]
MOV qword ptr [RAX + 0x30],RCX
LEA RCX,[0x1f5372]
MOV qword ptr [RAX + 0x38],RCX
LEA RCX,[0x1f5378]
MOV qword ptr [RAX + 0x40],RCX
JMP 0x001ccdb7
LAB_001ccd7d:
MOV RAX,qword ptr [0x0022d3e0]
CMP qword ptr [0x0022d3e8],RAX
JZ 0x001ccdb7
XOR ECX,ECX
LEA RDX,[0x1ebdf2]
LAB_001ccd96:
MOV qword ptr [RAX + RCX*0x8],RDX
INC RCX
MOV RSI,qword ptr [0x0022d3e8]
MOV RAX,qword ptr [0x0022d3e0]
SUB RSI,RAX
SAR RSI,0x3
CMP RCX,RSI
JC 0x001ccd96
LAB_001ccdb7:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001cc946
|
/* common_log::set_colors(bool) */
void __thiscall common_log::set_colors(common_log *this,bool param_1)
{
int8 *puVar1;
ulong uVar2;
int7 in_register_00000031;
pause(this);
if ((int)CONCAT71(in_register_00000031,param_1) == 0) {
if (DAT_0022d3e8 != g_col) {
uVar2 = 0;
do {
g_col[uVar2] = "";
uVar2 = uVar2 + 1;
} while (uVar2 < (ulong)((long)DAT_0022d3e8 - (long)g_col >> 3));
}
}
else {
*g_col = &DAT_001e6847;
puVar1 = g_col;
g_col[1] = &DAT_001f534f;
puVar1[2] = &DAT_001f5354;
puVar1[3] = &DAT_001f535a;
puVar1[4] = &DAT_001f5360;
puVar1[5] = &DAT_001f5366;
puVar1[6] = &DAT_001f536c;
puVar1[7] = &DAT_001f5372;
puVar1[8] = &DAT_001f5378;
}
resume(this);
return;
}
| |
37,487 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& 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>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, 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>&) | llama.cpp/common/json.hpp | static ReferenceType get_ref_impl(ThisType& obj)
{
// delegate the call to get_ptr<>()
auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
if (JSON_HEDLEY_LIKELY(ptr != nullptr))
{
return *ptr;
}
JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj));
} | O3 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& 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>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, 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>&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0xda1fe
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xda1fe
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x21660
movq %rax, %rbx
movq %r14, %rdi
callq 0x2e874
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4fd57(%rip), %rsi # 0x129f79
leaq 0x10(%rsp), %rdi
callq 0xd2962
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12f, %esi # imm = 0x12F
movq %r14, %rcx
callq 0x2e618
xorl %ebp, %ebp
leaq 0x9173b(%rip), %rsi # 0x16b988
leaq -0xa8a4a(%rip), %rdx # 0x3180a
movq %rbx, %rdi
callq 0x21a80
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xda27a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21180
testb %bpl, %bpl
jne 0xda284
jmp 0xda28c
movq %rax, %r14
movq %rbx, %rdi
callq 0x21f50
movq %r14, %rdi
callq 0x21b20
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRS9_SD_EET_RT0_:
push rbp; void *
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_DA1FE
mov rax, [r14+8]
test rax, rax
jz short loc_DA1FE
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_DA1FE:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aIncompatibleRe; "incompatible ReferenceType for get_ref,"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Fh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_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_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_DA27A
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DA27A:
test bpl, bpl
jnz short loc_DA284
jmp short loc_DA28C
mov r14, rax
loc_DA284:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_DA28C:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<std::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v3; // [rsp+8h] [rbp-40h] BYREF
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(
(long long)v4,
(long long)"incompatible ReferenceType for get_ref, actual type is ",
&v3);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
0x12Fu,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return result;
}
| get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x001da1fe
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x001da1fe
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001da1fe:
MOV EDI,0x20
CALL 0x00121660
MOV RBX,RAX
MOV RDI,R14
CALL 0x0012e874
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001da21b:
LEA RSI,[0x229f79]
LEA RDI,[RSP + 0x10]
CALL 0x001d2962
MOV BPL,0x1
LAB_001da22f:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12f
MOV RCX,R14
CALL 0x0012e618
XOR EBP,EBP
LEA RSI,[0x26b988]
LEA RDX,[0x13180a]
MOV RDI,RBX
CALL 0x00121a80
|
/* std::__cxx11::string&
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::get_ref_impl<std::__cxx11::string&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(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>&) */
string * nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if ((*param_1 == (basic_json)0x3) && (*(string **)(param_1 + 8) != (string *)0x0)) {
return *(string **)(param_1 + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 001da21b to 001da22b has its CatchHandler @ 001da281 */
detail::concat<std::__cxx11::string,char_const(&)[56],char_const*>
(local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40);
/* try { // try from 001da22f to 001da25b has its CatchHandler @ 001da25c */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x12f,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
37,488 | get_argument | eloqsql/mysys/my_default.c | static char *get_argument(const char *keyword, size_t kwlen,
char *ptr, char *name, uint line)
{
char *end;
/* Skip over "include / includedir keyword" and following whitespace */
for (ptr+= kwlen - 1;
my_isspace(&my_charset_latin1, ptr[0]);
ptr++)
{}
/*
Trim trailing whitespace from directory name
The -1 below is for the newline added by fgets()
Note that my_isspace() is true for \r and \n
*/
for (end= ptr + strlen(ptr) - 1;
my_isspace(&my_charset_latin1, *(end - 1));
end--)
{}
end[0]= 0; /* Cut off end space */
/* Print error msg if there is nothing after !include* directive */
if (end <= ptr)
{
fprintf(stderr,
"error: Wrong '!%s' directive in config file: %s at line %d\n",
keyword, name, line);
return 0;
}
return ptr;
} | O0 | c | get_argument:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq -0x18(%rbp), %rax
subq $0x1, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x26537d(%rip), %rax # 0x2d8740
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x733eb
jmp 0x733dd
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x733bc
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
callq 0x363e0
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
leaq 0x26532b(%rip), %rax # 0x2d8740
movq 0x40(%rax), %rax
movq -0x38(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x7343e
jmp 0x73430
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x7340e
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x7347d
movq 0x1bbb8a(%rip), %rax # 0x22efe0
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
leaq 0x5a252(%rip), %rsi # 0xcd6be
movb $0x0, %al
callq 0x361c0
movq $0x0, -0x8(%rbp)
jmp 0x73485
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| get_argument:
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_2C], r8d
mov rax, [rbp+var_18]
sub rax, 1
add rax, [rbp+var_20]
mov [rbp+var_20], rax
loc_733BC:
lea rax, my_charset_latin1
mov rax, [rax+40h]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jz short loc_733EB
jmp short $+2
loc_733DD:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_733BC
loc_733EB:
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rdi, [rbp+var_20]
call _strlen
mov rcx, rax
mov rax, [rbp+var_40]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rax
loc_7340E:
lea rax, my_charset_latin1
mov rax, [rax+40h]
mov rcx, [rbp+var_38]
movzx ecx, byte ptr [rcx-1]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jz short loc_7343E
jmp short $+2
loc_73430:
mov rax, [rbp+var_38]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rax
jmp short loc_7340E
loc_7343E:
mov rax, [rbp+var_38]
mov byte ptr [rax], 0
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
ja short loc_7347D
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_28]
mov r8d, [rbp+var_2C]
lea rsi, aErrorWrongSDir; "error: Wrong '!%s' directive in config "...
mov al, 0
call _fprintf
mov [rbp+var_8], 0
jmp short loc_73485
loc_7347D:
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_73485:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| unsigned __int8 * get_argument(const char *a1, long long a2, long long a3, const char *a4, int a5)
{
unsigned __int8 *j; // [rsp+8h] [rbp-38h]
unsigned __int8 *i; // [rsp+20h] [rbp-20h]
for ( i = (unsigned __int8 *)(a3 + a2 - 1); (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + *i + 1LL) & 8) != 0; ++i )
;
for ( j = &i[strlen(i) - 1]; (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + *(j - 1) + 1LL) & 8) != 0; --j )
;
*j = 0;
if ( j > i )
return i;
fprintf(stderr, "error: Wrong '!%s' directive in config file: %s at line %d\n", a1, a4, a5);
return 0LL;
}
| get_argument:
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 dword ptr [RBP + -0x2c],R8D
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
LAB_001733bc:
LEA RAX,[0x3d8740]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x001733eb
JMP 0x001733dd
LAB_001733dd:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001733bc
LAB_001733eb:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001363e0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,RCX
ADD RAX,-0x1
MOV qword ptr [RBP + -0x38],RAX
LAB_0017340e:
LEA RAX,[0x3d8740]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,byte ptr [RCX + -0x1]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0017343e
JMP 0x00173430
LAB_00173430:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0017340e
LAB_0017343e:
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JA 0x0017347d
MOV RAX,qword ptr [0x0032efe0]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,dword ptr [RBP + -0x2c]
LEA RSI,[0x1cd6be]
MOV AL,0x0
CALL 0x001361c0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00173485
LAB_0017347d:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_00173485:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
byte * get_argument(int8 param_1,long param_2,long param_3,int8 param_4,uint param_5)
{
byte *pbVar1;
byte *pbVar2;
size_t sVar3;
byte *local_40;
byte *local_28;
byte *local_10;
local_28 = (byte *)(param_2 + -1 + param_3);
while ((PTR_ctype_latin1_003d8780[(ulong)*local_28 + 1] & 8) != 0) {
local_28 = local_28 + 1;
}
sVar3 = strlen((char *)local_28);
pbVar2 = local_28 + sVar3;
do {
local_40 = pbVar2 + -1;
pbVar1 = pbVar2 + -2;
pbVar2 = local_40;
} while ((PTR_ctype_latin1_003d8780[(ulong)*pbVar1 + 1] & 8) != 0);
*local_40 = 0;
if (local_28 < local_40) {
local_10 = local_28;
}
else {
fprintf(*(FILE **)PTR_stderr_0032efe0,
"error: Wrong \'!%s\' directive in config file: %s at line %d\n",param_1,param_4,
(ulong)param_5);
local_10 = (byte *)0x0;
}
return local_10;
}
| |
37,489 | tree_walk | eloqsql/mysys/tree.c | int tree_walk(TREE *tree, tree_walk_action action, void *argument, TREE_WALK visit)
{
switch (visit) {
case left_root_right:
return tree_walk_left_root_right(tree,tree->root,action,argument);
case right_root_left:
return tree_walk_right_root_left(tree,tree->root,action,argument);
}
return 0; /* Keep gcc happy */
} | O0 | c | tree_walk:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
testl %eax, %eax
je 0xfbd2d
jmp 0xfbd23
movl -0x28(%rbp), %eax
subl $0x1, %eax
je 0xfbd4a
jmp 0xfbd67
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0xfbd80
movl %eax, -0x4(%rbp)
jmp 0xfbd6e
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0xfbe60
movl %eax, -0x4(%rbp)
jmp 0xfbd6e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| tree_walk:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov eax, [rbp+var_24]
mov [rbp+var_28], eax
test eax, eax
jz short loc_FBD2D
jmp short $+2
loc_FBD23:
mov eax, [rbp+var_28]
sub eax, 1
jz short loc_FBD4A
jmp short loc_FBD67
loc_FBD2D:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
call tree_walk_left_root_right
mov [rbp+var_4], eax
jmp short loc_FBD6E
loc_FBD4A:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
call tree_walk_right_root_left
mov [rbp+var_4], eax
jmp short loc_FBD6E
loc_FBD67:
mov [rbp+var_4], 0
loc_FBD6E:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long tree_walk(_QWORD *a1, long long a2, long long a3, int a4)
{
if ( a4 )
{
if ( a4 == 1 )
return (unsigned int)tree_walk_right_root_left(a1, *a1, a2, a3);
else
return 0;
}
else
{
return (unsigned int)tree_walk_left_root_right(a1, *a1, a2, a3);
}
}
| tree_walk:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x28],EAX
TEST EAX,EAX
JZ 0x001fbd2d
JMP 0x001fbd23
LAB_001fbd23:
MOV EAX,dword ptr [RBP + -0x28]
SUB EAX,0x1
JZ 0x001fbd4a
JMP 0x001fbd67
LAB_001fbd2d:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x001fbd80
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001fbd6e
LAB_001fbd4a:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x001fbe60
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001fbd6e
LAB_001fbd67:
MOV dword ptr [RBP + -0x4],0x0
LAB_001fbd6e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 tree_walk(int8 *param_1,int8 param_2,int8 param_3,int param_4)
{
int4 local_c;
if (param_4 == 0) {
local_c = tree_walk_left_root_right(param_1,*param_1,param_2,param_3);
}
else if (param_4 == 1) {
local_c = tree_walk_right_root_left(param_1,*param_1,param_2,param_3);
}
else {
local_c = 0;
}
return local_c;
}
| |
37,490 | run_tests | eloqsql/libmariadb/unittest/libmariadb/my_test.h | void run_tests(struct my_tests_st *test) {
int i, rc, total=0;
MYSQL *mysql;
while (test[total].function)
total++;
plan(total);
/* display TLS stats */
mysql= mysql_init(NULL);
mysql_ssl_set(mysql, NULL, NULL, NULL, NULL, NULL);
if (!mysql_real_connect(mysql, hostname, username, password, schema, port, socketname, 0))
{
BAIL_OUT("Can't establish TLS connection to server.");
}
if (!mysql_query(mysql, "SHOW VARIABLES LIKE '%ssl%'"))
{
MYSQL_RES *res;
MYSQL_ROW row;
diag("TLS server variables");
diag("--------------------");
res= mysql_store_result(mysql);
while ((row= mysql_fetch_row(res)))
diag("%s: %s", row[0], row[1]);
mysql_free_result(res);
diag("Cipher in use: %s", mysql_get_ssl_cipher(mysql));
diag("--------------------");
}
mysql_close(mysql);
if ((mysql_default= test_connect(NULL)))
{
diag("Testing against MySQL Server %s", mysql_get_server_info(mysql_default));
diag("Host: %s", mysql_get_host_info(mysql_default));
diag("Client library: %s", mysql_get_client_info());
is_mariadb= mariadb_connection(mysql_default);
}
else
{
BAIL_OUT("Can't connect to a server. Aborting....");
}
for (i=0; i < total; i++) {
if (!mysql_default && (test[i].connection & TEST_CONNECTION_DEFAULT))
{
diag("MySQL server not running");
skip(1, "%s", test[i].name);
} else if (!test[i].skipmsg) {
mysql= mysql_default;
if (test[i].connection & TEST_CONNECTION_NEW)
mysql= test_connect(&test[i]);
if (test[i].connection & TEST_CONNECTION_NONE)
mysql= NULL;
/* run test */
rc= test[i].function(mysql);
if (rc == SKIP)
skip(1, "%s", test[i].name);
else
ok(rc == OK, "%s", test[i].name);
/* if test failed, close and reopen default connection to prevent
errors for further tests */
if ((rc == FAIL || mysql_errno(mysql_default)) && (test[i].connection & TEST_CONNECTION_DEFAULT)) {
mysql_close(mysql_default);
mysql_default= test_connect(&test[i]);
}
/* clear connection: reset default connection or close extra connection */
else if (mysql_default && (test[i].connection & TEST_CONNECTION_DEFAULT)) {
if (reset_connection(mysql))
return; /* default doesn't work anymore */
}
else if (mysql && !(test[i].connection & TEST_CONNECTION_DONT_CLOSE))
{
mysql_close(mysql);
}
} else {
skip(1, "%s", test[i].skipmsg);
}
}
if (this_host)
free(this_host);
if (mysql_default) {
diag("close default");
mysql_close(mysql_default);
}
} | O0 | c | run_tests:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x14954
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x14933
movl -0x14(%rbp), %edi
callq 0x161c0
xorl %eax, %eax
movl %eax, %edi
callq 0x1b5d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rsi
movq %r9, %rdx
movq %r9, %rcx
movq %r9, %r8
callq 0x1b7f0
movq -0x20(%rbp), %rdi
movq 0x4c9b2(%rip), %rsi # 0x61340
movq 0x4c9b3(%rip), %rdx # 0x61348
movq 0x4c9b4(%rip), %rcx # 0x61350
movq 0x4c9b5(%rip), %r8 # 0x61358
movl 0x4c9b6(%rip), %r9d # 0x61360
movq 0x4c9b7(%rip), %rax # 0x61368
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x1baa0
cmpq $0x0, %rax
jne 0x149da
leaq 0x37b85(%rip), %rdi # 0x4c558
movb $0x0, %al
callq 0x16020
movq -0x20(%rbp), %rdi
leaq 0x37b9d(%rip), %rsi # 0x4c582
callq 0x1ef20
cmpl $0x0, %eax
jne 0x14a7f
leaq 0x37ba4(%rip), %rdi # 0x4c59e
movb $0x0, %al
callq 0x160f0
leaq 0x37bab(%rip), %rdi # 0x4c5b3
movb $0x0, %al
callq 0x160f0
movq -0x20(%rbp), %rdi
callq 0x20570
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x208b0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x14a4e
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x37b83(%rip), %rdi # 0x4c5c8
movb $0x0, %al
callq 0x160f0
jmp 0x14a1c
movq -0x28(%rbp), %rdi
callq 0x17db0
movq -0x20(%rbp), %rdi
callq 0x1b8d0
movq %rax, %rsi
leaq 0x37b65(%rip), %rdi # 0x4c5cf
movb $0x0, %al
callq 0x160f0
leaq 0x37b3b(%rip), %rdi # 0x4c5b3
movb $0x0, %al
callq 0x160f0
movq -0x20(%rbp), %rdi
callq 0x1e6a0
xorl %eax, %eax
movl %eax, %edi
callq 0x14250
movq %rax, 0x4c768(%rip) # 0x61200
cmpq $0x0, %rax
je 0x14b02
movq 0x4c75b(%rip), %rdi # 0x61200
callq 0x21440
movq %rax, %rsi
leaq 0x37b2d(%rip), %rdi # 0x4c5e1
movb $0x0, %al
callq 0x160f0
movq 0x4c73e(%rip), %rdi # 0x61200
callq 0x21530
movq %rax, %rsi
leaq 0x37b30(%rip), %rdi # 0x4c601
movb $0x0, %al
callq 0x160f0
callq 0x21570
movq %rax, %rsi
leaq 0x37b23(%rip), %rdi # 0x4c60a
movb $0x0, %al
callq 0x160f0
movq 0x4c70b(%rip), %rdi # 0x61200
callq 0x16e00
movb %al, 0x4c881(%rip) # 0x61381
jmp 0x14b10
leaq 0x37b14(%rip), %rdi # 0x4c61d
movb $0x0, %al
callq 0x16020
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x14d68
cmpq $0x0, 0x4c6d5(%rip) # 0x61200
jne 0x14b7f
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x14b7f
leaq 0x37af7(%rip), %rdi # 0x4c645
movb $0x0, %al
callq 0x160f0
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movl $0x1, %edi
leaq 0x377cc(%rip), %rsi # 0x4c33f
movb $0x0, %al
callq 0x16560
jmp 0x14d58
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x28(%rax)
jne 0x14d30
movq 0x4c660(%rip), %rax # 0x61200
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x14bd6
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x14250
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x14bf8
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rdi
callq *%rax
movl %eax, -0x10(%rbp)
cmpl $-0x1, -0x10(%rbp)
jne 0x14c41
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movl $0x1, %edi
leaq 0x37707(%rip), %rsi # 0x4c33f
movb $0x0, %al
callq 0x16560
jmp 0x14c6d
cmpl $0x0, -0x10(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %edi
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdx
leaq 0x376d9(%rip), %rsi # 0x4c33f
movb $0x0, %al
callq 0x16360
cmpl $0x1, -0x10(%rbp)
je 0x14c84
movq 0x4c586(%rip), %rdi # 0x61200
callq 0x22870
cmpl $0x0, %eax
je 0x14cc7
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x14cc7
movq 0x4c55b(%rip), %rdi # 0x61200
callq 0x1e6a0
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x14250
movq %rax, 0x4c53b(%rip) # 0x61200
jmp 0x14d2e
cmpq $0x0, 0x4c531(%rip) # 0x61200
je 0x14d00
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x14d00
movq -0x20(%rbp), %rdi
callq 0x14db0
cmpl $0x0, %eax
je 0x14cfe
jmp 0x14da2
jmp 0x14d2c
cmpq $0x0, -0x20(%rbp)
je 0x14d2a
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x14d2a
movq -0x20(%rbp), %rdi
callq 0x1e6a0
jmp 0x14d2c
jmp 0x14d2e
jmp 0x14d56
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rdx
movl $0x1, %edi
leaq 0x375f0(%rip), %rsi # 0x4c33f
movb $0x0, %al
callq 0x16560
jmp 0x14d58
jmp 0x14d5a
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x14b17
cmpq $0x0, 0x4c498(%rip) # 0x61208
je 0x14d7e
movq 0x4c48f(%rip), %rdi # 0x61208
callq 0x13520
cmpq $0x0, 0x4c47a(%rip) # 0x61200
je 0x14da2
leaq 0x378cf(%rip), %rdi # 0x4c65e
movb $0x0, %al
callq 0x160f0
movq 0x4c463(%rip), %rdi # 0x61200
callq 0x1e6a0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| run_tests:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_14], 0
loc_14933:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_14]
imul rcx, 30h ; '0'
add rax, rcx
cmp qword ptr [rax+8], 0
jz short loc_14954
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_14933
loc_14954:
mov edi, [rbp+var_14]
call plan
xor eax, eax
mov edi, eax
call mysql_init
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
xor eax, eax
mov r9d, eax
mov rsi, r9
mov rdx, r9
mov rcx, r9
mov r8, r9
call mysql_ssl_set
mov rdi, [rbp+var_20]
mov rsi, cs:hostname
mov rdx, cs:username
mov rcx, cs:password
mov r8, cs:schema
mov r9d, cs:port
mov rax, cs:socketname
xor r10d, r10d
mov [rsp+40h+var_40], rax
mov [rsp+40h+var_38], 0
call mysql_real_connect
cmp rax, 0
jnz short loc_149DA
lea rdi, aCanTEstablishT; "Can't establish TLS connection to serve"...
mov al, 0
call BAIL_OUT
loc_149DA:
mov rdi, [rbp+var_20]
lea rsi, aShowVariablesL; "SHOW VARIABLES LIKE '%ssl%'"
call mysql_query
cmp eax, 0
jnz loc_14A7F
lea rdi, aTlsServerVaria; "TLS server variables"
mov al, 0
call diag
lea rdi, asc_4C5B3; "--------------------"
mov al, 0
call diag
mov rdi, [rbp+var_20]
call mysql_store_result
mov [rbp+var_28], rax
loc_14A1C:
mov rdi, [rbp+var_28]
call mysql_fetch_row
mov [rbp+var_30], rax
cmp rax, 0
jz short loc_14A4E
mov rax, [rbp+var_30]
mov rsi, [rax]
mov rax, [rbp+var_30]
mov rdx, [rax+8]
lea rdi, aSS_0; "%s: %s"
mov al, 0
call diag
jmp short loc_14A1C
loc_14A4E:
mov rdi, [rbp+var_28]
call mysql_free_result
mov rdi, [rbp+var_20]
call mysql_get_ssl_cipher
mov rsi, rax
lea rdi, aCipherInUseS; "Cipher in use: %s"
mov al, 0
call diag
lea rdi, asc_4C5B3; "--------------------"
mov al, 0
call diag
loc_14A7F:
mov rdi, [rbp+var_20]
call mysql_close
xor eax, eax
mov edi, eax
call test_connect
mov cs:mysql_default, rax
cmp rax, 0
jz short loc_14B02
mov rdi, cs:mysql_default
call mysql_get_server_info
mov rsi, rax
lea rdi, aTestingAgainst; "Testing against MySQL Server %s"
mov al, 0
call diag
mov rdi, cs:mysql_default
call mysql_get_host_info
mov rsi, rax
lea rdi, aHostS; "Host: %s"
mov al, 0
call diag
call mysql_get_client_info
mov rsi, rax
lea rdi, aClientLibraryS; "Client library: %s"
mov al, 0
call diag
mov rdi, cs:mysql_default
call mariadb_connection
mov cs:is_mariadb, al
jmp short loc_14B10
loc_14B02:
lea rdi, aCanTConnectToA; "Can't connect to a server. Aborting...."
mov al, 0
call BAIL_OUT
loc_14B10:
mov [rbp+var_C], 0
loc_14B17:
mov eax, [rbp+var_C]
cmp eax, [rbp+var_14]
jge loc_14D68
cmp cs:mysql_default, 0
jnz short loc_14B7F
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov eax, [rax+10h]
and eax, 1
cmp eax, 0
jz short loc_14B7F
lea rdi, aMysqlServerNot; "MySQL server not running"
mov al, 0
call diag
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov rdx, [rax]
mov edi, 1
lea rsi, aCouldnTSetOpti+23h; "%s"
mov al, 0
call skip
jmp loc_14D58
loc_14B7F:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
cmp qword ptr [rax+28h], 0
jnz loc_14D30
mov rax, cs:mysql_default
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov eax, [rax+10h]
and eax, 4
cmp eax, 0
jz short loc_14BD6
mov rdi, [rbp+var_8]
movsxd rax, [rbp+var_C]
imul rax, 30h ; '0'
add rdi, rax
call test_connect
mov [rbp+var_20], rax
loc_14BD6:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov eax, [rax+10h]
and eax, 2
cmp eax, 0
jz short loc_14BF8
mov [rbp+var_20], 0
loc_14BF8:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov rax, [rax+8]
mov rdi, [rbp+var_20]
call rax
mov [rbp+var_10], eax
cmp [rbp+var_10], 0FFFFFFFFh
jnz short loc_14C41
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov rdx, [rax]
mov edi, 1
lea rsi, aCouldnTSetOpti+23h; "%s"
mov al, 0
call skip
jmp short loc_14C6D
loc_14C41:
cmp [rbp+var_10], 0
setz al
and al, 1
movzx edi, al
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov rdx, [rax]
lea rsi, aCouldnTSetOpti+23h; "%s"
mov al, 0
call ok
loc_14C6D:
cmp [rbp+var_10], 1
jz short loc_14C84
mov rdi, cs:mysql_default
call mysql_errno
cmp eax, 0
jz short loc_14CC7
loc_14C84:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov eax, [rax+10h]
and eax, 1
cmp eax, 0
jz short loc_14CC7
mov rdi, cs:mysql_default
call mysql_close
mov rdi, [rbp+var_8]
movsxd rax, [rbp+var_C]
imul rax, 30h ; '0'
add rdi, rax
call test_connect
mov cs:mysql_default, rax
jmp short loc_14D2E
loc_14CC7:
cmp cs:mysql_default, 0
jz short loc_14D00
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov eax, [rax+10h]
and eax, 1
cmp eax, 0
jz short loc_14D00
mov rdi, [rbp+var_20]
call reset_connection
cmp eax, 0
jz short loc_14CFE
jmp loc_14DA2
loc_14CFE:
jmp short loc_14D2C
loc_14D00:
cmp [rbp+var_20], 0
jz short loc_14D2A
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov eax, [rax+10h]
and eax, 8
cmp eax, 0
jnz short loc_14D2A
mov rdi, [rbp+var_20]
call mysql_close
loc_14D2A:
jmp short $+2
loc_14D2C:
jmp short $+2
loc_14D2E:
jmp short loc_14D56
loc_14D30:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov rdx, [rax+28h]
mov edi, 1
lea rsi, aCouldnTSetOpti+23h; "%s"
mov al, 0
call skip
loc_14D56:
jmp short $+2
loc_14D58:
jmp short $+2
loc_14D5A:
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp loc_14B17
loc_14D68:
cmp cs:this_host, 0
jz short loc_14D7E
mov rdi, cs:this_host
call _free
loc_14D7E:
cmp cs:mysql_default, 0
jz short loc_14DA2
lea rdi, aCloseDefault; "close default"
mov al, 0
call diag
mov rdi, cs:mysql_default
call mysql_close
loc_14DA2:
add rsp, 40h
pop rbp
retn
| long long run_tests(long long a1)
{
int v1; // esi
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
const char *v6; // rsi
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
int v11; // edx
int v12; // ecx
int v13; // r8d
int v14; // r9d
int v15; // ecx
int v16; // r8d
int v17; // r9d
int v18; // edx
int v19; // ecx
int v20; // r8d
int v21; // r9d
int v22; // edx
int v23; // ecx
int v24; // r8d
int v25; // r9d
int v26; // edx
int v27; // ecx
int v28; // r8d
int v29; // r9d
int server_info; // eax
int v31; // edx
int v32; // ecx
int v33; // r8d
int v34; // r9d
int host_info; // eax
int v36; // edx
int v37; // ecx
int v38; // r8d
int v39; // r9d
char *v40; // rsi
int v41; // edx
int v42; // ecx
int v43; // r8d
int v44; // r9d
int v45; // edx
long long v46; // rcx
int v47; // r8d
int v48; // r9d
long long result; // rax
long long v50; // rcx
int v51; // r8d
int v52; // r9d
int v53; // r8d
int v54; // r9d
char v55; // [rsp+0h] [rbp-40h]
_QWORD *row; // [rsp+10h] [rbp-30h]
long long v57; // [rsp+18h] [rbp-28h]
long long v58; // [rsp+20h] [rbp-20h]
long long v59; // [rsp+20h] [rbp-20h]
unsigned int i; // [rsp+2Ch] [rbp-14h]
int v61; // [rsp+30h] [rbp-10h]
unsigned int j; // [rsp+34h] [rbp-Ch]
for ( i = 0; *(_QWORD *)(48LL * (int)i + a1 + 8); ++i )
;
plan(i);
v58 = mysql_init(0LL);
mysql_ssl_set(v58, 0LL, 0LL, 0LL, 0LL);
v1 = hostname;
if ( !mysql_real_connect(v58, hostname, username, password, schema, port, socketname, 0LL) )
BAIL_OUT((unsigned int)"Can't establish TLS connection to server.", v1, v2, v3, v4, v5);
v6 = "SHOW VARIABLES LIKE '%ssl%'";
if ( !(unsigned int)mysql_query(v58, "SHOW VARIABLES LIKE '%ssl%'") )
{
diag((unsigned int)"TLS server variables", (unsigned int)"SHOW VARIABLES LIKE '%ssl%'", v7, v8, v9, v10);
diag((unsigned int)"--------------------", (unsigned int)"SHOW VARIABLES LIKE '%ssl%'", v11, v12, v13, v14);
v57 = mysql_store_result(v58);
while ( 1 )
{
row = (_QWORD *)mysql_fetch_row(v57);
if ( !row )
break;
diag((unsigned int)"%s: %s", *row, row[1], v15, v16, v17);
}
mysql_free_result(v57);
LODWORD(v6) = mysql_get_ssl_cipher(v58);
diag((unsigned int)"Cipher in use: %s", (_DWORD)v6, v18, v19, v20, v21);
diag((unsigned int)"--------------------", (_DWORD)v6, v22, v23, v24, v25);
}
mysql_close(v58);
mysql_default = test_connect(0LL, (int)v6);
if ( !mysql_default )
BAIL_OUT((unsigned int)"Can't connect to a server. Aborting....", (_DWORD)v6, v26, v27, v28, v29);
server_info = mysql_get_server_info(mysql_default);
diag((unsigned int)"Testing against MySQL Server %s", server_info, v31, v32, v33, v34);
host_info = mysql_get_host_info(mysql_default);
diag((unsigned int)"Host: %s", host_info, v36, v37, v38, v39);
LODWORD(v40) = mysql_get_client_info();
diag((unsigned int)"Client library: %s", (_DWORD)v40, v41, v42, v43, v44);
is_mariadb = mariadb_connection(mysql_default);
for ( j = 0; ; ++j )
{
result = j;
if ( (int)j >= (int)i )
break;
if ( mysql_default || (v50 = 48LL * (int)j, (*(_DWORD *)(v50 + a1 + 16) & 1) == 0) )
{
if ( *(_QWORD *)(48LL * (int)j + a1 + 40) )
{
v40 = "%s";
skip(1, (unsigned int)"%s", *(_QWORD *)(48LL * (int)j + a1 + 40), 48 * j, v47, v48, v55);
}
else
{
v59 = mysql_default;
if ( (*(_DWORD *)(48LL * (int)j + a1 + 16) & 4) != 0 )
v59 = test_connect(48LL * (int)j + a1, (int)v40);
if ( (*(_DWORD *)(48LL * (int)j + a1 + 16) & 2) != 0 )
v59 = 0LL;
v61 = (*(long long ( **)(long long))(48LL * (int)j + a1 + 8))(v59);
v40 = "%s";
if ( v61 == -1 )
skip(1, (unsigned int)"%s", *(_QWORD *)(48LL * (int)j + a1), 48 * j, v53, v54, v55);
else
ok(v61 == 0, (unsigned int)"%s", *(_QWORD *)(48LL * (int)j + a1), 48 * j, v53, v54, v55);
if ( (v61 == 1 || (unsigned int)mysql_errno(mysql_default))
&& (v46 = 48LL * (int)j, (*(_DWORD *)(v46 + a1 + 16) & 1) != 0) )
{
mysql_close(mysql_default);
mysql_default = test_connect(48LL * (int)j + a1, (int)"%s");
}
else if ( mysql_default && (v46 = 48LL * (int)j, (*(_DWORD *)(v46 + a1 + 16) & 1) != 0) )
{
result = reset_connection(v59);
if ( (_DWORD)result )
return result;
}
else if ( v59 )
{
v46 = 48LL * (int)j;
if ( (*(_DWORD *)(v46 + a1 + 16) & 8) == 0 )
mysql_close(v59);
}
}
}
else
{
diag((unsigned int)"MySQL server not running", (_DWORD)v40, v45, v50, v47, v48);
v40 = "%s";
skip(1, (unsigned int)"%s", *(_QWORD *)(48LL * (int)j + a1), 48 * j, v51, v52, v55);
}
}
if ( this_host )
result = free(this_host);
if ( mysql_default )
{
diag((unsigned int)"close default", (_DWORD)v40, v45, v46, v47, v48);
return mysql_close(mysql_default);
}
return result;
}
| run_tests:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0x14],0x0
LAB_00114933:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x30
ADD RAX,RCX
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00114954
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00114933
LAB_00114954:
MOV EDI,dword ptr [RBP + -0x14]
CALL 0x001161c0
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0011b5d0
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
XOR EAX,EAX
MOV R9D,EAX
MOV RSI,R9
MOV RDX,R9
MOV RCX,R9
MOV R8,R9
CALL 0x0011b7f0
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [0x00161340]
MOV RDX,qword ptr [0x00161348]
MOV RCX,qword ptr [0x00161350]
MOV R8,qword ptr [0x00161358]
MOV R9D,dword ptr [0x00161360]
MOV RAX,qword ptr [0x00161368]
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
CALL 0x0011baa0
CMP RAX,0x0
JNZ 0x001149da
LEA RDI,[0x14c558]
MOV AL,0x0
CALL 0x00116020
LAB_001149da:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x14c582]
CALL 0x0011ef20
CMP EAX,0x0
JNZ 0x00114a7f
LEA RDI,[0x14c59e]
MOV AL,0x0
CALL 0x001160f0
LEA RDI,[0x14c5b3]
MOV AL,0x0
CALL 0x001160f0
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00120570
MOV qword ptr [RBP + -0x28],RAX
LAB_00114a1c:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001208b0
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,0x0
JZ 0x00114a4e
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[0x14c5c8]
MOV AL,0x0
CALL 0x001160f0
JMP 0x00114a1c
LAB_00114a4e:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00117db0
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0011b8d0
MOV RSI,RAX
LEA RDI,[0x14c5cf]
MOV AL,0x0
CALL 0x001160f0
LEA RDI,[0x14c5b3]
MOV AL,0x0
CALL 0x001160f0
LAB_00114a7f:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0011e6a0
XOR EAX,EAX
MOV EDI,EAX
CALL 0x00114250
MOV qword ptr [0x00161200],RAX
CMP RAX,0x0
JZ 0x00114b02
MOV RDI,qword ptr [0x00161200]
CALL 0x00121440
MOV RSI,RAX
LEA RDI,[0x14c5e1]
MOV AL,0x0
CALL 0x001160f0
MOV RDI,qword ptr [0x00161200]
CALL 0x00121530
MOV RSI,RAX
LEA RDI,[0x14c601]
MOV AL,0x0
CALL 0x001160f0
CALL 0x00121570
MOV RSI,RAX
LEA RDI,[0x14c60a]
MOV AL,0x0
CALL 0x001160f0
MOV RDI,qword ptr [0x00161200]
CALL 0x00116e00
MOV byte ptr [0x00161381],AL
JMP 0x00114b10
LAB_00114b02:
LEA RDI,[0x14c61d]
MOV AL,0x0
CALL 0x00116020
LAB_00114b10:
MOV dword ptr [RBP + -0xc],0x0
LAB_00114b17:
MOV EAX,dword ptr [RBP + -0xc]
CMP EAX,dword ptr [RBP + -0x14]
JGE 0x00114d68
CMP qword ptr [0x00161200],0x0
JNZ 0x00114b7f
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00114b7f
LEA RDI,[0x14c645]
MOV AL,0x0
CALL 0x001160f0
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV RDX,qword ptr [RAX]
MOV EDI,0x1
LEA RSI,[0x14c33f]
MOV AL,0x0
CALL 0x00116560
JMP 0x00114d58
LAB_00114b7f:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
CMP qword ptr [RAX + 0x28],0x0
JNZ 0x00114d30
MOV RAX,qword ptr [0x00161200]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x4
CMP EAX,0x0
JZ 0x00114bd6
MOV RDI,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RBP + -0xc]
IMUL RAX,RAX,0x30
ADD RDI,RAX
CALL 0x00114250
MOV qword ptr [RBP + -0x20],RAX
LAB_00114bd6:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x2
CMP EAX,0x0
JZ 0x00114bf8
MOV qword ptr [RBP + -0x20],0x0
LAB_00114bf8:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x20]
CALL RAX
MOV dword ptr [RBP + -0x10],EAX
CMP dword ptr [RBP + -0x10],-0x1
JNZ 0x00114c41
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV RDX,qword ptr [RAX]
MOV EDI,0x1
LEA RSI,[0x14c33f]
MOV AL,0x0
CALL 0x00116560
JMP 0x00114c6d
LAB_00114c41:
CMP dword ptr [RBP + -0x10],0x0
SETZ AL
AND AL,0x1
MOVZX EDI,AL
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV RDX,qword ptr [RAX]
LEA RSI,[0x14c33f]
MOV AL,0x0
CALL 0x00116360
LAB_00114c6d:
CMP dword ptr [RBP + -0x10],0x1
JZ 0x00114c84
MOV RDI,qword ptr [0x00161200]
CALL 0x00122870
CMP EAX,0x0
JZ 0x00114cc7
LAB_00114c84:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00114cc7
MOV RDI,qword ptr [0x00161200]
CALL 0x0011e6a0
MOV RDI,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RBP + -0xc]
IMUL RAX,RAX,0x30
ADD RDI,RAX
CALL 0x00114250
MOV qword ptr [0x00161200],RAX
JMP 0x00114d2e
LAB_00114cc7:
CMP qword ptr [0x00161200],0x0
JZ 0x00114d00
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00114d00
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00114db0
CMP EAX,0x0
JZ 0x00114cfe
JMP 0x00114da2
LAB_00114cfe:
JMP 0x00114d2c
LAB_00114d00:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00114d2a
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x8
CMP EAX,0x0
JNZ 0x00114d2a
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0011e6a0
LAB_00114d2a:
JMP 0x00114d2c
LAB_00114d2c:
JMP 0x00114d2e
LAB_00114d2e:
JMP 0x00114d56
LAB_00114d30:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV RDX,qword ptr [RAX + 0x28]
MOV EDI,0x1
LEA RSI,[0x14c33f]
MOV AL,0x0
CALL 0x00116560
LAB_00114d56:
JMP 0x00114d58
LAB_00114d58:
JMP 0x00114d5a
LAB_00114d5a:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x00114b17
LAB_00114d68:
CMP qword ptr [0x00161208],0x0
JZ 0x00114d7e
MOV RDI,qword ptr [0x00161208]
CALL 0x00113520
LAB_00114d7e:
CMP qword ptr [0x00161200],0x0
JZ 0x00114da2
LEA RDI,[0x14c65e]
MOV AL,0x0
CALL 0x001160f0
MOV RDI,qword ptr [0x00161200]
CALL 0x0011e6a0
LAB_00114da2:
ADD RSP,0x40
POP RBP
RET
|
void run_tests(long param_1)
{
int iVar1;
int8 uVar2;
long lVar3;
int8 uVar4;
int8 *puVar5;
long local_28;
int local_1c;
int local_14;
local_1c = 0;
while (*(long *)(param_1 + (long)local_1c * 0x30 + 8) != 0) {
local_1c = local_1c + 1;
}
plan(local_1c);
uVar2 = mysql_init(0);
mysql_ssl_set(uVar2,0,0,0,0);
lVar3 = mysql_real_connect(uVar2,hostname,username,password,schema,port,socketname,0);
if (lVar3 == 0) {
BAIL_OUT("Can\'t establish TLS connection to server.");
}
iVar1 = mysql_query(uVar2,"SHOW VARIABLES LIKE \'%ssl%\'");
if (iVar1 == 0) {
diag("TLS server variables");
diag("--------------------");
uVar4 = mysql_store_result(uVar2);
while (puVar5 = (int8 *)mysql_fetch_row(uVar4), puVar5 != (int8 *)0x0) {
diag("%s: %s",*puVar5,puVar5[1]);
}
mysql_free_result(uVar4);
uVar4 = mysql_get_ssl_cipher(uVar2);
diag("Cipher in use: %s",uVar4);
diag("--------------------");
}
mysql_close(uVar2);
mysql_default = test_connect(0);
if (mysql_default == 0) {
BAIL_OUT("Can\'t connect to a server. Aborting....");
}
else {
uVar2 = mysql_get_server_info(mysql_default);
diag("Testing against MySQL Server %s",uVar2);
uVar2 = mysql_get_host_info(mysql_default);
diag("Host: %s",uVar2);
uVar2 = mysql_get_client_info();
diag("Client library: %s",uVar2);
is_mariadb = mariadb_connection(mysql_default);
}
local_14 = 0;
do {
if (local_1c <= local_14) {
if (this_host != (void *)0x0) {
free(this_host);
}
if (mysql_default != 0) {
diag("close default");
mysql_close(mysql_default);
}
return;
}
if ((mysql_default == 0) && ((*(uint *)(param_1 + (long)local_14 * 0x30 + 0x10) & 1) != 0)) {
diag("MySQL server not running");
skip(1,"%s",*(int8 *)(param_1 + (long)local_14 * 0x30));
}
else if (*(long *)(param_1 + (long)local_14 * 0x30 + 0x28) == 0) {
local_28 = mysql_default;
if ((*(uint *)(param_1 + (long)local_14 * 0x30 + 0x10) & 4) != 0) {
local_28 = test_connect(param_1 + (long)local_14 * 0x30);
}
if ((*(uint *)(param_1 + (long)local_14 * 0x30 + 0x10) & 2) != 0) {
local_28 = 0;
}
iVar1 = (**(code **)(param_1 + (long)local_14 * 0x30 + 8))(local_28);
if (iVar1 == -1) {
skip(1,"%s",*(int8 *)(param_1 + (long)local_14 * 0x30));
}
else {
ok(iVar1 == 0,"%s",*(int8 *)(param_1 + (long)local_14 * 0x30));
}
if (((iVar1 == 1) || (iVar1 = mysql_errno(mysql_default), iVar1 != 0)) &&
((*(uint *)(param_1 + (long)local_14 * 0x30 + 0x10) & 1) != 0)) {
mysql_close(mysql_default);
mysql_default = test_connect(param_1 + (long)local_14 * 0x30);
}
else if ((mysql_default == 0) ||
((*(uint *)(param_1 + (long)local_14 * 0x30 + 0x10) & 1) == 0)) {
if ((local_28 != 0) && ((*(uint *)(param_1 + (long)local_14 * 0x30 + 0x10) & 8) == 0)) {
mysql_close(local_28);
}
}
else {
iVar1 = reset_connection(local_28);
if (iVar1 != 0) {
return;
}
}
}
else {
skip(1,"%s",*(int8 *)(param_1 + (long)local_14 * 0x30 + 0x28));
}
local_14 = local_14 + 1;
} while( true );
}
| |
37,491 | google::protobuf::compiler::objectivec::FilePathBasename[abi:cxx11](google::protobuf::FileDescriptor const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc | std::string FilePathBasename(const FileDescriptor* file) {
std::string output;
std::string basename;
std::string directory;
PathSplit(file->name(), &directory, &basename);
basename = StripProto(basename);
// CamelCase to be more ObjC friendly.
output = UnderscoresToCamelCase(basename, true);
return output;
} | O0 | cpp | google::protobuf::compiler::objectivec::FilePathBasename[abi:cxx11](google::protobuf::FileDescriptor const*):
subq $0xd8, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movb $0x0, 0xc7(%rsp)
callq 0x21390
leaq 0xa0(%rsp), %rdi
callq 0x21390
leaq 0x80(%rsp), %rdi
callq 0x21390
movq 0xc8(%rsp), %rdi
callq 0x28990
movq %rax, 0x28(%rsp)
jmp 0x832cf
movq 0x28(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x81a80
jmp 0x832eb
leaq 0x50(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x286b0
jmp 0x832ff
leaq 0xa0(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x50(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0x215e0
movq 0x8(%rsp), %rdi
callq 0x21cc8
movq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdi
movl $0x1, %edx
callq 0x82ad0
jmp 0x8333b
movq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x215e0
leaq 0x30(%rsp), %rdi
callq 0x21cc8
movb $0x1, 0xc7(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x21cc8
leaq 0xa0(%rsp), %rdi
callq 0x21cc8
testb $0x1, 0xc7(%rsp)
jne 0x833c0
jmp 0x833b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x21cc8
leaq 0xa0(%rsp), %rdi
callq 0x21cc8
movq 0x18(%rsp), %rdi
callq 0x21cc8
jmp 0x833cd
movq 0x18(%rsp), %rdi
callq 0x21cc8
movq 0x20(%rsp), %rax
addq $0xd8, %rsp
retq
movq 0x78(%rsp), %rdi
callq 0x21700
nopw (%rax,%rax)
| _ZN6google8protobuf8compiler10objectivec16FilePathBasenameB5cxx11EPKNS0_14FileDescriptorE:
sub rsp, 0D8h
mov [rsp+0D8h+var_C0], rdi; int
mov rax, rdi
mov qword ptr [rsp+0D8h+var_B8], rax; int
mov qword ptr [rsp+0D8h+var_8], rdi; char
mov qword ptr [rsp+0D8h+var_10], rsi; int
mov [rsp+0D8h+var_11], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
lea rdi, [rsp+0D8h+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
lea rdi, [rsp+0D8h+var_58]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rdi, qword ptr [rsp+0D8h+var_10]
call _ZNK6google8protobuf14FileDescriptor4nameB5cxx11Ev; google::protobuf::FileDescriptor::name(void)
mov qword ptr [rsp+0D8h+var_B0], rax; int
jmp short $+2
loc_832CF:
mov rdi, qword ptr [rsp+0D8h+var_B0]
lea rsi, [rsp+0D8h+var_58]
lea rdx, [rsp+0D8h+var_38]
call _ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_19PathSplitERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS9_SC_; google::protobuf::compiler::objectivec::`anonymous namespace'::PathSplit(std::string const&,std::string*,std::string*)
jmp short $+2
loc_832EB:
lea rdi, [rsp+0D8h+var_88]
lea rsi, [rsp+0D8h+var_38]
call _ZN6google8protobuf8compiler10StripProtoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::StripProto(std::string const&)
jmp short $+2
loc_832FF:
lea rdi, [rsp+0D8h+var_38]
mov qword ptr [rsp+0D8h+var_C8], rdi; int
lea rsi, [rsp+0D8h+var_88]
mov [rsp+0D8h+var_D0], rsi; int
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rsp+0D8h+var_D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rsi, qword ptr [rsp+0D8h+var_C8]; int
lea rdi, [rsp+0D8h+var_A8]; int
mov edx, 1; int
call _ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_122UnderscoresToCamelCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; google::protobuf::compiler::objectivec::`anonymous namespace'::UnderscoresToCamelCase(std::string const&,bool)
jmp short $+2
loc_8333B:
mov rdi, [rsp+0D8h+var_C0]
lea rsi, [rsp+0D8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rsp+0D8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov [rsp+0D8h+var_11], 1
lea rdi, [rsp+0D8h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
test [rsp+0D8h+var_11], 1
jnz short loc_833C0
jmp short loc_833B6
mov rcx, rax
mov eax, edx
mov [rsp+arg_70], rcx
mov [rsp+arg_6C], eax
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+arg_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+arg_10]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_833CD
loc_833B6:
mov rdi, [rsp+0D8h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_833C0:
mov rax, qword ptr [rsp+0D8h+var_B8]
add rsp, 0D8h
retn
loc_833CD:
mov rdi, [rsp+arg_70]
call __Unwind_Resume
| void * google::protobuf::compiler::objectivec::FilePathBasename[abi:cxx11](void *a1, long long a2)
{
long long v3; // [rsp+28h] [rbp-B0h]
int v4[8]; // [rsp+30h] [rbp-A8h] BYREF
int v5[12]; // [rsp+50h] [rbp-88h] BYREF
_BYTE v6[32]; // [rsp+80h] [rbp-58h] BYREF
int v7[9]; // [rsp+A0h] [rbp-38h] BYREF
char v8; // [rsp+C7h] [rbp-11h]
int v9[2]; // [rsp+C8h] [rbp-10h]
char v10[8]; // [rsp+D0h] [rbp-8h]
*(_QWORD *)v10 = a1;
*(_QWORD *)v9 = a2;
v8 = 0;
std::string::basic_string(a1);
std::string::basic_string(v7);
std::string::basic_string(v6);
v3 = google::protobuf::FileDescriptor::name[abi:cxx11](*(long long *)v9);
google::protobuf::compiler::objectivec::`anonymous namespace'::PathSplit(v3, (long long)v6, (long long)v7);
google::protobuf::compiler::StripProto((long long)v5, (long long)v7);
std::string::operator=(v7, v5);
std::string::~string(v5);
google::protobuf::compiler::objectivec::`anonymous namespace'::UnderscoresToCamelCase((long long)v4, (long long)v7, 1);
std::string::operator=(a1, v4);
std::string::~string(v4);
v8 = 1;
std::string::~string(v6);
std::string::~string(v7);
if ( (v8 & 1) == 0 )
std::string::~string(a1);
return a1;
}
| FilePathBasename[abi:cxx11]:
SUB RSP,0xd8
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0xd0],RDI
MOV qword ptr [RSP + 0xc8],RSI
MOV byte ptr [RSP + 0xc7],0x0
CALL 0x00121390
LEA RDI,[RSP + 0xa0]
CALL 0x00121390
LEA RDI,[RSP + 0x80]
CALL 0x00121390
MOV RDI,qword ptr [RSP + 0xc8]
LAB_001832c3:
CALL 0x00128990
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001832cf
LAB_001832cf:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x80]
LEA RDX,[RSP + 0xa0]
CALL 0x00181a80
JMP 0x001832eb
LAB_001832eb:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xa0]
CALL 0x001286b0
JMP 0x001832ff
LAB_001832ff:
LEA RDI,[RSP + 0xa0]
MOV qword ptr [RSP + 0x10],RDI
LEA RSI,[RSP + 0x50]
MOV qword ptr [RSP + 0x8],RSI
CALL 0x001215e0
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00121cc8
MOV RSI,qword ptr [RSP + 0x10]
LEA RDI,[RSP + 0x30]
MOV EDX,0x1
CALL 0x00182ad0
LAB_00183339:
JMP 0x0018333b
LAB_0018333b:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x30]
CALL 0x001215e0
LEA RDI,[RSP + 0x30]
CALL 0x00121cc8
MOV byte ptr [RSP + 0xc7],0x1
LEA RDI,[RSP + 0x80]
CALL 0x00121cc8
LEA RDI,[RSP + 0xa0]
CALL 0x00121cc8
TEST byte ptr [RSP + 0xc7],0x1
JNZ 0x001833c0
JMP 0x001833b6
LAB_001833b6:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00121cc8
LAB_001833c0:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0xd8
RET
|
/* google::protobuf::compiler::objectivec::FilePathBasename[abi:cxx11](google::protobuf::FileDescriptor
const*) */
objectivec * __thiscall
google::protobuf::compiler::objectivec::FilePathBasename_abi_cxx11_
(objectivec *this,FileDescriptor *param_1)
{
string *psVar1;
_anonymous_namespace_ local_a8 [32];
compiler local_88 [48];
string local_58 [32];
string local_38 [39];
byte local_11;
FileDescriptor *local_10;
objectivec *local_8;
local_11 = 0;
local_10 = param_1;
local_8 = this;
std::__cxx11::string::string((string *)this);
std::__cxx11::string::string(local_38);
std::__cxx11::string::string(local_58);
/* try { // try from 001832c3 to 00183338 has its CatchHandler @ 00183382 */
psVar1 = (string *)FileDescriptor::name_abi_cxx11_(local_10);
(anonymous_namespace)::PathSplit(psVar1,local_58,local_38);
StripProto(local_88,local_38);
std::__cxx11::string::operator=(local_38,(string *)local_88);
std::__cxx11::string::~string((string *)local_88);
(anonymous_namespace)::UnderscoresToCamelCase(local_a8,local_38,true);
std::__cxx11::string::operator=((string *)this,(string *)local_a8);
std::__cxx11::string::~string((string *)local_a8);
local_11 = 1;
std::__cxx11::string::~string(local_58);
std::__cxx11::string::~string(local_38);
if ((local_11 & 1) == 0) {
std::__cxx11::string::~string((string *)this);
}
return this;
}
| |
37,492 | coro::detail::when_all_task_promise<double&&>::unhandled_exception() | AlayaLite/build_O3/_deps/libcoro-src/include/coro/when_all.hpp | auto unhandled_exception() noexcept { m_exception_ptr = std::current_exception(); } | O3 | cpp | coro::detail::when_all_task_promise<double&&>::unhandled_exception():
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x21a0
movq (%r14), %rax
movq $0x0, (%r14)
movq 0x8(%rbx), %rcx
movq %rcx, 0x10(%rsp)
movq %rax, 0x8(%rbx)
testq %rcx, %rcx
je 0x39b3
leaq 0x10(%rsp), %rdi
callq 0x2130
cmpq $0x0, 0x8(%rsp)
je 0x39b3
leaq 0x8(%rsp), %rdi
callq 0x2130
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN4coro6detail21when_all_task_promiseIOdE19unhandled_exceptionEv:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
lea r14, [rsp+28h+var_20]
mov rdi, r14
call __ZSt17current_exceptionv; std::current_exception(void)
mov rax, [r14]
mov qword ptr [r14], 0
mov rcx, [rbx+8]
mov [rsp+28h+var_18], rcx
mov [rbx+8], rax
test rcx, rcx
jz short loc_39B3
lea rdi, [rsp+28h+var_18]; this
call __ZNSt15__exception_ptr13exception_ptr10_M_releaseEv; std::__exception_ptr::exception_ptr::_M_release(void)
cmp [rsp+28h+var_20], 0
jz short loc_39B3
lea rdi, [rsp+28h+var_20]; this
call __ZNSt15__exception_ptr13exception_ptr10_M_releaseEv; std::__exception_ptr::exception_ptr::_M_release(void)
loc_39B3:
add rsp, 18h
pop rbx
pop r14
retn
| long long coro::detail::when_all_task_promise<double &&>::unhandled_exception(long long a1)
{
long long result; // rax
long long v2; // rcx
long long v3; // [rsp+8h] [rbp-20h] BYREF
_QWORD v4[3]; // [rsp+10h] [rbp-18h] BYREF
std::current_exception();
result = v3;
v3 = 0LL;
v4[0] = *(_QWORD *)(a1 + 8);
v2 = v4[0];
*(_QWORD *)(a1 + 8) = result;
if ( v2 )
{
result = std::__exception_ptr::exception_ptr::_M_release((std::__exception_ptr::exception_ptr *)v4);
if ( v3 )
return std::__exception_ptr::exception_ptr::_M_release((std::__exception_ptr::exception_ptr *)&v3);
}
return result;
}
| unhandled_exception:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x001021a0
MOV RAX,qword ptr [R14]
MOV qword ptr [R14],0x0
MOV RCX,qword ptr [RBX + 0x8]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RBX + 0x8],RAX
TEST RCX,RCX
JZ 0x001039b3
LEA RDI,[RSP + 0x10]
CALL 0x00102130
CMP qword ptr [RSP + 0x8],0x0
JZ 0x001039b3
LEA RDI,[RSP + 0x8]
CALL 0x00102130
LAB_001039b3:
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* WARNING: Removing unreachable block (ram,0x001039a9) */
/* coro::detail::when_all_task_promise<double&&>::unhandled_exception() */
void __thiscall
coro::detail::when_all_task_promise<double&&>::unhandled_exception
(when_all_task_promise<double&&> *this)
{
long lVar1;
int8 local_20;
std::current_exception();
lVar1 = *(long *)(this + 8);
*(int8 *)(this + 8) = local_20;
if (lVar1 != 0) {
std::__exception_ptr::exception_ptr::_M_release();
}
return;
}
| |
37,493 | testing::AssertionResult& testing::AssertionResult::operator<<<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/include/gtest/gtest-assertion-result.h | AssertionResult& operator<<(const T& value) {
AppendMessage(Message() << value);
return *this;
} | O1 | c | testing::AssertionResult& testing::AssertionResult::operator<<<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x20c50
movq (%r14), %rsi
movq %r15, %rdi
callq 0x20ca0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x103a2
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3e260
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3e280
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x99a0
| _ZN7testing15AssertionResultlsIPKwEERS0_RKT_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+28h+var_20]
mov rdi, r15; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rsi, [r14]
mov rdi, r15
call _ZN7testing7MessagelsEPKw; testing::Message::operator<<(wchar_t const*)
lea rsi, [rsp+28h+var_20]; testing::Message *
mov rdi, rbx; this
call _ZN7testing15AssertionResult13AppendMessageERKNS_7MessageE; testing::AssertionResult::AppendMessage(testing::Message const&)
mov rdi, [rsp+28h+var_20]
test rdi, rdi
jz short loc_3E260
mov rax, [rdi]
call qword ptr [rax+8]
loc_3E260:
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_3E280
mov rax, [rdi]
call qword ptr [rax+8]
loc_3E280:
mov rdi, rbx
call __Unwind_Resume
| testing::AssertionResult * testing::AssertionResult::operator<<<wchar_t const*>(
testing::AssertionResult *this)
{
_QWORD v2[4]; // [rsp+8h] [rbp-20h] BYREF
testing::Message::Message((testing::Message *)v2);
testing::Message::operator<<(v2);
testing::AssertionResult::AppendMessage(this, (const testing::Message *)v2);
if ( v2[0] )
(*(void ( **)(_QWORD))(*(_QWORD *)v2[0] + 8LL))(v2[0]);
return this;
}
| operator<<:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x00120c50
MOV RSI,qword ptr [R14]
LAB_0013e23b:
MOV RDI,R15
CALL 0x00120ca0
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x001103a2
LAB_0013e250:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0013e260
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0013e260:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* testing::AssertionResult& testing::AssertionResult::TEMPNAMEPLACEHOLDERVALUE(wchar_t const*
const&) */
AssertionResult * __thiscall
testing::AssertionResult::operator<<(AssertionResult *this,wchar_t **param_1)
{
long *local_20;
Message::Message((Message *)&local_20);
/* try { // try from 0013e23b to 0013e24f has its CatchHandler @ 0013e26d */
Message::operator<<((Message *)&local_20,*param_1);
AppendMessage((Message *)this);
if (local_20 != (long *)0x0) {
(**(code **)(*local_20 + 8))();
}
return this;
}
| |
37,494 | bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [10], 0>(char const (&) [10]) const | monkey531[P]llama/common/./json.hpp | constexpr bool is_object() const noexcept
{
return m_data.m_type == value_t::object;
} | O1 | cpp | bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [10], 0>(char const (&) [10]) const:
cmpb $0x1, (%rdi)
jne 0x9d32c
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r12
movq (%r12), %r15
movq 0x8(%r12), %rax
cmpq %rax, %r15
je 0x9d332
movq %rsi, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x1a1a0
testl %eax, %eax
je 0x9d32f
addq $0x30, %r15
movq 0x8(%r12), %rax
cmpq %rax, %r15
jne 0x9d30d
jmp 0x9d332
xorl %eax, %eax
retq
movq %r15, %rax
movq 0x8(%rbx), %rcx
cmpq 0x8(%rcx), %rax
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
cmp byte ptr [rdi], 1
jnz short loc_9D32C
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
mov r12, [rdi+8]
mov r15, [r12]
mov rax, [r12+8]
cmp r15, rax
jz short loc_9D332
mov r14, rsi
loc_9D30D:
mov rdi, r15
mov rsi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_9D32F
add r15, 30h ; '0'
mov rax, [r12+8]
cmp r15, rax
jnz short loc_9D30D
jmp short loc_9D332
loc_9D32C:
xor eax, eax
retn
loc_9D32F:
mov rax, r15
loc_9D332:
mov rcx, [rbx+8]
cmp rax, [rcx+8]
setnz al
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
long long a1,
long long a2)
{
long long *v2; // r12
long long v3; // r15
long long v4; // rax
if ( *(_BYTE *)a1 != 1 )
return 0;
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
return v4 != *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
v4 = v3;
}
return v4 != *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
CMP byte ptr [RDI],0x1
JNZ 0x0019d32c
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R12,qword ptr [RDI + 0x8]
MOV R15,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP R15,RAX
JZ 0x0019d332
MOV R14,RSI
LAB_0019d30d:
MOV RDI,R15
MOV RSI,R14
CALL 0x0011a1a0
TEST EAX,EAX
JZ 0x0019d32f
ADD R15,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP R15,RAX
JNZ 0x0019d30d
JMP 0x0019d332
LAB_0019d32c:
XOR EAX,EAX
RET
LAB_0019d32f:
MOV RAX,R15
LAB_0019d332:
MOV RCX,qword ptr [RBX + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
SETNZ AL
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int8
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(char *param_1)
{
long *plVar1;
int iVar2;
char *pcVar3;
char *pcVar4;
if (*param_1 != '\x01') {
return 0;
}
plVar1 = *(long **)(param_1 + 8);
pcVar3 = (char *)plVar1[1];
pcVar4 = (char *)*plVar1;
if ((char *)*plVar1 != pcVar3) {
do {
pcVar3 = pcVar4;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar4 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar4 != pcVar3);
}
return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != *(char **)(*(long *)(param_1 + 8) + 8));
}
| |
37,495 | bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [10], 0>(char const (&) [10]) const | monkey531[P]llama/common/./json.hpp | constexpr bool is_object() const noexcept
{
return m_data.m_type == value_t::object;
} | O3 | cpp | bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [10], 0>(char const (&) [10]) const:
cmpb $0x1, (%rdi)
jne 0x9a6db
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %r12
movq (%r12), %rbx
cmpq 0x8(%r12), %rbx
je 0x9a6de
movq %rsi, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a1a0
testl %eax, %eax
je 0x9a6ce
addq $0x30, %rbx
cmpq 0x8(%r12), %rbx
jne 0x9a6b4
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
jmp 0x9a6e1
xorl %eax, %eax
retq
movq %rbx, %rax
cmpq %rbx, %rax
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
cmp byte ptr [rdi], 1
jnz short loc_9A6DB
push r15
push r14
push r12
push rbx
push rax
mov r14, rdi
mov r12, [rdi+8]
mov rbx, [r12]
cmp rbx, [r12+8]
jz short loc_9A6DE
mov r15, rsi
loc_9A6B4:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_9A6CE
add rbx, 30h ; '0'
cmp rbx, [r12+8]
jnz short loc_9A6B4
loc_9A6CE:
mov rax, rbx
mov rcx, [r14+8]
mov rbx, [rcx+8]
jmp short loc_9A6E1
loc_9A6DB:
xor eax, eax
retn
loc_9A6DE:
mov rax, rbx
loc_9A6E1:
cmp rax, rbx
setnz al
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
long long a1,
long long a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
if ( *(_BYTE *)a1 != 1 )
return 0;
v2 = *(long long **)(a1 + 8);
v3 = *v2;
if ( *v2 == v2[1] )
{
v4 = *v2;
}
else
{
do
{
if ( !(unsigned int)std::string::compare(v3, a2) )
break;
v3 += 48LL;
}
while ( v3 != v2[1] );
v4 = v3;
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
return v4 != v3;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_:
CMP byte ptr [RDI],0x1
JNZ 0x0019a6db
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV R12,qword ptr [RDI + 0x8]
MOV RBX,qword ptr [R12]
CMP RBX,qword ptr [R12 + 0x8]
JZ 0x0019a6de
MOV R15,RSI
LAB_0019a6b4:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011a1a0
TEST EAX,EAX
JZ 0x0019a6ce
ADD RBX,0x30
CMP RBX,qword ptr [R12 + 0x8]
JNZ 0x0019a6b4
LAB_0019a6ce:
MOV RAX,RBX
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
JMP 0x0019a6e1
LAB_0019a6db:
XOR EAX,EAX
RET
LAB_0019a6de:
MOV RAX,RBX
LAB_0019a6e1:
CMP RAX,RBX
SETNZ AL
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
int8
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(char *param_1)
{
long *plVar1;
int iVar2;
char *pcVar3;
char *pcVar4;
if (*param_1 != '\x01') {
return 0;
}
plVar1 = *(long **)(param_1 + 8);
pcVar3 = (char *)*plVar1;
pcVar4 = pcVar3;
if (pcVar3 != (char *)plVar1[1]) {
do {
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar3 = pcVar3 + 0x30;
} while (pcVar3 != (char *)plVar1[1]);
pcVar4 = *(char **)(*(long *)(param_1 + 8) + 8);
}
return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != pcVar4);
}
| |
37,496 | string_split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | std::vector<std::string> string_split(const std::string & str, const std::string & delimiter) {
std::vector<std::string> parts;
size_t start = 0;
size_t end = str.find(delimiter);
while (end != std::string::npos) {
parts.push_back(str.substr(start, end - start));
start = end + delimiter.length();
end = str.find(delimiter, start);
}
parts.push_back(str.substr(start));
return parts;
} | O3 | cpp | string_split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
xorl %ebp, %ebp
movq %r14, %rdi
xorl %edx, %edx
callq 0x1bf30
cmpq $-0x1, %rax
je 0x72c5e
movq %rax, %r12
xorl %ebp, %ebp
leaq 0x8(%rsp), %r13
movq %r12, %rcx
subq %rbp, %rcx
movq %r13, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x1b910
movq %rbx, %rdi
movq %r13, %rsi
callq 0x56246
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x72c3d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8c0
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %r12, %rbp
addq %rcx, %rbp
movq %r14, %rdi
movq %rbp, %rdx
callq 0x1bf30
movq %rax, %r12
cmpq $-0x1, %rax
jne 0x72c02
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq $-0x1, %rcx
callq 0x1b910
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x56246
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72c9d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8c0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x72cd1
jmp 0x72cbf
movq %rax, %r14
jmp 0x72ce3
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x72ce3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8c0
movq %rbx, %rdi
callq 0x21ff8
movq %r14, %rdi
callq 0x1bf90
| _Z12string_splitRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rsi, [rdx]
mov rcx, [rdx+8]
xor ebp, ebp
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_72C5E
mov r12, rax
xor ebp, ebp
lea r13, [rsp+58h+var_50]
loc_72C02:
mov rcx, r12
sub rcx, rbp
mov rdi, r13
mov rsi, r14
mov rdx, rbp
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, rbx
mov rsi, r13
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+58h+var_50]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_72C3D
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72C3D:
mov rsi, [r15]
mov rcx, [r15+8]
mov rbp, r12
add rbp, rcx
mov rdi, r14
mov rdx, rbp
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
mov r12, rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_72C02
loc_72C5E:
lea rdi, [rsp+58h+var_50]
mov rsi, r14
mov rdx, rbp
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_72C9D
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72C9D:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]
jmp short loc_72CD1
jmp short $+2
loc_72CBF:
mov r14, rax
jmp short loc_72CE3
mov r14, rax
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
loc_72CD1:
cmp rdi, rax
jz short loc_72CE3
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72CE3:
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
| long long string_split(long long a1, long long a2, _QWORD *a3)
{
long long v4; // rbp
long long v5; // rax
long long v6; // r12
long long v7; // rcx
void *v9[2]; // [rsp+8h] [rbp-50h] BYREF
_QWORD v10[8]; // [rsp+18h] [rbp-40h] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v4 = 0LL;
v5 = std::string::find(a2, *a3, 0LL, a3[1]);
if ( v5 != -1 )
{
v6 = v5;
v4 = 0LL;
do
{
std::string::substr(v9, a2, v4, v6 - v4);
std::vector<std::string>::emplace_back<std::string>(a1, (long long)v9);
if ( v9[0] != v10 )
operator delete(v9[0], v10[0] + 1LL);
v7 = a3[1];
v4 = v7 + v6;
v6 = std::string::find(a2, *a3, v7 + v6, v7);
}
while ( v6 != -1 );
}
std::string::substr(v9, a2, v4, -1LL);
std::vector<std::string>::emplace_back<std::string>(a1, (long long)v9);
if ( v9[0] != v10 )
operator delete(v9[0], v10[0] + 1LL);
return a1;
}
| string_split:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RSI,qword ptr [RDX]
MOV RCX,qword ptr [RDX + 0x8]
XOR EBP,EBP
MOV RDI,R14
XOR EDX,EDX
CALL 0x0011bf30
CMP RAX,-0x1
JZ 0x00172c5e
MOV R12,RAX
XOR EBP,EBP
LEA R13,[RSP + 0x8]
LAB_00172c02:
MOV RCX,R12
SUB RCX,RBP
LAB_00172c08:
MOV RDI,R13
MOV RSI,R14
MOV RDX,RBP
CALL 0x0011b910
LAB_00172c16:
MOV RDI,RBX
MOV RSI,R13
CALL 0x00156246
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x00172c3d
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8c0
LAB_00172c3d:
MOV RSI,qword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
MOV RBP,R12
ADD RBP,RCX
MOV RDI,R14
MOV RDX,RBP
CALL 0x0011bf30
MOV R12,RAX
CMP RAX,-0x1
JNZ 0x00172c02
LAB_00172c5e:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV RDX,RBP
MOV RCX,-0x1
CALL 0x0011b910
LAB_00172c75:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00156246
LAB_00172c82:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00172c9d
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8c0
LAB_00172c9d:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_split(std::__cxx11::string const&, std::__cxx11::string const&) */
string * string_split(string *param_1,string *param_2)
{
long lVar1;
ulong *in_RDX;
long *local_50 [2];
long local_40 [2];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
lVar1 = std::__cxx11::string::find((char *)param_2,*in_RDX,0);
if (lVar1 != -1) {
do {
/* try { // try from 00172c08 to 00172c15 has its CatchHandler @ 00172cbf */
std::__cxx11::string::substr((ulong)local_50,(ulong)param_2);
/* try { // try from 00172c16 to 00172c20 has its CatchHandler @ 00172cc4 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,
(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
lVar1 = std::__cxx11::string::find((char *)param_2,*in_RDX,lVar1 + in_RDX[1]);
} while (lVar1 != -1);
}
/* try { // try from 00172c5e to 00172c74 has its CatchHandler @ 00172cbd */
std::__cxx11::string::substr((ulong)local_50,(ulong)param_2);
/* try { // try from 00172c75 to 00172c81 has its CatchHandler @ 00172caf */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,
(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return param_1;
}
| |
37,497 | testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::~ThreadLocal() | giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h | ~ThreadLocal() {
// Destroys the managed object for the current thread, if any.
DeleteThreadLocalValue(pthread_getspecific(key_));
// Releases resources associated with the key. This will *not*
// delete managed objects for other threads.
GTEST_CHECK_POSIX_SUCCESS_(pthread_key_delete(key_));
} | O0 | c | testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::~ThreadLocal():
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl (%rax), %edi
callq 0xaac0
movq %rax, %rdi
callq 0x68e60
movq -0x18(%rbp), %rax
movl (%rax), %edi
callq 0xa800
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x4cb5e
leaq 0x2fb32(%rip), %rdx # 0x7c630
leaq -0x10(%rbp), %rdi
movl $0x3, %esi
movl $0x712, %ecx # imm = 0x712
callq 0x1f490
jmp 0x4cb13
leaq -0x10(%rbp), %rdi
callq 0x14d40
movq %rax, %rdi
leaq 0x3039e(%rip), %rsi # 0x7cec4
callq 0xa600
movq %rax, -0x20(%rbp)
jmp 0x4cb31
movq -0x20(%rbp), %rdi
leaq 0x2fb9b(%rip), %rsi # 0x7c6d7
callq 0xa600
movq %rax, -0x28(%rbp)
jmp 0x4cb47
movq -0x28(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xabe0
jmp 0x4cb55
leaq -0x10(%rbp), %rdi
callq 0x1f5d0
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
callq 0x69a40
addq $0x30, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x13e20
nopl (%rax)
| _ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEED2Ev:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov edi, [rax]
call _pthread_getspecific
mov rdi, rax
call DeleteThreadLocalValue
mov rax, [rbp+var_18]
mov edi, [rax]
call _pthread_key_delete
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_4CB5E
lea rdx, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rbp+var_10]
mov esi, 3
mov ecx, 712h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
jmp short $+2
loc_4CB13:
lea rdi, [rbp+var_10]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov rdi, rax
lea rsi, aPthreadKeyDele_0; "pthread_key_delete(key_)"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_20], rax
jmp short $+2
loc_4CB31:
mov rdi, [rbp+var_20]
lea rsi, aFailedWithErro; "failed with error "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_28], rax
jmp short $+2
loc_4CB47:
mov rdi, [rbp+var_28]
mov esi, [rbp+var_C]
call __ZNSolsEi; std::ostream::operator<<(int)
jmp short $+2
loc_4CB55:
lea rdi, [rbp+var_10]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
loc_4CB5E:
mov rdi, [rbp+var_18]
add rdi, 8
call _ZNSt10unique_ptrIN7testing8internal11ThreadLocalIPNS0_31TestPartResultReporterInterfaceEE18ValueHolderFactoryESt14default_deleteIS6_EED2Ev; std::unique_ptr<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::ValueHolderFactory,std::default_delete<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::ValueHolderFactory>>::~unique_ptr()
add rsp, 30h
pop rbp
retn
mov rdi, rax
call __clang_call_terminate
| long long testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::~ThreadLocal(
unsigned int *a1)
{
long long v1; // rax
void *Stream; // rax
long long v4; // [rsp+8h] [rbp-28h]
long long v5; // [rsp+10h] [rbp-20h]
_BYTE v6[4]; // [rsp+20h] [rbp-10h] BYREF
unsigned int v7; // [rsp+24h] [rbp-Ch]
unsigned int *v8; // [rsp+28h] [rbp-8h]
v8 = a1;
v1 = pthread_getspecific(*a1);
DeleteThreadLocalValue(v1);
v7 = pthread_key_delete(*a1);
if ( v7 )
{
testing::internal::GTestLog::GTestLog(
(testing::internal::GTestLog *)v6,
3,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/include/gte"
"st/internal/gtest-port.h",
1810);
Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)v6);
v5 = std::operator<<<std::char_traits<char>>(Stream, "pthread_key_delete(key_)");
v4 = std::operator<<<std::char_traits<char>>(v5, "failed with error ");
std::ostream::operator<<(v4, v7);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v6);
}
return std::unique_ptr<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::ValueHolderFactory,std::default_delete<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface *>::ValueHolderFactory>>::~unique_ptr(a1 + 2);
}
| ~ThreadLocal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV EDI,dword ptr [RAX]
CALL 0x0010aac0
MOV RDI,RAX
CALL 0x00168e60
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,dword ptr [RAX]
CALL 0x0010a800
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x0014cb5e
LAB_0014caf7:
LEA RDX,[0x17c630]
LEA RDI,[RBP + -0x10]
MOV ESI,0x3
MOV ECX,0x712
CALL 0x0011f490
JMP 0x0014cb13
LAB_0014cb13:
LEA RDI,[RBP + -0x10]
CALL 0x00114d40
MOV RDI,RAX
LEA RSI,[0x17cec4]
CALL 0x0010a600
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0014cb31
LAB_0014cb31:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x17c6d7]
CALL 0x0010a600
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0014cb47
LAB_0014cb47:
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x0010abe0
LAB_0014cb53:
JMP 0x0014cb55
LAB_0014cb55:
LEA RDI,[RBP + -0x10]
CALL 0x0011f5d0
LAB_0014cb5e:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x8
CALL 0x00169a40
ADD RSP,0x30
POP RBP
RET
|
/* testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::~ThreadLocal() */
void __thiscall
testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::~ThreadLocal
(ThreadLocal<testing::TestPartResultReporterInterface*> *this)
{
void *pvVar1;
ostream *poVar2;
GTestLog local_18 [4];
int local_14;
ThreadLocal<testing::TestPartResultReporterInterface*> *local_10;
local_10 = this;
pvVar1 = pthread_getspecific(*(pthread_key_t *)this);
DeleteThreadLocalValue(pvVar1);
local_14 = pthread_key_delete(*(pthread_key_t *)this);
if (local_14 != 0) {
/* try { // try from 0014caf7 to 0014cb52 has its CatchHandler @ 0014cb71 */
GTestLog::GTestLog(local_18,3,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h"
,0x712);
poVar2 = (ostream *)GTestLog::GetStream();
poVar2 = std::operator<<(poVar2,"pthread_key_delete(key_)");
poVar2 = std::operator<<(poVar2,"failed with error ");
std::ostream::operator<<(poVar2,local_14);
GTestLog::~GTestLog(local_18);
}
std::
unique_ptr<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolderFactory,std::default_delete<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolderFactory>>
::~unique_ptr((unique_ptr<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolderFactory,std::default_delete<testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::ValueHolderFactory>>
*)(this + 8));
return;
}
| |
37,498 | 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)) {} | O2 | 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 %rdx, %r15
movq %rdi, %rbx
callq 0x723d8
leaq 0x85e00(%rip), %rax # 0xfb3d8
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
movq %r15, %rsi
callq 0x23ba0
andq $0x0, 0x48(%rbx)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x40(%rbx)
andq $0x0, (%r14)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x77052
movq %r14, %rdi
callq 0x23f10
| _ZN5minja15SetTemplateNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOSt10shared_ptrINS_12TemplateNodeEE:
push r15
push r14
push rbx
mov r14, rcx
mov r15, rdx
mov rbx, rdi
call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&)
lea rax, _ZTVN5minja15SetTemplateNodeE; `vtable for'minja::SetTemplateNode
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
and qword ptr [rbx+48h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [rbx+40h], xmm0
and qword ptr [r14], 0
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; this
call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode()
mov rdi, r14
call __Unwind_Resume
| long long minja::SetTemplateNode::SetTemplateNode(long long a1, _QWORD *a2, long long a3, __int128 *a4)
{
long long result; // rax
__int128 v7; // xmm0
minja::TemplateNode::TemplateNode((_QWORD *)a1, a2);
*(_QWORD *)a1 = &`vtable for'minja::SetTemplateNode + 2;
result = std::string::basic_string(a1 + 32, a3);
*(_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 R15,RDX
MOV RBX,RDI
CALL 0x001723d8
LEA RAX,[0x1fb3d8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LAB_001755e3:
MOV RSI,R15
CALL 0x00123ba0
LAB_001755eb:
AND qword ptr [RBX + 0x48],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x40],XMM0
AND qword ptr [R14],0x0
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)
{
int8 uVar1;
TemplateNode::TemplateNode((TemplateNode *)this,param_1);
*(int ***)this = &PTR_do_render_001fb3e8;
/* try { // try from 001755e3 to 001755ea has its CatchHandler @ 00175607 */
std::__cxx11::string::string((string *)(this + 0x20),param_2);
*(int8 *)(this + 0x48) = 0;
uVar1 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x40) = *(int8 *)param_3;
*(int8 *)(this + 0x48) = uVar1;
*(int8 *)param_3 = 0;
return;
}
| |
37,499 | 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 0x8b38e(%rip), %r15 # 0x128fc8
addq $0x10, %r15
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x9dc6a
movq 0x8c324(%rip), %rcx # 0x129f80
cmpb $0x0, (%rcx)
je 0x9dc66
incl 0x8(%rax)
jmp 0x9dc6a
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x8b74f(%rip), %rax # 0x1293c8
addq $0x10, %rax
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 0x210fc
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 0x9dcca
callq 0x6c8e8
movq %r14, %rdi
callq 0x1af20
| _ZN5minja15SetTemplateNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOSt10shared_ptrINS_12TemplateNodeEE:
push r15
push r14
push rbx
mov r14, rcx
mov rbx, rdi
lea r15, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add r15, 10h
mov [rdi], r15
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_9DC6A
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_9DC66
inc dword ptr [rax+8]
jmp short loc_9DC6A
loc_9DC66:
lock inc dword ptr [rax+8]
loc_9DC6A:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja15SetTemplateNodeE; `vtable for'minja::SetTemplateNode
add rax, 10h
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_9DCCA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9DCCA:
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 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v5 = a2[1];
*(_QWORD *)(a1 + 16) = v5;
if ( v5 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v5 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::SetTemplateNode + 2;
*(_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,[0x228fc8]
ADD R15,0x10
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 0x0019dc6a
MOV RCX,qword ptr [0x00229f80]
CMP byte ptr [RCX],0x0
JZ 0x0019dc66
INC dword ptr [RAX + 0x8]
JMP 0x0019dc6a
LAB_0019dc66:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019dc6a:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x2293c8]
ADD RAX,0x10
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_0019dc96:
CALL 0x001210fc
LAB_0019dc9b:
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_00228fd8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00229f80 == '\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_002293d8;
*(SetTemplateNode **)(this + 0x20) = this + 0x30;
/* try { // try from 0019dc96 to 0019dc9a has its CatchHandler @ 0019dcb6 */
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;
}
|
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.