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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
42,300 | ma_set_uuid | eloqsql/storage/maria/ma_locking.c | my_bool _ma_set_uuid(MARIA_SHARE *share, my_bool reset_uuid)
{
uchar buff[MY_UUID_SIZE], *uuid;
uuid= maria_uuid;
if (reset_uuid)
{
bzero(buff, sizeof(buff));
uuid= buff;
}
CRASH_IF_S3_TABLE(share);
return (my_bool) my_pwrite(share->kfile.file, uuid, MY_UUID_SIZE,
mi_uint2korr(share->state.header.base_pos),
MYF(MY_NABP));
} | O0 | c | ma_set_uuid:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x28(%rbp)
movb %al, -0x29(%rbp)
leaq 0x42e77a(%rip), %rax # 0x4777a0
movq %rax, -0x38(%rbp)
cmpb $0x0, -0x29(%rbp)
je 0x49048
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x2a2a0
leaq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x4904a
jmp 0x4904c
movq -0x28(%rbp), %rax
movl 0x760(%rax), %edi
movq -0x38(%rbp), %rsi
movw 0xc(%rax), %ax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, %ecx
movl $0x10, %edx
movl $0x4, %r8d
callq 0xf4830
movb %al, -0x39(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x49095
movb -0x39(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
callq 0x2a250
nopw (%rax,%rax)
| _ma_set_uuid:
push rbp
mov rbp, rsp
sub rsp, 40h
mov al, sil
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_28], rdi
mov [rbp+var_29], al
lea rax, maria_uuid
mov [rbp+var_38], rax
cmp [rbp+var_29], 0
jz short loc_49048
lea rdi, [rbp+var_20]
xor esi, esi
mov edx, 10h
call _memset
lea rax, [rbp+var_20]
mov [rbp+var_38], rax
loc_49048:
jmp short $+2
loc_4904A:
jmp short $+2
loc_4904C:
mov rax, [rbp+var_28]
mov edi, [rax+760h]
mov rsi, [rbp+var_38]
mov ax, [rax+0Ch]
rol ax, 8
movzx eax, ax
mov ecx, eax
mov edx, 10h
mov r8d, 4
call my_pwrite
mov [rbp+var_39], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_49095
mov al, [rbp+var_39]
add rsp, 40h
pop rbp
retn
loc_49095:
call ___stack_chk_fail
| char ma_set_uuid(long long a1, char a2)
{
_BYTE *v3; // [rsp+8h] [rbp-38h]
_BYTE v4[24]; // [rsp+20h] [rbp-20h] BYREF
unsigned long long v5; // [rsp+38h] [rbp-8h]
v5 = __readfsqword(0x28u);
v3 = maria_uuid;
if ( a2 )
{
memset(v4, 0LL, 16LL);
v3 = v4;
}
return my_pwrite(*(unsigned int *)(a1 + 1888), v3, 16LL, (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 12), 8), 4LL);
}
| _ma_set_uuid:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV AL,SIL
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x28],RDI
MOV byte ptr [RBP + -0x29],AL
LEA RAX,[0x5777a0]
MOV qword ptr [RBP + -0x38],RAX
CMP byte ptr [RBP + -0x29],0x0
JZ 0x00149048
LEA RDI,[RBP + -0x20]
XOR ESI,ESI
MOV EDX,0x10
CALL 0x0012a2a0
LEA RAX,[RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
LAB_00149048:
JMP 0x0014904a
LAB_0014904a:
JMP 0x0014904c
LAB_0014904c:
MOV RAX,qword ptr [RBP + -0x28]
MOV EDI,dword ptr [RAX + 0x760]
MOV RSI,qword ptr [RBP + -0x38]
MOV AX,word ptr [RAX + 0xc]
ROL AX,0x8
MOVZX EAX,AX
MOV ECX,EAX
MOV EDX,0x10
MOV R8D,0x4
CALL 0x001f4830
MOV byte ptr [RBP + -0x39],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00149095
MOV AL,byte ptr [RBP + -0x39]
ADD RSP,0x40
POP RBP
RET
LAB_00149095:
CALL 0x0012a250
|
int8 _ma_set_uuid(long param_1,char param_2)
{
int1 uVar1;
long in_FS_OFFSET;
int8 *local_40;
int8 local_28 [3];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_40 = &maria_uuid;
if (param_2 != '\0') {
memset(local_28,0,0x10);
local_40 = local_28;
}
uVar1 = my_pwrite(*(int4 *)(param_1 + 0x760),local_40,0x10,
*(ushort *)(param_1 + 0xc) << 8 | *(ushort *)(param_1 + 0xc) >> 8,4);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),uVar1);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
42,301 | buf_page_t::buf_page_t(buf_page_t const&) | eloqsql/storage/innobase/include/buf0buf.h | buf_page_t(const buf_page_t &b) :
id_(b.id_), hash(b.hash),
oldest_modification_(b.oldest_modification_),
lock() /* not copied */,
frame(b.frame), zip(b.zip),
#ifdef UNIV_DEBUG
in_zip_hash(b.in_zip_hash), in_LRU_list(b.in_LRU_list),
in_page_hash(b.in_page_hash), in_free_list(b.in_free_list),
#endif /* UNIV_DEBUG */
list(b.list), LRU(b.LRU), old(b.old), freed_page_clock(b.freed_page_clock),
access_time(b.access_time)
{
lock.init();
} | O0 | c | buf_page_t::buf_page_t(buf_page_t const&):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, (%rdi)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rdi)
addq $0x10, %rdi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
callq 0x1181a30
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x7584b0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x30(%rdi)
addq $0x38, %rdi
movq -0x10(%rbp), %rsi
addq $0x38, %rsi
callq 0x1181ad0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq %rcx, 0x48(%rdi)
movq 0x50(%rax), %rax
movq %rax, 0x50(%rdi)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movq %rcx, 0x58(%rdi)
movq 0x60(%rax), %rax
movq %rax, 0x60(%rdi)
movq -0x10(%rbp), %rax
movl 0x68(%rax), %ecx
andl $0x1, %ecx
movl 0x68(%rdi), %eax
andl $0x1, %ecx
andl $-0x2, %eax
orl %ecx, %eax
movl %eax, 0x68(%rdi)
movq -0x10(%rbp), %rax
movl 0x68(%rax), %ecx
shrl %ecx
movl 0x68(%rdi), %eax
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
shll %ecx
andl $0x1, %eax
orl %ecx, %eax
movl %eax, 0x68(%rdi)
addq $0x6c, %rdi
movq -0x10(%rbp), %rsi
addq $0x6c, %rsi
callq 0x1181b10
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x10ab250
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN10buf_page_tC2ERKS_:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov [rbp+var_18], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rdi], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rdi+8], rax
add rdi, 10h
mov rsi, [rbp+var_10]
add rsi, 10h
call _ZN14Atomic_relaxedImEC2ERKS0_; Atomic_relaxed<ulong>::Atomic_relaxed(Atomic_relaxed<ulong> const&)
mov rdi, [rbp+var_18]
add rdi, 18h
xor esi, esi
mov edx, 18h
call _memset
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rax, [rax+30h]
mov [rdi+30h], rax
add rdi, 38h ; '8'; this
mov rsi, [rbp+var_10]
add rsi, 38h ; '8'; page_zip_des_t *
call _ZN14page_zip_des_tC2ERKS_; page_zip_des_t::page_zip_des_t(page_zip_des_t const&)
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rcx, [rax+48h]
mov [rdi+48h], rcx
mov rax, [rax+50h]
mov [rdi+50h], rax
mov rax, [rbp+var_10]
mov rcx, [rax+58h]
mov [rdi+58h], rcx
mov rax, [rax+60h]
mov [rdi+60h], rax
mov rax, [rbp+var_10]
mov ecx, [rax+68h]
and ecx, 1
mov eax, [rdi+68h]
and ecx, 1
and eax, 0FFFFFFFEh
or eax, ecx
mov [rdi+68h], eax
mov rax, [rbp+var_10]
mov ecx, [rax+68h]
shr ecx, 1
mov eax, [rdi+68h]
and ecx, 7FFFFFFFh
shl ecx, 1
and eax, 1
or eax, ecx
mov [rdi+68h], eax
add rdi, 6Ch ; 'l'
mov rsi, [rbp+var_10]
add rsi, 6Ch ; 'l'
call _ZN14Atomic_counterIjEC2ERKS0_; Atomic_counter<uint>::Atomic_counter(Atomic_counter<uint> const&)
mov rdi, [rbp+var_18]
add rdi, 18h
call _ZN8sux_lockI14ssux_lock_implILb1EEE4initEv; sux_lock<ssux_lock_impl<true>>::init(void)
add rsp, 20h
pop rbp
retn
| void buf_page_t::buf_page_t(buf_page_t *this, const buf_page_t *a2)
{
*(_QWORD *)this = *(_QWORD *)a2;
*((_QWORD *)this + 1) = *((_QWORD *)a2 + 1);
Atomic_relaxed<unsigned long>::Atomic_relaxed((char *)this + 16, (char *)a2 + 16);
memset((char *)this + 24, 0LL);
*((_QWORD *)this + 6) = *((_QWORD *)a2 + 6);
page_zip_des_t::page_zip_des_t((buf_page_t *)((char *)this + 56), (const buf_page_t *)((char *)a2 + 56));
*((_QWORD *)this + 9) = *((_QWORD *)a2 + 9);
*((_QWORD *)this + 10) = *((_QWORD *)a2 + 10);
*((_QWORD *)this + 11) = *((_QWORD *)a2 + 11);
*((_QWORD *)this + 12) = *((_QWORD *)a2 + 12);
*((_DWORD *)this + 26) = *((_DWORD *)a2 + 26) & 1 | *((_DWORD *)this + 26) & 0xFFFFFFFE;
*((_DWORD *)this + 26) = (2 * (*((_DWORD *)a2 + 26) >> 1)) | *((_DWORD *)this + 26) & 1;
Atomic_counter<unsigned int>::Atomic_counter((char *)this + 108, (char *)a2 + 108);
sux_lock<ssux_lock_impl<true>>::init((long long)this + 24);
}
| dfield_set_len:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x0118162e
LAB_0118162e:
MOV RAX,qword ptr [RBP + -0x8]
MOV CL,byte ptr [RAX + 0x8]
AND CL,0xfe
OR CL,0x0
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0xc],ECX
POP RBP
RET
|
/* dfield_set_len(dfield_t*, unsigned long) */
void dfield_set_len(dfield_t *param_1,ulong param_2)
{
param_1[8] = (dfield_t)((byte)param_1[8] & 0xfe);
*(int *)(param_1 + 0xc) = (int)param_2;
return;
}
| |
42,302 | my_numcells_sjis | eloqsql/strings/ctype-sjis.c | static
size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b >= 0xA1 && *b <= 0xDF)
{
clen++;
b++;
}
else if (*b > 0x7F)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
} | O3 | c | my_numcells_sjis:
cmpq %rdx, %rsi
jae 0x3d703
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0x1, %ecx
movb (%rsi), %dil
leal 0x5f(%rdi), %r8d
shrb $0x7, %dil
movzbl %dil, %edi
incq %rdi
cmpb $0x3f, %r8b
cmovbq %rcx, %rdi
addq %rdi, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0x3d6dc
popq %rbp
retq
xorl %eax, %eax
retq
| my_numcells_sjis:
cmp rsi, rdx
jnb short loc_3D703
push rbp
mov rbp, rsp
xor eax, eax
mov ecx, 1
loc_3D6DC:
mov dil, [rsi]
lea r8d, [rdi+5Fh]
shr dil, 7
movzx edi, dil
inc rdi
cmp r8b, 3Fh ; '?'
cmovb rdi, rcx
add rax, rdi
add rsi, rdi
cmp rsi, rdx
jb short loc_3D6DC
pop rbp
retn
loc_3D703:
xor eax, eax
retn
| long long my_numcells_sjis(long long a1, _BYTE *a2, unsigned long long a3)
{
long long result; // rax
long long v4; // rdi
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = (*a2 >> 7) + 1LL;
if ( (unsigned __int8)(*a2 + 95) < 0x3Fu )
v4 = 1LL;
result += v4;
a2 += v4;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
| my_numcells_sjis:
CMP RSI,RDX
JNC 0x0013d703
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
MOV ECX,0x1
LAB_0013d6dc:
MOV DIL,byte ptr [RSI]
LEA R8D,[RDI + 0x5f]
SHR DIL,0x7
MOVZX EDI,DIL
INC RDI
CMP R8B,0x3f
CMOVC RDI,RCX
ADD RAX,RDI
ADD RSI,RDI
CMP RSI,RDX
JC 0x0013d6dc
POP RBP
RET
LAB_0013d703:
XOR EAX,EAX
RET
|
long my_numcells_sjis(int8 param_1,byte *param_2,byte *param_3)
{
long lVar1;
long lVar2;
if (param_2 < param_3) {
lVar1 = 0;
do {
lVar2 = (ulong)(*param_2 >> 7) + 1;
if ((byte)(*param_2 + 0x5f) < 0x3f) {
lVar2 = 1;
}
lVar1 = lVar1 + lVar2;
param_2 = param_2 + lVar2;
} while (param_2 < param_3);
return lVar1;
}
return 0;
}
| |
42,303 | my_message_sql | eloqsql/sql/mysqld.cc | void my_message_sql(uint error, const char *str, myf MyFlags)
{
THD *thd= MyFlags & ME_ERROR_LOG_ONLY ? NULL : current_thd;
Sql_condition::enum_warning_level level;
sql_print_message_func func;
DBUG_ENTER("my_message_sql");
DBUG_PRINT("error", ("error: %u message: '%s' Flag: %lu", error, str,
MyFlags));
DBUG_ASSERT(str != NULL);
DBUG_ASSERT(error != 0);
DBUG_ASSERT((MyFlags & ~(ME_BELL | ME_ERROR_LOG | ME_ERROR_LOG_ONLY |
ME_NOTE | ME_WARNING | ME_FATAL)) == 0);
#ifndef WITH_GLOG
if (MyFlags & ME_NOTE)
{
level= Sql_condition::WARN_LEVEL_NOTE;
func= sql_print_information;
}
else if (MyFlags & ME_WARNING)
{
level= Sql_condition::WARN_LEVEL_WARN;
func= sql_print_warning;
}
else
{
level= Sql_condition::WARN_LEVEL_ERROR;
func= sql_print_error;
}
#else
if (MyFlags & ME_NOTE)
{
level= Sql_condition::WARN_LEVEL_NOTE;
func= sql_print_information_;
}
else if (MyFlags & ME_WARNING)
{
level= Sql_condition::WARN_LEVEL_WARN;
func= sql_print_warning_;
}
else
{
level= Sql_condition::WARN_LEVEL_ERROR;
func= sql_print_error_;
}
#endif /* WITH_GLOG */
if (likely(thd))
{
if (unlikely(MyFlags & ME_FATAL))
thd->is_fatal_error= 1;
(void) thd->raise_condition(error, NULL, level, str);
}
else
mysql_audit_general(0, MYSQL_AUDIT_GENERAL_ERROR, error, str);
/* When simulating OOM, skip writing to error log to avoid mtr errors */
DBUG_EXECUTE_IF("simulate_out_of_memory", DBUG_VOID_RETURN;);
if (unlikely(!thd) || thd->log_all_errors || (MyFlags & ME_ERROR_LOG))
(*func)("%s: %s", my_progname_short, str); /* purecov: inspected */
DBUG_VOID_RETURN;
} | O0 | cpp | my_message_sql:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x80, %rax
cmpq $0x0, %rax
je 0x890f0b
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x890f14
callq 0x88f160
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x890f1e
jmp 0x890f20
jmp 0x890f22
jmp 0x890f24
jmp 0x890f26
jmp 0x890f28
jmp 0x890f2a
movq -0x18(%rbp), %rax
andq $0x400, %rax # imm = 0x400
cmpq $0x0, %rax
je 0x890f4e
movl $0x0, -0x24(%rbp)
leaq -0x57aa8(%rip), %rax # 0x8394a0
movq %rax, -0x30(%rbp)
jmp 0x890f86
movq -0x18(%rbp), %rax
andq $0x800, %rax # imm = 0x800
cmpq $0x0, %rax
je 0x890f72
movl $0x1, -0x24(%rbp)
leaq -0x57a2c(%rip), %rax # 0x839540
movq %rax, -0x30(%rbp)
jmp 0x890f84
movl $0x2, -0x24(%rbp)
leaq -0x57990(%rip), %rax # 0x8395f0
movq %rax, -0x30(%rbp)
jmp 0x890f86
cmpq $0x0, -0x20(%rbp)
je 0x890fc1
movq -0x18(%rbp), %rax
andq $0x1000, %rax # imm = 0x1000
cmpq $0x0, %rax
je 0x890fa8
movq -0x20(%rbp), %rax
movb $0x1, 0x3fb5(%rax)
movq -0x20(%rbp), %rdi
movl -0x4(%rbp), %esi
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %r8
xorl %eax, %eax
movl %eax, %edx
callq 0x89f820
jmp 0x890fd6
movl -0x4(%rbp), %edx
movq -0x10(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edi
movl $0x1, %esi
callq 0x891030
jmp 0x890fd8
jmp 0x890fda
cmpq $0x0, -0x20(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x891009
movq -0x20(%rbp), %rax
testb $0x1, 0x27b5(%rax)
jne 0x891009
movq -0x18(%rbp), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x891026
movq -0x30(%rbp), %rcx
leaq 0x1d8d1e4(%rip), %rax # 0x261e1f8
movq (%rax), %rsi
movq -0x10(%rbp), %rdx
leaq 0xb5c1e8(%rip), %rdi # 0x13ed20a
movb $0x0, %al
callq *%rcx
jmp 0x891028
jmp 0x89102a
addq $0x40, %rsp
popq %rbp
retq
| my_message_sql:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_18]
and rax, 80h
cmp rax, 0
jz short loc_890F0B
xor eax, eax
mov [rbp+var_38], rax
jmp short loc_890F14
loc_890F0B:
call _current_thd
mov [rbp+var_38], rax
loc_890F14:
mov rax, [rbp+var_38]
mov [rbp+var_20], rax
jmp short $+2
loc_890F1E:
jmp short $+2
loc_890F20:
jmp short $+2
loc_890F22:
jmp short $+2
loc_890F24:
jmp short $+2
loc_890F26:
jmp short $+2
loc_890F28:
jmp short $+2
loc_890F2A:
mov rax, [rbp+var_18]
and rax, 400h
cmp rax, 0
jz short loc_890F4E
mov [rbp+var_24], 0
lea rax, _Z22sql_print_information_PKcz; sql_print_information_(char const*,...)
mov [rbp+var_30], rax
jmp short loc_890F86
loc_890F4E:
mov rax, [rbp+var_18]
and rax, 800h
cmp rax, 0
jz short loc_890F72
mov [rbp+var_24], 1
lea rax, _Z18sql_print_warning_PKcz; sql_print_warning_(char const*,...)
mov [rbp+var_30], rax
jmp short loc_890F84
loc_890F72:
mov [rbp+var_24], 2
lea rax, _Z16sql_print_error_PKcz; sql_print_error_(char const*,...)
mov [rbp+var_30], rax
loc_890F84:
jmp short $+2
loc_890F86:
cmp [rbp+var_20], 0
jz short loc_890FC1
mov rax, [rbp+var_18]
and rax, 1000h
cmp rax, 0
jz short loc_890FA8
mov rax, [rbp+var_20]
mov byte ptr [rax+3FB5h], 1
loc_890FA8:
mov rdi, [rbp+var_20]
mov esi, [rbp+var_4]
mov ecx, [rbp+var_24]
mov r8, [rbp+var_10]
xor eax, eax
mov edx, eax
call _ZN3THD15raise_conditionEjPKcN21Sql_state_errno_level18enum_warning_levelES1_; THD::raise_condition(uint,char const*,Sql_state_errno_level::enum_warning_level,char const*)
jmp short loc_890FD6
loc_890FC1:
mov edx, [rbp+var_4]; int
mov rcx, [rbp+var_10]; char *
xor eax, eax
mov edi, eax; THD *
mov esi, 1; unsigned int
call _ZL19mysql_audit_generalP3THDjiPKc; mysql_audit_general(THD *,uint,int,char const*)
loc_890FD6:
jmp short $+2
loc_890FD8:
jmp short $+2
loc_890FDA:
cmp [rbp+var_20], 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
jnz short loc_891009
mov rax, [rbp+var_20]
test byte ptr [rax+27B5h], 1
jnz short loc_891009
mov rax, [rbp+var_18]
and rax, 40h
cmp rax, 0
jz short loc_891026
loc_891009:
mov rcx, [rbp+var_30]
lea rax, my_progname_short
mov rsi, [rax]
mov rdx, [rbp+var_10]
lea rdi, aCanNotMoveFile+18h; "%s: %s"
mov al, 0
call rcx
loc_891026:
jmp short $+2
loc_891028:
jmp short $+2
loc_89102A:
add rsp, 40h
pop rbp
retn
| long long my_message_sql(unsigned int a1, const char *a2, __int16 a3)
{
long long result; // rax
long long v4; // [rsp+8h] [rbp-38h]
long long (*v5)(const char *, ...); // [rsp+10h] [rbp-30h]
unsigned int v6; // [rsp+1Ch] [rbp-24h]
if ( (a3 & 0x80) != 0 )
v4 = 0LL;
else
v4 = current_thd();
if ( (a3 & 0x400) != 0 )
{
v6 = 0;
v5 = (long long (*)(const char *, ...))sql_print_information_;
}
else if ( (a3 & 0x800) != 0 )
{
v6 = 1;
v5 = (long long (*)(const char *, ...))sql_print_warning_;
}
else
{
v6 = 2;
v5 = (long long (*)(const char *, ...))sql_print_error_;
}
if ( v4 )
{
if ( (a3 & 0x1000) != 0 )
*(_BYTE *)(v4 + 16309) = 1;
THD::raise_condition(v4, a1, 0LL, v6, a2);
}
else
{
mysql_audit_general(0LL, 1u, a1, a2);
}
if ( !v4 )
return v5("%s: %s", my_progname_short, a2);
if ( (*(_BYTE *)(v4 + 10165) & 1) != 0 )
return v5("%s: %s", my_progname_short, a2);
result = a3 & 0x40;
if ( (a3 & 0x40) != 0 )
return v5("%s: %s", my_progname_short, a2);
return result;
}
| __cxx_global_var_init.8:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x1e5a878]
MOV ESI,0x1800000
CALL 0x008fd530
POP RBP
RET
|
void __cxx_global_var_init_8(void)
{
date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_NO_ZEROS,0x1800000);
return;
}
| |
42,304 | common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, common_chat_inputs const&) | monkey531[P]llama/common/chat.cpp | static common_chat_params common_chat_params_init_functionary_v3_1_llama_3_1(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) {
// https://github.com/MeetKai/functionary/blob/main/tests/prompt_test_v3-llama3.1.txt
common_chat_params data;
json tools = inputs.tools.is_null() ? inputs.tools : json::array();
std::string python_code_argument_name;
auto has_raw_python = false;
data.grammar_lazy = inputs.tool_choice != "required";
data.grammar = build_grammar([&](const common_grammar_builder & builder) {
std::vector<std::string> tool_rules;
foreach_function(inputs.tools, [&](const json & tool) {
const auto & function = tool["function"];
const auto & parameters = function["parameters"];
std::string name = function["name"];
if (name == "python" || name == "ipython") {
if (!parameters.contains("type")) {
throw std::runtime_error("Missing type in python tool");
}
has_raw_python = true;
auto type = parameters.at("type");
if (type == "object") {
auto properties = parameters.at("properties");
for (auto it = properties.begin(); it != properties.end(); ++it) {
if (it.value().at("type") == "string") {
if (!python_code_argument_name.empty()) {
throw std::runtime_error("Multiple string arguments found in python tool");
}
python_code_argument_name = it.key();
}
}
if (python_code_argument_name.empty()) {
throw std::runtime_error("No string argument found in python tool");
}
} else if (type != "string") {
throw std::runtime_error("Invalid type in python tool: " + type.dump());
}
}
tool_rules.push_back(builder.add_rule(name + "-call", "\"<function=" + name + ">\" " + builder.add_schema(name + "-args", parameters) + " \"</function>\" space"));
});
if (has_raw_python) {
tool_rules.push_back(builder.add_rule("python-call", "\"<|python_tag|>\" .*"));
data.grammar_triggers.push_back({"<|python_tag|>", /* .at_start = */ false});
}
auto tool_call = builder.add_rule("tool_call", string_join(tool_rules, " | ")) + " space";
builder.add_rule("root", inputs.parallel_tool_calls ? "(" + tool_call + ")+" : tool_call);
data.grammar_triggers.push_back({"<function=", /* .at_start = */ false});
}, grammar_options);
data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt);
// TODO: if (has_raw_python)
data.format = COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1;
return data;
} | O1 | cpp | common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&, common_chat_inputs const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x0, (%rdi)
xorl %eax, %eax
movb %al, 0x8(%rdi)
movq %rax, 0x10(%rdi)
leaq 0x28(%rdi), %rcx
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movb %al, 0x28(%rdi)
movb %al, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movq %rax, 0x80(%rdi)
leaq 0x10(%rdx), %r12
cmpb %al, 0x10(%rdx)
je 0x999d0
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x5fa40
jmp 0x999dd
leaq 0x58(%rsp), %rdi
movq %r12, %rsi
callq 0x36864
leaq 0x88(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
xorl %eax, %eax
movb %al, (%rbp)
movb %al, 0xf(%rsp)
leaq 0x20(%r14), %rdi
leaq 0x20e57(%rip), %rsi # 0xba85c
callq 0x84415
movb %al, 0x38(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movl $0x20, %edi
callq 0x196c0
movq %r14, (%rax)
leaq 0xf(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x78(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rbx, 0x18(%rax)
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
leaq 0xac44(%rip), %rax # 0xa4690
movq %rax, 0x18(%rsi)
leaq 0xb327(%rip), %rax # 0xa4d7e
movq %rax, 0x10(%rsi)
leaq 0x27102(%rip), %rdx # 0xc0b64
leaq 0x38(%rsp), %rdi
callq 0x3b8f6
leaq 0x18(%rbx), %rdi
leaq 0x38(%rsp), %r13
movq %r13, %rsi
callq 0x19840
movq (%r13), %rdi
leaq 0x48(%rsp), %r13
cmpq %r13, %rdi
je 0x99a98
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x196d0
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x99ab1
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movzbl (%r12), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jae 0x99ada
movq 0x18(%r14), %rax
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x99ade
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x36864
jmp 0x99aec
testl %eax, %eax
jne 0x99acb
movb $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movzbl 0x68(%r14), %r8d
leaq 0x68(%rsp), %r9
movb $0x0, (%r9)
movq $0x0, 0x8(%r9)
movl $0x1, (%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rcx
movq %r15, %rsi
movq %r14, %rdx
callq 0x80e86
leaq 0x98(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x515e6
movb 0x8(%rbx), %al
leaq 0x98(%rsp), %rdi
movb (%rdi), %cl
movb %cl, 0x8(%rbx)
movb %al, (%rdi)
movq 0x10(%rbx), %rax
movq 0x8(%rdi), %rcx
movq %rcx, 0x10(%rbx)
movq %rax, 0x8(%rdi)
callq 0x36dc4
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x99b6e
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x196d0
leaq 0x68(%rsp), %rdi
callq 0x36dc4
leaq 0x10(%rsp), %rdi
callq 0x36dc4
movl $0x8, (%rbx)
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x99ba2
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x196d0
leaq 0x58(%rsp), %rdi
callq 0x36dc4
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x99c20
jmp 0x99c18
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x99be4
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x196d0
jmp 0x99be4
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0x36dc4
leaq 0x10(%rsp), %rdi
callq 0x36dc4
jmp 0x99c23
movq %rax, %r14
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x99c23
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x99c23
movq %rax, %rdi
callq 0x22f37
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %rbp, %rdi
je 0x99c3d
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x196d0
leaq 0x58(%rsp), %rdi
callq 0x36dc4
movq %rbx, %rdi
callq 0x5f36a
movq %r14, %rdi
callq 0x19c00
movq %rax, %r14
jmp 0x99c47
| _ZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputs:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov dword ptr [rdi], 0
xor eax, eax
mov [rdi+8], al
mov [rdi+10h], rax
lea rcx, [rdi+28h]
mov [rdi+18h], rcx
mov [rdi+20h], rax
mov [rdi+28h], al
mov [rdi+38h], al
xorps xmm0, xmm0
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+50h], xmm0
movups xmmword ptr [rdi+60h], xmm0
movups xmmword ptr [rdi+70h], xmm0
mov [rdi+80h], rax
lea r12, [rdx+10h]
cmp [rdx+10h], al
jz short loc_999D0
lea rdi, [rsp+0D8h+var_80]
xor esi, esi
xor edx, edx
xor ecx, ecx
mov r8d, 2
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)
jmp short loc_999DD
loc_999D0:
lea rdi, [rsp+0D8h+var_80]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
loc_999DD:
lea rbp, [rsp+0D8h+var_50]
mov [rbp-10h], rbp
mov qword ptr [rbp-8], 0
xor eax, eax
mov [rbp+0], al
mov [rsp+0D8h+var_C9], al
lea rdi, [r14+20h]
lea rsi, aRequired; "required"
call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
mov [rbx+38h], al
xorps xmm0, xmm0
movaps [rsp+0D8h+var_B8], xmm0
movaps [rsp+0D8h+var_C8], xmm0
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov [rax], r14
lea rcx, [rsp+0D8h+var_C9]
mov [rax+8], rcx
lea rcx, [rsp+0D8h+var_60]
mov [rax+10h], rcx
mov [rax+18h], rbx
lea rsi, [rsp+0D8h+var_C8]
mov [rsi], rax
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL50common_chat_params_init_functionary_v3_1_llama_3_1RKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
lea rdx, _ZL15grammar_options; grammar_options
lea rdi, [rsp+0D8h+var_A0]
call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)
lea rdi, [rbx+18h]
lea r13, [rsp+0D8h+var_A0]
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r13+0]; void *
lea r13, [rsp+0D8h+var_90]
cmp rdi, r13
jz short loc_99A98
mov rsi, [rsp+0D8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_99A98:
mov rax, qword ptr [rsp+0D8h+var_B8]
test rax, rax
jz short loc_99AB1
lea rdi, [rsp+0D8h+var_C8]
mov rsi, rdi
mov edx, 3
call rax
loc_99AB1:
movzx eax, byte ptr [r12]
lea ecx, [rax-1]
cmp ecx, 2
jnb short loc_99ADA
mov rax, [r14+18h]
mov rcx, [rax]
cmp rcx, [rax+8]
jz short loc_99ADE
loc_99ACB:
lea rdi, [rsp+0D8h+var_C8]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_99AEC
loc_99ADA:
test eax, eax
jnz short loc_99ACB
loc_99ADE:
mov byte ptr [rsp+0D8h+var_C8], 0
mov qword ptr [rsp+0D8h+var_C8+8], 0
loc_99AEC:
movzx r8d, byte ptr [r14+68h]
lea r9, [rsp+0D8h+var_70]
mov byte ptr [r9], 0
mov qword ptr [r9+8], 0
mov [rsp+0D8h+var_D8], 1
lea rdi, [rsp+0D8h+var_A0]
lea rcx, [rsp+0D8h+var_C8]
mov rsi, r15
mov rdx, r14
call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool)
lea rdi, [rsp+0D8h+var_40]
lea rsi, [rsp+0D8h+var_A0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
mov al, [rbx+8]
lea rdi, [rsp+0D8h+var_40]
mov cl, [rdi]
mov [rbx+8], cl
mov [rdi], al
mov rax, [rbx+10h]
mov rcx, [rdi+8]
mov [rbx+10h], rcx
mov [rdi+8], rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+0D8h+var_A0]; void *
cmp rdi, r13
jz short loc_99B6E
mov rsi, [rsp+0D8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_99B6E:
lea rdi, [rsp+0D8h+var_70]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0D8h+var_C8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov dword ptr [rbx], 8
mov rdi, [rsp+0D8h+var_60]; void *
cmp rdi, rbp
jz short loc_99BA2
mov rsi, [rsp+0D8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_99BA2:
lea rdi, [rsp+0D8h+var_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_99C20
jmp short loc_99C18
mov r14, rax
mov rdi, [rsp+0D8h+var_A0]; void *
cmp rdi, r13
jz short loc_99BE4
mov rsi, [rsp+0D8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_99BE4
mov r14, rax
loc_99BE4:
lea rdi, [rsp+0D8h+var_70]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+0D8h+var_C8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_99C23
mov r14, rax
mov rax, qword ptr [rsp+0D8h+var_B8]
test rax, rax
jz short loc_99C23
lea rdi, [rsp+0D8h+var_C8]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_99C23
loc_99C18:
mov rdi, rax
call __clang_call_terminate
loc_99C20:
mov r14, rax
loc_99C23:
mov rdi, [rsp+0D8h+var_60]; void *
cmp rdi, rbp
jz short loc_99C3D
mov rsi, [rsp+0D8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_99C3D:
lea rdi, [rsp+0D8h+var_80]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_99C47:
mov rdi, rbx; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
mov rdi, r14
call __Unwind_Resume
mov r14, rax
jmp short loc_99C47
| const minja::chat_template * common_chat_params_init_functionary_v3_1_llama_3_1(
const minja::chat_template *a1,
const common_chat_inputs *a2,
long long a3)
{
unsigned __int8 *v4; // r12
_QWORD *v5; // rax
int v6; // r8d
int v7; // r9d
int v8; // r8d
char v9; // al
long long v10; // rax
char v12; // [rsp+Fh] [rbp-C9h] BYREF
__int128 v13; // [rsp+10h] [rbp-C8h] BYREF
long long ( *v14)(); // [rsp+20h] [rbp-B8h]
long long ( *v15)(); // [rsp+28h] [rbp-B0h]
void *v16[2]; // [rsp+38h] [rbp-A0h] BYREF
_QWORD v17[2]; // [rsp+48h] [rbp-90h] BYREF
unsigned __int8 v18[16]; // [rsp+58h] [rbp-80h] BYREF
unsigned __int8 v19[8]; // [rsp+68h] [rbp-70h] BYREF
long long v20; // [rsp+70h] [rbp-68h]
void *v21[2]; // [rsp+78h] [rbp-60h] BYREF
_QWORD v22[2]; // [rsp+88h] [rbp-50h] BYREF
char v23[8]; // [rsp+98h] [rbp-40h] BYREF
long long v24; // [rsp+A0h] [rbp-38h]
*(_DWORD *)a1 = 0;
*((_BYTE *)a1 + 8) = 0;
*((_QWORD *)a1 + 2) = 0LL;
*((_QWORD *)a1 + 3) = (char *)a1 + 40;
*((_QWORD *)a1 + 4) = 0LL;
*((_BYTE *)a1 + 40) = 0;
*((_BYTE *)a1 + 56) = 0;
*((_OWORD *)a1 + 4) = 0LL;
*((_OWORD *)a1 + 5) = 0LL;
*((_OWORD *)a1 + 6) = 0LL;
*((_OWORD *)a1 + 7) = 0LL;
*((_QWORD *)a1 + 16) = 0LL;
v4 = (unsigned __int8 *)(a3 + 16);
if ( *(_BYTE *)(a3 + 16) )
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(long long)v18,
0LL,
0LL,
0,
2);
else
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v18,
(unsigned __int8 *)(a3 + 16));
v21[0] = v22;
v21[1] = 0LL;
LOBYTE(v22[0]) = 0;
v12 = 0;
*((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_(
(unsigned __int8 *)(a3 + 32),
(long long)"required",
(__m128d)0LL);
v13 = 0LL;
v5 = (_QWORD *)operator new(0x20uLL);
*v5 = a3;
v5[1] = &v12;
v5[2] = v21;
v5[3] = a1;
*(_QWORD *)&v13 = v5;
v15 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke;
v14 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager;
build_grammar[abi:cxx11]((long long)v16, (long long)&v13, grammar_options, (long long)v21, v6, v7);
std::string::operator=((char *)a1 + 24, v16);
if ( v16[0] != v17 )
operator delete(v16[0], v17[0] + 1LL);
if ( v14 )
((void ( *)(__int128 *, __int128 *, long long))v14)(&v13, &v13, 3LL);
if ( (unsigned int)*v4 - 1 >= 2 )
{
if ( *v4 )
goto LABEL_10;
}
else if ( **(_QWORD **)(a3 + 24) != *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) )
{
LABEL_10:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(unsigned __int8 *)&v13,
v4);
goto LABEL_13;
}
LOBYTE(v13) = 0;
*((_QWORD *)&v13 + 1) = 0LL;
LABEL_13:
v8 = *(unsigned __int8 *)(a3 + 104);
v19[0] = 0;
v20 = 0LL;
minja::chat_template::apply((long long)v16, a2, (unsigned __int8 *)a3, (unsigned __int8 *)&v13, v8, v19, 1);
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v23);
v9 = *((_BYTE *)a1 + 8);
*((_BYTE *)a1 + 8) = v23[0];
v23[0] = v9;
v10 = *((_QWORD *)a1 + 2);
*((_QWORD *)a1 + 2) = v24;
v24 = v10;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v23);
if ( v16[0] != v17 )
operator delete(v16[0], v17[0] + 1LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v13);
*(_DWORD *)a1 = 8;
if ( v21[0] != v22 )
operator delete(v21[0], v22[0] + 1LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v18);
return a1;
}
| common_chat_params_init_functionary_v3_1_llama_3_1:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV dword ptr [RDI],0x0
XOR EAX,EAX
MOV byte ptr [RDI + 0x8],AL
MOV qword ptr [RDI + 0x10],RAX
LEA RCX,[RDI + 0x28]
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RDI + 0x20],RAX
MOV byte ptr [RDI + 0x28],AL
MOV byte ptr [RDI + 0x38],AL
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOVUPS xmmword ptr [RDI + 0x60],XMM0
MOVUPS xmmword ptr [RDI + 0x70],XMM0
MOV qword ptr [RDI + 0x80],RAX
LEA R12,[RDX + 0x10]
CMP byte ptr [RDX + 0x10],AL
JZ 0x001999d0
LAB_001999b8:
LEA RDI,[RSP + 0x58]
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
MOV R8D,0x2
CALL 0x0015fa40
JMP 0x001999dd
LAB_001999d0:
LEA RDI,[RSP + 0x58]
MOV RSI,R12
CALL 0x00136864
LAB_001999dd:
LEA RBP,[RSP + 0x88]
MOV qword ptr [RBP + -0x10],RBP
MOV qword ptr [RBP + -0x8],0x0
XOR EAX,EAX
MOV byte ptr [RBP],AL
MOV byte ptr [RSP + 0xf],AL
LEA RDI,[R14 + 0x20]
LEA RSI,[0x1ba85c]
CALL 0x00184415
MOV byte ptr [RBX + 0x38],AL
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
LAB_00199a1a:
MOV EDI,0x20
CALL 0x001196c0
MOV qword ptr [RAX],R14
LEA RCX,[RSP + 0xf]
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[RSP + 0x78]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],RBX
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RAX
LEA RAX,[0x1a4690]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1a4d7e]
MOV qword ptr [RSI + 0x10],RAX
LAB_00199a5b:
LEA RDX,[0x1c0b64]
LEA RDI,[RSP + 0x38]
CALL 0x0013b8f6
LEA RDI,[RBX + 0x18]
LEA R13,[RSP + 0x38]
MOV RSI,R13
CALL 0x00119840
MOV RDI,qword ptr [R13]
LEA R13,[RSP + 0x48]
CMP RDI,R13
JZ 0x00199a98
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001196d0
LAB_00199a98:
MOV RAX,qword ptr [RSP + 0x20]
TEST RAX,RAX
JZ 0x00199ab1
LAB_00199aa2:
LEA RDI,[RSP + 0x10]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00199ab1:
MOVZX EAX,byte ptr [R12]
LEA ECX,[RAX + -0x1]
CMP ECX,0x2
JNC 0x00199ada
MOV RAX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
JZ 0x00199ade
LAB_00199acb:
LEA RDI,[RSP + 0x10]
MOV RSI,R12
CALL 0x00136864
JMP 0x00199aec
LAB_00199ada:
TEST EAX,EAX
JNZ 0x00199acb
LAB_00199ade:
MOV byte ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
LAB_00199aec:
MOVZX R8D,byte ptr [R14 + 0x68]
LEA R9,[RSP + 0x68]
MOV byte ptr [R9],0x0
MOV qword ptr [R9 + 0x8],0x0
LAB_00199b02:
MOV dword ptr [RSP],0x1
LEA RDI,[RSP + 0x38]
LEA RCX,[RSP + 0x10]
MOV RSI,R15
MOV RDX,R14
CALL 0x00180e86
LAB_00199b1e:
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x38]
CALL 0x001515e6
MOV AL,byte ptr [RBX + 0x8]
LEA RDI,[RSP + 0x98]
MOV CL,byte ptr [RDI]
MOV byte ptr [RBX + 0x8],CL
MOV byte ptr [RDI],AL
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RDI + 0x8]
MOV qword ptr [RBX + 0x10],RCX
MOV qword ptr [RDI + 0x8],RAX
CALL 0x00136dc4
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R13
JZ 0x00199b6e
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001196d0
LAB_00199b6e:
LEA RDI,[RSP + 0x68]
CALL 0x00136dc4
LEA RDI,[RSP + 0x10]
CALL 0x00136dc4
MOV dword ptr [RBX],0x8
MOV RDI,qword ptr [RSP + 0x78]
CMP RDI,RBP
JZ 0x00199ba2
MOV RSI,qword ptr [RSP + 0x88]
INC RSI
CALL 0x001196d0
LAB_00199ba2:
LEA RDI,[RSP + 0x58]
CALL 0x00136dc4
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template const&,
common_chat_inputs const&) */
chat_template *
common_chat_params_init_functionary_v3_1_llama_3_1
(chat_template *param_1,common_chat_inputs *param_2)
{
basic_json *pbVar1;
int8 uVar2;
chat_template cVar3;
long in_RDX;
int1 local_c9;
long *local_c8;
int8 uStack_c0;
code *local_b8;
code *pcStack_b0;
long *local_a0 [2];
long local_90 [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>
local_80 [16];
data local_70 [8];
int8 local_68;
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
chat_template local_40 [8];
int8 local_38;
*(int4 *)param_1 = 0;
param_1[8] = (chat_template)0x0;
*(int8 *)(param_1 + 0x10) = 0;
*(chat_template **)(param_1 + 0x18) = param_1 + 0x28;
*(int8 *)(param_1 + 0x20) = 0;
param_1[0x28] = (chat_template)0x0;
param_1[0x38] = (chat_template)0x0;
*(int8 *)(param_1 + 0x40) = 0;
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)(param_1 + 0x50) = 0;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
*(int8 *)(param_1 + 0x68) = 0;
*(int8 *)(param_1 + 0x70) = 0;
*(int8 *)(param_1 + 0x78) = 0;
*(int8 *)(param_1 + 0x80) = 0;
pbVar1 = (basic_json *)(in_RDX + 0x10);
if (*(char *)(in_RDX + 0x10) == '\0') {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_80,pbVar1);
}
else {
/* try { // try from 001999b8 to 001999dc has its CatchHandler @ 00199c57 */
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(local_80,0,0,0,2);
}
local_58 = 0;
local_50 = 0;
local_c9 = 0;
local_60 = &local_50;
cVar3 = (chat_template)
_ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
(in_RDX + 0x20,"required");
param_1[0x38] = cVar3;
local_b8 = (code *)0x0;
pcStack_b0 = (code *)0x0;
local_c8 = (long *)0x0;
uStack_c0 = 0;
/* try { // try from 00199a1a to 00199a23 has its CatchHandler @ 00199c20 */
local_c8 = (long *)operator_new(0x20);
*local_c8 = in_RDX;
local_c8[1] = (long)&local_c9;
local_c8[2] = (long)&local_60;
local_c8[3] = (long)param_1;
pcStack_b0 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_invoke;
local_b8 = std::
_Function_handler<void(common_grammar_builder_const&),common_chat_params_init_functionary_v3_1_llama_3_1(minja::chat_template_const&,common_chat_inputs_const&)::$_0>
::_M_manager;
/* try { // try from 00199a5b to 00199a6b has its CatchHandler @ 00199bfa */
build_grammar_abi_cxx11_((function *)local_a0,(common_grammar_options *)&local_c8);
std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_a0);
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
if (local_b8 != (code *)0x0) {
/* try { // try from 00199aa2 to 00199ab0 has its CatchHandler @ 00199bc3 */
(*local_b8)(&local_c8,&local_c8,3);
}
if ((byte)*pbVar1 - 1 < 2) {
if (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1]) {
LAB_00199ade:
local_c8 = (long *)((ulong)local_c8 & 0xffffffffffffff00);
uStack_c0 = 0;
goto LAB_00199aec;
}
}
else if (*pbVar1 == (basic_json)0x0) goto LAB_00199ade;
/* try { // try from 00199acb to 00199ad7 has its CatchHandler @ 00199bc1 */
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((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)&local_c8,pbVar1);
LAB_00199aec:
local_70[0] = (data)0x0;
local_68 = 0;
/* try { // try from 00199b02 to 00199b1d has its CatchHandler @ 00199be1 */
minja::chat_template::apply
((basic_json *)local_a0,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)&local_c8,
*(bool *)(in_RDX + 0x68));
/* try { // try from 00199b1e to 00199b2f has its CatchHandler @ 00199bc5 */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
(local_40,local_a0);
cVar3 = param_1[8];
param_1[8] = local_40[0];
uVar2 = *(int8 *)(param_1 + 0x10);
*(int8 *)(param_1 + 0x10) = local_38;
local_40[0] = cVar3;
local_38 = uVar2;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_40);
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_70);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_c8);
*(int4 *)param_1 = 8;
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_80);
return param_1;
}
| |
42,305 | google::protobuf::io::EpsCopyOutputStream::FlushAndResetBuffer(unsigned char*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.cc | uint8_t* EpsCopyOutputStream::FlushAndResetBuffer(uint8_t* ptr) {
if (had_error_) return buffer_;
int s = Flush(ptr);
if (had_error_) return buffer_;
return SetInitialBuffer(buffer_end_, s);
} | O0 | cpp | google::protobuf::io::EpsCopyOutputStream::FlushAndResetBuffer(unsigned char*):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
testb $0x1, 0x38(%rax)
je 0x20b0c
movq (%rsp), %rax
addq $0x10, %rax
movq %rax, 0x20(%rsp)
jmp 0x20b4f
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x206a0
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0xc(%rsp)
testb $0x1, 0x38(%rax)
je 0x20b39
movq (%rsp), %rax
addq $0x10, %rax
movq %rax, 0x20(%rsp)
jmp 0x20b4f
movq (%rsp), %rdi
movq 0x8(%rdi), %rsi
movl 0xc(%rsp), %edx
callq 0x1d460
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
| _ZN6google8protobuf2io19EpsCopyOutputStream19FlushAndResetBufferEPh:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_28], rax
test byte ptr [rax+38h], 1
jz short loc_20B0C
mov rax, [rsp+28h+var_28]
add rax, 10h
mov [rsp+28h+var_8], rax
jmp short loc_20B4F
loc_20B0C:
mov rdi, [rsp+28h+var_28]; this
mov rsi, [rsp+28h+var_18]; unsigned __int8 *
call _ZN6google8protobuf2io19EpsCopyOutputStream5FlushEPh; google::protobuf::io::EpsCopyOutputStream::Flush(uchar *)
mov ecx, eax
mov rax, [rsp+28h+var_28]
mov [rsp+28h+var_1C], ecx
test byte ptr [rax+38h], 1
jz short loc_20B39
mov rax, [rsp+28h+var_28]
add rax, 10h
mov [rsp+28h+var_8], rax
jmp short loc_20B4F
loc_20B39:
mov rdi, [rsp+28h+var_28]; this
mov rsi, [rdi+8]; void *
mov edx, [rsp+28h+var_1C]; int
call _ZN6google8protobuf2io19EpsCopyOutputStream16SetInitialBufferEPvi; google::protobuf::io::EpsCopyOutputStream::SetInitialBuffer(void *,int)
mov [rsp+28h+var_8], rax
loc_20B4F:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
| char * google::protobuf::io::EpsCopyOutputStream::FlushAndResetBuffer(
google::protobuf::io::EpsCopyOutputStream *this,
unsigned __int8 *a2)
{
int v2; // ecx
if ( (*((_BYTE *)this + 56) & 1) != 0 )
return (char *)this + 16;
v2 = google::protobuf::io::EpsCopyOutputStream::Flush(this, a2);
if ( (*((_BYTE *)this + 56) & 1) != 0 )
return (char *)this + 16;
else
return google::protobuf::io::EpsCopyOutputStream::SetInitialBuffer(this, *((char **)this + 1), v2);
}
| FlushAndResetBuffer:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RAX
TEST byte ptr [RAX + 0x38],0x1
JZ 0x00120b0c
MOV RAX,qword ptr [RSP]
ADD RAX,0x10
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00120b4f
LAB_00120b0c:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001206a0
MOV ECX,EAX
MOV RAX,qword ptr [RSP]
MOV dword ptr [RSP + 0xc],ECX
TEST byte ptr [RAX + 0x38],0x1
JZ 0x00120b39
MOV RAX,qword ptr [RSP]
ADD RAX,0x10
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00120b4f
LAB_00120b39:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RDI + 0x8]
MOV EDX,dword ptr [RSP + 0xc]
CALL 0x0011d460
MOV qword ptr [RSP + 0x20],RAX
LAB_00120b4f:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
/* google::protobuf::io::EpsCopyOutputStream::FlushAndResetBuffer(unsigned char*) */
EpsCopyOutputStream * __thiscall
google::protobuf::io::EpsCopyOutputStream::FlushAndResetBuffer
(EpsCopyOutputStream *this,uchar *param_1)
{
int iVar1;
EpsCopyOutputStream *local_8;
if (((byte)this[0x38] & 1) == 0) {
iVar1 = Flush(this,param_1);
if (((byte)this[0x38] & 1) == 0) {
local_8 = (EpsCopyOutputStream *)SetInitialBuffer(this,*(void **)(this + 8),iVar1);
}
else {
local_8 = this + 0x10;
}
}
else {
local_8 = this + 0x10;
}
return local_8;
}
| |
42,306 | write_changed_bitmap | eloqsql/storage/maria/ma_bitmap.c | static inline my_bool write_changed_bitmap(MARIA_SHARE *share,
MARIA_FILE_BITMAP *bitmap)
{
my_bool res;
DBUG_ENTER("write_changed_bitmap");
DBUG_ASSERT(share->pagecache->block_size == bitmap->block_size);
DBUG_ASSERT(bitmap->file.pre_write_hook != 0);
DBUG_PRINT("info", ("bitmap->non_flushable: %u", bitmap->non_flushable));
/*
Mark that a bitmap page has been written to page cache and we have
to flush it during checkpoint.
*/
bitmap->changed_not_flushed= 1;
if ((bitmap->non_flushable == 0) || WRONG_BITMAP_FLUSH)
{
res= pagecache_write(share->pagecache,
&bitmap->file, bitmap->page, 0,
bitmap->map, PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED,
PAGECACHE_PIN_LEFT_UNPINNED,
PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE);
DBUG_ASSERT(!res);
DBUG_RETURN(res);
}
else
{
/*
bitmap->non_flushable means that someone has changed the bitmap,
but it's not yet complete so it can't yet be written to disk.
In this case we write the changed bitmap to the disk cache,
but keep it pinned until the change is completed. The page will
be unpinned later by _ma_bitmap_unpin_all() as soon as non_flushable
is set back to 0.
*/
MARIA_PINNED_PAGE page_link;
DBUG_PRINT("info", ("Writing pinned bitmap page"));
res= pagecache_write(share->pagecache,
&bitmap->file, bitmap->page, 0,
bitmap->map, PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED, PAGECACHE_PIN,
PAGECACHE_WRITE_DELAY, &page_link.link,
LSN_IMPOSSIBLE);
page_link.unlock= PAGECACHE_LOCK_LEFT_UNLOCKED;
page_link.changed= 1;
push_dynamic(&bitmap->pinned_pages, (const uchar*) (void*) &page_link);
DBUG_ASSERT(!res);
DBUG_RETURN(res);
}
} | O0 | c | write_changed_bitmap:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
jmp 0x5e762
jmp 0x5e764
jmp 0x5e766
jmp 0x5e768
jmp 0x5e76a
movq -0x18(%rbp), %rax
movb $0x1, 0x21(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x38(%rax)
jne 0x5e80b
movq -0x10(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x40, %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %r8
movq -0x10(%rbp), %rax
movq 0x600(%rax), %rax
movl 0x80(%rax), %eax
xorl %ecx, %ecx
movl $0x1, %r9d
xorl %r10d, %r10d
movl $0x0, (%rsp)
movl $0x1, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl %eax, 0x30(%rsp)
callq 0x984f0
movb %al, -0x19(%rbp)
jmp 0x5e7fe
jmp 0x5e800
movb -0x19(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x5e8b4
jmp 0x5e80d
jmp 0x5e80f
movq -0x10(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x40, %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %r8
leaq -0x38(%rbp), %r10
movq -0x10(%rbp), %rax
movq 0x600(%rax), %rax
movl 0x80(%rax), %eax
xorl %ecx, %ecx
movl $0x1, %r9d
xorl %r11d, %r11d
movl $0x0, (%rsp)
movl $0x2, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl %eax, 0x30(%rsp)
callq 0x984f0
movb %al, -0x19(%rbp)
movl $0x0, -0x30(%rbp)
movb $0x1, -0x28(%rbp)
movq -0x18(%rbp), %rdi
addq $0x140, %rdi # imm = 0x140
leaq -0x38(%rbp), %rsi
callq 0xdd8b0
jmp 0x5e8ac
jmp 0x5e8ae
movb -0x19(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| write_changed_bitmap:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
jmp short $+2
loc_5E762:
jmp short $+2
loc_5E764:
jmp short $+2
loc_5E766:
jmp short $+2
loc_5E768:
jmp short $+2
loc_5E76A:
mov rax, [rbp+var_18]
mov byte ptr [rax+21h], 1
mov rax, [rbp+var_18]
cmp dword ptr [rax+38h], 0
jnz loc_5E80B
mov rax, [rbp+var_10]
mov rdi, [rax+600h]
mov rsi, [rbp+var_18]
add rsi, 40h ; '@'
mov rax, [rbp+var_18]
mov rdx, [rax+10h]
mov rax, [rbp+var_18]
mov r8, [rax+8]
mov rax, [rbp+var_10]
mov rax, [rax+600h]
mov eax, [rax+80h]
xor ecx, ecx
mov r9d, 1
xor r10d, r10d
mov [rsp+70h+var_70], 0
mov [rsp+70h+var_68], 1
mov [rsp+70h+var_60], 0
mov [rsp+70h+var_58], 0
mov [rsp+70h+var_50], 0
mov [rsp+70h+var_48], 0
mov [rsp+70h+var_40], eax
call pagecache_write_part
mov [rbp+var_19], al
jmp short $+2
loc_5E7FE:
jmp short $+2
loc_5E800:
mov al, [rbp+var_19]
mov [rbp+var_1], al
jmp loc_5E8B4
loc_5E80B:
jmp short $+2
loc_5E80D:
jmp short $+2
loc_5E80F:
mov rax, [rbp+var_10]
mov rdi, [rax+600h]
mov rsi, [rbp+var_18]
add rsi, 40h ; '@'
mov rax, [rbp+var_18]
mov rdx, [rax+10h]
mov rax, [rbp+var_18]
mov r8, [rax+8]
lea r10, [rbp+var_38]
mov rax, [rbp+var_10]
mov rax, [rax+600h]
mov eax, [rax+80h]
xor ecx, ecx
mov r9d, 1
xor r11d, r11d
mov [rsp+70h+var_70], 0
mov [rsp+70h+var_68], 2
mov [rsp+70h+var_60], 0
mov [rsp+70h+var_58], r10
mov [rsp+70h+var_50], 0
mov [rsp+70h+var_48], 0
mov [rsp+70h+var_40], eax
call pagecache_write_part
mov [rbp+var_19], al
mov [rbp+var_30], 0
mov [rbp+var_28], 1
mov rdi, [rbp+var_18]
add rdi, 140h
lea rsi, [rbp+var_38]
call insert_dynamic
jmp short $+2
loc_5E8AC:
jmp short $+2
loc_5E8AE:
mov al, [rbp+var_19]
mov [rbp+var_1], al
loc_5E8B4:
mov al, [rbp+var_1]
add rsp, 70h
pop rbp
retn
| char write_changed_bitmap(long long a1, long long a2)
{
_BYTE v3[8]; // [rsp+38h] [rbp-38h] BYREF
int v4; // [rsp+40h] [rbp-30h]
char v5; // [rsp+48h] [rbp-28h]
char v6; // [rsp+57h] [rbp-19h]
long long v7; // [rsp+58h] [rbp-18h]
long long v8; // [rsp+60h] [rbp-10h]
v8 = a1;
v7 = a2;
*(_BYTE *)(a2 + 33) = 1;
if ( !*(_DWORD *)(v7 + 56) )
return pagecache_write_part(
*(_QWORD *)(v8 + 1536),
(int)v7 + 64,
*(_QWORD *)(v7 + 16),
0,
*(_QWORD *)(v7 + 8),
1,
0,
1,
0,
0LL,
0LL,
0,
*(_DWORD *)(*(_QWORD *)(v8 + 1536) + 128LL));
v6 = pagecache_write_part(
*(_QWORD *)(v8 + 1536),
(int)v7 + 64,
*(_QWORD *)(v7 + 16),
0,
*(_QWORD *)(v7 + 8),
1,
0,
2,
0,
(long long)v3,
0LL,
0,
*(_DWORD *)(*(_QWORD *)(v8 + 1536) + 128LL));
v4 = 0;
v5 = 1;
insert_dynamic(v7 + 320, v3);
return v6;
}
| write_changed_bitmap:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
JMP 0x0015e762
LAB_0015e762:
JMP 0x0015e764
LAB_0015e764:
JMP 0x0015e766
LAB_0015e766:
JMP 0x0015e768
LAB_0015e768:
JMP 0x0015e76a
LAB_0015e76a:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x21],0x1
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x38],0x0
JNZ 0x0015e80b
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x40
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x600]
MOV EAX,dword ptr [RAX + 0x80]
XOR ECX,ECX
MOV R9D,0x1
XOR R10D,R10D
MOV dword ptr [RSP],0x0
MOV dword ptr [RSP + 0x8],0x1
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0x28],0x0
MOV dword ptr [RSP + 0x30],EAX
CALL 0x001984f0
MOV byte ptr [RBP + -0x19],AL
JMP 0x0015e7fe
LAB_0015e7fe:
JMP 0x0015e800
LAB_0015e800:
MOV AL,byte ptr [RBP + -0x19]
MOV byte ptr [RBP + -0x1],AL
JMP 0x0015e8b4
LAB_0015e80b:
JMP 0x0015e80d
LAB_0015e80d:
JMP 0x0015e80f
LAB_0015e80f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x40
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RAX + 0x8]
LEA R10,[RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x600]
MOV EAX,dword ptr [RAX + 0x80]
XOR ECX,ECX
MOV R9D,0x1
XOR R11D,R11D
MOV dword ptr [RSP],0x0
MOV dword ptr [RSP + 0x8],0x2
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],R10
MOV qword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0x28],0x0
MOV dword ptr [RSP + 0x30],EAX
CALL 0x001984f0
MOV byte ptr [RBP + -0x19],AL
MOV dword ptr [RBP + -0x30],0x0
MOV byte ptr [RBP + -0x28],0x1
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x140
LEA RSI,[RBP + -0x38]
CALL 0x001dd8b0
JMP 0x0015e8ac
LAB_0015e8ac:
JMP 0x0015e8ae
LAB_0015e8ae:
MOV AL,byte ptr [RBP + -0x19]
MOV byte ptr [RBP + -0x1],AL
LAB_0015e8b4:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x70
POP RBP
RET
|
int8 write_changed_bitmap(long param_1,long param_2)
{
int8 uVar1;
int7 uVar2;
int1 local_40 [8];
int4 local_38;
int1 local_30;
int1 local_21;
long local_20;
long local_18;
int1 local_9;
*(int1 *)(param_2 + 0x21) = 1;
local_20 = param_2;
local_18 = param_1;
if (*(int *)(param_2 + 0x38) == 0) {
uVar1 = pagecache_write_part
(*(int8 *)(param_1 + 0x600),param_2 + 0x40,
*(int8 *)(param_2 + 0x10),0,*(int8 *)(param_2 + 8),1,0,1,0,0,0,0,
*(int4 *)(*(long *)(param_1 + 0x600) + 0x80));
local_9 = (int1)uVar1;
uVar2 = (int7)((ulong)uVar1 >> 8);
}
else {
local_21 = pagecache_write_part
(*(int8 *)(param_1 + 0x600),param_2 + 0x40,
*(int8 *)(param_2 + 0x10),0,*(int8 *)(param_2 + 8),1,0,2,0,
local_40,0,0,*(int4 *)(*(long *)(param_1 + 0x600) + 0x80));
local_38 = 0;
local_30 = 1;
uVar1 = insert_dynamic(local_20 + 0x140,local_40);
uVar2 = (int7)((ulong)uVar1 >> 8);
local_9 = local_21;
}
return CONCAT71(uVar2,local_9);
}
| |
42,307 | OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::AppendLocalPointStencilTableFaceVarying(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*, OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*, int, bool) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilTableFactory.cpp | StencilTableReal<REAL> const *
StencilTableFactoryReal<REAL>::AppendLocalPointStencilTableFaceVarying(
TopologyRefiner const &refiner,
StencilTableReal<REAL> const * baseStencilTable,
StencilTableReal<REAL> const * localPointStencilTable,
int channel,
bool factorize) {
return appendLocalPointStencilTable(
refiner,
baseStencilTable,
localPointStencilTable,
channel,
factorize);
} | O0 | cpp | OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::AppendLocalPointStencilTableFaceVarying(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*, OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*, int, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
andb $0x1, %al
movb %al, -0x1d(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movb -0x1d(%rbp), %al
andb $0x1, %al
movzbl %al, %r8d
callq 0xcde80
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN10OpenSubdiv6v3_6_03Far23StencilTableFactoryRealIfE39AppendLocalPointStencilTableFaceVaryingERKNS1_15TopologyRefinerEPKNS1_16StencilTableRealIfEESA_ib:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, r8b
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
and al, 1
mov [rbp+var_1D], al
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_1C]
mov al, [rbp+var_1D]
and al, 1
movzx r8d, al
call __ZN10OpenSubdiv6v3_6_03Far23StencilTableFactoryRealIfE28appendLocalPointStencilTableERKNS1_15TopologyRefinerEPKNS1_16StencilTableRealIfEESA_ib; OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::appendLocalPointStencilTable(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&,OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*,OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*,int,bool)
add rsp, 20h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::AppendLocalPointStencilTableFaceVarying(
long long a1,
long long a2,
long long a3,
unsigned int a4,
char a5)
{
return OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::appendLocalPointStencilTable(a1, a2, a3, a4, a5 & 1);
}
| |||
42,308 | OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::AppendLocalPointStencilTableFaceVarying(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*, OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*, int, bool) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilTableFactory.cpp | StencilTableReal<REAL> const *
StencilTableFactoryReal<REAL>::AppendLocalPointStencilTableFaceVarying(
TopologyRefiner const &refiner,
StencilTableReal<REAL> const * baseStencilTable,
StencilTableReal<REAL> const * localPointStencilTable,
int channel,
bool factorize) {
return appendLocalPointStencilTable(
refiner,
baseStencilTable,
localPointStencilTable,
channel,
factorize);
} | O2 | cpp | OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::AppendLocalPointStencilTableFaceVarying(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*, OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*, int, bool):
jmp 0x52c00
nop
| _ZN10OpenSubdiv6v3_6_03Far23StencilTableFactoryRealIfE39AppendLocalPointStencilTableFaceVaryingERKNS1_15TopologyRefinerEPKNS1_16StencilTableRealIfEESA_ib:
jmp __ZN10OpenSubdiv6v3_6_03Far23StencilTableFactoryRealIfE28appendLocalPointStencilTableERKNS1_15TopologyRefinerEPKNS1_16StencilTableRealIfEESA_ib; OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::appendLocalPointStencilTable(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&,OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*,OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*,int,bool)
| // attributes: thunk
long long OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::AppendLocalPointStencilTableFaceVarying(
OpenSubdiv::v3_6_0::Far::TopologyRefiner *a1)
{
return OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::appendLocalPointStencilTable(a1);
}
| AppendLocalPointStencilTableFaceVarying:
JMP 0x00152c00
|
/* OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::AppendLocalPointStencilTableFaceVarying(OpenSubdiv::v3_6_0::Far::TopologyRefiner
const&, OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*,
OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*, int, bool) */
void OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::
AppendLocalPointStencilTableFaceVarying
(TopologyRefiner *param_1,StencilTableReal *param_2,StencilTableReal *param_3,
int param_4,bool param_5)
{
(*(code *)PTR_appendLocalPointStencilTable_001f2e00)();
return;
}
| |
42,309 | OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::AppendLocalPointStencilTableFaceVarying(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*, OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*, int, bool) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilTableFactory.cpp | StencilTableReal<REAL> const *
StencilTableFactoryReal<REAL>::AppendLocalPointStencilTableFaceVarying(
TopologyRefiner const &refiner,
StencilTableReal<REAL> const * baseStencilTable,
StencilTableReal<REAL> const * localPointStencilTable,
int channel,
bool factorize) {
return appendLocalPointStencilTable(
refiner,
baseStencilTable,
localPointStencilTable,
channel,
factorize);
} | O3 | cpp | OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<float>::AppendLocalPointStencilTableFaceVarying(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*, OpenSubdiv::v3_6_0::Far::StencilTableReal<float> const*, int, bool):
jmp 0x39400
nop
| _ZN10OpenSubdiv6v3_6_03Far23StencilTableFactoryRealIdE39AppendLocalPointStencilTableFaceVaryingERKNS1_15TopologyRefinerEPKNS1_16StencilTableRealIdEESA_ib:
jmp __ZN10OpenSubdiv6v3_6_03Far23StencilTableFactoryRealIdE28appendLocalPointStencilTableERKNS1_15TopologyRefinerEPKNS1_16StencilTableRealIdEESA_ib; OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::appendLocalPointStencilTable(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&,OpenSubdiv::v3_6_0::Far::StencilTableReal<double> const*,OpenSubdiv::v3_6_0::Far::StencilTableReal<double> const*,int,bool)
| // attributes: thunk
long long OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::AppendLocalPointStencilTableFaceVarying(
OpenSubdiv::v3_6_0::Far::TopologyRefiner *a1)
{
return OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::appendLocalPointStencilTable(a1);
}
| AppendLocalPointStencilTableFaceVarying:
JMP 0x00139400
|
/* OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::AppendLocalPointStencilTableFaceVarying(OpenSubdiv::v3_6_0::Far::TopologyRefiner
const&, OpenSubdiv::v3_6_0::Far::StencilTableReal<double> const*,
OpenSubdiv::v3_6_0::Far::StencilTableReal<double> const*, int, bool) */
void OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::
AppendLocalPointStencilTableFaceVarying
(TopologyRefiner *param_1,StencilTableReal *param_2,StencilTableReal *param_3,
int param_4,bool param_5)
{
(*(code *)PTR_appendLocalPointStencilTable_001e2a00)();
return;
}
| |
42,310 | minja::Parser::parseLogicalOr() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseLogicalOr() {
auto left = parseLogicalAnd();
if (!left) throw std::runtime_error("Expected left side of 'logical or' expression");
static std::regex or_tok(R"(or\b)");
auto location = get_location();
while (!consumeToken(or_tok).empty()) {
auto right = parseLogicalAnd();
if (!right) throw std::runtime_error("Expected right side of 'or' expression");
left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::Or);
}
return left;
} | O3 | cpp | minja::Parser::parseLogicalOr():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x841fc
cmpq $0x0, (%rbx)
je 0x83f13
leaq 0xa71e0(%rip), %rax # 0x12af88
movb (%rax), %al
testb %al, %al
je 0x83f45
movq (%r14), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x83ddd
movq 0xa61b1(%rip), %rcx # 0x129f80
cmpb $0x0, (%rcx)
je 0x83dd9
incl 0x8(%rax)
jmp 0x83ddd
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
leaq 0x20(%rsp), %rcx
movq %rax, 0x10(%rcx)
movq %rsp, %r13
leaq 0xa4b80(%rip), %r12 # 0x128978
addq $0x10, %r12
movq %r13, %rdi
movq %r14, %rsi
leaq 0xa715f(%rip), %rdx # 0x12af68
movl $0x1, %ecx
callq 0x82c30
movq (%rsp), %rdi
movq 0x8(%rsp), %r15
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x83e33
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a890
testq %r15, %r15
je 0x83ebe
movq %r13, %rdi
movq %r14, %rsi
callq 0x841fc
cmpq $0x0, (%rsp)
je 0x83edf
movl $0x58, %edi
callq 0x1a870
movq %rax, %rbp
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%rbp)
movq %r12, (%rbp)
movq %rbp, %r15
addq $0x10, %r15
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
movl $0xf, %r8d
callq 0x94b6e
movq %r15, (%rbx)
movq 0x8(%rbx), %rdi
movq %rbp, 0x8(%rbx)
testq %rdi, %rdi
je 0x83ea6
callq 0x6c8e8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x83dfc
callq 0x6c8e8
jmp 0x83dfc
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x83ecd
callq 0x6c8e8
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1a430
movq %rax, %r15
leaq 0x6aa3b(%rip), %rsi # 0xee92e
movq %rax, %rdi
callq 0x1a310
movq 0xa60e6(%rip), %rsi # 0x129fe8
movq 0xa604f(%rip), %rdx # 0x129f58
movq %r15, %rdi
callq 0x1aea0
jmp 0x83f45
movl $0x10, %edi
callq 0x1a430
movq %rax, %r15
leaq 0x6a9d4(%rip), %rsi # 0xee8fb
movq %rax, %rdi
callq 0x1a310
movq 0xa60b2(%rip), %rsi # 0x129fe8
movq 0xa601b(%rip), %rdx # 0x129f58
movq %r15, %rdi
callq 0x1aea0
leaq 0xa703c(%rip), %rdi # 0x12af88
callq 0x1af80
testl %eax, %eax
je 0x83db2
leaq 0xa7008(%rip), %rdi # 0x12af68
leaq 0x6a9c2(%rip), %rsi # 0xee929
movl $0x10, %edx
callq 0x61876
leaq -0x223fe(%rip), %rdi # 0x61b7a
leaq 0xa6fe9(%rip), %rsi # 0x12af68
leaq 0xa6912(%rip), %rdx # 0x12a898
callq 0x1a770
leaq 0xa6ff6(%rip), %rdi # 0x12af88
callq 0x1a590
jmp 0x83db2
movq %rax, %r14
leaq 0xa6fe2(%rip), %rdi # 0x12af88
callq 0x1a580
jmp 0x83ff6
movq %rax, %r14
jmp 0x83ff6
movq %rax, %r14
movq %r15, %rdi
callq 0x1a640
jmp 0x83ff6
jmp 0x83fd0
movq %rax, %r14
movq %r15, %rdi
callq 0x1a640
jmp 0x83fd3
jmp 0x83fe4
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x83fe7
callq 0x6c8e8
jmp 0x83fe7
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x83ff6
callq 0x6c8e8
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x84004
callq 0x6c8e8
movq %r14, %rdi
callq 0x1af20
| _ZN5minja6Parser14parseLogicalOrEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void)
cmp qword ptr [rbx], 0
jz loc_83F13
lea rax, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalOr(void)::or_tok
mov al, [rax]
test al, al
jz loc_83F45
loc_83DB2:
mov rax, [r14]
mov [rsp+68h+var_48], rax
mov rax, [r14+8]
mov [rsp+68h+var_40], rax
test rax, rax
jz short loc_83DDD
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_83DD9
inc dword ptr [rax+8]
jmp short loc_83DDD
loc_83DD9:
lock inc dword ptr [rax+8]
loc_83DDD:
mov rax, [r14+20h]
sub rax, [r14+10h]
lea rcx, [rsp+68h+var_48]
mov [rcx+10h], rax
mov r13, rsp
lea r12, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
add r12, 10h
loc_83DFC:
mov rdi, r13
mov rsi, r14
lea rdx, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; minja::Parser::parseLogicalOr(void)::or_tok
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
mov rdi, [rsp+68h+var_68]; void *
mov r15, [rsp+68h+var_60]
lea rax, [rsp+68h+var_58]
cmp rdi, rax
jz short loc_83E33
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_83E33:
test r15, r15
jz loc_83EBE
mov rdi, r13; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void)
cmp [rsp+68h+var_68], 0
jz loc_83EDF
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbp, rax
mov rax, 100000001h
mov [rbp+8], rax
mov [rbp+0], r12
mov r15, rbp
add r15, 10h
mov rdi, r15
lea rsi, [rsp+68h+var_48]
mov rdx, rbx
mov rcx, r13
mov r8d, 0Fh
call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op)
mov [rbx], r15
mov rdi, [rbx+8]
mov [rbx+8], rbp
test rdi, rdi
jz short loc_83EA6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_83EA6:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz loc_83DFC
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_83DFC
loc_83EBE:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_83ECD
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_83ECD:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_83EDF:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS; "Expected right side of 'or' expression"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_83F45
loc_83F13:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi; "Expected left side of 'logical or' expr"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_83F45:
lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_83DB2
lea rdi, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; minja::Parser::parseLogicalOr(void)::or_tok
lea rsi, aOrB; "or\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_83DB2
mov r14, rax
lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_83FF6
mov r14, rax
jmp short loc_83FF6
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_83FF6
jmp short loc_83FD0
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_83FD3
jmp short loc_83FE4
loc_83FD0:
mov r14, rax
loc_83FD3:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_83FE7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_83FE7
loc_83FE4:
mov r14, rax
loc_83FE7:
mov rdi, [rsp+arg_20]
test rdi, rdi
jz short loc_83FF6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_83FF6:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_84004
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_84004:
mov rdi, r14
call __Unwind_Resume
| minja::Parser * minja::Parser::parseLogicalOr(volatile signed __int32 **this, long long *a2)
{
volatile signed __int32 *v3; // rax
volatile signed __int32 *v4; // r15
volatile signed __int32 *v5; // rbp
volatile signed __int32 *v6; // rdi
std::runtime_error *v8; // r15
std::runtime_error *exception; // r15
void *v10; // [rsp+0h] [rbp-68h] BYREF
volatile signed __int32 *v11; // [rsp+8h] [rbp-60h]
long long v12; // [rsp+10h] [rbp-58h] BYREF
long long v13; // [rsp+20h] [rbp-48h] BYREF
volatile signed __int32 *v14; // [rsp+28h] [rbp-40h]
long long v15; // [rsp+30h] [rbp-38h]
minja::Parser::parseLogicalAnd((minja::Parser *)this);
if ( !*this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'logical or' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11],
(long long)"or\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11]);
}
v13 = *a2;
v3 = (volatile signed __int32 *)a2[1];
v14 = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v3 + 2);
else
_InterlockedIncrement(v3 + 2);
}
v15 = a2[4] - a2[2];
while ( 1 )
{
minja::Parser::consumeToken(
(long long)&v10,
(long long)a2,
(long long)&minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11],
1u);
v4 = v11;
if ( v10 != &v12 )
operator delete(v10, v12 + 1);
if ( !v4 )
break;
minja::Parser::parseLogicalAnd((minja::Parser *)&v10);
if ( !v10 )
{
v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v8, "Expected right side of 'or' expression");
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v5 = (volatile signed __int32 *)operator new(0x58uLL);
*((_QWORD *)v5 + 1) = 0x100000001LL;
*(_QWORD *)v5 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
minja::BinaryOpExpr::BinaryOpExpr(v5 + 4, &v13, this, &v10, 15LL);
*this = v5 + 4;
v6 = this[1];
this[1] = v5;
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
}
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
return (minja::Parser *)this;
}
| parseLogicalOr:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
CALL 0x001841fc
CMP qword ptr [RBX],0x0
JZ 0x00183f13
LEA RAX,[0x22af88]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00183f45
LAB_00183db2:
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x28],RAX
TEST RAX,RAX
JZ 0x00183ddd
MOV RCX,qword ptr [0x00229f80]
CMP byte ptr [RCX],0x0
JZ 0x00183dd9
INC dword ptr [RAX + 0x8]
JMP 0x00183ddd
LAB_00183dd9:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00183ddd:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
LEA RCX,[RSP + 0x20]
MOV qword ptr [RCX + 0x10],RAX
MOV R13,RSP
LEA R12,[0x228978]
ADD R12,0x10
LAB_00183dfc:
MOV RDI,R13
MOV RSI,R14
LEA RDX,[0x22af68]
MOV ECX,0x1
CALL 0x00182c30
MOV RDI,qword ptr [RSP]
MOV R15,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x00183e33
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011a890
LAB_00183e33:
TEST R15,R15
JZ 0x00183ebe
LAB_00183e3c:
MOV RDI,R13
MOV RSI,R14
CALL 0x001841fc
CMP qword ptr [RSP],0x0
JZ 0x00183edf
LAB_00183e52:
MOV EDI,0x58
CALL 0x0011a870
LAB_00183e5c:
MOV RBP,RAX
MOV RAX,0x100000001
MOV qword ptr [RBP + 0x8],RAX
MOV qword ptr [RBP],R12
MOV R15,RBP
ADD R15,0x10
MOV RDI,R15
LEA RSI,[RSP + 0x20]
MOV RDX,RBX
MOV RCX,R13
MOV R8D,0xf
CALL 0x00194b6e
MOV qword ptr [RBX],R15
MOV RDI,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x8],RBP
TEST RDI,RDI
JZ 0x00183ea6
CALL 0x0016c8e8
LAB_00183ea6:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00183dfc
CALL 0x0016c8e8
JMP 0x00183dfc
LAB_00183ebe:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00183ecd
CALL 0x0016c8e8
LAB_00183ecd:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00183edf:
MOV EDI,0x10
CALL 0x0011a430
MOV R15,RAX
LAB_00183eec:
LEA RSI,[0x1ee92e]
MOV RDI,RAX
CALL 0x0011a310
LAB_00183efb:
MOV RSI,qword ptr [0x00229fe8]
MOV RDX,qword ptr [0x00229f58]
MOV RDI,R15
CALL 0x0011aea0
LAB_00183f13:
MOV EDI,0x10
CALL 0x0011a430
MOV R15,RAX
LAB_00183f20:
LEA RSI,[0x1ee8fb]
MOV RDI,RAX
CALL 0x0011a310
LAB_00183f2f:
MOV RSI,qword ptr [0x00229fe8]
MOV RDX,qword ptr [0x00229f58]
MOV RDI,R15
CALL 0x0011aea0
LAB_00183f45:
LEA RDI,[0x22af88]
CALL 0x0011af80
TEST EAX,EAX
JZ 0x00183db2
LAB_00183f59:
LEA RDI,[0x22af68]
LEA RSI,[0x1ee929]
MOV EDX,0x10
CALL 0x00161876
LAB_00183f71:
LEA RDI,[0x161b7a]
LEA RSI,[0x22af68]
LEA RDX,[0x22a898]
CALL 0x0011a770
LEA RDI,[0x22af88]
CALL 0x0011a590
JMP 0x00183db2
|
/* minja::Parser::parseLogicalOr() */
void minja::Parser::parseLogicalOr(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int iVar2;
int8 *puVar3;
runtime_error *prVar4;
int8 *in_RSI;
long *in_RDI;
long *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
long local_58 [2];
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
long local_38;
parseLogicalAnd();
if (*in_RDI == 0) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00183f20 to 00183f2e has its CatchHandler @ 00183fb2 */
std::runtime_error::runtime_error(prVar4,"Expected left side of \'logical or\' expression");
/* try { // try from 00183f2f to 00183f44 has its CatchHandler @ 00183fad */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_00229fe8,PTR__runtime_error_00229f58);
}
if (parseLogicalOr()::or_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseLogicalOr()::or_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 00183f59 to 00183f70 has its CatchHandler @ 00183f9c */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseLogicalOr()::or_tok_abi_cxx11_,&DAT_001ee929,0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseLogicalOr()::or_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseLogicalOr()::or_tok_abi_cxx11_);
}
}
local_48 = *in_RSI;
local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00229f80 == '\0') {
LOCK();
*(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1;
}
}
local_38 = in_RSI[4] - in_RSI[2];
while( true ) {
/* try { // try from 00183dfc to 00183e12 has its CatchHandler @ 00183fe4 */
consumeToken(&local_68);
p_Var1 = local_60;
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break;
/* try { // try from 00183e3c to 00183e46 has its CatchHandler @ 00183fce */
parseLogicalAnd();
if (local_68 == (long *)0x0) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00183eec to 00183efa has its CatchHandler @ 00183fc1 */
std::runtime_error::runtime_error(prVar4,"Expected right side of \'or\' expression");
/* try { // try from 00183efb to 00183f10 has its CatchHandler @ 00183fbf */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_00229fe8,PTR__runtime_error_00229f58);
}
/* try { // try from 00183e52 to 00183e5b has its CatchHandler @ 00183fd0 */
puVar3 = (int8 *)operator_new(0x58);
puVar3[1] = 0x100000001;
*puVar3 = &PTR___Sp_counted_ptr_inplace_00228988;
BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar3 + 2),&local_48);
*in_RDI = (long)(puVar3 + 2);
p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1];
in_RDI[1] = (long)puVar3;
if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1);
}
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
return;
}
| |
42,311 | stbi__pic_info(stbi__context*, int*, int*, int*) | llama.cpp/examples/llava/../../common/stb_image.h | static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp)
{
int act_comp=0,num_packets=0,chained,dummy;
stbi__pic_packet packets[10];
if (!x) x = &dummy;
if (!y) y = &dummy;
if (!comp) comp = &dummy;
if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) {
stbi__rewind(s);
return 0;
}
stbi__skip(s, 88);
*x = stbi__get16be(s);
*y = stbi__get16be(s);
if (stbi__at_eof(s)) {
stbi__rewind( s);
return 0;
}
if ( (*x) != 0 && (1 << 28) / (*x) < (*y)) {
stbi__rewind( s );
return 0;
}
stbi__skip(s, 8);
do {
stbi__pic_packet *packet;
if (num_packets==sizeof(packets)/sizeof(packets[0]))
return 0;
packet = &packets[num_packets++];
chained = stbi__get8(s);
packet->size = stbi__get8(s);
packet->type = stbi__get8(s);
packet->channel = stbi__get8(s);
act_comp |= packet->channel;
if (stbi__at_eof(s)) {
stbi__rewind( s );
return 0;
}
if (packet->size != 8) {
stbi__rewind( s );
return 0;
}
} while (chained);
*comp = (act_comp & 0x10 ? 4 : 3);
return 1;
} | O3 | c | stbi__pic_info(stbi__context*, int*, int*, int*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0x192a9(%rip), %rsi # 0x4f607
callq 0x328a1
testl %eax, %eax
je 0x36428
cmpq $0x0, 0x10(%r14)
je 0x363a1
movq 0xc0(%r14), %rax
movq 0xc8(%r14), %rdx
movl %edx, %ecx
subl %eax, %ecx
cmpl $0x57, %ecx
jg 0x363a8
movq %rdx, 0xc0(%r14)
movq 0x28(%r14), %rdi
movl $0x58, %esi
subl %ecx, %esi
callq *0x18(%r14)
jmp 0x363b3
movq 0xc0(%r14), %rax
addq $0x58, %rax
movq %rax, 0xc0(%r14)
movq %r14, %rdi
callq 0x308af
movl %eax, %ebp
testq %r12, %r12
je 0x363c6
movl %ebp, (%r12)
movq %r14, %rdi
callq 0x308af
testq %r15, %r15
je 0x363d8
movl %eax, (%r15)
jmp 0x363da
movl %eax, %ebp
cmpq $0x0, 0x10(%r14)
je 0x363f4
movq 0x28(%r14), %rdi
callq *0x20(%r14)
testl %eax, %eax
je 0x36404
cmpl $0x0, 0x30(%r14)
je 0x36428
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jae 0x36428
movl %ebp, %ecx
testq %r12, %r12
je 0x3640f
movl (%r12), %ecx
testl %ecx, %ecx
je 0x36449
movl $0x10000000, %eax # imm = 0x10000000
xorl %edx, %edx
idivl %ecx
testq %r15, %r15
je 0x36424
movl (%r15), %ebp
cmpl %ebp, %eax
jge 0x36449
movups 0xd0(%r14), %xmm0
movups %xmm0, 0xc0(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x10(%r14)
je 0x3647f
movq 0xc0(%r14), %rax
movq 0xc8(%r14), %rdx
movl %edx, %ecx
subl %eax, %ecx
cmpl $0x7, %ecx
jg 0x36486
movq %rdx, 0xc0(%r14)
movq 0x28(%r14), %rdi
movl $0x8, %esi
subl %ecx, %esi
callq *0x18(%r14)
jmp 0x36491
movq 0xc0(%r14), %rax
addq $0x8, %rax
movq %rax, 0xc0(%r14)
movl $0xb, %r12d
xorl %r15d, %r15d
decl %r12d
je 0x36438
movq 0xc0(%r14), %rax
movq 0xc8(%r14), %rcx
cmpq %rcx, %rax
jb 0x364d3
cmpl $0x0, 0x30(%r14)
je 0x365c2
movq %r14, %rdi
callq 0x2f0a9
movq 0xc0(%r14), %rax
movq 0xc8(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0xc0(%r14)
cmpb $0x0, (%rax)
sete %r13b
movq %rdx, %rax
cmpq %rcx, %rax
jb 0x3650e
cmpl $0x0, 0x30(%r14)
je 0x365ca
movq %r14, %rdi
callq 0x2f0a9
movq 0xc0(%r14), %rax
movq 0xc8(%r14), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0xc0(%r14)
cmpb $0x8, (%rax)
sete %bl
movq %rdx, %rax
cmpq %rcx, %rax
jb 0x36544
cmpl $0x0, 0x30(%r14)
je 0x3654e
movq %r14, %rdi
callq 0x2f0a9
movq 0xc0(%r14), %rax
movq 0xc8(%r14), %rcx
incq %rax
movq %rax, 0xc0(%r14)
cmpq %rcx, %rax
jb 0x36569
cmpl $0x0, 0x30(%r14)
je 0x365d1
movq %r14, %rdi
callq 0x2f0a9
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
movzbl (%rax), %ebp
movq %rcx, %rax
cmpq $0x0, 0x10(%r14)
je 0x3659f
movq 0x28(%r14), %rdi
callq *0x20(%r14)
testl %eax, %eax
je 0x365ac
cmpl $0x0, 0x30(%r14)
je 0x36428
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jae 0x36428
testb %bl, %bl
je 0x36428
orl %ebp, %r15d
testb %r13b, %r13b
je 0x3649a
jmp 0x365d5
movb $0x1, %r13b
jmp 0x364e8
xorl %ebx, %ebx
jmp 0x36522
xorl %ebp, %ebp
jmp 0x3657a
movl $0x1, %eax
movq (%rsp), %rcx
testq %rcx, %rcx
je 0x3643a
andl $0x10, %r15d
cmpl $0x1, %r15d
movl $0x4, %edx
sbbl $0x0, %edx
movl %edx, (%rcx)
jmp 0x3643a
| _ZL14stbi__pic_infoP13stbi__contextPiS1_S1_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], rcx
mov r15, rdx
mov r12, rsi
mov r14, rdi
lea rsi, unk_4F607
call _ZL13stbi__pic_is4P13stbi__contextPKc; stbi__pic_is4(stbi__context *,char const*)
test eax, eax
jz loc_36428
cmp qword ptr [r14+10h], 0
jz short loc_363A1
mov rax, [r14+0C0h]
mov rdx, [r14+0C8h]
mov ecx, edx
sub ecx, eax
cmp ecx, 57h ; 'W'
jg short loc_363A8
mov [r14+0C0h], rdx
mov rdi, [r14+28h]
mov esi, 58h ; 'X'
sub esi, ecx
call qword ptr [r14+18h]
jmp short loc_363B3
loc_363A1:
mov rax, [r14+0C0h]
loc_363A8:
add rax, 58h ; 'X'
mov [r14+0C0h], rax
loc_363B3:
mov rdi, r14
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
mov ebp, eax
test r12, r12
jz short loc_363C6
mov [r12], ebp
loc_363C6:
mov rdi, r14
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
test r15, r15
jz short loc_363D8
mov [r15], eax
jmp short loc_363DA
loc_363D8:
mov ebp, eax
loc_363DA:
cmp qword ptr [r14+10h], 0
jz short loc_363F4
mov rdi, [r14+28h]
call qword ptr [r14+20h]
test eax, eax
jz short loc_36404
cmp dword ptr [r14+30h], 0
jz short loc_36428
loc_363F4:
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jnb short loc_36428
loc_36404:
mov ecx, ebp
test r12, r12
jz short loc_3640F
mov ecx, [r12]
loc_3640F:
test ecx, ecx
jz short loc_36449
mov eax, 10000000h
xor edx, edx
idiv ecx
test r15, r15
jz short loc_36424
mov ebp, [r15]
loc_36424:
cmp eax, ebp
jge short loc_36449
loc_36428:
movups xmm0, xmmword ptr [r14+0D0h]
movups xmmword ptr [r14+0C0h], xmm0
loc_36438:
xor eax, eax
loc_3643A:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_36449:
cmp qword ptr [r14+10h], 0
jz short loc_3647F
mov rax, [r14+0C0h]
mov rdx, [r14+0C8h]
mov ecx, edx
sub ecx, eax
cmp ecx, 7
jg short loc_36486
mov [r14+0C0h], rdx
mov rdi, [r14+28h]
mov esi, 8
sub esi, ecx
call qword ptr [r14+18h]
jmp short loc_36491
loc_3647F:
mov rax, [r14+0C0h]
loc_36486:
add rax, 8
mov [r14+0C0h], rax
loc_36491:
mov r12d, 0Bh
xor r15d, r15d
loc_3649A:
dec r12d
jz short loc_36438
mov rax, [r14+0C0h]
mov rcx, [r14+0C8h]
cmp rax, rcx
jb short loc_364D3
cmp dword ptr [r14+30h], 0
jz loc_365C2
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
mov rcx, [r14+0C8h]
loc_364D3:
lea rdx, [rax+1]
mov [r14+0C0h], rdx
cmp byte ptr [rax], 0
setz r13b
mov rax, rdx
loc_364E8:
cmp rax, rcx
jb short loc_3650E
cmp dword ptr [r14+30h], 0
jz loc_365CA
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
mov rcx, [r14+0C8h]
loc_3650E:
lea rdx, [rax+1]
mov [r14+0C0h], rdx
cmp byte ptr [rax], 8
setz bl
mov rax, rdx
loc_36522:
cmp rax, rcx
jb short loc_36544
cmp dword ptr [r14+30h], 0
jz short loc_3654E
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
mov rcx, [r14+0C8h]
loc_36544:
inc rax
mov [r14+0C0h], rax
loc_3654E:
cmp rax, rcx
jb short loc_36569
cmp dword ptr [r14+30h], 0
jz short loc_365D1
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_36569:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
movzx ebp, byte ptr [rax]
mov rax, rcx
loc_3657A:
cmp qword ptr [r14+10h], 0
jz short loc_3659F
mov rdi, [r14+28h]
call qword ptr [r14+20h]
test eax, eax
jz short loc_365AC
cmp dword ptr [r14+30h], 0
jz loc_36428
mov rax, [r14+0C0h]
loc_3659F:
cmp rax, [r14+0C8h]
jnb loc_36428
loc_365AC:
test bl, bl
jz loc_36428
or r15d, ebp
test r13b, r13b
jz loc_3649A
jmp short loc_365D5
loc_365C2:
mov r13b, 1
jmp loc_364E8
loc_365CA:
xor ebx, ebx
jmp loc_36522
loc_365D1:
xor ebp, ebp
jmp short loc_3657A
loc_365D5:
mov eax, 1
mov rcx, [rsp+38h+var_38]
test rcx, rcx
jz loc_3643A
and r15d, 10h
cmp r15d, 1
mov edx, 4
sbb edx, 0
mov [rcx], edx
jmp loc_3643A
| long long stbi__pic_info(long long a1, int *a2, int *a3, _DWORD *a4)
{
long long v5; // rax
int v6; // ecx
int v7; // ebp
int v8; // eax
int v9; // ecx
long long result; // rax
long long v11; // rax
int v12; // ecx
int v13; // r12d
char v14; // r15
char *v15; // rax
unsigned long long v16; // rcx
bool v17; // r13
bool v18; // bl
char v19; // bp
if ( !(unsigned int)stbi__pic_is4(a1, (long long)&unk_4F607) )
goto LABEL_22;
if ( !*(_QWORD *)(a1 + 16) )
{
v5 = *(_QWORD *)(a1 + 192);
goto LABEL_6;
}
v5 = *(_QWORD *)(a1 + 192);
v6 = *(_QWORD *)(a1 + 200) - v5;
if ( v6 > 87 )
{
LABEL_6:
*(_QWORD *)(a1 + 192) = v5 + 88;
goto LABEL_7;
}
*(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200);
(*(void ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(88 - v6));
LABEL_7:
v7 = stbi__get16be(a1);
if ( a2 )
*a2 = v7;
v8 = stbi__get16be(a1);
if ( a3 )
*a3 = v8;
else
v7 = v8;
if ( !*(_QWORD *)(a1 + 16) )
goto LABEL_15;
if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) )
goto LABEL_16;
if ( *(_DWORD *)(a1 + 48) )
{
LABEL_15:
if ( *(_QWORD *)(a1 + 192) < *(_QWORD *)(a1 + 200) )
{
LABEL_16:
v9 = v7;
if ( a2 )
v9 = *a2;
if ( v9 )
{
if ( a3 )
v7 = *a3;
if ( 0x10000000 / v9 < v7 )
goto LABEL_22;
}
if ( *(_QWORD *)(a1 + 16) )
{
v11 = *(_QWORD *)(a1 + 192);
v12 = *(_QWORD *)(a1 + 200) - v11;
if ( v12 <= 7 )
{
*(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200);
(*(void ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(8 - v12));
LABEL_30:
v13 = 11;
v14 = 0;
while ( 1 )
{
if ( !--v13 )
return 0LL;
v15 = *(char **)(a1 + 192);
v16 = *(_QWORD *)(a1 + 200);
if ( (unsigned long long)v15 < v16 )
goto LABEL_35;
if ( *(_DWORD *)(a1 + 48) )
break;
v17 = 1;
LABEL_36:
if ( (unsigned long long)v15 < v16 )
goto LABEL_39;
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v15 = *(char **)(a1 + 192);
v16 = *(_QWORD *)(a1 + 200);
LABEL_39:
*(_QWORD *)(a1 + 192) = v15 + 1;
v18 = *v15++ == 8;
goto LABEL_40;
}
v18 = 0;
LABEL_40:
if ( (unsigned long long)v15 >= v16 )
{
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_44;
stbi__refill_buffer(a1);
v15 = *(char **)(a1 + 192);
v16 = *(_QWORD *)(a1 + 200);
}
*(_QWORD *)(a1 + 192) = ++v15;
LABEL_44:
if ( (unsigned long long)v15 < v16 )
goto LABEL_47;
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v15 = *(char **)(a1 + 192);
LABEL_47:
*(_QWORD *)(a1 + 192) = v15 + 1;
v19 = *v15++;
goto LABEL_48;
}
v19 = 0;
LABEL_48:
if ( !*(_QWORD *)(a1 + 16) )
goto LABEL_52;
if ( (*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) )
{
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_22;
v15 = *(char **)(a1 + 192);
LABEL_52:
if ( (unsigned long long)v15 >= *(_QWORD *)(a1 + 200) )
goto LABEL_22;
}
if ( !v18 )
goto LABEL_22;
v14 |= v19;
if ( v17 )
{
result = 1LL;
if ( a4 )
*a4 = ((v14 & 0x10 | 0x400000000uLL) - 1) >> 32;
return result;
}
}
stbi__refill_buffer(a1);
v15 = *(char **)(a1 + 192);
v16 = *(_QWORD *)(a1 + 200);
LABEL_35:
*(_QWORD *)(a1 + 192) = v15 + 1;
v17 = *v15++ == 0;
goto LABEL_36;
}
}
else
{
v11 = *(_QWORD *)(a1 + 192);
}
*(_QWORD *)(a1 + 192) = v11 + 8;
goto LABEL_30;
}
}
LABEL_22:
*(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208);
return 0LL;
}
| stbi__pic_info:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RCX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
LEA RSI,[0x14f607]
CALL 0x001328a1
TEST EAX,EAX
JZ 0x00136428
CMP qword ptr [R14 + 0x10],0x0
JZ 0x001363a1
MOV RAX,qword ptr [R14 + 0xc0]
MOV RDX,qword ptr [R14 + 0xc8]
MOV ECX,EDX
SUB ECX,EAX
CMP ECX,0x57
JG 0x001363a8
MOV qword ptr [R14 + 0xc0],RDX
MOV RDI,qword ptr [R14 + 0x28]
MOV ESI,0x58
SUB ESI,ECX
CALL qword ptr [R14 + 0x18]
JMP 0x001363b3
LAB_001363a1:
MOV RAX,qword ptr [R14 + 0xc0]
LAB_001363a8:
ADD RAX,0x58
MOV qword ptr [R14 + 0xc0],RAX
LAB_001363b3:
MOV RDI,R14
CALL 0x001308af
MOV EBP,EAX
TEST R12,R12
JZ 0x001363c6
MOV dword ptr [R12],EBP
LAB_001363c6:
MOV RDI,R14
CALL 0x001308af
TEST R15,R15
JZ 0x001363d8
MOV dword ptr [R15],EAX
JMP 0x001363da
LAB_001363d8:
MOV EBP,EAX
LAB_001363da:
CMP qword ptr [R14 + 0x10],0x0
JZ 0x001363f4
MOV RDI,qword ptr [R14 + 0x28]
CALL qword ptr [R14 + 0x20]
TEST EAX,EAX
JZ 0x00136404
CMP dword ptr [R14 + 0x30],0x0
JZ 0x00136428
LAB_001363f4:
MOV RAX,qword ptr [R14 + 0xc0]
CMP RAX,qword ptr [R14 + 0xc8]
JNC 0x00136428
LAB_00136404:
MOV ECX,EBP
TEST R12,R12
JZ 0x0013640f
MOV ECX,dword ptr [R12]
LAB_0013640f:
TEST ECX,ECX
JZ 0x00136449
MOV EAX,0x10000000
XOR EDX,EDX
IDIV ECX
TEST R15,R15
JZ 0x00136424
MOV EBP,dword ptr [R15]
LAB_00136424:
CMP EAX,EBP
JGE 0x00136449
LAB_00136428:
MOVUPS XMM0,xmmword ptr [R14 + 0xd0]
MOVUPS xmmword ptr [R14 + 0xc0],XMM0
LAB_00136438:
XOR EAX,EAX
LAB_0013643a:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00136449:
CMP qword ptr [R14 + 0x10],0x0
JZ 0x0013647f
MOV RAX,qword ptr [R14 + 0xc0]
MOV RDX,qword ptr [R14 + 0xc8]
MOV ECX,EDX
SUB ECX,EAX
CMP ECX,0x7
JG 0x00136486
MOV qword ptr [R14 + 0xc0],RDX
MOV RDI,qword ptr [R14 + 0x28]
MOV ESI,0x8
SUB ESI,ECX
CALL qword ptr [R14 + 0x18]
JMP 0x00136491
LAB_0013647f:
MOV RAX,qword ptr [R14 + 0xc0]
LAB_00136486:
ADD RAX,0x8
MOV qword ptr [R14 + 0xc0],RAX
LAB_00136491:
MOV R12D,0xb
XOR R15D,R15D
LAB_0013649a:
DEC R12D
JZ 0x00136438
MOV RAX,qword ptr [R14 + 0xc0]
MOV RCX,qword ptr [R14 + 0xc8]
CMP RAX,RCX
JC 0x001364d3
CMP dword ptr [R14 + 0x30],0x0
JZ 0x001365c2
MOV RDI,R14
CALL 0x0012f0a9
MOV RAX,qword ptr [R14 + 0xc0]
MOV RCX,qword ptr [R14 + 0xc8]
LAB_001364d3:
LEA RDX,[RAX + 0x1]
MOV qword ptr [R14 + 0xc0],RDX
CMP byte ptr [RAX],0x0
SETZ R13B
MOV RAX,RDX
LAB_001364e8:
CMP RAX,RCX
JC 0x0013650e
CMP dword ptr [R14 + 0x30],0x0
JZ 0x001365ca
MOV RDI,R14
CALL 0x0012f0a9
MOV RAX,qword ptr [R14 + 0xc0]
MOV RCX,qword ptr [R14 + 0xc8]
LAB_0013650e:
LEA RDX,[RAX + 0x1]
MOV qword ptr [R14 + 0xc0],RDX
CMP byte ptr [RAX],0x8
SETZ BL
MOV RAX,RDX
LAB_00136522:
CMP RAX,RCX
JC 0x00136544
CMP dword ptr [R14 + 0x30],0x0
JZ 0x0013654e
MOV RDI,R14
CALL 0x0012f0a9
MOV RAX,qword ptr [R14 + 0xc0]
MOV RCX,qword ptr [R14 + 0xc8]
LAB_00136544:
INC RAX
MOV qword ptr [R14 + 0xc0],RAX
LAB_0013654e:
CMP RAX,RCX
JC 0x00136569
CMP dword ptr [R14 + 0x30],0x0
JZ 0x001365d1
MOV RDI,R14
CALL 0x0012f0a9
MOV RAX,qword ptr [R14 + 0xc0]
LAB_00136569:
LEA RCX,[RAX + 0x1]
MOV qword ptr [R14 + 0xc0],RCX
MOVZX EBP,byte ptr [RAX]
MOV RAX,RCX
LAB_0013657a:
CMP qword ptr [R14 + 0x10],0x0
JZ 0x0013659f
MOV RDI,qword ptr [R14 + 0x28]
CALL qword ptr [R14 + 0x20]
TEST EAX,EAX
JZ 0x001365ac
CMP dword ptr [R14 + 0x30],0x0
JZ 0x00136428
MOV RAX,qword ptr [R14 + 0xc0]
LAB_0013659f:
CMP RAX,qword ptr [R14 + 0xc8]
JNC 0x00136428
LAB_001365ac:
TEST BL,BL
JZ 0x00136428
OR R15D,EBP
TEST R13B,R13B
JZ 0x0013649a
JMP 0x001365d5
LAB_001365c2:
MOV R13B,0x1
JMP 0x001364e8
LAB_001365ca:
XOR EBX,EBX
JMP 0x00136522
LAB_001365d1:
XOR EBP,EBP
JMP 0x0013657a
LAB_001365d5:
MOV EAX,0x1
MOV RCX,qword ptr [RSP]
TEST RCX,RCX
JZ 0x0013643a
AND R15D,0x10
CMP R15D,0x1
MOV EDX,0x4
SBB EDX,0x0
MOV dword ptr [RCX],EDX
JMP 0x0013643a
|
/* stbi__pic_info(stbi__context*, int*, int*, int*) */
int8 stbi__pic_info(stbi__context *param_1,int *param_2,int *param_3,int *param_4)
{
int iVar1;
int iVar2;
long lVar3;
byte *pbVar4;
byte *pbVar5;
byte bVar6;
byte bVar7;
bool bVar8;
bool bVar9;
iVar1 = stbi__pic_is4(param_1,&DAT_0014f607);
if (iVar1 == 0) goto LAB_00136428;
if (*(long *)(param_1 + 0x10) == 0) {
lVar3 = *(long *)(param_1 + 0xc0);
LAB_001363a8:
*(long *)(param_1 + 0xc0) = lVar3 + 0x58;
}
else {
lVar3 = *(long *)(param_1 + 0xc0);
iVar1 = (int)*(int8 *)(param_1 + 200) - (int)lVar3;
if (0x57 < iVar1) goto LAB_001363a8;
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200);
(**(code **)(param_1 + 0x18))(*(int8 *)(param_1 + 0x28),0x58 - iVar1);
}
iVar1 = stbi__get16be(param_1);
if (param_2 != (int *)0x0) {
*param_2 = iVar1;
}
iVar2 = stbi__get16be(param_1);
if (param_3 != (int *)0x0) {
*param_3 = iVar2;
iVar2 = iVar1;
}
if (*(long *)(param_1 + 0x10) == 0) {
LAB_001363f4:
if (*(ulong *)(param_1 + 200) <= *(ulong *)(param_1 + 0xc0)) goto LAB_00136428;
}
else {
iVar1 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28));
if (iVar1 != 0) {
if (*(int *)(param_1 + 0x30) == 0) goto LAB_00136428;
goto LAB_001363f4;
}
}
iVar1 = iVar2;
if (param_2 != (int *)0x0) {
iVar1 = *param_2;
}
if (iVar1 != 0) {
if (param_3 != (int *)0x0) {
iVar2 = *param_3;
}
if ((int)(0x10000000 / (long)iVar1) < iVar2) {
LAB_00136428:
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0);
*(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8);
return 0;
}
}
if (*(long *)(param_1 + 0x10) == 0) {
lVar3 = *(long *)(param_1 + 0xc0);
}
else {
lVar3 = *(long *)(param_1 + 0xc0);
iVar1 = (int)*(int8 *)(param_1 + 200) - (int)lVar3;
if (iVar1 < 8) {
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200);
(**(code **)(param_1 + 0x18))(*(int8 *)(param_1 + 0x28),8 - iVar1);
goto LAB_00136491;
}
}
*(long *)(param_1 + 0xc0) = lVar3 + 8;
LAB_00136491:
iVar1 = 0xb;
bVar7 = 0;
do {
iVar1 = iVar1 + -1;
if (iVar1 == 0) {
return 0;
}
pbVar4 = *(byte **)(param_1 + 0xc0);
pbVar5 = *(byte **)(param_1 + 200);
if (pbVar4 < pbVar5) {
LAB_001364d3:
*(byte **)(param_1 + 0xc0) = pbVar4 + 1;
bVar8 = *pbVar4 == 0;
pbVar4 = pbVar4 + 1;
}
else {
if (*(int *)(param_1 + 0x30) != 0) {
stbi__refill_buffer(param_1);
pbVar4 = *(byte **)(param_1 + 0xc0);
pbVar5 = *(byte **)(param_1 + 200);
goto LAB_001364d3;
}
bVar8 = true;
}
if (pbVar4 < pbVar5) {
LAB_0013650e:
*(byte **)(param_1 + 0xc0) = pbVar4 + 1;
bVar9 = *pbVar4 == 8;
pbVar4 = pbVar4 + 1;
}
else {
if (*(int *)(param_1 + 0x30) != 0) {
stbi__refill_buffer(param_1);
pbVar4 = *(byte **)(param_1 + 0xc0);
pbVar5 = *(byte **)(param_1 + 200);
goto LAB_0013650e;
}
bVar9 = false;
}
if (pbVar4 < pbVar5) {
LAB_00136544:
pbVar4 = pbVar4 + 1;
*(byte **)(param_1 + 0xc0) = pbVar4;
}
else if (*(int *)(param_1 + 0x30) != 0) {
stbi__refill_buffer(param_1);
pbVar4 = *(byte **)(param_1 + 0xc0);
pbVar5 = *(byte **)(param_1 + 200);
goto LAB_00136544;
}
if (pbVar4 < pbVar5) {
LAB_00136569:
*(byte **)(param_1 + 0xc0) = pbVar4 + 1;
bVar6 = *pbVar4;
pbVar4 = pbVar4 + 1;
}
else {
if (*(int *)(param_1 + 0x30) != 0) {
stbi__refill_buffer(param_1);
pbVar4 = *(byte **)(param_1 + 0xc0);
goto LAB_00136569;
}
bVar6 = 0;
}
if (*(long *)(param_1 + 0x10) == 0) {
LAB_0013659f:
if (*(byte **)(param_1 + 200) <= pbVar4) goto LAB_00136428;
}
else {
iVar2 = (**(code **)(param_1 + 0x20))(*(int8 *)(param_1 + 0x28));
if (iVar2 != 0) {
if (*(int *)(param_1 + 0x30) != 0) {
pbVar4 = *(byte **)(param_1 + 0xc0);
goto LAB_0013659f;
}
goto LAB_00136428;
}
}
if (!bVar9) goto LAB_00136428;
bVar7 = bVar7 | bVar6;
if (bVar8) {
if (param_4 != (int *)0x0) {
*param_4 = 4 - (uint)((bVar7 & 0x10) == 0);
}
return 1;
}
} while( true );
}
| |
42,312 | is_small_allocation | seiftnesse[P]memoryallocator/src/custom_alloc_small.c | int is_small_allocation(void *ptr) {
// Ensure pointer is valid and within small pool bounds
if (!ptr) return 0;
// Calculate pointer addresses for bounds checking
uintptr_t ptr_addr = (uintptr_t) ptr;
uintptr_t pool_start = (uintptr_t) small_pool;
uintptr_t pool_end = pool_start + SMALL_POOL_SIZE;
int result = (ptr_addr >= pool_start && ptr_addr < pool_end);
HEAP_LOG("Checking if %p is small allocation: %s\n", ptr, result ? "yes" : "no");
return result;
} | O1 | c | is_small_allocation:
leaq 0x4b66a(%rip), %rax # 0x5cd60
cmpq %rax, %rdi
setae %cl
addq $0x100000, %rax # imm = 0x100000
cmpq %rax, %rdi
setb %al
andb %cl, %al
movzbl %al, %eax
retq
nop
| is_small_allocation:
lea rax, small_pool
cmp rdi, rax
setnb cl
add rax, 100000h
cmp rdi, rax
setb al
and al, cl
movzx eax, al
retn
| long long is_small_allocation(unsigned long long a1)
{
return (a1 >= (unsigned long long)&small_pool) & (unsigned __int8)(a1 < (unsigned long long)&small_pool + 0x100000);
}
| is_small_allocation:
LEA RAX,[0x15cd60]
CMP RDI,RAX
SETNC CL
ADD RAX,0x100000
CMP RDI,RAX
SETC AL
AND AL,CL
MOVZX EAX,AL
RET
|
bool is_small_allocation(int1 *param_1)
{
return param_1 < memory && (int1 *)0x15cd5f < param_1;
}
| |
42,313 | ma_bitmap_release_unused | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_bitmap_release_unused(MARIA_HA *info, MARIA_BITMAP_BLOCKS *blocks)
{
MARIA_BITMAP_BLOCK *block= blocks->block, *end= block + blocks->count;
MARIA_FILE_BITMAP *bitmap= &info->s->bitmap;
uint bits, current_bitmap_value;
DBUG_ENTER("_ma_bitmap_release_unused");
/*
We can skip FULL_HEAD_PAGE (4) as the page was marked as 'full'
when we allocated space in the page
*/
current_bitmap_value= FULL_HEAD_PAGE;
mysql_mutex_lock(&bitmap->bitmap_lock);
/* First handle head block */
if (block->used & BLOCKUSED_USED)
{
DBUG_PRINT("info", ("head page: %lu empty_space: %u",
(ulong) block->page, block->empty_space));
bits= _ma_free_size_to_head_pattern(bitmap, block->empty_space);
if (block->used & BLOCKUSED_USE_ORG_BITMAP)
current_bitmap_value= block->org_bitmap_value;
}
else
bits= block->org_bitmap_value;
if (bits != current_bitmap_value)
{
if (set_page_bits(info, bitmap, block->page, bits))
goto err;
}
else
{
DBUG_ASSERT(current_bitmap_value ==
bitmap_get_page_bits(info, bitmap, block->page));
}
/* Handle all full pages and tail pages (for head page and blob) */
for (block++; block < end; block++)
{
uint page_count;
if (!block->page_count)
continue; /* Skip 'filler blocks' */
page_count= block->page_count;
if (block->used & BLOCKUSED_TAIL)
{
current_bitmap_value= FULL_TAIL_PAGE;
/* The bitmap page is only one page */
page_count= 1;
if (block->used & BLOCKUSED_USED)
{
DBUG_PRINT("info", ("tail page: %lu empty_space: %u",
(ulong) block->page, block->empty_space));
bits= free_size_to_tail_pattern(bitmap, block->empty_space);
if (block->used & BLOCKUSED_USE_ORG_BITMAP)
current_bitmap_value= block->org_bitmap_value;
}
else
bits= block->org_bitmap_value;
/*
The page has all bits set; The following test is an optimization
to not set the bits to the same value as before.
*/
DBUG_ASSERT(current_bitmap_value ==
bitmap_get_page_bits(info, bitmap, block->page));
if (bits != current_bitmap_value)
{
if (set_page_bits(info, bitmap, block->page, bits))
goto err;
}
}
else if (!(block->used & BLOCKUSED_USED) &&
_ma_bitmap_reset_full_page_bits(info, bitmap,
block->page, page_count))
goto err;
}
/* This duplicates ma_bitmap_flushable(-1) except it already has mutex */
if (info->non_flushable_state)
{
DBUG_ASSERT(((int) (bitmap->non_flushable)) > 0);
info->non_flushable_state= 0;
if (--bitmap->non_flushable == 0)
{
_ma_bitmap_unpin_all(info->s);
if (unlikely(bitmap->waiting_for_non_flushable))
{
DBUG_PRINT("info", ("bitmap flushable waking up flusher"));
mysql_cond_broadcast(&bitmap->bitmap_cond);
}
}
}
DBUG_PRINT("info", ("bitmap->non_flushable: %u", bitmap->non_flushable));
mysql_mutex_unlock(&bitmap->bitmap_lock);
DBUG_RETURN(0);
err:
mysql_mutex_unlock(&bitmap->bitmap_lock);
DBUG_RETURN(1);
} | O3 | c | ma_bitmap_release_unused:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq (%rsi), %r13
movl 0x8(%rsi), %ebx
movq (%rdi), %r14
leaq 0xa98(%r14), %rdi
cmpq $0x0, 0xad8(%r14)
movq %rdi, -0x30(%rbp)
jne 0x544bf
callq 0x29200
movb 0x14(%r13), %dl
testb $0x1, %dl
jne 0x54330
movzbl 0x15(%r13), %ecx
movl $0x4, %eax
jmp 0x54379
movl 0xc(%r13), %esi
movl $0x4, %eax
movl $0x4, %ecx
cmpl %esi, 0xb24(%r14)
ja 0x5436f
movl $0x3, %ecx
cmpl %esi, 0xb20(%r14)
ja 0x5436f
movl $0x2, %ecx
cmpl %esi, 0xb1c(%r14)
ja 0x5436f
xorl %ecx, %ecx
cmpl %esi, 0xb18(%r14)
seta %cl
testb $0x2, %dl
je 0x54379
movzbl 0x15(%r13), %eax
leaq 0xa10(%r14), %r12
cmpl %eax, %ecx
je 0x543a8
movq (%r13), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x544f4
testb %al, %al
je 0x543a8
movq 0xad8(%r14), %rdi
movb $0x1, %bl
movb $0x1, %r14b
jmp 0x5449f
cmpl $0x2, %ebx
jb 0x54460
leaq (%rbx,%rbx,2), %rax
leaq (,%rax,8), %rbx
addq %r13, %rbx
addq $0x18, %r13
movl 0x8(%r13), %ecx
testl %ecx, %ecx
je 0x54453
movzbl 0x14(%r13), %eax
testb $0x4, %al
jne 0x543ee
testb $0x1, %al
jne 0x54453
movq (%r13), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x53f66
jmp 0x5444b
testb $0x1, %al
jne 0x543fe
movzbl 0x15(%r13), %ecx
movl $0x7, %edx
jmp 0x54438
movl 0xc(%r13), %edx
xorl %ecx, %ecx
cmpl %edx, 0xb18(%r14)
jbe 0x5442a
movl $0x7, %ecx
cmpl %edx, 0xb30(%r14)
ja 0x5442a
cmpl 0xb2c(%r14), %edx
movl $0x0, %ecx
adcl $0x5, %ecx
movl $0x7, %edx
testb $0x2, %al
je 0x54438
movzbl 0x15(%r13), %edx
cmpl %edx, %ecx
je 0x54453
movq (%r13), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x544f4
testb %al, %al
jne 0x54397
addq $0x18, %r13
cmpq %rbx, %r13
jb 0x543c4
cmpl $0x0, 0x644(%r15)
je 0x54490
movl $0x0, 0x644(%r15)
decl 0xa48(%r14)
jne 0x54490
movq (%r15), %rdi
callq 0x52c89
cmpl $0x0, 0xa4c(%r14)
jne 0x544ea
movq 0xad8(%r14), %rdi
xorl %ebx, %ebx
movl $0x0, %r14d
testq %rdi, %rdi
jne 0x544d5
movq -0x30(%rbp), %rdi
callq 0x291c0
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x86196(%rip), %rsi # 0xda65c
movl $0xaaf, %edx # imm = 0xAAF
callq 0x2eb6f
jmp 0x5431b
leaq 0x331b34(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
movl %ebx, %r14d
jmp 0x544a4
movq %r14, %rdi
callq 0x2c7a2
jmp 0x54490
| _ma_bitmap_release_unused:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdi
mov r13, [rsi]
mov ebx, [rsi+8]
mov r14, [rdi]
lea rdi, [r14+0A98h]
cmp qword ptr [r14+0AD8h], 0
mov [rbp+var_30], rdi
jnz loc_544BF
call _pthread_mutex_lock
loc_5431B:
mov dl, [r13+14h]
test dl, 1
jnz short loc_54330
movzx ecx, byte ptr [r13+15h]
mov eax, 4
jmp short loc_54379
loc_54330:
mov esi, [r13+0Ch]
mov eax, 4
mov ecx, 4
cmp [r14+0B24h], esi
ja short loc_5436F
mov ecx, 3
cmp [r14+0B20h], esi
ja short loc_5436F
mov ecx, 2
cmp [r14+0B1Ch], esi
ja short loc_5436F
xor ecx, ecx
cmp [r14+0B18h], esi
setnbe cl
loc_5436F:
test dl, 2
jz short loc_54379
movzx eax, byte ptr [r13+15h]
loc_54379:
lea r12, [r14+0A10h]
cmp ecx, eax
jz short loc_543A8
mov rdx, [r13+0]
mov rdi, r15
mov rsi, r12
call set_page_bits
test al, al
jz short loc_543A8
loc_54397:
mov rdi, [r14+0AD8h]
mov bl, 1
mov r14b, 1
jmp loc_5449F
loc_543A8:
cmp ebx, 2
jb loc_54460
lea rax, [rbx+rbx*2]
lea rbx, ds:0[rax*8]
add rbx, r13
add r13, 18h
loc_543C4:
mov ecx, [r13+8]
test ecx, ecx
jz loc_54453
movzx eax, byte ptr [r13+14h]
test al, 4
jnz short loc_543EE
test al, 1
jnz short loc_54453
mov rdx, [r13+0]
mov rdi, r15
mov rsi, r12
call _ma_bitmap_reset_full_page_bits
jmp short loc_5444B
loc_543EE:
test al, 1
jnz short loc_543FE
movzx ecx, byte ptr [r13+15h]
mov edx, 7
jmp short loc_54438
loc_543FE:
mov edx, [r13+0Ch]
xor ecx, ecx
cmp [r14+0B18h], edx
jbe short loc_5442A
mov ecx, 7
cmp [r14+0B30h], edx
ja short loc_5442A
cmp edx, [r14+0B2Ch]
mov ecx, 0
adc ecx, 5
loc_5442A:
mov edx, 7
test al, 2
jz short loc_54438
movzx edx, byte ptr [r13+15h]
loc_54438:
cmp ecx, edx
jz short loc_54453
mov rdx, [r13+0]
mov rdi, r15
mov rsi, r12
call set_page_bits
loc_5444B:
test al, al
jnz loc_54397
loc_54453:
add r13, 18h
cmp r13, rbx
jb loc_543C4
loc_54460:
cmp dword ptr [r15+644h], 0
jz short loc_54490
mov dword ptr [r15+644h], 0
dec dword ptr [r14+0A48h]
jnz short loc_54490
mov rdi, [r15]
call _ma_bitmap_unpin_all
cmp dword ptr [r14+0A4Ch], 0
jnz short loc_544EA
loc_54490:
mov rdi, [r14+0AD8h]
xor ebx, ebx
mov r14d, 0
loc_5449F:
test rdi, rdi
jnz short loc_544D5
loc_544A4:
mov rdi, [rbp+var_30]
call _pthread_mutex_unlock
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_544BF:
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0AAFh
call psi_mutex_lock
jmp loc_5431B
loc_544D5:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
mov r14d, ebx
jmp short loc_544A4
loc_544EA:
mov rdi, r14
call _ma_bitmap_release_unused_cold_1
jmp short loc_54490
| long long ma_bitmap_release_unused(long long a1, long long *a2)
{
long long v3; // r13
unsigned long long v4; // rbx
long long v5; // r14
long long v6; // rdi
char v7; // dl
int v8; // ecx
int v9; // eax
unsigned int v10; // esi
long long v11; // rdi
unsigned long long *i; // r13
int v13; // ecx
char v14; // al
char v15; // al
int v16; // ecx
int v17; // edx
unsigned int v18; // edx
long long v21; // [rsp+0h] [rbp-30h]
v3 = *a2;
v4 = *((unsigned int *)a2 + 2);
v5 = *(_QWORD *)a1;
v6 = *(_QWORD *)a1 + 2712LL;
v21 = v6;
if ( *(_QWORD *)(v5 + 2776) )
psi_mutex_lock(v6, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0xAAFu);
else
pthread_mutex_lock(v6);
v7 = *(_BYTE *)(v3 + 20);
if ( (v7 & 1) != 0 )
{
v10 = *(_DWORD *)(v3 + 12);
v9 = 4;
v8 = 4;
if ( *(_DWORD *)(v5 + 2852) <= v10 )
{
v8 = 3;
if ( *(_DWORD *)(v5 + 2848) <= v10 )
{
v8 = 2;
if ( *(_DWORD *)(v5 + 2844) <= v10 )
v8 = *(_DWORD *)(v5 + 2840) > v10;
}
}
if ( (v7 & 2) != 0 )
v9 = *(unsigned __int8 *)(v3 + 21);
}
else
{
v8 = *(unsigned __int8 *)(v3 + 21);
v9 = 4;
}
if ( v8 != v9 && (unsigned __int8)set_page_bits(a1, v5 + 2576, *(_QWORD *)v3) )
{
LABEL_13:
v11 = *(_QWORD *)(v5 + 2776);
LOBYTE(v4) = 1;
LOBYTE(v5) = 1;
goto LABEL_36;
}
if ( (unsigned int)v4 >= 2 )
{
v4 = v3 + 24 * v4;
for ( i = (unsigned long long *)(v3 + 24); (unsigned long long)i < v4; i += 3 )
{
v13 = *((_DWORD *)i + 2);
if ( v13 )
{
v14 = *((_BYTE *)i + 20);
if ( (v14 & 4) != 0 )
{
if ( (v14 & 1) != 0 )
{
v18 = *((_DWORD *)i + 3);
v16 = 0;
if ( *(_DWORD *)(v5 + 2840) > v18 )
{
v16 = 7;
if ( *(_DWORD *)(v5 + 2864) <= v18 )
v16 = (v18 < *(_DWORD *)(v5 + 2860)) + 5;
}
v17 = 7;
if ( (v14 & 2) != 0 )
v17 = *((unsigned __int8 *)i + 21);
}
else
{
v16 = *((unsigned __int8 *)i + 21);
v17 = 7;
}
if ( v16 != v17 )
{
v15 = set_page_bits(a1, v5 + 2576, *i);
LABEL_29:
if ( v15 )
goto LABEL_13;
}
}
else if ( (v14 & 1) == 0 )
{
v15 = ma_bitmap_reset_full_page_bits((long long *)a1, v5 + 2576, *i, v13);
goto LABEL_29;
}
}
}
}
if ( *(_DWORD *)(a1 + 1604) )
{
*(_DWORD *)(a1 + 1604) = 0;
if ( (*(_DWORD *)(v5 + 2632))-- == 1 )
{
ma_bitmap_unpin_all(*(_QWORD *)a1);
if ( *(_DWORD *)(v5 + 2636) )
ma_bitmap_release_unused_cold_1(v5);
}
}
v11 = *(_QWORD *)(v5 + 2776);
LODWORD(v4) = 0;
LODWORD(v5) = 0;
LABEL_36:
if ( v11 )
{
((void ( *)(long long))PSI_server[44])(v11);
LODWORD(v5) = v4;
}
pthread_mutex_unlock(v21);
return (unsigned int)v5;
}
| _ma_bitmap_release_unused:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDI
MOV R13,qword ptr [RSI]
MOV EBX,dword ptr [RSI + 0x8]
MOV R14,qword ptr [RDI]
LEA RDI,[R14 + 0xa98]
CMP qword ptr [R14 + 0xad8],0x0
MOV qword ptr [RBP + -0x30],RDI
JNZ 0x001544bf
CALL 0x00129200
LAB_0015431b:
MOV DL,byte ptr [R13 + 0x14]
TEST DL,0x1
JNZ 0x00154330
MOVZX ECX,byte ptr [R13 + 0x15]
MOV EAX,0x4
JMP 0x00154379
LAB_00154330:
MOV ESI,dword ptr [R13 + 0xc]
MOV EAX,0x4
MOV ECX,0x4
CMP dword ptr [R14 + 0xb24],ESI
JA 0x0015436f
MOV ECX,0x3
CMP dword ptr [R14 + 0xb20],ESI
JA 0x0015436f
MOV ECX,0x2
CMP dword ptr [R14 + 0xb1c],ESI
JA 0x0015436f
XOR ECX,ECX
CMP dword ptr [R14 + 0xb18],ESI
SETA CL
LAB_0015436f:
TEST DL,0x2
JZ 0x00154379
MOVZX EAX,byte ptr [R13 + 0x15]
LAB_00154379:
LEA R12,[R14 + 0xa10]
CMP ECX,EAX
JZ 0x001543a8
MOV RDX,qword ptr [R13]
MOV RDI,R15
MOV RSI,R12
CALL 0x001544f4
TEST AL,AL
JZ 0x001543a8
LAB_00154397:
MOV RDI,qword ptr [R14 + 0xad8]
MOV BL,0x1
MOV R14B,0x1
JMP 0x0015449f
LAB_001543a8:
CMP EBX,0x2
JC 0x00154460
LEA RAX,[RBX + RBX*0x2]
LEA RBX,[RAX*0x8]
ADD RBX,R13
ADD R13,0x18
LAB_001543c4:
MOV ECX,dword ptr [R13 + 0x8]
TEST ECX,ECX
JZ 0x00154453
MOVZX EAX,byte ptr [R13 + 0x14]
TEST AL,0x4
JNZ 0x001543ee
TEST AL,0x1
JNZ 0x00154453
MOV RDX,qword ptr [R13]
MOV RDI,R15
MOV RSI,R12
CALL 0x00153f66
JMP 0x0015444b
LAB_001543ee:
TEST AL,0x1
JNZ 0x001543fe
MOVZX ECX,byte ptr [R13 + 0x15]
MOV EDX,0x7
JMP 0x00154438
LAB_001543fe:
MOV EDX,dword ptr [R13 + 0xc]
XOR ECX,ECX
CMP dword ptr [R14 + 0xb18],EDX
JBE 0x0015442a
MOV ECX,0x7
CMP dword ptr [R14 + 0xb30],EDX
JA 0x0015442a
CMP EDX,dword ptr [R14 + 0xb2c]
MOV ECX,0x0
ADC ECX,0x5
LAB_0015442a:
MOV EDX,0x7
TEST AL,0x2
JZ 0x00154438
MOVZX EDX,byte ptr [R13 + 0x15]
LAB_00154438:
CMP ECX,EDX
JZ 0x00154453
MOV RDX,qword ptr [R13]
MOV RDI,R15
MOV RSI,R12
CALL 0x001544f4
LAB_0015444b:
TEST AL,AL
JNZ 0x00154397
LAB_00154453:
ADD R13,0x18
CMP R13,RBX
JC 0x001543c4
LAB_00154460:
CMP dword ptr [R15 + 0x644],0x0
JZ 0x00154490
MOV dword ptr [R15 + 0x644],0x0
DEC dword ptr [R14 + 0xa48]
JNZ 0x00154490
MOV RDI,qword ptr [R15]
CALL 0x00152c89
CMP dword ptr [R14 + 0xa4c],0x0
JNZ 0x001544ea
LAB_00154490:
MOV RDI,qword ptr [R14 + 0xad8]
XOR EBX,EBX
MOV R14D,0x0
LAB_0015449f:
TEST RDI,RDI
JNZ 0x001544d5
LAB_001544a4:
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001291c0
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001544bf:
LEA RSI,[0x1da65c]
MOV EDX,0xaaf
CALL 0x0012eb6f
JMP 0x0015431b
LAB_001544d5:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
MOV R14D,EBX
JMP 0x001544a4
LAB_001544ea:
MOV RDI,R14
CALL 0x0012c7a2
JMP 0x00154490
|
ulong _ma_bitmap_release_unused(long *param_1,long *param_2)
{
pthread_mutex_t *__mutex;
int *piVar1;
byte bVar2;
uint uVar3;
long lVar4;
char cVar5;
char cVar6;
uint uVar7;
int8 *puVar8;
long lVar9;
int8 *puVar10;
ulong uVar11;
puVar10 = (int8 *)*param_2;
uVar7 = *(uint *)(param_2 + 1);
puVar8 = (int8 *)(ulong)uVar7;
lVar4 = *param_1;
__mutex = (pthread_mutex_t *)(lVar4 + 0xa98);
if (*(long *)(lVar4 + 0xad8) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c",
0xaaf);
}
if ((*(byte *)((long)puVar10 + 0x14) & 1) == 0) {
cVar6 = *(char *)((long)puVar10 + 0x15);
cVar5 = '\x04';
}
else {
uVar3 = *(uint *)((long)puVar10 + 0xc);
cVar5 = '\x04';
cVar6 = '\x04';
if (((*(uint *)(lVar4 + 0xb24) <= uVar3) && (cVar6 = '\x03', *(uint *)(lVar4 + 0xb20) <= uVar3))
&& (cVar6 = '\x02', *(uint *)(lVar4 + 0xb1c) <= uVar3)) {
cVar6 = uVar3 < *(uint *)(lVar4 + 0xb18);
}
if ((*(byte *)((long)puVar10 + 0x14) & 2) != 0) {
cVar5 = *(char *)((long)puVar10 + 0x15);
}
}
lVar9 = lVar4 + 0xa10;
if (cVar6 != cVar5) {
cVar6 = set_page_bits(param_1,lVar9,*puVar10);
if (cVar6 != '\0') {
LAB_00154397:
lVar9 = *(long *)(lVar4 + 0xad8);
uVar7 = (uint)CONCAT71((int7)((ulong)puVar8 >> 8),1);
uVar11 = CONCAT71((int7)((ulong)lVar4 >> 8),1);
goto LAB_0015449f;
}
}
if (1 < uVar7) {
puVar8 = puVar10 + (long)puVar8 * 3;
puVar10 = puVar10 + 3;
do {
if (*(int *)(puVar10 + 1) != 0) {
bVar2 = *(byte *)((long)puVar10 + 0x14);
if ((bVar2 & 4) == 0) {
if ((bVar2 & 1) == 0) {
cVar6 = _ma_bitmap_reset_full_page_bits(param_1,lVar9,*puVar10);
LAB_0015444b:
if (cVar6 != '\0') goto LAB_00154397;
}
}
else {
if ((bVar2 & 1) == 0) {
cVar6 = *(char *)((long)puVar10 + 0x15);
cVar5 = '\a';
}
else {
uVar7 = *(uint *)((long)puVar10 + 0xc);
cVar6 = '\0';
if ((uVar7 < *(uint *)(lVar4 + 0xb18)) &&
(cVar6 = '\a', *(uint *)(lVar4 + 0xb30) <= uVar7)) {
cVar6 = (uVar7 < *(uint *)(lVar4 + 0xb2c)) + '\x05';
}
cVar5 = '\a';
if ((bVar2 & 2) != 0) {
cVar5 = *(char *)((long)puVar10 + 0x15);
}
}
if (cVar6 != cVar5) {
cVar6 = set_page_bits(param_1,lVar9,*puVar10);
goto LAB_0015444b;
}
}
}
puVar10 = puVar10 + 3;
} while (puVar10 < puVar8);
}
if (*(int *)((long)param_1 + 0x644) != 0) {
*(int4 *)((long)param_1 + 0x644) = 0;
piVar1 = (int *)(lVar4 + 0xa48);
*piVar1 = *piVar1 + -1;
if (*piVar1 == 0) {
_ma_bitmap_unpin_all(*param_1);
if (*(int *)(lVar4 + 0xa4c) != 0) {
_ma_bitmap_release_unused_cold_1(lVar4);
}
}
}
lVar9 = *(long *)(lVar4 + 0xad8);
uVar7 = 0;
uVar11 = 0;
LAB_0015449f:
if (lVar9 != 0) {
(**(code **)(PSI_server + 0x160))();
uVar11 = (ulong)uVar7;
}
pthread_mutex_unlock(__mutex);
return uVar11 & 0xffffffff;
}
| |
42,314 | inline_mysql_cond_destroy | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_destroy(
mysql_cond_t *that)
{
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
{
PSI_COND_CALL(destroy_cond)(that->m_psi);
that->m_psi= NULL;
}
#endif
return pthread_cond_destroy(&that->m_cond);
} | O0 | c | inline_mysql_cond_destroy:
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 0xf5f24
leaq 0x1ca1b1(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x68(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rdi
callq 0x2a280
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_cond_destroy_4:
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_F5F24
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+68h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
mov rax, [rbp+var_8]
mov qword ptr [rax+30h], 0
loc_F5F24:
mov rdi, [rbp+var_8]
call _pthread_cond_destroy
add rsp, 10h
pop rbp
retn
| long long inline_mysql_cond_destroy_4(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
{
((void ( *)(_QWORD))PSI_server[13])(*(_QWORD *)(a1 + 48));
*(_QWORD *)(a1 + 48) = 0LL;
}
return pthread_cond_destroy(a1);
}
| inline_mysql_cond_destroy:
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 0x001f5f24
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x30],0x0
LAB_001f5f24:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a280
ADD RSP,0x10
POP RBP
RET
|
void inline_mysql_cond_destroy(pthread_cond_t *param_1)
{
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x68))(param_1[1].__align);
param_1[1].__align = 0;
}
pthread_cond_destroy(param_1);
return;
}
| |
42,315 | ma_SHA1Decode | eloqsql/libmariadb/libmariadb/ma_sha1.c | static void ma_SHA1Decode(uint32 *output, const unsigned char * input, unsigned int len)
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
output[i] = ((uint32) input[j + 3]) | (((uint32) input[j + 2]) << 8) |
(((uint32) input[j + 1]) << 16) | (((uint32) input[j]) << 24);
} | O0 | c | ma_SHA1Decode:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x6e4ed
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
orl %eax, %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x10, %eax
orl %eax, %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
orl %eax, %edx
movq -0x8(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6e47d
popq %rbp
retq
nop
| ma_SHA1Decode:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], 0
mov [rbp+var_1C], 0
loc_6E47D:
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_14]
jnb short loc_6E4ED
mov rax, [rbp+var_10]
mov ecx, [rbp+var_1C]
add ecx, 3
mov ecx, ecx
movzx edx, byte ptr [rax+rcx]
mov rax, [rbp+var_10]
mov ecx, [rbp+var_1C]
add ecx, 2
mov ecx, ecx
movzx eax, byte ptr [rax+rcx]
shl eax, 8
or edx, eax
mov rax, [rbp+var_10]
mov ecx, [rbp+var_1C]
add ecx, 1
mov ecx, ecx
movzx eax, byte ptr [rax+rcx]
shl eax, 10h
or edx, eax
mov rax, [rbp+var_10]
mov ecx, [rbp+var_1C]
movzx eax, byte ptr [rax+rcx]
shl eax, 18h
or edx, eax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_18]
mov [rax+rcx*4], edx
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
mov eax, [rbp+var_1C]
add eax, 4
mov [rbp+var_1C], eax
jmp short loc_6E47D
loc_6E4ED:
pop rbp
retn
| long long ma_SHA1Decode(long long a1, long long a2, unsigned int a3)
{
long long result; // rax
unsigned int i; // [rsp+0h] [rbp-1Ch]
unsigned int v5; // [rsp+4h] [rbp-18h]
v5 = 0;
for ( i = 0; ; i += 4 )
{
result = i;
if ( i >= a3 )
break;
*(_DWORD *)(a1 + 4LL * v5++) = (*(unsigned __int8 *)(a2 + i) << 24) | (*(unsigned __int8 *)(a2 + i + 1) << 16) | (*(unsigned __int8 *)(a2 + i + 2) << 8) | *(unsigned __int8 *)(a2 + i + 3);
}
return result;
}
| ma_SHA1Decode:
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],0x0
MOV dword ptr [RBP + -0x1c],0x0
LAB_0016e47d:
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x14]
JNC 0x0016e4ed
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x3
MOV ECX,ECX
MOVZX EDX,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x2
MOV ECX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SHL EAX,0x8
OR EDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x1
MOV ECX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SHL EAX,0x10
OR EDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SHL EAX,0x18
OR EDX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x18]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x4
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0016e47d
LAB_0016e4ed:
POP RBP
RET
|
void ma_SHA1Decode(long param_1,long param_2,uint param_3)
{
int4 local_24;
int4 local_20;
local_20 = 0;
for (local_24 = 0; local_24 < param_3; local_24 = local_24 + 4) {
*(uint *)(param_1 + (ulong)local_20 * 4) =
CONCAT13(*(int1 *)(param_2 + (ulong)local_24),
CONCAT12(*(int1 *)(param_2 + (ulong)(local_24 + 1)),
CONCAT11(*(int1 *)(param_2 + (ulong)(local_24 + 2)),
*(int1 *)(param_2 + (ulong)(local_24 + 3)))));
local_20 = local_20 + 1;
}
return;
}
| |
42,316 | verify_merkle_proof | corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_logs_proof.c | static bool verify_merkle_proof(verify_ctx_t* ctx, ssz_ob_t block, bytes32_t receipt_root) {
ssz_ob_t txs = ssz_get(&block, "txs");
int tx_count = ssz_len(txs);
uint8_t* leafes = safe_calloc(3 + tx_count, 32);
gindex_t* gindexes = safe_calloc(3 + tx_count, sizeof(gindex_t));
bytes_t block_number = ssz_get(&block, "blockNumber").bytes;
bytes_t block_hash = ssz_get(&block, "blockHash").bytes;
ssz_ob_t header = ssz_get(&block, "header");
ssz_ob_t proof = ssz_get(&block, "proof");
bytes32_t root_hash = {0}; // calculated body root hash
bytes_t body_root = ssz_get(&header, "bodyRoot").bytes;
// copy data to leafes and gindexes
memcpy(leafes, block_number.data, block_number.len);
memcpy(leafes + 32, block_hash.data, block_hash.len);
memcpy(leafes + 64, receipt_root, 32);
gindexes[0] = GINDEX_BLOCKUMBER;
gindexes[1] = GINDEX_BLOCHASH;
gindexes[2] = GINDEX_RECEIPT_ROOT;
for (int i = 0; i < tx_count; i++) {
ssz_ob_t tx = ssz_at(txs, i);
ssz_hash_tree_root(ssz_get(&tx, "transaction"), leafes + 96 + 32 * i);
gindexes[3 + i] = GINDEX_TXINDEX_G + ssz_get_uint64(&tx, "transactionIndex");
}
bool merkle_proof_match = ssz_verify_multi_merkle_proof(proof.bytes, bytes(leafes, (3 + tx_count) * 32), gindexes, root_hash);
safe_free(leafes);
safe_free(gindexes);
if (!merkle_proof_match)
RETURN_VERIFY_ERROR(ctx, "invalid tx proof, missing nodes!");
if (memcmp(root_hash, body_root.data, 32) != 0) RETURN_VERIFY_ERROR(ctx, "invalid tx proof, body root mismatch!");
return true;
} | O0 | c | verify_merkle_proof:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp # imm = 0x190
movq %rsi, %rax
leaq 0x10(%rbp), %rsi
movq %rsi, -0x170(%rbp)
movq %rdi, -0x10(%rbp)
movq %rax, -0x18(%rbp)
leaq -0x30(%rbp), %rdi
leaq 0xb0e1c(%rip), %rdx # 0xda758
callq 0xa05c0
leaq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x9f1e0
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addl $0x3, %eax
movslq %eax, %rdi
movl $0x20, %esi
callq 0x9c480
movq %rax, -0x40(%rbp)
movl -0x34(%rbp), %eax
addl $0x3, %eax
movslq %eax, %rdi
movl $0x8, %esi
callq 0x9c480
movq -0x170(%rbp), %rsi
movq %rax, -0x48(%rbp)
leaq -0x70(%rbp), %rdi
leaq 0xb0a84(%rip), %rdx # 0xda42a
callq 0xa05c0
movq -0x170(%rbp), %rsi
movq -0x70(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x98(%rbp), %rdi
leaq 0xb0d3b(%rip), %rdx # 0xda70b
callq 0xa05c0
movq -0x170(%rbp), %rsi
movq -0x98(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0xb0(%rbp), %rdi
leaq 0xb1cd0(%rip), %rdx # 0xdb6d0
callq 0xa05c0
movq -0x170(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
leaq 0xb079e(%rip), %rdx # 0xda1b8
callq 0xa05c0
leaq -0xf0(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x23140
leaq -0x118(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq 0xb0fde(%rip), %rdx # 0xdaa25
callq 0xa05c0
movq -0x118(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl -0x58(%rbp), %eax
movl %eax, %edx
callq 0x231c0
movq -0x40(%rbp), %rdi
addq $0x20, %rdi
movq -0x78(%rbp), %rsi
movl -0x80(%rbp), %eax
movl %eax, %edx
callq 0x231c0
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x40(%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x48(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x50(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x58(%rax)
movq -0x48(%rbp), %rax
movq $0x326, (%rax) # imm = 0x326
movq -0x48(%rbp), %rax
movq $0x32c, 0x8(%rax) # imm = 0x32C
movq -0x48(%rbp), %rax
movq $0x323, 0x10(%rax) # imm = 0x323
movl $0x0, -0x11c(%rbp)
movl -0x11c(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x29bbc
movl -0x11c(%rbp), %esi
leaq -0x138(%rbp), %rdi
leaq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x9ef30
leaq -0x150(%rbp), %rdi
leaq -0x138(%rbp), %rsi
leaq 0xb1523(%rip), %rdx # 0xdb05a
callq 0xa05c0
movq -0x40(%rbp), %rdi
addq $0x60, %rdi
movl -0x11c(%rbp), %eax
shll $0x5, %eax
cltq
addq %rax, %rdi
leaq -0x150(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa0a50
leaq -0x138(%rbp), %rdi
leaq 0xb0b90(%rip), %rsi # 0xda715
callq 0x29ce0
movq %rax, %rdx
addq $0x65a00000, %rdx # imm = 0x65A00000
movq -0x48(%rbp), %rax
movl -0x11c(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x11c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x11c(%rbp)
jmp 0x29ae4
movl -0x34(%rbp), %eax
addl $0x3, %eax
shll $0x5, %eax
movl %eax, -0x168(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x48(%rbp), %r8
leaq -0xf0(%rbp), %r9
movl -0xc8(%rbp), %edi
movq -0xc0(%rbp), %rsi
movl -0x168(%rbp), %edx
movq -0x160(%rbp), %rcx
callq 0xa10c0
andb $0x1, %al
movb %al, -0x151(%rbp)
movq -0x40(%rbp), %rdi
callq 0x9c5a0
movq -0x48(%rbp), %rdi
callq 0x9c5a0
testb $0x1, -0x151(%rbp)
jne 0x29c47
jmp 0x29c25
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
leaq 0xb1290(%rip), %rsi # 0xdaec4
callq 0xa6370
movq -0x10(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x29c8c
leaq -0xf0(%rbp), %rdi
movq -0xf8(%rbp), %rsi
movl $0x20, %edx
callq 0x23100
cmpl $0x0, %eax
je 0x29c88
jmp 0x29c66
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
leaq 0xb1270(%rip), %rsi # 0xdaee5
callq 0xa6370
movq -0x10(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x29c8c
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x190, %rsp # imm = 0x190
popq %rbp
retq
nopw (%rax,%rax)
| verify_merkle_proof_1:
push rbp
mov rbp, rsp
sub rsp, 190h
mov rax, rsi
lea rsi, [rbp+arg_0]
mov [rbp+var_170], rsi
mov [rbp+var_10], rdi
mov [rbp+var_18], rax
lea rdi, [rbp+var_30]
lea rdx, aTxs; "txs"
call ssz_get
lea rax, [rbp+var_30]
mov rcx, [rax]
mov [rsp+190h+var_190], rcx
mov rcx, [rax+8]
mov [rsp+190h+var_188], rcx
mov rax, [rax+10h]
mov [rsp+190h+var_180], rax
call ssz_len
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
add eax, 3
movsxd rdi, eax
mov esi, 20h ; ' '
call safe_calloc
mov [rbp+var_40], rax
mov eax, [rbp+var_34]
add eax, 3
movsxd rdi, eax
mov esi, 8
call safe_calloc
mov rsi, [rbp+var_170]
mov [rbp+var_48], rax
lea rdi, [rbp+var_70]
lea rdx, aEthBlocknumber+4; "blockNumber"
call ssz_get
mov rsi, [rbp+var_170]
mov rax, [rbp+var_70]
mov [rbp+var_58], rax
mov rax, [rbp+var_68]
mov [rbp+var_50], rax
lea rdi, [rbp+var_98]
lea rdx, aBlockhash; "blockHash"
call ssz_get
mov rsi, [rbp+var_170]
mov rax, [rbp+var_98]
mov [rbp+var_80], rax
mov rax, [rbp+var_90]
mov [rbp+var_78], rax
lea rdi, [rbp+var_B0]
lea rdx, aInvalidRespons+15h; "header"
call ssz_get
mov rsi, [rbp+var_170]
lea rdi, [rbp+var_C8]
lea rdx, aChainTypeDoesN+1Eh; "proof"
call ssz_get
lea rdi, [rbp+var_F0]
xor esi, esi
mov edx, 20h ; ' '
call _memset
lea rdi, [rbp+var_118]
lea rsi, [rbp+var_B0]
lea rdx, aBodyroot; "bodyRoot"
call ssz_get
mov rax, [rbp+var_118]
mov [rbp+var_100], rax
mov rax, [rbp+var_110]
mov [rbp+var_F8], rax
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_50]
mov eax, dword ptr [rbp+var_58]
mov edx, eax
call _memcpy
mov rdi, [rbp+var_40]
add rdi, 20h ; ' '
mov rsi, [rbp+var_78]
mov eax, dword ptr [rbp+var_80]
mov edx, eax
call _memcpy
mov rax, [rbp+var_40]
mov rcx, [rbp+var_18]
mov rdx, [rcx]
mov [rax+40h], rdx
mov rdx, [rcx+8]
mov [rax+48h], rdx
mov rdx, [rcx+10h]
mov [rax+50h], rdx
mov rcx, [rcx+18h]
mov [rax+58h], rcx
mov rax, [rbp+var_48]
mov qword ptr [rax], 326h
mov rax, [rbp+var_48]
mov qword ptr [rax+8], 32Ch
mov rax, [rbp+var_48]
mov qword ptr [rax+10h], 323h
mov [rbp+var_11C], 0
loc_29AE4:
mov eax, [rbp+var_11C]
cmp eax, [rbp+var_34]
jge loc_29BBC
mov esi, [rbp+var_11C]
lea rdi, [rbp+var_138]
lea rax, [rbp+var_30]
mov rcx, [rax]
mov [rsp+190h+var_190], rcx
mov rcx, [rax+8]
mov [rsp+190h+var_188], rcx
mov rax, [rax+10h]
mov [rsp+190h+var_180], rax
call ssz_at
lea rdi, [rbp+var_150]
lea rsi, [rbp+var_138]
lea rdx, aInvalidTransac+8; "transaction"
call ssz_get
mov rdi, [rbp+var_40]
add rdi, 60h ; '`'
mov eax, [rbp+var_11C]
shl eax, 5
cdqe
add rdi, rax
lea rax, [rbp+var_150]
mov rcx, [rax]
mov [rsp+190h+var_190], rcx
mov rcx, [rax+8]
mov [rsp+190h+var_188], rcx
mov rax, [rax+10h]
mov [rsp+190h+var_180], rax
call ssz_hash_tree_root
lea rdi, [rbp+var_138]
lea rsi, aTransactionind; "transactionIndex"
call ssz_get_uint64_1
mov rdx, rax
add rdx, 65A00000h
mov rax, [rbp+var_48]
mov ecx, [rbp+var_11C]
add ecx, 3
movsxd rcx, ecx
mov [rax+rcx*8], rdx
mov eax, [rbp+var_11C]
add eax, 1
mov [rbp+var_11C], eax
jmp loc_29AE4
loc_29BBC:
mov eax, [rbp+var_34]
add eax, 3
shl eax, 5
mov [rbp+var_168], eax
mov rax, [rbp+var_40]
mov [rbp+var_160], rax
mov r8, [rbp+var_48]
lea r9, [rbp+var_F0]
mov edi, [rbp+var_C8]
mov rsi, [rbp+var_C0]
mov edx, [rbp+var_168]
mov rcx, [rbp+var_160]
call ssz_verify_multi_merkle_proof
and al, 1
mov [rbp+var_151], al
mov rdi, [rbp+var_40]
call safe_free
mov rdi, [rbp+var_48]
call safe_free
test [rbp+var_151], 1
jnz short loc_29C47
jmp short $+2
loc_29C25:
mov rdi, [rbp+var_10]
add rdi, 70h ; 'p'
lea rsi, aInvalidTxProof_0; "invalid tx proof, missing nodes!"
call c4_state_add_error
mov rax, [rbp+var_10]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp short loc_29C8C
loc_29C47:
lea rdi, [rbp+var_F0]
mov rsi, [rbp+var_F8]
mov edx, 20h ; ' '
call _memcmp
cmp eax, 0
jz short loc_29C88
jmp short $+2
loc_29C66:
mov rdi, [rbp+var_10]
add rdi, 70h ; 'p'
lea rsi, aInvalidTxProof_1; "invalid tx proof, body root mismatch!"
call c4_state_add_error
mov rax, [rbp+var_10]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp short loc_29C8C
loc_29C88:
mov [rbp+var_1], 1
loc_29C8C:
mov al, [rbp+var_1]
and al, 1
add rsp, 190h
pop rbp
retn
| char verify_merkle_proof_1(long long a1, _QWORD *a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, char a7)
{
int v7; // edx
int v8; // r8d
int v9; // r9d
int v10; // r8d
int v11; // r9d
_QWORD *v12; // rax
_QWORD *v13; // rcx
long long v14; // rdx
int v15; // edx
int v16; // r8d
int v17; // r9d
char v19; // [rsp+3Fh] [rbp-151h]
long long v20; // [rsp+40h] [rbp-150h] BYREF
long long v21; // [rsp+48h] [rbp-148h]
long long v22; // [rsp+50h] [rbp-140h]
_BYTE v23[28]; // [rsp+58h] [rbp-138h] BYREF
int i; // [rsp+74h] [rbp-11Ch]
_QWORD v25[4]; // [rsp+78h] [rbp-118h] BYREF
long long v26; // [rsp+98h] [rbp-F8h]
_BYTE v27[40]; // [rsp+A0h] [rbp-F0h] BYREF
unsigned int v28; // [rsp+C8h] [rbp-C8h] BYREF
long long v29; // [rsp+D0h] [rbp-C0h]
_BYTE v30[24]; // [rsp+E0h] [rbp-B0h] BYREF
_QWORD v31[3]; // [rsp+F8h] [rbp-98h] BYREF
long long v32; // [rsp+110h] [rbp-80h]
long long v33; // [rsp+118h] [rbp-78h]
_QWORD v34[3]; // [rsp+120h] [rbp-70h] BYREF
long long v35; // [rsp+138h] [rbp-58h]
long long v36; // [rsp+140h] [rbp-50h]
_QWORD *v37; // [rsp+148h] [rbp-48h]
long long v38; // [rsp+150h] [rbp-40h]
int v39; // [rsp+15Ch] [rbp-34h]
long long v40; // [rsp+160h] [rbp-30h] BYREF
long long v41; // [rsp+168h] [rbp-28h]
long long v42; // [rsp+170h] [rbp-20h]
_QWORD *v43; // [rsp+178h] [rbp-18h]
long long v44; // [rsp+180h] [rbp-10h]
v44 = a1;
v43 = a2;
ssz_get(&v40, &a7, "txs");
v39 = ssz_len((unsigned int)&v40, (unsigned int)&a7, v7, v41, v8, v9, v40, v41, v42);
v38 = safe_calloc(v39 + 3, 32LL);
v37 = (_QWORD *)safe_calloc(v39 + 3, 8LL);
ssz_get(v34, &a7, "blockNumber");
v35 = v34[0];
v36 = v34[1];
ssz_get(v31, &a7, "blockHash");
v32 = v31[0];
v33 = v31[1];
ssz_get(v30, &a7, "header");
ssz_get(&v28, &a7, "proof");
memset(v27, 0LL, 32LL);
ssz_get(v25, v30, "bodyRoot");
v25[3] = v25[0];
v26 = v25[1];
memcpy(v38, v36, (unsigned int)v35);
memcpy(v38 + 32, v33, (unsigned int)v32);
v12 = (_QWORD *)v38;
v13 = v43;
*(_QWORD *)(v38 + 64) = *v43;
v12[9] = v13[1];
v14 = v13[2];
v12[10] = v14;
v12[11] = v13[3];
*v37 = 806LL;
v37[1] = 812LL;
v37[2] = 803LL;
for ( i = 0; i < v39; ++i )
{
ssz_at((unsigned int)v23, i, v14, v41, v10, v11, v40, v41, v42);
ssz_get(&v20, v23, "transaction");
ssz_hash_tree_root(32 * i + v38 + 96, (unsigned int)v23, v15, v21, v16, v17, v20, v21, v22);
v14 = ssz_get_uint64_1(v23, "transactionIndex") + 1704984576;
v37[i + 3] = v14;
}
v19 = ssz_verify_multi_merkle_proof(v28, v29, (unsigned int)(32 * (v39 + 3)), v38, v37, v27) & 1;
safe_free(v38);
safe_free(v37);
if ( (v19 & 1) != 0 )
{
if ( !(unsigned int)memcmp(v27, v26, 32LL) )
{
return 1;
}
else
{
c4_state_add_error(v44 + 112, "invalid tx proof, body root mismatch!");
*(_BYTE *)(v44 + 104) = 0;
return 0;
}
}
else
{
c4_state_add_error(v44 + 112, "invalid tx proof, missing nodes!");
*(_BYTE *)(v44 + 104) = 0;
return 0;
}
}
| verify_merkle_proof:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x190
MOV RAX,RSI
LEA RSI,[RBP + 0x10]
MOV qword ptr [RBP + -0x170],RSI
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[RBP + -0x30]
LEA RDX,[0x1da758]
CALL 0x001a05c0
LEA RAX,[RBP + -0x30]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0019f1e0
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x3
MOVSXD RDI,EAX
MOV ESI,0x20
CALL 0x0019c480
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x3
MOVSXD RDI,EAX
MOV ESI,0x8
CALL 0x0019c480
MOV RSI,qword ptr [RBP + -0x170]
MOV qword ptr [RBP + -0x48],RAX
LEA RDI,[RBP + -0x70]
LEA RDX,[0x1da42a]
CALL 0x001a05c0
MOV RSI,qword ptr [RBP + -0x170]
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x50],RAX
LEA RDI,[RBP + -0x98]
LEA RDX,[0x1da70b]
CALL 0x001a05c0
MOV RSI,qword ptr [RBP + -0x170]
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x78],RAX
LEA RDI,[RBP + -0xb0]
LEA RDX,[0x1db6d0]
CALL 0x001a05c0
MOV RSI,qword ptr [RBP + -0x170]
LEA RDI,[RBP + -0xc8]
LEA RDX,[0x1da1b8]
CALL 0x001a05c0
LEA RDI,[RBP + -0xf0]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00123140
LEA RDI,[RBP + -0x118]
LEA RSI,[RBP + -0xb0]
LEA RDX,[0x1daa25]
CALL 0x001a05c0
MOV RAX,qword ptr [RBP + -0x118]
MOV qword ptr [RBP + -0x100],RAX
MOV RAX,qword ptr [RBP + -0x110]
MOV qword ptr [RBP + -0xf8],RAX
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x58]
MOV EDX,EAX
CALL 0x001231c0
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x20
MOV RSI,qword ptr [RBP + -0x78]
MOV EAX,dword ptr [RBP + -0x80]
MOV EDX,EAX
CALL 0x001231c0
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX + 0x40],RDX
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x48],RDX
MOV RDX,qword ptr [RCX + 0x10]
MOV qword ptr [RAX + 0x50],RDX
MOV RCX,qword ptr [RCX + 0x18]
MOV qword ptr [RAX + 0x58],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX],0x326
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x8],0x32c
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x10],0x323
MOV dword ptr [RBP + -0x11c],0x0
LAB_00129ae4:
MOV EAX,dword ptr [RBP + -0x11c]
CMP EAX,dword ptr [RBP + -0x34]
JGE 0x00129bbc
MOV ESI,dword ptr [RBP + -0x11c]
LEA RDI,[RBP + -0x138]
LEA RAX,[RBP + -0x30]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0019ef30
LEA RDI,[RBP + -0x150]
LEA RSI,[RBP + -0x138]
LEA RDX,[0x1db05a]
CALL 0x001a05c0
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x60
MOV EAX,dword ptr [RBP + -0x11c]
SHL EAX,0x5
CDQE
ADD RDI,RAX
LEA RAX,[RBP + -0x150]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001a0a50
LEA RDI,[RBP + -0x138]
LEA RSI,[0x1da715]
CALL 0x00129ce0
MOV RDX,RAX
ADD RDX,0x65a00000
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RBP + -0x11c]
ADD ECX,0x3
MOVSXD RCX,ECX
MOV qword ptr [RAX + RCX*0x8],RDX
MOV EAX,dword ptr [RBP + -0x11c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x11c],EAX
JMP 0x00129ae4
LAB_00129bbc:
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x3
SHL EAX,0x5
MOV dword ptr [RBP + -0x168],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x160],RAX
MOV R8,qword ptr [RBP + -0x48]
LEA R9,[RBP + -0xf0]
MOV EDI,dword ptr [RBP + -0xc8]
MOV RSI,qword ptr [RBP + -0xc0]
MOV EDX,dword ptr [RBP + -0x168]
MOV RCX,qword ptr [RBP + -0x160]
CALL 0x001a10c0
AND AL,0x1
MOV byte ptr [RBP + -0x151],AL
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x0019c5a0
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0019c5a0
TEST byte ptr [RBP + -0x151],0x1
JNZ 0x00129c47
JMP 0x00129c25
LAB_00129c25:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x70
LEA RSI,[0x1daec4]
CALL 0x001a6370
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00129c8c
LAB_00129c47:
LEA RDI,[RBP + -0xf0]
MOV RSI,qword ptr [RBP + -0xf8]
MOV EDX,0x20
CALL 0x00123100
CMP EAX,0x0
JZ 0x00129c88
JMP 0x00129c66
LAB_00129c66:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x70
LEA RSI,[0x1daee5]
CALL 0x001a6370
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00129c8c
LAB_00129c88:
MOV byte ptr [RBP + -0x1],0x1
LAB_00129c8c:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x190
POP RBP
RET
|
int1 verify_merkle_proof(long param_1,int8 *param_2)
{
byte bVar1;
int iVar2;
long lVar3;
int1 local_158 [24];
int1 local_140 [28];
int local_124;
int8 local_120;
void *local_118;
int8 local_108;
void *local_100;
int1 local_f8 [40];
int4 local_d0 [2];
int8 local_c8;
int1 local_b8 [24];
ulong local_a0;
void *local_98;
ulong local_88;
void *local_80;
ulong local_78;
void *local_70;
ulong local_60;
void *local_58;
int8 *local_50;
void *local_48;
int local_3c;
int1 local_38 [24];
int8 *local_20;
long local_18;
int1 local_9;
local_20 = param_2;
local_18 = param_1;
ssz_get(local_38,&stack0x00000008,&DAT_001da758);
local_3c = ssz_len();
local_48 = (void *)safe_calloc((long)(local_3c + 3),0x20);
local_50 = (int8 *)safe_calloc((long)(local_3c + 3),8);
ssz_get(&local_78,&stack0x00000008,"blockNumber");
local_60 = local_78;
local_58 = local_70;
ssz_get(&local_a0,&stack0x00000008,"blockHash");
local_88 = local_a0;
local_80 = local_98;
ssz_get(local_b8,&stack0x00000008,"header");
ssz_get(local_d0,&stack0x00000008,"proof");
memset(local_f8,0,0x20);
ssz_get(&local_120,local_b8,"bodyRoot");
local_108 = local_120;
local_100 = local_118;
memcpy(local_48,local_58,local_60 & 0xffffffff);
memcpy((void *)((long)local_48 + 0x20),local_80,local_88 & 0xffffffff);
*(int8 *)((long)local_48 + 0x40) = *local_20;
*(int8 *)((long)local_48 + 0x48) = local_20[1];
*(int8 *)((long)local_48 + 0x50) = local_20[2];
*(int8 *)((long)local_48 + 0x58) = local_20[3];
*local_50 = 0x326;
local_50[1] = 0x32c;
local_50[2] = 0x323;
for (local_124 = 0; local_124 < local_3c; local_124 = local_124 + 1) {
ssz_at(local_140,local_124);
ssz_get(local_158,local_140,"transaction");
ssz_hash_tree_root((long)local_48 + (long)(local_124 << 5) + 0x60);
lVar3 = ssz_get_uint64(local_140,"transactionIndex");
local_50[local_124 + 3] = lVar3 + 0x65a00000;
}
bVar1 = ssz_verify_multi_merkle_proof
(local_d0[0],local_c8,(local_3c + 3) * 0x20,local_48,local_50,local_f8);
safe_free(local_48);
safe_free(local_50);
if ((bVar1 & 1) == 0) {
c4_state_add_error(local_18 + 0x70,"invalid tx proof, missing nodes!");
*(int1 *)(local_18 + 0x68) = 0;
local_9 = 0;
}
else {
iVar2 = memcmp(local_f8,local_100,0x20);
if (iVar2 == 0) {
local_9 = 1;
}
else {
c4_state_add_error(local_18 + 0x70,"invalid tx proof, body root mismatch!");
*(int1 *)(local_18 + 0x68) = 0;
local_9 = 0;
}
}
return local_9;
}
| |
42,317 | read_user_name | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void read_user_name(char *name)
{
if (geteuid() == 0)
strcpy(name,"root"); /* allow use of surun */
else
{
#ifdef HAVE_GETPWUID
struct passwd *skr;
const char *str;
if ((skr=getpwuid(geteuid())) != NULL)
{
str=skr->pw_name;
} else if ((str=getlogin()) == NULL)
{
if (!(str=getenv("USER")) && !(str=getenv("LOGNAME")) &&
!(str=getenv("LOGIN")))
str="UNKNOWN_USER";
}
ma_strmake(name,str,USERNAME_LENGTH);
#elif defined(HAVE_CUSERID)
(void) cuserid(name);
#else
ma_strmake(name,"UNKNOWN_USER", USERNAME_LENGTH);
#endif
}
return;
} | O3 | c | read_user_name:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x13290
testl %eax, %eax
je 0x160f7
callq 0x13290
movl %eax, %edi
callq 0x13530
testq %rax, %rax
je 0x16108
movq (%rax), %rsi
jmp 0x16137
movb $0x0, 0x4(%rbx)
movl $0x746f6f72, (%rbx) # imm = 0x746F6F72
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x13470
testq %rax, %rax
jne 0x16134
leaq 0x1e6cf(%rip), %rdi # 0x347e8
callq 0x13590
testq %rax, %rax
jne 0x16134
leaq 0x1e6a8(%rip), %rdi # 0x347d2
callq 0x13590
testq %rax, %rax
je 0x1614a
movq %rax, %rsi
movl $0x200, %edx # imm = 0x200
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x250af
leaq 0x1e689(%rip), %rdi # 0x347da
callq 0x13590
testq %rax, %rax
leaq 0x1e680(%rip), %rsi # 0x347e0
cmovneq %rax, %rsi
jmp 0x16137
| read_user_name:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
call _geteuid
test eax, eax
jz short loc_160F7
call _geteuid
mov edi, eax
call _getpwuid
test rax, rax
jz short loc_16108
mov rsi, [rax]
jmp short loc_16137
loc_160F7:
mov byte ptr [rbx+4], 0
mov dword ptr [rbx], 746F6F72h
add rsp, 8
pop rbx
pop rbp
retn
loc_16108:
call _getlogin
test rax, rax
jnz short loc_16134
lea rdi, aUnknownUser+8; "USER"
call _getenv
test rax, rax
jnz short loc_16134
lea rdi, aLogname; "LOGNAME"
call _getenv
test rax, rax
jz short loc_1614A
loc_16134:
mov rsi, rax
loc_16137:
mov edx, 200h
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp ma_strmake
loc_1614A:
lea rdi, aLogin; "LOGIN"
call _getenv
test rax, rax
lea rsi, aUnknownUser; "UNKNOWN_USER"
cmovnz rsi, rax
jmp short loc_16137
| long long read_user_name(char *a1)
{
long long result; // rax
unsigned int v2; // eax
const char **v3; // rax
const char *v4; // rsi
long long v5; // rax
long long v6; // rax
result = geteuid(a1);
if ( (_DWORD)result )
{
v2 = geteuid(a1);
v3 = (const char **)getpwuid(v2);
if ( v3 )
{
v4 = *v3;
}
else
{
v5 = getlogin();
if ( v5 || (v5 = getenv("USER")) != 0 || (v5 = getenv("LOGNAME")) != 0 )
{
v4 = (const char *)v5;
}
else
{
v6 = getenv("LOGIN");
v4 = "UNKNOWN_USER";
if ( v6 )
v4 = (const char *)v6;
}
}
return ma_strmake(a1, v4, 512LL);
}
else
{
strcpy(a1, "root");
}
return result;
}
| read_user_name:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00113290
TEST EAX,EAX
JZ 0x001160f7
CALL 0x00113290
MOV EDI,EAX
CALL 0x00113530
TEST RAX,RAX
JZ 0x00116108
MOV RSI,qword ptr [RAX]
JMP 0x00116137
LAB_001160f7:
MOV byte ptr [RBX + 0x4],0x0
MOV dword ptr [RBX],0x746f6f72
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00116108:
CALL 0x00113470
TEST RAX,RAX
JNZ 0x00116134
LEA RDI,[0x1347e8]
CALL 0x00113590
TEST RAX,RAX
JNZ 0x00116134
LEA RDI,[0x1347d2]
CALL 0x00113590
TEST RAX,RAX
JZ 0x0011614a
LAB_00116134:
MOV RSI,RAX
LAB_00116137:
MOV EDX,0x200
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001250af
LAB_0011614a:
LEA RDI,[0x1347da]
CALL 0x00113590
TEST RAX,RAX
LEA RSI,[0x1347e0]
CMOVNZ RSI,RAX
JMP 0x00116137
|
void read_user_name(int4 *param_1)
{
__uid_t _Var1;
passwd *ppVar2;
char *pcVar3;
char *pcVar4;
_Var1 = geteuid();
if (_Var1 != 0) {
_Var1 = geteuid();
ppVar2 = getpwuid(_Var1);
if (ppVar2 == (passwd *)0x0) {
pcVar3 = getlogin();
if (((pcVar3 == (char *)0x0) && (pcVar3 = getenv("USER"), pcVar3 == (char *)0x0)) &&
(pcVar3 = getenv("LOGNAME"), pcVar3 == (char *)0x0)) {
pcVar4 = getenv("LOGIN");
pcVar3 = "UNKNOWN_USER";
if (pcVar4 != (char *)0x0) {
pcVar3 = pcVar4;
}
}
}
else {
pcVar3 = ppVar2->pw_name;
}
ma_strmake(param_1,pcVar3,0x200);
return;
}
*(int1 *)(param_1 + 1) = 0;
*param_1 = 0x746f6f72;
return;
}
| |
42,318 | mi_mempack_get_block_info | eloqsql/storage/myisam/mi_packrec.c | static uchar *_mi_mempack_get_block_info(MI_INFO *myisam,
MI_BIT_BUFF *bit_buff,
MI_BLOCK_INFO *info,
uchar **rec_buff_p,
uchar *header)
{
header+= read_pack_length((uint) myisam->s->pack.version, header,
&info->rec_len);
if (myisam->s->base.blobs)
{
header+= read_pack_length((uint) myisam->s->pack.version, header,
&info->blob_len);
/* mi_alloc_rec_buff sets my_errno on error */
if (!(mi_alloc_rec_buff(myisam, info->blob_len ,
rec_buff_p)))
return 0; /* not enough memory */
bit_buff->blob_pos= (uchar*) *rec_buff_p;
bit_buff->blob_end= (uchar*) *rec_buff_p + info->blob_len;
}
return header;
} | O0 | c | mi_mempack_get_block_info:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl 0x244(%rax), %edi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x18, %rdx
callq 0xbbb60
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x188(%rax)
je 0xbe003
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl 0x244(%rax), %edi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x30, %rdx
callq 0xbbb60
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0xb6da0
cmpq $0x0, %rax
jne 0xbdfdd
movq $0x0, -0x8(%rbp)
jmp 0xbe00b
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
addq 0x30(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _mi_mempack_get_block_info:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_10]
mov rax, [rax]
movzx edi, byte ptr [rax+244h]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
add rdx, 18h
call read_pack_length_0
mov ecx, eax
mov rax, [rbp+var_30]
mov ecx, ecx
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+188h], 0
jz short loc_BE003
mov rax, [rbp+var_10]
mov rax, [rax]
movzx edi, byte ptr [rax+244h]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
add rdx, 30h ; '0'
call read_pack_length_0
mov ecx, eax
mov rax, [rbp+var_30]
mov ecx, ecx
add rax, rcx
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
mov rax, [rbp+var_20]
mov rsi, [rax+30h]
mov rdx, [rbp+var_28]
call mi_alloc_rec_buff
cmp rax, 0
jnz short loc_BDFDD
mov [rbp+var_8], 0
jmp short loc_BE00B
loc_BDFDD:
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov [rax+18h], rcx
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_20]
add rcx, [rax+30h]
mov rax, [rbp+var_18]
mov [rax+20h], rcx
loc_BE003:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_BE00B:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| unsigned __int8 * mi_mempack_get_block_info(
long long a1,
long long a2,
long long a3,
long long *a4,
unsigned __int8 *a5)
{
unsigned __int8 *v6; // [rsp+0h] [rbp-30h]
v6 = &a5[(unsigned int)read_pack_length_0(*(unsigned __int8 *)(*(_QWORD *)a1 + 580LL), a5, (_QWORD *)(a3 + 24))];
if ( !*(_DWORD *)(*(_QWORD *)a1 + 392LL) )
return v6;
v6 += (unsigned int)read_pack_length_0(*(unsigned __int8 *)(*(_QWORD *)a1 + 580LL), v6, (_QWORD *)(a3 + 48));
if ( mi_alloc_rec_buff(a1, *(_QWORD *)(a3 + 48), a4) )
{
*(_QWORD *)(a2 + 24) = *a4;
*(_QWORD *)(a2 + 32) = *(_QWORD *)(a3 + 48) + *a4;
return v6;
}
return 0LL;
}
| _mi_mempack_get_block_info:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVZX EDI,byte ptr [RAX + 0x244]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
ADD RDX,0x18
CALL 0x001bbb60
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x188],0x0
JZ 0x001be003
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVZX EDI,byte ptr [RAX + 0x244]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
ADD RDX,0x30
CALL 0x001bbb60
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x30]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001b6da0
CMP RAX,0x0
JNZ 0x001bdfdd
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001be00b
LAB_001bdfdd:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
ADD RCX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x20],RCX
LAB_001be003:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_001be00b:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long _mi_mempack_get_block_info(long *param_1,long param_2,long param_3,long *param_4,long param_5)
{
uint uVar1;
long lVar2;
long local_38;
uVar1 = read_pack_length(*(int1 *)(*param_1 + 0x244),param_5,param_3 + 0x18);
local_38 = param_5 + (ulong)uVar1;
if (*(int *)(*param_1 + 0x188) != 0) {
uVar1 = read_pack_length(*(int1 *)(*param_1 + 0x244),local_38,param_3 + 0x30);
local_38 = local_38 + (ulong)uVar1;
lVar2 = mi_alloc_rec_buff(param_1,*(int8 *)(param_3 + 0x30),param_4);
if (lVar2 == 0) {
return 0;
}
*(long *)(param_2 + 0x18) = *param_4;
*(long *)(param_2 + 0x20) = *param_4 + *(long *)(param_3 + 0x30);
}
return local_38;
}
| |
42,319 | ma_init_alloc_root | eloqsql/libmariadb/libmariadb/ma_alloc.c | void ma_init_alloc_root(MA_MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size)
{
mem_root->free= mem_root->used= mem_root->pre_alloc= 0;
mem_root->min_malloc=32;
mem_root->block_size= (block_size-MALLOC_OVERHEAD-sizeof(MA_USED_MEM)+8);
mem_root->error_handler=0;
mem_root->block_num= 4;
mem_root->first_block_usage= 0;
#if !(defined(HAVE_purify) && defined(EXTRA_DEBUG))
if (pre_alloc_size)
{
if ((mem_root->free = mem_root->pre_alloc=
(MA_USED_MEM*) malloc(pre_alloc_size+ ALIGN_SIZE(sizeof(MA_USED_MEM)))))
{
mem_root->free->size=pre_alloc_size+ALIGN_SIZE(sizeof(MA_USED_MEM));
mem_root->free->left=pre_alloc_size;
mem_root->free->next=0;
}
}
#endif
} | O3 | c | ma_init_alloc_root:
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movq $0x20, 0x18(%rdi)
addq $-0x18, %rsi
movq %rsi, 0x20(%rdi)
movq %rax, 0x30(%rdi)
movq $0x4, 0x28(%rdi)
testq %rdx, %rdx
je 0x2263e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x18(%rdx), %r15
movq %r15, %rdi
callq 0x13620
movq %rax, 0x10(%r14)
movq %rax, (%r14)
testq %rax, %rax
je 0x22634
movq %r15, 0x10(%rax)
movq %rbx, 0x8(%rax)
movq $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| ma_init_alloc_root:
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
xor eax, eax
mov [rdi+10h], rax
mov qword ptr [rdi+18h], 20h ; ' '
add rsi, 0FFFFFFFFFFFFFFE8h
mov [rdi+20h], rsi
mov [rdi+30h], rax
mov qword ptr [rdi+28h], 4
test rdx, rdx
jz short locret_2263E
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rdi
lea r15, [rdx+18h]
mov rdi, r15
call _malloc
mov [r14+10h], rax
mov [r14], rax
test rax, rax
jz short loc_22634
mov [rax+10h], r15
mov [rax+8], rbx
mov qword ptr [rax], 0
loc_22634:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_2263E:
retn
| _QWORD * ma_init_alloc_root(long long a1, long long a2, long long a3)
{
_QWORD *result; // rax
long long v5; // r15
*(_OWORD *)a1 = 0LL;
result = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 24) = 32LL;
*(_QWORD *)(a1 + 32) = a2 - 24;
*(_QWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 40) = 4LL;
if ( a3 )
{
v5 = a3 + 24;
result = (_QWORD *)malloc(a3 + 24);
*(_QWORD *)(a1 + 16) = result;
*(_QWORD *)a1 = result;
if ( result )
{
result[2] = v5;
result[1] = a3;
*result = 0LL;
}
}
return result;
}
| ma_init_alloc_root:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],RAX
MOV qword ptr [RDI + 0x18],0x20
ADD RSI,-0x18
MOV qword ptr [RDI + 0x20],RSI
MOV qword ptr [RDI + 0x30],RAX
MOV qword ptr [RDI + 0x28],0x4
TEST RDX,RDX
JZ 0x0012263e
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RDI
LEA R15,[RDX + 0x18]
MOV RDI,R15
CALL 0x00113620
MOV qword ptr [R14 + 0x10],RAX
MOV qword ptr [R14],RAX
TEST RAX,RAX
JZ 0x00122634
MOV qword ptr [RAX + 0x10],R15
MOV qword ptr [RAX + 0x8],RBX
MOV qword ptr [RAX],0x0
LAB_00122634:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_0012263e:
RET
|
void ma_init_alloc_root(int8 *param_1,long param_2,long param_3)
{
int8 *puVar1;
*param_1 = 0;
param_1[1] = 0;
param_1[2] = 0;
param_1[3] = 0x20;
param_1[4] = param_2 + -0x18;
param_1[6] = 0;
param_1[5] = 4;
if (param_3 != 0) {
puVar1 = (int8 *)malloc(param_3 + 0x18U);
param_1[2] = puVar1;
*param_1 = puVar1;
if (puVar1 != (int8 *)0x0) {
puVar1[2] = param_3 + 0x18U;
puVar1[1] = param_3;
*puVar1 = 0;
}
}
return;
}
| |
42,320 | mi_write_static_record | eloqsql/storage/myisam/mi_statrec.c | int _mi_write_static_record(MI_INFO *info, const uchar *record)
{
uchar temp[8]; /* max pointer length */
if (info->s->state.dellink != HA_OFFSET_ERROR &&
!info->append_insert_at_end)
{
my_off_t filepos=info->s->state.dellink;
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_read(info, &temp[0],info->s->base.rec_reflength,
info->s->state.dellink+1,
MYF(MY_NABP)))
goto err;
info->s->state.dellink= _mi_rec_pos(info->s,temp);
info->state->del--;
info->state->empty-=info->s->base.pack_reclength;
if (info->s->file_write(info, record, info->s->base.reclength,
filepos,
MYF(MY_NABP)))
goto err;
}
else
{
if (info->state->data_file_length > info->s->base.max_data_file_length-
info->s->base.pack_reclength)
{
my_errno=HA_ERR_RECORD_FILE_FULL;
return(2);
}
if (info->opt_flag & WRITE_CACHE_USED)
{ /* Cash in use */
if (my_b_write(&info->rec_cache, record,
info->s->base.reclength))
goto err;
if (info->s->base.pack_reclength != info->s->base.reclength)
{
uint length=info->s->base.pack_reclength - info->s->base.reclength;
bzero(temp,length);
if (my_b_write(&info->rec_cache, temp,length))
goto err;
}
}
else
{
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_write(info, record, info->s->base.reclength,
info->state->data_file_length,
info->s->write_flag))
goto err;
if (info->s->base.pack_reclength != info->s->base.reclength)
{
uint length=info->s->base.pack_reclength - info->s->base.reclength;
bzero(temp,length);
if (info->s->file_write(info, temp,length,
info->state->data_file_length+
info->s->base.reclength,
info->s->write_flag))
goto err;
}
}
info->state->data_file_length+=info->s->base.pack_reclength;
info->s->state.split++;
}
return 0;
err:
return 1;
} | O3 | c | mi_write_static_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq 0x58(%rax), %r15
cmpq $-0x1, %r15
je 0xa629a
cmpb $0x0, 0x33a(%rbx)
je 0xa6373
movq 0x8(%rbx), %rcx
movq 0x110(%rax), %rdx
subq 0x148(%rax), %rdx
cmpq %rdx, 0x28(%rcx)
jbe 0xa62c8
callq 0xc5c9a
movl $0x87, (%rax)
movl $0x2, %r14d
jmp 0xa64e8
testb $0x10, 0x1c8(%rbx)
jne 0xa6402
movl $0x1, 0x300(%rbx)
movq 0x140(%rax), %rdx
movq 0x28(%rcx), %rcx
movq 0x370(%rax), %r8
movq %rbx, %rdi
movq %r14, %rsi
callq *0x2e8(%rax)
movl $0x1, %r14d
testq %rax, %rax
jne 0xa64e8
movq (%rbx), %r13
movq 0x140(%r13), %rax
movq 0x148(%r13), %r15
cmpq %rax, %r15
je 0xa64cc
subl %eax, %r15d
leaq -0x38(%rbp), %r12
movl $0x8, %ecx
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2b990
movq 0x8(%rbx), %rax
movq 0x140(%r13), %rcx
addq 0x28(%rax), %rcx
movq 0x370(%r13), %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0x2e8(%r13)
testq %rax, %rax
jne 0xa64e8
jmp 0xa64cc
movl $0x1, 0x300(%rbx)
movl 0x178(%rax), %edx
movq 0x58(%rax), %rcx
incq %rcx
leaq -0x38(%rbp), %rsi
movl $0x4, %r8d
movq %rbx, %rdi
callq *0x2e0(%rax)
testq %rax, %rax
jne 0xa63f7
movq (%rbx), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa47d0
movq (%rbx), %rcx
movq %rax, 0x58(%rcx)
movq 0x8(%rbx), %rax
decq 0x8(%rax)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq 0x148(%rax), %rax
subq %rax, 0x10(%rcx)
movq (%rbx), %rax
movq 0x140(%rax), %rdx
movl $0x4, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq *0x2e8(%rax)
testq %rax, %rax
je 0xa64e5
movl $0x1, %r14d
jmp 0xa64e8
leaq 0x220(%rbx), %r15
movq 0x140(%rax), %r12
movq 0x260(%rbx), %rdi
leaq (%rdi,%r12), %rax
cmpq 0x268(%rbx), %rax
jbe 0xa6442
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xb58ab
movl $0x1, %r14d
testl %eax, %eax
jne 0xa64e8
jmp 0xa6459
testq %r12, %r12
je 0xa6459
movq %r14, %rsi
movq %r12, %rdx
callq 0x2b0b0
addq %r12, 0x260(%rbx)
movq (%rbx), %rcx
movq 0x140(%rcx), %rax
movq 0x148(%rcx), %r14
cmpq %rax, %r14
je 0xa64cc
subl %eax, %r14d
leaq -0x38(%rbp), %rdi
movl $0x8, %ecx
xorl %esi, %esi
movq %r14, %rdx
callq 0x2b990
movq 0x260(%rbx), %rdi
leaq (%rdi,%r14), %rax
cmpq 0x268(%rbx), %rax
jbe 0xa64b4
leaq -0x38(%rbp), %rsi
movq %r15, %rdi
movq %r14, %rdx
callq 0xb58ab
movl $0x1, %r14d
testl %eax, %eax
jne 0xa64e8
jmp 0xa64cc
testq %r14, %r14
je 0xa64cc
leaq -0x38(%rbp), %rsi
movq %r14, %rdx
callq 0x2b0b0
addq %r14, 0x260(%rbx)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq 0x148(%rax), %rax
addq %rax, 0x28(%rcx)
movq (%rbx), %rax
incq 0x50(%rax)
xorl %r14d, %r14d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xa6509
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2b280
| _mi_write_static_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov r15, [rax+58h]
cmp r15, 0FFFFFFFFFFFFFFFFh
jz short loc_A629A
cmp byte ptr [rbx+33Ah], 0
jz loc_A6373
loc_A629A:
mov rcx, [rbx+8]
mov rdx, [rax+110h]
sub rdx, [rax+148h]
cmp [rcx+28h], rdx
jbe short loc_A62C8
call _my_thread_var
mov dword ptr [rax], 87h
mov r14d, 2
jmp loc_A64E8
loc_A62C8:
test byte ptr [rbx+1C8h], 10h
jnz loc_A6402
mov dword ptr [rbx+300h], 1
mov rdx, [rax+140h]
mov rcx, [rcx+28h]
mov r8, [rax+370h]
mov rdi, rbx
mov rsi, r14
call qword ptr [rax+2E8h]
mov r14d, 1
test rax, rax
jnz loc_A64E8
mov r13, [rbx]
mov rax, [r13+140h]
mov r15, [r13+148h]
cmp r15, rax
jz loc_A64CC
sub r15d, eax
lea r12, [rbp+var_38]
mov ecx, 8
mov rdi, r12
xor esi, esi
mov rdx, r15
call ___memset_chk
mov rax, [rbx+8]
mov rcx, [r13+140h]
add rcx, [rax+28h]
mov r8, [r13+370h]
mov rdi, rbx
mov rsi, r12
mov rdx, r15
call qword ptr [r13+2E8h]
test rax, rax
jnz loc_A64E8
jmp loc_A64CC
loc_A6373:
mov dword ptr [rbx+300h], 1
mov edx, [rax+178h]
mov rcx, [rax+58h]
inc rcx
lea rsi, [rbp+var_38]
mov r8d, 4
mov rdi, rbx
call qword ptr [rax+2E0h]
test rax, rax
jnz short loc_A63F7
mov rdi, [rbx]
lea rsi, [rbp+var_38]
call _mi_rec_pos
mov rcx, [rbx]
mov [rcx+58h], rax
mov rax, [rbx+8]
dec qword ptr [rax+8]
mov rax, [rbx]
mov rcx, [rbx+8]
mov rax, [rax+148h]
sub [rcx+10h], rax
mov rax, [rbx]
mov rdx, [rax+140h]
mov r8d, 4
mov rdi, rbx
mov rsi, r14
mov rcx, r15
call qword ptr [rax+2E8h]
test rax, rax
jz loc_A64E5
loc_A63F7:
mov r14d, 1
jmp loc_A64E8
loc_A6402:
lea r15, [rbx+220h]
mov r12, [rax+140h]
mov rdi, [rbx+260h]
lea rax, [rdi+r12]
cmp rax, [rbx+268h]
jbe short loc_A6442
mov rdi, r15
mov rsi, r14
mov rdx, r12
call _my_b_write
mov r14d, 1
test eax, eax
jnz loc_A64E8
jmp short loc_A6459
loc_A6442:
test r12, r12
jz short loc_A6459
mov rsi, r14
mov rdx, r12
call _memcpy
add [rbx+260h], r12
loc_A6459:
mov rcx, [rbx]
mov rax, [rcx+140h]
mov r14, [rcx+148h]
cmp r14, rax
jz short loc_A64CC
sub r14d, eax
lea rdi, [rbp+var_38]
mov ecx, 8
xor esi, esi
mov rdx, r14
call ___memset_chk
mov rdi, [rbx+260h]
lea rax, [rdi+r14]
cmp rax, [rbx+268h]
jbe short loc_A64B4
lea rsi, [rbp+var_38]
mov rdi, r15
mov rdx, r14
call _my_b_write
mov r14d, 1
test eax, eax
jnz short loc_A64E8
jmp short loc_A64CC
loc_A64B4:
test r14, r14
jz short loc_A64CC
lea rsi, [rbp+var_38]
mov rdx, r14
call _memcpy
add [rbx+260h], r14
loc_A64CC:
mov rax, [rbx]
mov rcx, [rbx+8]
mov rax, [rax+148h]
add [rcx+28h], rax
mov rax, [rbx]
inc qword ptr [rax+50h]
loc_A64E5:
xor r14d, r14d
loc_A64E8:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_A6509
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A6509:
call ___stack_chk_fail
| long long mi_write_static_record(_DWORD *a1, long long a2)
{
long long v3; // rax
long long v4; // r15
long long v5; // rcx
unsigned int v6; // r14d
long long v7; // r13
long long v8; // rax
long long v9; // r15
long long v10; // r15
long long v11; // r12
long long v12; // rdi
long long v13; // rax
long long v14; // r14
long long v15; // r14
long long v16; // rdi
int v17; // eax
__int16 v19; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v20; // [rsp+10h] [rbp-30h]
v20 = __readfsqword(0x28u);
v3 = *(_QWORD *)a1;
v4 = *(_QWORD *)(*(_QWORD *)a1 + 88LL);
if ( v4 != -1 && !*((_BYTE *)a1 + 826) )
{
a1[192] = 1;
if ( (*(long long ( **)(_DWORD *, __int16 *, _QWORD, long long, long long))(v3 + 736))(
a1,
&v19,
*(unsigned int *)(v3 + 376),
*(_QWORD *)(v3 + 88) + 1LL,
4LL) )
{
return 1;
}
*(_QWORD *)(*(_QWORD *)a1 + 88LL) = mi_rec_pos(*(_QWORD *)a1, &v19);
--*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL);
*(_QWORD *)(*((_QWORD *)a1 + 1) + 16LL) -= *(_QWORD *)(*(_QWORD *)a1 + 328LL);
return (*(long long ( **)(_DWORD *, long long, _QWORD, long long, long long))(*(_QWORD *)a1 + 744LL))(
a1,
a2,
*(_QWORD *)(*(_QWORD *)a1 + 320LL),
v4,
4LL) != 0;
}
v5 = *((_QWORD *)a1 + 1);
if ( *(_QWORD *)(v5 + 40) > *(_QWORD *)(v3 + 272) - *(_QWORD *)(v3 + 328) )
{
*(_DWORD *)my_thread_var(a1) = 135;
return 2;
}
if ( (a1[114] & 0x10) != 0 )
{
v11 = *(_QWORD *)(v3 + 320);
v12 = *((_QWORD *)a1 + 76);
if ( (unsigned long long)(v12 + v11) <= *((_QWORD *)a1 + 77) )
{
if ( v11 )
{
memcpy(v12, a2, v11);
*((_QWORD *)a1 + 76) += v11;
}
}
else
{
v6 = 1;
if ( (unsigned int)my_b_write(a1 + 136, a2, v11) )
return v6;
}
v13 = *(_QWORD *)(*(_QWORD *)a1 + 320LL);
v14 = *(_QWORD *)(*(_QWORD *)a1 + 328LL);
if ( v14 != v13 )
{
v15 = (unsigned int)(v14 - v13);
__memset_chk(&v19, 0LL, v15, 8LL);
v16 = *((_QWORD *)a1 + 76);
if ( (unsigned long long)(v16 + v15) <= *((_QWORD *)a1 + 77) )
{
if ( v15 )
{
memcpy(v16, &v19, v15);
*((_QWORD *)a1 + 76) += v15;
}
}
else
{
v17 = my_b_write(a1 + 136, &v19, v15);
v6 = 1;
if ( v17 )
return v6;
}
}
goto LABEL_24;
}
a1[192] = 1;
v6 = 1;
if ( !(*(long long ( **)(_DWORD *, long long, _QWORD, _QWORD, _QWORD))(v3 + 744))(
a1,
a2,
*(_QWORD *)(v3 + 320),
*(_QWORD *)(v5 + 40),
*(_QWORD *)(v3 + 880)) )
{
v7 = *(_QWORD *)a1;
v8 = *(_QWORD *)(*(_QWORD *)a1 + 320LL);
v9 = *(_QWORD *)(*(_QWORD *)a1 + 328LL);
if ( v9 == v8
|| (v10 = (unsigned int)(v9 - v8),
__memset_chk(&v19, 0LL, v10, 8LL),
!(*(long long ( **)(_DWORD *, __int16 *, long long, _QWORD, _QWORD))(v7 + 744))(
a1,
&v19,
v10,
*(_QWORD *)(*((_QWORD *)a1 + 1) + 40LL) + *(_QWORD *)(v7 + 320),
*(_QWORD *)(v7 + 880))) )
{
LABEL_24:
*(_QWORD *)(*((_QWORD *)a1 + 1) + 40LL) += *(_QWORD *)(*(_QWORD *)a1 + 328LL);
++*(_QWORD *)(*(_QWORD *)a1 + 80LL);
return 0;
}
}
return v6;
}
| _mi_write_static_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV R15,qword ptr [RAX + 0x58]
CMP R15,-0x1
JZ 0x001a629a
CMP byte ptr [RBX + 0x33a],0x0
JZ 0x001a6373
LAB_001a629a:
MOV RCX,qword ptr [RBX + 0x8]
MOV RDX,qword ptr [RAX + 0x110]
SUB RDX,qword ptr [RAX + 0x148]
CMP qword ptr [RCX + 0x28],RDX
JBE 0x001a62c8
CALL 0x001c5c9a
MOV dword ptr [RAX],0x87
MOV R14D,0x2
JMP 0x001a64e8
LAB_001a62c8:
TEST byte ptr [RBX + 0x1c8],0x10
JNZ 0x001a6402
MOV dword ptr [RBX + 0x300],0x1
MOV RDX,qword ptr [RAX + 0x140]
MOV RCX,qword ptr [RCX + 0x28]
MOV R8,qword ptr [RAX + 0x370]
MOV RDI,RBX
MOV RSI,R14
CALL qword ptr [RAX + 0x2e8]
MOV R14D,0x1
TEST RAX,RAX
JNZ 0x001a64e8
MOV R13,qword ptr [RBX]
MOV RAX,qword ptr [R13 + 0x140]
MOV R15,qword ptr [R13 + 0x148]
CMP R15,RAX
JZ 0x001a64cc
SUB R15D,EAX
LEA R12,[RBP + -0x38]
MOV ECX,0x8
MOV RDI,R12
XOR ESI,ESI
MOV RDX,R15
CALL 0x0012b990
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [R13 + 0x140]
ADD RCX,qword ptr [RAX + 0x28]
MOV R8,qword ptr [R13 + 0x370]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
CALL qword ptr [R13 + 0x2e8]
TEST RAX,RAX
JNZ 0x001a64e8
JMP 0x001a64cc
LAB_001a6373:
MOV dword ptr [RBX + 0x300],0x1
MOV EDX,dword ptr [RAX + 0x178]
MOV RCX,qword ptr [RAX + 0x58]
INC RCX
LEA RSI,[RBP + -0x38]
MOV R8D,0x4
MOV RDI,RBX
CALL qword ptr [RAX + 0x2e0]
TEST RAX,RAX
JNZ 0x001a63f7
MOV RDI,qword ptr [RBX]
LEA RSI,[RBP + -0x38]
CALL 0x001a47d0
MOV RCX,qword ptr [RBX]
MOV qword ptr [RCX + 0x58],RAX
MOV RAX,qword ptr [RBX + 0x8]
DEC qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RAX + 0x148]
SUB qword ptr [RCX + 0x10],RAX
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RAX + 0x140]
MOV R8D,0x4
MOV RDI,RBX
MOV RSI,R14
MOV RCX,R15
CALL qword ptr [RAX + 0x2e8]
TEST RAX,RAX
JZ 0x001a64e5
LAB_001a63f7:
MOV R14D,0x1
JMP 0x001a64e8
LAB_001a6402:
LEA R15,[RBX + 0x220]
MOV R12,qword ptr [RAX + 0x140]
MOV RDI,qword ptr [RBX + 0x260]
LEA RAX,[RDI + R12*0x1]
CMP RAX,qword ptr [RBX + 0x268]
JBE 0x001a6442
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
CALL 0x001b58ab
MOV R14D,0x1
TEST EAX,EAX
JNZ 0x001a64e8
JMP 0x001a6459
LAB_001a6442:
TEST R12,R12
JZ 0x001a6459
MOV RSI,R14
MOV RDX,R12
CALL 0x0012b0b0
ADD qword ptr [RBX + 0x260],R12
LAB_001a6459:
MOV RCX,qword ptr [RBX]
MOV RAX,qword ptr [RCX + 0x140]
MOV R14,qword ptr [RCX + 0x148]
CMP R14,RAX
JZ 0x001a64cc
SUB R14D,EAX
LEA RDI,[RBP + -0x38]
MOV ECX,0x8
XOR ESI,ESI
MOV RDX,R14
CALL 0x0012b990
MOV RDI,qword ptr [RBX + 0x260]
LEA RAX,[RDI + R14*0x1]
CMP RAX,qword ptr [RBX + 0x268]
JBE 0x001a64b4
LEA RSI,[RBP + -0x38]
MOV RDI,R15
MOV RDX,R14
CALL 0x001b58ab
MOV R14D,0x1
TEST EAX,EAX
JNZ 0x001a64e8
JMP 0x001a64cc
LAB_001a64b4:
TEST R14,R14
JZ 0x001a64cc
LEA RSI,[RBP + -0x38]
MOV RDX,R14
CALL 0x0012b0b0
ADD qword ptr [RBX + 0x260],R14
LAB_001a64cc:
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RAX + 0x148]
ADD qword ptr [RCX + 0x28],RAX
MOV RAX,qword ptr [RBX]
INC qword ptr [RAX + 0x50]
LAB_001a64e5:
XOR R14D,R14D
LAB_001a64e8:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001a6509
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a6509:
CALL 0x0012b280
|
int8 _mi_write_static_record(long *param_1,void *param_2)
{
long lVar1;
size_t __n;
int4 *puVar2;
long lVar3;
int8 uVar4;
ulong __n_00;
int iVar5;
long in_FS_OFFSET;
int1 local_40 [8];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar3 = *param_1;
lVar1 = *(long *)(lVar3 + 0x58);
if ((lVar1 == -1) || (*(char *)((long)param_1 + 0x33a) != '\0')) {
if ((ulong)(*(long *)(lVar3 + 0x110) - *(long *)(lVar3 + 0x148)) < *(ulong *)(param_1[1] + 0x28)
) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x87;
uVar4 = 2;
goto LAB_001a64e8;
}
if ((*(byte *)(param_1 + 0x39) & 0x10) == 0) {
*(int4 *)(param_1 + 0x60) = 1;
lVar3 = (**(code **)(lVar3 + 0x2e8))
(param_1,param_2,*(int8 *)(lVar3 + 0x140),
*(int8 *)(param_1[1] + 0x28),*(int8 *)(lVar3 + 0x370));
uVar4 = 1;
if (lVar3 != 0) goto LAB_001a64e8;
lVar3 = *param_1;
if (*(long *)(lVar3 + 0x148) != *(long *)(lVar3 + 0x140)) {
iVar5 = (int)*(long *)(lVar3 + 0x148) - (int)*(long *)(lVar3 + 0x140);
__memset_chk(local_40,0,iVar5,8);
lVar3 = (**(code **)(lVar3 + 0x2e8))
(param_1,local_40,iVar5,
*(long *)(lVar3 + 0x140) + *(long *)(param_1[1] + 0x28),
*(int8 *)(lVar3 + 0x370));
if (lVar3 != 0) goto LAB_001a64e8;
}
}
else {
__n = *(size_t *)(lVar3 + 0x140);
if ((ulong)param_1[0x4d] < param_1[0x4c] + __n) {
iVar5 = _my_b_write(param_1 + 0x44,param_2,__n);
uVar4 = 1;
if (iVar5 != 0) goto LAB_001a64e8;
}
else if (__n != 0) {
memcpy((void *)param_1[0x4c],param_2,__n);
param_1[0x4c] = param_1[0x4c] + __n;
}
lVar3 = *(long *)(*param_1 + 0x140);
lVar1 = *(long *)(*param_1 + 0x148);
if (lVar1 != lVar3) {
__n_00 = (ulong)(uint)((int)lVar1 - (int)lVar3);
__memset_chk(local_40,0,__n_00,8);
if ((ulong)param_1[0x4d] < param_1[0x4c] + __n_00) {
iVar5 = _my_b_write(param_1 + 0x44,local_40,__n_00);
uVar4 = 1;
if (iVar5 != 0) goto LAB_001a64e8;
}
else if (__n_00 != 0) {
memcpy((void *)param_1[0x4c],local_40,__n_00);
param_1[0x4c] = param_1[0x4c] + __n_00;
}
}
}
*(long *)(param_1[1] + 0x28) = *(long *)(param_1[1] + 0x28) + *(long *)(*param_1 + 0x148);
*(long *)(*param_1 + 0x50) = *(long *)(*param_1 + 0x50) + 1;
LAB_001a64e5:
uVar4 = 0;
}
else {
*(int4 *)(param_1 + 0x60) = 1;
lVar3 = (**(code **)(lVar3 + 0x2e0))
(param_1,local_40,*(int4 *)(lVar3 + 0x178),*(long *)(lVar3 + 0x58) + 1,4
);
if (lVar3 == 0) {
uVar4 = _mi_rec_pos(*param_1,local_40);
*(int8 *)(*param_1 + 0x58) = uVar4;
*(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + -1;
*(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) - *(long *)(*param_1 + 0x148);
lVar3 = (**(code **)(*param_1 + 0x2e8))
(param_1,param_2,*(int8 *)(*param_1 + 0x140),lVar1,4);
if (lVar3 == 0) goto LAB_001a64e5;
}
uVar4 = 1;
}
LAB_001a64e8:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar4;
}
| |
42,321 | net_stmt_close | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | static my_bool net_stmt_close(MYSQL_STMT *stmt, my_bool remove)
{
char stmt_id[STMT_ID_LENGTH];
MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root;
/* clear memory */
ma_free_root(&stmt->result.alloc, MYF(0)); /* allocated in mysql_stmt_store_result */
ma_free_root(&stmt->mem_root,MYF(0));
ma_free_root(fields_ma_alloc_root, MYF(0));
if (stmt->mysql)
{
CLEAR_CLIENT_ERROR(stmt->mysql);
/* remove from stmt list */
if (remove)
stmt->mysql->stmts= list_delete(stmt->mysql->stmts, &stmt->list);
/* check if all data are fetched */
if (stmt->mysql->status != MYSQL_STATUS_READY)
{
do {
stmt->mysql->methods->db_stmt_flush_unbuffered(stmt);
} while(mysql_stmt_more_results(stmt));
stmt->mysql->status= MYSQL_STATUS_READY;
}
if (stmt->state > MYSQL_STMT_INITTED)
{
int4store(stmt_id, stmt->stmt_id);
if (stmt->mysql->methods->db_command(stmt->mysql,COM_STMT_CLOSE, stmt_id,
sizeof(stmt_id), 1, stmt))
{
UPDATE_STMT_ERROR(stmt);
return 1;
}
}
}
return 0;
} | O3 | c | net_stmt_close:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movq 0x340(%rdi), %r12
addq $0x90, %rdi
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x22757
movq %rbx, %rdi
xorl %esi, %esi
callq 0x22757
movq %r12, %rdi
xorl %esi, %esi
callq 0x22757
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x248e2
movl $0x0, 0x90(%rax)
movq 0x38(%rbx), %rax
movw $0x30, 0x29b(%rax)
movl $0x30303030, 0x297(%rax) # imm = 0x30303030
movq 0x38(%rbx), %rax
movb $0x0, 0x97(%rax)
movq 0x38(%rbx), %rax
movq 0x2a0(%rax), %rcx
testq %rcx, %rcx
je 0x247f0
movl $0x0, 0x4(%rcx)
movq 0x38(%rbx), %rax
testb %r14b, %r14b
je 0x24817
movq 0x4c8(%rax), %rdi
leaq 0x320(%rbx), %rsi
callq 0x217f4
movq 0x38(%rbx), %rcx
movq %rax, 0x4c8(%rcx)
movq 0x38(%rbx), %rax
cmpl $0x0, 0x488(%rax)
je 0x2484f
movq 0x4d0(%rax), %rax
movq %rbx, %rdi
callq *0x78(%rax)
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x24845
movzwl 0x380(%rax), %ecx
testl $0x1008, %ecx # imm = 0x1008
jne 0x24820
movl $0x0, 0x488(%rax)
cmpl $0x0, 0x50(%rbx)
je 0x248df
movl 0x40(%rbx), %eax
leaq -0x2c(%rbp), %rdx
movl %eax, (%rdx)
movq 0x38(%rbx), %rdi
movq 0x4d0(%rdi), %rax
movl $0x4, %ecx
movl $0x19, %esi
movl $0x1, %r8d
movq %rbx, %r9
callq *0x10(%rax)
testl %eax, %eax
je 0x248df
movq 0x38(%rbx), %rsi
movl 0x90(%rsi), %eax
movl %eax, 0x108(%rbx)
leaq 0x30d(%rbx), %rdi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x13230
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
movl $0x97, %esi
addq 0x38(%rbx), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13230
movb %r14b, 0x30b(%rbx)
movb $0x1, %r15b
jmp 0x248e2
xorl %r15d, %r15d
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x24901
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x13510
| net_stmt_close:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r14d, esi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
mov r12, [rdi+340h]
add rdi, 90h
xor r15d, r15d
xor esi, esi
call ma_free_root
mov rdi, rbx
xor esi, esi
call ma_free_root
mov rdi, r12
xor esi, esi
call ma_free_root
mov rax, [rbx+38h]
test rax, rax
jz loc_248E2
mov dword ptr [rax+90h], 0
mov rax, [rbx+38h]
mov word ptr [rax+29Bh], 30h ; '0'
mov dword ptr [rax+297h], 30303030h
mov rax, [rbx+38h]
mov byte ptr [rax+97h], 0
mov rax, [rbx+38h]
mov rcx, [rax+2A0h]
test rcx, rcx
jz short loc_247F0
mov dword ptr [rcx+4], 0
mov rax, [rbx+38h]
loc_247F0:
test r14b, r14b
jz short loc_24817
mov rdi, [rax+4C8h]
lea rsi, [rbx+320h]
call list_delete
mov rcx, [rbx+38h]
mov [rcx+4C8h], rax
mov rax, [rbx+38h]
loc_24817:
cmp dword ptr [rax+488h], 0
jz short loc_2484F
loc_24820:
mov rax, [rax+4D0h]
mov rdi, rbx
call qword ptr [rax+78h]
mov rax, [rbx+38h]
test rax, rax
jz short loc_24845
movzx ecx, word ptr [rax+380h]
test ecx, 1008h
jnz short loc_24820
loc_24845:
mov dword ptr [rax+488h], 0
loc_2484F:
cmp dword ptr [rbx+50h], 0
jz loc_248DF
mov eax, [rbx+40h]
lea rdx, [rbp+var_2C]
mov [rdx], eax
mov rdi, [rbx+38h]
mov rax, [rdi+4D0h]
mov ecx, 4
mov esi, 19h
mov r8d, 1
mov r9, rbx
call qword ptr [rax+10h]
test eax, eax
jz short loc_248DF
mov rsi, [rbx+38h]
mov eax, [rsi+90h]
mov [rbx+108h], eax
lea rdi, [rbx+30Dh]
add rsi, 297h
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
mov esi, 97h
add rsi, [rbx+38h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov r15b, 1
jmp short loc_248E2
loc_248DF:
xor r15d, r15d
loc_248E2:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_24901
mov eax, r15d
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_24901:
call ___stack_chk_fail
| long long net_stmt_close(long long a1, char a2)
{
long long v2; // r12
unsigned int v3; // r15d
long long v4; // rax
long long v5; // rax
long long v6; // rcx
long long v7; // rsi
int v9; // [rsp+4h] [rbp-2Ch] BYREF
unsigned long long v10; // [rsp+8h] [rbp-28h]
v10 = __readfsqword(0x28u);
v2 = *(_QWORD *)(a1 + 832);
v3 = 0;
ma_free_root(a1 + 144, 0);
ma_free_root(a1, 0);
ma_free_root(v2, 0);
v4 = *(_QWORD *)(a1 + 56);
if ( v4 )
{
*(_DWORD *)(v4 + 144) = 0;
strcpy((char *)(*(_QWORD *)(a1 + 56) + 663LL), "00000");
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0;
v5 = *(_QWORD *)(a1 + 56);
v6 = *(_QWORD *)(v5 + 672);
if ( v6 )
{
*(_DWORD *)(v6 + 4) = 0;
v5 = *(_QWORD *)(a1 + 56);
}
if ( a2 )
{
*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1224LL) = list_delete(*(_QWORD **)(v5 + 1224), (_QWORD *)(a1 + 800));
v5 = *(_QWORD *)(a1 + 56);
}
if ( *(_DWORD *)(v5 + 1160) )
{
do
{
(*(void ( **)(long long))(*(_QWORD *)(v5 + 1232) + 120LL))(a1);
v5 = *(_QWORD *)(a1 + 56);
}
while ( v5 && (*(_WORD *)(v5 + 896) & 0x1008) != 0 );
*(_DWORD *)(v5 + 1160) = 0;
}
if ( *(_DWORD *)(a1 + 80)
&& (v9 = *(_DWORD *)(a1 + 64),
(*(unsigned int ( **)(_QWORD, long long, int *, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL)
+ 16LL))(
*(_QWORD *)(a1 + 56),
25LL,
&v9,
4LL,
1LL,
a1)) )
{
v7 = *(_QWORD *)(a1 + 56);
*(_DWORD *)(a1 + 264) = *(_DWORD *)(v7 + 144);
strncpy(a1 + 781, v7 + 663, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, *(_QWORD *)(a1 + 56) + 151LL, 512LL);
*(_BYTE *)(a1 + 779) = 0;
LOBYTE(v3) = 1;
}
else
{
return 0;
}
}
return v3;
}
| net_stmt_close:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R14D,ESI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV R12,qword ptr [RDI + 0x340]
ADD RDI,0x90
XOR R15D,R15D
XOR ESI,ESI
CALL 0x00122757
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00122757
MOV RDI,R12
XOR ESI,ESI
CALL 0x00122757
MOV RAX,qword ptr [RBX + 0x38]
TEST RAX,RAX
JZ 0x001248e2
MOV dword ptr [RAX + 0x90],0x0
MOV RAX,qword ptr [RBX + 0x38]
MOV word ptr [RAX + 0x29b],0x30
MOV dword ptr [RAX + 0x297],0x30303030
MOV RAX,qword ptr [RBX + 0x38]
MOV byte ptr [RAX + 0x97],0x0
MOV RAX,qword ptr [RBX + 0x38]
MOV RCX,qword ptr [RAX + 0x2a0]
TEST RCX,RCX
JZ 0x001247f0
MOV dword ptr [RCX + 0x4],0x0
MOV RAX,qword ptr [RBX + 0x38]
LAB_001247f0:
TEST R14B,R14B
JZ 0x00124817
MOV RDI,qword ptr [RAX + 0x4c8]
LEA RSI,[RBX + 0x320]
CALL 0x001217f4
MOV RCX,qword ptr [RBX + 0x38]
MOV qword ptr [RCX + 0x4c8],RAX
MOV RAX,qword ptr [RBX + 0x38]
LAB_00124817:
CMP dword ptr [RAX + 0x488],0x0
JZ 0x0012484f
LAB_00124820:
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RDI,RBX
CALL qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RBX + 0x38]
TEST RAX,RAX
JZ 0x00124845
MOVZX ECX,word ptr [RAX + 0x380]
TEST ECX,0x1008
JNZ 0x00124820
LAB_00124845:
MOV dword ptr [RAX + 0x488],0x0
LAB_0012484f:
CMP dword ptr [RBX + 0x50],0x0
JZ 0x001248df
MOV EAX,dword ptr [RBX + 0x40]
LEA RDX,[RBP + -0x2c]
MOV dword ptr [RDX],EAX
MOV RDI,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RDI + 0x4d0]
MOV ECX,0x4
MOV ESI,0x19
MOV R8D,0x1
MOV R9,RBX
CALL qword ptr [RAX + 0x10]
TEST EAX,EAX
JZ 0x001248df
MOV RSI,qword ptr [RBX + 0x38]
MOV EAX,dword ptr [RSI + 0x90]
MOV dword ptr [RBX + 0x108],EAX
LEA RDI,[RBX + 0x30d]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00113230
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
MOV ESI,0x97
ADD RSI,qword ptr [RBX + 0x38]
MOV EDX,0x200
CALL 0x00113230
MOV byte ptr [RBX + 0x30b],R14B
MOV R15B,0x1
JMP 0x001248e2
LAB_001248df:
XOR R15D,R15D
LAB_001248e2:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00124901
MOV EAX,R15D
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00124901:
CALL 0x00113510
|
int8 net_stmt_close(long param_1,char param_2)
{
int iVar1;
int8 uVar2;
long lVar3;
int8 uVar4;
long in_FS_OFFSET;
int4 local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = *(int8 *)(param_1 + 0x340);
uVar4 = 0;
ma_free_root(param_1 + 0x90,0);
ma_free_root(param_1,0);
ma_free_root(uVar2,0);
if (*(long *)(param_1 + 0x38) != 0) {
*(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0;
lVar3 = *(long *)(param_1 + 0x38);
*(int2 *)(lVar3 + 0x29b) = 0x30;
*(int4 *)(lVar3 + 0x297) = 0x30303030;
*(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0;
lVar3 = *(long *)(param_1 + 0x38);
if (*(long *)(lVar3 + 0x2a0) != 0) {
*(int4 *)(*(long *)(lVar3 + 0x2a0) + 4) = 0;
lVar3 = *(long *)(param_1 + 0x38);
}
if (param_2 != '\0') {
uVar2 = list_delete(*(int8 *)(lVar3 + 0x4c8),param_1 + 800);
*(int8 *)(*(long *)(param_1 + 0x38) + 0x4c8) = uVar2;
lVar3 = *(long *)(param_1 + 0x38);
}
if (*(int *)(lVar3 + 0x488) != 0) {
do {
(**(code **)(*(long *)(lVar3 + 0x4d0) + 0x78))(param_1);
lVar3 = *(long *)(param_1 + 0x38);
if (lVar3 == 0) break;
} while ((*(ushort *)(lVar3 + 0x380) & 0x1008) != 0);
*(int4 *)(lVar3 + 0x488) = 0;
}
if (*(int *)(param_1 + 0x50) != 0) {
local_34 = *(int4 *)(param_1 + 0x40);
iVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x10))
(*(long *)(param_1 + 0x38),0x19,&local_34,4,1,param_1);
if (iVar1 != 0) {
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),(char *)(*(long *)(param_1 + 0x38) + 0x97),0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar4 = 1;
goto LAB_001248e2;
}
}
uVar4 = 0;
}
LAB_001248e2:
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return uVar4;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
42,322 | get_collation_number | eloqsql/mysys/charset.c | uint get_collation_number(const char *name, myf flags)
{
uint id;
char alias[64];
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_collation_number_internal(name)))
return id;
if ((name= get_collation_name_alias(name, alias, sizeof(alias),flags)))
return get_collation_number_internal(name);
return 0;
} | O3 | c | get_collation_number:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq 0xb7c778(%rip), %rdi # 0xc13c30
leaq 0x80(%rip), %rsi # 0x9753f
callq 0x2a210
movq %rbx, %rdi
callq 0x976bf
testl %eax, %eax
jne 0x97522
leaq 0x4d219(%rip), %rsi # 0xe46f0
movl $0x5, %edx
movq %rbx, %rdi
callq 0x2a780
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x97522
btl $0xa, %r14d
movl $0x33, %ecx
sbbl $-0x1, %ecx
addq $0x5, %rbx
leaq 0x4d1f2(%rip), %rdx # 0xe46f6
leaq -0x60(%rbp), %r14
movl $0x40, %esi
movq %r14, %rdi
movq %rbx, %r8
xorl %eax, %eax
callq 0xdf896
movq %r14, %rdi
callq 0x976bf
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x9753a
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2a240
| get_collation_number:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, rbx
call get_collation_number_internal
test eax, eax
jnz short loc_97522
lea rsi, aUtf8_0; "utf8_"
mov edx, 5
mov rdi, rbx
call _strncasecmp
mov ecx, eax
xor eax, eax
test ecx, ecx
jnz short loc_97522
bt r14d, 0Ah
mov ecx, 33h ; '3'
sbb ecx, 0FFFFFFFFh
add rbx, 5
lea rdx, aUtf8mbCS; "utf8mb%c_%s"
lea r14, [rbp+var_60]
mov esi, 40h ; '@'
mov rdi, r14
mov r8, rbx
xor eax, eax
call my_snprintf
mov rdi, r14
call get_collation_number_internal
loc_97522:
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_9753A
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_9753A:
call ___stack_chk_fail
| long long get_collation_number(long long a1, __int16 a2)
{
long long result; // rax
int v3; // ecx
int v4; // r9d
char v5[72]; // [rsp+0h] [rbp-60h] BYREF
unsigned long long v6; // [rsp+48h] [rbp-18h]
v6 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
result = get_collation_number_internal(a1);
if ( !(_DWORD)result )
{
v3 = strncasecmp(a1, "utf8_", 5LL);
result = 0LL;
if ( !v3 )
{
my_snprintf((unsigned int)v5, 64, (unsigned int)"utf8mb%c_%s", 51 - (((a2 & 0x400) != 0) - 1), a1 + 5, v4, v5[0]);
return get_collation_number_internal(v5);
}
}
return result;
}
| get_collation_number:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[0xd13c30]
LEA RSI,[0x19753f]
CALL 0x0012a210
MOV RDI,RBX
CALL 0x001976bf
TEST EAX,EAX
JNZ 0x00197522
LEA RSI,[0x1e46f0]
MOV EDX,0x5
MOV RDI,RBX
CALL 0x0012a780
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
JNZ 0x00197522
BT R14D,0xa
MOV ECX,0x33
SBB ECX,-0x1
ADD RBX,0x5
LEA RDX,[0x1e46f6]
LEA R14,[RBP + -0x60]
MOV ESI,0x40
MOV RDI,R14
MOV R8,RBX
XOR EAX,EAX
CALL 0x001df896
MOV RDI,R14
CALL 0x001976bf
LAB_00197522:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x0019753a
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_0019753a:
CALL 0x0012a240
|
int8 get_collation_number(char *param_1,uint param_2)
{
int iVar1;
int8 uVar2;
long in_FS_OFFSET;
int1 local_68 [72];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
uVar2 = get_collation_number_internal(param_1);
if ((int)uVar2 == 0) {
iVar1 = strncasecmp(param_1,"utf8_",5);
uVar2 = 0;
if (iVar1 == 0) {
my_snprintf(local_68,0x40,"utf8mb%c_%s",0x34 - (uint)((param_2 >> 10 & 1) != 0),param_1 + 5);
uVar2 = get_collation_number_internal(local_68);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return uVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
42,323 | net_field_length_ll | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static unsigned long long
net_field_length_ll(uchar **packet)
{
reg1 uchar *pos= *packet;
if (*pos < 251)
{
(*packet)++;
return (unsigned long long) *pos;
}
if (*pos == 251)
{
(*packet)++;
return (unsigned long long) NULL_LENGTH;
}
if (*pos == 252)
{
(*packet)+=3;
return (unsigned long long) uint2korr(pos+1);
}
if (*pos == 253)
{
(*packet)+=4;
return (unsigned long long) uint3korr(pos+1);
}
(*packet)+=9; /* Must be 254 when here */
#ifdef NO_CLIENT_LONGLONG
return (unsigned long long) uint4korr(pos+1);
#else
return (unsigned long long) uint8korr(pos+1);
#endif
} | O0 | c | net_field_length_ll:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfb, %eax
jge 0x1efbf
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq %rax, -0x8(%rbp)
jmp 0x1f0ec
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfb, %eax
jne 0x1efe8
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0x1f0ec
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfc, %eax
jne 0x1f02b
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x3, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %eax
movq %rax, -0x8(%rbp)
jmp 0x1f0ec
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfd, %eax
jne 0x1f071
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x4, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movl %eax, %eax
movq %rax, -0x8(%rbp)
jmp 0x1f0ec
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x9, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
shll $0x18, %ecx
addl %ecx, %eax
movl %eax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
movq -0x18(%rbp), %rdx
movzbl 0x6(%rdx), %edx
shll $0x8, %edx
addl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl 0x7(%rdx), %edx
shll $0x10, %edx
addl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl 0x8(%rdx), %edx
shll $0x18, %edx
addl %edx, %ecx
movl %ecx, %ecx
shlq $0x20, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| net_field_length_ll:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FBh
jge short loc_1EFBF
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov [rbp+var_8], rax
jmp loc_1F0EC
loc_1EFBF:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FBh
jnz short loc_1EFE8
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_1F0EC
loc_1EFE8:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FCh
jnz short loc_1F02B
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 3
mov [rax], rcx
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx eax, ax
mov [rbp+var_8], rax
jmp loc_1F0EC
loc_1F02B:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FDh
jnz short loc_1F071
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 4
mov [rax], rcx
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+3]
shl ecx, 10h
add eax, ecx
mov eax, eax
mov [rbp+var_8], rax
jmp short loc_1F0EC
loc_1F071:
mov rax, [rbp+var_10]
mov rcx, [rax]
add rcx, 9
mov [rax], rcx
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+3]
shl ecx, 10h
add eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+4]
shl ecx, 18h
add eax, ecx
mov eax, eax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+5]
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+6]
shl edx, 8
add ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+7]
shl edx, 10h
add ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+8]
shl edx, 18h
add ecx, edx
mov ecx, ecx
shl rcx, 20h
add rax, rcx
mov [rbp+var_8], rax
loc_1F0EC:
mov rax, [rbp+var_8]
pop rbp
retn
| unsigned long long net_field_length_ll(unsigned __int8 **a1)
{
unsigned __int8 *v3; // [rsp+0h] [rbp-18h]
v3 = *a1;
if ( **a1 >= 0xFBu )
{
switch ( *v3 )
{
case 0xFBu:
++*a1;
return -1LL;
case 0xFCu:
*a1 += 3;
return (unsigned __int16)((v3[2] << 8) + v3[1]);
case 0xFDu:
*a1 += 4;
return (v3[3] << 16) + (v3[2] << 8) + (unsigned int)v3[1];
default:
*a1 += 9;
return ((unsigned long long)((v3[8] << 24) + (v3[7] << 16) + (v3[6] << 8) + (unsigned int)v3[5]) << 32)
+ (v3[4] << 24)
+ (v3[3] << 16)
+ (v3[2] << 8)
+ (unsigned int)v3[1];
}
}
else
{
++*a1;
return *v3;
}
}
| net_field_length_ll:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfb
JGE 0x0011efbf
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0011f0ec
LAB_0011efbf:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfb
JNZ 0x0011efe8
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x0011f0ec
LAB_0011efe8:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfc
JNZ 0x0011f02b
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x3
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX EAX,AX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0011f0ec
LAB_0011f02b:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfd
JNZ 0x0011f071
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x3]
SHL ECX,0x10
ADD EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0011f0ec
LAB_0011f071:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
ADD RCX,0x9
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x3]
SHL ECX,0x10
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x4]
SHL ECX,0x18
ADD EAX,ECX
MOV EAX,EAX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x5]
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x6]
SHL EDX,0x8
ADD ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x7]
SHL EDX,0x10
ADD ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x8]
SHL EDX,0x18
ADD ECX,EDX
MOV ECX,ECX
SHL RCX,0x20
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_0011f0ec:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong net_field_length_ll(long *param_1)
{
byte *pbVar1;
ulong local_10;
pbVar1 = (byte *)*param_1;
if (*pbVar1 < 0xfb) {
*param_1 = *param_1 + 1;
local_10 = (ulong)*pbVar1;
}
else if (*pbVar1 == 0xfb) {
*param_1 = *param_1 + 1;
local_10 = 0xffffffffffffffff;
}
else if (*pbVar1 == 0xfc) {
*param_1 = *param_1 + 3;
local_10 = (ulong)((uint)pbVar1[1] + (uint)pbVar1[2] * 0x100 & 0xffff);
}
else if (*pbVar1 == 0xfd) {
*param_1 = *param_1 + 4;
local_10 = (ulong)((uint)pbVar1[1] + (uint)pbVar1[2] * 0x100 + (uint)pbVar1[3] * 0x10000);
}
else {
*param_1 = *param_1 + 9;
local_10 = CONCAT44((uint)pbVar1[5] + (uint)pbVar1[6] * 0x100 + (uint)pbVar1[7] * 0x10000 +
(uint)pbVar1[8] * 0x1000000,
(uint)pbVar1[1] + (uint)pbVar1[2] * 0x100 + (uint)pbVar1[3] * 0x10000 +
(uint)pbVar1[4] * 0x1000000);
}
return local_10;
}
| |
42,324 | my_error_unregister | eloqsql/mysys/my_error.c | my_bool my_error_unregister(uint first, uint last)
{
struct my_err_head *meh_p;
struct my_err_head **search_meh_pp;
/* Search for the registration in the list. */
for (search_meh_pp= &my_errmsgs_list;
*search_meh_pp;
search_meh_pp= &(*search_meh_pp)->meh_next)
{
if (((*search_meh_pp)->meh_first == first) &&
((*search_meh_pp)->meh_last == last))
break;
}
if (! *search_meh_pp)
return TRUE;
/* Remove header from the chain. */
meh_p= *search_meh_pp;
*search_meh_pp= meh_p->meh_next;
my_free(meh_p);
return FALSE;
} | O3 | c | my_error_unregister:
movq 0x2e7701(%rip), %r8 # 0x3857a8
movb $0x1, %al
testq %r8, %r8
je 0x9e0e5
pushq %rbp
movq %rsp, %rbp
leaq 0x2e76ef(%rip), %rdx # 0x3857a8
movq %r8, %rcx
cmpl %edi, 0x10(%r8)
jne 0x9e0c7
cmpl %esi, 0x14(%rcx)
je 0x9e0d4
movq (%rcx), %r8
movq %rcx, %rdx
testq %r8, %r8
jne 0x9e0b9
jmp 0x9e0e4
movq (%rcx), %rax
movq %rax, (%rdx)
movq %rcx, %rdi
callq 0x9fbaa
xorl %eax, %eax
popq %rbp
retq
| my_error_unregister:
mov r8, cs:my_errmsgs_list
mov al, 1
test r8, r8
jz short locret_9E0E5
push rbp
mov rbp, rsp
lea rdx, my_errmsgs_list
loc_9E0B9:
mov rcx, r8
cmp [r8+10h], edi
jnz short loc_9E0C7
cmp [rcx+14h], esi
jz short loc_9E0D4
loc_9E0C7:
mov r8, [rcx]
mov rdx, rcx
test r8, r8
jnz short loc_9E0B9
jmp short loc_9E0E4
loc_9E0D4:
mov rax, [rcx]
mov [rdx], rax
mov rdi, rcx
call my_free
xor eax, eax
loc_9E0E4:
pop rbp
locret_9E0E5:
retn
| char my_error_unregister(int a1, int a2)
{
long long *v2; // r8
char result; // al
long long **v4; // rdx
long long *v5; // rcx
v2 = my_errmsgs_list;
result = 1;
if ( my_errmsgs_list )
{
v4 = &my_errmsgs_list;
while ( 1 )
{
v5 = v2;
if ( *((_DWORD *)v2 + 4) == a1 && *((_DWORD *)v2 + 5) == a2 )
break;
v2 = (long long *)*v2;
v4 = (long long **)v5;
if ( !*v5 )
return result;
}
*v4 = (long long *)*v2;
my_free(v2);
return 0;
}
return result;
}
| my_error_unregister:
MOV R8,qword ptr [0x004857a8]
MOV AL,0x1
TEST R8,R8
JZ 0x0019e0e5
PUSH RBP
MOV RBP,RSP
LEA RDX,[0x4857a8]
LAB_0019e0b9:
MOV RCX,R8
CMP dword ptr [R8 + 0x10],EDI
JNZ 0x0019e0c7
CMP dword ptr [RCX + 0x14],ESI
JZ 0x0019e0d4
LAB_0019e0c7:
MOV R8,qword ptr [RCX]
MOV RDX,RCX
TEST R8,R8
JNZ 0x0019e0b9
JMP 0x0019e0e4
LAB_0019e0d4:
MOV RAX,qword ptr [RCX]
MOV qword ptr [RDX],RAX
MOV RDI,RCX
CALL 0x0019fbaa
XOR EAX,EAX
LAB_0019e0e4:
POP RBP
LAB_0019e0e5:
RET
|
int8 my_error_unregister(int param_1,int param_2)
{
int **ppuVar1;
int **ppuVar2;
int **ppuVar3;
if (my_errmsgs_list != (int *)0x0) {
ppuVar2 = &my_errmsgs_list;
ppuVar3 = (int **)my_errmsgs_list;
do {
if ((*(int *)(ppuVar3 + 2) == param_1) && (*(int *)((long)ppuVar3 + 0x14) == param_2)) {
*ppuVar2 = *ppuVar3;
my_free(ppuVar3);
return 0;
}
ppuVar1 = (int **)*ppuVar3;
ppuVar2 = ppuVar3;
ppuVar3 = ppuVar1;
} while (ppuVar1 != (int **)0x0);
}
return 1;
}
| |
42,325 | mi_read_static_record | eloqsql/storage/myisam/mi_statrec.c | int _mi_read_static_record(register MI_INFO *info, register my_off_t pos,
register uchar *record)
{
int error;
if (pos != HA_OFFSET_ERROR)
{
if (info->opt_flag & WRITE_CACHE_USED &&
info->rec_cache.pos_in_file <= pos &&
flush_io_cache(&info->rec_cache))
return(-1);
info->rec_cache.seek_not_done=1; /* We have done a seek */
error=info->s->file_read(info, record, info->s->base.reclength,
pos,MYF(MY_NABP)) != 0;
fast_mi_writeinfo(info);
if (! error)
{
if (!*record)
{
my_errno=HA_ERR_RECORD_DELETED;
return(1); /* Record is deleted */
}
info->update|= HA_STATE_AKTIV; /* Record is read */
return(0);
}
return(-1); /* Error on read */
}
fast_mi_writeinfo(info); /* No such record */
return(-1);
} | O3 | c | mi_read_static_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpq $-0x1, %rsi
je 0x41df7
movq %rdx, %r14
movq %rsi, %r15
testb $0x10, 0x1c8(%rbx)
je 0x41d98
cmpq %r15, 0x220(%rbx)
ja 0x41d98
leaq 0x220(%rbx), %rdi
movl $0x1, %esi
callq 0x53bfd
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x41e26
movl $0x1, 0x300(%rbx)
movq (%rbx), %rax
movq 0x140(%rax), %rdx
movl $0x4, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq *0x2e0(%rax)
movq %rax, %r15
movq (%rbx), %rax
cmpl $0x0, 0x368(%rax)
jne 0x41dda
movq %rbx, %rdi
xorl %esi, %esi
callq 0x376fe
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testq %r15, %r15
jne 0x41e26
cmpb $0x0, (%r14)
je 0x41e15
orb $0x2, 0x1d0(%rbx)
xorl %r12d, %r12d
jmp 0x41e26
movq (%rbx), %rax
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
cmpl $0x0, 0x368(%rax)
jne 0x41e26
movq %rbx, %rdi
xorl %esi, %esi
callq 0x376fe
jmp 0x41e26
callq 0x624a2
movl $0x86, (%rax)
movl $0x1, %r12d
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _mi_read_static_record:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
cmp rsi, 0FFFFFFFFFFFFFFFFh
jz loc_41DF7
mov r14, rdx
mov r15, rsi
test byte ptr [rbx+1C8h], 10h
jz short loc_41D98
cmp [rbx+220h], r15
ja short loc_41D98
lea rdi, [rbx+220h]
mov esi, 1
call my_b_flush_io_cache
mov r12d, 0FFFFFFFFh
test eax, eax
jnz loc_41E26
loc_41D98:
mov dword ptr [rbx+300h], 1
mov rax, [rbx]
mov rdx, [rax+140h]
mov r8d, 4
mov rdi, rbx
mov rsi, r14
mov rcx, r15
call qword ptr [rax+2E0h]
mov r15, rax
mov rax, [rbx]
cmp dword ptr [rax+368h], 0
jnz short loc_41DDA
mov rdi, rbx
xor esi, esi
call _mi_writeinfo
loc_41DDA:
mov r12d, 0FFFFFFFFh
test r15, r15
jnz short loc_41E26
cmp byte ptr [r14], 0
jz short loc_41E15
or byte ptr [rbx+1D0h], 2
xor r12d, r12d
jmp short loc_41E26
loc_41DF7:
mov rax, [rbx]
mov r12d, 0FFFFFFFFh
cmp dword ptr [rax+368h], 0
jnz short loc_41E26
mov rdi, rbx
xor esi, esi
call _mi_writeinfo
jmp short loc_41E26
loc_41E15:
call _my_thread_var
mov dword ptr [rax], 86h
mov r12d, 1
loc_41E26:
mov eax, r12d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long mi_read_static_record(long long a1, unsigned long long a2, _BYTE *a3)
{
unsigned int v5; // r12d
_BYTE *v6; // rsi
long long v7; // rdx
long long v8; // r15
if ( a2 == -1LL )
{
v5 = -1;
if ( !*(_DWORD *)(*(_QWORD *)a1 + 872LL) )
mi_writeinfo((long long *)a1, 0LL, (long long)a3);
}
else if ( (*(_BYTE *)(a1 + 456) & 0x10) == 0
|| *(_QWORD *)(a1 + 544) > a2
|| (v5 = -1, !(unsigned int)my_b_flush_io_cache(a1 + 544, 1LL)) )
{
*(_DWORD *)(a1 + 768) = 1;
v6 = a3;
v8 = (*(long long ( **)(long long, _BYTE *, _QWORD, unsigned long long, long long))(*(_QWORD *)a1 + 736LL))(
a1,
a3,
*(_QWORD *)(*(_QWORD *)a1 + 320LL),
a2,
4LL);
if ( !*(_DWORD *)(*(_QWORD *)a1 + 872LL) )
{
v6 = 0LL;
mi_writeinfo((long long *)a1, 0LL, v7);
}
v5 = -1;
if ( !v8 )
{
if ( *a3 )
{
*(_BYTE *)(a1 + 464) |= 2u;
return 0;
}
else
{
*(_DWORD *)my_thread_var(a1, v6, v7) = 134;
return 1;
}
}
}
return v5;
}
| _mi_read_static_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
CMP RSI,-0x1
JZ 0x00141df7
MOV R14,RDX
MOV R15,RSI
TEST byte ptr [RBX + 0x1c8],0x10
JZ 0x00141d98
CMP qword ptr [RBX + 0x220],R15
JA 0x00141d98
LEA RDI,[RBX + 0x220]
MOV ESI,0x1
CALL 0x00153bfd
MOV R12D,0xffffffff
TEST EAX,EAX
JNZ 0x00141e26
LAB_00141d98:
MOV dword ptr [RBX + 0x300],0x1
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RAX + 0x140]
MOV R8D,0x4
MOV RDI,RBX
MOV RSI,R14
MOV RCX,R15
CALL qword ptr [RAX + 0x2e0]
MOV R15,RAX
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x00141dda
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001376fe
LAB_00141dda:
MOV R12D,0xffffffff
TEST R15,R15
JNZ 0x00141e26
CMP byte ptr [R14],0x0
JZ 0x00141e15
OR byte ptr [RBX + 0x1d0],0x2
XOR R12D,R12D
JMP 0x00141e26
LAB_00141df7:
MOV RAX,qword ptr [RBX]
MOV R12D,0xffffffff
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x00141e26
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001376fe
JMP 0x00141e26
LAB_00141e15:
CALL 0x001624a2
MOV dword ptr [RAX],0x86
MOV R12D,0x1
LAB_00141e26:
MOV EAX,R12D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 _mi_read_static_record(long *param_1,ulong param_2,char *param_3)
{
int iVar1;
long lVar2;
int4 *puVar3;
int8 uVar4;
if (param_2 == 0xffffffffffffffff) {
uVar4 = 0xffffffff;
if (*(int *)(*param_1 + 0x368) == 0) {
_mi_writeinfo(param_1,0);
}
}
else {
if ((((*(byte *)(param_1 + 0x39) & 0x10) != 0) && ((ulong)param_1[0x44] <= param_2)) &&
(iVar1 = my_b_flush_io_cache(param_1 + 0x44,1), iVar1 != 0)) {
return 0xffffffff;
}
*(int4 *)(param_1 + 0x60) = 1;
lVar2 = (**(code **)(*param_1 + 0x2e0))
(param_1,param_3,*(int8 *)(*param_1 + 0x140),param_2,4);
if (*(int *)(*param_1 + 0x368) == 0) {
_mi_writeinfo(param_1,0);
}
uVar4 = 0xffffffff;
if (lVar2 == 0) {
if (*param_3 == '\0') {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x86;
uVar4 = 1;
}
else {
*(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 2;
uVar4 = 0;
}
}
}
return uVar4;
}
| |
42,326 | minja::Parser::parseExpression(bool) | monkey531[P]llama/common/./minja.hpp | std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) {
auto left = parseLogicalOr();
if (it == end) return left;
if (!allow_if_expr) return left;
static std::regex if_tok(R"(if\b)");
if (consumeToken(if_tok).empty()) {
return left;
}
auto location = get_location();
auto [condition, else_expr] = parseIfExpression();
return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr));
} | O2 | cpp | minja::Parser::parseExpression(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x39e4e
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x2f2dd
testb %bpl, %bpl
je 0x2f2dd
movb 0xb3b33(%rip), %al # 0xe2d78
testb %al, %al
je 0x2f307
leaq 0xb3b04(%rip), %rdx # 0xe2d58
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x2f3f2
leaq 0x18(%rsp), %rdi
movq 0x8(%rdi), %r15
callq 0x20d78
testq %r15, %r15
je 0x2f2dd
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x2efae
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x3a04e
leaq 0x28(%rsp), %r8
leaq 0x50(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movq %rsp, %rcx
callq 0x3a23c
leaq 0x58(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x2eeb2
leaq 0x18(%rsp), %rdi
callq 0x3a264
leaq 0x40(%rsp), %rdi
callq 0x2eeb2
jmp 0x2f2ef
movaps (%rsp), %xmm0
andq $0x0, 0x8(%rsp)
movups %xmm0, (%rbx)
andq $0x0, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x2eeb2
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb3a6a(%rip), %rdi # 0xe2d78
callq 0x20bf0
testl %eax, %eax
je 0x2f24d
leaq 0xb3a36(%rip), %rdi # 0xe2d58
leaq 0x69f9e(%rip), %rsi # 0x992c7
pushq $0x10
popq %rdx
callq 0x2ef2e
leaq -0x3a4(%rip), %rdi # 0x2ef94
leaq 0xb3a19(%rip), %rsi # 0xe2d58
leaq 0xb3382(%rip), %rdx # 0xe26c8
callq 0x205f0
leaq 0xb3a26(%rip), %rdi # 0xe2d78
callq 0x20480
jmp 0x2f24d
movq %rax, %rbx
leaq 0xb3a12(%rip), %rdi # 0xe2d78
callq 0x20470
jmp 0x2f390
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3a264
jmp 0x2f37f
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2eeb2
jmp 0x2f390
jmp 0x2f38d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2eeb2
movq %rbx, %rdi
callq 0x20b90
| _ZN5minja6Parser15parseExpressionEb:
push rbp
push r15
push r14
push rbx
sub rsp, 68h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rdi, rsp; this
call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void)
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz loc_2F2DD
test bpl, bpl
jz loc_2F2DD
mov al, cs:_ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok
test al, al
jz loc_2F307
loc_2F24D:
lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rdi, [rsp+88h+var_70]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+88h+var_70]; void *
mov r15, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15, r15
jz short loc_2F2DD
lea rdi, [rsp+88h+var_50]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rdi, [rsp+88h+var_70]; this
mov rsi, r14
call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void)
lea r8, [rsp+88h+var_60]
lea rdi, [rsp+88h+var_38]
lea rsi, [rsp+88h+var_50]
lea rdx, [rsp+88h+var_70]
mov rcx, rsp
call _ZSt11make_sharedIN5minja6IfExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEES6_S6_EES4_IT_EDpOT0_; std::make_shared<minja::IfExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>(minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression> &&)
lea rdi, [rsp+88h+var_30]
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+88h+var_70]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
lea rdi, [rsp+88h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_2F2EF
loc_2F2DD:
movaps xmm0, [rsp+88h+var_88]
and qword ptr [rsp+88h+var_88+8], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rsp+88h+var_88], 0
loc_2F2EF:
lea rdi, [rsp+88h+var_88+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_2F307:
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_2F24D
lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rsi, aIfB; "if\\b"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_2F24D
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_2F390
mov rbx, rax
lea rdi, [rsp+arg_10]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
jmp short loc_2F37F
mov rbx, rax
loc_2F37F:
lea rdi, [rsp+arg_38]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_2F390
jmp short $+2
loc_2F38D:
mov rbx, rax
loc_2F390:
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseExpression(minja::Parser *this, _QWORD *a2, char a3)
{
int v4; // r8d
int v5; // r9d
long long v6; // r15
__int128 v7; // xmm0
__int128 v8; // xmm0
__int128 v10; // [rsp+0h] [rbp-88h] BYREF
_BYTE v11[8]; // [rsp+18h] [rbp-70h] BYREF
long long v12; // [rsp+20h] [rbp-68h]
_BYTE v13[16]; // [rsp+28h] [rbp-60h] BYREF
_BYTE v14[8]; // [rsp+38h] [rbp-50h] BYREF
long long v15; // [rsp+40h] [rbp-48h] BYREF
_OWORD v16[3]; // [rsp+50h] [rbp-38h] BYREF
minja::Parser::parseLogicalOr((minja::Parser *)&v10);
if ( a2[4] == a2[3] || !a3 )
goto LABEL_6;
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
"if\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(unsigned int)v11,
(_DWORD)a2,
(unsigned int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
1,
v4,
v5,
v10,
SBYTE8(v10));
v6 = v12;
std::string::~string(v11);
if ( v6 )
{
minja::Parser::get_location((minja::Parser *)v14, a2);
minja::Parser::parseIfExpression((minja::Parser *)v11);
std::make_shared<minja::IfExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>(
v16,
v14,
v11,
&v10,
v13);
v7 = v16[0];
*((_QWORD *)&v16[0] + 1) = 0LL;
*(_OWORD *)this = v7;
*(_QWORD *)&v16[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v16 + 1);
std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair(v11);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15);
}
else
{
LABEL_6:
v8 = v10;
*((_QWORD *)&v10 + 1) = 0LL;
*(_OWORD *)this = v8;
*(_QWORD *)&v10 = 0LL;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v10 + 1);
return this;
}
| parseExpression:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x00139e4e
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x0012f2dd
TEST BPL,BPL
JZ 0x0012f2dd
MOV AL,byte ptr [0x001e2d78]
TEST AL,AL
JZ 0x0012f307
LAB_0012f24d:
LEA RDX,[0x1e2d58]
LEA RDI,[RSP + 0x18]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x0012f3f2
LEA RDI,[RSP + 0x18]
MOV R15,qword ptr [RDI + 0x8]
CALL 0x00120d78
TEST R15,R15
JZ 0x0012f2dd
LAB_0012f277:
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x0012efae
LAB_0012f284:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x0013a04e
LEA R8,[RSP + 0x28]
LAB_0012f296:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x38]
LEA RDX,[RSP + 0x18]
MOV RCX,RSP
CALL 0x0013a23c
LEA RDI,[RSP + 0x58]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x0012eeb2
LEA RDI,[RSP + 0x18]
CALL 0x0013a264
LEA RDI,[RSP + 0x40]
CALL 0x0012eeb2
JMP 0x0012f2ef
LAB_0012f2dd:
MOVAPS XMM0,xmmword ptr [RSP]
AND qword ptr [RSP + 0x8],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RSP],0x0
LAB_0012f2ef:
LEA RDI,[RSP + 0x8]
CALL 0x0012eeb2
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0012f307:
LEA RDI,[0x1e2d78]
CALL 0x00120bf0
TEST EAX,EAX
JZ 0x0012f24d
LAB_0012f31b:
LEA RDI,[0x1e2d58]
LEA RSI,[0x1992c7]
PUSH 0x10
POP RDX
CALL 0x0012ef2e
LAB_0012f331:
LEA RDI,[0x12ef94]
LEA RSI,[0x1e2d58]
LEA RDX,[0x1e26c8]
CALL 0x001205f0
LEA RDI,[0x1e2d78]
CALL 0x00120480
JMP 0x0012f24d
|
/* minja::Parser::parseExpression(bool) */
int8 * minja::Parser::parseExpression(bool param_1)
{
int8 uVar1;
int iVar2;
char in_DL;
long in_RSI;
int7 in_register_00000039;
int8 *puVar3;
int8 local_88;
int8 auStack_80 [2];
string local_70 [8];
long local_68;
shared_ptr local_50 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [16];
int8 local_38;
int8 auStack_30 [2];
puVar3 = (int8 *)CONCAT71(in_register_00000039,param_1);
parseLogicalOr();
if ((*(long *)(in_RSI + 0x20) != *(long *)(in_RSI + 0x18)) && (in_DL != '\0')) {
if (parseExpression(bool)::if_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseExpression(bool)::if_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 0012f31b to 0012f330 has its CatchHandler @ 0012f35c */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpression(bool)::if_tok_abi_cxx11_,&DAT_001992c7,0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpression(bool)::if_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpression(bool)::if_tok_abi_cxx11_);
}
}
/* try { // try from 0012f24d to 0012f263 has its CatchHandler @ 0012f38d */
consumeToken(local_70);
std::__cxx11::string::~string(local_70);
if (local_68 != 0) {
/* try { // try from 0012f277 to 0012f283 has its CatchHandler @ 0012f38b */
get_location();
/* try { // try from 0012f284 to 0012f290 has its CatchHandler @ 0012f37c */
parseIfExpression();
/* try { // try from 0012f296 to 0012f2ac has its CatchHandler @ 0012f36d */
std::
make_shared<minja::IfExpr,minja::Location&,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>
((Location *)&local_38,local_50,(shared_ptr *)local_70,(shared_ptr *)&local_88);
uVar1 = auStack_30[0];
auStack_30[0] = 0;
*puVar3 = local_38;
puVar3[1] = uVar1;
local_38 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_30);
std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair
((pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>> *)
local_70);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48);
goto LAB_0012f2ef;
}
}
uVar1 = auStack_80[0];
auStack_80[0] = 0;
*puVar3 = local_88;
puVar3[1] = uVar1;
local_88 = 0;
LAB_0012f2ef:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_80);
return puVar3;
}
| |
42,327 | minja::Parser::parseExpression(bool) | monkey531[P]llama/common/./minja.hpp | std::shared_ptr<Expression> parseExpression(bool allow_if_expr = true) {
auto left = parseLogicalOr();
if (it == end) return left;
if (!allow_if_expr) return left;
static std::regex if_tok(R"(if\b)");
if (consumeToken(if_tok).empty()) {
return left;
}
auto location = get_location();
auto [condition, else_expr] = parseIfExpression();
return std::make_shared<IfExpr>(location, std::move(condition), std::move(left), std::move(else_expr));
} | O3 | cpp | minja::Parser::parseExpression(bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x3c238
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x2fbfb
testb %bpl, %bpl
je 0x2fbfb
movb 0xc11b9(%rip), %al # 0xf0d48
testb %al, %al
je 0x2fcc5
leaq 0xc118a(%rip), %rdx # 0xf0d28
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x2fd6a
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0x2fbcf
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x186a0
testq %r15, %r15
je 0x2fbfb
movq (%r14), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x2fc16
movq 0xc03af(%rip), %rcx # 0xeffa0
cmpb $0x0, (%rcx)
je 0x2fc12
incl 0x8(%rax)
jmp 0x2fc16
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x3c4c0
movl $0x60, %edi
callq 0x18690
movq %rax, %r14
leaq 0x40(%rsp), %r8
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0xbee31(%rip), %rax # 0xeea88
movq %rax, (%r14)
movq %r14, %r15
addq $0x10, %r15
leaq 0x18(%rsp), %rsi
leaq 0x30(%rsp), %r12
movq %rsp, %rcx
movq %r15, %rdi
movq %r12, %rdx
callq 0x5919a
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
movq 0x18(%r12), %rdi
testq %rdi, %rdi
je 0x2fc8f
callq 0x2f80e
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2fc9e
callq 0x2f80e
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2fcad
callq 0x2f80e
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2fc02
callq 0x2f80e
jmp 0x2fc02
leaq 0xc107c(%rip), %rdi # 0xf0d48
callq 0x18be0
testl %eax, %eax
je 0x2fb97
leaq 0xc1048(%rip), %rdi # 0xf0d28
leaq 0x86458(%rip), %rsi # 0xb613f
movl $0x10, %edx
callq 0x2f87e
leaq -0x412(%rip), %rdi # 0x2f8e6
leaq 0xc1029(%rip), %rsi # 0xf0d28
leaq 0xc0992(%rip), %rdx # 0xf0698
callq 0x185d0
leaq 0xc1036(%rip), %rdi # 0xf0d48
callq 0x18450
jmp 0x2fb97
movq %rax, %rbx
leaq 0xc1022(%rip), %rdi # 0xf0d48
callq 0x18440
jmp 0x2fd53
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3c68a
jmp 0x2fd3f
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2fd53
callq 0x2f80e
jmp 0x2fd53
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2fd62
callq 0x2f80e
movq %rbx, %rdi
callq 0x18b90
| _ZN5minja6Parser15parseExpressionEb:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rdi, rsp; this
call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void)
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz short loc_2FBFB
test bpl, bpl
jz short loc_2FBFB
mov al, cs:_ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; `guard variable for'minja::Parser::parseExpression(bool)::if_tok
test al, al
jz loc_2FCC5
loc_2FB97:
lea rdx, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rdi, [rsp+78h+var_48]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+78h+var_38]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_2FBCF
mov rsi, [rsp+78h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2FBCF:
test r15, r15
jz short loc_2FBFB
mov rax, [r14]
mov [rsp+78h+var_60], rax
mov rax, [r14+8]
mov [rsp+78h+var_58], rax
test rax, rax
jz short loc_2FC16
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_2FC12
inc dword ptr [rax+8]
jmp short loc_2FC16
loc_2FBFB:
movaps xmm0, [rsp+78h+var_78]
movups xmmword ptr [rbx], xmm0
loc_2FC02:
mov rax, rbx
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_2FC12:
lock inc dword ptr [rax+8]
loc_2FC16:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+78h+var_50], rax
lea rdi, [rsp+78h+var_48]; this
mov rsi, r14
call _ZN5minja6Parser17parseIfExpressionEv; minja::Parser::parseIfExpression(void)
mov edi, 60h ; '`'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea r8, [rsp+78h+var_38]
mov rax, 100000001h
mov [r14+8], rax
lea rax, off_EEA88
mov [r14], rax
mov r15, r14
add r15, 10h
lea rsi, [rsp+78h+var_60]
lea r12, [rsp+78h+var_48]
mov rcx, rsp
mov rdi, r15
mov rdx, r12
call _ZN5minja6IfExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_S7_; minja::IfExpr::IfExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,std::shared_ptr<minja::Expression> &)
mov [rbx], r15
mov [rbx+8], r14
mov rdi, [r12+18h]
test rdi, rdi
jz short loc_2FC8F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2FC8F:
mov rdi, [rsp+78h+var_40]
test rdi, rdi
jz short loc_2FC9E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2FC9E:
mov rdi, [rsp+78h+var_58]
test rdi, rdi
jz short loc_2FCAD
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2FCAD:
mov rdi, qword ptr [rsp+78h+var_78+8]
test rdi, rdi
jz loc_2FC02
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp loc_2FC02
loc_2FCC5:
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_2FB97
lea rdi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; minja::Parser::parseExpression(bool)::if_tok
lea rsi, aIfB; "if\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_2FB97
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseExpressionEbE6if_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_2FD53
mov rbx, rax
lea rdi, [rsp+arg_28]
call _ZNSt4pairISt10shared_ptrIN5minja10ExpressionEES3_ED2Ev; std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>::~pair()
jmp short loc_2FD3F
mov rbx, rax
loc_2FD3F:
mov rdi, [rsp+arg_18]
test rdi, rdi
jz short loc_2FD53
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_2FD53
mov rbx, rax
loc_2FD53:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_2FD62
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_2FD62:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseExpression(minja::Parser *this, long long *a2, char a3)
{
int v4; // r8d
int v5; // r9d
volatile signed __int32 *v6; // r15
volatile signed __int32 *v7; // rax
_QWORD *v9; // r14
__int128 v10; // [rsp+0h] [rbp-78h] BYREF
long long v11; // [rsp+18h] [rbp-60h] BYREF
volatile signed __int32 *v12; // [rsp+20h] [rbp-58h]
long long v13; // [rsp+28h] [rbp-50h]
long long *v14; // [rsp+30h] [rbp-48h] BYREF
volatile signed __int32 *v15; // [rsp+38h] [rbp-40h]
long long v16; // [rsp+40h] [rbp-38h] BYREF
volatile signed __int32 *v17; // [rsp+48h] [rbp-30h]
minja::Parser::parseLogicalOr((minja::Parser *)&v10);
if ( a2[4] == a2[3] || !a3 )
goto LABEL_10;
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
"if\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpression(bool)::if_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(unsigned int)&v14,
(_DWORD)a2,
(unsigned int)&minja::Parser::parseExpression(bool)::if_tok[abi:cxx11],
1,
v4,
v5,
v10,
*((long long *)&v10 + 1));
v6 = v15;
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
if ( v6 )
{
v11 = *a2;
v7 = (volatile signed __int32 *)a2[1];
v12 = v7;
if ( v7 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v7 + 2);
else
_InterlockedIncrement(v7 + 2);
}
v13 = a2[4] - a2[2];
minja::Parser::parseIfExpression((minja::Parser *)&v14);
v9 = (_QWORD *)operator new(0x60uLL);
v9[1] = 0x100000001LL;
*v9 = off_EEA88;
minja::IfExpr::IfExpr(v9 + 2, &v11, &v14, &v10, &v16);
*(_QWORD *)this = v9 + 2;
*((_QWORD *)this + 1) = v9;
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
if ( *((_QWORD *)&v10 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v10 + 1));
}
else
{
LABEL_10:
*(_OWORD *)this = v10;
}
return this;
}
| parseExpression:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSP
CALL 0x0013c238
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x0012fbfb
TEST BPL,BPL
JZ 0x0012fbfb
MOV AL,byte ptr [0x001f0d48]
TEST AL,AL
JZ 0x0012fcc5
LAB_0012fb97:
LEA RDX,[0x1f0d28]
LEA RDI,[RSP + 0x30]
MOV RSI,R14
MOV ECX,0x1
CALL 0x0012fd6a
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x0012fbcf
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x001186a0
LAB_0012fbcf:
TEST R15,R15
JZ 0x0012fbfb
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JZ 0x0012fc16
MOV RCX,qword ptr [0x001effa0]
CMP byte ptr [RCX],0x0
JZ 0x0012fc12
INC dword ptr [RAX + 0x8]
JMP 0x0012fc16
LAB_0012fbfb:
MOVAPS XMM0,xmmword ptr [RSP]
MOVUPS xmmword ptr [RBX],XMM0
LAB_0012fc02:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0012fc12:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0012fc16:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x28],RAX
LAB_0012fc23:
LEA RDI,[RSP + 0x30]
MOV RSI,R14
CALL 0x0013c4c0
LAB_0012fc30:
MOV EDI,0x60
CALL 0x00118690
MOV R14,RAX
LEA R8,[RSP + 0x40]
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x1eea88]
MOV qword ptr [R14],RAX
MOV R15,R14
ADD R15,0x10
LEA RSI,[RSP + 0x18]
LEA R12,[RSP + 0x30]
MOV RCX,RSP
MOV RDI,R15
MOV RDX,R12
CALL 0x0015919a
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],R14
MOV RDI,qword ptr [R12 + 0x18]
TEST RDI,RDI
JZ 0x0012fc8f
CALL 0x0012f80e
LAB_0012fc8f:
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x0012fc9e
CALL 0x0012f80e
LAB_0012fc9e:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x0012fcad
CALL 0x0012f80e
LAB_0012fcad:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0012fc02
CALL 0x0012f80e
JMP 0x0012fc02
LAB_0012fcc5:
LEA RDI,[0x1f0d48]
CALL 0x00118be0
TEST EAX,EAX
JZ 0x0012fb97
LAB_0012fcd9:
LEA RDI,[0x1f0d28]
LEA RSI,[0x1b613f]
MOV EDX,0x10
CALL 0x0012f87e
LAB_0012fcf1:
LEA RDI,[0x12f8e6]
LEA RSI,[0x1f0d28]
LEA RDX,[0x1f0698]
CALL 0x001185d0
LEA RDI,[0x1f0d48]
CALL 0x00118450
JMP 0x0012fb97
|
/* minja::Parser::parseExpression(bool) */
int8 * minja::Parser::parseExpression(bool param_1)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int iVar2;
int8 *puVar3;
char in_DL;
int8 *in_RSI;
int7 in_register_00000039;
int8 *puVar4;
int8 local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_70;
int8 local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
long local_50;
long *local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
long local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
puVar4 = (int8 *)CONCAT71(in_register_00000039,param_1);
parseLogicalOr();
if ((in_RSI[4] != in_RSI[3]) && (in_DL != '\0')) {
if ((parseExpression(bool)::if_tok_abi_cxx11_ == '\0') &&
(iVar2 = __cxa_guard_acquire(&parseExpression(bool)::if_tok_abi_cxx11_), iVar2 != 0)) {
/* try { // try from 0012fcd9 to 0012fcf0 has its CatchHandler @ 0012fd1c */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpression(bool)::if_tok_abi_cxx11_,&DAT_001b613f,0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpression(bool)::if_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpression(bool)::if_tok_abi_cxx11_);
}
/* try { // try from 0012fb97 to 0012fbaf has its CatchHandler @ 0012fd50 */
consumeToken(&local_48);
p_Var1 = local_40;
if (local_48 != &local_38) {
operator_delete(local_48,local_38 + 1);
}
if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
local_60 = *in_RSI;
local_58 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
*(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_58 + 8) = *(int *)(local_58 + 8) + 1;
}
}
local_50 = in_RSI[4] - in_RSI[2];
/* try { // try from 0012fc23 to 0012fc2f has its CatchHandler @ 0012fd3c */
parseIfExpression();
/* try { // try from 0012fc30 to 0012fc39 has its CatchHandler @ 0012fd2d */
puVar3 = (int8 *)operator_new(0x60);
puVar3[1] = 0x100000001;
*puVar3 = &PTR___Sp_counted_ptr_inplace_001eea88;
IfExpr::IfExpr((IfExpr *)(puVar3 + 2),(Location *)&local_60,(shared_ptr *)&local_48,
(shared_ptr *)&local_78,(shared_ptr *)&local_38);
*puVar4 = (IfExpr *)(puVar3 + 2);
puVar4[1] = puVar3;
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (p_Stack_70 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
return puVar4;
}
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_70);
return puVar4;
}
}
*puVar4 = local_78;
puVar4[1] = p_Stack_70;
return puVar4;
}
| |
42,328 | options_add_initcommand | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void options_add_initcommand(struct st_mysql_options *options,
const char *init_cmd)
{
char *insert= strdup(init_cmd);
if (!options->init_command)
{
options->init_command= (DYNAMIC_ARRAY*)malloc(sizeof(DYNAMIC_ARRAY));
ma_init_dynamic_array(options->init_command, sizeof(char*), 5, 5);
}
if (ma_insert_dynamic(options->init_command, (gptr)&insert))
free(insert);
} | O0 | c | options_add_initcommand:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x17aa0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x2b516
movl $0x18, %edi
callq 0x177d0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movl $0x8, %esi
movl $0x5, %ecx
movl %ecx, %edx
callq 0x1b0d0
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x1b1b0
cmpb $0x0, %al
je 0x2b534
movq -0x18(%rbp), %rdi
callq 0x17710
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| options_add_initcommand:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_10]
call _strdup
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+48h], 0
jnz short loc_2B516
mov edi, 18h
call _malloc
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+48h], rcx
mov rax, [rbp+var_8]
mov rdi, [rax+48h]
mov esi, 8
mov ecx, 5
mov edx, ecx
call ma_init_dynamic_array
loc_2B516:
mov rax, [rbp+var_8]
mov rdi, [rax+48h]
lea rsi, [rbp+var_18]
call ma_insert_dynamic
cmp al, 0
jz short loc_2B534
mov rdi, [rbp+var_18]
call _free
loc_2B534:
add rsp, 20h
pop rbp
retn
| char options_add_initcommand(long long a1, long long a2)
{
char result; // al
_QWORD v3[2]; // [rsp+8h] [rbp-18h] BYREF
long long v4; // [rsp+18h] [rbp-8h]
v4 = a1;
v3[1] = a2;
v3[0] = strdup(a2);
if ( !*(_QWORD *)(a1 + 72) )
{
*(_QWORD *)(v4 + 72) = malloc(24LL);
ma_init_dynamic_array(*(_QWORD *)(v4 + 72), 8u, 5u, 5);
}
result = ma_insert_dynamic(*(_QWORD *)(v4 + 72), (long long)v3);
if ( result )
return free(v3[0]);
return result;
}
| options_add_initcommand:
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]
CALL 0x00117aa0
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x48],0x0
JNZ 0x0012b516
MOV EDI,0x18
CALL 0x001177d0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x48],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x48]
MOV ESI,0x8
MOV ECX,0x5
MOV EDX,ECX
CALL 0x0011b0d0
LAB_0012b516:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x48]
LEA RSI,[RBP + -0x18]
CALL 0x0011b1b0
CMP AL,0x0
JZ 0x0012b534
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00117710
LAB_0012b534:
ADD RSP,0x20
POP RBP
RET
|
void options_add_initcommand(long param_1,char *param_2)
{
char cVar1;
void *pvVar2;
char *local_20;
char *local_18;
long local_10;
local_18 = param_2;
local_10 = param_1;
local_20 = strdup(param_2);
if (*(long *)(local_10 + 0x48) == 0) {
pvVar2 = malloc(0x18);
*(void **)(local_10 + 0x48) = pvVar2;
ma_init_dynamic_array(*(int8 *)(local_10 + 0x48),8,5);
}
cVar1 = ma_insert_dynamic(*(int8 *)(local_10 + 0x48),&local_20);
if (cVar1 != '\0') {
free(local_20);
}
return;
}
| |
42,329 | Cache::getId(unsigned int) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp | uint32_t Cache::getId(uint32_t addr) {
uint32_t offsetBits = log2i(policy.blockSize);
uint32_t idBits = log2i(policy.blockNum / policy.associativity);
uint32_t mask = (1 << idBits) - 1;
return (addr >> offsetBits) & mask;
} | O2 | cpp | Cache::getId(unsigned int):
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl 0x34(%rdi), %esi
callq 0x13b98
movl %eax, %ebp
movl 0x38(%r14), %eax
xorl %edx, %edx
divl 0x3c(%r14)
movl %eax, %esi
callq 0x13b98
pushq $-0x1
popq %rdx
movl %eax, %ecx
shll %cl, %edx
movl %ebp, %ecx
shrl %cl, %ebx
notl %edx
andl %edx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
| _ZN5Cache5getIdEj:
push rbp
push r14
push rbx
mov ebx, esi
mov r14, rdi
mov esi, [rdi+34h]; unsigned int
call _ZN5Cache5log2iEj; Cache::log2i(uint)
mov ebp, eax
mov eax, [r14+38h]
xor edx, edx
div dword ptr [r14+3Ch]
mov esi, eax; unsigned int
call _ZN5Cache5log2iEj; Cache::log2i(uint)
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov ecx, eax
shl edx, cl
mov ecx, ebp
shr ebx, cl
not edx
and ebx, edx
mov eax, ebx
pop rbx
pop r14
pop rbp
retn
| long long Cache::getId(Cache *this, unsigned int a2)
{
char v2; // bp
v2 = Cache::log2i(this, *((_DWORD *)this + 13));
return ~(-1 << Cache::log2i(this, *((_DWORD *)this + 14) / *((_DWORD *)this + 15))) & (a2 >> v2);
}
| getId:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBX,ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI + 0x34]
CALL 0x00113b98
MOV EBP,EAX
MOV EAX,dword ptr [R14 + 0x38]
XOR EDX,EDX
DIV dword ptr [R14 + 0x3c]
MOV ESI,EAX
CALL 0x00113b98
PUSH -0x1
POP RDX
MOV ECX,EAX
SHL EDX,CL
MOV ECX,EBP
SHR EBX,CL
NOT EDX
AND EBX,EDX
MOV EAX,EBX
POP RBX
POP R14
POP RBP
RET
|
/* Cache::getId(unsigned int) */
uint __thiscall Cache::getId(Cache *this,uint param_1)
{
byte bVar1;
byte bVar2;
Cache *this_00;
this_00 = this;
bVar1 = log2i(this,*(uint *)(this + 0x34));
bVar2 = log2i(this_00,*(uint *)(this + 0x38) / *(uint *)(this + 0x3c));
return param_1 >> (bVar1 & 0x1f) & ~(-1 << (bVar2 & 0x1f));
}
| |
42,330 | Cache::getId(unsigned int) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp | uint32_t Cache::getId(uint32_t addr) {
uint32_t offsetBits = log2i(policy.blockSize);
uint32_t idBits = log2i(policy.blockNum / policy.associativity);
uint32_t mask = (1 << idBits) - 1;
return (addr >> offsetBits) & mask;
} | O3 | cpp | Cache::getId(unsigned int):
movl 0x34(%rdi), %eax
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x136ae
xorl %r8d, %r8d
cmpl $0x1, %eax
je 0x136ae
movl %eax, %edx
shrl %edx
incl %r8d
cmpl $0x3, %eax
movl %edx, %eax
ja 0x136a2
movl 0x38(%rdi), %eax
xorl %edx, %edx
divl 0x3c(%rdi)
testl %eax, %eax
je 0x136ce
xorl %ecx, %ecx
cmpl $0x1, %eax
je 0x136ce
movl %eax, %edx
shrl %edx
incl %ecx
cmpl $0x3, %eax
movl %edx, %eax
ja 0x136c3
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
shll %cl, %eax
movl %r8d, %ecx
shrl %cl, %esi
notl %eax
andl %eax, %esi
movl %esi, %eax
retq
nop
| _ZN5Cache5getIdEj:
mov eax, [rdi+34h]
mov ecx, 0FFFFFFFFh
mov r8d, 0FFFFFFFFh
test eax, eax
jz short loc_136AE
xor r8d, r8d
cmp eax, 1
jz short loc_136AE
mov edx, eax
loc_136A2:
shr edx, 1
inc r8d
cmp eax, 3
mov eax, edx
ja short loc_136A2
loc_136AE:
mov eax, [rdi+38h]
xor edx, edx
div dword ptr [rdi+3Ch]
test eax, eax
jz short loc_136CE
xor ecx, ecx
cmp eax, 1
jz short loc_136CE
mov edx, eax
loc_136C3:
shr edx, 1
inc ecx
cmp eax, 3
mov eax, edx
ja short loc_136C3
loc_136CE:
mov eax, 0FFFFFFFFh
shl eax, cl
mov ecx, r8d
shr esi, cl
not eax
and esi, eax
mov eax, esi
retn
| long long Cache::getId(Cache *this, unsigned int a2)
{
unsigned int v2; // eax
char v3; // cl
char v4; // r8
unsigned int v5; // edx
bool v6; // cc
unsigned int v7; // eax
unsigned int v8; // edx
v2 = *((_DWORD *)this + 13);
v3 = -1;
v4 = -1;
if ( v2 )
{
v4 = 0;
if ( v2 != 1 )
{
v5 = *((_DWORD *)this + 13);
do
{
v5 >>= 1;
++v4;
v6 = v2 <= 3;
v2 = v5;
}
while ( !v6 );
}
}
v7 = *((_DWORD *)this + 14) / *((_DWORD *)this + 15);
if ( v7 )
{
v3 = 0;
if ( v7 != 1 )
{
v8 = *((_DWORD *)this + 14) / *((_DWORD *)this + 15);
do
{
v8 >>= 1;
++v3;
v6 = v7 <= 3;
v7 = v8;
}
while ( !v6 );
}
}
return ~(-1 << v3) & (a2 >> v4);
}
| getId:
MOV EAX,dword ptr [RDI + 0x34]
MOV ECX,0xffffffff
MOV R8D,0xffffffff
TEST EAX,EAX
JZ 0x001136ae
XOR R8D,R8D
CMP EAX,0x1
JZ 0x001136ae
MOV EDX,EAX
LAB_001136a2:
SHR EDX,0x1
INC R8D
CMP EAX,0x3
MOV EAX,EDX
JA 0x001136a2
LAB_001136ae:
MOV EAX,dword ptr [RDI + 0x38]
XOR EDX,EDX
DIV dword ptr [RDI + 0x3c]
TEST EAX,EAX
JZ 0x001136ce
XOR ECX,ECX
CMP EAX,0x1
JZ 0x001136ce
MOV EDX,EAX
LAB_001136c3:
SHR EDX,0x1
INC ECX
CMP EAX,0x3
MOV EAX,EDX
JA 0x001136c3
LAB_001136ce:
MOV EAX,0xffffffff
SHL EAX,CL
MOV ECX,R8D
SHR ESI,CL
NOT EAX
AND ESI,EAX
MOV EAX,ESI
RET
|
/* Cache::getId(unsigned int) */
uint __thiscall Cache::getId(Cache *this,uint param_1)
{
bool bVar1;
uint uVar2;
byte bVar3;
ulong uVar4;
byte bVar5;
byte bVar6;
uVar2 = *(uint *)(this + 0x34);
bVar3 = 0xff;
bVar5 = 0xff;
if (uVar2 != 0) {
bVar6 = 0;
bVar5 = 0;
if (uVar2 != 1) {
do {
bVar5 = bVar6 + 1;
bVar1 = 3 < uVar2;
uVar2 = uVar2 >> 1;
bVar6 = bVar5;
} while (bVar1);
}
}
uVar4 = (ulong)*(uint *)(this + 0x38) / (ulong)*(uint *)(this + 0x3c);
if ((int)uVar4 != 0) {
bVar6 = 0;
bVar3 = 0;
if ((int)uVar4 != 1) {
do {
bVar3 = bVar6 + 1;
uVar2 = (uint)uVar4;
uVar4 = uVar4 >> 1;
bVar6 = bVar3;
} while (3 < uVar2);
}
}
return param_1 >> (bVar5 & 0x1f) & ~(-1 << (bVar3 & 0x1f));
}
| |
42,331 | js_Date_UTC | bluesky950520[P]quickjs/quickjs.c | static JSValue js_Date_UTC(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
// UTC(y, mon, d, h, m, s, ms)
double fields[] = { 0, 0, 1, 0, 0, 0, 0 };
int i, n;
double a;
n = argc;
if (n == 0)
return JS_NAN;
if (n > 7)
n = 7;
for(i = 0; i < n; i++) {
if (JS_ToFloat64(ctx, &a, argv[i]))
return JS_EXCEPTION;
if (!isfinite(a))
return JS_NAN;
fields[i] = trunc(a);
if (i == 0 && fields[0] >= 0 && fields[0] < 100)
fields[0] += 1900;
}
return js_float64(set_date_fields(fields, 0));
} | O1 | c | js_Date_UTC:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
pxor %xmm0, %xmm0
movdqa %xmm0, 0x20(%rsp)
movdqa %xmm0, 0x30(%rsp)
movdqa %xmm0, 0x10(%rsp)
movq $0x0, 0x40(%rsp)
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
movq %rdx, 0x20(%rsp)
movl $0x7, %edx
testl %ecx, %ecx
je 0x5846a
jle 0x5843a
movq %r8, %r15
movq %rdi, %r12
cmpl $0x7, %ecx
movl $0x7, %ebp
cmovll %ecx, %ebp
shlq $0x3, %rbp
leaq 0x8(%rsp), %r13
movabsq $0x7fefffffffffffff, %rbx # imm = 0x7FEFFFFFFFFFFFFF
xorl %r14d, %r14d
movq (%r15,%r14,2), %rdx
movq 0x8(%r15,%r14,2), %rcx
movq %r12, %rdi
movq %r13, %rsi
callq 0x27681
testl %eax, %eax
jne 0x58452
movq 0x8(%rsp), %xmm0
movq %xmm0, %rax
btrq $0x3f, %rax
cmpq %rbx, %rax
jg 0x5845b
callq 0xe140
movq %xmm0, 0x10(%rsp,%r14)
testq %r14, %r14
jne 0x58431
movsd 0x10(%rsp), %xmm0
ucomisd 0x464ed(%rip), %xmm0 # 0x9e900
jb 0x58431
movsd 0x464d3(%rip), %xmm1 # 0x9e8f0
ucomisd %xmm0, %xmm1
jbe 0x58431
addsd 0x464cd(%rip), %xmm0 # 0x9e8f8
movsd %xmm0, 0x10(%rsp)
addq $0x8, %r14
cmpq %r14, %rbp
jne 0x583c7
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x56fc5
movq %xmm0, %rax
movl $0x7, %edx
jmp 0x5846a
movl $0x6, %edx
xorl %eax, %eax
jmp 0x5846a
movl $0x7, %edx
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_Date_UTC:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rax, 7FF8000000000000h
pxor xmm0, xmm0
movdqa [rsp+78h+var_58], xmm0
movdqa [rsp+78h+var_48], xmm0
movdqa [rsp+78h+var_68], xmm0
mov [rsp+78h+var_38], 0
mov rdx, 3FF0000000000000h
mov qword ptr [rsp+78h+var_58], rdx
mov edx, 7
test ecx, ecx
jz loc_5846A
jle loc_5843A
mov r15, r8
mov r12, rdi
cmp ecx, 7
mov ebp, 7
cmovl ebp, ecx
shl rbp, 3
lea r13, [rsp+78h+var_70]
mov rbx, 7FEFFFFFFFFFFFFFh
xor r14d, r14d
loc_583C7:
mov rdx, [r15+r14*2]
mov rcx, [r15+r14*2+8]
mov rdi, r12
mov rsi, r13
call JS_ToFloat64
test eax, eax
jnz short loc_58452
movq xmm0, [rsp+78h+var_70]
movq rax, xmm0
btr rax, 3Fh ; '?'
cmp rax, rbx
jg short loc_5845B
call _trunc
movq qword ptr [rsp+r14+78h+var_68], xmm0
test r14, r14
jnz short loc_58431
movsd xmm0, qword ptr [rsp+78h+var_68]
ucomisd xmm0, cs:qword_9E900
jb short loc_58431
movsd xmm1, cs:qword_9E8F0
ucomisd xmm1, xmm0
jbe short loc_58431
addsd xmm0, cs:qword_9E8F8
movsd qword ptr [rsp+78h+var_68], xmm0
loc_58431:
add r14, 8
cmp rbp, r14
jnz short loc_583C7
loc_5843A:
lea rdi, [rsp+78h+var_68]
xor esi, esi
call set_date_fields
movq rax, xmm0
mov edx, 7
jmp short loc_5846A
loc_58452:
mov edx, 6
xor eax, eax
jmp short loc_5846A
loc_5845B:
mov edx, 7
mov rax, 7FF8000000000000h
loc_5846A:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_Date_UTC(long long a1, long long a2, long long a3, int a4, long long a5)
{
long long result; // rax
long long v7; // rbp
long long v8; // rbp
unsigned long long v9; // r14
long long v10; // rdx
long long v11; // [rsp+8h] [rbp-70h] BYREF
__m128d v12[3]; // [rsp+10h] [rbp-68h] BYREF
long long v13; // [rsp+40h] [rbp-38h]
result = 0x7FF8000000000000LL;
v12[2] = 0LL;
v12[0] = 0LL;
v13 = 0LL;
v12[1] = (__m128d)0x3FF0000000000000uLL;
if ( a4 )
{
if ( a4 <= 0 )
{
return set_date_fields(v12, 0);
}
else
{
v7 = 7LL;
if ( a4 < 7 )
v7 = (unsigned int)a4;
v8 = 8 * v7;
v9 = 0LL;
while ( 1 )
{
if ( (unsigned int)JS_ToFloat64(a1, (double *)&v11, *(_DWORD **)(a5 + 2 * v9), *(_QWORD *)(a5 + 2 * v9 + 8)) )
return 0LL;
if ( (v11 & 0x7FFFFFFFFFFFFFFFuLL) > 0x7FEFFFFFFFFFFFFFLL )
break;
v12[0].m128d_f64[v9 / 8] = trunc(a1, &v11, v10);
if ( !v9 && v12[0].m128d_f64[0] >= 0.0 && v12[0].m128d_f64[0] < 100.0 )
v12[0].m128d_f64[0] = v12[0].m128d_f64[0] + 1900.0;
v9 += 8LL;
if ( v8 == v9 )
return set_date_fields(v12, 0);
}
return 0x7FF8000000000000LL;
}
}
return result;
}
| |||
42,332 | js_Date_UTC | bluesky950520[P]quickjs/quickjs.c | static JSValue js_Date_UTC(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
// UTC(y, mon, d, h, m, s, ms)
double fields[] = { 0, 0, 1, 0, 0, 0, 0 };
int i, n;
double a;
n = argc;
if (n == 0)
return JS_NAN;
if (n > 7)
n = 7;
for(i = 0; i < n; i++) {
if (JS_ToFloat64(ctx, &a, argv[i]))
return JS_EXCEPTION;
if (!isfinite(a))
return JS_NAN;
fields[i] = trunc(a);
if (i == 0 && fields[0] >= 0 && fields[0] < 100)
fields[0] += 1900;
}
return js_float64(set_date_fields(fields, 0));
} | O2 | c | js_Date_UTC:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
pxor %xmm0, %xmm0
movdqa %xmm0, 0x20(%rsp)
movdqa %xmm0, 0x30(%rsp)
movdqa %xmm0, 0x10(%rsp)
andq $0x0, 0x40(%rsp)
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
movq %rdx, 0x20(%rsp)
pushq $0x7
popq %rdx
testl %ecx, %ecx
je 0x4b7c4
movq %r8, %r14
movq %rdi, %r15
cmpl $0x7, %ecx
pushq $0x7
popq %rbp
cmovll %ecx, %ebp
xorl %eax, %eax
testl %ebp, %ebp
cmovlel %eax, %ebp
shlq $0x3, %rbp
leaq 0x8(%rsp), %r13
movabsq $0x7fefffffffffffff, %rbx # imm = 0x7FEFFFFFFFFFFFFF
xorl %r12d, %r12d
cmpq %r12, %rbp
je 0x4b79b
movq (%r14,%r12,2), %rdx
movq 0x8(%r14,%r12,2), %rcx
movq %r15, %rdi
movq %r13, %rsi
callq 0x2127f
testl %eax, %eax
jne 0x4b7b0
movq 0x8(%rsp), %xmm0
movq %xmm0, %rax
btrq $0x3f, %rax
cmpq %rbx, %rax
jg 0x4b7b7
callq 0xe150
movq %xmm0, 0x10(%rsp,%r12)
testq %r12, %r12
jne 0x4b795
movsd 0x10(%rsp), %xmm0
ucomisd 0x3a0b1(%rip), %xmm0 # 0x85828
jb 0x4b795
movsd 0x3a097(%rip), %xmm1 # 0x85818
ucomisd %xmm0, %xmm1
jbe 0x4b795
addsd 0x3a091(%rip), %xmm0 # 0x85820
movsd %xmm0, 0x10(%rsp)
addq $0x8, %r12
jmp 0x4b726
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x4a7c6
movq %xmm0, %rax
pushq $0x7
jmp 0x4b7b4
xorl %eax, %eax
pushq $0x6
popq %rdx
jmp 0x4b7c4
pushq $0x7
popq %rdx
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_Date_UTC:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rax, 7FF8000000000000h
pxor xmm0, xmm0
movdqa [rsp+78h+var_58], xmm0
movdqa [rsp+78h+var_48], xmm0
movdqa [rsp+78h+var_68], xmm0
and [rsp+78h+var_38], 0
mov rdx, 3FF0000000000000h
mov qword ptr [rsp+78h+var_58], rdx
push 7
pop rdx
test ecx, ecx
jz loc_4B7C4
mov r14, r8
mov r15, rdi
cmp ecx, 7
push 7
pop rbp
cmovl ebp, ecx
xor eax, eax
test ebp, ebp
cmovle ebp, eax
shl rbp, 3
lea r13, [rsp+78h+var_70]
mov rbx, 7FEFFFFFFFFFFFFFh
xor r12d, r12d
loc_4B726:
cmp rbp, r12
jz short loc_4B79B
mov rdx, [r14+r12*2]
mov rcx, [r14+r12*2+8]
mov rdi, r15
mov rsi, r13
call JS_ToFloat64
test eax, eax
jnz short loc_4B7B0
movq xmm0, [rsp+78h+var_70]
movq rax, xmm0
btr rax, 3Fh ; '?'
cmp rax, rbx
jg short loc_4B7B7
call _trunc
movq qword ptr [rsp+r12+78h+var_68], xmm0
test r12, r12
jnz short loc_4B795
movsd xmm0, qword ptr [rsp+78h+var_68]
ucomisd xmm0, cs:qword_85828
jb short loc_4B795
movsd xmm1, cs:qword_85818
ucomisd xmm1, xmm0
jbe short loc_4B795
addsd xmm0, cs:qword_85820
movsd qword ptr [rsp+78h+var_68], xmm0
loc_4B795:
add r12, 8
jmp short loc_4B726
loc_4B79B:
lea rdi, [rsp+78h+var_68]
xor esi, esi
call set_date_fields
movq rax, xmm0
push 7
jmp short loc_4B7B4
loc_4B7B0:
xor eax, eax
push 6
loc_4B7B4:
pop rdx
jmp short loc_4B7C4
loc_4B7B7:
push 7
pop rdx
mov rax, 7FF8000000000000h
loc_4B7C4:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_Date_UTC(long long a1, long long a2, long long a3, int a4, long long a5)
{
long long result; // rax
long long v7; // rbp
long long v8; // rbp
unsigned long long i; // r12
double v10; // [rsp+8h] [rbp-70h] BYREF
__m128d v11[3]; // [rsp+10h] [rbp-68h] BYREF
long long v12; // [rsp+40h] [rbp-38h]
result = 0x7FF8000000000000LL;
v11[2] = 0LL;
v11[0] = 0LL;
v12 = 0LL;
v11[1] = (__m128d)0x3FF0000000000000uLL;
if ( a4 )
{
v7 = 7LL;
if ( a4 < 7 )
v7 = (unsigned int)a4;
if ( (int)v7 <= 0 )
v7 = 0LL;
v8 = 8 * v7;
for ( i = 0LL; ; i += 8LL )
{
if ( v8 == i )
return set_date_fields(v11, 0);
if ( (unsigned int)JS_ToFloat64(a1, (long long)&v10, *(_DWORD **)(a5 + 2 * i), *(_QWORD *)(a5 + 2 * i + 8)) )
return 0LL;
if ( (*(_QWORD *)&v10 & 0x7FFFFFFFFFFFFFFFuLL) > 0x7FEFFFFFFFFFFFFFLL )
break;
v11[0].m128d_f64[i / 8] = trunc(v10);
if ( !i && v11[0].m128d_f64[0] >= 0.0 && v11[0].m128d_f64[0] < 100.0 )
v11[0].m128d_f64[0] = v11[0].m128d_f64[0] + 1900.0;
}
return 0x7FF8000000000000LL;
}
return result;
}
| js_Date_UTC:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RAX,0x7ff8000000000000
PXOR XMM0,XMM0
MOVDQA xmmword ptr [RSP + 0x20],XMM0
MOVDQA xmmword ptr [RSP + 0x30],XMM0
MOVDQA xmmword ptr [RSP + 0x10],XMM0
AND qword ptr [RSP + 0x40],0x0
MOV RDX,0x3ff0000000000000
MOV qword ptr [RSP + 0x20],RDX
PUSH 0x7
POP RDX
TEST ECX,ECX
JZ 0x0014b7c4
MOV R14,R8
MOV R15,RDI
CMP ECX,0x7
PUSH 0x7
POP RBP
CMOVL EBP,ECX
XOR EAX,EAX
TEST EBP,EBP
CMOVLE EBP,EAX
SHL RBP,0x3
LEA R13,[RSP + 0x8]
MOV RBX,0x7fefffffffffffff
XOR R12D,R12D
LAB_0014b726:
CMP RBP,R12
JZ 0x0014b79b
MOV RDX,qword ptr [R14 + R12*0x2]
MOV RCX,qword ptr [R14 + R12*0x2 + 0x8]
MOV RDI,R15
MOV RSI,R13
CALL 0x0012127f
TEST EAX,EAX
JNZ 0x0014b7b0
MOVQ XMM0,qword ptr [RSP + 0x8]
MOVQ RAX,XMM0
BTR RAX,0x3f
CMP RAX,RBX
JG 0x0014b7b7
CALL 0x0010e150
MOVQ qword ptr [RSP + R12*0x1 + 0x10],XMM0
TEST R12,R12
JNZ 0x0014b795
MOVSD XMM0,qword ptr [RSP + 0x10]
UCOMISD XMM0,qword ptr [0x00185828]
JC 0x0014b795
MOVSD XMM1,qword ptr [0x00185818]
UCOMISD XMM1,XMM0
JBE 0x0014b795
ADDSD XMM0,qword ptr [0x00185820]
MOVSD qword ptr [RSP + 0x10],XMM0
LAB_0014b795:
ADD R12,0x8
JMP 0x0014b726
LAB_0014b79b:
LEA RDI,[RSP + 0x10]
XOR ESI,ESI
CALL 0x0014a7c6
MOVQ RAX,XMM0
PUSH 0x7
JMP 0x0014b7b4
LAB_0014b7b0:
XOR EAX,EAX
PUSH 0x6
LAB_0014b7b4:
POP RDX
JMP 0x0014b7c4
LAB_0014b7b7:
PUSH 0x7
POP RDX
MOV RAX,0x7ff8000000000000
LAB_0014b7c4:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16]
js_Date_UTC(int8 param_1,int8 param_2,int8 param_3,uint param_4,long param_5)
{
int iVar1;
int8 uVar2;
uint uVar3;
long lVar4;
double dVar5;
int1 auVar6 [16];
int8 uStack_80;
double local_70;
int1 local_68 [16];
int1 local_58 [16];
int1 local_48 [16];
int8 local_38;
uVar2 = 0x7ff8000000000000;
local_48 = (int1 [16])0x0;
local_68 = (int1 [16])0x0;
local_38 = 0;
local_58 = ZEXT816(0x3ff0000000000000);
uStack_80 = 7;
if (param_4 != 0) {
uVar3 = 7;
if ((int)param_4 < 7) {
uVar3 = param_4;
}
if ((int)uVar3 < 1) {
uVar3 = 0;
}
for (lVar4 = 0; (ulong)uVar3 * 8 != lVar4; lVar4 = lVar4 + 8) {
iVar1 = JS_ToFloat64(param_1,&local_70,*(int8 *)(param_5 + lVar4 * 2),
*(int8 *)(param_5 + 8 + lVar4 * 2));
if (iVar1 != 0) {
uVar2 = 0;
uStack_80 = 6;
goto LAB_0014b7c4;
}
if (0x7fefffffffffffff < (ulong)ABS(local_70)) {
uStack_80 = 7;
uVar2 = 0x7ff8000000000000;
goto LAB_0014b7c4;
}
dVar5 = trunc(local_70);
*(double *)(local_68 + lVar4) = dVar5;
if (((lVar4 == 0) && (_DAT_00185828 <= (double)local_68._0_8_)) &&
((double)local_68._0_8_ < DAT_00185818)) {
local_68._0_8_ = (double)local_68._0_8_ + _DAT_00185820;
}
}
uVar2 = set_date_fields(local_68,0);
uStack_80 = 7;
}
LAB_0014b7c4:
auVar6._8_8_ = uStack_80;
auVar6._0_8_ = uVar2;
return auVar6;
}
| |
42,333 | minja::Parser::Parser(std::shared_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, minja::Options const&) | monkey531[P]llama/common/minja.hpp | Parser(const std::shared_ptr<std::string>& template_str, const Options & options) : template_str(template_str), options(options) {
if (!template_str) throw std::runtime_error("Template string is null");
start = it = this->template_str->begin();
end = this->template_str->end();
} | O3 | cpp | minja::Parser::Parser(std::shared_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, minja::Options const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
testq %rax, %rax
je 0x7f64c
movq 0xac94a(%rip), %rcx # 0x12bf88
cmpb $0x0, (%rcx)
je 0x7f648
incl 0x8(%rax)
jmp 0x7f64c
lock
incl 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
movb 0x2(%rdx), %al
movb %al, 0x2a(%rbx)
movzwl (%rdx), %eax
movw %ax, 0x28(%rbx)
cmpq $0x0, (%rsi)
je 0x7f68d
movq (%rbx), %rax
movq (%rax), %rcx
movq %rcx, 0x20(%rbx)
movq %rcx, 0x10(%rbx)
movq (%rax), %rcx
addq 0x8(%rax), %rcx
movq %rcx, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x1a460
movq %rax, %r15
leaq 0x7013e(%rip), %rsi # 0xef7df
movq %rax, %rdi
callq 0x1a340
movq 0xac940(%rip), %rsi # 0x12bff0
movq 0xac8a9(%rip), %rdx # 0x12bf60
movq %r15, %rdi
callq 0x1af30
movq %rax, %r14
jmp 0x7f6cf
movq %rax, %r14
movq %r15, %rdi
callq 0x1a690
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x7f6dd
callq 0x6d396
movq %r14, %rdi
callq 0x1afd0
nop
| _ZN5minja6ParserC2ERKSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNS_7OptionsE:
push r15
push r14
push rbx
mov rbx, rdi
mov rax, [rsi]
mov [rdi], rax
mov rax, [rsi+8]
mov [rdi+8], rax
test rax, rax
jz short loc_7F64C
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_7F648
inc dword ptr [rax+8]
jmp short loc_7F64C
loc_7F648:
lock inc dword ptr [rax+8]
loc_7F64C:
xorps xmm0, xmm0
movups xmmword ptr [rbx+10h], xmm0
mov qword ptr [rbx+20h], 0
mov al, [rdx+2]
mov [rbx+2Ah], al
movzx eax, word ptr [rdx]
mov [rbx+28h], ax
cmp qword ptr [rsi], 0
jz short loc_7F68D
mov rax, [rbx]
mov rcx, [rax]
mov [rbx+20h], rcx
mov [rbx+10h], rcx
mov rcx, [rax]
add rcx, [rax+8]
mov [rbx+18h], rcx
pop rbx
pop r14
pop r15
retn
loc_7F68D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aTemplateString; "Template string is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r14, rax
jmp short loc_7F6CF
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
loc_7F6CF:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_7F6DD
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7F6DD:
mov rdi, r14
call __Unwind_Resume
| long long * minja::Parser::Parser(long long **a1, long long **a2, long long a3)
{
long long *v3; // rax
long long *result; // rax
long long *v5; // rcx
std::runtime_error *exception; // r15
*a1 = *a2;
v3 = a2[1];
a1[1] = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v3 + 2);
else
_InterlockedIncrement((volatile signed __int32 *)v3 + 2);
}
*((_OWORD *)a1 + 1) = 0LL;
a1[4] = 0LL;
*((_BYTE *)a1 + 42) = *(_BYTE *)(a3 + 2);
*((_WORD *)a1 + 20) = *(_WORD *)a3;
if ( !*a2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Template string is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
result = *a1;
v5 = (long long *)**a1;
a1[4] = v5;
a1[2] = v5;
a1[3] = (long long *)(result[1] + *result);
return result;
}
| Parser:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x8],RAX
TEST RAX,RAX
JZ 0x0017f64c
MOV RCX,qword ptr [0x0022bf88]
CMP byte ptr [RCX],0x0
JZ 0x0017f648
INC dword ptr [RAX + 0x8]
JMP 0x0017f64c
LAB_0017f648:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0017f64c:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOV qword ptr [RBX + 0x20],0x0
MOV AL,byte ptr [RDX + 0x2]
MOV byte ptr [RBX + 0x2a],AL
MOVZX EAX,word ptr [RDX]
MOV word ptr [RBX + 0x28],AX
CMP qword ptr [RSI],0x0
JZ 0x0017f68d
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBX + 0x20],RCX
MOV qword ptr [RBX + 0x10],RCX
MOV RCX,qword ptr [RAX]
ADD RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x18],RCX
POP RBX
POP R14
POP R15
RET
LAB_0017f68d:
MOV EDI,0x10
CALL 0x0011a460
MOV R15,RAX
LAB_0017f69a:
LEA RSI,[0x1ef7df]
MOV RDI,RAX
CALL 0x0011a340
LAB_0017f6a9:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R15
CALL 0x0011af30
|
/* minja::Parser::Parser(std::shared_ptr<std::__cxx11::string > const&, minja::Options const&) */
void __thiscall minja::Parser::Parser(Parser *this,shared_ptr *param_1,Options *param_2)
{
long lVar1;
long *plVar2;
runtime_error *this_00;
*(int8 *)this = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 8) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(Options *)(this + 0x2a) = param_2[2];
*(int2 *)(this + 0x28) = *(int2 *)param_2;
if (*(long *)param_1 != 0) {
plVar2 = *(long **)this;
lVar1 = *plVar2;
*(long *)(this + 0x20) = lVar1;
*(long *)(this + 0x10) = lVar1;
*(long *)(this + 0x18) = *plVar2 + plVar2[1];
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0017f69a to 0017f6a8 has its CatchHandler @ 0017f6c4 */
std::runtime_error::runtime_error(this_00,"Template string is null");
/* try { // try from 0017f6a9 to 0017f6be has its CatchHandler @ 0017f6bf */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
| |
42,334 | js_proxy_revocable | bluesky950520[P]quickjs/quickjs.c | static JSValue js_proxy_revocable(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue proxy_obj, revoke_obj = JS_UNDEFINED, obj;
proxy_obj = js_proxy_constructor(ctx, JS_UNDEFINED, argc, argv);
if (JS_IsException(proxy_obj))
goto fail;
revoke_obj = js_proxy_revoke_constructor(ctx, proxy_obj);
if (JS_IsException(revoke_obj))
goto fail;
obj = JS_NewObject(ctx);
if (JS_IsException(obj))
goto fail;
// XXX: exceptions?
JS_DefinePropertyValue(ctx, obj, JS_ATOM_proxy, proxy_obj, JS_PROP_C_W_E);
JS_DefinePropertyValue(ctx, obj, JS_ATOM_revoke, revoke_obj, JS_PROP_C_W_E);
return obj;
fail:
JS_FreeValue(ctx, proxy_obj);
JS_FreeValue(ctx, revoke_obj);
return JS_EXCEPTION;
} | O2 | c | js_proxy_revocable:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
callq 0x2f226
movq %rax, %r15
movq %rdx, %r14
cmpl $0x6, %r14d
jne 0x445bb
pushq $0x3
popq %r12
xorl %r13d, %r13d
jmp 0x44604
leaq 0x18(%rsp), %r9
movq %r15, (%r9)
movq %r14, 0x8(%r9)
leaq 0xb2(%rip), %rsi # 0x44680
pushq $0x1
popq %r8
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1b3ba
movq %rax, %r13
movq %rdx, %r12
cmpl $0x6, %r12d
je 0x44604
movq %r13, 0x10(%rsp)
movq %rbx, %rdi
callq 0x1b2c9
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x4463b
movq 0x10(%rsp), %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1801e
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1801e
pushq $0x6
popq %rbp
xorl %r13d, %r13d
movq %r13, %rax
movq %rbp, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
pushq $0x7
popq %rax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x84, %ecx
movq %r15, %r8
movq %r14, %r9
callq 0x20872
pushq $0x7
popq %rax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x85, %ecx
movq 0x10(%rsp), %r8
movq %r12, %r9
callq 0x20872
jmp 0x44626
| js_proxy_revocable:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
call js_proxy_constructor
mov r15, rax
mov r14, rdx
cmp r14d, 6
jnz short loc_445BB
push 3
pop r12
xor r13d, r13d
jmp short loc_44604
loc_445BB:
lea r9, [rsp+58h+var_40]
mov [r9], r15
mov [r9+8], r14
lea rsi, js_proxy_revoke
push 1
pop r8
mov rdi, rbx
xor edx, edx
xor ecx, ecx
call JS_NewCFunctionData
mov r13, rax
mov r12, rdx
cmp r12d, 6
jz short loc_44604
mov [rsp+58h+var_48], r13
mov rdi, rbx
call JS_NewObject
mov rbp, rdx
cmp ebp, 6
jnz short loc_4463B
mov r13, [rsp+58h+var_48]
loc_44604:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_FreeValue
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call JS_FreeValue
push 6
pop rbp
xor r13d, r13d
loc_44626:
mov rax, r13
mov rdx, rbp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4463B:
mov r13, rax
push 7
pop rax
mov [rsp+58h+var_58], eax
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
mov ecx, 84h
mov r8, r15
mov r9, r14
call JS_DefinePropertyValue
push 7
pop rax
mov [rsp+58h+var_58], eax
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
mov ecx, 85h
mov r8, [rsp+58h+var_48]
mov r9, r12
call JS_DefinePropertyValue
jmp short loc_44626
| long long js_proxy_revocable(
long long a1,
long long a2,
long long a3,
long long a4,
_QWORD *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
unsigned long long v14; // rax
long long v15; // rdx
_DWORD *v16; // r15
long long v17; // r14
long long v18; // r12
long long v19; // r13
unsigned long long v20; // rax
long long v21; // rdx
long long v22; // rax
long long v23; // rdx
__m128 v24; // xmm4
__m128 v25; // xmm5
long long v26; // rbp
long long v27; // r13
__m128 v29; // xmm4
__m128 v30; // xmm5
_DWORD *v31; // [rsp+10h] [rbp-48h]
_QWORD v32[8]; // [rsp+18h] [rbp-40h] BYREF
v14 = js_proxy_constructor(a1, a2, a3, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6);
v16 = (_DWORD *)v14;
v17 = v15;
if ( (_DWORD)v15 == 6 )
{
v18 = 3LL;
v19 = 0LL;
}
else
{
v32[0] = v14;
v32[1] = v15;
v20 = JS_NewCFunctionData(a1, (long long)js_proxy_revoke, 0, 0, 1u, (long long)v32);
v19 = v20;
v18 = v21;
if ( (_DWORD)v21 != 6 )
{
v31 = (_DWORD *)v20;
v22 = JS_NewObject(a1);
v26 = v23;
if ( (_DWORD)v23 != 6 )
{
v27 = v22;
JS_DefinePropertyValue(
a1,
v22,
v23,
132LL,
v16,
v17,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v24,
v25,
a13,
a14,
7);
JS_DefinePropertyValue(
a1,
v27,
v26,
133LL,
v31,
v18,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v29,
v30,
a13,
a14,
7);
return v27;
}
v19 = (long long)v31;
}
}
JS_FreeValue(a1, (long long)v16, v17);
JS_FreeValue(a1, v19, v18);
return 0LL;
}
| js_proxy_revocable:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
CALL 0x0012f226
MOV R15,RAX
MOV R14,RDX
CMP R14D,0x6
JNZ 0x001445bb
PUSH 0x3
POP R12
XOR R13D,R13D
JMP 0x00144604
LAB_001445bb:
LEA R9,[RSP + 0x18]
MOV qword ptr [R9],R15
MOV qword ptr [R9 + 0x8],R14
LEA RSI,[0x144680]
PUSH 0x1
POP R8
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0011b3ba
MOV R13,RAX
MOV R12,RDX
CMP R12D,0x6
JZ 0x00144604
MOV qword ptr [RSP + 0x10],R13
MOV RDI,RBX
CALL 0x0011b2c9
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x0014463b
MOV R13,qword ptr [RSP + 0x10]
LAB_00144604:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x0011801e
PUSH 0x6
POP RBP
XOR R13D,R13D
LAB_00144626:
MOV RAX,R13
MOV RDX,RBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014463b:
MOV R13,RAX
PUSH 0x7
POP RAX
MOV dword ptr [RSP],EAX
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
MOV ECX,0x84
MOV R8,R15
MOV R9,R14
CALL 0x00120872
PUSH 0x7
POP RAX
MOV dword ptr [RSP],EAX
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
MOV ECX,0x85
MOV R8,qword ptr [RSP + 0x10]
MOV R9,R12
CALL 0x00120872
JMP 0x00144626
|
int1 [16] js_proxy_revocable(int8 param_1)
{
int1 auVar1 [16];
int1 auVar2 [16];
int1 auVar3 [16];
auVar1 = js_proxy_constructor();
if (auVar1._8_4_ == 6) {
auVar2 = ZEXT816(3) << 0x40;
}
else {
auVar2 = JS_NewCFunctionData(param_1,js_proxy_revoke,0,0,1);
if (auVar2._8_4_ != 6) {
auVar3 = JS_NewObject(param_1);
if (auVar3._8_4_ != 6) {
JS_DefinePropertyValue(param_1,auVar3._0_8_,auVar3._8_8_,0x84,auVar1._0_8_,auVar1._8_8_,7);
JS_DefinePropertyValue(param_1,auVar3._0_8_,auVar3._8_8_,0x85,auVar2._0_8_,auVar2._8_8_,7);
return auVar3;
}
}
}
JS_FreeValue(param_1,auVar1._0_8_,auVar1._8_8_);
JS_FreeValue(param_1,auVar2._0_8_,auVar2._8_8_);
return ZEXT816(6) << 0x40;
}
| |
42,335 | 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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t) | llama.cpp/common/json.hpp | basic_json(initializer_list_t init,
bool type_deduction = true,
value_t manual_type = value_t::array)
{
// check if each element is an array with two elements whose first
// element is a string
bool is_an_object = std::all_of(init.begin(), init.end(),
[](const detail::json_ref<basic_json>& element_ref)
{
// The cast is to ensure op[size_type] is called, bearing in mind size_type may not be int;
// (many string types can be constructed from 0 via its null-pointer guise, so we get a
// broken call to op[key_type], the wrong semantics and a 4804 warning on Windows)
return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[static_cast<size_type>(0)].is_string();
});
// adjust type if type deduction is not wanted
if (!type_deduction)
{
// if array is wanted, do not create an object though possible
if (manual_type == value_t::array)
{
is_an_object = false;
}
// if object is wanted but impossible, throw an exception
if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object))
{
JSON_THROW(type_error::create(301, "cannot create object from initializer list", nullptr));
}
}
if (is_an_object)
{
// the initializer list is a list of pairs -> create object
m_data.m_type = value_t::object;
m_data.m_value = value_t::object;
for (auto& element_ref : init)
{
auto element = element_ref.moved_or_copied();
m_data.m_value.object->emplace(
std::move(*((*element.m_data.m_value.array)[0].m_data.m_value.string)),
std::move((*element.m_data.m_value.array)[1]));
}
}
else
{
// the initializer list describes an array -> create array
m_data.m_type = value_t::array;
m_data.m_value.array = create<array_t>(init.begin(), init.end());
}
set_parents();
assert_invariant();
} | O3 | 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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movl %ecx, %r13d
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq (%rdx,%rdx,2), %rax
leaq (%rsi,%rax,8), %r12
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rsi, %rdi
movq %r12, %rsi
callq 0xd052e
cmpq %r12, %rax
sete %cl
testb %r13b, %r13b
jne 0xb0c37
cmpq %r12, %rax
sete %al
cmpb $0x2, %bpl
setne %cl
cmpb $0x1, %bpl
setne %dl
orb %al, %dl
je 0xb0ce2
andb %al, %cl
testb %cl, %cl
je 0xb0cac
movb $0x1, (%rbx)
movl $0x20, %edi
callq 0x20220
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%rbx)
testq %r15, %r15
je 0xb0cc6
shlq $0x3, %r15
leaq (%r15,%r15,2), %r12
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xd0488
movq 0x8(%rbx), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rdx), %rsi
addq $0x10, %rdx
callq 0x8a8f2
movq %r15, %rdi
xorl %esi, %esi
callq 0x84be0
movq %r15, %rdi
callq 0x892fa
addq $0x18, %r14
addq $-0x18, %r12
jne 0xb0c6a
jmp 0xb0cc6
movb $0x2, (%rbx)
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x20(%rsp), %rsi
movq %r12, (%rsi)
callq 0xd04da
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x84be0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x20650
movq %rax, %r14
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x6aa59(%rip), %rsi # 0x11b759
leaq 0x6aa7c(%rip), %rdx # 0x11b783
movq %rsp, %rdi
callq 0x287ce
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x12d, %esi # imm = 0x12D
xorl %ecx, %ecx
callq 0x7e688
xorl %ebp, %ebp
leaq 0xb0313(%rip), %rsi # 0x161040
leaq -0x3abd2(%rip), %rdx # 0x76162
movq %r14, %rdi
callq 0x20a60
jmp 0xb0d42
jmp 0xb0d42
jmp 0xb0d42
movq %rax, %r15
jmp 0xb0d8c
movq %rax, %r15
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x84be0
movq %r14, %rdi
callq 0x892fa
jmp 0xb0d8c
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xb0d7a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0xb0d84
jmp 0xb0d8c
movq %rax, %r15
movq %r14, %rdi
callq 0x20f00
movq %rbx, %rdi
callq 0x892fa
movq %r15, %rdi
callq 0x20b00
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE:
push rbp; __int64
push r15; int
push r14; void *
push r13; int
push r12; __int64
push rbx; int
sub rsp, 28h
mov ebp, r8d
mov r13d, ecx
mov r15, rdx
mov r14, rsi
mov rbx, rdi
lea rax, [rdx+rdx*2]
lea r12, [rsi+rax*8]
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov rdi, rsi
mov rsi, r12
call _ZSt9__find_ifIPKN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEN9__gnu_cxx5__ops12_Iter_negateIZNSG_C1ESt16initializer_listISH_EbNS2_7value_tEEUlRSI_E_EEET_ST_ST_T0_St26random_access_iterator_tag; std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>,std::random_access_iterator_tag)
cmp rax, r12
setz cl
test r13b, r13b
jnz short loc_B0C37
cmp rax, r12
setz al
cmp bpl, 2
setnz cl
cmp bpl, 1
setnz dl
or dl, al
jz loc_B0CE2
and cl, al
loc_B0C37:
test cl, cl
jz short loc_B0CAC
mov byte ptr [rbx], 1
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [rbx+8], rax
test r15, r15
jz short loc_B0CC6
shl r15, 3
lea r12, [r15+r15*2]
mov r15, rsp
loc_B0C6A:
mov rdi, r15
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::moved_or_copied(void)
mov rdi, [rbx+8]
mov rax, [rsp+58h+var_50]
mov rdx, [rax]
mov rsi, [rdx+8]
add rdx, 10h
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add r14, 18h
add r12, 0FFFFFFFFFFFFFFE8h
jnz short loc_B0C6A
jmp short loc_B0CC6
loc_B0CAC:
mov byte ptr [rbx], 2
mov rdi, rsp
mov [rdi], r14
lea rsi, [rsp+58h+var_38]
mov [rsi], r12
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJPKNS0_6detail8json_refISD_EESL_EEEPT_DpOT0_; 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>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const* &&)
mov [rbx+8], rax
loc_B0CC6:
mov rdi, rbx
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B0CE2:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea r12, [rsp+58h+var_48]
mov [r12-10h], r12
lea rsi, aCannotCreateOb; "cannot create object from initializer l"...
lea rdx, aCannotCreateOb+2Ah; ""
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov bpl, 1
mov rdx, rsp
mov rdi, r14; this
mov esi, 12Dh; int
xor ecx, ecx
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_B0D42
jmp short loc_B0D42
jmp short $+2
loc_B0D42:
mov r15, rax
jmp short loc_B0D8C
mov r15, rax
mov r14, rsp
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_B0D8C
mov r15, rax
mov rdi, [rsp+58h+var_58]; void *
cmp rdi, r12
jz short loc_B0D7A
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B0D7A:
test bpl, bpl
jnz short loc_B0D84
jmp short loc_B0D8C
mov r15, rax
loc_B0D84:
mov rdi, r14; void *
call ___cxa_free_exception
loc_B0D8C:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, r15
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>::basic_json(
long long a1,
char *a2,
long long a3,
char a4,
char a5)
{
char *v8; // r14
char *v9; // r12
long long v10; // rax
bool v11; // cl
bool v12; // al
long long result; // rax
long long v14; // r12
nlohmann::json_abi_v3_11_3::detail::exception *exception; // r14
void *v16; // [rsp+0h] [rbp-58h] BYREF
long long v17; // [rsp+8h] [rbp-50h]
_QWORD v18[9]; // [rsp+10h] [rbp-48h] BYREF
v8 = a2;
v9 = &a2[24 * a3];
*(_OWORD *)a1 = 0LL;
v10 = std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const&)#1}>>(
a2,
v9);
v11 = v10 == (_QWORD)v9;
if ( !a4 )
{
v12 = v10 == (_QWORD)v9;
if ( !v12 && a5 == 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v16 = v18;
std::string::_M_construct<char const*>((long long)&v16, "cannot create object from initializer list", (long long)"");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
exception,
301,
&v16);
__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);
}
v11 = v12 && a5 != 2;
}
if ( v11 )
{
*(_BYTE *)a1 = 1;
result = operator new(0x20uLL);
*(_OWORD *)result = 0LL;
*(_QWORD *)(result + 16) = 0LL;
*(_QWORD *)(a1 + 8) = result;
if ( a3 )
{
v14 = 24 * a3;
do
{
nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::moved_or_copied(
&v16,
v8);
nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace(
*(_QWORD **)(a1 + 8),
*(long long **)(*(_QWORD *)v17 + 8LL),
*(_QWORD *)v17 + 16LL);
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 *)&v16);
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v16);
v8 += 24;
v14 -= 24LL;
}
while ( v14 );
}
}
else
{
*(_BYTE *)a1 = 2;
v16 = a2;
v18[2] = v9;
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*>(&v16);
*(_QWORD *)(a1 + 8) = result;
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
return result;
}
| basic_json:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,R8D
MOV R13D,ECX
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RDX + RDX*0x2]
LEA R12,[RSI + RAX*0x8]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
LAB_001b0c03:
MOV RDI,RSI
MOV RSI,R12
CALL 0x001d052e
CMP RAX,R12
SETZ CL
TEST R13B,R13B
JNZ 0x001b0c37
CMP RAX,R12
SETZ AL
CMP BPL,0x2
SETNZ CL
CMP BPL,0x1
SETNZ DL
OR DL,AL
JZ 0x001b0ce2
AND CL,AL
LAB_001b0c37:
TEST CL,CL
JZ 0x001b0cac
MOV byte ptr [RBX],0x1
LAB_001b0c3e:
MOV EDI,0x20
CALL 0x00120220
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [RBX + 0x8],RAX
TEST R15,R15
JZ 0x001b0cc6
SHL R15,0x3
LEA R12,[R15 + R15*0x2]
MOV R15,RSP
LAB_001b0c6a:
MOV RDI,R15
MOV RSI,R14
CALL 0x001d0488
MOV RDI,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RAX]
MOV RSI,qword ptr [RDX + 0x8]
ADD RDX,0x10
LAB_001b0c89:
CALL 0x0018a8f2
MOV RDI,R15
XOR ESI,ESI
CALL 0x00184be0
MOV RDI,R15
CALL 0x001892fa
ADD R14,0x18
ADD R12,-0x18
JNZ 0x001b0c6a
JMP 0x001b0cc6
LAB_001b0cac:
MOV byte ptr [RBX],0x2
MOV RDI,RSP
MOV qword ptr [RDI],R14
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI],R12
LAB_001b0cbd:
CALL 0x001d04da
LAB_001b0cc2:
MOV qword ptr [RBX + 0x8],RAX
LAB_001b0cc6:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00184be0
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b0ce2:
MOV EDI,0x20
CALL 0x00120650
MOV R14,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
LAB_001b0cf9:
LEA RSI,[0x21b759]
LEA RDX,[0x21b783]
MOV RDI,RSP
CALL 0x001287ce
MOV BPL,0x1
LAB_001b0d12:
MOV RDX,RSP
MOV RDI,R14
MOV ESI,0x12d
XOR ECX,ECX
CALL 0x0017e688
XOR EBP,EBP
LEA RSI,[0x261040]
LEA RDX,[0x176162]
MOV RDI,R14
CALL 0x00120a60
|
/* 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(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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> > >, bool, nlohmann::json_abi_v3_11_3::detail::value_t) */
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>
::basic_json(int8 *param_1,json_ref *param_2,long param_3,char param_4,char param_5)
{
json_ref *pjVar1;
json_ref *pjVar2;
int8 *puVar3;
vector *pvVar4;
int8 uVar5;
bool bVar6;
json_ref *local_58;
long *local_50;
json_ref local_48 [16];
json_ref *local_38;
pjVar1 = param_2 + param_3 * 0x18;
*param_1 = 0;
param_1[1] = 0;
/* try { // try from 001b0c03 to 001b0c0d has its CatchHandler @ 001b0d40 */
pjVar2 = std::
__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,__gnu_cxx::__ops::_Iter_negate<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>::_Iter_negate(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::_lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const&)_1_>>
(param_2,pjVar1);
bVar6 = pjVar2 == pjVar1;
if (param_4 == '\0') {
if (param_5 == '\x01' && pjVar2 != pjVar1) {
uVar5 = __cxa_allocate_exception(0x20);
local_58 = local_48;
/* try { // try from 001b0cf9 to 001b0d0e has its CatchHandler @ 001b0d81 */
std::__cxx11::string::_M_construct<char_const*>
(&local_58,"cannot create object from initializer list","");
/* try { // try from 001b0d12 to 001b0d3b has its CatchHandler @ 001b0d61 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(uVar5,0x12d,&local_58,0);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar5,&detail::type_error::typeinfo,detail::exception::~exception);
}
bVar6 = param_5 != '\x02' && pjVar2 == pjVar1;
}
if (bVar6) {
*(int1 *)param_1 = 1;
/* try { // try from 001b0c3e to 001b0c47 has its CatchHandler @ 001b0d3e */
puVar3 = (int8 *)operator_new(0x20);
*puVar3 = 0;
puVar3[1] = 0;
puVar3[2] = 0;
param_1[1] = puVar3;
if (param_3 != 0) {
param_3 = param_3 * 0x18;
do {
/* try { // try from 001b0c6a to 001b0c74 has its CatchHandler @ 001b0d42 */
detail::
json_ref<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>>
::moved_or_copied();
/* try { // try from 001b0c89 to 001b0c8d has its CatchHandler @ 001b0d47 */
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::emplace((ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)param_1[1],*(string **)(*local_50 + 8),(basic_json *)(*local_50 + 0x10));
assert_invariant(SUB81(&local_58,0));
data::~data((data *)&local_58);
param_3 = param_3 + -0x18;
} while (param_3 != 0);
}
}
else {
*(int1 *)param_1 = 2;
local_58 = param_2;
local_38 = pjVar1;
/* try { // try from 001b0cbd to 001b0cc1 has its CatchHandler @ 001b0d3c */
pvVar4 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*>
(&local_58,&local_38);
param_1[1] = pvVar4;
}
assert_invariant(SUB81(param_1,0));
return;
}
| |
42,336 | wt_thd_release_self | eloqsql/storage/maria/trnman.c | static void wt_thd_release_self(TRN *trn)
{
if (trn->wt)
{
WT_RESOURCE_ID rc;
rc.type= &ma_rc_dup_unique;
rc.value= (intptr)trn;
wt_thd_release(trn->wt, & rc);
trn->wt= 0;
}
} | O0 | c | wt_thd_release_self:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x795a7
leaq 0x243cda(%rip), %rax # 0x2bd258
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x100740
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| wt_thd_release_self:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+8], 0
jz short loc_795A7
lea rax, ma_rc_dup_unique
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rdi, [rax+8]
lea rsi, [rbp+var_18]
call wt_thd_release
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
loc_795A7:
add rsp, 20h
pop rbp
retn
| long long wt_thd_release_self(long long a1)
{
long long result; // rax
_QWORD v2[2]; // [rsp+8h] [rbp-18h] BYREF
long long v3; // [rsp+18h] [rbp-8h]
v3 = a1;
result = a1;
if ( *(_QWORD *)(a1 + 8) )
{
v2[1] = &ma_rc_dup_unique;
v2[0] = v3;
wt_thd_release(*(_QWORD *)(v3 + 8), v2);
result = v3;
*(_QWORD *)(v3 + 8) = 0LL;
}
return result;
}
| wt_thd_release_self:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001795a7
LEA RAX,[0x3bd258]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RBP + -0x18]
CALL 0x00200740
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
LAB_001795a7:
ADD RSP,0x20
POP RBP
RET
|
void wt_thd_release_self(long param_1)
{
long local_20;
int1 *local_18;
long local_10;
if (*(long *)(param_1 + 8) != 0) {
local_18 = ma_rc_dup_unique;
local_20 = param_1;
local_10 = param_1;
wt_thd_release(*(int8 *)(param_1 + 8),&local_20);
*(int8 *)(local_10 + 8) = 0;
}
return;
}
| |
42,337 | void google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::SourceCodeInfo_Location>::TypeHandler>(void**, void**, int, int) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_ptr_field.h | PROTOBUF_NOINLINE void MergeFromInnerLoop(void** our_elems,
void** other_elems, int length,
int already_allocated) {
if (already_allocated < length) {
Arena* arena = GetOwningArena();
typename TypeHandler::Type* elem_prototype =
reinterpret_cast<typename TypeHandler::Type*>(other_elems[0]);
for (int i = already_allocated; i < length; i++) {
// Allocate a new empty element that we'll merge into below
typename TypeHandler::Type* new_elem =
TypeHandler::NewFromPrototype(elem_prototype, arena);
our_elems[i] = new_elem;
}
}
// Main loop that does the actual merging
for (int i = 0; i < length; i++) {
// Already allocated: use existing element.
typename TypeHandler::Type* other_elem =
reinterpret_cast<typename TypeHandler::Type*>(other_elems[i]);
typename TypeHandler::Type* new_elem =
reinterpret_cast<typename TypeHandler::Type*>(our_elems[i]);
TypeHandler::Merge(*other_elem, new_elem);
}
} | O0 | c | void google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::SourceCodeInfo_Location>::TypeHandler>(void**, void**, int, int):
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movl %ecx, 0x4c(%rsp)
movl %r8d, 0x48(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x48(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jge 0xe3a54
movq 0x8(%rsp), %rdi
callq 0xa7f20
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x38(%rsp)
movl 0x48(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jge 0xe3a52
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0xdef20
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdx
movq 0x58(%rsp), %rax
movslq 0x34(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0xe3a14
jmp 0xe3a54
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jge 0xe3aa8
movq 0x50(%rsp), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0xe3ab0
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0xe3a5c
addq $0x68, %rsp
retq
nopl (%rax)
| _ZN6google8protobuf8internal20RepeatedPtrFieldBase18MergeFromInnerLoopINS0_16RepeatedPtrFieldINS0_28GeneratedCodeInfo_AnnotationEE11TypeHandlerEEEvPPvS9_ii:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov [rsp+68h+var_18], rdx
mov [rsp+68h+var_1C], ecx
mov [rsp+68h+var_20], r8d
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_60], rax
mov eax, [rsp+68h+var_20]
cmp eax, [rsp+68h+var_1C]
jge short loc_E3A54
mov rdi, [rsp+68h+var_60]; this
call _ZNK6google8protobuf8internal20RepeatedPtrFieldBase14GetOwningArenaEv; google::protobuf::internal::RepeatedPtrFieldBase::GetOwningArena(void)
mov [rsp+68h+var_28], rax
mov rax, [rsp+68h+var_18]
mov rax, [rax]
mov [rsp+68h+var_30], rax
mov eax, [rsp+68h+var_20]
mov [rsp+68h+var_34], eax
loc_E3A14:
mov eax, [rsp+68h+var_34]
cmp eax, [rsp+68h+var_1C]
jge short loc_E3A52
mov rdi, [rsp+68h+var_30]
mov rsi, [rsp+68h+var_28]
call _ZN6google8protobuf8internal18GenericTypeHandlerINS0_28GeneratedCodeInfo_AnnotationEE16NewFromPrototypeEPKS3_PNS0_5ArenaE; google::protobuf::internal::GenericTypeHandler<google::protobuf::GeneratedCodeInfo_Annotation>::NewFromPrototype(google::protobuf::GeneratedCodeInfo_Annotation const*,google::protobuf::Arena *)
mov [rsp+68h+var_40], rax
mov rdx, [rsp+68h+var_40]
mov rax, [rsp+68h+var_10]
movsxd rcx, [rsp+68h+var_34]
mov [rax+rcx*8], rdx
mov eax, [rsp+68h+var_34]
add eax, 1
mov [rsp+68h+var_34], eax
jmp short loc_E3A14
loc_E3A52:
jmp short $+2
loc_E3A54:
mov [rsp+68h+var_44], 0
loc_E3A5C:
mov eax, [rsp+68h+var_44]
cmp eax, [rsp+68h+var_1C]
jge short loc_E3AA8
mov rax, [rsp+68h+var_18]
movsxd rcx, [rsp+68h+var_44]
mov rax, [rax+rcx*8]
mov [rsp+68h+var_50], rax
mov rax, [rsp+68h+var_10]
movsxd rcx, [rsp+68h+var_44]
mov rax, [rax+rcx*8]
mov [rsp+68h+var_58], rax
mov rdi, [rsp+68h+var_50]
mov rsi, [rsp+68h+var_58]
call _ZN6google8protobuf8internal18GenericTypeHandlerINS0_28GeneratedCodeInfo_AnnotationEE5MergeERKS3_PS3_; google::protobuf::internal::GenericTypeHandler<google::protobuf::GeneratedCodeInfo_Annotation>::Merge(google::protobuf::GeneratedCodeInfo_Annotation const&,google::protobuf::GeneratedCodeInfo_Annotation*)
mov eax, [rsp+68h+var_44]
add eax, 1
mov [rsp+68h+var_44], eax
jmp short loc_E3A5C
loc_E3AA8:
add rsp, 68h
retn
| long long google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::GeneratedCodeInfo_Annotation>::TypeHandler>(
google::protobuf::internal::RepeatedPtrFieldBase *a1,
long long a2,
long long *a3,
int a4,
int a5)
{
long long result; // rax
unsigned int j; // [rsp+24h] [rbp-44h]
int i; // [rsp+34h] [rbp-34h]
long long v8; // [rsp+38h] [rbp-30h]
int OwningArena; // [rsp+40h] [rbp-28h]
if ( a5 < a4 )
{
OwningArena = google::protobuf::internal::RepeatedPtrFieldBase::GetOwningArena(a1);
v8 = *a3;
for ( i = a5; i < a4; ++i )
*(_QWORD *)(a2 + 8LL * i) = google::protobuf::internal::GenericTypeHandler<google::protobuf::GeneratedCodeInfo_Annotation>::NewFromPrototype(
v8,
OwningArena);
}
for ( j = 0; ; ++j )
{
result = j;
if ( (int)j >= a4 )
break;
google::protobuf::internal::GenericTypeHandler<google::protobuf::GeneratedCodeInfo_Annotation>::Merge(
a3[j],
*(_QWORD *)(a2 + 8LL * (int)j));
}
return result;
}
| MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::GeneratedCodeInfo_Annotation>::TypeHandler>:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x50],RDX
MOV dword ptr [RSP + 0x4c],ECX
MOV dword ptr [RSP + 0x48],R8D
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x8],RAX
MOV EAX,dword ptr [RSP + 0x48]
CMP EAX,dword ptr [RSP + 0x4c]
JGE 0x001e3a54
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001a7f20
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x38],RAX
MOV EAX,dword ptr [RSP + 0x48]
MOV dword ptr [RSP + 0x34],EAX
LAB_001e3a14:
MOV EAX,dword ptr [RSP + 0x34]
CMP EAX,dword ptr [RSP + 0x4c]
JGE 0x001e3a52
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x001def20
MOV qword ptr [RSP + 0x28],RAX
MOV RDX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x58]
MOVSXD RCX,dword ptr [RSP + 0x34]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV EAX,dword ptr [RSP + 0x34]
ADD EAX,0x1
MOV dword ptr [RSP + 0x34],EAX
JMP 0x001e3a14
LAB_001e3a52:
JMP 0x001e3a54
LAB_001e3a54:
MOV dword ptr [RSP + 0x24],0x0
LAB_001e3a5c:
MOV EAX,dword ptr [RSP + 0x24]
CMP EAX,dword ptr [RSP + 0x4c]
JGE 0x001e3aa8
MOV RAX,qword ptr [RSP + 0x50]
MOVSXD RCX,dword ptr [RSP + 0x24]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOVSXD RCX,dword ptr [RSP + 0x24]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001e3ab0
MOV EAX,dword ptr [RSP + 0x24]
ADD EAX,0x1
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001e3a5c
LAB_001e3aa8:
ADD RSP,0x68
RET
|
/* void
google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::GeneratedCodeInfo_Annotation>::TypeHandler>(void**,
void**, int, int) */
void __thiscall
google::protobuf::internal::RepeatedPtrFieldBase::
MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::GeneratedCodeInfo_Annotation>::TypeHandler>
(RepeatedPtrFieldBase *this,void **param_1,void **param_2,int param_3,int param_4)
{
GeneratedCodeInfo_Annotation *pGVar1;
Arena *pAVar2;
void *pvVar3;
int local_44;
int local_34;
if (param_4 < param_3) {
pAVar2 = (Arena *)GetOwningArena(this);
pGVar1 = (GeneratedCodeInfo_Annotation *)*param_2;
for (local_34 = param_4; local_34 < param_3; local_34 = local_34 + 1) {
pvVar3 = (void *)GenericTypeHandler<google::protobuf::GeneratedCodeInfo_Annotation>::
NewFromPrototype(pGVar1,pAVar2);
param_1[local_34] = pvVar3;
}
}
for (local_44 = 0; local_44 < param_3; local_44 = local_44 + 1) {
GenericTypeHandler<google::protobuf::GeneratedCodeInfo_Annotation>::Merge
((GeneratedCodeInfo_Annotation *)param_2[local_44],
(GeneratedCodeInfo_Annotation *)param_1[local_44]);
}
return;
}
| |
42,338 | void google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::SourceCodeInfo_Location>::TypeHandler>(void**, void**, int, int) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_ptr_field.h | PROTOBUF_NOINLINE void MergeFromInnerLoop(void** our_elems,
void** other_elems, int length,
int already_allocated) {
if (already_allocated < length) {
Arena* arena = GetOwningArena();
typename TypeHandler::Type* elem_prototype =
reinterpret_cast<typename TypeHandler::Type*>(other_elems[0]);
for (int i = already_allocated; i < length; i++) {
// Allocate a new empty element that we'll merge into below
typename TypeHandler::Type* new_elem =
TypeHandler::NewFromPrototype(elem_prototype, arena);
our_elems[i] = new_elem;
}
}
// Main loop that does the actual merging
for (int i = 0; i < length; i++) {
// Already allocated: use existing element.
typename TypeHandler::Type* other_elem =
reinterpret_cast<typename TypeHandler::Type*>(other_elems[i]);
typename TypeHandler::Type* new_elem =
reinterpret_cast<typename TypeHandler::Type*>(our_elems[i]);
TypeHandler::Merge(*other_elem, new_elem);
}
} | O3 | c | void google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::SourceCodeInfo_Location>::TypeHandler>(void**, void**, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movl %ecx, 0xc(%rsp)
movl %ecx, %r13d
subl %r8d, %r13d
jle 0x75f38
movq (%rdi), %r15
movq 0x10(%rsp), %rax
movq (%rax), %r12
movslq %r8d, %rax
leaq (%r14,%rax,8), %rbp
xorl %ebx, %ebx
movq %r12, %rdi
movq %r15, %rsi
callq 0x7837a
movq %rax, (%rbp,%rbx,8)
incq %rbx
cmpl %ebx, %r13d
jne 0x75f20
movl 0xc(%rsp), %eax
testl %eax, %eax
movq 0x10(%rsp), %r12
jle 0x75f5f
movl %eax, %r15d
xorl %ebx, %ebx
movq (%r12,%rbx,8), %rdi
movq (%r14,%rbx,8), %rsi
callq 0x6f32a
incq %rbx
cmpq %rbx, %r15
jne 0x75f4a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN6google8protobuf8internal20RepeatedPtrFieldBase18MergeFromInnerLoopINS0_16RepeatedPtrFieldINS0_7MessageEE11TypeHandlerEEEvPPvS9_ii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_38], rdx
mov r14, rsi
mov [rsp+48h+var_3C], ecx
mov r13d, ecx
sub r13d, r8d
jle short loc_75F38
mov r15, [rdi]
mov rax, [rsp+48h+var_38]
mov r12, [rax]
movsxd rax, r8d
lea rbp, [r14+rax*8]
xor ebx, ebx
loc_75F20:
mov rdi, r12
mov rsi, r15
call _ZN6google8protobuf8internal18GenericTypeHandlerINS0_7MessageEE16NewFromPrototypeEPKS3_PNS0_5ArenaE; google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::NewFromPrototype(google::protobuf::Message const*,google::protobuf::Arena *)
mov [rbp+rbx*8+0], rax
inc rbx
cmp r13d, ebx
jnz short loc_75F20
loc_75F38:
mov eax, [rsp+48h+var_3C]
test eax, eax
mov r12, [rsp+48h+var_38]
jle short loc_75F5F
mov r15d, eax
xor ebx, ebx
loc_75F4A:
mov rdi, [r12+rbx*8]
mov rsi, [r14+rbx*8]
call _ZN6google8protobuf8internal18GenericTypeHandlerINS0_7MessageEE5MergeERKS3_PS3_; google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::Merge(google::protobuf::Message const&,google::protobuf::Message*)
inc rbx
cmp r15, rbx
jnz short loc_75F4A
loc_75F5F:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::Message>::TypeHandler>(
long long *a1,
long long a2,
long long *a3,
int a4,
int a5)
{
int v5; // r13d
long long v6; // r15
long long v7; // r12
long long v8; // rbp
long long v9; // rbx
long long result; // rax
long long v11; // rbx
v5 = a4 - a5;
if ( a4 > a5 )
{
v6 = *a1;
v7 = *a3;
v8 = a2 + 8LL * a5;
v9 = 0LL;
do
*(_QWORD *)(v8 + 8 * v9++) = google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::NewFromPrototype(
v7,
v6);
while ( v5 != (_DWORD)v9 );
}
result = (unsigned int)a4;
if ( a4 > 0 )
{
v11 = 0LL;
do
{
result = google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::Merge(
a3[v11],
*(_QWORD *)(a2 + 8 * v11));
++v11;
}
while ( a4 != v11 );
}
return result;
}
| MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::Message>::TypeHandler>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDX
MOV R14,RSI
MOV dword ptr [RSP + 0xc],ECX
MOV R13D,ECX
SUB R13D,R8D
JLE 0x00175f38
MOV R15,qword ptr [RDI]
MOV RAX,qword ptr [RSP + 0x10]
MOV R12,qword ptr [RAX]
MOVSXD RAX,R8D
LEA RBP,[R14 + RAX*0x8]
XOR EBX,EBX
LAB_00175f20:
MOV RDI,R12
MOV RSI,R15
CALL 0x0017837a
MOV qword ptr [RBP + RBX*0x8],RAX
INC RBX
CMP R13D,EBX
JNZ 0x00175f20
LAB_00175f38:
MOV EAX,dword ptr [RSP + 0xc]
TEST EAX,EAX
MOV R12,qword ptr [RSP + 0x10]
JLE 0x00175f5f
MOV R15D,EAX
XOR EBX,EBX
LAB_00175f4a:
MOV RDI,qword ptr [R12 + RBX*0x8]
MOV RSI,qword ptr [R14 + RBX*0x8]
CALL 0x0016f32a
INC RBX
CMP R15,RBX
JNZ 0x00175f4a
LAB_00175f5f:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* void
google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::Message>::TypeHandler>(void**,
void**, int, int) */
void __thiscall
google::protobuf::internal::RepeatedPtrFieldBase::
MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::Message>::TypeHandler>
(RepeatedPtrFieldBase *this,void **param_1,void **param_2,int param_3,int param_4)
{
Arena *pAVar1;
Message *pMVar2;
Message *pMVar3;
Message *extraout_RDX;
long lVar4;
ulong uVar5;
int1 auVar6 [16];
pMVar3 = (Message *)param_2;
if (param_4 < param_3) {
pAVar1 = *(Arena **)this;
pMVar2 = (Message *)*param_2;
lVar4 = 0;
do {
auVar6 = GenericTypeHandler<google::protobuf::Message>::NewFromPrototype(pMVar2,pAVar1);
pMVar3 = auVar6._8_8_;
param_1[param_4 + lVar4] = auVar6._0_8_;
lVar4 = lVar4 + 1;
} while (param_3 - param_4 != (int)lVar4);
}
if (0 < param_3) {
uVar5 = 0;
do {
GenericTypeHandler<google::protobuf::Message>::Merge
((GenericTypeHandler<google::protobuf::Message> *)param_2[uVar5],
(Message *)param_1[uVar5],pMVar3);
uVar5 = uVar5 + 1;
pMVar3 = extraout_RDX;
} while ((uint)param_3 != uVar5);
}
return;
}
| |
42,339 | minja::Parser::parseIfExpression() | monkey531[P]llama/common/minja.hpp | std::pair<std::shared_ptr<Expression>, std::shared_ptr<Expression>> parseIfExpression() {
auto condition = parseLogicalOr();
if (!condition) throw std::runtime_error("Expected condition expression");
static std::regex else_tok(R"(else\b)");
std::shared_ptr<Expression> else_expr;
if (!consumeToken(else_tok).empty()) {
else_expr = parseExpression();
if (!else_expr) throw std::runtime_error("Expected 'else' expression");
}
return std::pair(std::move(condition), std::move(else_expr));
} | O2 | cpp | minja::Parser::parseIfExpression():
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x6d5a4
cmpq $0x0, (%r15)
je 0x6d8bf
leaq 0x9fa55(%rip), %rax # 0x10d228
movb (%rax), %al
testb %al, %al
je 0x6d8ef
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x9fa1d(%rip), %rdx # 0x10d208
leaq 0x20(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x6c334
leaq 0x20(%rsp), %rdi
movq 0x8(%rdi), %r15
callq 0x25298
testq %r15, %r15
je 0x6d872
leaq 0x20(%rsp), %rdi
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0x6c14e
movq %rsp, %r14
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x7d29c
leaq 0x28(%rsp), %rdi
callq 0x5b5b4
movq (%r14), %rax
testq %rax, %rax
jne 0x6d876
pushq $0x10
popq %rdi
callq 0x24470
movq %rax, %r14
leaq 0x531d4(%rip), %rsi # 0xc0a26
movq %rax, %rdi
callq 0x24330
movq 0x9e78f(%rip), %rsi # 0x10bff0
movq 0x9e6f0(%rip), %rdx # 0x10bf58
movq %r14, %rdi
callq 0x24f80
jmp 0x6d8ef
movq (%rsp), %rax
leaq 0x18(%rsp), %r14
movaps -0x8(%r14), %xmm0
andq $0x0, (%r14)
andq $0x0, -0x8(%r14)
movups %xmm0, (%rbx)
movq %rax, 0x10(%rbx)
leaq 0x8(%rsp), %rdi
movq (%rdi), %rax
andq $0x0, (%rdi)
movq %rax, 0x18(%rbx)
andq $0x0, -0x8(%rdi)
callq 0x5b5b4
movq %r14, %rdi
callq 0x5b5b4
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x24470
movq %rax, %r14
leaq 0x53130(%rip), %rsi # 0xc0a01
movq %rax, %rdi
callq 0x24330
movq 0x9e710(%rip), %rsi # 0x10bff0
movq 0x9e671(%rip), %rdx # 0x10bf58
movq %r14, %rdi
callq 0x24f80
leaq 0x9f932(%rip), %rdi # 0x10d228
callq 0x25090
testl %eax, %eax
je 0x6d7dd
leaq 0x9f8fe(%rip), %rdi # 0x10d208
leaq 0x5310e(%rip), %rsi # 0xc0a1f
pushq $0x10
popq %rdx
callq 0x52106
leaq -0x1b5f4(%rip), %rdi # 0x5232c
leaq 0x9f8e1(%rip), %rsi # 0x10d208
leaq 0x9f02a(%rip), %rdx # 0x10c958
callq 0x247e0
leaq 0x9f8ee(%rip), %rdi # 0x10d228
callq 0x245f0
jmp 0x6d7dd
movq %rax, %rbx
leaq 0x9f8da(%rip), %rdi # 0x10d228
callq 0x245e0
jmp 0x6d985
jmp 0x6d978
movq %rax, %rbx
movq %r14, %rdi
callq 0x246a0
jmp 0x6d97b
movq %rax, %rbx
jmp 0x6d985
movq %rax, %rbx
movq %r14, %rdi
callq 0x246a0
jmp 0x6d985
jmp 0x6d978
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5b5b4
leaq 0x18(%rsp), %rdi
callq 0x5b5b4
movq %rbx, %rdi
callq 0x25010
| _ZN5minja6Parser17parseIfExpressionEv:
push r15
push r14
push rbx
sub rsp, 40h
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+58h+var_48]
mov rdi, r15; this
call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void)
cmp qword ptr [r15], 0
jz loc_6D8BF
lea rax, _ZGVZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; `guard variable for'minja::Parser::parseIfExpression(void)::else_tok
mov al, [rax]
test al, al
jz loc_6D8EF
loc_6D7DD:
xorps xmm0, xmm0
movaps [rsp+58h+var_58], xmm0
lea rdx, _ZZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; minja::Parser::parseIfExpression(void)::else_tok
lea rdi, [rsp+58h+var_38]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+58h+var_38]; void *
mov r15, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15, r15
jz short loc_6D872
lea rdi, [rsp+58h+var_38]; this
push 1
pop rdx
mov rsi, r14; bool
call _ZN5minja6Parser15parseExpressionEb; minja::Parser::parseExpression(bool)
mov r14, rsp
lea rsi, [rsp+58h+var_38]
mov rdi, r14
call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSEOS4_; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>&&)
lea rdi, [rsp+58h+var_30]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, [r14]
test rax, rax
jnz short loc_6D876
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedElseEx; "Expected 'else' expression"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_6D8EF
loc_6D872:
mov rax, qword ptr [rsp+58h+var_58]
loc_6D876:
lea r14, [rsp+58h+var_40]
movaps xmm0, xmmword ptr [r14-8]
and qword ptr [r14], 0
and qword ptr [r14-8], 0
movups xmmword ptr [rbx], xmm0
mov [rbx+10h], rax
lea rdi, [rsp+58h+var_58+8]
mov rax, [rdi]
and qword ptr [rdi], 0
mov [rbx+18h], rax
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop r15
retn
loc_6D8BF:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedCondit_1; "Expected condition expression"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_6D8EF:
lea rdi, _ZGVZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_6D7DD
lea rdi, _ZZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; minja::Parser::parseIfExpression(void)::else_tok
lea rsi, aElseB; "else\\b"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_6D7DD
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_6D985
jmp short loc_6D978
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_6D97B
mov rbx, rax
jmp short loc_6D985
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_6D985
jmp short $+2
loc_6D978:
mov rbx, rax
loc_6D97B:
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_6D985:
lea rdi, [rsp+arg_10]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseIfExpression(minja::Parser *this, _QWORD *a2)
{
long long v2; // r15
long long v3; // rax
std::runtime_error *v4; // r14
__int128 v5; // xmm0
long long v6; // rax
std::runtime_error *exception; // r14
__int128 v9; // [rsp+0h] [rbp-58h] BYREF
__int128 v10; // [rsp+10h] [rbp-48h] BYREF
long long v11; // [rsp+20h] [rbp-38h] BYREF
_QWORD v12[6]; // [rsp+28h] [rbp-30h] BYREF
minja::Parser::parseLogicalOr((minja::Parser *)&v10, a2);
if ( !(_QWORD)v10 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected condition expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseIfExpression(void)::else_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseIfExpression(void)::else_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseIfExpression(void)::else_tok[abi:cxx11],
(long long)"else\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseIfExpression(void)::else_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseIfExpression(void)::else_tok[abi:cxx11]);
}
v9 = 0LL;
minja::Parser::consumeToken(
&v11,
(long long)a2,
(long long)&minja::Parser::parseIfExpression(void)::else_tok[abi:cxx11],
1u);
v2 = v12[0];
std::string::~string(&v11);
if ( v2 )
{
minja::Parser::parseExpression((minja::Parser *)&v11, a2, 1);
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=(&v9, &v11);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12);
v3 = v9;
if ( !(_QWORD)v9 )
{
v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v4, "Expected 'else' expression");
__cxa_throw(
v4,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
else
{
v3 = v9;
}
v5 = v10;
v10 = 0uLL;
*(_OWORD *)this = v5;
*((_QWORD *)this + 2) = v3;
v6 = *((_QWORD *)&v9 + 1);
*((_QWORD *)&v9 + 1) = 0LL;
*((_QWORD *)this + 3) = v6;
*(_QWORD *)&v9 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v9 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v10 + 1);
return this;
}
| parseIfExpression:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x10]
MOV RDI,R15
CALL 0x0016d5a4
CMP qword ptr [R15],0x0
JZ 0x0016d8bf
LEA RAX,[0x20d228]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x0016d8ef
LAB_0016d7dd:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
LAB_0016d7e4:
LEA RDX,[0x20d208]
LEA RDI,[RSP + 0x20]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x0016c334
LEA RDI,[RSP + 0x20]
MOV R15,qword ptr [RDI + 0x8]
CALL 0x00125298
TEST R15,R15
JZ 0x0016d872
LAB_0016d80e:
LEA RDI,[RSP + 0x20]
PUSH 0x1
POP RDX
MOV RSI,R14
CALL 0x0016c14e
LAB_0016d81e:
MOV R14,RSP
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0017d29c
LEA RDI,[RSP + 0x28]
CALL 0x0015b5b4
MOV RAX,qword ptr [R14]
TEST RAX,RAX
JNZ 0x0016d876
PUSH 0x10
POP RDI
CALL 0x00124470
MOV R14,RAX
LAB_0016d84b:
LEA RSI,[0x1c0a26]
MOV RDI,RAX
CALL 0x00124330
LAB_0016d85a:
MOV RSI,qword ptr [0x0020bff0]
MOV RDX,qword ptr [0x0020bf58]
MOV RDI,R14
CALL 0x00124f80
LAB_0016d872:
MOV RAX,qword ptr [RSP]
LAB_0016d876:
LEA R14,[RSP + 0x18]
MOVAPS XMM0,xmmword ptr [R14 + -0x8]
AND qword ptr [R14],0x0
AND qword ptr [R14 + -0x8],0x0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],RAX
LEA RDI,[RSP + 0x8]
MOV RAX,qword ptr [RDI]
AND qword ptr [RDI],0x0
MOV qword ptr [RBX + 0x18],RAX
AND qword ptr [RDI + -0x8],0x0
CALL 0x0015b5b4
MOV RDI,R14
CALL 0x0015b5b4
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
LAB_0016d8bf:
PUSH 0x10
POP RDI
CALL 0x00124470
MOV R14,RAX
LAB_0016d8ca:
LEA RSI,[0x1c0a01]
MOV RDI,RAX
CALL 0x00124330
LAB_0016d8d9:
MOV RSI,qword ptr [0x0020bff0]
MOV RDX,qword ptr [0x0020bf58]
MOV RDI,R14
CALL 0x00124f80
LAB_0016d8ef:
LEA RDI,[0x20d228]
CALL 0x00125090
TEST EAX,EAX
JZ 0x0016d7dd
LAB_0016d903:
LEA RDI,[0x20d208]
LEA RSI,[0x1c0a1f]
PUSH 0x10
POP RDX
CALL 0x00152106
LAB_0016d919:
LEA RDI,[0x15232c]
LEA RSI,[0x20d208]
LEA RDX,[0x20c958]
CALL 0x001247e0
LEA RDI,[0x20d228]
CALL 0x001245f0
JMP 0x0016d7dd
|
/* minja::Parser::parseIfExpression() */
void minja::Parser::parseIfExpression(void)
{
long lVar1;
long lVar2;
long lVar3;
int iVar4;
runtime_error *prVar5;
long *in_RDI;
long local_58;
long lStack_50;
long local_48;
long lStack_40;
string local_38 [8];
long local_30 [3];
parseLogicalOr();
if (local_48 == 0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016d8ca to 0016d8d8 has its CatchHandler @ 0016d969 */
std::runtime_error::runtime_error(prVar5,"Expected condition expression");
/* try { // try from 0016d8d9 to 0016d8ee has its CatchHandler @ 0016d964 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0020bff0,PTR__runtime_error_0020bf58);
}
if ((parseIfExpression()::else_tok_abi_cxx11_ == '\0') &&
(iVar4 = __cxa_guard_acquire(&parseIfExpression()::else_tok_abi_cxx11_), iVar4 != 0)) {
/* try { // try from 0016d903 to 0016d918 has its CatchHandler @ 0016d944 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseIfExpression()::else_tok_abi_cxx11_,"else\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseIfExpression()::else_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseIfExpression()::else_tok_abi_cxx11_);
}
local_58 = 0;
lStack_50 = 0;
/* try { // try from 0016d7e4 to 0016d7fa has its CatchHandler @ 0016d978 */
consumeToken(local_38);
std::__cxx11::string::~string(local_38);
if (local_30[0] != 0) {
/* try { // try from 0016d80e to 0016d81d has its CatchHandler @ 0016d976 */
parseExpression(SUB81(local_38,0));
std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=
((__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *)&local_58,
(__shared_ptr *)local_38);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_30);
if (local_58 == 0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016d84b to 0016d859 has its CatchHandler @ 0016d957 */
std::runtime_error::runtime_error(prVar5,"Expected \'else\' expression");
/* try { // try from 0016d85a to 0016d86f has its CatchHandler @ 0016d955 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0020bff0,PTR__runtime_error_0020bf58);
}
}
lVar3 = lStack_40;
lVar2 = local_48;
lVar1 = lStack_50;
lStack_40 = 0;
local_48 = 0;
*in_RDI = lVar2;
in_RDI[1] = lVar3;
in_RDI[2] = local_58;
lStack_50 = 0;
in_RDI[3] = lVar1;
local_58 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_50);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_40);
return;
}
| |
42,340 | my_casedn_utf16 | eloqsql/strings/ctype-ucs2.c | static size_t
my_casedn_utf16(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0)
{
my_tolower_utf16(uni_plane, &wc);
if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O3 | c | my_casedn_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
testq %rdx, %rdx
jle 0xcbb5b
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x78(%rdi), %rax
movq %rax, -0x50(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
leaq (%rsi,%rax), %r14
addq %r15, -0x38(%rbp)
movq %r13, %rdi
leaq -0x40(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *-0x58(%rbp)
testl %eax, %eax
jle 0xcbb5b
movl %eax, %ebx
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rax
cmpq (%rax), %rsi
ja 0xcbb3d
movq 0x8(%rax), %rax
movq %rsi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xcbb3d
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %esi
movq %rsi, -0x40(%rbp)
movq %r13, %rdi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq *-0x48(%rbp)
cmpl %eax, %ebx
jne 0xcbb5b
movl %ebx, %eax
addq %rax, %r12
addq %rax, %r15
cmpq %r14, %r12
jb 0xcbaf6
movq -0x30(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_casedn_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_38], r8
mov [rbp+var_30], rdx
test rdx, rdx
jle loc_CBB5B
mov r15, rcx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+78h]
mov [rbp+var_50], rax
mov rax, [rdi+0B8h]
mov rcx, [rax+28h]
mov [rbp+var_58], rcx
mov rax, [rax+30h]
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
lea r14, [rsi+rax]
add [rbp+var_38], r15
loc_CBAF6:
mov rdi, r13
lea rsi, [rbp+var_40]
mov rdx, r12
mov rcx, r14
call [rbp+var_58]
test eax, eax
jle short loc_CBB5B
mov ebx, eax
mov rsi, [rbp+var_40]
mov rax, [rbp+var_50]
cmp rsi, [rax]
ja short loc_CBB3D
mov rax, [rax+8]
mov rcx, rsi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_CBB3D
movzx ecx, sil
lea rcx, [rcx+rcx*2]
mov esi, [rax+rcx*4+4]
mov [rbp+var_40], rsi
loc_CBB3D:
mov rdi, r13
mov rdx, r15
mov rcx, [rbp+var_38]
call [rbp+var_48]
cmp ebx, eax
jnz short loc_CBB5B
mov eax, ebx
add r12, rax
add r15, rax
cmp r12, r14
jb short loc_CBAF6
loc_CBB5B:
mov rax, [rbp+var_30]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_casedn_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5)
{
long long v5; // r15
unsigned long long v6; // r12
long long v7; // rax
unsigned long long v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rsi
long long v12; // rax
long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h]
unsigned long long *v15; // [rsp+10h] [rbp-50h]
unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h]
unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF
long long v18; // [rsp+28h] [rbp-38h]
long long v19; // [rsp+30h] [rbp-30h]
v18 = a5;
v19 = a3;
if ( a3 > 0 )
{
v5 = a4;
v6 = a2;
v15 = *(unsigned long long **)(a1 + 120);
v7 = *(_QWORD *)(a1 + 184);
v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40);
v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48);
v8 = a2 + v19;
v18 += a4;
do
{
v9 = v14(a1, &v17, v6, v8);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v17;
if ( v17 <= *v15 )
{
v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17 + 4);
v17 = v11;
}
}
if ( v10 != v16(a1, v11, v5, v18) )
break;
v6 += v10;
v5 += v10;
}
while ( v6 < v8 );
}
return v19;
}
| my_casedn_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x30],RDX
TEST RDX,RDX
JLE 0x001cbb5b
MOV R15,RCX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RCX
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
LEA R14,[RSI + RAX*0x1]
ADD qword ptr [RBP + -0x38],R15
LAB_001cbaf6:
MOV RDI,R13
LEA RSI,[RBP + -0x40]
MOV RDX,R12
MOV RCX,R14
CALL qword ptr [RBP + -0x58]
TEST EAX,EAX
JLE 0x001cbb5b
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x50]
CMP RSI,qword ptr [RAX]
JA 0x001cbb3d
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,RSI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001cbb3d
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x40],RSI
LAB_001cbb3d:
MOV RDI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RBP + -0x48]
CMP EBX,EAX
JNZ 0x001cbb5b
MOV EAX,EBX
ADD R12,RAX
ADD R15,RAX
CMP R12,R14
JC 0x001cbaf6
LAB_001cbb5b:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casedn_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
ulong uVar1;
ulong *puVar2;
code *pcVar3;
code *pcVar4;
long lVar5;
uint uVar6;
uint uVar7;
ulong local_48;
long local_40;
long local_38;
local_38 = param_3;
if (0 < param_3) {
puVar2 = *(ulong **)(param_1 + 0x78);
pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
uVar1 = param_2 + param_3;
local_40 = param_5 + param_4;
do {
uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1);
if ((int)uVar6 < 1) {
return local_38;
}
if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0))
{
local_48 = (ulong)*(uint *)(lVar5 + 4 + (local_48 & 0xff) * 0xc);
}
uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40);
if (uVar6 != uVar7) {
return local_38;
}
param_2 = param_2 + uVar6;
param_4 = param_4 + (ulong)uVar6;
} while (param_2 < uVar1);
}
return local_38;
}
| |
42,341 | my_uni_utf8mb3 | eloqsql/strings/ctype-utf8.c | static int my_uni_utf8mb3(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r, uchar *e)
{
if (wc < 0x80)
{
if (r >= e)
return MY_CS_TOOSMALL;
*r= (uchar) wc;
return 1;
}
if (wc < 0x800)
{
if (r + 2 > e)
return MY_CS_TOOSMALLN(2);
/* U+0080..U+07FF: 00000xxx.xxyyyyyy -> 110xxxxx 10yyyyyy */
*r++= (uchar) (0xC0 | (wc >> 6));
*r= (uchar) (0x80 | (wc & 0x3F));
return 2;
}
if (wc < 0x10000)
{
if (r + 3 > e)
return MY_CS_TOOSMALLN(3);
/* U+0800..U+FFFF: xxxxyyyy.yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz */
*r++= (uchar) (0xE0 | (wc >> 12));
*r++= (uchar) (0x80 | ((wc >> 6) & 0x3f));
*r= (uchar) (0x80 | (wc & 0x3f));
return 3;
}
return MY_CS_ILUNI;
} | O3 | c | my_uni_utf8mb3:
pushq %rbp
movq %rsp, %rbp
cmpq $0x7f, %rsi
ja 0x705a6
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x70618
movb %sil, (%rdx)
movl $0x1, %eax
jmp 0x70618
cmpq $0x7ff, %rsi # imm = 0x7FF
ja 0x705d9
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x70618
movl %esi, %eax
shrl $0x6, %eax
orb $-0x40, %al
movb %al, (%rdx)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%rdx)
movl $0x2, %eax
jmp 0x70618
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x70618
leaq 0x3(%rdx), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rdi
ja 0x70618
movl %esi, %eax
shrl $0xc, %eax
orb $-0x20, %al
movb %al, (%rdx)
movl %esi, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rdx)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x2(%rdx)
movl $0x3, %eax
popq %rbp
retq
| my_uni_utf8mb3:
push rbp
mov rbp, rsp
cmp rsi, 7Fh
ja short loc_705A6
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_70618
mov [rdx], sil
mov eax, 1
jmp short loc_70618
loc_705A6:
cmp rsi, 7FFh
ja short loc_705D9
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_70618
mov eax, esi
shr eax, 6
or al, 0C0h
mov [rdx], al
and sil, 3Fh
or sil, 80h
mov [rdx+1], sil
mov eax, 2
jmp short loc_70618
loc_705D9:
xor eax, eax
cmp rsi, 0FFFFh
ja short loc_70618
lea rdi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rdi, rcx
ja short loc_70618
mov eax, esi
shr eax, 0Ch
or al, 0E0h
mov [rdx], al
mov eax, esi
shr eax, 6
and al, 3Fh
or al, 80h
mov [rdx+1], al
and sil, 3Fh
or sil, 80h
mov [rdx+2], sil
mov eax, 3
loc_70618:
pop rbp
retn
| long long my_uni_utf8mb3(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
if ( a2 > 0x7F )
{
if ( a2 > 0x7FF )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) <= a4 )
{
*a3 = ((unsigned int)a2 >> 12) | 0xE0;
a3[1] = ((unsigned int)a2 >> 6) & 0x3F | 0x80;
a3[2] = a2 & 0x3F | 0x80;
return 3LL;
}
}
}
else
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = ((unsigned int)a2 >> 6) | 0xC0;
a3[1] = a2 & 0x3F | 0x80;
return 2LL;
}
}
}
else
{
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
*a3 = a2;
return 1LL;
}
}
return result;
}
| my_uni_utf8mb3:
PUSH RBP
MOV RBP,RSP
CMP RSI,0x7f
JA 0x001705a6
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00170618
MOV byte ptr [RDX],SIL
MOV EAX,0x1
JMP 0x00170618
LAB_001705a6:
CMP RSI,0x7ff
JA 0x001705d9
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x00170618
MOV EAX,ESI
SHR EAX,0x6
OR AL,0xc0
MOV byte ptr [RDX],AL
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [RDX + 0x1],SIL
MOV EAX,0x2
JMP 0x00170618
LAB_001705d9:
XOR EAX,EAX
CMP RSI,0xffff
JA 0x00170618
LEA RDI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RDI,RCX
JA 0x00170618
MOV EAX,ESI
SHR EAX,0xc
OR AL,0xe0
MOV byte ptr [RDX],AL
MOV EAX,ESI
SHR EAX,0x6
AND AL,0x3f
OR AL,0x80
MOV byte ptr [RDX + 0x1],AL
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [RDX + 0x2],SIL
MOV EAX,0x3
LAB_00170618:
POP RBP
RET
|
int8 my_uni_utf8mb3(int8 param_1,ulong param_2,byte *param_3,byte *param_4)
{
int8 uVar1;
byte bVar2;
uint uVar3;
uVar3 = (uint)param_2;
bVar2 = (byte)param_2;
if (param_2 < 0x80) {
uVar1 = 0xffffff9b;
if (param_3 < param_4) {
*param_3 = bVar2;
uVar1 = 1;
}
}
else if (param_2 < 0x800) {
uVar1 = 0xffffff9a;
if (param_3 + 2 <= param_4) {
*param_3 = (byte)(uVar3 >> 6) | 0xc0;
param_3[1] = bVar2 & 0x3f | 0x80;
uVar1 = 2;
}
}
else {
uVar1 = 0;
if ((param_2 < 0x10000) && (uVar1 = 0xffffff99, param_3 + 3 <= param_4)) {
*param_3 = (byte)(uVar3 >> 0xc) | 0xe0;
param_3[1] = (byte)(uVar3 >> 6) & 0x3f | 0x80;
param_3[2] = bVar2 & 0x3f | 0x80;
uVar1 = 3;
}
}
return uVar1;
}
| |
42,342 | maria_rtree_estimate | eloqsql/storage/maria/ma_rt_index.c | ha_rows maria_rtree_estimate(MARIA_HA *info, MARIA_KEY *key, uint32 flag)
{
my_off_t root;
uint i= 0;
uint nod_flag, key_data_length;
uchar *page_buf, *k, *last;
double area= 0;
ha_rows res= 0;
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *keyinfo= key->keyinfo;
MARIA_PAGE page;
my_bool buff_alloced;
if (flag & MBR_DISJOINT)
return HA_POS_ERROR;
if ((root= share->state.key_root[key->keyinfo->key_nr]) == HA_OFFSET_ERROR)
return HA_POS_ERROR;
alloc_on_stack(*info->stack_end_ptr, page_buf, buff_alloced,
keyinfo->block_length);
if (!page_buf)
return(HA_POS_ERROR);
if (_ma_fetch_keypage(&page, info, keyinfo, root,
PAGECACHE_LOCK_LEFT_UNLOCKED, DFLT_INIT_HITS, page_buf,
0))
goto err;
nod_flag= page.node;
key_data_length= key->data_length;
k= rt_PAGE_FIRST_KEY(share, page.buff, nod_flag);
last= rt_PAGE_END(&page);
for (; k < last;
k= rt_PAGE_NEXT_KEY(share, k, key_data_length, nod_flag), i++)
{
if (nod_flag)
{
double k_area= maria_rtree_rect_volume(keyinfo->seg, k, key_data_length);
/* The following should be safe, even if we compare doubles */
if (k_area == 0)
{
if (flag & (MBR_CONTAIN | MBR_INTERSECT))
{
area+= 1;
}
else if (flag & (MBR_WITHIN | MBR_EQUAL))
{
if (!maria_rtree_key_cmp(keyinfo->seg, key->data, k, key_data_length,
MBR_WITHIN))
area+= 1;
}
else
goto err;
}
else
{
if (flag & (MBR_CONTAIN | MBR_INTERSECT))
{
area+= maria_rtree_overlapping_area(keyinfo->seg, key->data, k,
key_data_length) / k_area;
}
else if (flag & (MBR_WITHIN | MBR_EQUAL))
{
if (!maria_rtree_key_cmp(keyinfo->seg, key->data, k, key_data_length,
MBR_WITHIN))
area+= (maria_rtree_rect_volume(keyinfo->seg, key->data,
key_data_length) / k_area);
}
else
goto err;
}
}
else
{
if (!maria_rtree_key_cmp(keyinfo->seg, key->data, k, key_data_length,
flag))
++res;
}
}
if (nod_flag)
{
if (i)
res= (ha_rows) (area / i * info->state->records);
else
res= HA_POS_ERROR;
}
stack_alloc_free(page_buf, buff_alloced);
return res;
err:
stack_alloc_free(page_buf, buff_alloced);
return HA_POS_ERROR;
} | O3 | c | maria_rtree_estimate:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %edx, %r15d
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq $-0x1, -0x40(%rbp)
btl $0xc, %edx
jb 0x5ec4d
movq %rsi, %rdx
movq %rdi, %r14
movq (%rdi), %r12
movq 0x8(%rsi), %r13
movq 0x118(%r12), %rax
movzbl 0xa5(%r13), %ecx
movq (%rax,%rcx,8), %rbx
cmpq $-0x1, %rbx
je 0x5ec4d
movzwl 0xa6(%r13), %esi
leaq -0xc0(%rbp), %rcx
movq %rsi, (%rcx)
movq 0x78(%r14), %rax
movq (%rax), %rax
subq %rcx, %rax
subq %rsi, %rax
movq %rdx, -0x50(%rbp)
jbe 0x5e985
cmpq $0x10000, %rax # imm = 0x10000
ja 0x5e96f
cmpl $0x1000, %esi # imm = 0x1000
jb 0x5e985
cmpq $0x8001, %rax # imm = 0x8001
jb 0x5e985
movq %rsp, %rax
addl $0xf, %esi
andl $-0x10, %esi
subq %rsi, %rax
movq %rax, %rsp
movb $0x1, %cl
movl %ecx, -0x44(%rbp)
jmp 0x5e9a1
movl $0x0, -0x44(%rbp)
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
callq 0xa1359
testq %rax, %rax
je 0x5ec4d
leaq -0xc0(%rbp), %rdi
movq %r14, -0x88(%rbp)
movq %r14, %rsi
movq %r13, -0x58(%rbp)
movq %r13, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
movl $0x3, %r9d
pushq $0x0
movq %rax, -0x68(%rbp)
pushq %rax
callq 0x3a476
addq $0x10, %rsp
testb %al, %al
je 0x5e9e6
movq $-0x1, -0x40(%rbp)
jmp 0x5ec3e
movl -0x98(%rbp), %edx
movq -0xb0(%rbp), %rax
movl 0x744(%r12), %ebx
addq %rax, %rbx
addq %rdx, %rbx
movl -0xa0(%rbp), %ecx
addq %rax, %rcx
movq %rcx, -0x78(%rbp)
cmpq %rcx, %rbx
jae 0x5ebbb
movq %r12, -0x80(%rbp)
movq -0x50(%rbp), %rax
movl 0x10(%rax), %r12d
xorl %eax, %eax
movq $0x0, -0x40(%rbp)
xorpd %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
movq %rax, -0x60(%rbp)
xorl %r14d, %r14d
movq -0x58(%rbp), %rax
movq 0xc0(%rax), %rdi
movq %rdx, %r13
testq %rdx, %rdx
je 0x5eb73
movq %rbx, %rsi
movl %r12d, %edx
callq 0x5f928
ucomisd 0x83359(%rip), %xmm0 # 0xe1dc0
jne 0x5ea8b
jp 0x5ea8b
testl $0x600, %r15d # imm = 0x600
je 0x5eacb
movsd -0x38(%rbp), %xmm0
addsd 0x8331f(%rip), %xmm0 # 0xe1da0
movsd %xmm0, -0x38(%rbp)
jmp 0x5eb38
testl $0x600, %r15d # imm = 0x600
movsd %xmm0, -0x70(%rbp)
je 0x5eb04
movq -0x58(%rbp), %rax
movq 0xc0(%rax), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x603de
divsd -0x70(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x38(%rbp)
jmp 0x5eb38
testl $0x2800, %r15d # imm = 0x2800
je 0x5e9d9
movq -0x58(%rbp), %rax
movq 0xc0(%rax), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movq %rbx, %rdx
movl %r12d, %ecx
movl $0x800, %r8d # imm = 0x800
callq 0x5eee8
testl %eax, %eax
jne 0x5eb38
jmp 0x5ea74
testl $0x2800, %r15d # imm = 0x2800
je 0x5e9d9
movq -0x58(%rbp), %rax
movq 0xc0(%rax), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movq %rbx, %rdx
movl %r12d, %ecx
movl $0x800, %r8d # imm = 0x800
callq 0x5eee8
testl %eax, %eax
je 0x5eb54
movq %r13, %rdx
addq %r12, %rbx
addq %r13, %rbx
decl %r14d
cmpq -0x78(%rbp), %rbx
movq -0x58(%rbp), %rax
jb 0x5ea41
jmp 0x5ebc9
movq -0x58(%rbp), %rax
movq 0xc0(%rax), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movl %r12d, %edx
callq 0x5f928
jmp 0x5eab6
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movq %rbx, %rdx
movl %r12d, %ecx
movl %r15d, %r8d
callq 0x5eee8
cmpl $0x1, %eax
adcq $0x0, -0x40(%rbp)
movq -0x80(%rbp), %rax
movl 0x3e0(%rax), %eax
addq %r12, %rbx
addq %rax, %rbx
movq -0x60(%rbp), %rax
subl %r14d, %eax
incl %eax
cmpq -0x78(%rbp), %rbx
movq %r13, %rdx
jb 0x5ea36
jmp 0x5ec3e
xorl %eax, %eax
negq %rdx
sbbq %rax, %rax
movq %rax, -0x40(%rbp)
jmp 0x5ec3e
movq $-0x1, -0x40(%rbp)
movq -0x60(%rbp), %rax
subl %r14d, %eax
je 0x5ec3e
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd -0x38(%rbp), %xmm2
divsd %xmm0, %xmm2
movq -0x88(%rbp), %rax
movq 0x20(%rax), %rax
movsd (%rax), %xmm0
unpcklps 0x82ebd(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x82ec5(%rip), %xmm0 # 0xe1ad0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x83161(%rip), %xmm1 # 0xe1d90
cvttsd2si %xmm1, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, -0x40(%rbp)
cmpb $0x0, -0x44(%rbp)
movq -0x68(%rbp), %rdi
jne 0x5ec4d
callq 0xa1586
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x5ec6f
movq -0x40(%rbp), %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29220
| maria_rtree_estimate:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15d, edx
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_40], 0FFFFFFFFFFFFFFFFh
bt edx, 0Ch
jb loc_5EC4D
mov rdx, rsi
mov r14, rdi
mov r12, [rdi]
mov r13, [rsi+8]
mov rax, [r12+118h]
movzx ecx, byte ptr [r13+0A5h]
mov rbx, [rax+rcx*8]
cmp rbx, 0FFFFFFFFFFFFFFFFh
jz loc_5EC4D
movzx esi, word ptr [r13+0A6h]
lea rcx, [rbp+var_C0]
mov [rcx], rsi
mov rax, [r14+78h]
mov rax, [rax]
sub rax, rcx
sub rax, rsi
mov [rbp+var_50], rdx
jbe short loc_5E985
cmp rax, 10000h
ja short loc_5E96F
cmp esi, 1000h
jb short loc_5E985
cmp rax, 8001h
jb short loc_5E985
loc_5E96F:
mov rax, rsp
add esi, 0Fh
and esi, 0FFFFFFF0h
sub rax, rsi
mov rsp, rax
mov cl, 1
mov [rbp+var_44], ecx
jmp short loc_5E9A1
loc_5E985:
mov [rbp+var_44], 0
mov edx, 10010h
xor edi, edi
call my_malloc
test rax, rax
jz loc_5EC4D
loc_5E9A1:
lea rdi, [rbp+var_C0]
mov [rbp+var_88], r14
mov rsi, r14
mov [rbp+var_58], r13
mov rdx, r13
mov rcx, rbx
xor r8d, r8d
mov r9d, 3
push 0
mov [rbp+var_68], rax
push rax
call _ma_fetch_keypage
add rsp, 10h
test al, al
jz short loc_5E9E6
loc_5E9D9:
mov [rbp+var_40], 0FFFFFFFFFFFFFFFFh
jmp loc_5EC3E
loc_5E9E6:
mov edx, [rbp+var_98]
mov rax, [rbp+var_B0]
mov ebx, [r12+744h]
add rbx, rax
add rbx, rdx
mov ecx, [rbp+var_A0]
add rcx, rax
mov [rbp+var_78], rcx
cmp rbx, rcx
jnb loc_5EBBB
mov [rbp+var_80], r12
mov rax, [rbp+var_50]
mov r12d, [rax+10h]
xor eax, eax
mov [rbp+var_40], 0
xorpd xmm0, xmm0
movsd [rbp+var_38], xmm0
loc_5EA36:
mov [rbp+var_60], rax
xor r14d, r14d
mov rax, [rbp+var_58]
loc_5EA41:
mov rdi, [rax+0C0h]
mov r13, rdx
test rdx, rdx
jz loc_5EB73
mov rsi, rbx
mov edx, r12d
call maria_rtree_rect_volume
ucomisd xmm0, cs:qword_E1DC0
jnz short loc_5EA8B
jp short loc_5EA8B
test r15d, 600h
jz short loc_5EACB
loc_5EA74:
movsd xmm0, [rbp+var_38]
addsd xmm0, cs:qword_E1DA0
movsd [rbp+var_38], xmm0
jmp loc_5EB38
loc_5EA8B:
test r15d, 600h
movsd [rbp+var_70], xmm0
jz short loc_5EB04
mov rax, [rbp+var_58]
mov rdi, [rax+0C0h]
mov rax, [rbp+var_50]
mov rsi, [rax]
mov rdx, rbx
mov ecx, r12d
call maria_rtree_overlapping_area
loc_5EAB6:
divsd xmm0, [rbp+var_70]
movsd xmm1, [rbp+var_38]
addsd xmm1, xmm0
movsd [rbp+var_38], xmm1
jmp short loc_5EB38
loc_5EACB:
test r15d, 2800h
jz loc_5E9D9
mov rax, [rbp+var_58]
mov rdi, [rax+0C0h]
mov rax, [rbp+var_50]
mov rsi, [rax]
mov rdx, rbx
mov ecx, r12d
mov r8d, 800h
call maria_rtree_key_cmp
test eax, eax
jnz short loc_5EB38
jmp loc_5EA74
loc_5EB04:
test r15d, 2800h
jz loc_5E9D9
mov rax, [rbp+var_58]
mov rdi, [rax+0C0h]
mov rax, [rbp+var_50]
mov rsi, [rax]
mov rdx, rbx
mov ecx, r12d
mov r8d, 800h
call maria_rtree_key_cmp
test eax, eax
jz short loc_5EB54
loc_5EB38:
mov rdx, r13
add rbx, r12
add rbx, r13
dec r14d
cmp rbx, [rbp+var_78]
mov rax, [rbp+var_58]
jb loc_5EA41
jmp short loc_5EBC9
loc_5EB54:
mov rax, [rbp+var_58]
mov rdi, [rax+0C0h]
mov rax, [rbp+var_50]
mov rsi, [rax]
mov edx, r12d
call maria_rtree_rect_volume
jmp loc_5EAB6
loc_5EB73:
mov rax, [rbp+var_50]
mov rsi, [rax]
mov rdx, rbx
mov ecx, r12d
mov r8d, r15d
call maria_rtree_key_cmp
cmp eax, 1
adc [rbp+var_40], 0
mov rax, [rbp+var_80]
mov eax, [rax+3E0h]
add rbx, r12
add rbx, rax
mov rax, [rbp+var_60]
sub eax, r14d
inc eax
cmp rbx, [rbp+var_78]
mov rdx, r13
jb loc_5EA36
jmp loc_5EC3E
loc_5EBBB:
xor eax, eax
neg rdx
sbb rax, rax
mov [rbp+var_40], rax
jmp short loc_5EC3E
loc_5EBC9:
mov [rbp+var_40], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_60]
sub eax, r14d
jz short loc_5EC3E
mov eax, eax
xorps xmm0, xmm0
cvtsi2sd xmm0, rax
movsd xmm2, [rbp+var_38]
divsd xmm2, xmm0
mov rax, [rbp+var_88]
mov rax, [rax+20h]
movsd xmm0, qword ptr [rax]
unpcklps xmm0, cs:xmmword_E1AC0
subpd xmm0, cs:xmmword_E1AD0
movapd xmm1, xmm0
unpckhpd xmm1, xmm0
addsd xmm1, xmm0
mulsd xmm1, xmm2
cvttsd2si rax, xmm1
mov rcx, rax
sar rcx, 3Fh
subsd xmm1, cs:qword_E1D90
cvttsd2si rdx, xmm1
and rdx, rcx
or rdx, rax
mov [rbp+var_40], rdx
loc_5EC3E:
cmp byte ptr [rbp+var_44], 0
mov rdi, [rbp+var_68]
jnz short loc_5EC4D
call my_free
loc_5EC4D:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_5EC6F
mov rax, [rbp+var_40]
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5EC6F:
call ___stack_chk_fail
| long long maria_rtree_estimate(_QWORD **a1, _QWORD *a2, unsigned int a3)
{
_QWORD *v5; // r12
long long v6; // r13
unsigned long long v7; // rbx
unsigned long long v8; // rsi
_QWORD *v9; // rcx
unsigned long long v10; // rax
bool v11; // cc
unsigned long long v12; // rax
char *v13; // rax
long long v14; // rdx
unsigned long long v15; // rbx
long long v16; // r12
long long v17; // rax
int v18; // r14d
long long v19; // rax
long long v20; // rdi
long long v21; // r13
double v22; // xmm0_8
double v23; // xmm0_8
int v24; // eax
__m128d v25; // xmm0
_QWORD v27[2]; // [rsp+0h] [rbp-C0h] BYREF
long long v28; // [rsp+10h] [rbp-B0h]
unsigned int v29; // [rsp+20h] [rbp-A0h]
unsigned int v30; // [rsp+28h] [rbp-98h]
_QWORD **v31; // [rsp+38h] [rbp-88h]
_QWORD *v32; // [rsp+40h] [rbp-80h]
unsigned long long v33; // [rsp+48h] [rbp-78h]
double v34; // [rsp+50h] [rbp-70h]
char *v35; // [rsp+58h] [rbp-68h]
long long v36; // [rsp+60h] [rbp-60h]
long long v37; // [rsp+68h] [rbp-58h]
_QWORD *v38; // [rsp+70h] [rbp-50h]
int v39; // [rsp+7Ch] [rbp-44h]
long long v40; // [rsp+80h] [rbp-40h]
double v41; // [rsp+88h] [rbp-38h]
unsigned long long v42; // [rsp+90h] [rbp-30h]
v42 = __readfsqword(0x28u);
v40 = -1LL;
if ( (a3 & 0x1000) != 0 )
return v40;
v5 = *a1;
v6 = a2[1];
v7 = *(_QWORD *)((*a1)[35] + 8LL * *(unsigned __int8 *)(v6 + 165));
if ( v7 == -1LL )
return v40;
v8 = *(unsigned __int16 *)(v6 + 166);
v9 = v27;
v27[0] = v8;
v10 = *a1[15] - (_QWORD)v27;
v11 = v10 <= v8;
v12 = v10 - v8;
v38 = a2;
if ( v11 || v12 <= 0x10000 && ((unsigned int)v8 < 0x1000 || v12 < 0x8001) )
{
v39 = 0;
v13 = (char *)my_malloc(0LL, v8, 65552LL);
if ( !v13 )
return v40;
}
else
{
v13 = (char *)v27 - (((_DWORD)v8 + 15) & 0xFFFFFFF0);
LOBYTE(v9) = 1;
v39 = (int)v9;
}
v31 = a1;
v37 = v6;
v35 = v13;
if ( ma_fetch_keypage((long long)v27, (long long)a1, v6, v7, 0, 3, (long long)v13) )
{
LABEL_10:
v40 = -1LL;
goto LABEL_34;
}
v14 = v30;
v15 = v30 + v28 + *((unsigned int *)v5 + 465);
v33 = v28 + v29;
if ( v15 >= v33 )
{
v40 = -(long long)(v30 != 0LL);
goto LABEL_34;
}
v32 = v5;
v16 = *((unsigned int *)v38 + 4);
v17 = 0LL;
v40 = 0LL;
v41 = 0.0;
while ( 2 )
{
v36 = v17;
v18 = 0;
v19 = v37;
while ( 1 )
{
v20 = *(_QWORD *)(v19 + 192);
v21 = v14;
if ( !v14 )
break;
v22 = maria_rtree_rect_volume(v20, v15, (unsigned int)v16);
if ( v22 == 0.0 )
{
if ( (a3 & 0x600) != 0 )
goto LABEL_17;
if ( (a3 & 0x2800) == 0 )
goto LABEL_10;
if ( !(unsigned int)maria_rtree_key_cmp(*(_QWORD *)(v37 + 192), *v38, v15, (unsigned int)v16, 2048LL) )
LABEL_17:
v41 = v41 + 1.0;
}
else
{
v34 = v22;
if ( (a3 & 0x600) != 0 )
{
v23 = maria_rtree_overlapping_area(*(_QWORD *)(v37 + 192), *v38, v15, (unsigned int)v16);
}
else
{
if ( (a3 & 0x2800) == 0 )
goto LABEL_10;
if ( (unsigned int)maria_rtree_key_cmp(*(_QWORD *)(v37 + 192), *v38, v15, (unsigned int)v16, 2048LL) )
goto LABEL_26;
v23 = maria_rtree_rect_volume(*(_QWORD *)(v37 + 192), *v38, (unsigned int)v16);
}
v41 = v41 + v23 / v34;
}
LABEL_26:
v14 = v21;
v15 += v21 + v16;
--v18;
v19 = v37;
if ( v15 >= v33 )
{
v40 = -1LL;
if ( (_DWORD)v36 != v18 )
{
v25 = _mm_sub_pd(
(__m128d)_mm_unpacklo_ps((__m128)(unsigned long long)*v31[4], (__m128)xmmword_E1AC0),
(__m128d)xmmword_E1AD0);
v40 = (unsigned int)(int)((_mm_unpackhi_pd(v25, v25).m128d_f64[0] + v25.m128d_f64[0])
* (v41
/ (double)((int)v36 - v18)));
}
goto LABEL_34;
}
}
v24 = maria_rtree_key_cmp(v20, *v38, v15, (unsigned int)v16, a3);
v40 += v24 == 0;
v15 += *((unsigned int *)v32 + 248) + v16;
v17 = (unsigned int)(v36 - v18 + 1);
v14 = 0LL;
if ( v15 < v33 )
continue;
break;
}
LABEL_34:
if ( !(_BYTE)v39 )
my_free(v35);
return v40;
}
| maria_rtree_estimate:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15D,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x40],-0x1
BT EDX,0xc
JC 0x0015ec4d
MOV RDX,RSI
MOV R14,RDI
MOV R12,qword ptr [RDI]
MOV R13,qword ptr [RSI + 0x8]
MOV RAX,qword ptr [R12 + 0x118]
MOVZX ECX,byte ptr [R13 + 0xa5]
MOV RBX,qword ptr [RAX + RCX*0x8]
CMP RBX,-0x1
JZ 0x0015ec4d
MOVZX ESI,word ptr [R13 + 0xa6]
LEA RCX,[RBP + -0xc0]
MOV qword ptr [RCX],RSI
MOV RAX,qword ptr [R14 + 0x78]
MOV RAX,qword ptr [RAX]
SUB RAX,RCX
SUB RAX,RSI
MOV qword ptr [RBP + -0x50],RDX
JBE 0x0015e985
CMP RAX,0x10000
JA 0x0015e96f
CMP ESI,0x1000
JC 0x0015e985
CMP RAX,0x8001
JC 0x0015e985
LAB_0015e96f:
MOV RAX,RSP
ADD ESI,0xf
AND ESI,0xfffffff0
SUB RAX,RSI
MOV RSP,RAX
MOV CL,0x1
MOV dword ptr [RBP + -0x44],ECX
JMP 0x0015e9a1
LAB_0015e985:
MOV dword ptr [RBP + -0x44],0x0
MOV EDX,0x10010
XOR EDI,EDI
CALL 0x001a1359
TEST RAX,RAX
JZ 0x0015ec4d
LAB_0015e9a1:
LEA RDI,[RBP + -0xc0]
MOV qword ptr [RBP + -0x88],R14
MOV RSI,R14
MOV qword ptr [RBP + -0x58],R13
MOV RDX,R13
MOV RCX,RBX
XOR R8D,R8D
MOV R9D,0x3
PUSH 0x0
MOV qword ptr [RBP + -0x68],RAX
PUSH RAX
CALL 0x0013a476
ADD RSP,0x10
TEST AL,AL
JZ 0x0015e9e6
LAB_0015e9d9:
MOV qword ptr [RBP + -0x40],-0x1
JMP 0x0015ec3e
LAB_0015e9e6:
MOV EDX,dword ptr [RBP + -0x98]
MOV RAX,qword ptr [RBP + -0xb0]
MOV EBX,dword ptr [R12 + 0x744]
ADD RBX,RAX
ADD RBX,RDX
MOV ECX,dword ptr [RBP + -0xa0]
ADD RCX,RAX
MOV qword ptr [RBP + -0x78],RCX
CMP RBX,RCX
JNC 0x0015ebbb
MOV qword ptr [RBP + -0x80],R12
MOV RAX,qword ptr [RBP + -0x50]
MOV R12D,dword ptr [RAX + 0x10]
XOR EAX,EAX
MOV qword ptr [RBP + -0x40],0x0
XORPD XMM0,XMM0
MOVSD qword ptr [RBP + -0x38],XMM0
LAB_0015ea36:
MOV qword ptr [RBP + -0x60],RAX
XOR R14D,R14D
MOV RAX,qword ptr [RBP + -0x58]
LAB_0015ea41:
MOV RDI,qword ptr [RAX + 0xc0]
MOV R13,RDX
TEST RDX,RDX
JZ 0x0015eb73
MOV RSI,RBX
MOV EDX,R12D
CALL 0x0015f928
UCOMISD XMM0,qword ptr [0x001e1dc0]
JNZ 0x0015ea8b
JP 0x0015ea8b
TEST R15D,0x600
JZ 0x0015eacb
LAB_0015ea74:
MOVSD XMM0,qword ptr [RBP + -0x38]
ADDSD XMM0,qword ptr [0x001e1da0]
MOVSD qword ptr [RBP + -0x38],XMM0
JMP 0x0015eb38
LAB_0015ea8b:
TEST R15D,0x600
MOVSD qword ptr [RBP + -0x70],XMM0
JZ 0x0015eb04
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RAX]
MOV RDX,RBX
MOV ECX,R12D
CALL 0x001603de
LAB_0015eab6:
DIVSD XMM0,qword ptr [RBP + -0x70]
MOVSD XMM1,qword ptr [RBP + -0x38]
ADDSD XMM1,XMM0
MOVSD qword ptr [RBP + -0x38],XMM1
JMP 0x0015eb38
LAB_0015eacb:
TEST R15D,0x2800
JZ 0x0015e9d9
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RAX]
MOV RDX,RBX
MOV ECX,R12D
MOV R8D,0x800
CALL 0x0015eee8
TEST EAX,EAX
JNZ 0x0015eb38
JMP 0x0015ea74
LAB_0015eb04:
TEST R15D,0x2800
JZ 0x0015e9d9
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RAX]
MOV RDX,RBX
MOV ECX,R12D
MOV R8D,0x800
CALL 0x0015eee8
TEST EAX,EAX
JZ 0x0015eb54
LAB_0015eb38:
MOV RDX,R13
ADD RBX,R12
ADD RBX,R13
DEC R14D
CMP RBX,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x58]
JC 0x0015ea41
JMP 0x0015ebc9
LAB_0015eb54:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RAX]
MOV EDX,R12D
CALL 0x0015f928
JMP 0x0015eab6
LAB_0015eb73:
MOV RAX,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RAX]
MOV RDX,RBX
MOV ECX,R12D
MOV R8D,R15D
CALL 0x0015eee8
CMP EAX,0x1
ADC qword ptr [RBP + -0x40],0x0
MOV RAX,qword ptr [RBP + -0x80]
MOV EAX,dword ptr [RAX + 0x3e0]
ADD RBX,R12
ADD RBX,RAX
MOV RAX,qword ptr [RBP + -0x60]
SUB EAX,R14D
INC EAX
CMP RBX,qword ptr [RBP + -0x78]
MOV RDX,R13
JC 0x0015ea36
JMP 0x0015ec3e
LAB_0015ebbb:
XOR EAX,EAX
NEG RDX
SBB RAX,RAX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0015ec3e
LAB_0015ebc9:
MOV qword ptr [RBP + -0x40],-0x1
MOV RAX,qword ptr [RBP + -0x60]
SUB EAX,R14D
JZ 0x0015ec3e
MOV EAX,EAX
XORPS XMM0,XMM0
CVTSI2SD XMM0,RAX
MOVSD XMM2,qword ptr [RBP + -0x38]
DIVSD XMM2,XMM0
MOV RAX,qword ptr [RBP + -0x88]
MOV RAX,qword ptr [RAX + 0x20]
MOVSD XMM0,qword ptr [RAX]
UNPCKLPS XMM0,xmmword ptr [0x001e1ac0]
SUBPD XMM0,xmmword ptr [0x001e1ad0]
MOVAPD XMM1,XMM0
UNPCKHPD XMM1,XMM0
ADDSD XMM1,XMM0
MULSD XMM1,XMM2
CVTTSD2SI RAX,XMM1
MOV RCX,RAX
SAR RCX,0x3f
SUBSD XMM1,qword ptr [0x001e1d90]
CVTTSD2SI RDX,XMM1
AND RDX,RCX
OR RDX,RAX
MOV qword ptr [RBP + -0x40],RDX
LAB_0015ec3e:
CMP byte ptr [RBP + -0x44],0x0
MOV RDI,qword ptr [RBP + -0x68]
JNZ 0x0015ec4d
CALL 0x001a1586
LAB_0015ec4d:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015ec6f
MOV RAX,qword ptr [RBP + -0x40]
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015ec6f:
CALL 0x00129220
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong maria_rtree_estimate(long *param_1,int8 *param_2,uint param_3)
{
ushort uVar1;
long lVar2;
long lVar3;
long lVar4;
int8 uVar5;
int8 uVar6;
char cVar7;
int iVar8;
uint uVar9;
ulong uVar10;
ulong uVar11;
int1 *puVar12;
ulong uVar13;
ulong *puVar14;
ulong *puVar15;
ulong uVar16;
int iVar17;
long in_FS_OFFSET;
double dVar18;
ulong local_c8 [2];
long local_b8;
uint local_a8;
uint local_a0;
long *local_90;
long local_88;
ulong local_80;
double local_78;
int1 *local_70;
ulong local_68;
long local_60;
int8 *local_58;
int4 local_4c;
ulong local_48;
double local_40;
long local_38;
puVar14 = local_c8;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_48 = 0xffffffffffffffff;
puVar15 = local_c8;
if ((param_3 >> 0xc & 1) == 0) {
lVar2 = *param_1;
lVar3 = param_2[1];
lVar4 = *(long *)(*(long *)(lVar2 + 0x118) + (ulong)*(byte *)(lVar3 + 0xa5) * 8);
puVar15 = local_c8;
if (lVar4 != -1) {
uVar1 = *(ushort *)(lVar3 + 0xa6);
local_c8[0] = (ulong)uVar1;
uVar10 = *(long *)param_1[0xf] - (long)local_c8;
uVar11 = uVar10 - local_c8[0];
local_58 = param_2;
if ((local_c8[0] < uVar10) && ((0x10000 < uVar11 || ((0xfff < uVar1 && (0x8000 < uVar11))))))
{
puVar12 = (int1 *)((long)local_c8 - (ulong)(uVar1 + 0xf & 0xfffffff0));
local_4c = (int4)CONCAT71((int7)((ulong)local_c8 >> 8),1);
puVar14 = (ulong *)puVar12;
}
else {
local_4c = 0;
puVar12 = (int1 *)my_malloc(0,local_c8[0],0x10010);
puVar15 = local_c8;
if (puVar12 == (int1 *)0x0) goto LAB_0015ec4d;
}
local_90 = param_1;
local_60 = lVar3;
*(int8 *)((long)puVar14 + -8) = 0;
local_70 = puVar12;
*(int1 **)((long)puVar14 + -0x10) = puVar12;
*(int8 *)((long)puVar14 + -0x18) = 0x15e9d1;
cVar7 = _ma_fetch_keypage(local_c8,param_1,lVar3,lVar4,0,3);
if (cVar7 == '\0') {
uVar10 = (ulong)local_a0;
uVar11 = (ulong)*(uint *)(lVar2 + 0x744) + local_b8 + uVar10;
local_80 = (ulong)local_a8 + local_b8;
if (uVar11 < local_80) {
uVar16 = (ulong)*(uint *)(local_58 + 2);
uVar13 = 0;
local_48 = 0;
local_40 = 0.0;
local_88 = lVar2;
do {
iVar17 = 0;
local_68 = uVar13;
while (uVar5 = *(int8 *)(local_60 + 0xc0), uVar10 != 0) {
*(int8 *)((long)puVar14 + -8) = 0x15ea5f;
dVar18 = (double)maria_rtree_rect_volume(uVar5,uVar11,uVar16);
if ((dVar18 != _DAT_001e1dc0) || (NAN(dVar18) || NAN(_DAT_001e1dc0))) {
local_78 = dVar18;
if ((param_3 & 0x600) == 0) {
if ((param_3 & 0x2800) == 0) goto LAB_0015e9d9;
uVar5 = *(int8 *)(local_60 + 0xc0);
uVar6 = *local_58;
*(int8 *)((long)puVar14 + -8) = 0x15eb34;
iVar8 = maria_rtree_key_cmp(uVar5,uVar6,uVar11,uVar16,0x800);
if (iVar8 != 0) goto LAB_0015eb38;
uVar5 = *(int8 *)(local_60 + 0xc0);
uVar6 = *local_58;
*(int8 *)((long)puVar14 + -8) = 0x15eb6e;
dVar18 = (double)maria_rtree_rect_volume(uVar5,uVar6,uVar16);
}
else {
uVar5 = *(int8 *)(local_60 + 0xc0);
uVar6 = *local_58;
*(int8 *)((long)puVar14 + -8) = 0x15eab6;
dVar18 = (double)maria_rtree_overlapping_area(uVar5,uVar6,uVar11,uVar16);
}
local_40 = local_40 + dVar18 / local_78;
}
else {
if ((param_3 & 0x600) == 0) {
if ((param_3 & 0x2800) == 0) goto LAB_0015e9d9;
uVar5 = *(int8 *)(local_60 + 0xc0);
uVar6 = *local_58;
*(int8 *)((long)puVar14 + -8) = 0x15eafb;
iVar8 = maria_rtree_key_cmp(uVar5,uVar6,uVar11,uVar16,0x800);
if (iVar8 != 0) goto LAB_0015eb38;
}
local_40 = local_40 + DAT_001e1da0;
}
LAB_0015eb38:
uVar11 = uVar11 + uVar16 + uVar10;
iVar17 = iVar17 + -1;
if (local_80 <= uVar11) {
local_48 = 0xffffffffffffffff;
uVar9 = (int)local_68 - iVar17;
if (uVar9 != 0) {
dVar18 = (((double)CONCAT44(DAT_001e1ac0._4_4_,
(int)((ulong)*(int8 *)local_90[4] >> 0x20)) -
_UNK_001e1ad8) +
((double)CONCAT44((int4)DAT_001e1ac0,
(int)*(int8 *)local_90[4]) - _DAT_001e1ad0)) *
(local_40 / (double)uVar9);
local_48 = (ulong)dVar18;
local_48 = (long)(dVar18 - _DAT_001e1d90) & (long)local_48 >> 0x3f | local_48;
}
goto LAB_0015ec3e;
}
}
uVar6 = *local_58;
*(int8 *)((long)puVar14 + -8) = 0x15eb88;
iVar8 = maria_rtree_key_cmp(uVar5,uVar6,uVar11,uVar16,param_3);
local_48 = local_48 + (iVar8 == 0);
uVar11 = uVar11 + uVar16 + (ulong)*(uint *)(local_88 + 0x3e0);
uVar13 = (ulong)(((int)local_68 - iVar17) + 1);
} while (uVar11 < local_80);
}
else {
local_48 = -(ulong)(uVar10 != 0);
}
}
else {
LAB_0015e9d9:
local_48 = 0xffffffffffffffff;
}
LAB_0015ec3e:
puVar12 = local_70;
puVar15 = puVar14;
if ((char)local_4c == '\0') {
*(int8 *)((long)puVar14 + -8) = 0x15ec4d;
my_free(puVar12);
}
}
}
LAB_0015ec4d:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)((long)puVar15 + -8) = maria_rtree_fill_reinsert_list;
__stack_chk_fail();
}
return local_48;
}
| |
42,343 | coro::detail::make_task_self_deleting(coro::task<void>) (.resume) | AlayaLite/build_O3/_deps/libcoro-src/src/detail/task_self_deleting.cpp | auto make_task_self_deleting(coro::task<void> user_task) -> task_self_deleting
{
co_await user_task;
co_return;
} | O3 | cpp | coro::detail::make_task_self_deleting(coro::task<void>) (.resume):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x28(%rdi)
je 0x4fa9
movq 0x18(%rbx), %rdi
jmp 0x4fcc
movq 0x20(%rbx), %rdi
movq %rdi, 0x18(%rbx)
cmpq $0x0, (%rdi)
je 0x4fcc
movb $0x1, 0x28(%rbx)
movq %rbx, 0x10(%rdi)
movq 0x18(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *(%rdi)
addq $0x10, %rdi
callq 0x3b96
leaq 0x10(%rbx), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x4fe5
lock
decq (%rax)
movq 0x20(%rbx), %r14
callq 0x4e8c
testq %r14, %r14
je 0x4ffa
movq 0x20(%rbx), %rdi
callq *0x8(%rdi)
movl $0x30, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2180
movq %rax, %rdi
callq 0x3184
movq %rax, %rdi
callq 0x2090
callq 0x2220
jmp 0x4fd5
movq $0x0, (%rbx)
movq %rax, %rdi
callq 0x2260
| _ZN4coro6detail23make_task_self_deletingENS_4taskIvEE_resume:
push r14
push rbx
push rax
mov rbx, rdi
cmp byte ptr [rdi+28h], 0
jz short loc_4FA9
mov rdi, [rbx+18h]
jmp short loc_4FCC
loc_4FA9:
mov rdi, [rbx+20h]
mov [rbx+18h], rdi
cmp qword ptr [rdi], 0
jz short loc_4FCC
mov byte ptr [rbx+28h], 1
mov [rdi+10h], rbx
mov rdi, [rbx+18h]
add rsp, 8
pop rbx
pop r14
jmp qword ptr [rdi]
loc_4FCC:
add rdi, 10h
call _ZN4coro6detail7promiseIvE6resultEv; coro::detail::promise<void>::result(void)
loc_4FD5:
lea rdi, [rbx+10h]; this
mov rax, [rdi]
test rax, rax
jz short loc_4FE5
lock dec qword ptr [rax]
loc_4FE5:
mov r14, [rbx+20h]
call _ZN4coro6detail21promise_self_deletingD2Ev; coro::detail::promise_self_deleting::~promise_self_deleting()
test r14, r14
jz short loc_4FFA
mov rdi, [rbx+20h]
call qword ptr [rdi+8]
loc_4FFA:
mov esi, 30h ; '0'; unsigned __int64
mov rdi, rbx; void *
add rsp, 8
pop rbx
pop r14
jmp __ZdlPvm; operator delete(void *,ulong)
mov rdi, rax
call __clang_call_terminate
mov rdi, rax; void *
call ___cxa_begin_catch
call ___cxa_end_catch
jmp short loc_4FD5
mov qword ptr [rbx], 0
mov rdi, rax
call __Unwind_Resume
| void coro::detail::make_task_self_deleting(_QWORD *a1)
{
_QWORD *v2; // rdi
volatile signed long long *v3; // rax
long long v4; // r14
if ( *((_BYTE *)a1 + 40) )
{
v2 = (_QWORD *)a1[3];
}
else
{
v2 = (_QWORD *)a1[4];
a1[3] = v2;
if ( *v2 )
{
*((_BYTE *)a1 + 40) = 1;
v2[2] = a1;
(*(void (**)(void))a1[3])();
return;
}
}
coro::detail::promise<void>::result((long long)(v2 + 2));
v3 = (volatile signed long long *)a1[2];
if ( v3 )
_InterlockedDecrement64(v3);
v4 = a1[4];
coro::detail::promise_self_deleting::~promise_self_deleting((coro::detail::promise_self_deleting *)(a1 + 2));
if ( v4 )
(*(void ( **)(_QWORD))(a1[4] + 8LL))(a1[4]);
operator delete(a1, 0x30uLL);
}
| make_task_self_deleting:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP byte ptr [RDI + 0x28],0x0
JZ 0x00104fa9
MOV RDI,qword ptr [RBX + 0x18]
JMP 0x00104fcc
LAB_00104fa9:
MOV RDI,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x18],RDI
CMP qword ptr [RDI],0x0
JZ 0x00104fcc
MOV byte ptr [RBX + 0x28],0x1
MOV qword ptr [RDI + 0x10],RBX
MOV RDI,qword ptr [RBX + 0x18]
ADD RSP,0x8
POP RBX
POP R14
JMP qword ptr [RDI]
LAB_00104fcc:
ADD RDI,0x10
LAB_00104fd0:
CALL 0x00103b96
LAB_00104fd5:
LEA RDI,[RBX + 0x10]
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x00104fe5
DEC.LOCK qword ptr [RAX]
LAB_00104fe5:
MOV R14,qword ptr [RBX + 0x20]
CALL 0x00104e8c
TEST R14,R14
JZ 0x00104ffa
MOV RDI,qword ptr [RBX + 0x20]
LAB_00104ff7:
CALL qword ptr [RDI + 0x8]
LAB_00104ffa:
MOV ESI,0x30
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00102180
|
/* coro::detail::make_task_self_deleting(coro::task<void>) [clone .resume] */
void coro::detail::make_task_self_deleting(void *param_1)
{
long lVar1;
long *plVar2;
if (*(char *)((long)param_1 + 0x28) == '\0') {
plVar2 = *(long **)((long)param_1 + 0x20);
*(long **)((long)param_1 + 0x18) = plVar2;
if (*plVar2 != 0) {
*(int1 *)((long)param_1 + 0x28) = 1;
plVar2[2] = (long)param_1;
/* WARNING: Could not recover jumptable at 0x00104fca. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)**(int8 **)((long)param_1 + 0x18))();
return;
}
}
else {
plVar2 = *(long **)((long)param_1 + 0x18);
}
/* try { // try from 00104fd0 to 00104fd4 has its CatchHandler @ 00105016 */
promise<void>::result((promise<void> *)(plVar2 + 2));
plVar2 = *(long **)((long)param_1 + 0x10);
if (plVar2 != (long *)0x0) {
LOCK();
*plVar2 = *plVar2 + -1;
UNLOCK();
}
lVar1 = *(long *)((long)param_1 + 0x20);
promise_self_deleting::~promise_self_deleting((promise_self_deleting *)((long)param_1 + 0x10));
if (lVar1 != 0) {
/* try { // try from 00104ff7 to 00104ff9 has its CatchHandler @ 0010500e */
(**(code **)(*(long *)((long)param_1 + 0x20) + 8))();
}
operator_delete(param_1,0x30);
return;
}
| |
42,344 | ftb_phrase_add_word | eloqsql/storage/myisam/ft_boolean_search.c | static int ftb_phrase_add_word(MYSQL_FTPARSER_PARAM *param,
const char *word, int word_len,
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
{
MY_FTB_PHRASE_PARAM *phrase_param= param->mysql_ftparam;
FT_WORD *w= (FT_WORD *)phrase_param->document->data;
LIST *phrase, *document;
w->pos= (uchar*) word;
w->len= word_len;
phrase_param->document= phrase_param->document->prev;
if (phrase_param->phrase_length > phrase_param->document_length)
{
phrase_param->document_length++;
return 0;
}
/* TODO: rewrite phrase search to avoid
comparing the same word twice. */
for (phrase= phrase_param->phrase, document= phrase_param->document->next;
phrase; phrase= phrase->next, document= document->next)
{
FT_WORD *phrase_word= (FT_WORD *)phrase->data;
FT_WORD *document_word= (FT_WORD *)document->data;
if (my_strnncoll(phrase_param->cs, (uchar*) phrase_word->pos,
phrase_word->len,
(uchar*) document_word->pos, document_word->len))
return 0;
}
phrase_param->match++;
return 0;
} | O0 | c | ftb_phrase_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, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movslq -0x1c(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x30(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jbe 0xa1ea6
movq -0x30(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1c(%rax)
movl $0x0, -0x4(%rbp)
jmp 0xa1f63
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0xa1f4f
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq 0xc0(%rax), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rdi
movq -0x50(%rbp), %rcx
movq (%rcx), %rsi
movq -0x50(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq -0x58(%rbp), %rcx
movq (%rcx), %rcx
movq -0x58(%rbp), %r8
movq 0x10(%r8), %r8
xorl %r9d, %r9d
callq *%rax
cmpl $0x0, %eax
je 0xa1f30
movl $0x0, -0x4(%rbp)
jmp 0xa1f63
jmp 0xa1f32
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0xa1ec1
movq -0x30(%rbp), %rax
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| ftb_phrase_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_30], rax
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rcx, [rbp+var_18]
mov rax, [rbp+var_38]
mov [rax], rcx
movsxd rcx, [rbp+var_1C]
mov rax, [rbp+var_38]
mov [rax+10h], rcx
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov rcx, [rax]
mov rax, [rbp+var_30]
mov [rax+8], rcx
mov rax, [rbp+var_30]
mov eax, [rax+18h]
mov rcx, [rbp+var_30]
cmp eax, [rcx+1Ch]
jbe short loc_A1EA6
mov rax, [rbp+var_30]
mov ecx, [rax+1Ch]
add ecx, 1
mov [rax+1Ch], ecx
mov [rbp+var_4], 0
jmp loc_A1F63
loc_A1EA6:
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_40], rax
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov rax, [rax+8]
mov [rbp+var_48], rax
loc_A1EC1:
cmp [rbp+var_40], 0
jz loc_A1F4F
mov rax, [rbp+var_40]
mov rax, [rax+10h]
mov [rbp+var_50], rax
mov rax, [rbp+var_48]
mov rax, [rax+10h]
mov [rbp+var_58], rax
mov rax, [rbp+var_30]
mov rax, [rax+10h]
mov rax, [rax+0C0h]
mov rax, [rax+8]
mov rcx, [rbp+var_30]
mov rdi, [rcx+10h]
mov rcx, [rbp+var_50]
mov rsi, [rcx]
mov rcx, [rbp+var_50]
mov rdx, [rcx+10h]
mov rcx, [rbp+var_58]
mov rcx, [rcx]
mov r8, [rbp+var_58]
mov r8, [r8+10h]
xor r9d, r9d
call rax
cmp eax, 0
jz short loc_A1F30
mov [rbp+var_4], 0
jmp short loc_A1F63
loc_A1F30:
jmp short $+2
loc_A1F32:
mov rax, [rbp+var_40]
mov rax, [rax+8]
mov [rbp+var_40], rax
mov rax, [rbp+var_48]
mov rax, [rax+8]
mov [rbp+var_48], rax
jmp loc_A1EC1
loc_A1F4F:
mov rax, [rbp+var_30]
mov ecx, [rax+20h]
add ecx, 1
mov [rax+20h], ecx
mov [rbp+var_4], 0
loc_A1F63:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long ftb_phrase_add_word(long long a1, long long a2, int a3)
{
long long v4; // [rsp+18h] [rbp-48h]
long long v5; // [rsp+20h] [rbp-40h]
_QWORD *v6; // [rsp+28h] [rbp-38h]
long long *v7; // [rsp+30h] [rbp-30h]
v7 = *(long long **)(a1 + 24);
v6 = *(_QWORD **)(v7[1] + 16);
*v6 = a2;
v6[2] = a3;
v7[1] = *(_QWORD *)v7[1];
if ( *((_DWORD *)v7 + 6) <= *((_DWORD *)v7 + 7) )
{
v5 = *v7;
v4 = *(_QWORD *)(v7[1] + 8);
while ( v5 )
{
if ( (*(unsigned int ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(v7[2] + 192)
+ 8LL))(
v7[2],
**(_QWORD **)(v5 + 16),
*(_QWORD *)(*(_QWORD *)(v5 + 16) + 16LL),
**(_QWORD **)(v4 + 16),
*(_QWORD *)(*(_QWORD *)(v4 + 16) + 16LL),
0LL) )
{
return 0LL;
}
v5 = *(_QWORD *)(v5 + 8);
v4 = *(_QWORD *)(v4 + 8);
}
++*((_DWORD *)v7 + 8);
}
else
{
++*((_DWORD *)v7 + 7);
}
return 0LL;
}
| ftb_phrase_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 + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x30]
CMP EAX,dword ptr [RCX + 0x1c]
JBE 0x001a1ea6
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX + 0x1c]
ADD ECX,0x1
MOV dword ptr [RAX + 0x1c],ECX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001a1f63
LAB_001a1ea6:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x48],RAX
LAB_001a1ec1:
CMP qword ptr [RBP + -0x40],0x0
JZ 0x001a1f4f
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RCX + 0x10]
MOV RCX,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RCX]
MOV RCX,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RCX + 0x10]
MOV RCX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RCX]
MOV R8,qword ptr [RBP + -0x58]
MOV R8,qword ptr [R8 + 0x10]
XOR R9D,R9D
CALL RAX
CMP EAX,0x0
JZ 0x001a1f30
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001a1f63
LAB_001a1f30:
JMP 0x001a1f32
LAB_001a1f32:
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001a1ec1
LAB_001a1f4f:
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX + 0x20]
ADD ECX,0x1
MOV dword ptr [RAX + 0x20],ECX
MOV dword ptr [RBP + -0x4],0x0
LAB_001a1f63:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 ftb_phrase_add_word(long param_1,int8 param_2,int param_3)
{
long *plVar1;
int8 *puVar2;
int iVar3;
long local_50;
long local_48;
plVar1 = *(long **)(param_1 + 0x18);
puVar2 = *(int8 **)(plVar1[1] + 0x10);
*puVar2 = param_2;
puVar2[2] = (long)param_3;
plVar1[1] = *(long *)plVar1[1];
if (*(uint *)((long)plVar1 + 0x1c) < *(uint *)(plVar1 + 3)) {
*(int *)((long)plVar1 + 0x1c) = *(int *)((long)plVar1 + 0x1c) + 1;
}
else {
local_50 = *(long *)(plVar1[1] + 8);
for (local_48 = *plVar1; local_48 != 0; local_48 = *(long *)(local_48 + 8)) {
iVar3 = (**(code **)(*(long *)(plVar1[2] + 0xc0) + 8))
(plVar1[2],**(int8 **)(local_48 + 0x10),
(*(int8 **)(local_48 + 0x10))[2],**(int8 **)(local_50 + 0x10),
(*(int8 **)(local_50 + 0x10))[2],0);
if (iVar3 != 0) {
return 0;
}
local_50 = *(long *)(local_50 + 8);
}
*(int *)(plVar1 + 4) = (int)plVar1[4] + 1;
}
return 0;
}
| |
42,345 | my_charset_is_8bit_pure_ascii | eloqsql/strings/ctype-simple.c | static my_bool
my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs)
{
size_t code;
if (!cs->tab_to_uni)
return 0;
for (code= 0; code < 256; code++)
{
if (cs->tab_to_uni[code] > 0x7F)
return 0;
}
return 1;
} | O0 | c | my_charset_is_8bit_pure_ascii:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x54559
movb $0x0, -0x1(%rbp)
jmp 0x5459a
movq $0x0, -0x18(%rbp)
cmpq $0x100, -0x18(%rbp) # imm = 0x100
jae 0x54596
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x18(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x7f, %eax
jle 0x54586
movb $0x0, -0x1(%rbp)
jmp 0x5459a
jmp 0x54588
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x54561
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nop
| my_charset_is_8bit_pure_ascii:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp qword ptr [rax+68h], 0
jnz short loc_54559
mov [rbp+var_1], 0
jmp short loc_5459A
loc_54559:
mov [rbp+var_18], 0
loc_54561:
cmp [rbp+var_18], 100h
jnb short loc_54596
mov rax, [rbp+var_10]
mov rax, [rax+68h]
mov rcx, [rbp+var_18]
movzx eax, word ptr [rax+rcx*2]
cmp eax, 7Fh
jle short loc_54586
mov [rbp+var_1], 0
jmp short loc_5459A
loc_54586:
jmp short $+2
loc_54588:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_54561
loc_54596:
mov [rbp+var_1], 1
loc_5459A:
mov al, [rbp+var_1]
pop rbp
retn
| char my_charset_is_8bit_pure_ascii(long long a1)
{
unsigned long long i; // [rsp+0h] [rbp-18h]
if ( !*(_QWORD *)(a1 + 104) )
return 0;
for ( i = 0LL; i < 0x100; ++i )
{
if ( *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 2 * i) > 0x7Fu )
return 0;
}
return 1;
}
| my_charset_is_8bit_pure_ascii:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x68],0x0
JNZ 0x00154559
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0015459a
LAB_00154559:
MOV qword ptr [RBP + -0x18],0x0
LAB_00154561:
CMP qword ptr [RBP + -0x18],0x100
JNC 0x00154596
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + RCX*0x2]
CMP EAX,0x7f
JLE 0x00154586
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0015459a
LAB_00154586:
JMP 0x00154588
LAB_00154588:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00154561
LAB_00154596:
MOV byte ptr [RBP + -0x1],0x1
LAB_0015459a:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int1 my_charset_is_8bit_pure_ascii(long param_1)
{
ulong local_20;
int1 local_9;
if (*(long *)(param_1 + 0x68) == 0) {
local_9 = 0;
}
else {
for (local_20 = 0; local_20 < 0x100; local_20 = local_20 + 1) {
if (0x7f < *(ushort *)(*(long *)(param_1 + 0x68) + local_20 * 2)) {
return 0;
}
}
local_9 = 1;
}
return local_9;
}
| |
42,346 | minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&) | monkey531[P]llama/common/minja.hpp | Expression(const Location & location) : location(location) {} | O3 | cpp | minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::ArgumentsExpression&&):
leaq 0x958c3(%rip), %rax # 0x12f3a8
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x99b16
movq 0x97479(%rip), %r8 # 0x130f80
cmpb $0x0, (%r8)
je 0x99b12
incl 0x8(%rax)
jmp 0x99b16
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rdi)
leaq 0x95d9b(%rip), %rax # 0x12f8c0
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movups (%rdx), %xmm0
movq %rax, 0x8(%rdx)
movups %xmm0, 0x20(%rdi)
movq %rax, (%rdx)
movups (%rcx), %xmm0
movups %xmm0, 0x30(%rdi)
movq 0x10(%rcx), %rdx
movq %rdx, 0x40(%rdi)
movq %rax, 0x10(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
movups 0x18(%rcx), %xmm1
movups %xmm1, 0x48(%rdi)
movq 0x28(%rcx), %rdx
movq %rdx, 0x58(%rdi)
movq %rax, 0x28(%rcx)
movups %xmm0, 0x18(%rcx)
retq
| _ZN5minja8CallExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEONS_19ArgumentsExpressionE:
lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rax, 10h
mov [rdi], rax
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_99B16
mov r8, cs:__libc_single_threaded_ptr
cmp byte ptr [r8], 0
jz short loc_99B12
inc dword ptr [rax+8]
jmp short loc_99B16
loc_99B12:
lock inc dword ptr [rax+8]
loc_99B16:
mov rax, [rsi+10h]
mov [rdi+18h], rax
lea rax, _ZTVN5minja8CallExprE; `vtable for'minja::CallExpr
add rax, 10h
mov [rdi], rax
xor eax, eax
mov [rdi+28h], rax
movups xmm0, xmmword ptr [rdx]
mov [rdx+8], rax
movups xmmword ptr [rdi+20h], xmm0
mov [rdx], rax
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdi+30h], xmm0
mov rdx, [rcx+10h]
mov [rdi+40h], rdx
mov [rcx+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [rcx], xmm0
movups xmm1, xmmword ptr [rcx+18h]
movups xmmword ptr [rdi+48h], xmm1
mov rdx, [rcx+28h]
mov [rdi+58h], rdx
mov [rcx+28h], rax
movups xmmword ptr [rcx+18h], xmm0
retn
| long long minja::CallExpr::CallExpr(long long a1, _QWORD *a2, __int128 *a3, long long a4)
{
long long v4; // rax
long long result; // rax
__int128 v6; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::Expression + 2;
*(_QWORD *)(a1 + 8) = *a2;
v4 = a2[1];
*(_QWORD *)(a1 + 16) = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v4 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v4 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::CallExpr + 2;
result = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
v6 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v6;
*(_QWORD *)a3 = 0LL;
*(_OWORD *)(a1 + 48) = *(_OWORD *)a4;
*(_QWORD *)(a1 + 64) = *(_QWORD *)(a4 + 16);
*(_QWORD *)(a4 + 16) = 0LL;
*(_OWORD *)a4 = 0LL;
*(_OWORD *)(a1 + 72) = *(_OWORD *)(a4 + 24);
*(_QWORD *)(a1 + 88) = *(_QWORD *)(a4 + 40);
*(_QWORD *)(a4 + 40) = 0LL;
*(_OWORD *)(a4 + 24) = 0LL;
return result;
}
| CallExpr:
LEA RAX,[0x22f3a8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x00199b16
MOV R8,qword ptr [0x00230f80]
CMP byte ptr [R8],0x0
JZ 0x00199b12
INC dword ptr [RAX + 0x8]
JMP 0x00199b16
LAB_00199b12:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00199b16:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x22f8c0]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x28],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOV qword ptr [RDX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOV qword ptr [RDX],RAX
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV RDX,qword ptr [RCX + 0x10]
MOV qword ptr [RDI + 0x40],RDX
MOV qword ptr [RCX + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RCX],XMM0
MOVUPS XMM1,xmmword ptr [RCX + 0x18]
MOVUPS xmmword ptr [RDI + 0x48],XMM1
MOV RDX,qword ptr [RCX + 0x28]
MOV qword ptr [RDI + 0x58],RDX
MOV qword ptr [RCX + 0x28],RAX
MOVUPS xmmword ptr [RCX + 0x18],XMM0
RET
|
/* minja::CallExpr::CallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
minja::ArgumentsExpression&&) */
void __thiscall
minja::CallExpr::CallExpr
(CallExpr *this,Location *param_1,shared_ptr *param_2,ArgumentsExpression *param_3)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_0022f3b8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00230f80 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_evaluate_0022f8d0;
*(int8 *)(this + 0x28) = 0;
uVar2 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar2;
*(int8 *)param_2 = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(this + 0x30) = *(int8 *)param_3;
*(int8 *)(this + 0x38) = uVar2;
*(int8 *)(this + 0x40) = *(int8 *)(param_3 + 0x10);
*(int8 *)(param_3 + 0x10) = 0;
*(int8 *)param_3 = 0;
*(int8 *)(param_3 + 8) = 0;
uVar2 = *(int8 *)(param_3 + 0x20);
*(int8 *)(this + 0x48) = *(int8 *)(param_3 + 0x18);
*(int8 *)(this + 0x50) = uVar2;
*(int8 *)(this + 0x58) = *(int8 *)(param_3 + 0x28);
*(int8 *)(param_3 + 0x28) = 0;
*(int8 *)(param_3 + 0x18) = 0;
*(int8 *)(param_3 + 0x20) = 0;
return;
}
| |
42,347 | maria_reset | eloqsql/storage/maria/ma_extra.c | int maria_reset(MARIA_HA *info)
{
int error= 0;
MARIA_SHARE *share= info->s;
myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("maria_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);
}
/* Free memory used for keeping blobs */
if (share->base.blobs)
{
if (info->rec_buff_size > share->base.default_rec_buff_size)
{
info->rec_buff_size= 1; /* Force realloc */
_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size,
share->base.default_rec_buff_size, flag);
}
if (info->blob_buff_size > MARIA_SMALL_BLOB_BUFFER)
{
info->blob_buff_size= 1; /* Force realloc */
_ma_alloc_buffer(&info->blob_buff, &info->blob_buff_size,
MARIA_SMALL_BLOB_BUFFER, flag);
}
}
#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; /* detect index changes */
info->last_search_keypage= info->cur_row.lastpos= HA_OFFSET_ERROR;
info->page_changed= 1;
info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND |
HA_STATE_PREV_FOUND);
info->error_count= 0;
DBUG_RETURN(error);
} | O0 | c | maria_reset:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl 0x7d9(%rax), %edx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpl $0x0, %edx
cmovnel %ecx, %eax
orl $0x10, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x12, %eax
cmpl $0x0, %eax
je 0x37ee7
movq -0x8(%rbp), %rax
movl 0x61c(%rax), %ecx
andl $-0x13, %ecx
movl %ecx, 0x61c(%rax)
movq -0x8(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
callq 0xe7a40
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x3f0(%rax)
je 0x37f92
movq -0x8(%rbp), %rax
movq 0x460(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x420(%rcx), %ecx
cmpq %rcx, %rax
jbe 0x37f4c
movq -0x8(%rbp), %rax
movq $0x1, 0x460(%rax)
movq -0x8(%rbp), %rdi
addq $0x3a0, %rdi # imm = 0x3A0
movq -0x8(%rbp), %rsi
addq $0x460, %rsi # imm = 0x460
movq -0x18(%rbp), %rax
movl 0x420(%rax), %eax
movl %eax, %edx
movq -0x20(%rbp), %rcx
callq 0x32d40
movq -0x8(%rbp), %rax
cmpq $0x400, 0x468(%rax) # imm = 0x400
jbe 0x37f90
movq -0x8(%rbp), %rax
movq $0x1, 0x468(%rax)
movq -0x8(%rbp), %rdi
addq $0x3a8, %rdi # imm = 0x3A8
movq -0x8(%rbp), %rsi
addq $0x468, %rsi # imm = 0x468
movq -0x20(%rbp), %rcx
movl $0x400, %edx # imm = 0x400
callq 0x32d40
jmp 0x37f92
movq -0x8(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x37fc1
movq -0x18(%rbp), %rax
movq 0x5f0(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
movl $0x1, %edx
callq 0x2a450
movq -0x8(%rbp), %rax
movl 0x61c(%rax), %ecx
andl $-0x49, %ecx
movl %ecx, 0x61c(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x682(%rax)
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x62c(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movq $-0x1, 0x98(%rax)
movq -0x8(%rbp), %rax
movq $-0x1, 0x448(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x684(%rax)
movq -0x8(%rbp), %rax
movl 0x624(%rax), %ecx
andl $0x1, %ecx
orl $0x10, %ecx
orl $0x20, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x624(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x628(%rax)
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
| maria_reset:
push rbp
mov rbp, rsp
sub rsp, 30h
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_18]
movsx edx, byte ptr [rax+7D9h]
xor eax, eax
mov ecx, 10000h
cmp edx, 0
cmovnz eax, ecx
or eax, 10h
mov eax, eax
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
mov eax, [rax+61Ch]
and eax, 12h
cmp eax, 0
jz short loc_37EE7
mov rax, [rbp+var_8]
mov ecx, [rax+61Ch]
and ecx, 0FFFFFFEDh
mov [rax+61Ch], ecx
mov rdi, [rbp+var_8]
add rdi, 4B8h
call end_io_cache
mov [rbp+var_C], eax
loc_37EE7:
mov rax, [rbp+var_18]
cmp dword ptr [rax+3F0h], 0
jz loc_37F92
mov rax, [rbp+var_8]
mov rax, [rax+460h]
mov rcx, [rbp+var_18]
mov ecx, [rcx+420h]
cmp rax, rcx
jbe short loc_37F4C
mov rax, [rbp+var_8]
mov qword ptr [rax+460h], 1
mov rdi, [rbp+var_8]
add rdi, 3A0h
mov rsi, [rbp+var_8]
add rsi, 460h
mov rax, [rbp+var_18]
mov eax, [rax+420h]
mov edx, eax
mov rcx, [rbp+var_20]
call _ma_alloc_buffer
loc_37F4C:
mov rax, [rbp+var_8]
cmp qword ptr [rax+468h], 400h
jbe short loc_37F90
mov rax, [rbp+var_8]
mov qword ptr [rax+468h], 1
mov rdi, [rbp+var_8]
add rdi, 3A8h
mov rsi, [rbp+var_8]
add rsi, 468h
mov rcx, [rbp+var_20]
mov edx, 400h
call _ma_alloc_buffer
loc_37F90:
jmp short $+2
loc_37F92:
mov rax, [rbp+var_8]
mov eax, [rax+61Ch]
and eax, 20h
cmp eax, 0
jz short loc_37FC1
mov rax, [rbp+var_18]
mov rdi, [rax+5F0h]
mov rax, [rbp+var_18]
mov rsi, [rax+40h]
mov edx, 1
call _madvise
loc_37FC1:
mov rax, [rbp+var_8]
mov ecx, [rax+61Ch]
and ecx, 0FFFFFFB7h
mov [rax+61Ch], ecx
mov rax, [rbp+var_8]
mov byte ptr [rax+682h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+62Ch], 0FFFFFFFFh
mov rax, [rbp+var_8]
mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_8]
mov qword ptr [rax+448h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_8]
mov byte ptr [rax+684h], 1
mov rax, [rbp+var_8]
mov ecx, [rax+624h]
and ecx, 1
or ecx, 10h
or ecx, 20h
mov rax, [rbp+var_8]
mov [rax+624h], ecx
mov rax, [rbp+var_8]
mov dword ptr [rax+628h], 0
mov eax, [rbp+var_C]
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
add rsp, 30h
pop rbp
retn
| long long maria_reset(long long *a1)
{
int v1; // eax
long long v3; // [rsp+10h] [rbp-20h]
long long v4; // [rsp+18h] [rbp-18h]
unsigned int v5; // [rsp+24h] [rbp-Ch]
v5 = 0;
v4 = *a1;
v1 = 0;
if ( *(_BYTE *)(*a1 + 2009) )
v1 = 0x10000;
v3 = v1 | 0x10u;
if ( (*((_DWORD *)a1 + 391) & 0x12) != 0 )
{
*((_DWORD *)a1 + 391) &= 0xFFFFFFED;
v5 = end_io_cache(a1 + 151);
}
if ( *(_DWORD *)(v4 + 1008) )
{
if ( a1[140] > (unsigned long long)*(unsigned int *)(v4 + 1056) )
{
a1[140] = 1LL;
ma_alloc_buffer(a1 + 116, (unsigned long long *)a1 + 140, *(unsigned int *)(v4 + 1056), v3);
}
if ( (unsigned long long)a1[141] > 0x400 )
{
a1[141] = 1LL;
ma_alloc_buffer(a1 + 117, (unsigned long long *)a1 + 141, 0x400uLL, v3);
}
}
if ( (*((_DWORD *)a1 + 391) & 0x20) != 0 )
madvise(*(_QWORD *)(v4 + 1520), *(_QWORD *)(v4 + 64), 1LL);
*((_DWORD *)a1 + 391) &= 0xFFFFFFB7;
*((_BYTE *)a1 + 1666) = 0;
*((_DWORD *)a1 + 395) = -1;
a1[19] = -1LL;
a1[137] = -1LL;
*((_BYTE *)a1 + 1668) = 1;
*(long long *)((char *)a1 + 1572) = *((_DWORD *)a1 + 393) & 1 | 0x30u;
return v5;
}
| maria_reset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
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 + -0x18]
MOVSX EDX,byte ptr [RAX + 0x7d9]
XOR EAX,EAX
MOV ECX,0x10000
CMP EDX,0x0
CMOVNZ EAX,ECX
OR EAX,0x10
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x12
CMP EAX,0x0
JZ 0x00137ee7
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x61c]
AND ECX,0xffffffed
MOV dword ptr [RAX + 0x61c],ECX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x4b8
CALL 0x001e7a40
MOV dword ptr [RBP + -0xc],EAX
LAB_00137ee7:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x3f0],0x0
JZ 0x00137f92
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x460]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x420]
CMP RAX,RCX
JBE 0x00137f4c
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x460],0x1
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x3a0
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x460
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x420]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x00132d40
LAB_00137f4c:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x468],0x400
JBE 0x00137f90
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x468],0x1
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x3a8
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x468
MOV RCX,qword ptr [RBP + -0x20]
MOV EDX,0x400
CALL 0x00132d40
LAB_00137f90:
JMP 0x00137f92
LAB_00137f92:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x20
CMP EAX,0x0
JZ 0x00137fc1
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x5f0]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1
CALL 0x0012a450
LAB_00137fc1:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x61c]
AND ECX,0xffffffb7
MOV dword ptr [RAX + 0x61c],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x682],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x62c],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],-0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x448],-0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x684],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x624]
AND ECX,0x1
OR ECX,0x10
OR ECX,0x20
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x624],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x628],0x0
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
ADD RSP,0x30
POP RBP
RET
|
int4 maria_reset(long *param_1)
{
long lVar1;
uint uVar2;
int4 local_14;
local_14 = 0;
lVar1 = *param_1;
uVar2 = 0;
if (*(char *)(lVar1 + 0x7d9) != '\0') {
uVar2 = 0x10000;
}
if ((*(uint *)((long)param_1 + 0x61c) & 0x12) != 0) {
*(uint *)((long)param_1 + 0x61c) = *(uint *)((long)param_1 + 0x61c) & 0xffffffed;
local_14 = end_io_cache(param_1 + 0x97);
}
if (*(int *)(lVar1 + 0x3f0) != 0) {
if ((ulong)*(uint *)(lVar1 + 0x420) < (ulong)param_1[0x8c]) {
param_1[0x8c] = 1;
_ma_alloc_buffer(param_1 + 0x74,param_1 + 0x8c,*(int4 *)(lVar1 + 0x420),uVar2 | 0x10);
}
if (0x400 < (ulong)param_1[0x8d]) {
param_1[0x8d] = 1;
_ma_alloc_buffer(param_1 + 0x75,param_1 + 0x8d,0x400,uVar2 | 0x10);
}
}
if ((*(uint *)((long)param_1 + 0x61c) & 0x20) != 0) {
madvise(*(void **)(lVar1 + 0x5f0),*(size_t *)(lVar1 + 0x40),1);
}
*(uint *)((long)param_1 + 0x61c) = *(uint *)((long)param_1 + 0x61c) & 0xffffffb7;
*(int1 *)((long)param_1 + 0x682) = 0;
*(int4 *)((long)param_1 + 0x62c) = 0xffffffff;
param_1[0x13] = -1;
param_1[0x89] = -1;
*(int1 *)((long)param_1 + 0x684) = 1;
*(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) & 1 | 0x30;
*(int4 *)(param_1 + 0xc5) = 0;
return local_14;
}
| |
42,348 | quantize_row_tq1_0_ref | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | void quantize_row_tq1_0_ref(const float * restrict x, block_tq1_0 * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
for (int64_t i = 0; i < nb; i++) {
float amax = 0.0f; // absolute max
for (int j = 0; j < QK_K; j++) {
const float v = x[j];
amax = MAX(amax, fabsf(v));
}
const float d = amax;
const float id = d ? 1.0f/d : 0.0f;
y[i].d = GGML_FP32_TO_FP16(d);
// 5 elements per byte, along 32 bytes
for (size_t j = 0; j < sizeof(y->qs) - sizeof(y->qs) % 32; j += 32) {
for (size_t m = 0; m < 32; ++m) {
uint8_t q = 0;
for (size_t n = 0; n < 5; ++n) {
int xi = lroundf(x[m + n*32] * id) + 1; // -1, 0, 1 -> 0, 1, 2
q *= 3;
q += xi;
}
// ceiling division (243 == pow(3, 5))
q = ((uint16_t)q * 256 + (243 - 1)) / 243;
y[i].qs[j + m] = q;
}
x += 5*32;
}
// along 16 bytes
for (size_t j = sizeof(y->qs) - sizeof(y->qs) % 32; j < sizeof(y->qs); j += 16) {
for (size_t m = 0; m < 16; ++m) {
uint8_t q = 0;
for (size_t n = 0; n < 5; ++n) {
int xi = lroundf(x[m + n*16] * id) + 1; // -1, 0, 1 -> 0, 1, 2
q *= 3;
q += xi;
}
// ceiling division (243 == pow(3, 5))
q = ((uint16_t)q * 256 + (243 - 1)) / 243;
y[i].qs[j + m] = q;
}
x += 5*16;
}
// 4 elements per byte
for (size_t j = 0; j < sizeof(y->qh); ++j) {
uint8_t q = 0;
for (size_t m = 0; m < 4; ++m) {
// -1, 0, 1 -> 0, 1, 2
int xi = lroundf(x[j + m*sizeof(y->qh)] * id) + 1;
q *= 3;
q += xi;
}
// shift the first value to the most significant trit
q *= 3;
// ceiling division (243 == pow(3, 5))
q = ((uint16_t)q * 256 + (243 - 1)) / 243;
y[i].qh[j] = q;
}
x += 4*sizeof(y->qh);
}
} | O0 | c | quantize_row_tq1_0_ref:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x100, %ecx # imm = 0x100
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x77abd
jmp 0x77adc
leaq 0x49680(%rip), %rdi # 0xc1144
leaq 0x49291(%rip), %rsi # 0xc0d5c
movl $0x7ea, %edx # imm = 0x7EA
leaq 0x4999b(%rip), %rcx # 0xc1472
callq 0x44810
movq -0x18(%rbp), %rax
movl $0x100, %ecx # imm = 0x100
cqto
idivq %rcx
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x77efa
xorps %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
cmpl $0x100, -0x30(%rbp) # imm = 0x100
jge 0x77b87
movq -0x8(%rbp), %rax
movslq -0x30(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x2c(%rbp), %xmm0
movss -0x34(%rbp), %xmm1
movaps 0x394f1(%rip), %xmm2 # 0xb1030
pand %xmm2, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x77b57
movss -0x2c(%rbp), %xmm0
movss %xmm0, -0xb0(%rbp)
jmp 0x77b6f
movss -0x34(%rbp), %xmm0
movaps 0x394cd(%rip), %xmm1 # 0xb1030
pand %xmm1, %xmm0
movss %xmm0, -0xb0(%rbp)
movss -0xb0(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x77b13
movss -0x2c(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x38(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x77ba2
jp 0x77ba2
jmp 0x77bb9
movss 0x3987e(%rip), %xmm0 # 0xb1428
divss -0x38(%rbp), %xmm0
movss %xmm0, -0xb4(%rbp)
jmp 0x77bc6
xorps %xmm0, %xmm0
movss %xmm0, -0xb4(%rbp)
jmp 0x77bc6
movss -0xb4(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x38(%rbp), %xmm0
callq 0x6d750
movw %ax, %cx
movq -0x10(%rbp), %rax
imulq $0x36, -0x28(%rbp), %rdx
addq %rdx, %rax
movw %cx, 0x34(%rax)
movq $0x0, -0x48(%rbp)
cmpq $0x20, -0x48(%rbp)
jae 0x77cda
movq $0x0, -0x50(%rbp)
cmpq $0x20, -0x50(%rbp)
jae 0x77cbb
movb $0x0, -0x51(%rbp)
movq $0x0, -0x60(%rbp)
cmpq $0x5, -0x60(%rbp)
jae 0x77c76
movq -0x8(%rbp), %rax
movq -0x50(%rbp), %rcx
movq -0x60(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movss (%rax,%rcx,4), %xmm0
mulss -0x3c(%rbp), %xmm0
callq 0x474a0
addq $0x1, %rax
movl %eax, -0x64(%rbp)
movzbl -0x51(%rbp), %eax
imull $0x3, %eax, %eax
movb %al, -0x51(%rbp)
movl -0x64(%rbp), %ecx
movzbl -0x51(%rbp), %eax
addl %ecx, %eax
movb %al, -0x51(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x77c22
movzbl -0x51(%rbp), %eax
movzwl %ax, %eax
shll $0x8, %eax
addl $0xf2, %eax
movl $0xf3, %ecx
cltd
idivl %ecx
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %dl
movq -0x10(%rbp), %rax
imulq $0x36, -0x28(%rbp), %rcx
addq %rcx, %rax
movq -0x48(%rbp), %rcx
addq -0x50(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x77c0b
movq -0x8(%rbp), %rax
addq $0x280, %rax # imm = 0x280
movq %rax, -0x8(%rbp)
movq -0x48(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x48(%rbp)
jmp 0x77bf8
movq $0x20, -0x70(%rbp)
cmpq $0x30, -0x70(%rbp)
jae 0x77dd9
movq $0x0, -0x78(%rbp)
cmpq $0x10, -0x78(%rbp)
jae 0x77dba
movb $0x0, -0x79(%rbp)
movq $0x0, -0x88(%rbp)
cmpq $0x5, -0x88(%rbp)
jae 0x77d75
movq -0x8(%rbp), %rax
movq -0x78(%rbp), %rcx
movq -0x88(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movss (%rax,%rcx,4), %xmm0
mulss -0x3c(%rbp), %xmm0
callq 0x474a0
addq $0x1, %rax
movl %eax, -0x8c(%rbp)
movzbl -0x79(%rbp), %eax
imull $0x3, %eax, %eax
movb %al, -0x79(%rbp)
movl -0x8c(%rbp), %ecx
movzbl -0x79(%rbp), %eax
addl %ecx, %eax
movb %al, -0x79(%rbp)
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x77d0f
movzbl -0x79(%rbp), %eax
movzwl %ax, %eax
shll $0x8, %eax
addl $0xf2, %eax
movl $0xf3, %ecx
cltd
idivl %ecx
movb %al, -0x79(%rbp)
movb -0x79(%rbp), %dl
movq -0x10(%rbp), %rax
imulq $0x36, -0x28(%rbp), %rcx
addq %rcx, %rax
movq -0x70(%rbp), %rcx
addq -0x78(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x77cf5
movq -0x8(%rbp), %rax
addq $0x140, %rax # imm = 0x140
movq %rax, -0x8(%rbp)
movq -0x70(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x70(%rbp)
jmp 0x77ce2
movq $0x0, -0x98(%rbp)
cmpq $0x4, -0x98(%rbp)
jae 0x77edd
movb $0x0, -0x99(%rbp)
movq $0x0, -0xa8(%rbp)
cmpq $0x4, -0xa8(%rbp)
jae 0x77e79
movq -0x8(%rbp), %rax
movq -0x98(%rbp), %rcx
movq -0xa8(%rbp), %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
movss (%rax,%rcx,4), %xmm0
mulss -0x3c(%rbp), %xmm0
callq 0x474a0
addq $0x1, %rax
movl %eax, -0xac(%rbp)
movzbl -0x99(%rbp), %eax
imull $0x3, %eax, %eax
movb %al, -0x99(%rbp)
movl -0xac(%rbp), %ecx
movzbl -0x99(%rbp), %eax
addl %ecx, %eax
movb %al, -0x99(%rbp)
movq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
jmp 0x77e04
movzbl -0x99(%rbp), %eax
imull $0x3, %eax, %eax
movb %al, -0x99(%rbp)
movzbl -0x99(%rbp), %eax
movzwl %ax, %eax
shll $0x8, %eax
addl $0xf2, %eax
movl $0xf3, %ecx
cltd
idivl %ecx
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %dl
movq -0x10(%rbp), %rax
imulq $0x36, -0x28(%rbp), %rcx
addq %rcx, %rax
movq -0x98(%rbp), %rcx
movb %dl, 0x30(%rax,%rcx)
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x77de4
movq -0x8(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x77af6
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| quantize_row_tq1_0_ref:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_18]
mov ecx, 100h
cqo
idiv rcx
cmp rdx, 0
jnz short loc_77ABD
jmp short loc_77ADC
loc_77ABD:
lea rdi, aKQkK0; "k % QK_K == 0"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov edx, 7EAh
lea rcx, aVoidQuantizeRo_15; "void quantize_row_tq1_0_ref(const float"...
call ___assert_fail
loc_77ADC:
mov rax, [rbp+var_18]
mov ecx, 100h
cqo
idiv rcx
mov [rbp+var_20], rax
mov [rbp+var_28], 0
loc_77AF6:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jge loc_77EFA
xorps xmm0, xmm0
movss [rbp+var_2C], xmm0
mov [rbp+var_30], 0
loc_77B13:
cmp [rbp+var_30], 100h
jge short loc_77B87
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_30]
movss xmm0, dword ptr [rax+rcx*4]
movss [rbp+var_34], xmm0
movss xmm0, [rbp+var_2C]
movss xmm1, [rbp+var_34]
movaps xmm2, cs:xmmword_B1030
pand xmm1, xmm2
ucomiss xmm0, xmm1
jbe short loc_77B57
movss xmm0, [rbp+var_2C]
movss [rbp+var_B0], xmm0
jmp short loc_77B6F
loc_77B57:
movss xmm0, [rbp+var_34]
movaps xmm1, cs:xmmword_B1030
pand xmm0, xmm1
movss [rbp+var_B0], xmm0
loc_77B6F:
movss xmm0, [rbp+var_B0]
movss [rbp+var_2C], xmm0
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp short loc_77B13
loc_77B87:
movss xmm0, [rbp+var_2C]
movss [rbp+var_38], xmm0
movss xmm0, [rbp+var_38]
xorps xmm1, xmm1
ucomiss xmm0, xmm1
jnz short loc_77BA2
jp short loc_77BA2
jmp short loc_77BB9
loc_77BA2:
movss xmm0, cs:dword_B1428
divss xmm0, [rbp+var_38]
movss [rbp+var_B4], xmm0
jmp short loc_77BC6
loc_77BB9:
xorps xmm0, xmm0
movss [rbp+var_B4], xmm0
jmp short $+2
loc_77BC6:
movss xmm0, [rbp+var_B4]
movss [rbp+var_3C], xmm0
movss xmm0, [rbp+var_38]
call ggml_compute_fp32_to_fp16_0
mov cx, ax
mov rax, [rbp+var_10]
imul rdx, [rbp+var_28], 36h ; '6'
add rax, rdx
mov [rax+34h], cx
mov [rbp+var_48], 0
loc_77BF8:
cmp [rbp+var_48], 20h ; ' '
jnb loc_77CDA
mov [rbp+var_50], 0
loc_77C0B:
cmp [rbp+var_50], 20h ; ' '
jnb loc_77CBB
mov [rbp+var_51], 0
mov [rbp+var_60], 0
loc_77C22:
cmp [rbp+var_60], 5
jnb short loc_77C76
mov rax, [rbp+var_8]
mov rcx, [rbp+var_50]
mov rdx, [rbp+var_60]
shl rdx, 5
add rcx, rdx
movss xmm0, dword ptr [rax+rcx*4]
mulss xmm0, [rbp+var_3C]
call _lroundf
add rax, 1
mov [rbp+var_64], eax
movzx eax, [rbp+var_51]
imul eax, 3
mov [rbp+var_51], al
mov ecx, [rbp+var_64]
movzx eax, [rbp+var_51]
add eax, ecx
mov [rbp+var_51], al
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
jmp short loc_77C22
loc_77C76:
movzx eax, [rbp+var_51]
movzx eax, ax
shl eax, 8
add eax, 0F2h
mov ecx, 0F3h
cdq
idiv ecx
mov [rbp+var_51], al
mov dl, [rbp+var_51]
mov rax, [rbp+var_10]
imul rcx, [rbp+var_28], 36h ; '6'
add rax, rcx
mov rcx, [rbp+var_48]
add rcx, [rbp+var_50]
mov [rax+rcx], dl
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
jmp loc_77C0B
loc_77CBB:
mov rax, [rbp+var_8]
add rax, 280h
mov [rbp+var_8], rax
mov rax, [rbp+var_48]
add rax, 20h ; ' '
mov [rbp+var_48], rax
jmp loc_77BF8
loc_77CDA:
mov [rbp+var_70], 20h ; ' '
loc_77CE2:
cmp [rbp+var_70], 30h ; '0'
jnb loc_77DD9
mov [rbp+var_78], 0
loc_77CF5:
cmp [rbp+var_78], 10h
jnb loc_77DBA
mov [rbp+var_79], 0
mov [rbp+var_88], 0
loc_77D0F:
cmp [rbp+var_88], 5
jnb short loc_77D75
mov rax, [rbp+var_8]
mov rcx, [rbp+var_78]
mov rdx, [rbp+var_88]
shl rdx, 4
add rcx, rdx
movss xmm0, dword ptr [rax+rcx*4]
mulss xmm0, [rbp+var_3C]
call _lroundf
add rax, 1
mov [rbp+var_8C], eax
movzx eax, [rbp+var_79]
imul eax, 3
mov [rbp+var_79], al
mov ecx, [rbp+var_8C]
movzx eax, [rbp+var_79]
add eax, ecx
mov [rbp+var_79], al
mov rax, [rbp+var_88]
add rax, 1
mov [rbp+var_88], rax
jmp short loc_77D0F
loc_77D75:
movzx eax, [rbp+var_79]
movzx eax, ax
shl eax, 8
add eax, 0F2h
mov ecx, 0F3h
cdq
idiv ecx
mov [rbp+var_79], al
mov dl, [rbp+var_79]
mov rax, [rbp+var_10]
imul rcx, [rbp+var_28], 36h ; '6'
add rax, rcx
mov rcx, [rbp+var_70]
add rcx, [rbp+var_78]
mov [rax+rcx], dl
mov rax, [rbp+var_78]
add rax, 1
mov [rbp+var_78], rax
jmp loc_77CF5
loc_77DBA:
mov rax, [rbp+var_8]
add rax, 140h
mov [rbp+var_8], rax
mov rax, [rbp+var_70]
add rax, 10h
mov [rbp+var_70], rax
jmp loc_77CE2
loc_77DD9:
mov [rbp+var_98], 0
loc_77DE4:
cmp [rbp+var_98], 4
jnb loc_77EDD
mov [rbp+var_99], 0
mov [rbp+var_A8], 0
loc_77E04:
cmp [rbp+var_A8], 4
jnb short loc_77E79
mov rax, [rbp+var_8]
mov rcx, [rbp+var_98]
mov rdx, [rbp+var_A8]
shl rdx, 2
add rcx, rdx
movss xmm0, dword ptr [rax+rcx*4]
mulss xmm0, [rbp+var_3C]
call _lroundf
add rax, 1
mov [rbp+var_AC], eax
movzx eax, [rbp+var_99]
imul eax, 3
mov [rbp+var_99], al
mov ecx, [rbp+var_AC]
movzx eax, [rbp+var_99]
add eax, ecx
mov [rbp+var_99], al
mov rax, [rbp+var_A8]
add rax, 1
mov [rbp+var_A8], rax
jmp short loc_77E04
loc_77E79:
movzx eax, [rbp+var_99]
imul eax, 3
mov [rbp+var_99], al
movzx eax, [rbp+var_99]
movzx eax, ax
shl eax, 8
add eax, 0F2h
mov ecx, 0F3h
cdq
idiv ecx
mov [rbp+var_99], al
mov dl, [rbp+var_99]
mov rax, [rbp+var_10]
imul rcx, [rbp+var_28], 36h ; '6'
add rax, rcx
mov rcx, [rbp+var_98]
mov [rax+rcx+30h], dl
mov rax, [rbp+var_98]
add rax, 1
mov [rbp+var_98], rax
jmp loc_77DE4
loc_77EDD:
mov rax, [rbp+var_8]
add rax, 40h ; '@'
mov [rbp+var_8], rax
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp loc_77AF6
loc_77EFA:
add rsp, 0C0h
pop rbp
retn
| long long quantize_row_tq1_0_ref(long long a1, long long a2, long long a3)
{
long long result; // rax
float v4; // [rsp+Ch] [rbp-B4h]
unsigned __int32 v5; // [rsp+10h] [rbp-B0h]
unsigned long long nn; // [rsp+18h] [rbp-A8h]
char v7; // [rsp+27h] [rbp-99h]
unsigned long long mm; // [rsp+28h] [rbp-98h]
unsigned long long kk; // [rsp+38h] [rbp-88h]
unsigned __int8 v10; // [rsp+47h] [rbp-79h]
unsigned long long jj; // [rsp+48h] [rbp-78h]
unsigned long long ii; // [rsp+50h] [rbp-70h]
unsigned long long n; // [rsp+60h] [rbp-60h]
unsigned __int8 v14; // [rsp+6Fh] [rbp-51h]
unsigned long long m; // [rsp+70h] [rbp-50h]
unsigned long long k; // [rsp+78h] [rbp-48h]
unsigned int v17; // [rsp+8Ch] [rbp-34h]
int j; // [rsp+90h] [rbp-30h]
float v19; // [rsp+94h] [rbp-2Ch]
long long i; // [rsp+98h] [rbp-28h]
if ( a3 % 256 )
__assert_fail(
"k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2026LL,
"void quantize_row_tq1_0_ref(const float *restrict, block_tq1_0 *restrict, int64_t)");
for ( i = 0LL; ; ++i )
{
result = i;
if ( i >= a3 / 256 )
break;
v19 = 0.0;
for ( j = 0; j < 256; ++j )
{
v17 = *(_DWORD *)(a1 + 4LL * j);
if ( v19 <= *(float *)_mm_and_si128((__m128i)v17, (__m128i)xmmword_B1030).m128i_i32 )
v5 = _mm_and_si128((__m128i)v17, (__m128i)xmmword_B1030).m128i_u32[0];
else
v5 = LODWORD(v19);
v19 = *(float *)&v5;
}
if ( v19 == 0.0 )
v4 = 0.0;
else
v4 = 1.0 / v19;
*(_WORD *)(54 * i + a2 + 52) = ggml_compute_fp32_to_fp16_0(v19);
for ( k = 0LL; k < 0x20; k += 32LL )
{
for ( m = 0LL; m < 0x20; ++m )
{
v14 = 0;
for ( n = 0LL; n < 5; ++n )
v14 = lroundf(*(float *)(a1 + 4 * (32 * n + m)) * v4) + 1 + 3 * v14;
*(_BYTE *)(54 * i + a2 + m + k) = ((v14 << 8) + 242) / 243;
}
a1 += 640LL;
}
for ( ii = 32LL; ii < 0x30; ii += 16LL )
{
for ( jj = 0LL; jj < 0x10; ++jj )
{
v10 = 0;
for ( kk = 0LL; kk < 5; ++kk )
v10 = lroundf(*(float *)(a1 + 4 * (16 * kk + jj)) * v4) + 1 + 3 * v10;
*(_BYTE *)(54 * i + a2 + jj + ii) = ((v10 << 8) + 242) / 243;
}
a1 += 320LL;
}
for ( mm = 0LL; mm < 4; ++mm )
{
v7 = 0;
for ( nn = 0LL; nn < 4; ++nn )
v7 = lroundf(*(float *)(a1 + 4 * (4 * nn + mm)) * v4) + 1 + 3 * v7;
*(_BYTE *)(54 * i + a2 + mm + 48) = (((unsigned __int8)(3 * v7) << 8) + 242) / 243;
}
a1 += 64LL;
}
return result;
}
| quantize_row_tq1_0_ref:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,0x100
CQO
IDIV RCX
CMP RDX,0x0
JNZ 0x00177abd
JMP 0x00177adc
LAB_00177abd:
LEA RDI,[0x1c1144]
LEA RSI,[0x1c0d5c]
MOV EDX,0x7ea
LEA RCX,[0x1c1472]
CALL 0x00144810
LAB_00177adc:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,0x100
CQO
IDIV RCX
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x28],0x0
LAB_00177af6:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x20]
JGE 0x00177efa
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0x2c],XMM0
MOV dword ptr [RBP + -0x30],0x0
LAB_00177b13:
CMP dword ptr [RBP + -0x30],0x100
JGE 0x00177b87
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x30]
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MOVSS dword ptr [RBP + -0x34],XMM0
MOVSS XMM0,dword ptr [RBP + -0x2c]
MOVSS XMM1,dword ptr [RBP + -0x34]
MOVAPS XMM2,xmmword ptr [0x001b1030]
PAND XMM1,XMM2
UCOMISS XMM0,XMM1
JBE 0x00177b57
MOVSS XMM0,dword ptr [RBP + -0x2c]
MOVSS dword ptr [RBP + -0xb0],XMM0
JMP 0x00177b6f
LAB_00177b57:
MOVSS XMM0,dword ptr [RBP + -0x34]
MOVAPS XMM1,xmmword ptr [0x001b1030]
PAND XMM0,XMM1
MOVSS dword ptr [RBP + -0xb0],XMM0
LAB_00177b6f:
MOVSS XMM0,dword ptr [RBP + -0xb0]
MOVSS dword ptr [RBP + -0x2c],XMM0
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x00177b13
LAB_00177b87:
MOVSS XMM0,dword ptr [RBP + -0x2c]
MOVSS dword ptr [RBP + -0x38],XMM0
MOVSS XMM0,dword ptr [RBP + -0x38]
XORPS XMM1,XMM1
UCOMISS XMM0,XMM1
JNZ 0x00177ba2
JP 0x00177ba2
JMP 0x00177bb9
LAB_00177ba2:
MOVSS XMM0,dword ptr [0x001b1428]
DIVSS XMM0,dword ptr [RBP + -0x38]
MOVSS dword ptr [RBP + -0xb4],XMM0
JMP 0x00177bc6
LAB_00177bb9:
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0xb4],XMM0
JMP 0x00177bc6
LAB_00177bc6:
MOVSS XMM0,dword ptr [RBP + -0xb4]
MOVSS dword ptr [RBP + -0x3c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x38]
CALL 0x0016d750
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
IMUL RDX,qword ptr [RBP + -0x28],0x36
ADD RAX,RDX
MOV word ptr [RAX + 0x34],CX
MOV qword ptr [RBP + -0x48],0x0
LAB_00177bf8:
CMP qword ptr [RBP + -0x48],0x20
JNC 0x00177cda
MOV qword ptr [RBP + -0x50],0x0
LAB_00177c0b:
CMP qword ptr [RBP + -0x50],0x20
JNC 0x00177cbb
MOV byte ptr [RBP + -0x51],0x0
MOV qword ptr [RBP + -0x60],0x0
LAB_00177c22:
CMP qword ptr [RBP + -0x60],0x5
JNC 0x00177c76
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x60]
SHL RDX,0x5
ADD RCX,RDX
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MULSS XMM0,dword ptr [RBP + -0x3c]
CALL 0x001474a0
ADD RAX,0x1
MOV dword ptr [RBP + -0x64],EAX
MOVZX EAX,byte ptr [RBP + -0x51]
IMUL EAX,EAX,0x3
MOV byte ptr [RBP + -0x51],AL
MOV ECX,dword ptr [RBP + -0x64]
MOVZX EAX,byte ptr [RBP + -0x51]
ADD EAX,ECX
MOV byte ptr [RBP + -0x51],AL
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00177c22
LAB_00177c76:
MOVZX EAX,byte ptr [RBP + -0x51]
MOVZX EAX,AX
SHL EAX,0x8
ADD EAX,0xf2
MOV ECX,0xf3
CDQ
IDIV ECX
MOV byte ptr [RBP + -0x51],AL
MOV DL,byte ptr [RBP + -0x51]
MOV RAX,qword ptr [RBP + -0x10]
IMUL RCX,qword ptr [RBP + -0x28],0x36
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x48]
ADD RCX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00177c0b
LAB_00177cbb:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x280
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x20
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00177bf8
LAB_00177cda:
MOV qword ptr [RBP + -0x70],0x20
LAB_00177ce2:
CMP qword ptr [RBP + -0x70],0x30
JNC 0x00177dd9
MOV qword ptr [RBP + -0x78],0x0
LAB_00177cf5:
CMP qword ptr [RBP + -0x78],0x10
JNC 0x00177dba
MOV byte ptr [RBP + -0x79],0x0
MOV qword ptr [RBP + -0x88],0x0
LAB_00177d0f:
CMP qword ptr [RBP + -0x88],0x5
JNC 0x00177d75
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x88]
SHL RDX,0x4
ADD RCX,RDX
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MULSS XMM0,dword ptr [RBP + -0x3c]
CALL 0x001474a0
ADD RAX,0x1
MOV dword ptr [RBP + -0x8c],EAX
MOVZX EAX,byte ptr [RBP + -0x79]
IMUL EAX,EAX,0x3
MOV byte ptr [RBP + -0x79],AL
MOV ECX,dword ptr [RBP + -0x8c]
MOVZX EAX,byte ptr [RBP + -0x79]
ADD EAX,ECX
MOV byte ptr [RBP + -0x79],AL
MOV RAX,qword ptr [RBP + -0x88]
ADD RAX,0x1
MOV qword ptr [RBP + -0x88],RAX
JMP 0x00177d0f
LAB_00177d75:
MOVZX EAX,byte ptr [RBP + -0x79]
MOVZX EAX,AX
SHL EAX,0x8
ADD EAX,0xf2
MOV ECX,0xf3
CDQ
IDIV ECX
MOV byte ptr [RBP + -0x79],AL
MOV DL,byte ptr [RBP + -0x79]
MOV RAX,qword ptr [RBP + -0x10]
IMUL RCX,qword ptr [RBP + -0x28],0x36
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x70]
ADD RCX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,0x1
MOV qword ptr [RBP + -0x78],RAX
JMP 0x00177cf5
LAB_00177dba:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x140
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,0x10
MOV qword ptr [RBP + -0x70],RAX
JMP 0x00177ce2
LAB_00177dd9:
MOV qword ptr [RBP + -0x98],0x0
LAB_00177de4:
CMP qword ptr [RBP + -0x98],0x4
JNC 0x00177edd
MOV byte ptr [RBP + -0x99],0x0
MOV qword ptr [RBP + -0xa8],0x0
LAB_00177e04:
CMP qword ptr [RBP + -0xa8],0x4
JNC 0x00177e79
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x98]
MOV RDX,qword ptr [RBP + -0xa8]
SHL RDX,0x2
ADD RCX,RDX
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MULSS XMM0,dword ptr [RBP + -0x3c]
CALL 0x001474a0
ADD RAX,0x1
MOV dword ptr [RBP + -0xac],EAX
MOVZX EAX,byte ptr [RBP + -0x99]
IMUL EAX,EAX,0x3
MOV byte ptr [RBP + -0x99],AL
MOV ECX,dword ptr [RBP + -0xac]
MOVZX EAX,byte ptr [RBP + -0x99]
ADD EAX,ECX
MOV byte ptr [RBP + -0x99],AL
MOV RAX,qword ptr [RBP + -0xa8]
ADD RAX,0x1
MOV qword ptr [RBP + -0xa8],RAX
JMP 0x00177e04
LAB_00177e79:
MOVZX EAX,byte ptr [RBP + -0x99]
IMUL EAX,EAX,0x3
MOV byte ptr [RBP + -0x99],AL
MOVZX EAX,byte ptr [RBP + -0x99]
MOVZX EAX,AX
SHL EAX,0x8
ADD EAX,0xf2
MOV ECX,0xf3
CDQ
IDIV ECX
MOV byte ptr [RBP + -0x99],AL
MOV DL,byte ptr [RBP + -0x99]
MOV RAX,qword ptr [RBP + -0x10]
IMUL RCX,qword ptr [RBP + -0x28],0x36
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x98]
MOV byte ptr [RAX + RCX*0x1 + 0x30],DL
MOV RAX,qword ptr [RBP + -0x98]
ADD RAX,0x1
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00177de4
LAB_00177edd:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x40
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00177af6
LAB_00177efa:
ADD RSP,0xc0
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void quantize_row_tq1_0_ref(long param_1,long param_2,long param_3)
{
uint uVar1;
int2 uVar2;
long lVar3;
float local_bc;
float local_b8;
ulong local_b0;
char local_a1;
ulong local_a0;
ulong local_90;
byte local_81;
ulong local_80;
ulong local_78;
ulong local_68;
byte local_59;
ulong local_58;
ulong local_50;
int local_38;
float local_34;
long local_30;
long local_10;
if (param_3 % 0x100 == 0) {
local_10 = param_1;
for (local_30 = 0; local_30 < param_3 / 0x100; local_30 = local_30 + 1) {
local_34 = 0.0;
for (local_38 = 0; local_38 < 0x100; local_38 = local_38 + 1) {
uVar1 = *(uint *)(local_10 + (long)local_38 * 4);
if (local_34 <= (float)(uVar1 & _DAT_001b1030)) {
local_b8 = (float)(uVar1 & _DAT_001b1030);
}
else {
local_b8 = local_34;
}
local_34 = local_b8;
}
if ((local_34 != 0.0) || (NAN(local_34))) {
local_bc = DAT_001b1428 / local_34;
}
else {
local_bc = 0.0;
}
uVar2 = ggml_compute_fp32_to_fp16();
*(int2 *)(param_2 + local_30 * 0x36 + 0x34) = uVar2;
for (local_50 = 0; local_50 < 0x20; local_50 = local_50 + 0x20) {
for (local_58 = 0; local_58 < 0x20; local_58 = local_58 + 1) {
local_59 = 0;
for (local_68 = 0; local_68 < 5; local_68 = local_68 + 1) {
lVar3 = lroundf(*(float *)(local_10 + (local_58 + local_68 * 0x20) * 4) * local_bc);
local_59 = local_59 * '\x03' + (char)lVar3 + '\x01';
}
*(char *)(param_2 + local_30 * 0x36 + local_50 + local_58) =
(char)(((uint)local_59 * 0x100 + 0xf2) / 0xf3);
}
local_10 = local_10 + 0x280;
}
for (local_78 = 0x20; local_78 < 0x30; local_78 = local_78 + 0x10) {
for (local_80 = 0; local_80 < 0x10; local_80 = local_80 + 1) {
local_81 = 0;
for (local_90 = 0; local_90 < 5; local_90 = local_90 + 1) {
lVar3 = lroundf(*(float *)(local_10 + (local_80 + local_90 * 0x10) * 4) * local_bc);
local_81 = local_81 * '\x03' + (char)lVar3 + '\x01';
}
*(char *)(param_2 + local_30 * 0x36 + local_78 + local_80) =
(char)(((uint)local_81 * 0x100 + 0xf2) / 0xf3);
}
local_10 = local_10 + 0x140;
}
for (local_a0 = 0; local_a0 < 4; local_a0 = local_a0 + 1) {
local_a1 = '\0';
for (local_b0 = 0; local_b0 < 4; local_b0 = local_b0 + 1) {
lVar3 = lroundf(*(float *)(local_10 + (local_a0 + local_b0 * 4) * 4) * local_bc);
local_a1 = local_a1 * '\x03' + (char)lVar3 + '\x01';
}
*(char *)(param_2 + local_30 * 0x36 + 0x30 + local_a0) =
(char)(((uint)(byte)(local_a1 * '\x03') * 0x100 + 0xf2) / 0xf3);
}
local_10 = local_10 + 0x40;
}
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"
,0x7ea,
"void quantize_row_tq1_0_ref(const float *restrict, block_tq1_0 *restrict, int64_t)"
);
}
| |
42,349 | quantize_row_tq1_0_ref | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | void quantize_row_tq1_0_ref(const float * restrict x, block_tq1_0 * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
for (int64_t i = 0; i < nb; i++) {
float amax = 0.0f; // absolute max
for (int j = 0; j < QK_K; j++) {
const float v = x[j];
amax = MAX(amax, fabsf(v));
}
const float d = amax;
const float id = d ? 1.0f/d : 0.0f;
y[i].d = GGML_FP32_TO_FP16(d);
// 5 elements per byte, along 32 bytes
for (size_t j = 0; j < sizeof(y->qs) - sizeof(y->qs) % 32; j += 32) {
for (size_t m = 0; m < 32; ++m) {
uint8_t q = 0;
for (size_t n = 0; n < 5; ++n) {
int xi = lroundf(x[m + n*32] * id) + 1; // -1, 0, 1 -> 0, 1, 2
q *= 3;
q += xi;
}
// ceiling division (243 == pow(3, 5))
q = ((uint16_t)q * 256 + (243 - 1)) / 243;
y[i].qs[j + m] = q;
}
x += 5*32;
}
// along 16 bytes
for (size_t j = sizeof(y->qs) - sizeof(y->qs) % 32; j < sizeof(y->qs); j += 16) {
for (size_t m = 0; m < 16; ++m) {
uint8_t q = 0;
for (size_t n = 0; n < 5; ++n) {
int xi = lroundf(x[m + n*16] * id) + 1; // -1, 0, 1 -> 0, 1, 2
q *= 3;
q += xi;
}
// ceiling division (243 == pow(3, 5))
q = ((uint16_t)q * 256 + (243 - 1)) / 243;
y[i].qs[j + m] = q;
}
x += 5*16;
}
// 4 elements per byte
for (size_t j = 0; j < sizeof(y->qh); ++j) {
uint8_t q = 0;
for (size_t m = 0; m < 4; ++m) {
// -1, 0, 1 -> 0, 1, 2
int xi = lroundf(x[j + m*sizeof(y->qh)] * id) + 1;
q *= 3;
q += xi;
}
// shift the first value to the most significant trit
q *= 3;
// ceiling division (243 == pow(3, 5))
q = ((uint16_t)q * 256 + (243 - 1)) / 243;
y[i].qh[j] = q;
}
x += 4*sizeof(y->qh);
}
} | O1 | c | quantize_row_tq1_0_ref:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, 0x30(%rsp)
testb %dl, %dl
jne 0x33bdf
sarq $0x8, %rdx
testq %rdx, %rdx
jle 0x33bd0
leaq 0x280(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x3c0(%rdi), %rax
movq %rax, (%rsp)
xorl %r8d, %r8d
movaps 0x186a5(%rip), %xmm2 # 0x4c020
movl $0xffff, %ebx # imm = 0xFFFF
movq %rdx, 0x28(%rsp)
xorl %eax, %eax
xorps %xmm0, %xmm0
movss (%rdi,%rax,4), %xmm1
andps %xmm2, %xmm1
maxss %xmm1, %xmm0
incq %rax
cmpq $0x100, %rax # imm = 0x100
jne 0x3398a
movss 0x186af(%rip), %xmm1 # 0x4c058
divss %xmm0, %xmm1
movaps %xmm0, %xmm3
cmpneqss 0x1d40b(%rip), %xmm3 # 0x50dc4
andps %xmm1, %xmm3
movd %xmm0, %eax
andps %xmm2, %xmm0
mulss 0x1867d(%rip), %xmm0 # 0x4c048
leal (%rax,%rax), %ecx
movl %eax, %edx
andl $0x7f800000, %edx # imm = 0x7F800000
addl $0x7800000, %edx # imm = 0x7800000
cmpl $0x71000000, %ecx # imm = 0x71000000
movl $0x40000000, %esi # imm = 0x40000000
cmovbl %esi, %edx
mulss 0x1865a(%rip), %xmm0 # 0x4c04c
movd %edx, %xmm1
addss %xmm0, %xmm1
movd %xmm1, %edx
movl %edx, %esi
shrl $0xd, %esi
andl $0x7c00, %esi # imm = 0x7C00
andl $0xfff, %edx # imm = 0xFFF
addl %esi, %edx
shrl $0x10, %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0xff000001, %ecx # imm = 0xFF000001
movl $0x7e00, %ecx # imm = 0x7E00
cmovael %ecx, %edx
orl %eax, %edx
movq %r8, 0x38(%rsp)
imulq $0x36, %r8, %rax
movq 0x30(%rsp), %rcx
leaq (%rcx,%rax), %r14
movw %dx, 0x34(%rcx,%rax)
movq %rdi, 0x40(%rsp)
movq %rdi, %r12
xorl %r13d, %r13d
movaps %xmm3, 0x10(%rsp)
xorl %ebp, %ebp
xorl %r15d, %r15d
movss (%r12,%rbp), %xmm0
mulss %xmm3, %xmm0
callq 0x18700
movaps 0x10(%rsp), %xmm3
movzbl %r15b, %ecx
leal (%rcx,%rcx,2), %r15d
addb %al, %r15b
incb %r15b
subq $-0x80, %rbp
cmpq $0x280, %rbp # imm = 0x280
jne 0x33a55
movzbl %r15b, %eax
shll $0x8, %eax
orl $0xf2, %eax
movl %eax, %ecx
andl %ebx, %ecx
imull $0xdb3, %ecx, %ecx # imm = 0xDB3
shrl $0x10, %ecx
subl %ecx, %eax
andl %ebx, %eax
shrl %eax
addl %ecx, %eax
shrl $0x7, %eax
movb %al, (%r14,%r13)
incq %r13
addq $0x4, %r12
cmpq $0x20, %r13
jne 0x33a50
movq 0x8(%rsp), %r12
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r15d, %r15d
movss (%r12,%rbp), %xmm0
mulss %xmm3, %xmm0
callq 0x18700
movaps 0x10(%rsp), %xmm3
movzbl %r15b, %ecx
leal (%rcx,%rcx,2), %r15d
addb %al, %r15b
incb %r15b
addq $0x40, %rbp
cmpq $0x140, %rbp # imm = 0x140
jne 0x33ac6
movzbl %r15b, %eax
shll $0x8, %eax
orl $0xf2, %eax
movl %eax, %ecx
andl %ebx, %ecx
imull $0xdb3, %ecx, %ecx # imm = 0xDB3
shrl $0x10, %ecx
subl %ecx, %eax
andl %ebx, %eax
shrl %eax
addl %ecx, %eax
shrl $0x7, %eax
movb %al, 0x20(%r14,%r13)
incq %r13
addq $0x4, %r12
cmpq $0x10, %r13
jne 0x33ac1
movq (%rsp), %r13
xorl %r12d, %r12d
xorl %ebp, %ebp
xorl %r15d, %r15d
movss (%r13,%rbp), %xmm0
mulss %xmm3, %xmm0
callq 0x18700
movaps 0x10(%rsp), %xmm3
movzbl %r15b, %ecx
leal (%rcx,%rcx,2), %r15d
addb %al, %r15b
incb %r15b
addq $0x10, %rbp
cmpq $0x40, %rbp
jne 0x33b37
movzbl %r15b, %eax
leal (%rax,%rax,2), %eax
shll $0x8, %eax
orl $0xf2, %eax
movl %eax, %ecx
andl %ebx, %ecx
imull $0xdb3, %ecx, %ecx # imm = 0xDB3
shrl $0x10, %ecx
subl %ecx, %eax
andl %ebx, %eax
shrl %eax
addl %ecx, %eax
shrl $0x7, %eax
movb %al, 0x30(%r14,%r12)
incq %r12
addq $0x4, %r13
cmpq $0x4, %r12
jne 0x33b32
movq 0x40(%rsp), %rdi
movl $0x400, %eax # imm = 0x400
addq %rax, %rdi
movq 0x38(%rsp), %r8
incq %r8
addq %rax, 0x8(%rsp)
addq %rax, (%rsp)
movq 0x28(%rsp), %rdx
cmpq %rdx, %r8
movaps 0x18456(%rip), %xmm2 # 0x4c020
jne 0x33985
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28006(%rip), %rdi # 0x5bbec
leaq 0x27c17(%rip), %rsi # 0x5b804
leaq 0x28326(%rip), %rcx # 0x5bf1a
movl $0x7ea, %edx # imm = 0x7EA
callq 0x17b00
| quantize_row_tq1_0_ref:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_48], rsi
test dl, dl
jnz loc_33BDF
sar rdx, 8
test rdx, rdx
jle loc_33BD0
lea rax, [rdi+280h]
mov [rsp+78h+var_70], rax
lea rax, [rdi+3C0h]
mov [rsp+78h+var_78], rax
xor r8d, r8d
movaps xmm2, cs:xmmword_4C020
mov ebx, 0FFFFh
mov [rsp+78h+var_50], rdx
loc_33985:
xor eax, eax
xorps xmm0, xmm0
loc_3398A:
movss xmm1, dword ptr [rdi+rax*4]
andps xmm1, xmm2
maxss xmm0, xmm1
inc rax
cmp rax, 100h
jnz short loc_3398A
movss xmm1, cs:dword_4C058
divss xmm1, xmm0
movaps xmm3, xmm0
cmpneqss xmm3, cs:dword_50DC4
andps xmm3, xmm1
movd eax, xmm0
andps xmm0, xmm2
mulss xmm0, cs:dword_4C048
lea ecx, [rax+rax]
mov edx, eax
and edx, 7F800000h
add edx, 7800000h
cmp ecx, 71000000h
mov esi, 40000000h
cmovb edx, esi
mulss xmm0, cs:dword_4C04C
movd xmm1, edx
addss xmm1, xmm0
movd edx, xmm1
mov esi, edx
shr esi, 0Dh
and esi, 7C00h
and edx, 0FFFh
add edx, esi
shr eax, 10h
and eax, 8000h
cmp ecx, 0FF000001h
mov ecx, 7E00h
cmovnb edx, ecx
or edx, eax
mov [rsp+78h+var_40], r8
imul rax, r8, 36h ; '6'
mov rcx, [rsp+78h+var_48]
lea r14, [rcx+rax]
mov [rcx+rax+34h], dx
mov [rsp+78h+var_38], rdi
mov r12, rdi
xor r13d, r13d
movaps [rsp+78h+var_68], xmm3
loc_33A50:
xor ebp, ebp
xor r15d, r15d
loc_33A55:
movss xmm0, dword ptr [r12+rbp]
mulss xmm0, xmm3
call _lroundf
movaps xmm3, [rsp+78h+var_68]
movzx ecx, r15b
lea r15d, [rcx+rcx*2]
add r15b, al
inc r15b
sub rbp, 0FFFFFFFFFFFFFF80h
cmp rbp, 280h
jnz short loc_33A55
movzx eax, r15b
shl eax, 8
or eax, 0F2h
mov ecx, eax
and ecx, ebx
imul ecx, 0DB3h
shr ecx, 10h
sub eax, ecx
and eax, ebx
shr eax, 1
add eax, ecx
shr eax, 7
mov [r14+r13], al
inc r13
add r12, 4
cmp r13, 20h ; ' '
jnz short loc_33A50
mov r12, [rsp+78h+var_70]
xor r13d, r13d
loc_33AC1:
xor ebp, ebp
xor r15d, r15d
loc_33AC6:
movss xmm0, dword ptr [r12+rbp]
mulss xmm0, xmm3
call _lroundf
movaps xmm3, [rsp+78h+var_68]
movzx ecx, r15b
lea r15d, [rcx+rcx*2]
add r15b, al
inc r15b
add rbp, 40h ; '@'
cmp rbp, 140h
jnz short loc_33AC6
movzx eax, r15b
shl eax, 8
or eax, 0F2h
mov ecx, eax
and ecx, ebx
imul ecx, 0DB3h
shr ecx, 10h
sub eax, ecx
and eax, ebx
shr eax, 1
add eax, ecx
shr eax, 7
mov [r14+r13+20h], al
inc r13
add r12, 4
cmp r13, 10h
jnz short loc_33AC1
mov r13, [rsp+78h+var_78]
xor r12d, r12d
loc_33B32:
xor ebp, ebp
xor r15d, r15d
loc_33B37:
movss xmm0, dword ptr [r13+rbp+0]
mulss xmm0, xmm3
call _lroundf
movaps xmm3, [rsp+78h+var_68]
movzx ecx, r15b
lea r15d, [rcx+rcx*2]
add r15b, al
inc r15b
add rbp, 10h
cmp rbp, 40h ; '@'
jnz short loc_33B37
movzx eax, r15b
lea eax, [rax+rax*2]
shl eax, 8
or eax, 0F2h
mov ecx, eax
and ecx, ebx
imul ecx, 0DB3h
shr ecx, 10h
sub eax, ecx
and eax, ebx
shr eax, 1
add eax, ecx
shr eax, 7
mov [r14+r12+30h], al
inc r12
add r13, 4
cmp r12, 4
jnz short loc_33B32
mov rdi, [rsp+78h+var_38]
mov eax, 400h
add rdi, rax
mov r8, [rsp+78h+var_40]
inc r8
add [rsp+78h+var_70], rax
add [rsp+78h+var_78], rax
mov rdx, [rsp+78h+var_50]
cmp r8, rdx
movaps xmm2, cs:xmmword_4C020
jnz loc_33985
loc_33BD0:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_33BDF:
lea rdi, aKQkK0; "k % QK_K == 0"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidQuantizeRo_15; "void quantize_row_tq1_0_ref(const float"...
mov edx, 7EAh
call ___assert_fail
| void quantize_row_tq1_0_ref(long long a1, long long a2, long long a3)
{
long long v3; // rdx
long long v4; // r8
long long v5; // rax
__m128 v6; // xmm0
__m128 v7; // rt1
float v8; // xmm3_4
unsigned int v9; // eax
float v10; // xmm0_4
unsigned int v11; // ecx
unsigned int v12; // edx
__m128i v13; // xmm1
unsigned int v14; // edx
int v15; // edx
int v16; // eax
long long v17; // r14
long long v18; // r12
long long v19; // r13
long long v20; // rbp
unsigned __int8 v21; // r15
char v22; // al
unsigned int v23; // ecx
long long v24; // r12
long long i; // r13
long long v26; // rbp
unsigned __int8 v27; // r15
char v28; // al
unsigned int v29; // ecx
long long v30; // r13
long long j; // r12
long long v32; // rbp
unsigned __int8 v33; // r15
char v34; // al
unsigned int v35; // ecx
long long v36; // [rsp+0h] [rbp-78h]
long long v37; // [rsp+8h] [rbp-70h]
float v38; // [rsp+10h] [rbp-68h]
long long v39; // [rsp+28h] [rbp-50h]
long long v40; // [rsp+38h] [rbp-40h]
if ( (_BYTE)a3 )
__assert_fail(
"k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2026LL,
"void quantize_row_tq1_0_ref(const float *restrict, block_tq1_0 *restrict, int64_t)");
v3 = a3 >> 8;
if ( v3 > 0 )
{
v37 = a1 + 640;
v36 = a1 + 960;
v4 = 0LL;
v39 = v3;
do
{
v5 = 0LL;
v6 = 0LL;
do
v6.m128_f32[0] = fmaxf(v6.m128_f32[0], fabs(*(float *)(a1 + 4 * v5++)));
while ( v5 != 256 );
v7.m128_i32[0] = 0;
LODWORD(v8) = _mm_cmpneq_ss(v6, v7).m128_u32[0] & COERCE_UNSIGNED_INT(1.0 / v6.m128_f32[0]);
v9 = _mm_cvtsi128_si32((__m128i)v6);
v10 = fabs(v6.m128_f32[0]) * 5.1922969e33;
v11 = 2 * v9;
v12 = (v9 & 0x7F800000) + 125829120;
if ( 2 * v9 < 0x71000000 )
v12 = 0x40000000;
v13 = _mm_cvtsi32_si128(v12);
*(float *)v13.m128i_i32 = *(float *)v13.m128i_i32 + (float)(v10 * 7.7037198e-34);
v14 = _mm_cvtsi128_si32(v13);
v15 = ((v14 >> 13) & 0x7C00) + (v14 & 0xFFF);
v16 = HIWORD(v9) & 0x8000;
if ( v11 >= 0xFF000001 )
LOWORD(v15) = 32256;
v40 = v4;
v17 = a2 + 54 * v4;
*(_WORD *)(v17 + 52) = v16 | v15;
v18 = a1;
v19 = 0LL;
v38 = v8;
do
{
v20 = 0LL;
v21 = 0;
do
{
v22 = lroundf(*(float *)(v18 + v20) * v8);
v8 = v38;
v21 = v22 + 3 * v21 + 1;
v20 += 128LL;
}
while ( v20 != 640 );
v23 = (3507 * ((unsigned __int16)(v21 << 8) | 0xF2u)) >> 16;
*(_BYTE *)(v17 + v19++) = (v23 + ((unsigned __int16)(((v21 << 8) | 0xF2) - v23) >> 1)) >> 7;
v18 += 4LL;
}
while ( v19 != 32 );
v24 = v37;
for ( i = 0LL; i != 16; ++i )
{
v26 = 0LL;
v27 = 0;
do
{
v28 = lroundf(*(float *)(v24 + v26) * v8);
v8 = v38;
v27 = v28 + 3 * v27 + 1;
v26 += 64LL;
}
while ( v26 != 320 );
v29 = (3507 * ((unsigned __int16)(v27 << 8) | 0xF2u)) >> 16;
*(_BYTE *)(v17 + i + 32) = (v29 + ((unsigned __int16)(((v27 << 8) | 0xF2) - v29) >> 1)) >> 7;
v24 += 4LL;
}
v30 = v36;
for ( j = 0LL; j != 4; ++j )
{
v32 = 0LL;
v33 = 0;
do
{
v34 = lroundf(*(float *)(v30 + v32) * v8);
v8 = v38;
v33 = v34 + 3 * v33 + 1;
v32 += 16LL;
}
while ( v32 != 64 );
v35 = (3507 * ((unsigned __int16)(768 * v33) | 0xF2u)) >> 16;
*(_BYTE *)(v17 + j + 48) = (v35 + ((unsigned __int16)(((768 * v33) | 0xF2) - v35) >> 1)) >> 7;
v30 += 4LL;
}
a1 += 1024LL;
v4 = v40 + 1;
v37 += 1024LL;
v36 += 1024LL;
}
while ( v40 + 1 != v39 );
}
}
| quantize_row_tq1_0_ref:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP + 0x30],RSI
TEST DL,DL
JNZ 0x00133bdf
SAR RDX,0x8
TEST RDX,RDX
JLE 0x00133bd0
LEA RAX,[RDI + 0x280]
MOV qword ptr [RSP + 0x8],RAX
LEA RAX,[RDI + 0x3c0]
MOV qword ptr [RSP],RAX
XOR R8D,R8D
MOVAPS XMM2,xmmword ptr [0x0014c020]
MOV EBX,0xffff
MOV qword ptr [RSP + 0x28],RDX
LAB_00133985:
XOR EAX,EAX
XORPS XMM0,XMM0
LAB_0013398a:
MOVSS XMM1,dword ptr [RDI + RAX*0x4]
ANDPS XMM1,XMM2
MAXSS XMM0,XMM1
INC RAX
CMP RAX,0x100
JNZ 0x0013398a
MOVSS XMM1,dword ptr [0x0014c058]
DIVSS XMM1,XMM0
MOVAPS XMM3,XMM0
CMPNEQSS XMM3,dword ptr [0x00150dc4]
ANDPS XMM3,XMM1
MOVD EAX,XMM0
ANDPS XMM0,XMM2
MULSS XMM0,dword ptr [0x0014c048]
LEA ECX,[RAX + RAX*0x1]
MOV EDX,EAX
AND EDX,0x7f800000
ADD EDX,0x7800000
CMP ECX,0x71000000
MOV ESI,0x40000000
CMOVC EDX,ESI
MULSS XMM0,dword ptr [0x0014c04c]
MOVD XMM1,EDX
ADDSS XMM1,XMM0
MOVD EDX,XMM1
MOV ESI,EDX
SHR ESI,0xd
AND ESI,0x7c00
AND EDX,0xfff
ADD EDX,ESI
SHR EAX,0x10
AND EAX,0x8000
CMP ECX,0xff000001
MOV ECX,0x7e00
CMOVNC EDX,ECX
OR EDX,EAX
MOV qword ptr [RSP + 0x38],R8
IMUL RAX,R8,0x36
MOV RCX,qword ptr [RSP + 0x30]
LEA R14,[RCX + RAX*0x1]
MOV word ptr [RCX + RAX*0x1 + 0x34],DX
MOV qword ptr [RSP + 0x40],RDI
MOV R12,RDI
XOR R13D,R13D
MOVAPS xmmword ptr [RSP + 0x10],XMM3
LAB_00133a50:
XOR EBP,EBP
XOR R15D,R15D
LAB_00133a55:
MOVSS XMM0,dword ptr [R12 + RBP*0x1]
MULSS XMM0,XMM3
CALL 0x00118700
MOVAPS XMM3,xmmword ptr [RSP + 0x10]
MOVZX ECX,R15B
LEA R15D,[RCX + RCX*0x2]
ADD R15B,AL
INC R15B
SUB RBP,-0x80
CMP RBP,0x280
JNZ 0x00133a55
MOVZX EAX,R15B
SHL EAX,0x8
OR EAX,0xf2
MOV ECX,EAX
AND ECX,EBX
IMUL ECX,ECX,0xdb3
SHR ECX,0x10
SUB EAX,ECX
AND EAX,EBX
SHR EAX,0x1
ADD EAX,ECX
SHR EAX,0x7
MOV byte ptr [R14 + R13*0x1],AL
INC R13
ADD R12,0x4
CMP R13,0x20
JNZ 0x00133a50
MOV R12,qword ptr [RSP + 0x8]
XOR R13D,R13D
LAB_00133ac1:
XOR EBP,EBP
XOR R15D,R15D
LAB_00133ac6:
MOVSS XMM0,dword ptr [R12 + RBP*0x1]
MULSS XMM0,XMM3
CALL 0x00118700
MOVAPS XMM3,xmmword ptr [RSP + 0x10]
MOVZX ECX,R15B
LEA R15D,[RCX + RCX*0x2]
ADD R15B,AL
INC R15B
ADD RBP,0x40
CMP RBP,0x140
JNZ 0x00133ac6
MOVZX EAX,R15B
SHL EAX,0x8
OR EAX,0xf2
MOV ECX,EAX
AND ECX,EBX
IMUL ECX,ECX,0xdb3
SHR ECX,0x10
SUB EAX,ECX
AND EAX,EBX
SHR EAX,0x1
ADD EAX,ECX
SHR EAX,0x7
MOV byte ptr [R14 + R13*0x1 + 0x20],AL
INC R13
ADD R12,0x4
CMP R13,0x10
JNZ 0x00133ac1
MOV R13,qword ptr [RSP]
XOR R12D,R12D
LAB_00133b32:
XOR EBP,EBP
XOR R15D,R15D
LAB_00133b37:
MOVSS XMM0,dword ptr [R13 + RBP*0x1]
MULSS XMM0,XMM3
CALL 0x00118700
MOVAPS XMM3,xmmword ptr [RSP + 0x10]
MOVZX ECX,R15B
LEA R15D,[RCX + RCX*0x2]
ADD R15B,AL
INC R15B
ADD RBP,0x10
CMP RBP,0x40
JNZ 0x00133b37
MOVZX EAX,R15B
LEA EAX,[RAX + RAX*0x2]
SHL EAX,0x8
OR EAX,0xf2
MOV ECX,EAX
AND ECX,EBX
IMUL ECX,ECX,0xdb3
SHR ECX,0x10
SUB EAX,ECX
AND EAX,EBX
SHR EAX,0x1
ADD EAX,ECX
SHR EAX,0x7
MOV byte ptr [R14 + R12*0x1 + 0x30],AL
INC R12
ADD R13,0x4
CMP R12,0x4
JNZ 0x00133b32
MOV RDI,qword ptr [RSP + 0x40]
MOV EAX,0x400
ADD RDI,RAX
MOV R8,qword ptr [RSP + 0x38]
INC R8
ADD qword ptr [RSP + 0x8],RAX
ADD qword ptr [RSP],RAX
MOV RDX,qword ptr [RSP + 0x28]
CMP R8,RDX
MOVAPS XMM2,xmmword ptr [0x0014c020]
JNZ 0x00133985
LAB_00133bd0:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00133bdf:
LEA RDI,[0x15bbec]
LEA RSI,[0x15b804]
LEA RCX,[0x15bf1a]
MOV EDX,0x7ea
CALL 0x00117b00
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void quantize_row_tq1_0_ref(long param_1,long param_2,long param_3)
{
long lVar1;
long lVar2;
uint uVar3;
uint uVar4;
ushort uVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
byte bVar10;
float fVar11;
float fVar12;
float fVar13;
long local_78;
long local_70;
if ((char)param_3 == '\0') {
if (0 < param_3 >> 8) {
local_70 = param_1 + 0x280;
local_78 = param_1 + 0x3c0;
lVar7 = 0;
do {
lVar1 = 0;
fVar11 = 0.0;
do {
fVar12 = (float)(*(uint *)(param_1 + lVar1 * 4) & _DAT_0014c020);
if (fVar11 <= fVar12) {
fVar11 = fVar12;
}
lVar1 = lVar1 + 1;
} while (lVar1 != 0x100);
fVar13 = (float)(-(uint)(fVar11 != DAT_00150dc4) & (uint)(DAT_0014c058 / fVar11));
fVar12 = (float)(((uint)fVar11 & 0x7f800000) + 0x7800000);
if ((uint)((int)fVar11 * 2) < 0x71000000) {
fVar12 = 2.0;
}
fVar12 = fVar12 + (float)((uint)fVar11 & _DAT_0014c020) * DAT_0014c048 * DAT_0014c04c;
uVar5 = (SUB42(fVar12,0) & 0xfff) + ((ushort)((uint)fVar12 >> 0xd) & 0x7c00);
if (0xff000000 < (uint)((int)fVar11 * 2)) {
uVar5 = 0x7e00;
}
lVar1 = param_2 + lVar7 * 0x36;
*(ushort *)(param_2 + 0x34 + lVar7 * 0x36) = uVar5 | (ushort)((uint)fVar11 >> 0x10) & 0x8000
;
lVar9 = 0;
lVar8 = param_1;
do {
lVar6 = 0;
bVar10 = 0;
do {
lVar2 = lroundf(*(float *)(lVar8 + lVar6) * fVar13);
bVar10 = bVar10 * '\x03' + (char)lVar2 + 1;
lVar6 = lVar6 + 0x80;
} while (lVar6 != 0x280);
uVar3 = ((uint)bVar10 << 8 | 0xf2) * 0xdb3 >> 0x10;
*(char *)(lVar1 + lVar9) =
(char)(((((uint)bVar10 << 8 | 0xf2) - uVar3 & 0xffff) >> 1) + uVar3 >> 7);
lVar9 = lVar9 + 1;
lVar8 = lVar8 + 4;
} while (lVar9 != 0x20);
lVar9 = 0;
lVar8 = local_70;
do {
lVar6 = 0;
bVar10 = 0;
do {
lVar2 = lroundf(*(float *)(lVar8 + lVar6) * fVar13);
bVar10 = bVar10 * '\x03' + (char)lVar2 + 1;
lVar6 = lVar6 + 0x40;
} while (lVar6 != 0x140);
uVar3 = ((uint)bVar10 << 8 | 0xf2) * 0xdb3 >> 0x10;
*(char *)(lVar1 + 0x20 + lVar9) =
(char)(((((uint)bVar10 << 8 | 0xf2) - uVar3 & 0xffff) >> 1) + uVar3 >> 7);
lVar9 = lVar9 + 1;
lVar8 = lVar8 + 4;
} while (lVar9 != 0x10);
lVar9 = 0;
lVar8 = local_78;
do {
lVar6 = 0;
bVar10 = 0;
do {
lVar2 = lroundf(*(float *)(lVar8 + lVar6) * fVar13);
bVar10 = bVar10 * '\x03' + (char)lVar2 + 1;
lVar6 = lVar6 + 0x10;
} while (lVar6 != 0x40);
uVar3 = ((uint)bVar10 + (uint)bVar10 * 2) * 0x100;
uVar4 = (uVar3 & 0xffff | 0xf2) * 0xdb3 >> 0x10;
*(char *)(lVar1 + 0x30 + lVar9) =
(char)((((uVar3 | 0xf2) - uVar4 & 0xffff) >> 1) + uVar4 >> 7);
lVar9 = lVar9 + 1;
lVar8 = lVar8 + 4;
} while (lVar9 != 4);
param_1 = param_1 + 0x400;
lVar7 = lVar7 + 1;
local_70 = local_70 + 0x400;
local_78 = local_78 + 0x400;
} while (lVar7 != param_3 >> 8);
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x7ea,
"void quantize_row_tq1_0_ref(const float *restrict, block_tq1_0 *restrict, int64_t)"
);
}
| |
42,350 | quantize_row_tq1_0_ref | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | void quantize_row_tq1_0_ref(const float * restrict x, block_tq1_0 * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
for (int64_t i = 0; i < nb; i++) {
float amax = 0.0f; // absolute max
for (int j = 0; j < QK_K; j++) {
const float v = x[j];
amax = MAX(amax, fabsf(v));
}
const float d = amax;
const float id = d ? 1.0f/d : 0.0f;
y[i].d = GGML_FP32_TO_FP16(d);
// 5 elements per byte, along 32 bytes
for (size_t j = 0; j < sizeof(y->qs) - sizeof(y->qs) % 32; j += 32) {
for (size_t m = 0; m < 32; ++m) {
uint8_t q = 0;
for (size_t n = 0; n < 5; ++n) {
int xi = lroundf(x[m + n*32] * id) + 1; // -1, 0, 1 -> 0, 1, 2
q *= 3;
q += xi;
}
// ceiling division (243 == pow(3, 5))
q = ((uint16_t)q * 256 + (243 - 1)) / 243;
y[i].qs[j + m] = q;
}
x += 5*32;
}
// along 16 bytes
for (size_t j = sizeof(y->qs) - sizeof(y->qs) % 32; j < sizeof(y->qs); j += 16) {
for (size_t m = 0; m < 16; ++m) {
uint8_t q = 0;
for (size_t n = 0; n < 5; ++n) {
int xi = lroundf(x[m + n*16] * id) + 1; // -1, 0, 1 -> 0, 1, 2
q *= 3;
q += xi;
}
// ceiling division (243 == pow(3, 5))
q = ((uint16_t)q * 256 + (243 - 1)) / 243;
y[i].qs[j + m] = q;
}
x += 5*16;
}
// 4 elements per byte
for (size_t j = 0; j < sizeof(y->qh); ++j) {
uint8_t q = 0;
for (size_t m = 0; m < 4; ++m) {
// -1, 0, 1 -> 0, 1, 2
int xi = lroundf(x[j + m*sizeof(y->qh)] * id) + 1;
q *= 3;
q += xi;
}
// shift the first value to the most significant trit
q *= 3;
// ceiling division (243 == pow(3, 5))
q = ((uint16_t)q * 256 + (243 - 1)) / 243;
y[i].qh[j] = q;
}
x += 4*sizeof(y->qh);
}
} | O2 | c | quantize_row_tq1_0_ref:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x20(%rsp)
testb %dl, %dl
jne 0x37249
movq %rdi, %r15
sarq $0x8, %rdx
xorl %eax, %eax
testq %rdx, %rdx
cmovleq %rax, %rdx
xorl %ebx, %ebx
movq %rdx, 0x18(%rsp)
cmpq %rdx, %rbx
je 0x3723a
xorps %xmm0, %xmm0
xorl %eax, %eax
cmpq $0x100, %rax # imm = 0x100
je 0x3708d
movss (%r15,%rax,4), %xmm1
andps 0x16f9c(%rip), %xmm1 # 0x4e020
maxss %xmm1, %xmm0
incq %rax
jmp 0x3706f
movss 0x16fcb(%rip), %xmm1 # 0x4e060
divss %xmm0, %xmm1
movaps %xmm0, %xmm2
cmpneqss 0x1bf83(%rip), %xmm2 # 0x53028
andps %xmm1, %xmm2
movaps %xmm2, (%rsp)
callq 0x31de9
movq %rbx, 0x28(%rsp)
imulq $0x36, %rbx, %rcx
movq 0x20(%rsp), %rdx
leaq (%rdx,%rcx), %rbx
movw %ax, 0x34(%rdx,%rcx)
movb $0x1, %al
testb $0x1, %al
je 0x3713f
movq %r15, %rbp
movq %r15, %r14
xorl %r15d, %r15d
cmpq $0x20, %r15
je 0x37131
xorl %r13d, %r13d
xorl %ecx, %ecx
movzbl %cl, %r12d
cmpq $0x280, %r13 # imm = 0x280
je 0x3710d
movss (%r14,%r13), %xmm0
mulss (%rsp), %xmm0
callq 0x1f130
leal (%r12,%r12,2), %ecx
addb %al, %cl
incb %cl
subq $-0x80, %r13
jmp 0x370e2
shll $0x8, %r12d
orl $0xf2, %r12d
movl %r12d, %eax
xorl %edx, %edx
movw $0xf3, %cx
divw %cx
movb %al, (%rbx,%r15)
incq %r15
addq $0x4, %r14
jmp 0x370d7
movq %rbp, %r15
addq $0x280, %r15 # imm = 0x280
xorl %eax, %eax
jmp 0x370ca
pushq $0x20
popq %r14
cmpq $0x2f, %r14
ja 0x371c1
movq %r15, 0x30(%rsp)
xorl %r13d, %r13d
cmpq $0x10, %r13
je 0x371af
xorl %ebp, %ebp
xorl %ecx, %ecx
movzbl %cl, %r12d
cmpq $0x140, %rbp # imm = 0x140
je 0x37186
movss (%r15,%rbp), %xmm0
mulss (%rsp), %xmm0
callq 0x1f130
leal (%r12,%r12,2), %ecx
addb %al, %cl
incb %cl
addq $0x40, %rbp
jmp 0x3715b
shll $0x8, %r12d
orl $0xf2, %r12d
movl %r12d, %eax
xorl %edx, %edx
movw $0xf3, %cx
divw %cx
movq %r13, %rcx
orq %r14, %rcx
movb %al, (%rbx,%rcx)
incq %r13
addq $0x4, %r15
jmp 0x37151
movq 0x30(%rsp), %r15
addq $0x140, %r15 # imm = 0x140
addq $0x10, %r14
jmp 0x37143
movq %r15, %rbp
movq %r15, %r14
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x37221
xorl %r12d, %r12d
xorl %ecx, %ecx
movzbl %cl, %r13d
cmpq $0x40, %r12
je 0x371fe
movss (%r14,%r12), %xmm0
mulss (%rsp), %xmm0
callq 0x1f130
leal (%r13,%r13,2), %ecx
addb %al, %cl
incb %cl
addq $0x10, %r12
jmp 0x371d5
imull $0x300, %r13d, %eax # imm = 0x300
orl $0xf2, %eax
xorl %edx, %edx
movw $0xf3, %cx
divw %cx
movb %al, 0x30(%rbx,%r15)
incq %r15
addq $0x4, %r14
jmp 0x371ca
movq %rbp, %r15
addq $0x40, %r15
movq 0x28(%rsp), %rbx
incq %rbx
movq 0x18(%rsp), %rdx
jmp 0x37061
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x26bfc(%rip), %rdi # 0x5de4c
leaq 0x2680d(%rip), %rsi # 0x5da64
leaq 0x26f1c(%rip), %rcx # 0x5e17a
movl $0x7ea, %edx # imm = 0x7EA
callq 0x1dfb0
| quantize_row_tq1_0_ref:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rsp+68h+var_48], rsi
test dl, dl
jnz loc_37249
mov r15, rdi
sar rdx, 8
xor eax, eax
test rdx, rdx
cmovle rdx, rax
xor ebx, ebx
mov [rsp+68h+var_50], rdx
loc_37061:
cmp rbx, rdx
jz loc_3723A
xorps xmm0, xmm0
xor eax, eax
loc_3706F:
cmp rax, 100h
jz short loc_3708D
movss xmm1, dword ptr [r15+rax*4]
andps xmm1, cs:xmmword_4E020
maxss xmm0, xmm1
inc rax
jmp short loc_3706F
loc_3708D:
movss xmm1, cs:dword_4E060
divss xmm1, xmm0
movaps xmm2, xmm0
cmpneqss xmm2, cs:dword_53028
andps xmm2, xmm1
movaps [rsp+68h+var_68], xmm2
call ggml_compute_fp32_to_fp16_0
mov [rsp+68h+var_40], rbx
imul rcx, rbx, 36h ; '6'
mov rdx, [rsp+68h+var_48]
lea rbx, [rdx+rcx]
mov [rdx+rcx+34h], ax
mov al, 1
loc_370CA:
test al, 1
jz short loc_3713F
mov rbp, r15
mov r14, r15
xor r15d, r15d
loc_370D7:
cmp r15, 20h ; ' '
jz short loc_37131
xor r13d, r13d
xor ecx, ecx
loc_370E2:
movzx r12d, cl
cmp r13, 280h
jz short loc_3710D
movss xmm0, dword ptr [r14+r13]
mulss xmm0, dword ptr [rsp+68h+var_68]
call _lroundf
lea ecx, [r12+r12*2]
add cl, al
inc cl
sub r13, 0FFFFFFFFFFFFFF80h
jmp short loc_370E2
loc_3710D:
shl r12d, 8
or r12d, 0F2h
mov eax, r12d
xor edx, edx
mov cx, 0F3h
div cx
mov [rbx+r15], al
inc r15
add r14, 4
jmp short loc_370D7
loc_37131:
mov r15, rbp
add r15, 280h
xor eax, eax
jmp short loc_370CA
loc_3713F:
push 20h ; ' '
pop r14
loc_37143:
cmp r14, 2Fh ; '/'
ja short loc_371C1
mov [rsp+68h+var_38], r15
xor r13d, r13d
loc_37151:
cmp r13, 10h
jz short loc_371AF
xor ebp, ebp
xor ecx, ecx
loc_3715B:
movzx r12d, cl
cmp rbp, 140h
jz short loc_37186
movss xmm0, dword ptr [r15+rbp]
mulss xmm0, dword ptr [rsp+68h+var_68]
call _lroundf
lea ecx, [r12+r12*2]
add cl, al
inc cl
add rbp, 40h ; '@'
jmp short loc_3715B
loc_37186:
shl r12d, 8
or r12d, 0F2h
mov eax, r12d
xor edx, edx
mov cx, 0F3h
div cx
mov rcx, r13
or rcx, r14
mov [rbx+rcx], al
inc r13
add r15, 4
jmp short loc_37151
loc_371AF:
mov r15, [rsp+68h+var_38]
add r15, 140h
add r14, 10h
jmp short loc_37143
loc_371C1:
mov rbp, r15
mov r14, r15
xor r15d, r15d
loc_371CA:
cmp r15, 4
jz short loc_37221
xor r12d, r12d
xor ecx, ecx
loc_371D5:
movzx r13d, cl
cmp r12, 40h ; '@'
jz short loc_371FE
movss xmm0, dword ptr [r14+r12]
mulss xmm0, dword ptr [rsp+68h+var_68]
call _lroundf
lea ecx, [r13+r13*2+0]
add cl, al
inc cl
add r12, 10h
jmp short loc_371D5
loc_371FE:
imul eax, r13d, 300h
or eax, 0F2h
xor edx, edx
mov cx, 0F3h
div cx
mov [rbx+r15+30h], al
inc r15
add r14, 4
jmp short loc_371CA
loc_37221:
mov r15, rbp
add r15, 40h ; '@'
mov rbx, [rsp+68h+var_40]
inc rbx
mov rdx, [rsp+68h+var_50]
jmp loc_37061
loc_3723A:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_37249:
lea rdi, aKQkK0; "k % QK_K == 0"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidQuantizeRo_15; "void quantize_row_tq1_0_ref(const float"...
mov edx, 7EAh
call ___assert_fail
| char quantize_row_tq1_0_ref(long long a1, long long a2, long long a3)
{
long long v4; // rdx
__int16 v5; // ax
long long v6; // rbx
__m128 v7; // xmm0
long long i; // rax
__m128 v9; // rt1
long long v10; // rbx
long long v11; // rbp
long long v12; // r14
long long j; // r15
long long v14; // r13
unsigned __int8 v15; // cl
unsigned long long k; // r14
long long m; // r13
long long v18; // rbp
unsigned __int8 v19; // cl
long long v20; // rbp
long long v21; // r14
long long n; // r15
long long v23; // r12
unsigned __int8 v24; // cl
float v26; // [rsp+0h] [rbp-68h]
long long v27; // [rsp+18h] [rbp-50h]
long long v28; // [rsp+28h] [rbp-40h]
long long v29; // [rsp+30h] [rbp-38h]
if ( (_BYTE)a3 )
__assert_fail(
"k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2026LL,
"void quantize_row_tq1_0_ref(const float *restrict, block_tq1_0 *restrict, int64_t)");
v4 = a3 >> 8;
LOBYTE(v5) = 0;
if ( v4 <= 0 )
v4 = 0LL;
v6 = 0LL;
v27 = v4;
while ( v6 != v4 )
{
v7 = 0LL;
for ( i = 0LL; i != 256; ++i )
v7.m128_f32[0] = fmaxf(v7.m128_f32[0], fabs(*(float *)(a1 + 4 * i)));
v9.m128_i32[0] = 0;
LODWORD(v26) = _mm_cmpneq_ss(v7, v9).m128_u32[0] & COERCE_UNSIGNED_INT(1.0 / v7.m128_f32[0]);
v28 = v6;
v10 = a2 + 54 * v6;
*(_WORD *)(v10 + 52) = ggml_compute_fp32_to_fp16_0((__m128i)v7);
LOBYTE(v5) = 1;
while ( (v5 & 1) != 0 )
{
v11 = a1;
v12 = a1;
for ( j = 0LL; j != 32; ++j )
{
v14 = 0LL;
v15 = 0;
while ( v14 != 640 )
{
v15 = lroundf(*(float *)(v12 + v14) * v26) + 3 * v15 + 1;
v14 += 128LL;
}
*(_BYTE *)(v10 + j) = ((unsigned __int16)(v15 << 8) | 0xF2u) / 0xF3;
v12 += 4LL;
}
a1 = v11 + 640;
LOBYTE(v5) = 0;
}
for ( k = 32LL; k <= 0x2F; k += 16LL )
{
v29 = a1;
for ( m = 0LL; m != 16; ++m )
{
v18 = 0LL;
v19 = 0;
while ( v18 != 320 )
{
v19 = lroundf(*(float *)(a1 + v18) * v26) + 3 * v19 + 1;
v18 += 64LL;
}
v5 = ((unsigned __int16)(v19 << 8) | 0xF2u) / 0xF3;
*(_BYTE *)(v10 + (k | m)) = v5;
a1 += 4LL;
}
a1 = v29 + 320;
}
v20 = a1;
v21 = a1;
for ( n = 0LL; n != 4; ++n )
{
v23 = 0LL;
v24 = 0;
while ( v23 != 64 )
{
v24 = lroundf(*(float *)(v21 + v23) * v26) + 3 * v24 + 1;
v23 += 16LL;
}
v5 = ((unsigned __int16)(768 * v24) | 0xF2u) / 0xF3;
*(_BYTE *)(v10 + n + 48) = v5;
v21 += 4LL;
}
a1 = v20 + 64;
v6 = v28 + 1;
v4 = v27;
}
return v5;
}
| quantize_row_tq1_0_ref:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RSP + 0x20],RSI
TEST DL,DL
JNZ 0x00137249
MOV R15,RDI
SAR RDX,0x8
XOR EAX,EAX
TEST RDX,RDX
CMOVLE RDX,RAX
XOR EBX,EBX
MOV qword ptr [RSP + 0x18],RDX
LAB_00137061:
CMP RBX,RDX
JZ 0x0013723a
XORPS XMM0,XMM0
XOR EAX,EAX
LAB_0013706f:
CMP RAX,0x100
JZ 0x0013708d
MOVSS XMM1,dword ptr [R15 + RAX*0x4]
ANDPS XMM1,xmmword ptr [0x0014e020]
MAXSS XMM0,XMM1
INC RAX
JMP 0x0013706f
LAB_0013708d:
MOVSS XMM1,dword ptr [0x0014e060]
DIVSS XMM1,XMM0
MOVAPS XMM2,XMM0
CMPNEQSS XMM2,dword ptr [0x00153028]
ANDPS XMM2,XMM1
MOVAPS xmmword ptr [RSP],XMM2
CALL 0x00131de9
MOV qword ptr [RSP + 0x28],RBX
IMUL RCX,RBX,0x36
MOV RDX,qword ptr [RSP + 0x20]
LEA RBX,[RDX + RCX*0x1]
MOV word ptr [RDX + RCX*0x1 + 0x34],AX
MOV AL,0x1
LAB_001370ca:
TEST AL,0x1
JZ 0x0013713f
MOV RBP,R15
MOV R14,R15
XOR R15D,R15D
LAB_001370d7:
CMP R15,0x20
JZ 0x00137131
XOR R13D,R13D
XOR ECX,ECX
LAB_001370e2:
MOVZX R12D,CL
CMP R13,0x280
JZ 0x0013710d
MOVSS XMM0,dword ptr [R14 + R13*0x1]
MULSS XMM0,dword ptr [RSP]
CALL 0x0011f130
LEA ECX,[R12 + R12*0x2]
ADD CL,AL
INC CL
SUB R13,-0x80
JMP 0x001370e2
LAB_0013710d:
SHL R12D,0x8
OR R12D,0xf2
MOV EAX,R12D
XOR EDX,EDX
MOV CX,0xf3
DIV CX
MOV byte ptr [RBX + R15*0x1],AL
INC R15
ADD R14,0x4
JMP 0x001370d7
LAB_00137131:
MOV R15,RBP
ADD R15,0x280
XOR EAX,EAX
JMP 0x001370ca
LAB_0013713f:
PUSH 0x20
POP R14
LAB_00137143:
CMP R14,0x2f
JA 0x001371c1
MOV qword ptr [RSP + 0x30],R15
XOR R13D,R13D
LAB_00137151:
CMP R13,0x10
JZ 0x001371af
XOR EBP,EBP
XOR ECX,ECX
LAB_0013715b:
MOVZX R12D,CL
CMP RBP,0x140
JZ 0x00137186
MOVSS XMM0,dword ptr [R15 + RBP*0x1]
MULSS XMM0,dword ptr [RSP]
CALL 0x0011f130
LEA ECX,[R12 + R12*0x2]
ADD CL,AL
INC CL
ADD RBP,0x40
JMP 0x0013715b
LAB_00137186:
SHL R12D,0x8
OR R12D,0xf2
MOV EAX,R12D
XOR EDX,EDX
MOV CX,0xf3
DIV CX
MOV RCX,R13
OR RCX,R14
MOV byte ptr [RBX + RCX*0x1],AL
INC R13
ADD R15,0x4
JMP 0x00137151
LAB_001371af:
MOV R15,qword ptr [RSP + 0x30]
ADD R15,0x140
ADD R14,0x10
JMP 0x00137143
LAB_001371c1:
MOV RBP,R15
MOV R14,R15
XOR R15D,R15D
LAB_001371ca:
CMP R15,0x4
JZ 0x00137221
XOR R12D,R12D
XOR ECX,ECX
LAB_001371d5:
MOVZX R13D,CL
CMP R12,0x40
JZ 0x001371fe
MOVSS XMM0,dword ptr [R14 + R12*0x1]
MULSS XMM0,dword ptr [RSP]
CALL 0x0011f130
LEA ECX,[R13 + R13*0x2]
ADD CL,AL
INC CL
ADD R12,0x10
JMP 0x001371d5
LAB_001371fe:
IMUL EAX,R13D,0x300
OR EAX,0xf2
XOR EDX,EDX
MOV CX,0xf3
DIV CX
MOV byte ptr [RBX + R15*0x1 + 0x30],AL
INC R15
ADD R14,0x4
JMP 0x001371ca
LAB_00137221:
MOV R15,RBP
ADD R15,0x40
MOV RBX,qword ptr [RSP + 0x28]
INC RBX
MOV RDX,qword ptr [RSP + 0x18]
JMP 0x00137061
LAB_0013723a:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00137249:
LEA RDI,[0x15de4c]
LEA RSI,[0x15da64]
LEA RCX,[0x15e17a]
MOV EDX,0x7ea
CALL 0x0011dfb0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void quantize_row_tq1_0_ref(long param_1,long param_2,long param_3)
{
bool bVar1;
int2 uVar2;
long lVar3;
long lVar4;
byte bVar5;
uint uVar6;
long lVar7;
long lVar8;
long lVar9;
ulong uVar10;
long lVar11;
ulong uVar12;
long lVar13;
float fVar14;
float fVar15;
if ((char)param_3 == '\0') {
lVar7 = param_3 >> 8;
if (param_3 >> 8 < 1) {
lVar7 = 0;
}
for (lVar8 = 0; lVar8 != lVar7; lVar8 = lVar8 + 1) {
fVar14 = 0.0;
for (lVar3 = 0; lVar3 != 0x100; lVar3 = lVar3 + 1) {
fVar15 = (float)(*(uint *)(param_1 + lVar3 * 4) & _DAT_0014e020);
if (fVar14 <= fVar15) {
fVar14 = fVar15;
}
}
fVar14 = (float)(-(uint)(fVar14 != DAT_00153028) & (uint)(DAT_0014e060 / fVar14));
uVar2 = ggml_compute_fp32_to_fp16();
lVar3 = param_2 + lVar8 * 0x36;
*(int2 *)(param_2 + 0x34 + lVar8 * 0x36) = uVar2;
bVar1 = true;
while (bVar1) {
lVar11 = param_1;
for (lVar13 = 0; lVar13 != 0x20; lVar13 = lVar13 + 1) {
uVar6 = 0;
for (lVar9 = 0; lVar9 != 0x280; lVar9 = lVar9 + 0x80) {
lVar4 = lroundf(*(float *)(lVar11 + lVar9) * fVar14);
uVar6 = (uint)(byte)((char)uVar6 * '\x03' + (char)lVar4 + 1);
}
*(char *)(lVar3 + lVar13) = (char)((ushort)((ushort)(uVar6 << 8) | 0xf2) / 0xf3);
lVar11 = lVar11 + 4;
}
param_1 = param_1 + 0x280;
bVar1 = false;
}
for (uVar12 = 0x20; uVar12 < 0x30; uVar12 = uVar12 + 0x10) {
lVar11 = param_1;
for (uVar10 = 0; uVar10 != 0x10; uVar10 = uVar10 + 1) {
bVar5 = 0;
for (lVar13 = 0; lVar13 != 0x140; lVar13 = lVar13 + 0x40) {
lVar9 = lroundf(*(float *)(lVar11 + lVar13) * fVar14);
bVar5 = bVar5 * '\x03' + (char)lVar9 + 1;
}
*(char *)(lVar3 + (uVar10 | uVar12)) = (char)((ushort)((ushort)bVar5 << 8 | 0xf2) / 0xf3);
lVar11 = lVar11 + 4;
}
param_1 = param_1 + 0x140;
}
lVar11 = param_1;
for (lVar13 = 0; lVar13 != 4; lVar13 = lVar13 + 1) {
uVar6 = 0;
for (lVar9 = 0; lVar9 != 0x40; lVar9 = lVar9 + 0x10) {
lVar4 = lroundf(*(float *)(lVar11 + lVar9) * fVar14);
uVar6 = (uint)(byte)((char)uVar6 * '\x03' + (char)lVar4 + 1);
}
*(char *)(lVar3 + 0x30 + lVar13) = (char)((uVar6 * 0x300 & 0xffff | 0xf2) / 0xf3);
lVar11 = lVar11 + 4;
}
param_1 = param_1 + 0x40;
}
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"
,0x7ea,
"void quantize_row_tq1_0_ref(const float *restrict, block_tq1_0 *restrict, int64_t)"
);
}
| |
42,351 | quantize_row_tq1_0_ref | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | void quantize_row_tq1_0_ref(const float * restrict x, block_tq1_0 * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
for (int64_t i = 0; i < nb; i++) {
float amax = 0.0f; // absolute max
for (int j = 0; j < QK_K; j++) {
const float v = x[j];
amax = MAX(amax, fabsf(v));
}
const float d = amax;
const float id = d ? 1.0f/d : 0.0f;
y[i].d = GGML_FP32_TO_FP16(d);
// 5 elements per byte, along 32 bytes
for (size_t j = 0; j < sizeof(y->qs) - sizeof(y->qs) % 32; j += 32) {
for (size_t m = 0; m < 32; ++m) {
uint8_t q = 0;
for (size_t n = 0; n < 5; ++n) {
int xi = lroundf(x[m + n*32] * id) + 1; // -1, 0, 1 -> 0, 1, 2
q *= 3;
q += xi;
}
// ceiling division (243 == pow(3, 5))
q = ((uint16_t)q * 256 + (243 - 1)) / 243;
y[i].qs[j + m] = q;
}
x += 5*32;
}
// along 16 bytes
for (size_t j = sizeof(y->qs) - sizeof(y->qs) % 32; j < sizeof(y->qs); j += 16) {
for (size_t m = 0; m < 16; ++m) {
uint8_t q = 0;
for (size_t n = 0; n < 5; ++n) {
int xi = lroundf(x[m + n*16] * id) + 1; // -1, 0, 1 -> 0, 1, 2
q *= 3;
q += xi;
}
// ceiling division (243 == pow(3, 5))
q = ((uint16_t)q * 256 + (243 - 1)) / 243;
y[i].qs[j + m] = q;
}
x += 5*16;
}
// 4 elements per byte
for (size_t j = 0; j < sizeof(y->qh); ++j) {
uint8_t q = 0;
for (size_t m = 0; m < 4; ++m) {
// -1, 0, 1 -> 0, 1, 2
int xi = lroundf(x[j + m*sizeof(y->qh)] * id) + 1;
q *= 3;
q += xi;
}
// shift the first value to the most significant trit
q *= 3;
// ceiling division (243 == pow(3, 5))
q = ((uint16_t)q * 256 + (243 - 1)) / 243;
y[i].qh[j] = q;
}
x += 4*sizeof(y->qh);
}
} | O3 | c | quantize_row_tq1_0_ref:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, 0x30(%rsp)
testb %dl, %dl
jne 0x32cf3
sarq $0x8, %rdx
testq %rdx, %rdx
jle 0x32ce4
leaq 0x280(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x3c0(%rdi), %rax
movq %rax, (%rsp)
xorl %r8d, %r8d
movaps 0x19591(%rip), %xmm2 # 0x4c020
movl $0xffff, %ebx # imm = 0xFFFF
movq %rdx, 0x28(%rsp)
xorl %eax, %eax
xorps %xmm0, %xmm0
movss (%rdi,%rax,4), %xmm1
andps %xmm2, %xmm1
maxss %xmm1, %xmm0
incq %rax
cmpq $0x100, %rax # imm = 0x100
jne 0x32a9e
movss 0x19633(%rip), %xmm1 # 0x4c0f0
divss %xmm0, %xmm1
movaps %xmm0, %xmm3
cmpneqss 0x1e7f7(%rip), %xmm3 # 0x512c4
andps %xmm1, %xmm3
movd %xmm0, %eax
andps %xmm2, %xmm0
mulss 0x19609(%rip), %xmm0 # 0x4c0e8
leal (%rax,%rax), %ecx
movl %eax, %edx
andl $0x7f800000, %edx # imm = 0x7F800000
addl $0x7800000, %edx # imm = 0x7800000
cmpl $0x71000000, %ecx # imm = 0x71000000
movl $0x40000000, %esi # imm = 0x40000000
cmovbl %esi, %edx
mulss 0x195e6(%rip), %xmm0 # 0x4c0ec
movd %edx, %xmm1
addss %xmm0, %xmm1
movd %xmm1, %edx
movl %edx, %esi
shrl $0xd, %esi
andl $0x7c00, %esi # imm = 0x7C00
andl $0xfff, %edx # imm = 0xFFF
addl %esi, %edx
shrl $0x10, %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0xff000001, %ecx # imm = 0xFF000001
movl $0x7e00, %ecx # imm = 0x7E00
cmovael %ecx, %edx
orl %eax, %edx
movq %r8, 0x38(%rsp)
imulq $0x36, %r8, %rax
movq 0x30(%rsp), %rcx
leaq (%rcx,%rax), %r14
movw %dx, 0x34(%rcx,%rax)
movq %rdi, 0x40(%rsp)
movq %rdi, %r12
xorl %r13d, %r13d
movaps %xmm3, 0x10(%rsp)
xorl %ebp, %ebp
xorl %r15d, %r15d
movss (%r12,%rbp), %xmm0
mulss %xmm3, %xmm0
callq 0x176f0
movaps 0x10(%rsp), %xmm3
movzbl %r15b, %ecx
leal (%rcx,%rcx,2), %r15d
addb %al, %r15b
incb %r15b
subq $-0x80, %rbp
cmpq $0x280, %rbp # imm = 0x280
jne 0x32b69
movzbl %r15b, %eax
shll $0x8, %eax
orl $0xf2, %eax
movl %eax, %ecx
andl %ebx, %ecx
imull $0xdb3, %ecx, %ecx # imm = 0xDB3
shrl $0x10, %ecx
subl %ecx, %eax
andl %ebx, %eax
shrl %eax
addl %ecx, %eax
shrl $0x7, %eax
movb %al, (%r14,%r13)
incq %r13
addq $0x4, %r12
cmpq $0x20, %r13
jne 0x32b64
movq 0x8(%rsp), %r12
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r15d, %r15d
movss (%r12,%rbp), %xmm0
mulss %xmm3, %xmm0
callq 0x176f0
movaps 0x10(%rsp), %xmm3
movzbl %r15b, %ecx
leal (%rcx,%rcx,2), %r15d
addb %al, %r15b
incb %r15b
addq $0x40, %rbp
cmpq $0x140, %rbp # imm = 0x140
jne 0x32bda
movzbl %r15b, %eax
shll $0x8, %eax
orl $0xf2, %eax
movl %eax, %ecx
andl %ebx, %ecx
imull $0xdb3, %ecx, %ecx # imm = 0xDB3
shrl $0x10, %ecx
subl %ecx, %eax
andl %ebx, %eax
shrl %eax
addl %ecx, %eax
shrl $0x7, %eax
movb %al, 0x20(%r14,%r13)
incq %r13
addq $0x4, %r12
cmpq $0x10, %r13
jne 0x32bd5
movq (%rsp), %r13
xorl %r12d, %r12d
xorl %ebp, %ebp
xorl %r15d, %r15d
movss (%r13,%rbp), %xmm0
mulss %xmm3, %xmm0
callq 0x176f0
movaps 0x10(%rsp), %xmm3
movzbl %r15b, %ecx
leal (%rcx,%rcx,2), %r15d
addb %al, %r15b
incb %r15b
addq $0x10, %rbp
cmpq $0x40, %rbp
jne 0x32c4b
movzbl %r15b, %eax
leal (%rax,%rax,2), %eax
shll $0x8, %eax
orl $0xf2, %eax
movl %eax, %ecx
andl %ebx, %ecx
imull $0xdb3, %ecx, %ecx # imm = 0xDB3
shrl $0x10, %ecx
subl %ecx, %eax
andl %ebx, %eax
shrl %eax
addl %ecx, %eax
shrl $0x7, %eax
movb %al, 0x30(%r14,%r12)
incq %r12
addq $0x4, %r13
cmpq $0x4, %r12
jne 0x32c46
movq 0x40(%rsp), %rdi
movl $0x400, %eax # imm = 0x400
addq %rax, %rdi
movq 0x38(%rsp), %r8
incq %r8
addq %rax, 0x8(%rsp)
addq %rax, (%rsp)
movq 0x28(%rsp), %rdx
cmpq %rdx, %r8
movaps 0x19342(%rip), %xmm2 # 0x4c020
jne 0x32a99
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x293e2(%rip), %rdi # 0x5c0dc
leaq 0x28ff3(%rip), %rsi # 0x5bcf4
leaq 0x29702(%rip), %rcx # 0x5c40a
movl $0x7ea, %edx # imm = 0x7EA
callq 0x16b00
| quantize_row_tq1_0_ref:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_48], rsi
test dl, dl
jnz loc_32CF3
sar rdx, 8
test rdx, rdx
jle loc_32CE4
lea rax, [rdi+280h]
mov [rsp+78h+var_70], rax
lea rax, [rdi+3C0h]
mov [rsp+78h+var_78], rax
xor r8d, r8d
movaps xmm2, cs:xmmword_4C020
mov ebx, 0FFFFh
mov [rsp+78h+var_50], rdx
loc_32A99:
xor eax, eax
xorps xmm0, xmm0
loc_32A9E:
movss xmm1, dword ptr [rdi+rax*4]
andps xmm1, xmm2
maxss xmm0, xmm1
inc rax
cmp rax, 100h
jnz short loc_32A9E
movss xmm1, cs:dword_4C0F0
divss xmm1, xmm0
movaps xmm3, xmm0
cmpneqss xmm3, cs:dword_512C4
andps xmm3, xmm1
movd eax, xmm0
andps xmm0, xmm2
mulss xmm0, cs:dword_4C0E8
lea ecx, [rax+rax]
mov edx, eax
and edx, 7F800000h
add edx, 7800000h
cmp ecx, 71000000h
mov esi, 40000000h
cmovb edx, esi
mulss xmm0, cs:dword_4C0EC
movd xmm1, edx
addss xmm1, xmm0
movd edx, xmm1
mov esi, edx
shr esi, 0Dh
and esi, 7C00h
and edx, 0FFFh
add edx, esi
shr eax, 10h
and eax, 8000h
cmp ecx, 0FF000001h
mov ecx, 7E00h
cmovnb edx, ecx
or edx, eax
mov [rsp+78h+var_40], r8
imul rax, r8, 36h ; '6'
mov rcx, [rsp+78h+var_48]
lea r14, [rcx+rax]
mov [rcx+rax+34h], dx
mov [rsp+78h+var_38], rdi
mov r12, rdi
xor r13d, r13d
movaps [rsp+78h+var_68], xmm3
loc_32B64:
xor ebp, ebp
xor r15d, r15d
loc_32B69:
movss xmm0, dword ptr [r12+rbp]
mulss xmm0, xmm3
call _lroundf
movaps xmm3, [rsp+78h+var_68]
movzx ecx, r15b
lea r15d, [rcx+rcx*2]
add r15b, al
inc r15b
sub rbp, 0FFFFFFFFFFFFFF80h
cmp rbp, 280h
jnz short loc_32B69
movzx eax, r15b
shl eax, 8
or eax, 0F2h
mov ecx, eax
and ecx, ebx
imul ecx, 0DB3h
shr ecx, 10h
sub eax, ecx
and eax, ebx
shr eax, 1
add eax, ecx
shr eax, 7
mov [r14+r13], al
inc r13
add r12, 4
cmp r13, 20h ; ' '
jnz short loc_32B64
mov r12, [rsp+78h+var_70]
xor r13d, r13d
loc_32BD5:
xor ebp, ebp
xor r15d, r15d
loc_32BDA:
movss xmm0, dword ptr [r12+rbp]
mulss xmm0, xmm3
call _lroundf
movaps xmm3, [rsp+78h+var_68]
movzx ecx, r15b
lea r15d, [rcx+rcx*2]
add r15b, al
inc r15b
add rbp, 40h ; '@'
cmp rbp, 140h
jnz short loc_32BDA
movzx eax, r15b
shl eax, 8
or eax, 0F2h
mov ecx, eax
and ecx, ebx
imul ecx, 0DB3h
shr ecx, 10h
sub eax, ecx
and eax, ebx
shr eax, 1
add eax, ecx
shr eax, 7
mov [r14+r13+20h], al
inc r13
add r12, 4
cmp r13, 10h
jnz short loc_32BD5
mov r13, [rsp+78h+var_78]
xor r12d, r12d
loc_32C46:
xor ebp, ebp
xor r15d, r15d
loc_32C4B:
movss xmm0, dword ptr [r13+rbp+0]
mulss xmm0, xmm3
call _lroundf
movaps xmm3, [rsp+78h+var_68]
movzx ecx, r15b
lea r15d, [rcx+rcx*2]
add r15b, al
inc r15b
add rbp, 10h
cmp rbp, 40h ; '@'
jnz short loc_32C4B
movzx eax, r15b
lea eax, [rax+rax*2]
shl eax, 8
or eax, 0F2h
mov ecx, eax
and ecx, ebx
imul ecx, 0DB3h
shr ecx, 10h
sub eax, ecx
and eax, ebx
shr eax, 1
add eax, ecx
shr eax, 7
mov [r14+r12+30h], al
inc r12
add r13, 4
cmp r12, 4
jnz short loc_32C46
mov rdi, [rsp+78h+var_38]
mov eax, 400h
add rdi, rax
mov r8, [rsp+78h+var_40]
inc r8
add [rsp+78h+var_70], rax
add [rsp+78h+var_78], rax
mov rdx, [rsp+78h+var_50]
cmp r8, rdx
movaps xmm2, cs:xmmword_4C020
jnz loc_32A99
loc_32CE4:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_32CF3:
lea rdi, aKQkK0; "k % QK_K == 0"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidQuantizeRo_15; "void quantize_row_tq1_0_ref(const float"...
mov edx, 7EAh
call ___assert_fail
| void quantize_row_tq1_0_ref(long long a1, long long a2, long long a3)
{
long long v3; // rdx
long long v4; // r8
long long v5; // rax
__m128 v6; // xmm0
__m128 v7; // rt1
float v8; // xmm3_4
unsigned int v9; // eax
float v10; // xmm0_4
unsigned int v11; // ecx
unsigned int v12; // edx
__m128i v13; // xmm1
unsigned int v14; // edx
int v15; // edx
int v16; // eax
long long v17; // r14
long long v18; // r12
long long v19; // r13
long long v20; // rbp
unsigned __int8 v21; // r15
char v22; // al
unsigned int v23; // ecx
long long v24; // r12
long long i; // r13
long long v26; // rbp
unsigned __int8 v27; // r15
char v28; // al
unsigned int v29; // ecx
long long v30; // r13
long long j; // r12
long long v32; // rbp
unsigned __int8 v33; // r15
char v34; // al
unsigned int v35; // ecx
long long v36; // [rsp+0h] [rbp-78h]
long long v37; // [rsp+8h] [rbp-70h]
float v38; // [rsp+10h] [rbp-68h]
long long v39; // [rsp+28h] [rbp-50h]
long long v40; // [rsp+38h] [rbp-40h]
if ( (_BYTE)a3 )
__assert_fail(
"k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2026LL,
"void quantize_row_tq1_0_ref(const float *restrict, block_tq1_0 *restrict, int64_t)");
v3 = a3 >> 8;
if ( v3 > 0 )
{
v37 = a1 + 640;
v36 = a1 + 960;
v4 = 0LL;
v39 = v3;
do
{
v5 = 0LL;
v6 = 0LL;
do
v6.m128_f32[0] = fmaxf(v6.m128_f32[0], fabs(*(float *)(a1 + 4 * v5++)));
while ( v5 != 256 );
v7.m128_i32[0] = 0;
LODWORD(v8) = _mm_cmpneq_ss(v6, v7).m128_u32[0] & COERCE_UNSIGNED_INT(1.0 / v6.m128_f32[0]);
v9 = _mm_cvtsi128_si32((__m128i)v6);
v10 = fabs(v6.m128_f32[0]) * 5.1922969e33;
v11 = 2 * v9;
v12 = (v9 & 0x7F800000) + 125829120;
if ( 2 * v9 < 0x71000000 )
v12 = 0x40000000;
v13 = _mm_cvtsi32_si128(v12);
*(float *)v13.m128i_i32 = *(float *)v13.m128i_i32 + (float)(v10 * 7.7037198e-34);
v14 = _mm_cvtsi128_si32(v13);
v15 = ((v14 >> 13) & 0x7C00) + (v14 & 0xFFF);
v16 = HIWORD(v9) & 0x8000;
if ( v11 >= 0xFF000001 )
LOWORD(v15) = 32256;
v40 = v4;
v17 = a2 + 54 * v4;
*(_WORD *)(v17 + 52) = v16 | v15;
v18 = a1;
v19 = 0LL;
v38 = v8;
do
{
v20 = 0LL;
v21 = 0;
do
{
v22 = lroundf(*(float *)(v18 + v20) * v8);
v8 = v38;
v21 = v22 + 3 * v21 + 1;
v20 += 128LL;
}
while ( v20 != 640 );
v23 = (3507 * ((unsigned __int16)(v21 << 8) | 0xF2u)) >> 16;
*(_BYTE *)(v17 + v19++) = (v23 + ((unsigned __int16)(((v21 << 8) | 0xF2) - v23) >> 1)) >> 7;
v18 += 4LL;
}
while ( v19 != 32 );
v24 = v37;
for ( i = 0LL; i != 16; ++i )
{
v26 = 0LL;
v27 = 0;
do
{
v28 = lroundf(*(float *)(v24 + v26) * v8);
v8 = v38;
v27 = v28 + 3 * v27 + 1;
v26 += 64LL;
}
while ( v26 != 320 );
v29 = (3507 * ((unsigned __int16)(v27 << 8) | 0xF2u)) >> 16;
*(_BYTE *)(v17 + i + 32) = (v29 + ((unsigned __int16)(((v27 << 8) | 0xF2) - v29) >> 1)) >> 7;
v24 += 4LL;
}
v30 = v36;
for ( j = 0LL; j != 4; ++j )
{
v32 = 0LL;
v33 = 0;
do
{
v34 = lroundf(*(float *)(v30 + v32) * v8);
v8 = v38;
v33 = v34 + 3 * v33 + 1;
v32 += 16LL;
}
while ( v32 != 64 );
v35 = (3507 * ((unsigned __int16)(768 * v33) | 0xF2u)) >> 16;
*(_BYTE *)(v17 + j + 48) = (v35 + ((unsigned __int16)(((768 * v33) | 0xF2) - v35) >> 1)) >> 7;
v30 += 4LL;
}
a1 += 1024LL;
v4 = v40 + 1;
v37 += 1024LL;
v36 += 1024LL;
}
while ( v40 + 1 != v39 );
}
}
| quantize_row_tq1_0_ref:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP + 0x30],RSI
TEST DL,DL
JNZ 0x00132cf3
SAR RDX,0x8
TEST RDX,RDX
JLE 0x00132ce4
LEA RAX,[RDI + 0x280]
MOV qword ptr [RSP + 0x8],RAX
LEA RAX,[RDI + 0x3c0]
MOV qword ptr [RSP],RAX
XOR R8D,R8D
MOVAPS XMM2,xmmword ptr [0x0014c020]
MOV EBX,0xffff
MOV qword ptr [RSP + 0x28],RDX
LAB_00132a99:
XOR EAX,EAX
XORPS XMM0,XMM0
LAB_00132a9e:
MOVSS XMM1,dword ptr [RDI + RAX*0x4]
ANDPS XMM1,XMM2
MAXSS XMM0,XMM1
INC RAX
CMP RAX,0x100
JNZ 0x00132a9e
MOVSS XMM1,dword ptr [0x0014c0f0]
DIVSS XMM1,XMM0
MOVAPS XMM3,XMM0
CMPNEQSS XMM3,dword ptr [0x001512c4]
ANDPS XMM3,XMM1
MOVD EAX,XMM0
ANDPS XMM0,XMM2
MULSS XMM0,dword ptr [0x0014c0e8]
LEA ECX,[RAX + RAX*0x1]
MOV EDX,EAX
AND EDX,0x7f800000
ADD EDX,0x7800000
CMP ECX,0x71000000
MOV ESI,0x40000000
CMOVC EDX,ESI
MULSS XMM0,dword ptr [0x0014c0ec]
MOVD XMM1,EDX
ADDSS XMM1,XMM0
MOVD EDX,XMM1
MOV ESI,EDX
SHR ESI,0xd
AND ESI,0x7c00
AND EDX,0xfff
ADD EDX,ESI
SHR EAX,0x10
AND EAX,0x8000
CMP ECX,0xff000001
MOV ECX,0x7e00
CMOVNC EDX,ECX
OR EDX,EAX
MOV qword ptr [RSP + 0x38],R8
IMUL RAX,R8,0x36
MOV RCX,qword ptr [RSP + 0x30]
LEA R14,[RCX + RAX*0x1]
MOV word ptr [RCX + RAX*0x1 + 0x34],DX
MOV qword ptr [RSP + 0x40],RDI
MOV R12,RDI
XOR R13D,R13D
MOVAPS xmmword ptr [RSP + 0x10],XMM3
LAB_00132b64:
XOR EBP,EBP
XOR R15D,R15D
LAB_00132b69:
MOVSS XMM0,dword ptr [R12 + RBP*0x1]
MULSS XMM0,XMM3
CALL 0x001176f0
MOVAPS XMM3,xmmword ptr [RSP + 0x10]
MOVZX ECX,R15B
LEA R15D,[RCX + RCX*0x2]
ADD R15B,AL
INC R15B
SUB RBP,-0x80
CMP RBP,0x280
JNZ 0x00132b69
MOVZX EAX,R15B
SHL EAX,0x8
OR EAX,0xf2
MOV ECX,EAX
AND ECX,EBX
IMUL ECX,ECX,0xdb3
SHR ECX,0x10
SUB EAX,ECX
AND EAX,EBX
SHR EAX,0x1
ADD EAX,ECX
SHR EAX,0x7
MOV byte ptr [R14 + R13*0x1],AL
INC R13
ADD R12,0x4
CMP R13,0x20
JNZ 0x00132b64
MOV R12,qword ptr [RSP + 0x8]
XOR R13D,R13D
LAB_00132bd5:
XOR EBP,EBP
XOR R15D,R15D
LAB_00132bda:
MOVSS XMM0,dword ptr [R12 + RBP*0x1]
MULSS XMM0,XMM3
CALL 0x001176f0
MOVAPS XMM3,xmmword ptr [RSP + 0x10]
MOVZX ECX,R15B
LEA R15D,[RCX + RCX*0x2]
ADD R15B,AL
INC R15B
ADD RBP,0x40
CMP RBP,0x140
JNZ 0x00132bda
MOVZX EAX,R15B
SHL EAX,0x8
OR EAX,0xf2
MOV ECX,EAX
AND ECX,EBX
IMUL ECX,ECX,0xdb3
SHR ECX,0x10
SUB EAX,ECX
AND EAX,EBX
SHR EAX,0x1
ADD EAX,ECX
SHR EAX,0x7
MOV byte ptr [R14 + R13*0x1 + 0x20],AL
INC R13
ADD R12,0x4
CMP R13,0x10
JNZ 0x00132bd5
MOV R13,qword ptr [RSP]
XOR R12D,R12D
LAB_00132c46:
XOR EBP,EBP
XOR R15D,R15D
LAB_00132c4b:
MOVSS XMM0,dword ptr [R13 + RBP*0x1]
MULSS XMM0,XMM3
CALL 0x001176f0
MOVAPS XMM3,xmmword ptr [RSP + 0x10]
MOVZX ECX,R15B
LEA R15D,[RCX + RCX*0x2]
ADD R15B,AL
INC R15B
ADD RBP,0x10
CMP RBP,0x40
JNZ 0x00132c4b
MOVZX EAX,R15B
LEA EAX,[RAX + RAX*0x2]
SHL EAX,0x8
OR EAX,0xf2
MOV ECX,EAX
AND ECX,EBX
IMUL ECX,ECX,0xdb3
SHR ECX,0x10
SUB EAX,ECX
AND EAX,EBX
SHR EAX,0x1
ADD EAX,ECX
SHR EAX,0x7
MOV byte ptr [R14 + R12*0x1 + 0x30],AL
INC R12
ADD R13,0x4
CMP R12,0x4
JNZ 0x00132c46
MOV RDI,qword ptr [RSP + 0x40]
MOV EAX,0x400
ADD RDI,RAX
MOV R8,qword ptr [RSP + 0x38]
INC R8
ADD qword ptr [RSP + 0x8],RAX
ADD qword ptr [RSP],RAX
MOV RDX,qword ptr [RSP + 0x28]
CMP R8,RDX
MOVAPS XMM2,xmmword ptr [0x0014c020]
JNZ 0x00132a99
LAB_00132ce4:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00132cf3:
LEA RDI,[0x15c0dc]
LEA RSI,[0x15bcf4]
LEA RCX,[0x15c40a]
MOV EDX,0x7ea
CALL 0x00116b00
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void quantize_row_tq1_0_ref(long param_1,long param_2,long param_3)
{
long lVar1;
long lVar2;
uint uVar3;
uint uVar4;
ushort uVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
byte bVar10;
float fVar11;
float fVar12;
float fVar13;
long local_78;
long local_70;
if ((char)param_3 == '\0') {
if (0 < param_3 >> 8) {
local_70 = param_1 + 0x280;
local_78 = param_1 + 0x3c0;
lVar7 = 0;
do {
lVar1 = 0;
fVar11 = 0.0;
do {
fVar12 = (float)(*(uint *)(param_1 + lVar1 * 4) & _DAT_0014c020);
if (fVar11 <= fVar12) {
fVar11 = fVar12;
}
lVar1 = lVar1 + 1;
} while (lVar1 != 0x100);
fVar13 = (float)(-(uint)(fVar11 != DAT_001512c4) & (uint)(DAT_0014c0f0 / fVar11));
fVar12 = (float)(((uint)fVar11 & 0x7f800000) + 0x7800000);
if ((uint)((int)fVar11 * 2) < 0x71000000) {
fVar12 = 2.0;
}
fVar12 = fVar12 + (float)((uint)fVar11 & _DAT_0014c020) * DAT_0014c0e8 * DAT_0014c0ec;
uVar5 = (SUB42(fVar12,0) & 0xfff) + ((ushort)((uint)fVar12 >> 0xd) & 0x7c00);
if (0xff000000 < (uint)((int)fVar11 * 2)) {
uVar5 = 0x7e00;
}
lVar1 = param_2 + lVar7 * 0x36;
*(ushort *)(param_2 + 0x34 + lVar7 * 0x36) = uVar5 | (ushort)((uint)fVar11 >> 0x10) & 0x8000
;
lVar9 = 0;
lVar8 = param_1;
do {
lVar6 = 0;
bVar10 = 0;
do {
lVar2 = lroundf(*(float *)(lVar8 + lVar6) * fVar13);
bVar10 = bVar10 * '\x03' + (char)lVar2 + 1;
lVar6 = lVar6 + 0x80;
} while (lVar6 != 0x280);
uVar3 = ((uint)bVar10 << 8 | 0xf2) * 0xdb3 >> 0x10;
*(char *)(lVar1 + lVar9) =
(char)(((((uint)bVar10 << 8 | 0xf2) - uVar3 & 0xffff) >> 1) + uVar3 >> 7);
lVar9 = lVar9 + 1;
lVar8 = lVar8 + 4;
} while (lVar9 != 0x20);
lVar9 = 0;
lVar8 = local_70;
do {
lVar6 = 0;
bVar10 = 0;
do {
lVar2 = lroundf(*(float *)(lVar8 + lVar6) * fVar13);
bVar10 = bVar10 * '\x03' + (char)lVar2 + 1;
lVar6 = lVar6 + 0x40;
} while (lVar6 != 0x140);
uVar3 = ((uint)bVar10 << 8 | 0xf2) * 0xdb3 >> 0x10;
*(char *)(lVar1 + 0x20 + lVar9) =
(char)(((((uint)bVar10 << 8 | 0xf2) - uVar3 & 0xffff) >> 1) + uVar3 >> 7);
lVar9 = lVar9 + 1;
lVar8 = lVar8 + 4;
} while (lVar9 != 0x10);
lVar9 = 0;
lVar8 = local_78;
do {
lVar6 = 0;
bVar10 = 0;
do {
lVar2 = lroundf(*(float *)(lVar8 + lVar6) * fVar13);
bVar10 = bVar10 * '\x03' + (char)lVar2 + 1;
lVar6 = lVar6 + 0x10;
} while (lVar6 != 0x40);
uVar3 = ((uint)bVar10 + (uint)bVar10 * 2) * 0x100;
uVar4 = (uVar3 & 0xffff | 0xf2) * 0xdb3 >> 0x10;
*(char *)(lVar1 + 0x30 + lVar9) =
(char)((((uVar3 | 0xf2) - uVar4 & 0xffff) >> 1) + uVar4 >> 7);
lVar9 = lVar9 + 1;
lVar8 = lVar8 + 4;
} while (lVar9 != 4);
param_1 = param_1 + 0x400;
lVar7 = lVar7 + 1;
local_70 = local_70 + 0x400;
local_78 = local_78 + 0x400;
} while (lVar7 != param_3 >> 8);
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x7ea,
"void quantize_row_tq1_0_ref(const float *restrict, block_tq1_0 *restrict, int64_t)"
);
}
| |
42,352 | ma_SHA1Decode | eloqsql/libmariadb/libmariadb/ma_sha1.c | static void ma_SHA1Decode(uint32 *output, const unsigned char * input, unsigned int len)
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
output[i] = ((uint32) input[j + 3]) | (((uint32) input[j + 2]) << 8) |
(((uint32) input[j + 1]) << 16) | (((uint32) input[j]) << 24);
} | O0 | c | ma_SHA1Decode:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x4a78d
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
orl %eax, %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x10, %eax
orl %eax, %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
shll $0x18, %eax
orl %eax, %edx
movq -0x8(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4a71d
popq %rbp
retq
| ma_SHA1Decode:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], 0
mov [rbp+var_1C], 0
loc_4A71D:
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_14]
jnb short loc_4A78D
mov rax, [rbp+var_10]
mov ecx, [rbp+var_1C]
add ecx, 3
mov ecx, ecx
movzx edx, byte ptr [rax+rcx]
mov rax, [rbp+var_10]
mov ecx, [rbp+var_1C]
add ecx, 2
mov ecx, ecx
movzx eax, byte ptr [rax+rcx]
shl eax, 8
or edx, eax
mov rax, [rbp+var_10]
mov ecx, [rbp+var_1C]
add ecx, 1
mov ecx, ecx
movzx eax, byte ptr [rax+rcx]
shl eax, 10h
or edx, eax
mov rax, [rbp+var_10]
mov ecx, [rbp+var_1C]
movzx eax, byte ptr [rax+rcx]
shl eax, 18h
or edx, eax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_18]
mov [rax+rcx*4], edx
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
mov eax, [rbp+var_1C]
add eax, 4
mov [rbp+var_1C], eax
jmp short loc_4A71D
loc_4A78D:
pop rbp
retn
| long long ma_SHA1Decode(long long a1, long long a2, unsigned int a3)
{
long long result; // rax
unsigned int i; // [rsp+0h] [rbp-1Ch]
unsigned int v5; // [rsp+4h] [rbp-18h]
v5 = 0;
for ( i = 0; ; i += 4 )
{
result = i;
if ( i >= a3 )
break;
*(_DWORD *)(a1 + 4LL * v5++) = (*(unsigned __int8 *)(a2 + i) << 24) | (*(unsigned __int8 *)(a2 + i + 1) << 16) | (*(unsigned __int8 *)(a2 + i + 2) << 8) | *(unsigned __int8 *)(a2 + i + 3);
}
return result;
}
| ma_SHA1Decode:
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],0x0
MOV dword ptr [RBP + -0x1c],0x0
LAB_0014a71d:
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x14]
JNC 0x0014a78d
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x3
MOV ECX,ECX
MOVZX EDX,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x2
MOV ECX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SHL EAX,0x8
OR EDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x1
MOV ECX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SHL EAX,0x10
OR EDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SHL EAX,0x18
OR EDX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x18]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x4
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0014a71d
LAB_0014a78d:
POP RBP
RET
|
void ma_SHA1Decode(long param_1,long param_2,uint param_3)
{
int4 local_24;
int4 local_20;
local_20 = 0;
for (local_24 = 0; local_24 < param_3; local_24 = local_24 + 4) {
*(uint *)(param_1 + (ulong)local_20 * 4) =
CONCAT13(*(int1 *)(param_2 + (ulong)local_24),
CONCAT12(*(int1 *)(param_2 + (ulong)(local_24 + 1)),
CONCAT11(*(int1 *)(param_2 + (ulong)(local_24 + 2)),
*(int1 *)(param_2 + (ulong)(local_24 + 3)))));
local_20 = local_20 + 1;
}
return;
}
| |
42,353 | findopt | eloqsql/mysys/my_getopt.c | static int findopt(char *optpat, uint length,
const struct my_option **opt_res,
const char **ffname)
{
uint count;
const struct my_option *opt= *opt_res;
DBUG_ENTER("findopt");
for (count= 0; opt->name; opt++)
{
if (!getopt_compare_strings(opt->name, optpat, length)) /* match found */
{
(*opt_res)= opt;
if (!opt->name[length]) /* Exact match */
DBUG_RETURN(1);
if (!my_getopt_prefix_matching)
continue;
if (!count)
{
/* We only need to know one prev */
count= 1;
*ffname= opt->name;
}
else if (strcmp(*ffname, opt->name))
{
/*
The above test is to not count same option twice
(see mysql.cc, option "help")
*/
count++;
}
}
}
if (count == 1)
my_getopt_error_reporter(INFORMATION_LEVEL,
"Using unique option prefix '%.*s' is error-prone "
"and can break in the future. "
"Please use the full name '%s' instead.",
length, optpat, *ffname);
DBUG_RETURN(count);
} | O0 | c | findopt:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2d11a
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x2d160
cmpb $0x0, %al
jne 0x2d107
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
jne 0x2d0b7
jmp 0x2d0ab
movl $0x1, -0x4(%rbp)
jmp 0x2d151
leaq 0x1ab2e3(%rip), %rax # 0x1d83a1
cmpb $0x0, (%rax)
jne 0x2d0c5
jmp 0x2d109
cmpl $0x0, -0x2c(%rbp)
jne 0x2d0e2
movl $0x1, -0x2c(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0x2d105
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movq (%rax), %rsi
callq 0x24410
cmpl $0x0, %eax
je 0x2d103
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2d105
jmp 0x2d107
jmp 0x2d109
movq -0x38(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x38(%rbp)
jmp 0x2d069
cmpl $0x1, -0x2c(%rbp)
jne 0x2d149
leaq 0x1ab259(%rip), %rax # 0x1d8380
movq (%rax), %r9
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq (%rax), %r8
movl $0x2, %edi
leaq 0x561ff(%rip), %rsi # 0x83343
movb $0x0, %al
callq *%r9
jmp 0x2d14b
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| findopt:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov [rbp+var_2C], 0
loc_2D069:
mov rax, [rbp+var_38]
cmp qword ptr [rax], 0
jz loc_2D11A
mov rax, [rbp+var_38]
mov rdi, [rax]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call getopt_compare_strings
cmp al, 0
jnz short loc_2D107
mov rcx, [rbp+var_38]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rax, [rbp+var_38]
mov rax, [rax]
mov ecx, [rbp+var_14]
cmp byte ptr [rax+rcx], 0
jnz short loc_2D0B7
jmp short $+2
loc_2D0AB:
mov [rbp+var_4], 1
jmp loc_2D151
loc_2D0B7:
lea rax, my_getopt_prefix_matching
cmp byte ptr [rax], 0
jnz short loc_2D0C5
jmp short loc_2D109
loc_2D0C5:
cmp [rbp+var_2C], 0
jnz short loc_2D0E2
mov [rbp+var_2C], 1
mov rax, [rbp+var_38]
mov rcx, [rax]
mov rax, [rbp+var_28]
mov [rax], rcx
jmp short loc_2D105
loc_2D0E2:
mov rax, [rbp+var_28]
mov rdi, [rax]
mov rax, [rbp+var_38]
mov rsi, [rax]
call _strcmp
cmp eax, 0
jz short loc_2D103
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
loc_2D103:
jmp short $+2
loc_2D105:
jmp short $+2
loc_2D107:
jmp short $+2
loc_2D109:
mov rax, [rbp+var_38]
add rax, 70h ; 'p'
mov [rbp+var_38], rax
jmp loc_2D069
loc_2D11A:
cmp [rbp+var_2C], 1
jnz short loc_2D149
lea rax, my_getopt_error_reporter
mov r9, [rax]
mov edx, [rbp+var_14]
mov rcx, [rbp+var_10]
mov rax, [rbp+var_28]
mov r8, [rax]
mov edi, 2
lea rsi, aUsingUniqueOpt; "Using unique option prefix '%.*s' is er"...
mov al, 0
call r9
loc_2D149:
jmp short $+2
loc_2D14B:
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
loc_2D151:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long findopt(const char *a1, unsigned int a2, const char ***a3, const char **a4)
{
const char **v5; // [rsp+8h] [rbp-38h]
unsigned int v6; // [rsp+14h] [rbp-2Ch]
v5 = *a3;
v6 = 0;
while ( *v5 )
{
if ( !(unsigned __int8)getopt_compare_strings(*v5, a1, a2) )
{
*a3 = v5;
if ( !(*v5)[a2] )
return 1;
if ( my_getopt_prefix_matching )
{
if ( v6 )
{
if ( (unsigned int)strcmp(*a4, *v5) )
++v6;
}
else
{
v6 = 1;
*a4 = *v5;
}
}
}
v5 += 14;
}
if ( v6 == 1 )
my_getopt_error_reporter(
2,
(long long)"Using unique option prefix '%.*s' is error-prone and can break in the future. Please use the full name '%s' instead.",
a2,
a1,
*a4);
return v6;
}
| findopt:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x2c],0x0
LAB_0012d069:
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX],0x0
JZ 0x0012d11a
MOV RAX,qword ptr [RBP + -0x38]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL 0x0012d160
CMP AL,0x0
JNZ 0x0012d107
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x14]
CMP byte ptr [RAX + RCX*0x1],0x0
JNZ 0x0012d0b7
JMP 0x0012d0ab
LAB_0012d0ab:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0012d151
LAB_0012d0b7:
LEA RAX,[0x2d83a1]
CMP byte ptr [RAX],0x0
JNZ 0x0012d0c5
JMP 0x0012d109
LAB_0012d0c5:
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x0012d0e2
MOV dword ptr [RBP + -0x2c],0x1
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
JMP 0x0012d105
LAB_0012d0e2:
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX]
CALL 0x00124410
CMP EAX,0x0
JZ 0x0012d103
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
LAB_0012d103:
JMP 0x0012d105
LAB_0012d105:
JMP 0x0012d107
LAB_0012d107:
JMP 0x0012d109
LAB_0012d109:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x70
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0012d069
LAB_0012d11a:
CMP dword ptr [RBP + -0x2c],0x1
JNZ 0x0012d149
LEA RAX,[0x2d8380]
MOV R9,qword ptr [RAX]
MOV EDX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RAX]
MOV EDI,0x2
LEA RSI,[0x183343]
MOV AL,0x0
CALL R9
LAB_0012d149:
JMP 0x0012d14b
LAB_0012d14b:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
LAB_0012d151:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int findopt(int8 param_1,uint param_2,int8 *param_3,long *param_4)
{
char cVar1;
int iVar2;
long *local_40;
int local_34;
local_40 = (long *)*param_3;
local_34 = 0;
do {
if (*local_40 == 0) {
if (local_34 == 1) {
(*(code *)my_getopt_error_reporter)
(2,
"Using unique option prefix \'%.*s\' is error-prone and can break in the future. Please use the full name \'%s\' instead."
,param_2,param_1,*param_4);
}
return local_34;
}
cVar1 = getopt_compare_strings(*local_40,param_1,param_2);
if (cVar1 == '\0') {
*param_3 = local_40;
if (*(char *)(*local_40 + (ulong)param_2) == '\0') {
return 1;
}
if (my_getopt_prefix_matching != '\0') {
if (local_34 == 0) {
local_34 = 1;
*param_4 = *local_40;
}
else {
iVar2 = strcmp((char *)*param_4,(char *)*local_40);
if (iVar2 != 0) {
local_34 = local_34 + 1;
}
}
}
}
local_40 = local_40 + 0xe;
} while( true );
}
| |
42,354 | findopt | eloqsql/mysys/my_getopt.c | static int findopt(char *optpat, uint length,
const struct my_option **opt_res,
const char **ffname)
{
uint count;
const struct my_option *opt= *opt_res;
DBUG_ENTER("findopt");
for (count= 0; opt->name; opt++)
{
if (!getopt_compare_strings(opt->name, optpat, length)) /* match found */
{
(*opt_res)= opt;
if (!opt->name[length]) /* Exact match */
DBUG_RETURN(1);
if (!my_getopt_prefix_matching)
continue;
if (!count)
{
/* We only need to know one prev */
count= 1;
*ffname= opt->name;
}
else if (strcmp(*ffname, opt->name))
{
/*
The above test is to not count same option twice
(see mysql.cc, option "help")
*/
count++;
}
}
}
if (count == 1)
my_getopt_error_reporter(INFORMATION_LEVEL,
"Using unique option prefix '%.*s' is error-prone "
"and can break in the future. "
"Please use the full name '%s' instead.",
length, optpat, *ffname);
DBUG_RETURN(count);
} | O3 | c | findopt:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, -0x38(%rbp)
movq (%rdx), %r15
movq (%r15), %rax
testq %rax, %rax
je 0x29e03
movq %rdx, %r12
movl %esi, %r10d
movq %rdi, %rbx
movl %esi, %r13d
leaq 0x2cc61e(%rip), %rcx # 0x2f6359
movb (%rcx), %r9b
xorl %edi, %edi
movl $0x5f, %r14d
movl %esi, -0x3c(%rbp)
movb %r9b, -0x29(%rbp)
testl %r10d, %r10d
je 0x29d7a
xorl %ecx, %ecx
movzbl (%rax,%rcx), %r8d
cmpb $0x2d, %r8b
cmovel %r14d, %r8d
movzbl (%rbx,%rcx), %esi
cmpb $0x2d, %sil
cmovel %r14d, %esi
cmpb %sil, %r8b
jne 0x29dc1
incq %rcx
cmpq %rcx, %r13
jne 0x29d54
movq %r15, (%r12)
movq (%r15), %rsi
cmpb $0x0, (%rsi,%r13)
je 0x29dfc
testb %r9b, %r9b
je 0x29dc1
testl %edi, %edi
je 0x29db5
movq -0x38(%rbp), %rax
movq %rdi, -0x48(%rbp)
movq (%rax), %rdi
callq 0x24460
movb -0x29(%rbp), %r9b
movq -0x48(%rbp), %rdi
movl -0x3c(%rbp), %r10d
cmpl $0x1, %eax
sbbl $-0x1, %edi
jmp 0x29dc1
movq -0x38(%rbp), %rax
movq %rsi, (%rax)
movl $0x1, %edi
movq 0x70(%r15), %rax
addq $0x70, %r15
testq %rax, %rax
jne 0x29d4d
cmpl $0x1, %edi
jne 0x29e05
leaq 0x2cc55a(%rip), %r9 # 0x2f6338
movq -0x38(%rbp), %rax
movq (%rax), %r8
leaq 0x38523(%rip), %rsi # 0x6230f
movl $0x2, %edi
movl %r10d, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq *(%r9)
movl $0x1, %edi
jmp 0x29e05
xorl %edi, %edi
movl %edi, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| findopt:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp+var_38], rcx
mov r15, [rdx]
mov rax, [r15]
test rax, rax
jz loc_29E03
mov r12, rdx
mov r10d, esi
mov rbx, rdi
mov r13d, esi
lea rcx, my_getopt_prefix_matching
mov r9b, [rcx]
xor edi, edi
mov r14d, 5Fh ; '_'
mov [rbp+var_3C], esi
mov [rbp+var_29], r9b
loc_29D4D:
test r10d, r10d
jz short loc_29D7A
xor ecx, ecx
loc_29D54:
movzx r8d, byte ptr [rax+rcx]
cmp r8b, 2Dh ; '-'
cmovz r8d, r14d
movzx esi, byte ptr [rbx+rcx]
cmp sil, 2Dh ; '-'
cmovz esi, r14d
cmp r8b, sil
jnz short loc_29DC1
inc rcx
cmp r13, rcx
jnz short loc_29D54
loc_29D7A:
mov [r12], r15
mov rsi, [r15]
cmp byte ptr [rsi+r13], 0
jz short loc_29DFC
test r9b, r9b
jz short loc_29DC1
test edi, edi
jz short loc_29DB5
mov rax, [rbp+var_38]
mov [rbp+var_48], rdi
mov rdi, [rax]
call _strcmp
mov r9b, [rbp+var_29]
mov rdi, [rbp+var_48]
mov r10d, [rbp+var_3C]
cmp eax, 1
sbb edi, 0FFFFFFFFh
jmp short loc_29DC1
loc_29DB5:
mov rax, [rbp+var_38]
mov [rax], rsi
mov edi, 1
loc_29DC1:
mov rax, [r15+70h]
add r15, 70h ; 'p'
test rax, rax
jnz loc_29D4D
cmp edi, 1
jnz short loc_29E05
lea r9, my_getopt_error_reporter
mov rax, [rbp+var_38]
mov r8, [rax]
lea rsi, aUsingUniqueOpt; "Using unique option prefix '%.*s' is er"...
mov edi, 2
mov edx, r10d
mov rcx, rbx
xor eax, eax
call qword ptr [r9]
loc_29DFC:
mov edi, 1
jmp short loc_29E05
loc_29E03:
xor edi, edi
loc_29E05:
mov eax, edi
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long findopt(const char *a1, unsigned int a2, long long **a3, const char **a4)
{
long long *v4; // r15
long long v5; // rax
int v7; // r10d
long long v9; // r13
char v10; // r9
unsigned int v11; // edi
long long v12; // rcx
char v13; // r8
char v14; // si
const char *v15; // rsi
int v16; // eax
char v20; // [rsp+27h] [rbp-29h]
v4 = *a3;
v5 = **a3;
if ( v5 )
{
v7 = a2;
v9 = a2;
v10 = my_getopt_prefix_matching;
v11 = 0;
v20 = my_getopt_prefix_matching;
do
{
if ( v7 )
{
v12 = 0LL;
while ( 1 )
{
v13 = *(_BYTE *)(v5 + v12);
if ( v13 == 45 )
v13 = 95;
v14 = a1[v12];
if ( v14 == 45 )
v14 = 95;
if ( v13 != v14 )
break;
if ( v9 == ++v12 )
goto LABEL_11;
}
}
else
{
LABEL_11:
*a3 = v4;
v15 = (const char *)*v4;
if ( !*(_BYTE *)(*v4 + v9) )
return 1;
if ( v10 )
{
if ( v11 )
{
v16 = strcmp(*a4, v15);
v10 = v20;
v7 = a2;
v11 -= (v16 == 0) - 1;
}
else
{
*a4 = v15;
v11 = 1;
}
}
}
v5 = v4[14];
v4 += 14;
}
while ( v5 );
if ( v11 != 1 )
return v11;
my_getopt_error_reporter(
2,
"Using unique option prefix '%.*s' is error-prone and can break in the future. Please use the full name '%s' instead.",
v7,
a1,
*a4);
return 1;
}
else
{
return 0;
}
}
| findopt:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x38],RCX
MOV R15,qword ptr [RDX]
MOV RAX,qword ptr [R15]
TEST RAX,RAX
JZ 0x00129e03
MOV R12,RDX
MOV R10D,ESI
MOV RBX,RDI
MOV R13D,ESI
LEA RCX,[0x3f6359]
MOV R9B,byte ptr [RCX]
XOR EDI,EDI
MOV R14D,0x5f
MOV dword ptr [RBP + -0x3c],ESI
MOV byte ptr [RBP + -0x29],R9B
LAB_00129d4d:
TEST R10D,R10D
JZ 0x00129d7a
XOR ECX,ECX
LAB_00129d54:
MOVZX R8D,byte ptr [RAX + RCX*0x1]
CMP R8B,0x2d
CMOVZ R8D,R14D
MOVZX ESI,byte ptr [RBX + RCX*0x1]
CMP SIL,0x2d
CMOVZ ESI,R14D
CMP R8B,SIL
JNZ 0x00129dc1
INC RCX
CMP R13,RCX
JNZ 0x00129d54
LAB_00129d7a:
MOV qword ptr [R12],R15
MOV RSI,qword ptr [R15]
CMP byte ptr [RSI + R13*0x1],0x0
JZ 0x00129dfc
TEST R9B,R9B
JZ 0x00129dc1
TEST EDI,EDI
JZ 0x00129db5
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RDI
MOV RDI,qword ptr [RAX]
CALL 0x00124460
MOV R9B,byte ptr [RBP + -0x29]
MOV RDI,qword ptr [RBP + -0x48]
MOV R10D,dword ptr [RBP + -0x3c]
CMP EAX,0x1
SBB EDI,-0x1
JMP 0x00129dc1
LAB_00129db5:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RSI
MOV EDI,0x1
LAB_00129dc1:
MOV RAX,qword ptr [R15 + 0x70]
ADD R15,0x70
TEST RAX,RAX
JNZ 0x00129d4d
CMP EDI,0x1
JNZ 0x00129e05
LEA R9,[0x3f6338]
MOV RAX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RAX]
LEA RSI,[0x16230f]
MOV EDI,0x2
MOV EDX,R10D
MOV RCX,RBX
XOR EAX,EAX
CALL qword ptr [R9]
LAB_00129dfc:
MOV EDI,0x1
JMP 0x00129e05
LAB_00129e03:
XOR EDI,EDI
LAB_00129e05:
MOV EAX,EDI
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int findopt(long param_1,uint param_2,int8 *param_3,int8 *param_4)
{
char *__s2;
char cVar1;
int iVar2;
long lVar3;
ulong uVar4;
char cVar5;
int iVar6;
char cVar7;
long *plVar8;
cVar1 = my_getopt_prefix_matching;
plVar8 = (long *)*param_3;
lVar3 = *plVar8;
if (lVar3 == 0) {
iVar6 = 0;
}
else {
iVar6 = 0;
do {
if (param_2 != 0) {
uVar4 = 0;
do {
cVar7 = *(char *)(lVar3 + uVar4);
if (*(char *)(lVar3 + uVar4) == '-') {
cVar7 = '_';
}
cVar5 = *(char *)(param_1 + uVar4);
if (cVar5 == '-') {
cVar5 = '_';
}
if (cVar7 != cVar5) goto LAB_00129dc1;
uVar4 = uVar4 + 1;
} while (param_2 != uVar4);
}
*param_3 = plVar8;
__s2 = (char *)*plVar8;
if (__s2[param_2] == '\0') goto LAB_00129dfc;
if (cVar1 != '\0') {
if (iVar6 == 0) {
*param_4 = __s2;
iVar6 = 1;
}
else {
iVar2 = strcmp((char *)*param_4,__s2);
iVar6 = (iVar6 + 1) - (uint)(iVar2 == 0);
}
}
LAB_00129dc1:
lVar3 = plVar8[0xe];
plVar8 = plVar8 + 0xe;
} while (lVar3 != 0);
if (iVar6 == 1) {
(*(code *)my_getopt_error_reporter)
(2,
"Using unique option prefix \'%.*s\' is error-prone and can break in the future. Please use the full name \'%s\' instead."
,param_2,param_1,*param_4);
LAB_00129dfc:
iVar6 = 1;
}
}
return iVar6;
}
| |
42,355 | google::protobuf::compiler::java::UnderscoresToCamelCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/helpers.cc | std::string UnderscoresToCamelCase(const std::string& input,
bool cap_next_letter) {
GOOGLE_CHECK(!input.empty());
std::string result;
// Note: I distrust ctype.h due to locales.
for (int i = 0; i < input.size(); i++) {
if ('a' <= input[i] && input[i] <= 'z') {
if (cap_next_letter) {
result += input[i] + ('A' - 'a');
} else {
result += input[i];
}
cap_next_letter = false;
} else if ('A' <= input[i] && input[i] <= 'Z') {
if (i == 0 && !cap_next_letter) {
// Force first letter to lower-case unless explicitly told to
// capitalize it.
result += input[i] + ('a' - 'A');
} else {
// Capital letters after the first are left as-is.
result += input[i];
}
cap_next_letter = false;
} else if ('0' <= input[i] && input[i] <= '9') {
result += input[i];
cap_next_letter = true;
} else {
cap_next_letter = true;
}
}
// Add a trailing "_" if the name should be altered.
if (input[input.size() - 1] == '#') {
result += '_';
}
return result;
} | O0 | cpp | google::protobuf::compiler::java::UnderscoresToCamelCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool):
subq $0xa8, %rsp
movq %rdi, 0x28(%rsp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, 0x30(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
andb $0x1, %al
movb %al, 0x97(%rsp)
movq 0x98(%rsp), %rdi
callq 0x212d0
movb $0x0, 0x57(%rsp)
testb $0x1, %al
jne 0x73347
jmp 0x73397
leaq 0x33c973(%rip), %rdx # 0x3afcc1
leaq 0x58(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movl $0x3, %esi
movl $0xaf, %ecx
callq 0x219560
movq 0x18(%rsp), %rdi
movb $0x1, 0x57(%rsp)
leaq 0x33c9bb(%rip), %rsi # 0x3afd33
callq 0x218e20
movq %rax, 0x20(%rsp)
jmp 0x73384
movq 0x20(%rsp), %rsi
leaq 0x43(%rsp), %rdi
callq 0x218fd0
jmp 0x73395
jmp 0x73397
testb $0x1, 0x57(%rsp)
jne 0x733a0
jmp 0x733aa
leaq 0x58(%rsp), %rdi
callq 0x2195a0
movq 0x28(%rsp), %rdi
movb $0x0, 0x42(%rsp)
callq 0x21390
movl $0x0, 0x3c(%rsp)
movslq 0x3c(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x98(%rsp), %rdi
callq 0x21300
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x735f3
movq 0x98(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x21ba0
movsbl (%rax), %ecx
movl $0x61, %eax
cmpl %ecx, %eax
jg 0x734cf
movq 0x98(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x21ba0
movsbl (%rax), %eax
cmpl $0x7a, %eax
jg 0x734cf
testb $0x1, 0x97(%rsp)
je 0x7349f
movq 0x98(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x21ba0
movq 0x28(%rsp), %rdi
movzbl (%rax), %eax
addl $-0x20, %eax
movsbl %al, %esi
callq 0x21750
jmp 0x7345a
jmp 0x734c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
testb $0x1, 0x57(%rsp)
jne 0x73473
jmp 0x7347d
leaq 0x58(%rsp), %rdi
callq 0x2195a0
jmp 0x7365c
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
callq 0x21cc8
jmp 0x7365c
movq 0x98(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x21ba0
movq 0x28(%rsp), %rdi
movsbl (%rax), %esi
callq 0x21750
jmp 0x734c0
jmp 0x734c2
movb $0x0, 0x97(%rsp)
jmp 0x735e1
movq 0x98(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x21ba0
movsbl (%rax), %ecx
movl $0x41, %eax
cmpl %ecx, %eax
jg 0x73572
movq 0x98(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x21ba0
movsbl (%rax), %eax
cmpl $0x5a, %eax
jg 0x73572
cmpl $0x0, 0x3c(%rsp)
jne 0x73545
testb $0x1, 0x97(%rsp)
jne 0x73545
movq 0x98(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x21ba0
movq 0x28(%rsp), %rdi
movzbl (%rax), %eax
addl $0x20, %eax
movsbl %al, %esi
callq 0x21750
jmp 0x73543
jmp 0x73568
movq 0x98(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x21ba0
movq 0x28(%rsp), %rdi
movsbl (%rax), %esi
callq 0x21750
jmp 0x73566
jmp 0x73568
movb $0x0, 0x97(%rsp)
jmp 0x735df
movq 0x98(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x21ba0
movsbl (%rax), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jg 0x735d5
movq 0x98(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x21ba0
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0x735d5
movq 0x98(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x21ba0
movq 0x28(%rsp), %rdi
movsbl (%rax), %esi
callq 0x21750
jmp 0x735cb
movb $0x1, 0x97(%rsp)
jmp 0x735dd
movb $0x1, 0x97(%rsp)
jmp 0x735df
jmp 0x735e1
jmp 0x735e3
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x733c1
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rdi
callq 0x21300
movq 0x8(%rsp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x21ba0
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x73639
movq 0x28(%rsp), %rdi
movl $0x5f, %esi
callq 0x21750
jmp 0x73637
jmp 0x73639
movb $0x1, 0x42(%rsp)
testb $0x1, 0x42(%rsp)
jne 0x7364f
movq 0x28(%rsp), %rdi
callq 0x21cc8
movq 0x30(%rsp), %rax
addq $0xa8, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x21700
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf8compiler4java22UnderscoresToCamelCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb:
sub rsp, 0A8h
mov [rsp+0A8h+var_80], rdi
mov al, dl
mov rcx, rdi
mov [rsp+0A8h+var_78], rcx
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
and al, 1
mov [rsp+0A8h+var_11], al
mov rdi, [rsp+0A8h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
mov [rsp+0A8h+var_51], 0
test al, 1
jnz short loc_73347
jmp short loc_73397
loc_73347:
lea rdx, aWorkspaceLlm4b_8; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+0A8h+var_50]
mov [rsp+0A8h+var_90], rdi
mov esi, 3
mov ecx, 0AFh
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+0A8h+var_90]
mov [rsp+0A8h+var_51], 1
lea rsi, aCheckFailedInp; "CHECK failed: !input.empty(): "
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+0A8h+var_88], rax
jmp short $+2
loc_73384:
mov rsi, [rsp+0A8h+var_88]
lea rdi, [rsp+0A8h+var_65]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_73395:
jmp short $+2
loc_73397:
test [rsp+0A8h+var_51], 1
jnz short loc_733A0
jmp short loc_733AA
loc_733A0:
lea rdi, [rsp+0A8h+var_50]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_733AA:
mov rdi, [rsp+0A8h+var_80]
mov [rsp+0A8h+var_66], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov [rsp+0A8h+var_6C], 0
loc_733C1:
movsxd rax, [rsp+0A8h+var_6C]
mov [rsp+0A8h+var_98], rax
mov rdi, [rsp+0A8h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rsp+0A8h+var_98]
cmp rax, rcx
jnb loc_735F3
mov rdi, [rsp+0A8h+var_10]
movsxd rsi, [rsp+0A8h+var_6C]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx ecx, byte ptr [rax]
mov eax, 61h ; 'a'
cmp eax, ecx
jg loc_734CF
mov rdi, [rsp+0A8h+var_10]
movsxd rsi, [rsp+0A8h+var_6C]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx eax, byte ptr [rax]
cmp eax, 7Ah ; 'z'
jg loc_734CF
test [rsp+0A8h+var_11], 1
jz short loc_7349F
mov rdi, [rsp+0A8h+var_10]
movsxd rsi, [rsp+0A8h+var_6C]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov rdi, [rsp+0A8h+var_80]
movzx eax, byte ptr [rax]
add eax, 0FFFFFFE0h
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_7345A:
jmp short loc_734C2
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
test [rsp+arg_4F], 1
jnz short loc_73473
jmp short loc_7347D
loc_73473:
lea rdi, [rsp+arg_50]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_7347D:
jmp loc_7365C
mov rdi, [rsp+arg_20]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_7365C
loc_7349F:
mov rdi, [rsp+0A8h+var_10]
movsxd rsi, [rsp+0A8h+var_6C]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov rdi, [rsp+0A8h+var_80]
movsx esi, byte ptr [rax]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_734C0:
jmp short $+2
loc_734C2:
mov [rsp+0A8h+var_11], 0
jmp loc_735E1
loc_734CF:
mov rdi, [rsp+0A8h+var_10]
movsxd rsi, [rsp+0A8h+var_6C]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx ecx, byte ptr [rax]
mov eax, 41h ; 'A'
cmp eax, ecx
jg loc_73572
mov rdi, [rsp+0A8h+var_10]
movsxd rsi, [rsp+0A8h+var_6C]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx eax, byte ptr [rax]
cmp eax, 5Ah ; 'Z'
jg short loc_73572
cmp [rsp+0A8h+var_6C], 0
jnz short loc_73545
test [rsp+0A8h+var_11], 1
jnz short loc_73545
mov rdi, [rsp+0A8h+var_10]
movsxd rsi, [rsp+0A8h+var_6C]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov rdi, [rsp+0A8h+var_80]
movzx eax, byte ptr [rax]
add eax, 20h ; ' '
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_73543:
jmp short loc_73568
loc_73545:
mov rdi, [rsp+0A8h+var_10]
movsxd rsi, [rsp+0A8h+var_6C]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov rdi, [rsp+0A8h+var_80]
movsx esi, byte ptr [rax]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_73566:
jmp short $+2
loc_73568:
mov [rsp+0A8h+var_11], 0
jmp short loc_735DF
loc_73572:
mov rdi, [rsp+0A8h+var_10]
movsxd rsi, [rsp+0A8h+var_6C]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx ecx, byte ptr [rax]
mov eax, 30h ; '0'
cmp eax, ecx
jg short loc_735D5
mov rdi, [rsp+0A8h+var_10]
movsxd rsi, [rsp+0A8h+var_6C]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
jg short loc_735D5
mov rdi, [rsp+0A8h+var_10]
movsxd rsi, [rsp+0A8h+var_6C]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov rdi, [rsp+0A8h+var_80]
movsx esi, byte ptr [rax]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_735CB:
mov [rsp+0A8h+var_11], 1
jmp short loc_735DD
loc_735D5:
mov [rsp+0A8h+var_11], 1
loc_735DD:
jmp short $+2
loc_735DF:
jmp short $+2
loc_735E1:
jmp short $+2
loc_735E3:
mov eax, [rsp+0A8h+var_6C]
add eax, 1
mov [rsp+0A8h+var_6C], eax
jmp loc_733C1
loc_735F3:
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_A0], rax
mov rdi, [rsp+0A8h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rsp+0A8h+var_A0]
mov rsi, rax
sub rsi, 1
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx eax, byte ptr [rax]
cmp eax, 23h ; '#'
jnz short loc_73639
mov rdi, [rsp+0A8h+var_80]
mov esi, 5Fh ; '_'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char)
jmp short $+2
loc_73637:
jmp short $+2
loc_73639:
mov [rsp+0A8h+var_66], 1
test [rsp+0A8h+var_66], 1
jnz short loc_7364F
mov rdi, [rsp+0A8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_7364F:
mov rax, [rsp+0A8h+var_78]
add rsp, 0A8h
retn
loc_7365C:
mov rdi, [rsp+arg_40]
call __Unwind_Resume
| long long google::protobuf::compiler::java::UnderscoresToCamelCase(long long a1, long long a2, char a3)
{
_BYTE *v3; // rax
char *v4; // rax
_BYTE *v5; // rax
char *v6; // rax
char *v7; // rax
long long v8; // rax
long long v10; // [rsp+8h] [rbp-A0h]
long long v11; // [rsp+20h] [rbp-88h]
int i; // [rsp+3Ch] [rbp-6Ch]
_BYTE v13[20]; // [rsp+43h] [rbp-65h] BYREF
char v14; // [rsp+57h] [rbp-51h]
_BYTE v15[63]; // [rsp+58h] [rbp-50h] BYREF
char v16; // [rsp+97h] [rbp-11h]
long long v17; // [rsp+98h] [rbp-10h]
long long v18; // [rsp+A0h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3 & 1;
v14 = 0;
if ( (std::string::empty(a2) & 1) != 0 )
{
google::protobuf::internal::LogMessage::LogMessage(
v15,
3LL,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/helpers.cc",
175LL);
v14 = 1;
v11 = google::protobuf::internal::LogMessage::operator<<(v15, "CHECK failed: !input.empty(): ");
google::protobuf::internal::LogFinisher::operator=(v13, v11);
}
if ( (v14 & 1) != 0 )
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v15);
std::string::basic_string(a1);
for ( i = 0; i < (unsigned long long)std::string::size(v17); ++i )
{
if ( *(char *)std::string::operator[](v17, i) < 97 || *(char *)std::string::operator[](v17, i) > 122 )
{
if ( *(char *)std::string::operator[](v17, i) < 65 || *(char *)std::string::operator[](v17, i) > 90 )
{
if ( *(char *)std::string::operator[](v17, i) < 48 || *(char *)std::string::operator[](v17, i) > 57 )
{
v16 = 1;
}
else
{
v7 = (char *)std::string::operator[](v17, i);
std::string::operator+=(a1, (unsigned int)*v7);
v16 = 1;
}
}
else
{
if ( i || (v16 & 1) != 0 )
{
v6 = (char *)std::string::operator[](v17, i);
std::string::operator+=(a1, (unsigned int)*v6);
}
else
{
v5 = (_BYTE *)std::string::operator[](v17, 0LL);
std::string::operator+=(a1, (unsigned int)(char)(*v5 + 32));
}
v16 = 0;
}
}
else
{
if ( (v16 & 1) != 0 )
{
v3 = (_BYTE *)std::string::operator[](v17, i);
std::string::operator+=(a1, (unsigned int)(char)(*v3 - 32));
}
else
{
v4 = (char *)std::string::operator[](v17, i);
std::string::operator+=(a1, (unsigned int)*v4);
}
v16 = 0;
}
}
v10 = v17;
v8 = std::string::size(v17);
if ( *(_BYTE *)std::string::operator[](v10, v8 - 1) == 35 )
std::string::operator+=(a1, 95LL);
return a1;
}
| UnderscoresToCamelCase:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x28],RDI
MOV AL,DL
MOV RCX,RDI
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0xa0],RDI
MOV qword ptr [RSP + 0x98],RSI
AND AL,0x1
MOV byte ptr [RSP + 0x97],AL
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x001212d0
MOV byte ptr [RSP + 0x57],0x0
TEST AL,0x1
JNZ 0x00173347
JMP 0x00173397
LAB_00173347:
LEA RDX,[0x4afcc1]
LEA RDI,[RSP + 0x58]
MOV qword ptr [RSP + 0x18],RDI
MOV ESI,0x3
MOV ECX,0xaf
CALL 0x00319560
MOV RDI,qword ptr [RSP + 0x18]
MOV byte ptr [RSP + 0x57],0x1
LAB_00173371:
LEA RSI,[0x4afd33]
CALL 0x00318e20
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00173384
LAB_00173384:
MOV RSI,qword ptr [RSP + 0x20]
LEA RDI,[RSP + 0x43]
CALL 0x00318fd0
JMP 0x00173395
LAB_00173395:
JMP 0x00173397
LAB_00173397:
TEST byte ptr [RSP + 0x57],0x1
JNZ 0x001733a0
JMP 0x001733aa
LAB_001733a0:
LEA RDI,[RSP + 0x58]
CALL 0x003195a0
LAB_001733aa:
MOV RDI,qword ptr [RSP + 0x28]
MOV byte ptr [RSP + 0x42],0x0
CALL 0x00121390
MOV dword ptr [RSP + 0x3c],0x0
LAB_001733c1:
MOVSXD RAX,dword ptr [RSP + 0x3c]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x00121300
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,RCX
JNC 0x001735f3
MOV RDI,qword ptr [RSP + 0x98]
MOVSXD RSI,dword ptr [RSP + 0x3c]
CALL 0x00121ba0
MOVSX ECX,byte ptr [RAX]
MOV EAX,0x61
CMP EAX,ECX
JG 0x001734cf
MOV RDI,qword ptr [RSP + 0x98]
MOVSXD RSI,dword ptr [RSP + 0x3c]
CALL 0x00121ba0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7a
JG 0x001734cf
TEST byte ptr [RSP + 0x97],0x1
JZ 0x0017349f
MOV RDI,qword ptr [RSP + 0x98]
MOVSXD RSI,dword ptr [RSP + 0x3c]
CALL 0x00121ba0
MOV RDI,qword ptr [RSP + 0x28]
MOVZX EAX,byte ptr [RAX]
ADD EAX,-0x20
MOVSX ESI,AL
LAB_00173453:
CALL 0x00121750
JMP 0x0017345a
LAB_0017345a:
JMP 0x001734c2
LAB_0017349f:
MOV RDI,qword ptr [RSP + 0x98]
MOVSXD RSI,dword ptr [RSP + 0x3c]
CALL 0x00121ba0
MOV RDI,qword ptr [RSP + 0x28]
MOVSX ESI,byte ptr [RAX]
CALL 0x00121750
JMP 0x001734c0
LAB_001734c0:
JMP 0x001734c2
LAB_001734c2:
MOV byte ptr [RSP + 0x97],0x0
JMP 0x001735e1
LAB_001734cf:
MOV RDI,qword ptr [RSP + 0x98]
MOVSXD RSI,dword ptr [RSP + 0x3c]
CALL 0x00121ba0
MOVSX ECX,byte ptr [RAX]
MOV EAX,0x41
CMP EAX,ECX
JG 0x00173572
MOV RDI,qword ptr [RSP + 0x98]
MOVSXD RSI,dword ptr [RSP + 0x3c]
CALL 0x00121ba0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5a
JG 0x00173572
CMP dword ptr [RSP + 0x3c],0x0
JNZ 0x00173545
TEST byte ptr [RSP + 0x97],0x1
JNZ 0x00173545
MOV RDI,qword ptr [RSP + 0x98]
MOVSXD RSI,dword ptr [RSP + 0x3c]
CALL 0x00121ba0
MOV RDI,qword ptr [RSP + 0x28]
MOVZX EAX,byte ptr [RAX]
ADD EAX,0x20
MOVSX ESI,AL
CALL 0x00121750
JMP 0x00173543
LAB_00173543:
JMP 0x00173568
LAB_00173545:
MOV RDI,qword ptr [RSP + 0x98]
MOVSXD RSI,dword ptr [RSP + 0x3c]
CALL 0x00121ba0
MOV RDI,qword ptr [RSP + 0x28]
MOVSX ESI,byte ptr [RAX]
CALL 0x00121750
JMP 0x00173566
LAB_00173566:
JMP 0x00173568
LAB_00173568:
MOV byte ptr [RSP + 0x97],0x0
JMP 0x001735df
LAB_00173572:
MOV RDI,qword ptr [RSP + 0x98]
MOVSXD RSI,dword ptr [RSP + 0x3c]
CALL 0x00121ba0
MOVSX ECX,byte ptr [RAX]
MOV EAX,0x30
CMP EAX,ECX
JG 0x001735d5
MOV RDI,qword ptr [RSP + 0x98]
MOVSXD RSI,dword ptr [RSP + 0x3c]
CALL 0x00121ba0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
JG 0x001735d5
MOV RDI,qword ptr [RSP + 0x98]
MOVSXD RSI,dword ptr [RSP + 0x3c]
CALL 0x00121ba0
MOV RDI,qword ptr [RSP + 0x28]
MOVSX ESI,byte ptr [RAX]
CALL 0x00121750
JMP 0x001735cb
LAB_001735cb:
MOV byte ptr [RSP + 0x97],0x1
JMP 0x001735dd
LAB_001735d5:
MOV byte ptr [RSP + 0x97],0x1
LAB_001735dd:
JMP 0x001735df
LAB_001735df:
JMP 0x001735e1
LAB_001735e1:
JMP 0x001735e3
LAB_001735e3:
MOV EAX,dword ptr [RSP + 0x3c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x001733c1
LAB_001735f3:
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x00121300
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
SUB RSI,0x1
CALL 0x00121ba0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x23
JNZ 0x00173639
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0x5f
CALL 0x00121750
LAB_00173635:
JMP 0x00173637
LAB_00173637:
JMP 0x00173639
LAB_00173639:
MOV byte ptr [RSP + 0x42],0x1
TEST byte ptr [RSP + 0x42],0x1
JNZ 0x0017364f
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00121cc8
LAB_0017364f:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0xa8
RET
|
/* WARNING: Removing unreachable block (ram,0x00173645) */
/* google::protobuf::compiler::java::UnderscoresToCamelCase(std::__cxx11::string const&, bool) */
java * __thiscall
google::protobuf::compiler::java::UnderscoresToCamelCase(java *this,string *param_1,bool param_2)
{
string *psVar1;
ulong uVar2;
LogMessage *pLVar3;
char *pcVar4;
int local_6c;
LogFinisher local_65 [20];
byte local_51;
LogMessage local_50 [63];
byte local_11;
string *local_10;
java *local_8;
local_11 = param_2;
local_10 = param_1;
local_8 = this;
uVar2 = std::__cxx11::string::empty();
local_51 = 0;
if ((uVar2 & 1) != 0) {
internal::LogMessage::LogMessage
(local_50,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/helpers.cc"
,0xaf);
local_51 = 1;
/* try { // try from 00173371 to 00173392 has its CatchHandler @ 0017345c */
pLVar3 = (LogMessage *)
internal::LogMessage::operator<<(local_50,"CHECK failed: !input.empty(): ");
internal::LogFinisher::operator=(local_65,pLVar3);
}
if ((local_51 & 1) != 0) {
internal::LogMessage::~LogMessage(local_50);
}
std::__cxx11::string::string((string *)this);
for (local_6c = 0; uVar2 = std::__cxx11::string::size(), psVar1 = local_10,
(ulong)(long)local_6c < uVar2; local_6c = local_6c + 1) {
pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)local_10);
if ((*pcVar4 < 'a') ||
(pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)local_10), 'z' < *pcVar4)) {
pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)local_10);
if ((*pcVar4 < 'A') ||
(pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)local_10), 'Z' < *pcVar4)) {
pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)local_10);
if (('/' < *pcVar4) &&
(pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)local_10), *pcVar4 < ':')) {
pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)local_10);
std::__cxx11::string::operator+=((string *)this,*pcVar4);
}
local_11 = 1;
}
else {
if ((local_6c == 0) && ((local_11 & 1) == 0)) {
pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)local_10);
std::__cxx11::string::operator+=((string *)this,*pcVar4 + ' ');
}
else {
pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)local_10);
std::__cxx11::string::operator+=((string *)this,*pcVar4);
}
local_11 = 0;
}
}
else {
if ((local_11 & 1) == 0) {
pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)local_10);
std::__cxx11::string::operator+=((string *)this,*pcVar4);
}
else {
pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)local_10);
/* try { // try from 00173453 to 00173634 has its CatchHandler @ 00173482 */
std::__cxx11::string::operator+=((string *)this,*pcVar4 + -0x20);
}
local_11 = 0;
}
}
std::__cxx11::string::size();
pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)psVar1);
if (*pcVar4 == '#') {
std::__cxx11::string::operator+=((string *)this,'_');
}
return this;
}
| |
42,356 | minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/minja.hpp | VariableExpr(const Location & location, const std::string& n)
: Expression(location), name(n) {} | O1 | cpp | minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x6f941(%rip), %r15 # 0xed528
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 0x7dc17
movq 0x71387(%rip), %rcx # 0xeef90
cmpb $0x0, (%rcx)
je 0x7dc13
incl 0x8(%rax)
jmp 0x7dc17
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x7030a(%rip), %rax # 0xedf30
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 0x2887a
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x7dc62
callq 0x42d00
movq %r14, %rdi
callq 0x19be0
| _ZN5minja12VariableExprC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
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_7DC17
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_7DC13
inc dword ptr [rax+8]
jmp short loc_7DC17
loc_7DC13:
lock inc dword ptr [rax+8]
loc_7DC17:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja12VariableExprE; `vtable for'minja::VariableExpr
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)
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_7DC62
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7DC62:
mov rdi, r14
call __Unwind_Resume
| long long minja::VariableExpr::VariableExpr(_QWORD *a1, _QWORD *a2, long long a3)
{
long long v3; // rax
*a1 = &`vtable for'minja::Expression + 2;
a1[1] = *a2;
v3 = a2[1];
a1[2] = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v3 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v3 + 8));
}
a1[3] = a2[2];
*a1 = &`vtable for'minja::VariableExpr + 2;
a1[4] = a1 + 6;
return std::string::_M_construct<char *>(a1 + 4, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
}
| VariableExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[0x1ed528]
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 0x0017dc17
MOV RCX,qword ptr [0x001eef90]
CMP byte ptr [RCX],0x0
JZ 0x0017dc13
INC dword ptr [RAX + 0x8]
JMP 0x0017dc17
LAB_0017dc13:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0017dc17:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x1edf30]
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_0017dc43:
CALL 0x0012887a
LAB_0017dc48:
POP RBX
POP R14
POP R15
RET
|
/* minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::string const&) */
void __thiscall
minja::VariableExpr::VariableExpr(VariableExpr *this,Location *param_1,string *param_2)
{
long lVar1;
*(int ***)this = &PTR___cxa_pure_virtual_001ed538;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001eef90 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_evaluate_001edf40;
*(VariableExpr **)(this + 0x20) = this + 0x30;
/* try { // try from 0017dc43 to 0017dc47 has its CatchHandler @ 0017dc4e */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
return;
}
| |
42,357 | minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/minja.hpp | VariableExpr(const Location & location, const std::string& n)
: Expression(location), name(n) {} | O3 | cpp | minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbx
movq %rdi, %rbx
leaq 0x6ef89(%rip), %rax # 0xeaf30
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x20(%rdi), %rdi
leaq 0x30(%rbx), %rax
cmpq %rax, %rdi
je 0x7bfc6
movq (%rax), %rsi
incq %rsi
callq 0x196b0
leaq 0x6e55b(%rip), %rax # 0xea528
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x7bfe2
callq 0x4200c
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x196b0
| _ZN5minja12VariableExprD0Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja12VariableExprE; `vtable for'minja::VariableExpr
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+20h]; void *
lea rax, [rbx+30h]
cmp rdi, rax
jz short loc_7BFC6
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7BFC6:
lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_7BFE2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7BFE2:
mov esi, 40h ; '@'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void minja::VariableExpr::~VariableExpr(minja::VariableExpr *this)
{
char *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::VariableExpr + 2;
v2 = (char *)*((_QWORD *)this + 4);
if ( v2 != (char *)this + 48 )
operator delete(v2, *((_QWORD *)this + 6) + 1LL);
*(_QWORD *)this = &`vtable for'minja::Expression + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
operator delete(this, 0x40uLL);
}
| ~VariableExpr:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1eaf30]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x20]
LEA RAX,[RBX + 0x30]
CMP RDI,RAX
JZ 0x0017bfc6
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x001196b0
LAB_0017bfc6:
LEA RAX,[0x1ea528]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x0017bfe2
CALL 0x0014200c
LAB_0017bfe2:
MOV ESI,0x40
MOV RDI,RBX
POP RBX
JMP 0x001196b0
|
/* minja::VariableExpr::~VariableExpr() */
void __thiscall minja::VariableExpr::~VariableExpr(VariableExpr *this)
{
*(int ***)this = &PTR_do_evaluate_001eaf40;
if (*(VariableExpr **)(this + 0x20) != this + 0x30) {
operator_delete(*(VariableExpr **)(this + 0x20),*(long *)(this + 0x30) + 1);
}
*(int ***)this = &PTR___cxa_pure_virtual_001ea538;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10));
}
operator_delete(this,0x40);
return;
}
| |
42,358 | open_isam_files | eloqsql/storage/myisam/myisampack.c | static my_bool open_isam_files(PACK_MRG_INFO *mrg, char **names, uint count)
{
uint i,j;
mrg->count=0;
mrg->current=0;
mrg->file=(MI_INFO**) my_malloc(PSI_NOT_INSTRUMENTED, sizeof(MI_INFO*)*count,MYF(MY_FAE));
mrg->free_file=1;
mrg->src_file_has_indexes_disabled= 0;
for (i=0; i < count ; i++)
{
if (!(mrg->file[i]=open_isam_file(names[i],O_RDONLY)))
goto error;
mrg->src_file_has_indexes_disabled|=
! mi_is_all_keys_active(mrg->file[i]->s->state.key_map,
mrg->file[i]->s->base.keys);
}
/* Check that files are identical */
for (j=0 ; j < count-1 ; j++)
{
MI_COLUMNDEF *m1,*m2,*end;
if (mrg->file[j]->s->base.reclength != mrg->file[j+1]->s->base.reclength ||
mrg->file[j]->s->base.fields != mrg->file[j+1]->s->base.fields)
goto diff_file;
m1=mrg->file[j]->s->rec;
end=m1+mrg->file[j]->s->base.fields;
m2=mrg->file[j+1]->s->rec;
for ( ; m1 != end ; m1++,m2++)
{
if (m1->type != m2->type || m1->length != m2->length)
goto diff_file;
}
}
mrg->count=count;
return 0;
diff_file:
(void) fprintf(stderr, "%s: Tables '%s' and '%s' are not identical\n",
my_progname, names[j], names[j+1]);
error:
while (i--)
mi_close(mrg->file[i]);
my_free(mrg->file);
return 1;
} | O0 | c | open_isam_files:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x1c(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movl -0x1c(%rbp), %eax
movl %eax, %esi
shlq $0x3, %rsi
xorl %edi, %edi
movl $0x8, %edx
callq 0x8a930
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x18(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x38(%rax)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x29d38
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
xorl %esi, %esi
callq 0x2aab0
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movl -0x20(%rbp), %edx
movq %rax, (%rcx,%rdx,8)
cmpq $0x0, %rax
jne 0x29c9a
jmp 0x29ecb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq 0xc0(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
cmpl $0x40, 0x180(%rax)
jae 0x29cfb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movl 0x180(%rax), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x29d08
movq $-0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x29d08
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
cmpq %rcx, %rax
sete %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %edx
movq -0x10(%rbp), %rax
movsbl 0x38(%rax), %ecx
orl %edx, %ecx
movb %cl, 0x38(%rax)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x29c63
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x29e7e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq 0x140(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movl -0x24(%rbp), %edx
addl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
movq (%rcx), %rcx
cmpq 0x140(%rcx), %rax
jne 0x29dbe
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq 0x168(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movl -0x24(%rbp), %edx
addl $0x1, %edx
movl %edx, %edx
movq (%rcx,%rdx,8), %rcx
movq (%rcx), %rcx
cmpq 0x168(%rcx), %rax
je 0x29dc3
jmp 0x29e8e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq 0x230(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movl -0x24(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movq (%rcx), %rcx
imulq $0x30, 0x168(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq 0x230(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x29e6e
movq -0x30(%rbp), %rax
movl (%rax), %eax
movq -0x38(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x29e50
movq -0x30(%rbp), %rax
movzwl 0x4(%rax), %eax
movq -0x38(%rbp), %rcx
movzwl 0x4(%rcx), %ecx
cmpl %ecx, %eax
je 0x29e52
jmp 0x29e8e
jmp 0x29e54
movq -0x30(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x38(%rbp)
jmp 0x29e24
jmp 0x29e70
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x29d3f
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x29f02
movq 0x21a14b(%rip), %rax # 0x243fe0
movq (%rax), %rdi
leaq 0x3dc1a1(%rip), %rax # 0x406040
movq (%rax), %rdx
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rcx
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %esi
addl $0x1, %esi
movl %esi, %esi
movq (%rax,%rsi,8), %r8
leaq 0xb989c(%rip), %rsi # 0xe3760
movb $0x0, %al
callq 0x29570
jmp 0x29ecd
movl -0x20(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x20(%rbp)
cmpl $0x0, %eax
je 0x29ef2
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x30030
jmp 0x29ecd
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x8acb0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| open_isam_files:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_10]
mov dword ptr [rax+1Ch], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+8], 0
mov eax, [rbp+var_1C]
mov esi, eax
shl rsi, 3
xor edi, edi
mov edx, 8
call my_malloc
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+18h], 1
mov rax, [rbp+var_10]
mov byte ptr [rax+38h], 0
mov [rbp+var_20], 0
loc_29C63:
mov eax, [rbp+var_20]
cmp eax, [rbp+var_1C]
jnb loc_29D38
mov rax, [rbp+var_18]
mov ecx, [rbp+var_20]
mov rdi, [rax+rcx*8]
xor esi, esi
call open_isam_file
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov edx, [rbp+var_20]
mov [rcx+rdx*8], rax
cmp rax, 0
jnz short loc_29C9A
jmp loc_29ECB
loc_29C9A:
mov rax, [rbp+var_10]
mov rax, [rax]
mov ecx, [rbp+var_20]
mov rax, [rax+rcx*8]
mov rax, [rax]
mov rax, [rax+0C0h]
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov ecx, [rbp+var_20]
mov rax, [rax+rcx*8]
mov rax, [rax]
cmp dword ptr [rax+180h], 40h ; '@'
jnb short loc_29CFB
mov rax, [rbp+var_10]
mov rax, [rax]
mov ecx, [rbp+var_20]
mov rax, [rax+rcx*8]
mov rax, [rax]
mov eax, [rax+180h]
mov ecx, eax
mov eax, 1
shl rax, cl
sub rax, 1
mov [rbp+var_50], rax
jmp short loc_29D08
loc_29CFB:
mov rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_50], rax
jmp short $+2
loc_29D08:
mov rax, [rbp+var_48]
mov rcx, [rbp+var_50]
cmp rax, rcx
setz al
xor al, 0FFh
and al, 1
movzx edx, al
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax+38h]
or ecx, edx
mov [rax+38h], cl
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
jmp loc_29C63
loc_29D38:
mov [rbp+var_24], 0
loc_29D3F:
mov eax, [rbp+var_24]
mov ecx, [rbp+var_1C]
sub ecx, 1
cmp eax, ecx
jnb loc_29E7E
mov rax, [rbp+var_10]
mov rax, [rax]
mov ecx, [rbp+var_24]
mov rax, [rax+rcx*8]
mov rax, [rax]
mov rax, [rax+140h]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov edx, [rbp+var_24]
add edx, 1
mov edx, edx
mov rcx, [rcx+rdx*8]
mov rcx, [rcx]
cmp rax, [rcx+140h]
jnz short loc_29DBE
mov rax, [rbp+var_10]
mov rax, [rax]
mov ecx, [rbp+var_24]
mov rax, [rax+rcx*8]
mov rax, [rax]
mov rax, [rax+168h]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov edx, [rbp+var_24]
add edx, 1
mov edx, edx
mov rcx, [rcx+rdx*8]
mov rcx, [rcx]
cmp rax, [rcx+168h]
jz short loc_29DC3
loc_29DBE:
jmp loc_29E8E
loc_29DC3:
mov rax, [rbp+var_10]
mov rax, [rax]
mov ecx, [rbp+var_24]
mov rax, [rax+rcx*8]
mov rax, [rax]
mov rax, [rax+230h]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov edx, [rbp+var_24]
mov rcx, [rcx+rdx*8]
mov rcx, [rcx]
imul rcx, [rcx+168h], 30h ; '0'
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov ecx, [rbp+var_24]
add ecx, 1
mov ecx, ecx
mov rax, [rax+rcx*8]
mov rax, [rax]
mov rax, [rax+230h]
mov [rbp+var_38], rax
loc_29E24:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_40]
jz short loc_29E6E
mov rax, [rbp+var_30]
mov eax, [rax]
mov rcx, [rbp+var_38]
cmp eax, [rcx]
jnz short loc_29E50
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+4]
mov rcx, [rbp+var_38]
movzx ecx, word ptr [rcx+4]
cmp eax, ecx
jz short loc_29E52
loc_29E50:
jmp short loc_29E8E
loc_29E52:
jmp short $+2
loc_29E54:
mov rax, [rbp+var_30]
add rax, 30h ; '0'
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, 30h ; '0'
mov [rbp+var_38], rax
jmp short loc_29E24
loc_29E6E:
jmp short $+2
loc_29E70:
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp loc_29D3F
loc_29E7E:
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
mov [rax+1Ch], ecx
mov [rbp+var_1], 0
jmp short loc_29F02
loc_29E8E:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rax, my_progname
mov rdx, [rax]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_24]
mov rcx, [rax+rcx*8]
mov rax, [rbp+var_18]
mov esi, [rbp+var_24]
add esi, 1
mov esi, esi
mov r8, [rax+rsi*8]
lea rsi, aSTablesSAndSAr; "%s: Tables '%s' and '%s' are not identi"...
mov al, 0
call _fprintf
loc_29ECB:
jmp short $+2
loc_29ECD:
mov eax, [rbp+var_20]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_20], ecx
cmp eax, 0
jz short loc_29EF2
mov rax, [rbp+var_10]
mov rax, [rax]
mov ecx, [rbp+var_20]
mov rdi, [rax+rcx*8]
call mi_close
jmp short loc_29ECD
loc_29EF2:
mov rax, [rbp+var_10]
mov rdi, [rax]
call my_free
mov [rbp+var_1], 1
loc_29F02:
mov al, [rbp+var_1]
add rsp, 50h
pop rbp
retn
| char open_isam_files(long long a1, long long a2, unsigned int a3)
{
long long v3; // rax
long long v6; // [rsp+0h] [rbp-50h]
long long v7; // [rsp+10h] [rbp-40h]
long long v8; // [rsp+18h] [rbp-38h]
long long v9; // [rsp+20h] [rbp-30h]
unsigned int j; // [rsp+2Ch] [rbp-24h]
unsigned int i; // [rsp+30h] [rbp-20h]
*(_DWORD *)(a1 + 28) = 0;
*(_QWORD *)(a1 + 8) = 0LL;
*(_QWORD *)a1 = my_malloc(0LL, 8LL * a3, 8LL);
*(_DWORD *)(a1 + 24) = 1;
*(_BYTE *)(a1 + 56) = 0;
for ( i = 0; i < a3; ++i )
{
v3 = open_isam_file(*(_QWORD *)(a2 + 8LL * i), 0LL);
*(_QWORD *)(*(_QWORD *)a1 + 8LL * i) = v3;
if ( !v3 )
goto LABEL_22;
if ( *(_DWORD *)(**(_QWORD **)(*(_QWORD *)a1 + 8LL * i) + 384LL) >= 0x40u )
v6 = -1LL;
else
v6 = (1LL << *(_DWORD *)(**(_QWORD **)(*(_QWORD *)a1 + 8LL * i) + 384LL)) - 1;
*(_BYTE *)(a1 + 56) |= *(_QWORD *)(**(_QWORD **)(*(_QWORD *)a1 + 8LL * i) + 192LL) != v6;
}
for ( j = 0; ; ++j )
{
if ( j >= a3 - 1 )
{
*(_DWORD *)(a1 + 28) = a3;
return 0;
}
if ( *(_QWORD *)(**(_QWORD **)(*(_QWORD *)a1 + 8LL * j) + 320LL) != *(_QWORD *)(**(_QWORD **)(*(_QWORD *)a1
+ 8LL * (j + 1))
+ 320LL)
|| *(_QWORD *)(**(_QWORD **)(*(_QWORD *)a1 + 8LL * j) + 360LL) != *(_QWORD *)(**(_QWORD **)(*(_QWORD *)a1
+ 8LL * (j + 1))
+ 360LL) )
{
break;
}
v9 = *(_QWORD *)(**(_QWORD **)(*(_QWORD *)a1 + 8LL * j) + 560LL);
v7 = 48LL * *(_QWORD *)(**(_QWORD **)(*(_QWORD *)a1 + 8LL * j) + 360LL) + v9;
v8 = *(_QWORD *)(**(_QWORD **)(*(_QWORD *)a1 + 8LL * (j + 1)) + 560LL);
while ( v9 != v7 )
{
if ( *(_DWORD *)v9 != *(_DWORD *)v8 || *(unsigned __int16 *)(v9 + 4) != *(unsigned __int16 *)(v8 + 4) )
goto LABEL_21;
v9 += 48LL;
v8 += 48LL;
}
}
LABEL_21:
fprintf(
stderr,
"%s: Tables '%s' and '%s' are not identical\n",
my_progname,
*(const char **)(a2 + 8LL * j),
*(const char **)(a2 + 8LL * (j + 1)));
LABEL_22:
while ( i-- )
mi_close(*(_QWORD *)(*(_QWORD *)a1 + 8LL * i));
my_free(*(_QWORD *)a1);
return 1;
}
| open_isam_files:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],0x0
MOV EAX,dword ptr [RBP + -0x1c]
MOV ESI,EAX
SHL RSI,0x3
XOR EDI,EDI
MOV EDX,0x8
CALL 0x0018a930
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x38],0x0
MOV dword ptr [RBP + -0x20],0x0
LAB_00129c63:
MOV EAX,dword ptr [RBP + -0x20]
CMP EAX,dword ptr [RBP + -0x1c]
JNC 0x00129d38
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + RCX*0x8]
XOR ESI,ESI
CALL 0x0012aab0
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x20]
MOV qword ptr [RCX + RDX*0x8],RAX
CMP RAX,0x0
JNZ 0x00129c9a
JMP 0x00129ecb
LAB_00129c9a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xc0]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x180],0x40
JNC 0x00129cfb
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x180]
MOV ECX,EAX
MOV EAX,0x1
SHL RAX,CL
SUB RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00129d08
LAB_00129cfb:
MOV RAX,-0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00129d08
LAB_00129d08:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x50]
CMP RAX,RCX
SETZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EDX,AL
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX + 0x38]
OR ECX,EDX
MOV byte ptr [RAX + 0x38],CL
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x00129c63
LAB_00129d38:
MOV dword ptr [RBP + -0x24],0x0
LAB_00129d3f:
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,dword ptr [RBP + -0x1c]
SUB ECX,0x1
CMP EAX,ECX
JNC 0x00129e7e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x140]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x24]
ADD EDX,0x1
MOV EDX,EDX
MOV RCX,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x140]
JNZ 0x00129dbe
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x168]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x24]
ADD EDX,0x1
MOV EDX,EDX
MOV RCX,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x168]
JZ 0x00129dc3
LAB_00129dbe:
JMP 0x00129e8e
LAB_00129dc3:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x230]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RCX + RDX*0x8]
MOV RCX,qword ptr [RCX]
IMUL RCX,qword ptr [RCX + 0x168],0x30
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x24]
ADD ECX,0x1
MOV ECX,ECX
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x230]
MOV qword ptr [RBP + -0x38],RAX
LAB_00129e24:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x40]
JZ 0x00129e6e
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x38]
CMP EAX,dword ptr [RCX]
JNZ 0x00129e50
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,word ptr [RCX + 0x4]
CMP EAX,ECX
JZ 0x00129e52
LAB_00129e50:
JMP 0x00129e8e
LAB_00129e52:
JMP 0x00129e54
LAB_00129e54:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x30
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x30
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00129e24
LAB_00129e6e:
JMP 0x00129e70
LAB_00129e70:
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x00129d3f
LAB_00129e7e:
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1c],ECX
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00129f02
LAB_00129e8e:
MOV RAX,qword ptr [0x00343fe0]
MOV RDI,qword ptr [RAX]
LEA RAX,[0x506040]
MOV RDX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x24]
ADD ESI,0x1
MOV ESI,ESI
MOV R8,qword ptr [RAX + RSI*0x8]
LEA RSI,[0x1e3760]
MOV AL,0x0
CALL 0x00129570
LAB_00129ecb:
JMP 0x00129ecd
LAB_00129ecd:
MOV EAX,dword ptr [RBP + -0x20]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x20],ECX
CMP EAX,0x0
JZ 0x00129ef2
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + RCX*0x8]
CALL 0x00130030
JMP 0x00129ecd
LAB_00129ef2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0018acb0
MOV byte ptr [RBP + -0x1],0x1
LAB_00129f02:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x50
POP RBP
RET
|
int1 open_isam_files(long *param_1,long param_2,uint param_3)
{
long lVar1;
int *piVar2;
long local_58;
int *local_40;
int *local_38;
uint local_2c;
uint local_28;
*(int4 *)((long)param_1 + 0x1c) = 0;
param_1[1] = 0;
lVar1 = my_malloc(0,(ulong)param_3 << 3,8);
*param_1 = lVar1;
*(int4 *)(param_1 + 3) = 1;
*(int1 *)(param_1 + 7) = 0;
for (local_28 = 0; local_28 < param_3; local_28 = local_28 + 1) {
lVar1 = open_isam_file(*(int8 *)(param_2 + (ulong)local_28 * 8),0);
*(long *)(*param_1 + (ulong)local_28 * 8) = lVar1;
if (lVar1 == 0) goto LAB_00129ecd;
if (*(uint *)(**(long **)(*param_1 + (ulong)local_28 * 8) + 0x180) < 0x40) {
local_58 = (1L << ((byte)*(int4 *)(**(long **)(*param_1 + (ulong)local_28 * 8) + 0x180)
& 0x3f)) + -1;
}
else {
local_58 = -1;
}
*(byte *)(param_1 + 7) =
*(byte *)(param_1 + 7) |
(*(long *)(**(long **)(*param_1 + (ulong)local_28 * 8) + 0xc0) == local_58 ^ 0xffU) & 1;
}
local_2c = 0;
while( true ) {
if (param_3 - 1 <= local_2c) {
*(uint *)((long)param_1 + 0x1c) = param_3;
return 0;
}
if ((*(long *)(**(long **)(*param_1 + (ulong)local_2c * 8) + 0x140) !=
*(long *)(**(long **)(*param_1 + (ulong)(local_2c + 1) * 8) + 0x140)) ||
(*(long *)(**(long **)(*param_1 + (ulong)local_2c * 8) + 0x168) !=
*(long *)(**(long **)(*param_1 + (ulong)(local_2c + 1) * 8) + 0x168))) break;
local_38 = *(int **)(**(long **)(*param_1 + (ulong)local_2c * 8) + 0x230);
piVar2 = local_38 + *(long *)(**(long **)(*param_1 + (ulong)local_2c * 8) + 0x168) * 0xc;
local_40 = *(int **)(**(long **)(*param_1 + (ulong)(local_2c + 1) * 8) + 0x230);
for (; local_38 != piVar2; local_38 = local_38 + 0xc) {
if ((*local_38 != *local_40) || ((short)local_38[1] != (short)local_40[1])) goto LAB_00129e8e;
local_40 = local_40 + 0xc;
}
local_2c = local_2c + 1;
}
LAB_00129e8e:
fprintf(*(FILE **)PTR_stderr_00343fe0,"%s: Tables \'%s\' and \'%s\' are not identical\n",
my_progname,*(int8 *)(param_2 + (ulong)local_2c * 8),
*(int8 *)(param_2 + (ulong)(local_2c + 1) * 8));
LAB_00129ecd:
while (local_28 != 0) {
mi_close(*(int8 *)(*param_1 + (ulong)(local_28 - 1) * 8));
local_28 = local_28 - 1;
}
my_free(*param_1);
return 1;
}
| |
42,359 | hexdigits | eloqsql/storage/myisam/myisampack.c | static char *hexdigits(ulonglong value)
{
static char digits[20];
char *ptr= digits;
uint idx= 2 * sizeof(value); /* Two hex digits per byte. */
DBUG_ASSERT(idx < sizeof(digits));
while (idx)
{
if ((*(ptr++)= '0' + ((char) (value >> (4 * (--idx))) & (char) 0xf)) > '9')
*(ptr - 1)+= 'a' - '9' - 1;
}
*ptr= '\0';
return digits;
} | O0 | c | hexdigits:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
leaq 0x3cda81(%rip), %rax # 0x3fd7d0
movq %rax, -0x10(%rbp)
movl $0x10, -0x14(%rbp)
jmp 0x2fd5c
jmp 0x2fd5e
cmpl $0x0, -0x14(%rbp)
je 0x2fdab
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $-0x1, %ecx
movl %ecx, -0x14(%rbp)
shll $0x2, %ecx
movl %ecx, %ecx
shrq %cl, %rax
movsbl %al, %eax
andl $0xf, %eax
addl $0x30, %eax
movq -0x10(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %al, (%rcx)
movsbl %al, %eax
cmpl $0x39, %eax
jle 0x2fda9
movq -0x10(%rbp), %rax
movsbl -0x1(%rax), %ecx
addl $0x27, %ecx
movb %cl, -0x1(%rax)
jmp 0x2fd5e
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
leaq 0x3cda17(%rip), %rax # 0x3fd7d0
popq %rbp
retq
nopl (%rax,%rax)
| hexdigits:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
lea rax, hexdigits_digits
mov [rbp+var_10], rax
mov [rbp+var_14], 10h
jmp short $+2
loc_2FD5C:
jmp short $+2
loc_2FD5E:
cmp [rbp+var_14], 0
jz short loc_2FDAB
mov rax, [rbp+var_8]
mov ecx, [rbp+var_14]
add ecx, 0FFFFFFFFh
mov [rbp+var_14], ecx
shl ecx, 2
mov ecx, ecx
shr rax, cl
movsx eax, al
and eax, 0Fh
add eax, 30h ; '0'
mov rcx, [rbp+var_10]
mov rdx, rcx
add rdx, 1
mov [rbp+var_10], rdx
mov [rcx], al
movsx eax, al
cmp eax, 39h ; '9'
jle short loc_2FDA9
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax-1]
add ecx, 27h ; '''
mov [rax-1], cl
loc_2FDA9:
jmp short loc_2FD5E
loc_2FDAB:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
lea rax, hexdigits_digits
pop rbp
retn
| void * hexdigits(unsigned long long a1)
{
char v1; // al
_BYTE *v2; // rcx
int v4; // [rsp+0h] [rbp-14h]
_BYTE *v5; // [rsp+4h] [rbp-10h]
v5 = &hexdigits_digits;
v4 = 16;
while ( v4 )
{
v1 = ((a1 >> (4 * (unsigned __int8)--v4)) & 0xF) + 48;
v2 = v5++;
*v2 = v1;
if ( v1 > 57 )
*(v5 - 1) += 39;
}
*v5 = 0;
return &hexdigits_digits;
}
| hexdigits:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
LEA RAX,[0x4fd7d0]
MOV qword ptr [RBP + -0x10],RAX
MOV dword ptr [RBP + -0x14],0x10
JMP 0x0012fd5c
LAB_0012fd5c:
JMP 0x0012fd5e
LAB_0012fd5e:
CMP dword ptr [RBP + -0x14],0x0
JZ 0x0012fdab
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x14]
ADD ECX,-0x1
MOV dword ptr [RBP + -0x14],ECX
SHL ECX,0x2
MOV ECX,ECX
SHR RAX,CL
MOVSX EAX,AL
AND EAX,0xf
ADD EAX,0x30
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RCX],AL
MOVSX EAX,AL
CMP EAX,0x39
JLE 0x0012fda9
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX + -0x1]
ADD ECX,0x27
MOV byte ptr [RAX + -0x1],CL
LAB_0012fda9:
JMP 0x0012fd5e
LAB_0012fdab:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
LEA RAX,[0x4fd7d0]
POP RBP
RET
|
int1 * hexdigits(ulong param_1)
{
byte *pbVar1;
byte bVar2;
int local_1c;
byte *local_18;
local_18 = &hexdigits_digits;
local_1c = 0x10;
pbVar1 = local_18;
while (local_18 = pbVar1, local_1c != 0) {
local_1c = local_1c + -1;
bVar2 = ((byte)(param_1 >> ((char)local_1c * '\x04' & 0x3fU)) & 0xf) + 0x30;
*local_18 = bVar2;
pbVar1 = local_18 + 1;
if (0x39 < bVar2) {
*local_18 = *local_18 + 0x27;
}
}
*local_18 = 0;
return &hexdigits_digits;
}
| |
42,360 | mthd_my_send_cmd | eloqsql/libmariadb/libmariadb/mariadb_lib.c | int
mthd_my_send_cmd(MYSQL *mysql,enum enum_server_command command, const char *arg,
size_t length, my_bool skip_check, void *opt_arg)
{
NET *net= &mysql->net;
int result= -1;
if (mysql->net.pvio == 0)
{
/* Do reconnect if possible */
if (mariadb_reconnect(mysql))
return(1);
}
if (mysql->status != MYSQL_STATUS_READY ||
mysql->server_status & SERVER_MORE_RESULTS_EXIST)
{
SET_CLIENT_ERROR(mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
goto end;
}
if (IS_CONNHDLR_ACTIVE(mysql))
{
result= mysql->extension->conn_hdlr->plugin->set_connection(mysql, command, arg, length, skip_check, opt_arg);
if (result== -1)
return(result);
}
CLEAR_CLIENT_ERROR(mysql);
if (command == COM_QUERY ||
command == COM_STMT_PREPARE)
{
if ((mysql->options.client_flag & CLIENT_LOCAL_FILES) &&
mysql->options.extension && mysql->extension->auto_local_infile == WAIT_FOR_QUERY &&
arg && (*arg == 'l' || *arg == 'L'))
{
if (strncasecmp(arg, "load", 4) == 0)
mysql->extension->auto_local_infile= ACCEPT_FILE_REQUEST;
}
}
mysql->info=0;
mysql->affected_rows= ~(unsigned long long) 0;
ma_net_clear(net); /* Clear receive buffer */
if (!arg)
arg="";
if (net->extension->multi_status== COM_MULTI_ENABLED)
{
return net_add_multi_command(net, command, (const uchar *)arg, length);
}
if (ma_net_write_command(net,(uchar) command,arg,
length ? length : (ulong) strlen(arg), 0))
{
if (net->last_errno == ER_NET_PACKET_TOO_LARGE)
{
my_set_error(mysql, CR_NET_PACKET_TOO_LARGE, SQLSTATE_UNKNOWN, 0);
goto end;
}
end_server(mysql);
if (mariadb_reconnect(mysql))
goto end;
if (ma_net_write_command(net,(uchar) command,arg,
length ? length : (ulong) strlen(arg), 0))
{
my_set_error(mysql, CR_SERVER_GONE_ERROR, SQLSTATE_UNKNOWN, 0);
goto end;
}
}
result=0;
if (net->extension->multi_status > COM_MULTI_OFF)
skip_check= 1;
if (!skip_check)
{
result= ((mysql->packet_length=ma_net_safe_read(mysql)) == packet_error ?
1 : 0);
}
end:
return(result);
} | O3 | c | mthd_my_send_cmd:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x18885
cmpl $0x0, 0x488(%rbx)
jne 0x1882b
testb $0x8, 0x380(%rbx)
jne 0x1882b
movq 0x4f0(%rbx), %rax
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
testq %rax, %rax
movq %rcx, -0x30(%rbp)
je 0x18733
movq (%rax), %rax
testq %rax, %rax
je 0x18733
movq (%rax), %rax
movl %r8d, %r14d
movsbl %r14b, %r8d
movq %rbx, %rdi
movl %esi, %r13d
movq %r12, %rdx
callq *0x70(%rax)
movl %r13d, %esi
movl %r14d, %r8d
movl %eax, %r13d
cmpl $-0x1, %eax
je 0x1887d
movl %r8d, -0x34(%rbp)
movl $0x0, 0x90(%rbx)
movl $0x30303030, 0x297(%rbx) # imm = 0x30303030
movw $0x30, 0x29b(%rbx)
movb $0x0, 0x97(%rbx)
movq 0x2a0(%rbx), %rax
testq %rax, %rax
je 0x1876e
movl $0x0, 0x4(%rax)
cmpl $0x16, %esi
je 0x18778
cmpl $0x3, %esi
jne 0x187ce
testb $-0x80, 0x3a8(%rbx)
je 0x187ce
cmpq $0x0, 0x480(%rbx)
je 0x187ce
testq %r12, %r12
je 0x187ce
movq 0x4f0(%rbx), %r14
cmpb $0x1, 0x78(%r14)
jne 0x187ce
movzbl (%r12), %eax
orl $0x20, %eax
cmpl $0x6c, %eax
jne 0x187ce
movl %esi, %r15d
leaq 0x1ffbc(%rip), %rsi # 0x38771
movl $0x4, %edx
movq %r12, %rdi
callq 0x135d0
movl %r15d, %esi
testl %eax, %eax
jne 0x187ce
movb $0x2, 0x78(%r14)
movl %esi, %r14d
movq $0x0, 0x2e0(%rbx)
movq $-0x1, 0x338(%rbx)
movq %rbx, %rdi
callq 0x33ed4
testq %r12, %r12
leaq 0x1f0c0(%rip), %rdx # 0x378b9
cmovneq %r12, %rdx
movq 0x2a0(%rbx), %rax
cmpl $0x2, (%rax)
jne 0x188cd
movzbl %r14b, %esi
movq %rbx, %rdi
movq -0x30(%rbp), %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34876
movl $0x7de, 0x90(%rbx) # imm = 0x7DE
leaq 0x297(%rbx), %rdi
leaq 0x3553d(%rip), %rax # 0x4dd80
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x29c(%rbx)
leaq 0x97(%rbx), %rdi
leaq 0x35528(%rip), %rax # 0x4dd90
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movb %r14b, 0x296(%rbx)
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x188bb
movq %rbx, %rdi
movl %r8d, %r14d
movq %rcx, %r13
movq %r12, -0x40(%rbp)
movl %esi, %r12d
movq %r9, %r15
callq 0x189cc
movq %r15, %r9
movl %r12d, %esi
movq -0x40(%rbp), %r12
movq %r13, %rcx
movl %r14d, %r8d
movl $0x1, %r14d
testb %al, %al
je 0x186d3
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x30(%rbp), %rax
movq %rax, %rcx
testq %rax, %rax
movl %r14d, %esi
movq %rdx, %r12
jne 0x188f0
movq %rdx, %rdi
callq 0x131c0
movq %r12, %rdx
movl %r14d, %esi
movq %rax, %rcx
movzbl %sil, %r15d
xorl %r14d, %r14d
movq %rbx, %rdi
movl %r15d, %esi
xorl %r8d, %r8d
callq 0x34355
testl %eax, %eax
je 0x1898f
cmpl $0x481, 0x90(%rbx) # imm = 0x481
jne 0x18936
leaq 0x35460(%rip), %rax # 0x4dd80
movq (%rax), %rdx
movq %rbx, %rdi
movl $0x7e4, %esi # imm = 0x7E4
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x184d1
jmp 0x1894a
movq %rbx, %rdi
callq 0x1849e
movq %rbx, %rdi
callq 0x189cc
testb %al, %al
je 0x18952
movl %r13d, %r14d
jmp 0x188bb
movq -0x30(%rbp), %rcx
testq %rcx, %rcx
jne 0x18966
movq %r12, %rdi
callq 0x131c0
movq %rax, %rcx
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
xorl %r8d, %r8d
callq 0x34355
testl %eax, %eax
je 0x1898f
leaq 0x353fe(%rip), %rax # 0x4dd80
movq (%rax), %rdx
movq %rbx, %rdi
movl $0x7d6, %esi # imm = 0x7D6
jmp 0x1892b
cmpb $0x0, -0x34(%rbp)
jne 0x188bb
movq 0x2a0(%rbx), %rax
cmpl $0x0, (%rax)
jne 0x188bb
movq %rbx, %rdi
callq 0x18237
movq %rax, 0x358(%rbx)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
xorl %r14d, %r14d
cmpq %rcx, %rax
sete %r14b
jmp 0x188bb
| mthd_my_send_cmd:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rdx
mov rbx, rdi
cmp qword ptr [rdi], 0
jz loc_18885
loc_186D3:
cmp dword ptr [rbx+488h], 0
jnz loc_1882B
test byte ptr [rbx+380h], 8
jnz loc_1882B
mov rax, [rbx+4F0h]
mov r13d, 0FFFFFFFFh
test rax, rax
mov [rbp+var_30], rcx
jz short loc_18733
mov rax, [rax]
test rax, rax
jz short loc_18733
mov rax, [rax]
mov r14d, r8d
movsx r8d, r14b
mov rdi, rbx
mov r13d, esi
mov rdx, r12
call qword ptr [rax+70h]
mov esi, r13d
mov r8d, r14d
mov r13d, eax
cmp eax, 0FFFFFFFFh
jz loc_1887D
loc_18733:
mov [rbp+var_34], r8d
mov dword ptr [rbx+90h], 0
mov dword ptr [rbx+297h], 30303030h
mov word ptr [rbx+29Bh], 30h ; '0'
mov byte ptr [rbx+97h], 0
mov rax, [rbx+2A0h]
test rax, rax
jz short loc_1876E
mov dword ptr [rax+4], 0
loc_1876E:
cmp esi, 16h
jz short loc_18778
cmp esi, 3
jnz short loc_187CE
loc_18778:
test byte ptr [rbx+3A8h], 80h
jz short loc_187CE
cmp qword ptr [rbx+480h], 0
jz short loc_187CE
test r12, r12
jz short loc_187CE
mov r14, [rbx+4F0h]
cmp byte ptr [r14+78h], 1
jnz short loc_187CE
movzx eax, byte ptr [r12]
or eax, 20h
cmp eax, 6Ch ; 'l'
jnz short loc_187CE
mov r15d, esi
lea rsi, aLoad; "load"
mov edx, 4
mov rdi, r12
call _strncasecmp
mov esi, r15d
test eax, eax
jnz short loc_187CE
mov byte ptr [r14+78h], 2
loc_187CE:
mov r14d, esi
mov qword ptr [rbx+2E0h], 0
mov qword ptr [rbx+338h], 0FFFFFFFFFFFFFFFFh
mov rdi, rbx
call ma_net_clear
test r12, r12
lea rdx, aExecuteTestWit+29h; ""
cmovnz rdx, r12
mov rax, [rbx+2A0h]
cmp dword ptr [rax], 2
jnz loc_188CD
movzx esi, r14b
mov rdi, rbx
mov rcx, [rbp+var_30]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp net_add_multi_command
loc_1882B:
mov dword ptr [rbx+90h], 7DEh
lea rdi, [rbx+297h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+29Ch], r14b
lea rdi, [rbx+97h]
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov [rbx+296h], r14b
loc_1887D:
mov r14d, 0FFFFFFFFh
jmp short loc_188BB
loc_18885:
mov rdi, rbx
mov r14d, r8d
mov r13, rcx
mov [rbp+var_40], r12
mov r12d, esi
mov r15, r9
call mariadb_reconnect
mov r9, r15
mov esi, r12d
mov r12, [rbp+var_40]
mov rcx, r13
mov r8d, r14d
mov r14d, 1
test al, al
jz loc_186D3
loc_188BB:
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_188CD:
mov rax, [rbp+var_30]
mov rcx, rax
test rax, rax
mov esi, r14d
mov r12, rdx
jnz short loc_188F0
mov rdi, rdx
call _strlen
mov rdx, r12
mov esi, r14d
mov rcx, rax
loc_188F0:
movzx r15d, sil
xor r14d, r14d
mov rdi, rbx
mov esi, r15d
xor r8d, r8d
call ma_net_write_command
test eax, eax
jz loc_1898F
cmp dword ptr [rbx+90h], 481h
jnz short loc_18936
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov rdi, rbx
mov esi, 7E4h
loc_1892B:
xor ecx, ecx
xor eax, eax
call my_set_error
jmp short loc_1894A
loc_18936:
mov rdi, rbx
call end_server
mov rdi, rbx
call mariadb_reconnect
test al, al
jz short loc_18952
loc_1894A:
mov r14d, r13d
jmp loc_188BB
loc_18952:
mov rcx, [rbp+var_30]
test rcx, rcx
jnz short loc_18966
mov rdi, r12
call _strlen
mov rcx, rax
loc_18966:
mov rdi, rbx
mov esi, r15d
mov rdx, r12
xor r8d, r8d
call ma_net_write_command
test eax, eax
jz short loc_1898F
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov rdi, rbx
mov esi, 7D6h
jmp short loc_1892B
loc_1898F:
cmp byte ptr [rbp+var_34], 0
jnz loc_188BB
mov rax, [rbx+2A0h]
cmp dword ptr [rax], 0
jnz loc_188BB
mov rdi, rbx
call ma_net_safe_read
mov [rbx+358h], rax
mov ecx, 0FFFFFFFFh
xor r14d, r14d
cmp rax, rcx
setz r14b
jmp loc_188BB
| long long mthd_my_send_cmd(long long a1, long long a2, char *a3, long long a4, char a5)
{
char *v5; // r12
long long *v6; // rax
unsigned int v7; // r13d
long long v8; // rax
char v9; // r14
unsigned int v10; // eax
long long v11; // rax
long long v12; // r14
char *v13; // rdx
unsigned int v15; // r14d
char v16; // r14
long long v17; // r13
char v18; // al
long long v19; // rcx
char *v20; // r12
long long v21; // rax
long long v22; // rdx
long long v23; // rcx
unsigned long long v24; // r8
int v25; // r9d
char *v26; // rdx
int v27; // esi
long long v28; // rcx
unsigned long long v29; // rax
char v31; // [rsp+Ch] [rbp-34h]
long long v32; // [rsp+10h] [rbp-30h]
v5 = a3;
if ( !*(_QWORD *)a1 )
{
v16 = a5;
v17 = a4;
v18 = mariadb_reconnect(a1);
a2 = (unsigned int)a2;
v5 = a3;
a4 = v17;
a5 = v16;
v15 = 1;
if ( v18 )
return v15;
}
if ( *(_DWORD *)(a1 + 1160) || (*(_BYTE *)(a1 + 896) & 8) != 0 )
{
*(_DWORD *)(a1 + 144) = 2014;
strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 668) = 0;
strncpy(a1 + 151, client_errors[14], 511LL);
*(_BYTE *)(a1 + 662) = 0;
}
else
{
v6 = *(long long **)(a1 + 1264);
v7 = -1;
v32 = a4;
if ( !v6
|| (v8 = *v6) == 0
|| (v9 = a5,
v10 = (*(long long ( **)(long long, long long, char *, long long, _QWORD))(*(_QWORD *)v8 + 112LL))(
a1,
a2,
v5,
a4,
(unsigned int)a5),
a5 = v9,
v7 = v10,
v10 != -1) )
{
v31 = a5;
*(_DWORD *)(a1 + 144) = 0;
strcpy((char *)(a1 + 663), "00000");
*(_BYTE *)(a1 + 151) = 0;
v11 = *(_QWORD *)(a1 + 672);
if ( v11 )
*(_DWORD *)(v11 + 4) = 0;
if ( ((_DWORD)a2 == 22 || (_DWORD)a2 == 3) && *(char *)(a1 + 936) < 0 )
{
if ( *(_QWORD *)(a1 + 1152) )
{
if ( v5 )
{
v12 = *(_QWORD *)(a1 + 1264);
if ( *(_BYTE *)(v12 + 120) == 1
&& ((unsigned __int8)*v5 | 0x20) == 0x6C
&& !(unsigned int)strncasecmp(v5, "load", 4LL) )
{
*(_BYTE *)(v12 + 120) = 2;
}
}
}
}
*(_QWORD *)(a1 + 736) = 0LL;
*(_QWORD *)(a1 + 824) = -1LL;
ma_net_clear(a1);
v13 = "";
if ( v5 )
v13 = v5;
if ( **(_DWORD **)(a1 + 672) == 2 )
return net_add_multi_command(a1, (unsigned __int8)a2, v13, v32);
v19 = v32;
v20 = v13;
if ( !v32 )
{
v21 = strlen(v13);
v13 = v20;
v19 = v21;
}
v15 = 0;
a2 = (unsigned __int8)a2;
if ( (unsigned int)ma_net_write_command(a1, (unsigned __int8)a2, v13, v19, 0LL) )
{
if ( *(_DWORD *)(a1 + 144) == 1153 )
{
v26 = SQLSTATE_UNKNOWN;
v27 = 2020;
LABEL_31:
my_set_error(a1, v27, (long long)v26, 0LL);
return v7;
}
end_server((long long *)a1);
if ( (unsigned __int8)mariadb_reconnect(a1) )
return v7;
v28 = v32;
if ( !v32 )
v28 = strlen(v20);
a2 = (unsigned __int8)a2;
if ( (unsigned int)ma_net_write_command(a1, (unsigned __int8)a2, v20, v28, 0LL) )
{
v26 = SQLSTATE_UNKNOWN;
v27 = 2006;
goto LABEL_31;
}
}
if ( !v31 && !**(_DWORD **)(a1 + 672) )
{
v29 = ma_net_safe_read(a1, a2, v22, v23, v24, v25);
*(_QWORD *)(a1 + 856) = v29;
return v29 == 0xFFFFFFFF;
}
return v15;
}
}
return (unsigned int)-1;
}
| mthd_my_send_cmd:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,RDX
MOV RBX,RDI
CMP qword ptr [RDI],0x0
JZ 0x00118885
LAB_001186d3:
CMP dword ptr [RBX + 0x488],0x0
JNZ 0x0011882b
TEST byte ptr [RBX + 0x380],0x8
JNZ 0x0011882b
MOV RAX,qword ptr [RBX + 0x4f0]
MOV R13D,0xffffffff
TEST RAX,RAX
MOV qword ptr [RBP + -0x30],RCX
JZ 0x00118733
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x00118733
MOV RAX,qword ptr [RAX]
MOV R14D,R8D
MOVSX R8D,R14B
MOV RDI,RBX
MOV R13D,ESI
MOV RDX,R12
CALL qword ptr [RAX + 0x70]
MOV ESI,R13D
MOV R8D,R14D
MOV R13D,EAX
CMP EAX,-0x1
JZ 0x0011887d
LAB_00118733:
MOV dword ptr [RBP + -0x34],R8D
MOV dword ptr [RBX + 0x90],0x0
MOV dword ptr [RBX + 0x297],0x30303030
MOV word ptr [RBX + 0x29b],0x30
MOV byte ptr [RBX + 0x97],0x0
MOV RAX,qword ptr [RBX + 0x2a0]
TEST RAX,RAX
JZ 0x0011876e
MOV dword ptr [RAX + 0x4],0x0
LAB_0011876e:
CMP ESI,0x16
JZ 0x00118778
CMP ESI,0x3
JNZ 0x001187ce
LAB_00118778:
TEST byte ptr [RBX + 0x3a8],0x80
JZ 0x001187ce
CMP qword ptr [RBX + 0x480],0x0
JZ 0x001187ce
TEST R12,R12
JZ 0x001187ce
MOV R14,qword ptr [RBX + 0x4f0]
CMP byte ptr [R14 + 0x78],0x1
JNZ 0x001187ce
MOVZX EAX,byte ptr [R12]
OR EAX,0x20
CMP EAX,0x6c
JNZ 0x001187ce
MOV R15D,ESI
LEA RSI,[0x138771]
MOV EDX,0x4
MOV RDI,R12
CALL 0x001135d0
MOV ESI,R15D
TEST EAX,EAX
JNZ 0x001187ce
MOV byte ptr [R14 + 0x78],0x2
LAB_001187ce:
MOV R14D,ESI
MOV qword ptr [RBX + 0x2e0],0x0
MOV qword ptr [RBX + 0x338],-0x1
MOV RDI,RBX
CALL 0x00133ed4
TEST R12,R12
LEA RDX,[0x1378b9]
CMOVNZ RDX,R12
MOV RAX,qword ptr [RBX + 0x2a0]
CMP dword ptr [RAX],0x2
JNZ 0x001188cd
MOVZX ESI,R14B
MOV RDI,RBX
MOV RCX,qword ptr [RBP + -0x30]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00134876
LAB_0011882b:
MOV dword ptr [RBX + 0x90],0x7de
LEA RDI,[RBX + 0x297]
LEA RAX,[0x14dd80]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x29c],R14B
LEA RDI,[RBX + 0x97]
LEA RAX,[0x14dd90]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00113220
MOV byte ptr [RBX + 0x296],R14B
LAB_0011887d:
MOV R14D,0xffffffff
JMP 0x001188bb
LAB_00118885:
MOV RDI,RBX
MOV R14D,R8D
MOV R13,RCX
MOV qword ptr [RBP + -0x40],R12
MOV R12D,ESI
MOV R15,R9
CALL 0x001189cc
MOV R9,R15
MOV ESI,R12D
MOV R12,qword ptr [RBP + -0x40]
MOV RCX,R13
MOV R8D,R14D
MOV R14D,0x1
TEST AL,AL
JZ 0x001186d3
LAB_001188bb:
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001188cd:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,RAX
TEST RAX,RAX
MOV ESI,R14D
MOV R12,RDX
JNZ 0x001188f0
MOV RDI,RDX
CALL 0x001131c0
MOV RDX,R12
MOV ESI,R14D
MOV RCX,RAX
LAB_001188f0:
MOVZX R15D,SIL
XOR R14D,R14D
MOV RDI,RBX
MOV ESI,R15D
XOR R8D,R8D
CALL 0x00134355
TEST EAX,EAX
JZ 0x0011898f
CMP dword ptr [RBX + 0x90],0x481
JNZ 0x00118936
LEA RAX,[0x14dd80]
MOV RDX,qword ptr [RAX]
MOV RDI,RBX
MOV ESI,0x7e4
LAB_0011892b:
XOR ECX,ECX
XOR EAX,EAX
CALL 0x001184d1
JMP 0x0011894a
LAB_00118936:
MOV RDI,RBX
CALL 0x0011849e
MOV RDI,RBX
CALL 0x001189cc
TEST AL,AL
JZ 0x00118952
LAB_0011894a:
MOV R14D,R13D
JMP 0x001188bb
LAB_00118952:
MOV RCX,qword ptr [RBP + -0x30]
TEST RCX,RCX
JNZ 0x00118966
MOV RDI,R12
CALL 0x001131c0
MOV RCX,RAX
LAB_00118966:
MOV RDI,RBX
MOV ESI,R15D
MOV RDX,R12
XOR R8D,R8D
CALL 0x00134355
TEST EAX,EAX
JZ 0x0011898f
LEA RAX,[0x14dd80]
MOV RDX,qword ptr [RAX]
MOV RDI,RBX
MOV ESI,0x7d6
JMP 0x0011892b
LAB_0011898f:
CMP byte ptr [RBP + -0x34],0x0
JNZ 0x001188bb
MOV RAX,qword ptr [RBX + 0x2a0]
CMP dword ptr [RAX],0x0
JNZ 0x001188bb
MOV RDI,RBX
CALL 0x00118237
MOV qword ptr [RBX + 0x358],RAX
MOV ECX,0xffffffff
XOR R14D,R14D
CMP RAX,RCX
SETZ R14B
JMP 0x001188bb
|
ulong mthd_my_send_cmd(long *param_1,ulong param_2,byte *param_3,size_t param_4,char param_5,
int8 param_6)
{
long *plVar1;
char cVar2;
uint uVar3;
int iVar4;
ulong uVar5;
size_t sVar6;
long lVar7;
byte *__s;
int8 uVar8;
if (*param_1 == 0) {
param_2 = param_2 & 0xffffffff;
cVar2 = mariadb_reconnect(param_1);
if (cVar2 != '\0') {
return 1;
}
}
if (((int)param_1[0x91] != 0) || ((*(byte *)(param_1 + 0x70) & 8) != 0)) {
*(int4 *)(param_1 + 0x12) = 0x7de;
strncpy((char *)((long)param_1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)((long)param_1 + 0x29c) = 0;
strncpy((char *)((long)param_1 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_0014de00,0x1ff);
*(int1 *)((long)param_1 + 0x296) = 0;
return 0xffffffff;
}
uVar3 = 0xffffffff;
uVar5 = param_2;
if (((long *)param_1[0x9e] != (long *)0x0) &&
(plVar1 = *(long **)param_1[0x9e], plVar1 != (long *)0x0)) {
uVar5 = param_2 & 0xffffffff;
uVar3 = (**(code **)(*plVar1 + 0x70))(param_1,param_2,param_3,param_4,(int)param_5,param_6);
if (uVar3 == 0xffffffff) {
return 0xffffffff;
}
}
*(int4 *)(param_1 + 0x12) = 0;
*(int4 *)((long)param_1 + 0x297) = 0x30303030;
*(int2 *)((long)param_1 + 0x29b) = 0x30;
*(int1 *)((long)param_1 + 0x97) = 0;
if (param_1[0x54] != 0) {
*(int4 *)(param_1[0x54] + 4) = 0;
}
if (((((int)uVar5 == 0x16) || ((int)uVar5 == 3)) && ((*(byte *)(param_1 + 0x75) & 0x80) != 0)) &&
(((param_1[0x90] != 0 && (param_3 != (byte *)0x0)) &&
((lVar7 = param_1[0x9e], *(char *)(lVar7 + 0x78) == '\x01' && ((*param_3 | 0x20) == 0x6c))))))
{
uVar5 = uVar5 & 0xffffffff;
iVar4 = strncasecmp((char *)param_3,"load",4);
if (iVar4 == 0) {
*(int1 *)(lVar7 + 0x78) = 2;
}
}
param_1[0x5c] = 0;
param_1[0x67] = -1;
ma_net_clear(param_1);
__s = (byte *)0x1378b9;
if (param_3 != (byte *)0x0) {
__s = param_3;
}
if (*(int *)param_1[0x54] == 2) {
uVar5 = net_add_multi_command(param_1,uVar5 & 0xff,__s,param_4);
return uVar5;
}
sVar6 = param_4;
if (param_4 == 0) {
sVar6 = strlen((char *)__s);
}
iVar4 = ma_net_write_command(param_1,uVar5 & 0xff,__s,sVar6,0);
if (iVar4 == 0) {
LAB_0011898f:
if (param_5 != '\0') {
return 0;
}
if (*(int *)param_1[0x54] == 0) {
lVar7 = ma_net_safe_read(param_1);
param_1[0x6b] = lVar7;
return (ulong)(lVar7 == 0xffffffff);
}
return 0;
}
if ((int)param_1[0x12] == 0x481) {
uVar8 = 0x7e4;
}
else {
end_server(param_1);
cVar2 = mariadb_reconnect(param_1);
if (cVar2 != '\0') goto LAB_0011894a;
if (param_4 == 0) {
param_4 = strlen((char *)__s);
}
iVar4 = ma_net_write_command(param_1,uVar5 & 0xff,__s,param_4,0);
if (iVar4 == 0) goto LAB_0011898f;
uVar8 = 0x7d6;
}
my_set_error(param_1,uVar8,SQLSTATE_UNKNOWN,0);
LAB_0011894a:
return (ulong)uVar3;
}
| |
42,361 | testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::~Matcher() | AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/gtest-matchers.h | class GTEST_API_ Matcher<const std::string&>
: public internal::MatcherBase<const std::string&> {
public:
Matcher() = default;
explicit Matcher(const MatcherInterface<const std::string&>* impl)
: internal::MatcherBase<const std::string&>(impl) {}
template <typename M, typename = typename std::remove_reference<
M>::type::is_gtest_matcher>
Matcher(M&& m) // NOLINT
: internal::MatcherBase<const std::string&>(std::forward<M>(m)) {}
// Allows the user to write str instead of Eq(str) sometimes, where
// str is a std::string object.
Matcher(const std::string& s); // NOLINT
// Allows the user to write "foo" instead of Eq("foo") sometimes.
Matcher(const char* s); // NOLINT
} | O0 | c | testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::~Matcher():
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rdi
callq 0xecfc0
popq %rax
retq
| _ZN7testing7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev:
push rax
mov [rsp+8+var_8], rdi
mov rdi, [rsp+8+var_8]
call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase()
pop rax
retn
| long long testing::Matcher<std::string const&>::~Matcher(long long a1)
{
testing::internal::MatcherBase<std::string const&>::~MatcherBase(a1);
return a1;
}
| ~Matcher:
PUSH RAX
MOV qword ptr [RSP],RDI
MOV RDI,qword ptr [RSP]
CALL 0x001ecfc0
POP RAX
RET
|
/* testing::Matcher<std::__cxx11::string const&>::~Matcher() */
Matcher<std::__cxx11::string_const&> * __thiscall
testing::Matcher<std::__cxx11::string_const&>::~Matcher(Matcher<std::__cxx11::string_const&> *this)
{
internal::MatcherBase<std::__cxx11::string_const&>::~MatcherBase
((MatcherBase<std::__cxx11::string_const&> *)this);
return this;
}
| |
42,362 | my_strndup | eloqsql/mysys/my_malloc.c | char *my_strndup(PSI_memory_key key, const char *from, size_t length, myf my_flags)
{
char *ptr;
DBUG_ENTER("my_strndup");
if ((ptr= (char*) my_malloc(key, length+1, my_flags)))
{
memcpy(ptr, from, length);
ptr[length]= 0;
}
DBUG_RETURN(ptr);
} | O0 | c | my_strndup:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl -0x4(%rbp), %edi
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
movq -0x20(%rbp), %rdx
callq 0x8af10
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x8b452
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x380b0
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x8b454
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strndup:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov edi, [rbp+var_4]
mov rsi, [rbp+var_18]
add rsi, 1
mov rdx, [rbp+var_20]
call my_malloc
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_8B452
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _memcpy
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
mov byte ptr [rax+rcx], 0
loc_8B452:
jmp short $+2
loc_8B454:
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
add rsp, 30h
pop rbp
retn
| long long my_strndup(unsigned int a1, long long a2, long long a3, int a4)
{
long long v5; // [rsp+8h] [rbp-28h]
v5 = my_malloc(a1, a3 + 1, a4);
if ( v5 )
{
memcpy(v5, a2, a3);
*(_BYTE *)(v5 + a3) = 0;
}
return v5;
}
| my_strndup:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0018af10
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x0018b452
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001380b0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_0018b452:
JMP 0x0018b454
LAB_0018b454:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x30
POP RBP
RET
|
void * my_strndup(int4 param_1,void *param_2,size_t param_3,int8 param_4)
{
void *__dest;
__dest = (void *)my_malloc(param_1,param_3 + 1,param_4);
if (__dest != (void *)0x0) {
memcpy(__dest,param_2,param_3);
*(int1 *)((long)__dest + param_3) = 0;
}
return __dest;
}
| |
42,363 | my_strndup | eloqsql/mysys/my_malloc.c | char *my_strndup(PSI_memory_key key, const char *from, size_t length, myf my_flags)
{
char *ptr;
DBUG_ENTER("my_strndup");
if ((ptr= (char*) my_malloc(key, length+1, my_flags)))
{
memcpy(ptr, from, length);
ptr[length]= 0;
}
DBUG_RETURN(ptr);
} | O3 | c | my_strndup:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x1(%rdx), %rsi
movq %rcx, %rdx
callq 0x6b029
movq %rax, %r15
testq %rax, %rax
je 0x6b377
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x370a0
movb $0x0, (%r15,%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
| my_strndup:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
lea rsi, [rdx+1]
mov rdx, rcx
call my_malloc
mov r15, rax
test rax, rax
jz short loc_6B377
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call _memcpy
mov byte ptr [r15+rbx], 0
loc_6B377:
mov rax, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_strndup(unsigned int a1, long long a2, long long a3, int a4)
{
long long v5; // rax
long long v6; // r15
my_malloc(a1, a3 + 1, a4);
v6 = v5;
if ( v5 )
{
memcpy(v5, a2, a3);
*(_BYTE *)(v6 + a3) = 0;
}
return v6;
}
| my_strndup:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
LEA RSI,[RDX + 0x1]
MOV RDX,RCX
CALL 0x0016b029
MOV R15,RAX
TEST RAX,RAX
JZ 0x0016b377
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x001370a0
MOV byte ptr [R15 + RBX*0x1],0x0
LAB_0016b377:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void * my_strndup(int8 param_1,void *param_2,size_t param_3,int8 param_4)
{
void *__dest;
__dest = (void *)my_malloc(param_1,param_3 + 1,param_4);
if (__dest != (void *)0x0) {
memcpy(__dest,param_2,param_3);
*(int1 *)((long)__dest + param_3) = 0;
}
return __dest;
}
| |
42,364 | delete_dynamic_element | eloqsql/mysys/array.c | void delete_dynamic_element(DYNAMIC_ARRAY *array, uint idx)
{
char *ptr= (char*) array->buffer+array->size_of_element*idx;
array->elements--;
memmove(ptr,ptr+array->size_of_element,
(array->elements-idx)*array->size_of_element);
} | O3 | c | delete_dynamic_element:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rdi), %edx
movl 0x14(%rdi), %ecx
movl %ecx, %eax
imull %esi, %eax
addq (%rdi), %rax
decl %edx
movl %edx, 0x8(%rdi)
subl %esi, %edx
imull %ecx, %edx
movq %rcx, %rsi
addq %rax, %rsi
movq %rax, %rdi
popq %rbp
jmp 0x286f0
| delete_dynamic_element:
push rbp
mov rbp, rsp
mov edx, [rdi+8]
mov ecx, [rdi+14h]
mov eax, ecx
imul eax, esi
add rax, [rdi]
dec edx
mov [rdi+8], edx
sub edx, esi
imul edx, ecx
mov rsi, rcx
add rsi, rax
mov rdi, rax
pop rbp
jmp _memmove
| long long delete_dynamic_element(long long a1, int a2)
{
long long v2; // rcx
long long v3; // rax
int v4; // edx
v2 = *(unsigned int *)(a1 + 20);
v3 = *(_QWORD *)a1 + (unsigned int)(a2 * *(_DWORD *)(a1 + 20));
v4 = *(_DWORD *)(a1 + 8) - 1;
*(_DWORD *)(a1 + 8) = v4;
return memmove(v3, v3 + v2, (unsigned int)(v2 * (v4 - a2)));
}
| delete_dynamic_element:
PUSH RBP
MOV RBP,RSP
MOV EDX,dword ptr [RDI + 0x8]
MOV ECX,dword ptr [RDI + 0x14]
MOV EAX,ECX
IMUL EAX,ESI
ADD RAX,qword ptr [RDI]
DEC EDX
MOV dword ptr [RDI + 0x8],EDX
SUB EDX,ESI
IMUL EDX,ECX
MOV RSI,RCX
ADD RSI,RAX
MOV RDI,RAX
POP RBP
JMP 0x001286f0
|
void delete_dynamic_element(long *param_1,int param_2)
{
uint uVar1;
void *__dest;
int iVar2;
uVar1 = *(uint *)((long)param_1 + 0x14);
__dest = (void *)((ulong)(uVar1 * param_2) + *param_1);
iVar2 = (int)param_1[1] + -1;
*(int *)(param_1 + 1) = iVar2;
memmove(__dest,(void *)((ulong)uVar1 + (long)__dest),(ulong)((iVar2 - param_2) * uVar1));
return;
}
| |
42,365 | Spg200::Spg200(VideoTiming, Spg200Io&) | sp1187[P]veesem/src/core/spg200/spg200.cc | Spg200::Spg200(VideoTiming video_timing, Spg200Io& io)
: video_timing_(video_timing),
io_(io),
cpu_(*this),
ppu_(video_timing, *this, irq_),
spu_(*this, irq_),
irq_(cpu_),
timer_(irq_),
extmem_(io),
gpio_(io),
adc_(irq_, io),
uart_(irq_, io),
dma_(*this) {} | O2 | cpp | Spg200::Spg200(VideoTiming, Spg200Io&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
leaq 0xb6523(%rip), %rax # 0xbf600
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movl %esi, %ebp
movl %esi, 0x10(%rdi)
movq %rdx, 0x18(%rdi)
addq $0x20, %rdi
movl $0x5000, %edx # imm = 0x5000
xorl %esi, %esi
callq 0x52f0
leaq 0x5020(%rbx), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0xbb54
leaq 0x5050(%rbx), %rdi
leaq 0x31ad8(%rbx), %r15
movl %ebp, %esi
movq %rbx, %rdx
movq %r15, %rcx
callq 0xd48c
leaq 0x2b6c0(%rbx), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xa248
movq %r15, %rdi
movq %r12, %rsi
callq 0xd0d8
leaq 0x31ae8(%rbx), %rdi
movq %r15, %rsi
callq 0xb364
leaq 0x31b18(%rbx), %rdi
movq %r14, %rsi
callq 0xce74
leaq 0x31b28(%rbx), %rdi
movq %r14, %rsi
callq 0xcf80
leaq 0x31b50(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xb8f8
leaq 0x31b78(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xb69c
leaq 0x31ba0(%rbx), %rdi
movq %rbx, %rsi
callq 0xcdf0
andl $0x0, 0x31bb0(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZN6Spg200C2E11VideoTimingR8Spg200Io:
push rbp
push r15
push r14
push r12
push rbx
mov r14, rdx
mov rbx, rdi
lea rax, off_BF600
mov [rdi], rax
and qword ptr [rdi+8], 0
mov ebp, esi
mov [rdi+10h], esi
mov [rdi+18h], rdx
add rdi, 20h ; ' '
mov edx, 5000h
xor esi, esi
call _memset
lea r12, [rbx+5020h]
mov rdi, r12; this
mov rsi, rbx; BusInterface *
call _ZN3CpuC2ER12BusInterface; Cpu::Cpu(BusInterface &)
lea rdi, [rbx+5050h]
lea r15, loc_31AD8[rbx]
mov esi, ebp
mov rdx, rbx
mov rcx, r15
call _ZN3PpuC2E11VideoTimingR12BusInterfaceR3Irq; Ppu::Ppu(VideoTiming,BusInterface &,Irq &)
lea rdi, [rbx+2B6C0h]; this
mov rsi, rbx; BusInterface *
mov rdx, r15; Irq *
call _ZN3SpuC2ER12BusInterfaceR3Irq; Spu::Spu(BusInterface &,Irq &)
mov rdi, r15; this
mov rsi, r12; Cpu *
call _ZN3IrqC2ER3Cpu; Irq::Irq(Cpu &)
lea rdi, loc_31AE8[rbx]
mov rsi, r15
call _ZN5TimerC2ER3Irq; Timer::Timer(Irq &)
lea rdi, [rbx+31B18h]
mov rsi, r14
call _ZN6ExtmemC2ER8Spg200Io; Extmem::Extmem(Spg200Io &)
lea rdi, [rbx+31B28h]
mov rsi, r14
call _ZN4GpioC2ER8Spg200Io; Gpio::Gpio(Spg200Io &)
lea rdi, [rbx+31B50h]
mov rsi, r15
mov rdx, r14
call _ZN3AdcC2ER3IrqR8Spg200Io; Adc::Adc(Irq &,Spg200Io &)
lea rdi, [rbx+31B78h]
mov rsi, r15
mov rdx, r14
call _ZN4UartC2ER3IrqR8Spg200Io; Uart::Uart(Irq &,Spg200Io &)
lea rdi, [rbx+31BA0h]; this
mov rsi, rbx; BusInterface *
call _ZN3DmaC2ER12BusInterface; Dma::Dma(BusInterface &)
and dword ptr [rbx+31BB0h], 0
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| Dma * Spg200::Spg200(BusInterface *a1, unsigned int a2, long long a3)
{
Dma *result; // rax
*(_QWORD *)a1 = off_BF600;
*((_QWORD *)a1 + 1) = 0LL;
*((_DWORD *)a1 + 4) = a2;
*((_QWORD *)a1 + 3) = a3;
memset((char *)a1 + 32, 0LL, 20480LL);
Cpu::Cpu((BusInterface *)((char *)a1 + 20512), a1);
Ppu::Ppu((char *)a1 + 20560, a2, a1, (char *)&loc_31AD8 + (_QWORD)a1);
Spu::Spu((BusInterface *)((char *)a1 + 177856), a1, (Irq *)((char *)&loc_31AD8 + (_QWORD)a1));
Irq::Irq((Irq *)((char *)&loc_31AD8 + (_QWORD)a1), (BusInterface *)((char *)a1 + 20512));
Timer::Timer((Timer *)((char *)&loc_31AE8 + (_QWORD)a1), (Irq *)((char *)&loc_31AD8 + (_QWORD)a1));
Extmem::Extmem((char *)a1 + 203544, a3);
Gpio::Gpio((char *)a1 + 203560, a3);
Adc::Adc((char *)a1 + 203600, (char *)&loc_31AD8 + (_QWORD)a1, a3);
Uart::Uart((char *)a1 + 203640, (char *)&loc_31AD8 + (_QWORD)a1, a3);
result = Dma::Dma((BusInterface *)((char *)a1 + 203680), a1);
*((_DWORD *)a1 + 50924) = 0;
return result;
}
| Spg200:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RDX
MOV RBX,RDI
LEA RAX,[0x1bf600]
MOV qword ptr [RDI],RAX
AND qword ptr [RDI + 0x8],0x0
MOV EBP,ESI
MOV dword ptr [RDI + 0x10],ESI
MOV qword ptr [RDI + 0x18],RDX
ADD RDI,0x20
MOV EDX,0x5000
XOR ESI,ESI
CALL 0x001052f0
LEA R12,[RBX + 0x5020]
MOV RDI,R12
MOV RSI,RBX
CALL 0x0010bb54
LEA RDI,[RBX + 0x5050]
LEA R15,[RBX + 0x31ad8]
MOV ESI,EBP
MOV RDX,RBX
MOV RCX,R15
CALL 0x0010d48c
LEA RDI,[RBX + 0x2b6c0]
MOV RSI,RBX
MOV RDX,R15
CALL 0x0010a248
MOV RDI,R15
MOV RSI,R12
CALL 0x0010d0d8
LEA RDI,[RBX + 0x31ae8]
MOV RSI,R15
CALL 0x0010b364
LEA RDI,[RBX + 0x31b18]
MOV RSI,R14
CALL 0x0010ce74
LEA RDI,[RBX + 0x31b28]
MOV RSI,R14
CALL 0x0010cf80
LEA RDI,[RBX + 0x31b50]
MOV RSI,R15
MOV RDX,R14
CALL 0x0010b8f8
LEA RDI,[RBX + 0x31b78]
MOV RSI,R15
MOV RDX,R14
CALL 0x0010b69c
LEA RDI,[RBX + 0x31ba0]
MOV RSI,RBX
CALL 0x0010cdf0
AND dword ptr [RBX + 0x31bb0],0x0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* Spg200::Spg200(VideoTiming, Spg200Io&) */
void __thiscall Spg200::Spg200(Spg200 *this,int4 param_2,Spg200Io *param_3)
{
Irq *this_00;
*(int ***)this = &PTR__BusInterface_001bf600;
*(int8 *)(this + 8) = 0;
*(int4 *)(this + 0x10) = param_2;
*(Spg200Io **)(this + 0x18) = param_3;
memset(this + 0x20,0,0x5000);
Cpu::Cpu((Cpu *)(this + 0x5020),(BusInterface *)this);
this_00 = (Irq *)(this + 0x31ad8);
Ppu::Ppu((Ppu *)(this + 0x5050),param_2,this,this_00);
Spu::Spu((Spu *)(this + 0x2b6c0),(BusInterface *)this,this_00);
Irq::Irq(this_00,(Cpu *)(this + 0x5020));
Timer::Timer((Timer *)(this + 0x31ae8),this_00);
Extmem::Extmem((Extmem *)(this + 0x31b18),param_3);
Gpio::Gpio((Gpio *)(this + 0x31b28),param_3);
Adc::Adc((Adc *)(this + 0x31b50),this_00,param_3);
Uart::Uart((Uart *)(this + 0x31b78),this_00,param_3);
Dma::Dma((Dma *)(this + 0x31ba0),(BusInterface *)this);
*(int4 *)(this + 0x31bb0) = 0;
return;
}
| |
42,366 | Spg200::Spg200(VideoTiming, Spg200Io&) | sp1187[P]veesem/src/core/spg200/spg200.cc | Spg200::Spg200(VideoTiming video_timing, Spg200Io& io)
: video_timing_(video_timing),
io_(io),
cpu_(*this),
ppu_(video_timing, *this, irq_),
spu_(*this, irq_),
irq_(cpu_),
timer_(irq_),
extmem_(io),
gpio_(io),
adc_(irq_, io),
uart_(irq_, io),
dma_(*this) {} | O3 | cpp | Spg200::Spg200(VideoTiming, Spg200Io&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0xbdba1(%rip), %rax # 0xc85b0
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movl %esi, 0x10(%rdi)
movq %rdx, 0x18(%rdi)
addq $0x20, %rdi
movl $0x5000, %edx # imm = 0x5000
xorl %esi, %esi
callq 0x62e0
leaq 0x5020(%rbx), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0xd5e8
leaq 0x5050(%rbx), %rdi
leaq 0x31ad8(%rbx), %r15
movl %ebp, %esi
movq %rbx, %rdx
movq %r15, %rcx
callq 0xf300
leaq 0x2b6c0(%rbx), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xbbb4
movq %r15, %rdi
movq %r12, %rsi
callq 0xed2c
leaq 0x31ae8(%rbx), %rdi
movq %r15, %rsi
callq 0xcd70
leaq 0x31b18(%rbx), %rdi
movq %r14, %rsi
callq 0xeae0
leaq 0x31b28(%rbx), %rdi
movq %r14, %rsi
callq 0xebec
leaq 0x31b50(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xd38c
leaq 0x31b78(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xd120
leaq 0x31ba0(%rbx), %rdi
movq %rbx, %rsi
callq 0xea58
movl $0x0, 0x31bb0(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZN6Spg200C2E11VideoTimingR8Spg200Io:
push rbp
push r15
push r14
push r12
push rbx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea rax, off_C85B0
mov [rdi], rax
mov qword ptr [rdi+8], 0
mov [rdi+10h], esi
mov [rdi+18h], rdx
add rdi, 20h ; ' '
mov edx, 5000h
xor esi, esi
call _memset
lea r12, [rbx+5020h]
mov rdi, r12; this
mov rsi, rbx; BusInterface *
call _ZN3CpuC2ER12BusInterface; Cpu::Cpu(BusInterface &)
lea rdi, [rbx+5050h]
lea r15, [rbx+31AD8h]
mov esi, ebp
mov rdx, rbx
mov rcx, r15
call _ZN3PpuC2E11VideoTimingR12BusInterfaceR3Irq; Ppu::Ppu(VideoTiming,BusInterface &,Irq &)
lea rdi, loc_2B6C0[rbx]
mov rsi, rbx
mov rdx, r15
call _ZN3SpuC2ER12BusInterfaceR3Irq; Spu::Spu(BusInterface &,Irq &)
mov rdi, r15; this
mov rsi, r12; Cpu *
call _ZN3IrqC2ER3Cpu; Irq::Irq(Cpu &)
lea rdi, loc_31AE8[rbx]
mov rsi, r15
call _ZN5TimerC2ER3Irq; Timer::Timer(Irq &)
lea rdi, [rbx+31B18h]
mov rsi, r14
call _ZN6ExtmemC2ER8Spg200Io; Extmem::Extmem(Spg200Io &)
lea rdi, [rbx+31B28h]
mov rsi, r14
call _ZN4GpioC2ER8Spg200Io; Gpio::Gpio(Spg200Io &)
lea rdi, [rbx+31B50h]
mov rsi, r15
mov rdx, r14
call _ZN3AdcC2ER3IrqR8Spg200Io; Adc::Adc(Irq &,Spg200Io &)
lea rdi, [rbx+31B78h]
mov rsi, r15
mov rdx, r14
call _ZN4UartC2ER3IrqR8Spg200Io; Uart::Uart(Irq &,Spg200Io &)
lea rdi, [rbx+31BA0h]; this
mov rsi, rbx; BusInterface *
call _ZN3DmaC2ER12BusInterface; Dma::Dma(BusInterface &)
mov dword ptr ds:loc_31BB0[rbx], 0
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| Dma * Spg200::Spg200(BusInterface *a1, unsigned int a2, long long a3)
{
Dma *result; // rax
*(_QWORD *)a1 = off_C85B0;
*((_QWORD *)a1 + 1) = 0LL;
*((_DWORD *)a1 + 4) = a2;
*((_QWORD *)a1 + 3) = a3;
memset((char *)a1 + 32, 0LL, 20480LL);
Cpu::Cpu((BusInterface *)((char *)a1 + 20512), a1);
Ppu::Ppu((char *)a1 + 20560, a2, a1, (char *)a1 + 203480);
Spu::Spu((Spu *)((char *)&loc_2B6C0 + (_QWORD)a1), a1, (BusInterface *)((char *)a1 + 203480));
Irq::Irq((BusInterface *)((char *)a1 + 203480), (BusInterface *)((char *)a1 + 20512));
Timer::Timer((Timer *)((char *)&loc_31AE8 + (_QWORD)a1), (BusInterface *)((char *)a1 + 203480));
Extmem::Extmem((char *)a1 + 203544, a3);
Gpio::Gpio((char *)a1 + 203560, a3);
Adc::Adc((char *)a1 + 203600, (char *)a1 + 203480, a3);
Uart::Uart((char *)a1 + 203640, (char *)a1 + 203480, a3);
result = Dma::Dma((BusInterface *)((char *)a1 + 203680), a1);
*(_DWORD *)((char *)&loc_31BB0 + (_QWORD)a1) = 0;
return result;
}
| Spg200:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA RAX,[0x1c85b0]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
MOV dword ptr [RDI + 0x10],ESI
MOV qword ptr [RDI + 0x18],RDX
ADD RDI,0x20
MOV EDX,0x5000
XOR ESI,ESI
CALL 0x001062e0
LEA R12,[RBX + 0x5020]
MOV RDI,R12
MOV RSI,RBX
CALL 0x0010d5e8
LEA RDI,[RBX + 0x5050]
LEA R15,[RBX + 0x31ad8]
MOV ESI,EBP
MOV RDX,RBX
MOV RCX,R15
CALL 0x0010f300
LEA RDI,[RBX + 0x2b6c0]
MOV RSI,RBX
MOV RDX,R15
CALL 0x0010bbb4
MOV RDI,R15
MOV RSI,R12
CALL 0x0010ed2c
LEA RDI,[RBX + 0x31ae8]
MOV RSI,R15
CALL 0x0010cd70
LEA RDI,[RBX + 0x31b18]
MOV RSI,R14
CALL 0x0010eae0
LEA RDI,[RBX + 0x31b28]
MOV RSI,R14
CALL 0x0010ebec
LEA RDI,[RBX + 0x31b50]
MOV RSI,R15
MOV RDX,R14
CALL 0x0010d38c
LEA RDI,[RBX + 0x31b78]
MOV RSI,R15
MOV RDX,R14
CALL 0x0010d120
LEA RDI,[RBX + 0x31ba0]
MOV RSI,RBX
CALL 0x0010ea58
MOV dword ptr [RBX + 0x31bb0],0x0
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* Spg200::Spg200(VideoTiming, Spg200Io&) */
void __thiscall Spg200::Spg200(Spg200 *this,int4 param_2,Spg200Io *param_3)
{
Irq *this_00;
*(int ***)this = &PTR__BusInterface_001c85b0;
*(int8 *)(this + 8) = 0;
*(int4 *)(this + 0x10) = param_2;
*(Spg200Io **)(this + 0x18) = param_3;
memset(this + 0x20,0,0x5000);
Cpu::Cpu((Cpu *)(this + 0x5020),(BusInterface *)this);
this_00 = (Irq *)(this + 0x31ad8);
Ppu::Ppu((Ppu *)(this + 0x5050),param_2,this,this_00);
Spu::Spu((Spu *)(this + 0x2b6c0),(BusInterface *)this,this_00);
Irq::Irq(this_00,(Cpu *)(this + 0x5020));
Timer::Timer((Timer *)(this + 0x31ae8),this_00);
Extmem::Extmem((Extmem *)(this + 0x31b18),param_3);
Gpio::Gpio((Gpio *)(this + 0x31b28),param_3);
Adc::Adc((Adc *)(this + 0x31b50),this_00,param_3);
Uart::Uart((Uart *)(this + 0x31b78),this_00,param_3);
Dma::Dma((Dma *)(this + 0x31ba0),(BusInterface *)this);
*(int4 *)(this + 0x31bb0) = 0;
return;
}
| |
42,367 | stbi__out_gif_code(stbi__gif*, unsigned short) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code)
{
stbi_uc *p, *c;
int idx;
// recurse to decode the prefixes, since the linked-list is backwards,
// and working backwards through an interleaved image would be nasty
if (g->codes[code].prefix >= 0)
stbi__out_gif_code(g, g->codes[code].prefix);
if (g->cur_y >= g->max_y) return;
idx = g->cur_x + g->cur_y;
p = &g->out[idx];
g->history[idx / 4] = 1;
c = &g->color_table[g->codes[code].suffix * 4];
if (c[3] > 128) { // don't render transparent pixels;
p[0] = c[2];
p[1] = c[1];
p[2] = c[0];
p[3] = c[3];
}
g->cur_x += 4;
if (g->cur_x >= g->max_x) {
g->cur_x = g->start_x;
g->cur_y += g->step;
while (g->cur_y >= g->max_y && g->parse > 0) {
g->step = (1 << g->parse) * g->line_size;
g->cur_y = g->start_y + (g->step >> 1);
--g->parse;
}
}
} | O1 | c | stbi__out_gif_code(stbi__gif*, unsigned short):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r14d
movzwl 0x834(%rdi,%r14,4), %eax
testw %ax, %ax
js 0x2a690
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x2a66d
movslq 0x8860(%rbx), %rcx
cmpl 0x8858(%rbx), %ecx
jge 0x2a773
movslq 0x885c(%rbx), %rax
addq %rcx, %rax
movq 0x8(%rbx), %rcx
leal 0x3(%rax), %edx
testl %eax, %eax
cmovnsl %eax, %edx
movq 0x18(%rbx), %rsi
sarl $0x2, %edx
movslq %edx, %rdx
movb $0x1, (%rsi,%rdx)
movq 0x8838(%rbx), %rdx
movzbl 0x837(%rbx,%r14,4), %esi
cmpb $-0x7f, 0x3(%rdx,%rsi,4)
jb 0x2a702
movb 0x2(%rdx,%rsi,4), %dil
movb %dil, (%rcx,%rax)
movb 0x1(%rdx,%rsi,4), %dil
movb %dil, 0x1(%rcx,%rax)
movb (%rdx,%rsi,4), %dil
movb %dil, 0x2(%rcx,%rax)
movb 0x3(%rdx,%rsi,4), %dl
movb %dl, 0x3(%rcx,%rax)
movl 0x885c(%rbx), %eax
addl $0x4, %eax
movl %eax, 0x885c(%rbx)
cmpl 0x8854(%rbx), %eax
jl 0x2a773
movl 0x884c(%rbx), %ecx
movl 0x8858(%rbx), %eax
movl %ecx, 0x885c(%rbx)
movl 0x8860(%rbx), %ecx
addl 0x8844(%rbx), %ecx
movl %ecx, 0x8860(%rbx)
cmpl %eax, %ecx
jl 0x2a773
movl 0x8840(%rbx), %ecx
testl %ecx, %ecx
jle 0x2a773
movl 0x8864(%rbx), %edx
shll %cl, %edx
movl %edx, 0x8844(%rbx)
sarl %edx
addl 0x8850(%rbx), %edx
movl %edx, 0x8860(%rbx)
decl %ecx
movl %ecx, 0x8840(%rbx)
cmpl %eax, %edx
jge 0x2a747
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZL18stbi__out_gif_codeP9stbi__gift:
push r14
push rbx
push rax
mov rbx, rdi
mov r14d, esi
movzx eax, word ptr [rdi+r14*4+834h]
test ax, ax
js short loc_2A690
movzx esi, ax
mov rdi, rbx
call _ZL18stbi__out_gif_codeP9stbi__gift; stbi__out_gif_code(stbi__gif *,ushort)
loc_2A690:
movsxd rcx, dword ptr [rbx+8860h]
cmp ecx, [rbx+8858h]
jge loc_2A773
movsxd rax, dword ptr [rbx+885Ch]
add rax, rcx
mov rcx, [rbx+8]
lea edx, [rax+3]
test eax, eax
cmovns edx, eax
mov rsi, [rbx+18h]
sar edx, 2
movsxd rdx, edx
mov byte ptr [rsi+rdx], 1
mov rdx, [rbx+8838h]
movzx esi, byte ptr [rbx+r14*4+837h]
cmp byte ptr [rdx+rsi*4+3], 81h
jb short loc_2A702
mov dil, [rdx+rsi*4+2]
mov [rcx+rax], dil
mov dil, [rdx+rsi*4+1]
mov [rcx+rax+1], dil
mov dil, [rdx+rsi*4]
mov [rcx+rax+2], dil
mov dl, [rdx+rsi*4+3]
mov [rcx+rax+3], dl
loc_2A702:
mov eax, [rbx+885Ch]
add eax, 4
mov [rbx+885Ch], eax
cmp eax, [rbx+8854h]
jl short loc_2A773
mov ecx, [rbx+884Ch]
mov eax, [rbx+8858h]
mov [rbx+885Ch], ecx
mov ecx, [rbx+8860h]
add ecx, [rbx+8844h]
mov [rbx+8860h], ecx
cmp ecx, eax
jl short loc_2A773
mov ecx, [rbx+8840h]
loc_2A747:
test ecx, ecx
jle short loc_2A773
mov edx, [rbx+8864h]
shl edx, cl
mov [rbx+8844h], edx
sar edx, 1
add edx, [rbx+8850h]
mov [rbx+8860h], edx
dec ecx
mov [rbx+8840h], ecx
cmp edx, eax
jge short loc_2A747
loc_2A773:
add rsp, 8
pop rbx
pop r14
retn
| long long stbi__out_gif_code(long long a1, unsigned int a2)
{
long long result; // rax
long long v3; // rcx
long long v4; // rax
long long v5; // rcx
long long v6; // rdx
long long v7; // rsi
int v8; // ecx
int v9; // ecx
int v10; // edx
int v11; // edx
result = *(unsigned __int16 *)(a1 + 4LL * a2 + 2100);
if ( (result & 0x8000u) == 0LL )
result = stbi__out_gif_code(a1, (unsigned __int16)result);
v3 = *(int *)(a1 + 34912);
if ( (int)v3 < *(_DWORD *)(a1 + 34904) )
{
v4 = v3 + *(int *)(a1 + 34908);
v5 = *(_QWORD *)(a1 + 8);
*(_BYTE *)(*(_QWORD *)(a1 + 24) + (int)v4 / 4) = 1;
v6 = *(_QWORD *)(a1 + 34872);
v7 = *(unsigned __int8 *)(a1 + 4LL * a2 + 2103);
if ( *(_BYTE *)(v6 + 4 * v7 + 3) >= 0x81u )
{
*(_BYTE *)(v5 + v4) = *(_BYTE *)(v6 + 4 * v7 + 2);
*(_BYTE *)(v5 + v4 + 1) = *(_BYTE *)(v6 + 4 * v7 + 1);
*(_BYTE *)(v5 + v4 + 2) = *(_BYTE *)(v6 + 4 * v7);
*(_BYTE *)(v5 + v4 + 3) = *(_BYTE *)(v6 + 4 * v7 + 3);
}
result = (unsigned int)(*(_DWORD *)(a1 + 34908) + 4);
*(_DWORD *)(a1 + 34908) = result;
if ( (int)result >= *(_DWORD *)(a1 + 34900) )
{
result = *(unsigned int *)(a1 + 34904);
*(_DWORD *)(a1 + 34908) = *(_DWORD *)(a1 + 34892);
v8 = *(_DWORD *)(a1 + 34884) + *(_DWORD *)(a1 + 34912);
*(_DWORD *)(a1 + 34912) = v8;
if ( v8 >= (int)result )
{
v9 = *(_DWORD *)(a1 + 34880);
do
{
if ( v9 <= 0 )
break;
v10 = *(_DWORD *)(a1 + 34916) << v9;
*(_DWORD *)(a1 + 34884) = v10;
v11 = *(_DWORD *)(a1 + 34896) + (v10 >> 1);
*(_DWORD *)(a1 + 34912) = v11;
*(_DWORD *)(a1 + 34880) = --v9;
}
while ( v11 >= (int)result );
}
}
}
return result;
}
| |||
42,368 | stbi__out_gif_code(stbi__gif*, unsigned short) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code)
{
stbi_uc *p, *c;
int idx;
// recurse to decode the prefixes, since the linked-list is backwards,
// and working backwards through an interleaved image would be nasty
if (g->codes[code].prefix >= 0)
stbi__out_gif_code(g, g->codes[code].prefix);
if (g->cur_y >= g->max_y) return;
idx = g->cur_x + g->cur_y;
p = &g->out[idx];
g->history[idx / 4] = 1;
c = &g->color_table[g->codes[code].suffix * 4];
if (c[3] > 128) { // don't render transparent pixels;
p[0] = c[2];
p[1] = c[1];
p[2] = c[0];
p[3] = c[3];
}
g->cur_x += 4;
if (g->cur_x >= g->max_x) {
g->cur_x = g->start_x;
g->cur_y += g->step;
while (g->cur_y >= g->max_y && g->parse > 0) {
g->step = (1 << g->parse) * g->line_size;
g->cur_y = g->start_y + (g->step >> 1);
--g->parse;
}
}
} | O2 | c | stbi__out_gif_code(stbi__gif*, unsigned short):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r14d
movzwl 0x834(%rdi,%r14,4), %eax
testw %ax, %ax
js 0x1716b
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x17148
movslq 0x8860(%rbx), %rax
cmpl 0x8858(%rbx), %eax
jge 0x171ee
movslq 0x885c(%rbx), %rcx
addq %rax, %rcx
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdi
pushq $0x4
popq %r8
movl %ecx, %eax
cltd
idivl %r8d
cltq
movb $0x1, (%rdi,%rax)
movq 0x8838(%rbx), %rax
movzbl 0x837(%rbx,%r14,4), %edx
cmpb $-0x7f, 0x3(%rax,%rdx,4)
jb 0x171d7
movb 0x2(%rax,%rdx,4), %dil
movb %dil, (%rsi,%rcx)
movb 0x1(%rax,%rdx,4), %dil
movb %dil, 0x1(%rsi,%rcx)
movb (%rax,%rdx,4), %dil
movb %dil, 0x2(%rsi,%rcx)
movb 0x3(%rax,%rdx,4), %al
movb %al, 0x3(%rsi,%rcx)
movl 0x885c(%rbx), %eax
addl $0x4, %eax
movl %eax, 0x885c(%rbx)
cmpl 0x8854(%rbx), %eax
jge 0x171f6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x884c(%rbx), %ecx
movl 0x8858(%rbx), %eax
movl %ecx, 0x885c(%rbx)
movl 0x8860(%rbx), %edx
addl 0x8844(%rbx), %edx
movl %edx, 0x8860(%rbx)
cmpl %eax, %edx
jl 0x171ee
movl 0x8840(%rbx), %ecx
testl %ecx, %ecx
jle 0x171ee
movl 0x8864(%rbx), %edx
shll %cl, %edx
movl %edx, 0x8844(%rbx)
sarl %edx
addl 0x8850(%rbx), %edx
movl %edx, 0x8860(%rbx)
decl %ecx
movl %ecx, 0x8840(%rbx)
jmp 0x1721a
| _ZL18stbi__out_gif_codeP9stbi__gift:
push r14
push rbx
push rax
mov rbx, rdi
mov r14d, esi
movzx eax, word ptr [rdi+r14*4+834h]
test ax, ax
js short loc_1716B
movzx esi, ax
mov rdi, rbx
call _ZL18stbi__out_gif_codeP9stbi__gift; stbi__out_gif_code(stbi__gif *,ushort)
loc_1716B:
movsxd rax, dword ptr [rbx+8860h]
cmp eax, [rbx+8858h]
jge short loc_171EE
movsxd rcx, dword ptr [rbx+885Ch]
add rcx, rax
mov rsi, [rbx+8]
mov rdi, [rbx+18h]
push 4
pop r8
mov eax, ecx
cdq
idiv r8d
cdqe
mov byte ptr [rdi+rax], 1
mov rax, [rbx+8838h]
movzx edx, byte ptr [rbx+r14*4+837h]
cmp byte ptr [rax+rdx*4+3], 81h
jb short loc_171D7
mov dil, [rax+rdx*4+2]
mov [rsi+rcx], dil
mov dil, [rax+rdx*4+1]
mov [rsi+rcx+1], dil
mov dil, [rax+rdx*4]
mov [rsi+rcx+2], dil
mov al, [rax+rdx*4+3]
mov [rsi+rcx+3], al
loc_171D7:
mov eax, [rbx+885Ch]
add eax, 4
mov [rbx+885Ch], eax
cmp eax, [rbx+8854h]
jge short loc_171F6
loc_171EE:
add rsp, 8
pop rbx
pop r14
retn
loc_171F6:
mov ecx, [rbx+884Ch]
mov eax, [rbx+8858h]
mov [rbx+885Ch], ecx
mov edx, [rbx+8860h]
add edx, [rbx+8844h]
mov [rbx+8860h], edx
loc_1721A:
cmp edx, eax
jl short loc_171EE
mov ecx, [rbx+8840h]
test ecx, ecx
jle short loc_171EE
mov edx, [rbx+8864h]
shl edx, cl
mov [rbx+8844h], edx
sar edx, 1
add edx, [rbx+8850h]
mov [rbx+8860h], edx
dec ecx
mov [rbx+8840h], ecx
jmp short loc_1721A
| long long stbi__out_gif_code(long long a1, unsigned int a2)
{
long long v2; // r14
__int16 v3; // ax
long long result; // rax
long long v5; // rcx
long long v6; // rsi
long long v7; // rax
long long v8; // rdx
int v9; // edx
int v10; // ecx
int v11; // edx
v2 = a2;
v3 = *(_WORD *)(a1 + 4LL * a2 + 2100);
if ( v3 >= 0 )
stbi__out_gif_code(a1, (unsigned __int16)v3);
result = *(int *)(a1 + 34912);
if ( (int)result < *(_DWORD *)(a1 + 34904) )
{
v5 = result + *(int *)(a1 + 34908);
v6 = *(_QWORD *)(a1 + 8);
*(_BYTE *)(*(_QWORD *)(a1 + 24) + ((int)result + *(_DWORD *)(a1 + 34908)) / 4) = 1;
v7 = *(_QWORD *)(a1 + 34872);
v8 = *(unsigned __int8 *)(a1 + 4 * v2 + 2103);
if ( *(_BYTE *)(v7 + 4 * v8 + 3) >= 0x81u )
{
*(_BYTE *)(v6 + v5) = *(_BYTE *)(v7 + 4 * v8 + 2);
*(_BYTE *)(v6 + v5 + 1) = *(_BYTE *)(v7 + 4 * v8 + 1);
*(_BYTE *)(v6 + v5 + 2) = *(_BYTE *)(v7 + 4 * v8);
*(_BYTE *)(v6 + v5 + 3) = *(_BYTE *)(v7 + 4 * v8 + 3);
}
result = (unsigned int)(*(_DWORD *)(a1 + 34908) + 4);
*(_DWORD *)(a1 + 34908) = result;
if ( (int)result >= *(_DWORD *)(a1 + 34900) )
{
result = *(unsigned int *)(a1 + 34904);
*(_DWORD *)(a1 + 34908) = *(_DWORD *)(a1 + 34892);
v9 = *(_DWORD *)(a1 + 34884) + *(_DWORD *)(a1 + 34912);
*(_DWORD *)(a1 + 34912) = v9;
while ( v9 >= (int)result )
{
v10 = *(_DWORD *)(a1 + 34880);
if ( v10 <= 0 )
break;
v11 = *(_DWORD *)(a1 + 34916) << v10;
*(_DWORD *)(a1 + 34884) = v11;
v9 = *(_DWORD *)(a1 + 34896) + (v11 >> 1);
*(_DWORD *)(a1 + 34912) = v9;
*(_DWORD *)(a1 + 34880) = v10 - 1;
}
}
}
return result;
}
| stbi__out_gif_code:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14D,ESI
MOVZX EAX,word ptr [RDI + R14*0x4 + 0x834]
TEST AX,AX
JS 0x0011716b
MOVZX ESI,AX
MOV RDI,RBX
CALL 0x00117148
LAB_0011716b:
MOVSXD RAX,dword ptr [RBX + 0x8860]
CMP EAX,dword ptr [RBX + 0x8858]
JGE 0x001171ee
MOVSXD RCX,dword ptr [RBX + 0x885c]
ADD RCX,RAX
MOV RSI,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
PUSH 0x4
POP R8
MOV EAX,ECX
CDQ
IDIV R8D
CDQE
MOV byte ptr [RDI + RAX*0x1],0x1
MOV RAX,qword ptr [RBX + 0x8838]
MOVZX EDX,byte ptr [RBX + R14*0x4 + 0x837]
CMP byte ptr [RAX + RDX*0x4 + 0x3],0x81
JC 0x001171d7
MOV DIL,byte ptr [RAX + RDX*0x4 + 0x2]
MOV byte ptr [RSI + RCX*0x1],DIL
MOV DIL,byte ptr [RAX + RDX*0x4 + 0x1]
MOV byte ptr [RSI + RCX*0x1 + 0x1],DIL
MOV DIL,byte ptr [RAX + RDX*0x4]
MOV byte ptr [RSI + RCX*0x1 + 0x2],DIL
MOV AL,byte ptr [RAX + RDX*0x4 + 0x3]
MOV byte ptr [RSI + RCX*0x1 + 0x3],AL
LAB_001171d7:
MOV EAX,dword ptr [RBX + 0x885c]
ADD EAX,0x4
MOV dword ptr [RBX + 0x885c],EAX
CMP EAX,dword ptr [RBX + 0x8854]
JGE 0x001171f6
LAB_001171ee:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_001171f6:
MOV ECX,dword ptr [RBX + 0x884c]
MOV EAX,dword ptr [RBX + 0x8858]
MOV dword ptr [RBX + 0x885c],ECX
MOV EDX,dword ptr [RBX + 0x8860]
ADD EDX,dword ptr [RBX + 0x8844]
MOV dword ptr [RBX + 0x8860],EDX
LAB_0011721a:
CMP EDX,EAX
JL 0x001171ee
MOV ECX,dword ptr [RBX + 0x8840]
TEST ECX,ECX
JLE 0x001171ee
MOV EDX,dword ptr [RBX + 0x8864]
SHL EDX,CL
MOV dword ptr [RBX + 0x8844],EDX
SAR EDX,0x1
ADD EDX,dword ptr [RBX + 0x8850]
MOV dword ptr [RBX + 0x8860],EDX
DEC ECX
MOV dword ptr [RBX + 0x8840],ECX
JMP 0x0011721a
|
/* stbi__out_gif_code(stbi__gif*, unsigned short) */
void stbi__out_gif_code(stbi__gif *param_1,ushort param_2)
{
int iVar1;
long lVar2;
long lVar3;
ulong uVar4;
int iVar5;
ulong uVar6;
int6 in_register_00000032;
uVar6 = CONCAT62(in_register_00000032,param_2) & 0xffffffff;
if (-1 < (short)*(ushort *)(param_1 + uVar6 * 4 + 0x834)) {
stbi__out_gif_code(param_1,*(ushort *)(param_1 + uVar6 * 4 + 0x834));
}
if (*(int *)(param_1 + 0x8860) < *(int *)(param_1 + 0x8858)) {
uVar4 = (long)*(int *)(param_1 + 0x885c) + (long)*(int *)(param_1 + 0x8860);
lVar2 = *(long *)(param_1 + 8);
*(int1 *)
(*(long *)(param_1 + 0x18) +
(long)(int)((long)((ulong)(uint)((int)uVar4 >> 0x1f) << 0x20 | uVar4 & 0xffffffff) / 4)) = 1;
lVar3 = *(long *)(param_1 + 0x8838);
uVar6 = (ulong)(byte)param_1[uVar6 * 4 + 0x837];
if (0x80 < *(byte *)(lVar3 + 3 + uVar6 * 4)) {
*(int1 *)(lVar2 + uVar4) = *(int1 *)(lVar3 + 2 + uVar6 * 4);
*(int1 *)(lVar2 + 1 + uVar4) = *(int1 *)(lVar3 + 1 + uVar6 * 4);
*(int1 *)(lVar2 + 2 + uVar4) = *(int1 *)(lVar3 + uVar6 * 4);
*(int1 *)(lVar2 + 3 + uVar4) = *(int1 *)(lVar3 + 3 + uVar6 * 4);
}
iVar5 = *(int *)(param_1 + 0x885c);
*(int *)(param_1 + 0x885c) = iVar5 + 4;
if (*(int *)(param_1 + 0x8854) <= iVar5 + 4) {
*(int4 *)(param_1 + 0x885c) = *(int4 *)(param_1 + 0x884c);
iVar5 = *(int *)(param_1 + 0x8860) + *(int *)(param_1 + 0x8844);
*(int *)(param_1 + 0x8860) = iVar5;
while ((*(int *)(param_1 + 0x8858) <= iVar5 && (iVar1 = *(int *)(param_1 + 0x8840), 0 < iVar1)
)) {
iVar5 = *(int *)(param_1 + 0x8864) << ((byte)iVar1 & 0x1f);
*(int *)(param_1 + 0x8844) = iVar5;
iVar5 = (iVar5 >> 1) + *(int *)(param_1 + 0x8850);
*(int *)(param_1 + 0x8860) = iVar5;
*(int *)(param_1 + 0x8840) = iVar1 + -1;
}
}
}
return;
}
| |
42,369 | stbi__out_gif_code(stbi__gif*, unsigned short) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code)
{
stbi_uc *p, *c;
int idx;
// recurse to decode the prefixes, since the linked-list is backwards,
// and working backwards through an interleaved image would be nasty
if (g->codes[code].prefix >= 0)
stbi__out_gif_code(g, g->codes[code].prefix);
if (g->cur_y >= g->max_y) return;
idx = g->cur_x + g->cur_y;
p = &g->out[idx];
g->history[idx / 4] = 1;
c = &g->color_table[g->codes[code].suffix * 4];
if (c[3] > 128) { // don't render transparent pixels;
p[0] = c[2];
p[1] = c[1];
p[2] = c[0];
p[3] = c[3];
}
g->cur_x += 4;
if (g->cur_x >= g->max_x) {
g->cur_x = g->start_x;
g->cur_y += g->step;
while (g->cur_y >= g->max_y && g->parse > 0) {
g->step = (1 << g->parse) * g->line_size;
g->cur_y = g->start_y + (g->step >> 1);
--g->parse;
}
}
} | O3 | c | stbi__out_gif_code(stbi__gif*, unsigned short):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r14d
movzwl 0x834(%rdi,%r14,4), %eax
testw %ax, %ax
js 0x29ac4
movzwl %ax, %esi
movq %rbx, %rdi
callq 0x29aa1
movslq 0x8860(%rbx), %rcx
cmpl 0x8858(%rbx), %ecx
jge 0x29ba7
movslq 0x885c(%rbx), %rax
addq %rcx, %rax
movq 0x8(%rbx), %rcx
leal 0x3(%rax), %edx
testl %eax, %eax
cmovnsl %eax, %edx
movq 0x18(%rbx), %rsi
sarl $0x2, %edx
movslq %edx, %rdx
movb $0x1, (%rsi,%rdx)
movq 0x8838(%rbx), %rdx
movzbl 0x837(%rbx,%r14,4), %esi
cmpb $-0x7f, 0x3(%rdx,%rsi,4)
jb 0x29b36
movb 0x2(%rdx,%rsi,4), %dil
movb %dil, (%rcx,%rax)
movb 0x1(%rdx,%rsi,4), %dil
movb %dil, 0x1(%rcx,%rax)
movb (%rdx,%rsi,4), %dil
movb %dil, 0x2(%rcx,%rax)
movb 0x3(%rdx,%rsi,4), %dl
movb %dl, 0x3(%rcx,%rax)
movl 0x885c(%rbx), %eax
addl $0x4, %eax
movl %eax, 0x885c(%rbx)
cmpl 0x8854(%rbx), %eax
jl 0x29ba7
movl 0x884c(%rbx), %ecx
movl 0x8858(%rbx), %eax
movl %ecx, 0x885c(%rbx)
movl 0x8860(%rbx), %ecx
addl 0x8844(%rbx), %ecx
movl %ecx, 0x8860(%rbx)
cmpl %eax, %ecx
jl 0x29ba7
movl 0x8840(%rbx), %ecx
testl %ecx, %ecx
jle 0x29ba7
movl 0x8864(%rbx), %edx
shll %cl, %edx
movl %edx, 0x8844(%rbx)
sarl %edx
addl 0x8850(%rbx), %edx
movl %edx, 0x8860(%rbx)
decl %ecx
movl %ecx, 0x8840(%rbx)
cmpl %eax, %edx
jge 0x29b7b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZL18stbi__out_gif_codeP9stbi__gift:
push r14
push rbx
push rax
mov rbx, rdi
mov r14d, esi
movzx eax, word ptr [rdi+r14*4+834h]
test ax, ax
js short loc_29AC4
movzx esi, ax
mov rdi, rbx
call _ZL18stbi__out_gif_codeP9stbi__gift; stbi__out_gif_code(stbi__gif *,ushort)
loc_29AC4:
movsxd rcx, dword ptr [rbx+8860h]
cmp ecx, [rbx+8858h]
jge loc_29BA7
movsxd rax, dword ptr [rbx+885Ch]
add rax, rcx
mov rcx, [rbx+8]
lea edx, [rax+3]
test eax, eax
cmovns edx, eax
mov rsi, [rbx+18h]
sar edx, 2
movsxd rdx, edx
mov byte ptr [rsi+rdx], 1
mov rdx, [rbx+8838h]
movzx esi, byte ptr [rbx+r14*4+837h]
cmp byte ptr [rdx+rsi*4+3], 81h
jb short loc_29B36
mov dil, [rdx+rsi*4+2]
mov [rcx+rax], dil
mov dil, [rdx+rsi*4+1]
mov [rcx+rax+1], dil
mov dil, [rdx+rsi*4]
mov [rcx+rax+2], dil
mov dl, [rdx+rsi*4+3]
mov [rcx+rax+3], dl
loc_29B36:
mov eax, [rbx+885Ch]
add eax, 4
mov [rbx+885Ch], eax
cmp eax, [rbx+8854h]
jl short loc_29BA7
mov ecx, [rbx+884Ch]
mov eax, [rbx+8858h]
mov [rbx+885Ch], ecx
mov ecx, [rbx+8860h]
add ecx, [rbx+8844h]
mov [rbx+8860h], ecx
cmp ecx, eax
jl short loc_29BA7
mov ecx, [rbx+8840h]
loc_29B7B:
test ecx, ecx
jle short loc_29BA7
mov edx, [rbx+8864h]
shl edx, cl
mov [rbx+8844h], edx
sar edx, 1
add edx, [rbx+8850h]
mov [rbx+8860h], edx
dec ecx
mov [rbx+8840h], ecx
cmp edx, eax
jge short loc_29B7B
loc_29BA7:
add rsp, 8
pop rbx
pop r14
retn
| long long stbi__out_gif_code(long long a1, unsigned int a2, long long a3, long long a4, long long a5)
{
long long result; // rax
long long v6; // rcx
long long v7; // rax
long long v8; // rcx
long long v9; // rdx
long long v10; // rsi
int v11; // ecx
int v12; // ecx
int v13; // edx
int v14; // edx
result = *(unsigned __int16 *)(a1 + 4LL * a2 + 2100);
if ( (result & 0x8000u) == 0LL )
result = stbi__out_gif_code(a1, (unsigned __int16)result, a3, a4, a5);
v6 = *(int *)(a1 + 34912);
if ( (int)v6 < *(_DWORD *)(a1 + 34904) )
{
v7 = v6 + *(int *)(a1 + 34908);
v8 = *(_QWORD *)(a1 + 8);
*(_BYTE *)(*(_QWORD *)(a1 + 24) + (int)v7 / 4) = 1;
v9 = *(_QWORD *)(a1 + 34872);
v10 = *(unsigned __int8 *)(a1 + 4LL * a2 + 2103);
if ( *(_BYTE *)(v9 + 4 * v10 + 3) >= 0x81u )
{
*(_BYTE *)(v8 + v7) = *(_BYTE *)(v9 + 4 * v10 + 2);
*(_BYTE *)(v8 + v7 + 1) = *(_BYTE *)(v9 + 4 * v10 + 1);
*(_BYTE *)(v8 + v7 + 2) = *(_BYTE *)(v9 + 4 * v10);
*(_BYTE *)(v8 + v7 + 3) = *(_BYTE *)(v9 + 4 * v10 + 3);
}
result = (unsigned int)(*(_DWORD *)(a1 + 34908) + 4);
*(_DWORD *)(a1 + 34908) = result;
if ( (int)result >= *(_DWORD *)(a1 + 34900) )
{
result = *(unsigned int *)(a1 + 34904);
*(_DWORD *)(a1 + 34908) = *(_DWORD *)(a1 + 34892);
v11 = *(_DWORD *)(a1 + 34884) + *(_DWORD *)(a1 + 34912);
*(_DWORD *)(a1 + 34912) = v11;
if ( v11 >= (int)result )
{
v12 = *(_DWORD *)(a1 + 34880);
do
{
if ( v12 <= 0 )
break;
v13 = *(_DWORD *)(a1 + 34916) << v12;
*(_DWORD *)(a1 + 34884) = v13;
v14 = *(_DWORD *)(a1 + 34896) + (v13 >> 1);
*(_DWORD *)(a1 + 34912) = v14;
*(_DWORD *)(a1 + 34880) = --v12;
}
while ( v14 >= (int)result );
}
}
}
return result;
}
| |||
42,370 | ma_pvio_has_data | eloqsql/libmariadb/libmariadb/ma_pvio.c | my_bool ma_pvio_has_data(MARIADB_PVIO *pvio, ssize_t *data_len)
{
/* check if we still have unread data in cache */
if (pvio && pvio->cache)
if (pvio->cache_pos > pvio->cache)
return test(pvio->cache_pos - pvio->cache);
if (pvio && pvio->methods->has_data)
return pvio->methods->has_data(pvio, data_len);
return 1;
} | O0 | c | ma_pvio_has_data:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4923c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x4923c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x4923a
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq %rax, %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movb %al, -0x1(%rbp)
jmp 0x49271
jmp 0x4923c
cmpq $0x0, -0x10(%rbp)
je 0x4926d
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x78(%rax)
je 0x4926d
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movb %al, -0x1(%rbp)
jmp 0x49271
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| ma_pvio_has_data:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_10], 0
jz short loc_4923C
mov rax, [rbp+var_10]
cmp qword ptr [rax+8], 0
jz short loc_4923C
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+8]
jbe short loc_4923A
mov rax, [rbp+var_10]
mov rdx, [rax+10h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
sub rdx, rax
xor eax, eax
mov ecx, 1
cmp rdx, 0
cmovnz eax, ecx
mov [rbp+var_1], al
jmp short loc_49271
loc_4923A:
jmp short $+2
loc_4923C:
cmp [rbp+var_10], 0
jz short loc_4926D
mov rax, [rbp+var_10]
mov rax, [rax+48h]
cmp qword ptr [rax+78h], 0
jz short loc_4926D
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov rax, [rax+78h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call rax
mov [rbp+var_1], al
jmp short loc_49271
loc_4926D:
mov [rbp+var_1], 1
loc_49271:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char ma_pvio_has_data(_QWORD *a1, long long a2)
{
if ( a1 && a1[1] && a1[2] > a1[1] )
return a1[2] != a1[1];
if ( a1 && *(_QWORD *)(a1[9] + 120LL) )
return (*(long long ( **)(_QWORD *, long long))(a1[9] + 120LL))(a1, a2);
return 1;
}
| ma_pvio_has_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0014923c
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0014923c
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x8]
JBE 0x0014923a
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
SUB RDX,RAX
XOR EAX,EAX
MOV ECX,0x1
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV byte ptr [RBP + -0x1],AL
JMP 0x00149271
LAB_0014923a:
JMP 0x0014923c
LAB_0014923c:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0014926d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
CMP qword ptr [RAX + 0x78],0x0
JZ 0x0014926d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x78]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL RAX
MOV byte ptr [RBP + -0x1],AL
JMP 0x00149271
LAB_0014926d:
MOV byte ptr [RBP + -0x1],0x1
LAB_00149271:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 ma_pvio_has_data(long param_1,int8 param_2)
{
int1 local_9;
if (((param_1 == 0) || (*(long *)(param_1 + 8) == 0)) ||
(*(ulong *)(param_1 + 0x10) <= *(ulong *)(param_1 + 8))) {
if ((param_1 == 0) || (*(long *)(*(long *)(param_1 + 0x48) + 0x78) == 0)) {
local_9 = 1;
}
else {
local_9 = (**(code **)(*(long *)(param_1 + 0x48) + 0x78))(param_1,param_2);
}
}
else {
local_9 = *(long *)(param_1 + 0x10) != *(long *)(param_1 + 8);
}
return local_9;
}
| |
42,371 | 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&) | hkr04[P]cpp-mcp/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 0x6980
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x1b449(%rip), %rsi # 0x51404
callq 0x80f0
jmp 0x35fc2
leaq 0x106(%rsp), %rdi
callq 0x6640
movq 0x108(%rsp), %rdi
callq 0x68d0
testb $0x1, %al
jne 0x3609a
movq 0x108(%rsp), %rdx
movb $0x20, 0xcf(%rsp)
leaq 0x1b417(%rip), %rsi # 0x51412
leaq 0xd0(%rsp), %rdi
leaq 0xcf(%rsp), %rcx
callq 0x40a50
jmp 0x36012
movq 0x18(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x6710
jmp 0x36026
leaq 0xd0(%rsp), %rdi
callq 0x6360
jmp 0x3609a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x106(%rsp), %rdi
callq 0x6640
jmp 0x362a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x36298
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x6360
jmp 0x36298
movq 0x18(%rsp), %rdi
leaq 0x1819d(%rip), %rsi # 0x4e243
callq 0x6590
jmp 0x360ad
movq 0x10(%rsp), %rax
cmpl $0xe, 0x20(%rax)
jne 0x36195
movq 0x10(%rsp), %rdi
addq $0x28, %rdi
movq %rdi, (%rsp)
callq 0x40be0
movq (%rsp), %rsi
movq %rax, 0xa0(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x35ba0
jmp 0x360e9
movb $0x27, 0x7f(%rsp)
leaq 0x1b32c(%rip), %rdx # 0x51421
leaq 0xa8(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0x80(%rsp), %rcx
leaq 0x7f(%rsp), %r8
callq 0x40b10
jmp 0x36119
movq 0x18(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x6710
jmp 0x3612d
leaq 0xa8(%rsp), %rdi
callq 0x6360
leaq 0x80(%rsp), %rdi
callq 0x6360
jmp 0x361ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x36183
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x6360
leaq 0x80(%rsp), %rdi
callq 0x6360
jmp 0x36298
movq 0x10(%rsp), %rax
movl 0x20(%rax), %edi
callq 0x40ca0
movq %rax, 0x50(%rsp)
leaq 0x1b282(%rip), %rsi # 0x51430
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x40bf0
jmp 0x361bf
movq 0x18(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x6710
jmp 0x361d0
leaq 0x58(%rsp), %rdi
callq 0x6360
jmp 0x361ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x6360
jmp 0x36298
cmpl $0x0, 0x114(%rsp)
je 0x3626f
movl 0x114(%rsp), %edi
callq 0x40ca0
movq %rax, 0x28(%rsp)
leaq 0x1b21b(%rip), %rsi # 0x5143c
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x40bf0
jmp 0x36232
movq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6710
jmp 0x36243
leaq 0x30(%rsp), %rdi
callq 0x6360
jmp 0x3626f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x6360
jmp 0x36298
movb $0x1, 0x107(%rsp)
testb $0x1, 0x107(%rsp)
jne 0x3628b
movq 0x18(%rsp), %rdi
callq 0x6360
movq 0x8(%rsp), %rax
addq $0x128, %rsp # imm = 0x128
retq
movq 0x18(%rsp), %rdi
callq 0x6360
movq 0xf8(%rsp), %rdi
callq 0x6970
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
mov rax, rdi
mov [rsp+128h+var_120], rax
mov [rsp+128h+var_8], rdi
mov [rsp+128h+var_10], rsi
mov [rsp+128h+var_14], edx
mov [rsp+128h+var_20], rcx
mov rax, [rsp+128h+var_10]
mov [rsp+128h+var_118], rax
mov [rsp+128h+var_21], 0
lea rdi, [rsp+128h+var_22]
mov [rsp+128h+var_108], rdi
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_35FC2:
lea rdi, [rsp+128h+var_22]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rsp+128h+var_20]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_3609A
mov rdx, [rsp+128h+var_20]
mov [rsp+128h+var_59], 20h ; ' '
lea rsi, aWhileParsing; "while parsing "
lea rdi, [rsp+128h+var_58]
lea rcx, [rsp+128h+var_59]
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_36012:
mov rdi, [rsp+128h+var_110]
lea rsi, [rsp+128h+var_58]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_36026:
lea rdi, [rsp+128h+var_58]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_3609A
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_362A2
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
jmp loc_36298
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_36298
loc_3609A:
mov rdi, [rsp+128h+var_110]
lea rsi, asc_4E241+2; "- "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_360AD:
mov rax, [rsp+128h+var_118]
cmp dword ptr [rax+20h], 0Eh
jnz loc_36195
mov rdi, [rsp+128h+var_118]
add rdi, 28h ; '('
mov [rsp+128h+var_128], rdi
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, [rsp+128h+var_128]
mov [rsp+128h+var_88], rax
lea rdi, [rsp+128h+var_A8]
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_360E9:
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_36119:
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_3612D:
lea rdi, [rsp+128h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+128h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_361FF
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
jmp short loc_36183
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_A0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_36183:
lea rdi, [rsp+arg_78]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_36298
loc_36195:
mov rax, [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 [rsp+128h+var_D8], rax
lea rsi, aUnexpected; "unexpected "
lea rdi, [rsp+128h+var_D0]
lea rdx, [rsp+128h+var_D8]
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_361BF:
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_361D0:
lea rdi, [rsp+128h+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_361FF
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_36298
loc_361FF:
cmp [rsp+128h+var_14], 0
jz short loc_3626F
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 [rsp+128h+var_100], rax
lea rsi, aExpected; "; expected "
lea rdi, [rsp+128h+var_F8]
lea rdx, [rsp+128h+var_100]
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_36232:
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_36243:
lea rdi, [rsp+128h+var_F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_3626F
mov rcx, rax
mov eax, edx
mov [rsp+arg_F0], rcx
mov [rsp+arg_EC], eax
lea rdi, [rsp+arg_28]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_36298
loc_3626F:
mov [rsp+128h+var_21], 1
test [rsp+128h+var_21], 1
jnz short loc_3628B
mov rdi, [rsp+128h+var_110]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3628B:
mov rax, [rsp+128h+var_120]
add rsp, 128h
retn
loc_36298:
mov rdi, [rsp+arg_10]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_362A2:
mov rdi, [rsp+arg_F0]
call __Unwind_Resume
| long long 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
long long v14; // [rsp+8h] [rbp-120h]
long long v15; // [rsp+18h] [rbp-110h]
long long v16; // [rsp+28h] [rbp-100h] BYREF
_BYTE v17[32]; // [rsp+30h] [rbp-F8h] BYREF
long long v18; // [rsp+50h] [rbp-D8h] BYREF
_BYTE v19[39]; // [rsp+58h] [rbp-D0h] BYREF
char v20; // [rsp+7Fh] [rbp-A9h] BYREF
_BYTE v21[32]; // [rsp+80h] [rbp-A8h] BYREF
long long error_message; // [rsp+A0h] [rbp-88h] BYREF
_BYTE v23[39]; // [rsp+A8h] [rbp-80h] BYREF
char v24; // [rsp+CFh] [rbp-59h] BYREF
_BYTE v25[54]; // [rsp+D0h] [rbp-58h] BYREF
_BYTE v26[2]; // [rsp+106h] [rbp-22h] BYREF
long long v27; // [rsp+108h] [rbp-20h]
unsigned int v28; // [rsp+114h] [rbp-14h]
long long v29; // [rsp+118h] [rbp-10h]
long long v30; // [rsp+120h] [rbp-8h]
v15 = a1;
v14 = a1;
v30 = a1;
v29 = a2;
v28 = a3;
v27 = a4;
v26[1] = 0;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"syntax error ", (long long)v26);
std::allocator<char>::~allocator(v26);
if ( (std::string::empty(v27) & 1) == 0 )
{
v24 = 32;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(
(unsigned int)v25,
(unsigned int)"while parsing ",
v27,
(unsigned int)&v24,
v4,
v5);
std::string::operator+=(a1, v25);
std::string::~string(v25);
}
std::string::operator+=(a1, "- ");
if ( *(_DWORD *)(a2 + 32) == 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)v21,
a2 + 40);
v20 = 39;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(
(unsigned int)v23,
(unsigned int)&error_message,
(unsigned int)"; last read: '",
(unsigned int)v21,
(unsigned int)&v20,
v6,
a2 + 40,
a1,
a2,
a1);
std::string::operator+=(v15, v23);
std::string::~string(v23);
std::string::~string(v21);
}
else
{
v18 = 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 *)(a2 + 32));
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(
(unsigned int)v19,
(unsigned int)"unexpected ",
(unsigned int)&v18,
v7,
v8,
v9);
std::string::operator+=(a1, v19);
std::string::~string(v19);
}
if ( v28 )
{
v16 = 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(v28);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(
(unsigned int)v17,
(unsigned int)"; expected ",
(unsigned int)&v16,
v10,
v11,
v12);
std::string::operator+=(v15, v17);
std::string::~string(v17);
}
return v14;
}
| 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 0x00106980
MOV RDI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
LAB_00135fb4:
LEA RSI,[0x151404]
CALL 0x001080f0
JMP 0x00135fc2
LAB_00135fc2:
LEA RDI,[RSP + 0x106]
CALL 0x00106640
MOV RDI,qword ptr [RSP + 0x108]
CALL 0x001068d0
TEST AL,0x1
JNZ 0x0013609a
MOV RDX,qword ptr [RSP + 0x108]
MOV byte ptr [RSP + 0xcf],0x20
LAB_00135ff4:
LEA RSI,[0x151412]
LEA RDI,[RSP + 0xd0]
LEA RCX,[RSP + 0xcf]
CALL 0x00140a50
JMP 0x00136012
LAB_00136012:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0xd0]
CALL 0x00106710
JMP 0x00136026
LAB_00136026:
LEA RDI,[RSP + 0xd0]
CALL 0x00106360
JMP 0x0013609a
LAB_0013609a:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x14e243]
CALL 0x00106590
JMP 0x001360ad
LAB_001360ad:
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x20],0xe
JNZ 0x00136195
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x28
MOV qword ptr [RSP],RDI
CALL 0x00140be0
MOV RSI,qword ptr [RSP]
MOV qword ptr [RSP + 0xa0],RAX
LEA RDI,[RSP + 0x80]
CALL 0x00135ba0
JMP 0x001360e9
LAB_001360e9:
MOV byte ptr [RSP + 0x7f],0x27
LAB_001360ee:
LEA RDX,[0x151421]
LEA RDI,[RSP + 0xa8]
LEA RSI,[RSP + 0xa0]
LEA RCX,[RSP + 0x80]
LEA R8,[RSP + 0x7f]
CALL 0x00140b10
JMP 0x00136119
LAB_00136119:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0xa8]
CALL 0x00106710
JMP 0x0013612d
LAB_0013612d:
LEA RDI,[RSP + 0xa8]
CALL 0x00106360
LEA RDI,[RSP + 0x80]
CALL 0x00106360
JMP 0x001361ff
LAB_00136195:
MOV RAX,qword ptr [RSP + 0x10]
MOV EDI,dword ptr [RAX + 0x20]
CALL 0x00140ca0
MOV qword ptr [RSP + 0x50],RAX
LAB_001361a7:
LEA RSI,[0x151430]
LEA RDI,[RSP + 0x58]
LEA RDX,[RSP + 0x50]
CALL 0x00140bf0
JMP 0x001361bf
LAB_001361bf:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x58]
CALL 0x00106710
JMP 0x001361d0
LAB_001361d0:
LEA RDI,[RSP + 0x58]
CALL 0x00106360
JMP 0x001361ff
LAB_001361ff:
CMP dword ptr [RSP + 0x114],0x0
JZ 0x0013626f
MOV EDI,dword ptr [RSP + 0x114]
CALL 0x00140ca0
MOV qword ptr [RSP + 0x28],RAX
LAB_0013621a:
LEA RSI,[0x15143c]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x28]
CALL 0x00140bf0
JMP 0x00136232
LAB_00136232:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x30]
CALL 0x00106710
LAB_00136241:
JMP 0x00136243
LAB_00136243:
LEA RDI,[RSP + 0x30]
CALL 0x00106360
JMP 0x0013626f
LAB_0013626f:
MOV byte ptr [RSP + 0x107],0x1
TEST byte ptr [RSP + 0x107],0x1
JNZ 0x0013628b
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00106360
LAB_0013628b:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x128
RET
|
/* WARNING: Removing unreachable block (ram,0x00136281) */
/* 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 00135fb4 to 00135fbf has its CatchHandler @ 00136035 */
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 00135ff4 to 0013600f has its CatchHandler @ 0013605b */
concat<std::__cxx11::string,char_const(&)[15],std::__cxx11::string_const&,char>
(local_58,"while parsing ",local_20,&local_59);
/* try { // try from 00136012 to 00136023 has its CatchHandler @ 00136074 */
std::__cxx11::string::operator+=(param_1,(string *)local_58);
std::__cxx11::string::~string((string *)local_58);
}
/* try { // try from 0013609a to 001360e6 has its CatchHandler @ 0013605b */
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 001360ee to 00136116 has its CatchHandler @ 0013614c */
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 00136119 to 0013612a has its CatchHandler @ 00136162 */
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 001361a7 to 001361bc has its CatchHandler @ 0013605b */
concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_d0,"unexpected ",&local_d8);
/* try { // try from 001361bf to 001361cd has its CatchHandler @ 001361dc */
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 0013621a to 0013622f has its CatchHandler @ 0013605b */
concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_f8,"; expected ",&local_100);
/* try { // try from 00136232 to 00136240 has its CatchHandler @ 0013624f */
std::__cxx11::string::operator+=(param_1,(string *)local_f8);
std::__cxx11::string::~string((string *)local_f8);
}
return param_1;
}
| |
42,372 | 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&) | hkr04[P]cpp-mcp/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;
} | O3 | 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&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
leaq 0xa3e3(%rip), %rsi # 0x20b0c
leaq 0xa3e9(%rip), %rdx # 0x20b19
callq 0x78c6
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0x167bc
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
addq $0xf, %rsi
leaq 0x8(%rsp), %rdi
callq 0x5660
leaq 0xa3b1(%rip), %rsi # 0x20b1a
leaq 0x8(%rsp), %rdi
callq 0x57a0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x5120
leaq 0x8(%rsp), %rdi
movl $0x20, %esi
callq 0x53c0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x5120
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x167bc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5460
leaq 0x79f4(%rip), %rsi # 0x1e1b7
movq %rbx, %rdi
callq 0x57a0
movl 0x20(%r14), %edi
cmpl $0xe, %edi
jne 0x1685f
movq 0x98(%r14), %rax
addq $0x28, %r14
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x1644a
leaq 0x2f(%rsp), %r8
movb $0x27, (%r8)
leaq 0xa324(%rip), %rdx # 0x20b29
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x38(%rsp), %rcx
callq 0x1a5b6
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x5120
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16846
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5460
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x168d9
movq 0x48(%rsp), %rsi
jmp 0x168d1
callq 0x1a678
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq %rax, %rdi
callq 0x51c0
leaq 0xb(%rax), %rsi
leaq 0x8(%rsp), %rdi
callq 0x5660
leaq 0xa29f(%rip), %rsi # 0x20b38
leaq 0x8(%rsp), %rdi
callq 0x57a0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x57a0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x5120
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x168d9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5460
testl %ebp, %ebp
je 0x16959
movl %ebp, %edi
callq 0x1a678
movq %rax, %r14
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq %rax, %rdi
callq 0x51c0
leaq 0xb(%rax), %rsi
leaq 0x8(%rsp), %rdi
callq 0x5660
leaq 0xa22b(%rip), %rsi # 0x20b44
leaq 0x8(%rsp), %rdi
callq 0x57a0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x57a0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x5120
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x16959
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5460
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x169b2
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x16990
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5460
jmp 0x16990
movq %rax, %r14
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x169db
movq 0x48(%rsp), %rsi
jmp 0x169d3
jmp 0x169ab
jmp 0x169b2
jmp 0x169c1
movq %rax, %r14
jmp 0x169db
jmp 0x169b2
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
jne 0x169ce
jmp 0x169db
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x169db
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5460
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x169ef
movq (%r12), %rsi
incq %rsi
callq 0x5460
movq %r14, %rdi
callq 0x5740
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_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rcx
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
lea rsi, aSyntaxError; "syntax error "
lea rdx, aSyntaxError+0Dh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rsi, [r15+8]
test rsi, rsi
jz short loc_167BC
lea r13, [rsp+88h+var_70]
mov [r13-10h], r13
mov qword ptr [r13-8], 0
mov byte ptr [r13+0], 0
add rsi, 0Fh
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
lea rsi, aWhileParsing; "while parsing "
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea rdi, [rsp+88h+var_80]
mov esi, 20h ; ' '
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r13
jz short loc_167BC
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_167BC:
lea rsi, asc_1E1B5+2; "- "
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov edi, [r14+20h]
cmp edi, 0Eh
jnz loc_1685F
mov rax, [r14+98h]
add r14, 28h ; '('
mov [rsp+88h+var_58], rax
lea rdi, [rsp+88h+var_50]
mov rsi, r14
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)
lea r8, [rsp+88h+var_59]
mov byte ptr [r8], 27h ; '''
lea rdx, aLastRead; "; last read: '"
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_58]
lea rcx, [rsp+88h+var_50]
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 &&)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_16846
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_16846:
lea rax, [rsp+88h+var_40]
mov rdi, [rax-10h]
cmp rdi, rax
jz loc_168D9
mov rsi, [rsp+88h+var_40]
jmp short loc_168D1
loc_1685F:
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 r14, rax
lea r15, [rsp+88h+var_70]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
mov rdi, rax
call _strlen
lea rsi, [rax+0Bh]
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
lea rsi, aUnexpected; "unexpected "
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rsp+88h+var_80]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r15
jz short loc_168D9
mov rsi, [rsp+88h+var_70]
loc_168D1:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_168D9:
test ebp, ebp
jz short loc_16959
mov edi, ebp
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 r14, rax
lea r15, [rsp+88h+var_70]
mov [r15-10h], r15
mov qword ptr [r15-8], 0
mov byte ptr [r15], 0
mov rdi, rax
call _strlen
lea rsi, [rax+0Bh]
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
lea rsi, aExpected; "; expected "
lea rdi, [rsp+88h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rsp+88h+var_80]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r15
jz short loc_16959
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_16959:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_169B2
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_16990
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_16990
mov r14, rax
loc_16990:
lea rax, [rsp+arg_40]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_169DB
mov rsi, [rsp+arg_40]
jmp short loc_169D3
jmp short loc_169AB
jmp short loc_169B2
jmp short loc_169C1
loc_169AB:
mov r14, rax
jmp short loc_169DB
jmp short $+2
loc_169B2:
mov r14, rax
mov rdi, [rsp+arg_0]
cmp rdi, r15
jnz short loc_169CE
jmp short loc_169DB
loc_169C1:
mov r14, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_169DB
loc_169CE:
mov rsi, [rsp+arg_10]
loc_169D3:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_169DB:
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_169EF
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_169EF:
mov rdi, r14
call __Unwind_Resume
| _QWORD * 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(
_QWORD *a1,
long long a2,
unsigned int a3,
_QWORD *a4)
{
long long v8; // rsi
void *v9; // rdi
long long v10; // rsi
long long v11; // r14
long long v12; // rax
long long v13; // r14
long long v14; // rax
void *v16; // [rsp+8h] [rbp-80h] BYREF
long long v17; // [rsp+10h] [rbp-78h]
_QWORD v18[2]; // [rsp+18h] [rbp-70h] BYREF
char v19; // [rsp+2Fh] [rbp-59h] BYREF
long long v20; // [rsp+30h] [rbp-58h] BYREF
_QWORD v21[2]; // [rsp+38h] [rbp-50h] BYREF
long long v22; // [rsp+48h] [rbp-40h] BYREF
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, "syntax error ", (long long)"");
v8 = a4[1];
if ( v8 )
{
v16 = v18;
v17 = 0LL;
LOBYTE(v18[0]) = 0;
std::string::reserve(&v16, v8 + 15);
std::string::append(&v16, "while parsing ");
std::string::_M_append(&v16, *a4, a4[1]);
std::string::push_back(&v16, 32LL);
std::string::_M_append(a1, v16, v17);
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
}
std::string::append(a1, "- ");
if ( *(_DWORD *)(a2 + 32) == 14 )
{
v20 = *(_QWORD *)(a2 + 152);
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)v21,
a2 + 40);
v19 = 39;
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(
&v16,
&v20,
"; last read: '",
v21,
&v19);
std::string::_M_append(a1, v16, v17);
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
v9 = (void *)v21[0];
if ( (long long *)v21[0] != &v22 )
{
v10 = v22;
LABEL_11:
operator delete(v9, v10 + 1);
}
}
else
{
v11 = ((long long (*)(void))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)();
v16 = v18;
v17 = 0LL;
LOBYTE(v18[0]) = 0;
v12 = strlen(v11);
std::string::reserve(&v16, v12 + 11);
std::string::append(&v16, "unexpected ");
std::string::append(&v16, v11);
std::string::_M_append(a1, v16, v17);
v9 = v16;
if ( v16 != v18 )
{
v10 = v18[0];
goto LABEL_11;
}
}
if ( a3 )
{
v13 = 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(a3);
v16 = v18;
v17 = 0LL;
LOBYTE(v18[0]) = 0;
v14 = strlen(v13);
std::string::reserve(&v16, v14 + 11);
std::string::append(&v16, "; expected ");
std::string::append(&v16, v13);
std::string::_M_append(a1, v16, v17);
if ( v16 != v18 )
operator delete(v16, v18[0] + 1LL);
}
return a1;
}
| exception_message:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RCX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
LEA RSI,[0x120b0c]
LEA RDX,[0x120b19]
CALL 0x001078c6
MOV RSI,qword ptr [R15 + 0x8]
TEST RSI,RSI
JZ 0x001167bc
LEA R13,[RSP + 0x18]
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],0x0
MOV byte ptr [R13],0x0
ADD RSI,0xf
LAB_00116758:
LEA RDI,[RSP + 0x8]
CALL 0x00105660
LEA RSI,[0x120b1a]
LEA RDI,[RSP + 0x8]
CALL 0x001057a0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x00105120
LEA RDI,[RSP + 0x8]
MOV ESI,0x20
CALL 0x001053c0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0011679d:
MOV RDI,RBX
CALL 0x00105120
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x001167bc
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00105460
LAB_001167bc:
LEA RSI,[0x11e1b7]
MOV RDI,RBX
CALL 0x001057a0
MOV EDI,dword ptr [R14 + 0x20]
CMP EDI,0xe
JNZ 0x0011685f
MOV RAX,qword ptr [R14 + 0x98]
ADD R14,0x28
MOV qword ptr [RSP + 0x30],RAX
LAB_001167e8:
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x0011644a
LEA R8,[RSP + 0x2f]
MOV byte ptr [R8],0x27
LAB_001167fe:
LEA RDX,[0x120b29]
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x30]
LEA RCX,[RSP + 0x38]
CALL 0x0011a5b6
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00116823:
MOV RDI,RBX
CALL 0x00105120
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00116846
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00105460
LAB_00116846:
LEA RAX,[RSP + 0x48]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001168d9
MOV RSI,qword ptr [RSP + 0x48]
JMP 0x001168d1
LAB_0011685f:
CALL 0x0011a678
MOV R14,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
MOV RDI,RAX
CALL 0x001051c0
LEA RSI,[RAX + 0xb]
LAB_00116888:
LEA RDI,[RSP + 0x8]
CALL 0x00105660
LEA RSI,[0x120b38]
LEA RDI,[RSP + 0x8]
CALL 0x001057a0
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x001057a0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001168ba:
MOV RDI,RBX
CALL 0x00105120
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x001168d9
MOV RSI,qword ptr [RSP + 0x18]
LAB_001168d1:
INC RSI
CALL 0x00105460
LAB_001168d9:
TEST EBP,EBP
JZ 0x00116959
MOV EDI,EBP
CALL 0x0011a678
MOV R14,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
MOV qword ptr [R15 + -0x8],0x0
MOV byte ptr [R15],0x0
MOV RDI,RAX
CALL 0x001051c0
LEA RSI,[RAX + 0xb]
LAB_00116908:
LEA RDI,[RSP + 0x8]
CALL 0x00105660
LEA RSI,[0x120b44]
LEA RDI,[RSP + 0x8]
CALL 0x001057a0
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x001057a0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0011693a:
MOV RDI,RBX
CALL 0x00105120
LAB_00116942:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x00116959
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00105460
LAB_00116959:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* 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&) */
long * 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(long *param_1,long param_2,int param_3,ulong *param_4)
{
char *pcVar1;
long *local_80;
int8 local_78;
int1 local_70;
int7 uStack_6f;
int1 local_59;
int8 local_58;
long *local_50 [2];
long local_40 [2];
*param_1 = (long)(param_1 + 2);
std::__cxx11::string::_M_construct<char_const*>(param_1,"syntax error ","");
if (param_4[1] != 0) {
local_78 = 0;
local_70 = 0;
/* try { // try from 00116758 to 00116792 has its CatchHandler @ 001169c1 */
local_80 = (long *)&local_70;
std::__cxx11::string::reserve((ulong)&local_80);
std::__cxx11::string::append((char *)&local_80);
std::__cxx11::string::_M_append((char *)&local_80,*param_4);
std::__cxx11::string::push_back((char)&local_80);
/* try { // try from 0011679d to 001167a4 has its CatchHandler @ 001169a9 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 != (long *)&local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
}
/* try { // try from 001167bc to 001167ca has its CatchHandler @ 001169ab */
std::__cxx11::string::append((char *)param_1);
if (*(int *)(param_2 + 0x20) == 0xe) {
local_58 = *(int8 *)(param_2 + 0x98);
/* try { // try from 001167e8 to 001167f4 has its CatchHandler @ 001169a5 */
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_59 = 0x27;
/* try { // try from 001167fe to 00116818 has its CatchHandler @ 0011698d */
concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char>
((char **)&local_80,(char *)&local_58,(string *)"; last read: \'",(char *)local_50);
/* try { // try from 00116823 to 0011682a has its CatchHandler @ 0011696d */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 != (long *)&local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
if (local_50[0] == local_40) goto LAB_001168d9;
}
else {
pcVar1 = (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_78 = 0;
local_70 = 0;
local_80 = (long *)&local_70;
strlen(pcVar1);
/* try { // try from 00116888 to 001168af has its CatchHandler @ 001169b0 */
std::__cxx11::string::reserve((ulong)&local_80);
std::__cxx11::string::append((char *)&local_80);
std::__cxx11::string::append((char *)&local_80);
/* try { // try from 001168ba to 001168c1 has its CatchHandler @ 0011696b */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 == (long *)&local_70) goto LAB_001168d9;
local_40[0] = CONCAT71(uStack_6f,local_70);
local_50[0] = local_80;
}
operator_delete(local_50[0],local_40[0] + 1);
LAB_001168d9:
if (param_3 != 0) {
pcVar1 = (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(param_3);
local_78 = 0;
local_70 = 0;
local_80 = (long *)&local_70;
strlen(pcVar1);
/* try { // try from 00116908 to 0011692f has its CatchHandler @ 001169b2 */
std::__cxx11::string::reserve((ulong)&local_80);
std::__cxx11::string::append((char *)&local_80);
std::__cxx11::string::append((char *)&local_80);
/* try { // try from 0011693a to 00116941 has its CatchHandler @ 001169a7 */
std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80);
if (local_80 != (long *)&local_70) {
operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1);
}
}
return param_1;
}
| |
42,373 | nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*) | hkr04[P]cpp-mcp/common/json.hpp | static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xea63(%rip), %rsi # 0x44cd8
leaq 0xea6c(%rip), %rdx # 0x44ce8
leaq 0x28(%rsp), %rdi
callq 0xba4e
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0xb6d4
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq 0x8(%r15), %rsi
addq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x8820
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x8150
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x8150
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x8150
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x3631f
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x8580
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3633a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x8580
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x36351
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8580
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0xb93c
leaq 0x26769(%rip), %rax # 0x5cad0
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x36381
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8580
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3640f
movq 0x18(%rsp), %rsi
jmp 0x36407
movq %rax, %rbx
jmp 0x363f8
movq %rax, %rbx
jmp 0x3640f
movq %rdx, %rbx
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x363d1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8580
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x88(%rsp), %r12
movq %r14, %rsi
movq %r15, %rcx
movl %ebx, %r8d
movq %r12, %r9
callq 0x95a3
movq (%r12), %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x3640f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8580
movq %rbx, %rdi
callq 0x8960
nop
| _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea r13, [rsp+0C8h+var_90]
mov [r13-10h], r13
lea rsi, aInvalidIterato; "invalid_iterator"
lea rdx, aInvalidIterato+10h; ""
lea rdi, [rsp+0C8h+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0C8h+var_80]; int
lea rsi, [rsp+0C8h+var_A0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea r14, [rsp+0C8h+var_50]
mov [r14-10h], r14
xor eax, eax
mov [r14-8], rax
mov [r14], al
lea r12, [rsp+0C8h+var_B0]
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
mov rsi, [r15+8]
add rsi, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, qword ptr [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r14
jz short loc_3631F
mov rsi, [rsp+0C8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3631F:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3633A
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3633A:
mov rdi, [rsp+0C8h+var_A0]; void *
cmp rdi, r13
jz short loc_36351
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_36351:
mov rdx, [rsp+0C8h+var_C0]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*)
lea rax, off_5CAD0
mov [rbx], rax
mov rdi, [rsp+0C8h+var_C0]; void *
cmp rdi, r12
jz short loc_36381
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_36381:
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jz short loc_3640F
mov rsi, [rsp+arg_10]
jmp short loc_36407
mov rbx, rax
jmp short loc_363F8
mov rbx, rax
jmp short loc_3640F
mov rbx, rdx
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_363D1
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_363D1:
lea rdi, [rsp+arg_60]
lea rdx, [rsp+arg_40]
lea r12, [rsp+arg_80]
mov rsi, r14
mov rcx, r15
mov r8d, ebx
mov r9, r12
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ__cold_1
mov rbx, [r12]
loc_363F8:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_3640F
mov rsi, [rsp+arg_30]
loc_36407:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3640F:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
nlohmann::json_abi_v3_11_3::detail::exception *this,
int a2,
_QWORD *a3)
{
char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF
void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF
int v9[2]; // [rsp+48h] [rbp-80h] BYREF
long long v10; // [rsp+50h] [rbp-78h]
long long v11; // [rsp+58h] [rbp-70h] BYREF
void *v12; // [rsp+68h] [rbp-60h]
long long v13; // [rsp+70h] [rbp-58h]
_QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF
v7[0] = v8;
std::string::_M_construct<char const*>(v7, "invalid_iterator", (long long)"");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2);
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v5[0] = (char *)v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
std::string::reserve(v5, v10 + a3[1]);
std::string::_M_append(v5, *(_QWORD *)v9, v10);
std::string::_M_append(v5, v12, v13);
std::string::_M_append(v5, *a3, a3[1]);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
if ( *(long long **)v9 != &v11 )
operator delete(*(void **)v9, v11 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]);
*(_QWORD *)this = off_5CAD0;
if ( (_QWORD *)v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_0013626e:
LEA RSI,[0x144cd8]
LEA RDX,[0x144ce8]
LEA RDI,[RSP + 0x28]
CALL 0x0010ba4e
LAB_00136286:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x0010b6d4
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
XOR EAX,EAX
MOV qword ptr [R14 + -0x8],RAX
MOV byte ptr [R14],AL
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],RAX
MOV byte ptr [R12],AL
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,qword ptr [RSP + 0x50]
LAB_001362c5:
LEA RDI,[RSP + 0x8]
CALL 0x00108820
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x8]
CALL 0x00108150
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x8]
CALL 0x00108150
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x00108150
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x0013631f
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x00108580
LAB_0013631f:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0013633a
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x00108580
LAB_0013633a:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x00136351
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00108580
LAB_00136351:
MOV RDX,qword ptr [RSP + 0x8]
LAB_00136356:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0010b93c
LAB_00136360:
LEA RAX,[0x15cad0]
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x00136381
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00108580
LAB_00136381:
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
exception *
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(exception *param_1,int param_2,ulong *param_3)
{
char *local_c0;
int8 local_b8;
char local_b0;
int7 uStack_af;
long *local_a0 [2];
long local_90 [2];
long *local_80 [2];
long local_70 [2];
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
/* try { // try from 0013626e to 00136285 has its CatchHandler @ 001363af */
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char_const*>(local_a0,"invalid_iterator","");
/* try { // try from 00136286 to 00136296 has its CatchHandler @ 001363aa */
nlohmann::json_abi_v3_11_3::detail::exception::name
((exception *)local_80,(string *)local_a0,param_2);
local_58 = 0;
local_50 = 0;
local_b8 = 0;
local_b0 = '\0';
/* try { // try from 001362c5 to 00136307 has its CatchHandler @ 001363b4 */
local_c0 = &local_b0;
local_60 = &local_50;
std::__cxx11::string::reserve((ulong)&local_c0);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60);
std::__cxx11::string::_M_append((char *)&local_c0,*param_3);
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
/* try { // try from 00136356 to 0013635f has its CatchHandler @ 00136396 */
nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0);
*(int ***)param_1 = &PTR__exception_0015cad0;
if (local_c0 != &local_b0) {
operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1);
}
return param_1;
}
| |
42,374 | wt_resource_create | eloqsql/mysys/waiting_threads.c | static void wt_resource_create(uchar *arg)
{
WT_RESOURCE *rc= (WT_RESOURCE*)(arg+LF_HASH_OVERHEAD);
DBUG_ENTER("wt_resource_create");
bzero(rc, sizeof(*rc));
rc_rwlock_init(rc);
mysql_cond_init(key_WT_RESOURCE_cond, &rc->cond, 0);
my_init_dynamic_array(PSI_INSTRUMENT_ME, &rc->owners,
sizeof(WT_THD *), 0, 5, MYF(0));
DBUG_VOID_RETURN;
} | O3 | c | wt_resource_create:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3cca6(%rip), %rax # 0xea2fc
movslq (%rax), %r15
addq %r15, %rdi
movl $0x108, %edx # imm = 0x108
xorl %esi, %esi
callq 0x2a2c0
leaq (%rbx,%r15), %rdi
addq $0x18, %rdi
callq 0xaa94c
leaq 0xb63908(%rip), %rax # 0xc10f84
movl (%rax), %edi
leaq (%rbx,%r15), %r14
addq $0xa8, %r14
leaq 0x2e1bc8(%rip), %rax # 0x38f258
movq (%rax), %rax
movq %r14, %rsi
callq *0x60(%rax)
movq %rax, 0x30(%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0x2a390
leaq (%rbx,%r15), %rsi
addq $0xe0, %rsi
movq $0x0, (%rsp)
xorl %edi, %edi
movl $0x8, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x5, %r9d
callq 0x9486c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| wt_resource_create:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
lea rax, LF_HASH_OVERHEAD
movsxd r15, dword ptr [rax]
add rdi, r15
mov edx, 108h
xor esi, esi
call _memset
lea rdi, [rbx+r15]
add rdi, 18h
call my_rw_init
lea rax, key_WT_RESOURCE_cond
mov edi, [rax]
lea r14, [rbx+r15]
add r14, 0A8h
lea rax, PSI_server
mov rax, [rax]
mov rsi, r14
call qword ptr [rax+60h]
mov [r14+30h], rax
mov rdi, r14
xor esi, esi
call _pthread_cond_init
lea rsi, [rbx+r15]
add rsi, 0E0h
mov [rsp+20h+var_20], 0
xor edi, edi
mov edx, 8
xor ecx, ecx
xor r8d, r8d
mov r9d, 5
call init_dynamic_array2
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long wt_resource_create(long long a1)
{
memset(LF_HASH_OVERHEAD + a1, 0LL, 264LL);
my_rw_init(a1 + LF_HASH_OVERHEAD + 24);
*(_QWORD *)(a1 + LF_HASH_OVERHEAD + 216) = ((long long ( *)(_QWORD, long long))PSI_server[12])(
key_WT_RESOURCE_cond,
a1 + LF_HASH_OVERHEAD + 168);
pthread_cond_init(a1 + LF_HASH_OVERHEAD + 168, 0LL);
return init_dynamic_array2(0LL, a1 + LF_HASH_OVERHEAD + 224, 8u, 0LL, 0, 5u, 0LL);
}
| wt_resource_create:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[0x1ea2fc]
MOVSXD R15,dword ptr [RAX]
ADD RDI,R15
MOV EDX,0x108
XOR ESI,ESI
CALL 0x0012a2c0
LEA RDI,[RBX + R15*0x1]
ADD RDI,0x18
CALL 0x001aa94c
LEA RAX,[0xd10f84]
MOV EDI,dword ptr [RAX]
LEA R14,[RBX + R15*0x1]
ADD R14,0xa8
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
MOV RSI,R14
CALL qword ptr [RAX + 0x60]
MOV qword ptr [R14 + 0x30],RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x0012a390
LEA RSI,[RBX + R15*0x1]
ADD RSI,0xe0
MOV qword ptr [RSP],0x0
XOR EDI,EDI
MOV EDX,0x8
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x5
CALL 0x0019486c
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void wt_resource_create(long param_1)
{
int8 uVar1;
long lVar2;
lVar2 = (long)LF_HASH_OVERHEAD;
memset((void *)(param_1 + lVar2),0,0x108);
my_rw_init(param_1 + lVar2 + 0x18);
uVar1 = (**(code **)(PSI_server + 0x60))(key_WT_RESOURCE_cond);
*(int8 *)(param_1 + lVar2 + 0xd8) = uVar1;
pthread_cond_init((pthread_cond_t *)(param_1 + lVar2 + 0xa8),(pthread_condattr_t *)0x0);
init_dynamic_array2(0,param_1 + lVar2 + 0xe0,8,0,0,5,0);
return;
}
| |
42,375 | hashmap_get_with_hash | alca/libalca/hashmap.c | const void *hashmap_get_with_hash(struct hashmap *map, const void *key,
uint64_t hash)
{
hash = clip_hash(hash);
size_t i = hash & map->mask;
while (1)
{
struct bucket *bucket = bucket_at(map, i);
if (!bucket->dib) return NULL;
if (bucket->hash == hash)
{
void *bitem = bucket_item(bucket);
if (!map->compare || map->compare(key, bitem, map->udata) == 0)
{
return bitem;
}
}
i = (i + 1) & map->mask;
}
} | O0 | c | hashmap_get_with_hash:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xc830
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
andq 0x70(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc8a0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
shrq $0x30, %rax
cmpq $0x0, %rax
jne 0xc9cd
movq $0x0, -0x8(%rbp)
jmp 0xca40
movq -0x30(%rbp), %rcx
movabsq $0xffffffffffff, %rax # imm = 0xFFFFFFFFFFFF
andq (%rcx), %rax
cmpq -0x20(%rbp), %rax
jne 0xca27
movq -0x30(%rbp), %rdi
callq 0xc880
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0xca1b
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rdx
callq *%rax
cmpl $0x0, %eax
jne 0xca25
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xca40
jmp 0xca27
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq -0x10(%rbp), %rcx
andq 0x70(%rcx), %rax
movq %rax, -0x28(%rbp)
jmp 0xc9a1
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| hashmap_get_with_hash:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_20]
call clip_hash
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
and rax, [rcx+70h]
mov [rbp+var_28], rax
loc_C9A1:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
call bucket_at
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax]
shr rax, 30h
cmp rax, 0
jnz short loc_C9CD
mov [rbp+var_8], 0
jmp short loc_CA40
loc_C9CD:
mov rcx, [rbp+var_30]
mov rax, 0FFFFFFFFFFFFh
and rax, [rcx]
cmp rax, [rbp+var_20]
jnz short loc_CA27
mov rdi, [rbp+var_30]
call bucket_item
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jz short loc_CA1B
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_38]
mov rcx, [rbp+var_10]
mov rdx, [rcx+50h]
call rax
cmp eax, 0
jnz short loc_CA25
loc_CA1B:
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_CA40
loc_CA25:
jmp short $+2
loc_CA27:
mov rax, [rbp+var_28]
add rax, 1
mov rcx, [rbp+var_10]
and rax, [rcx+70h]
mov [rbp+var_28], rax
jmp loc_C9A1
loc_CA40:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long hashmap_get_with_hash(_QWORD *a1, long long a2, long long a3)
{
long long v4; // [rsp+8h] [rbp-38h]
_QWORD *v5; // [rsp+10h] [rbp-30h]
long long i; // [rsp+18h] [rbp-28h]
long long v7; // [rsp+20h] [rbp-20h]
v7 = clip_hash(a3);
for ( i = a1[14] & v7; ; i = a1[14] & (i + 1) )
{
v5 = (_QWORD *)bucket_at((long long)a1, i);
if ( !HIWORD(*v5) )
return 0LL;
if ( (*v5 & 0xFFFFFFFFFFFFLL) == v7 )
{
v4 = bucket_item((long long)v5);
if ( !a1[8] || !((unsigned int ( *)(long long, long long, _QWORD))a1[8])(a2, v4, a1[10]) )
break;
}
}
return v4;
}
| hashmap_get_with_hash:
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 RDI,qword ptr [RBP + -0x20]
CALL 0x0010c830
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
AND RAX,qword ptr [RCX + 0x70]
MOV qword ptr [RBP + -0x28],RAX
LAB_0010c9a1:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x0010c8a0
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
SHR RAX,0x30
CMP RAX,0x0
JNZ 0x0010c9cd
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010ca40
LAB_0010c9cd:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,0xffffffffffff
AND RAX,qword ptr [RCX]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0010ca27
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0010c880
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x0010ca1b
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX + 0x50]
CALL RAX
CMP EAX,0x0
JNZ 0x0010ca25
LAB_0010ca1b:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0010ca40
LAB_0010ca25:
JMP 0x0010ca27
LAB_0010ca27:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV RCX,qword ptr [RBP + -0x10]
AND RAX,qword ptr [RCX + 0x70]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0010c9a1
LAB_0010ca40:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 hashmap_get_with_hash(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
ulong uVar2;
ulong *puVar3;
int8 uVar4;
ulong local_30;
uVar2 = clip_hash(param_3);
local_30 = uVar2 & *(ulong *)(param_1 + 0x70);
do {
puVar3 = (ulong *)bucket_at(param_1,local_30);
if (*puVar3 >> 0x30 == 0) {
return 0;
}
if ((*puVar3 & 0xffffffffffff) == uVar2) {
uVar4 = bucket_item(puVar3);
if (*(long *)(param_1 + 0x40) == 0) {
return uVar4;
}
iVar1 = (**(code **)(param_1 + 0x40))(param_2,uVar4,*(int8 *)(param_1 + 0x50));
if (iVar1 == 0) {
return uVar4;
}
}
local_30 = local_30 + 1 & *(ulong *)(param_1 + 0x70);
} while( true );
}
| |
42,376 | google::protobuf::DescriptorProto::SharedCtor(google::protobuf::Arena*, bool) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | inline void DescriptorProto::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.field_){arena}
, decltype(_impl_.nested_type_){arena}
, decltype(_impl_.enum_type_){arena}
, decltype(_impl_.extension_range_){arena}
, decltype(_impl_.extension_){arena}
, decltype(_impl_.oneof_decl_){arena}
, decltype(_impl_.reserved_range_){arena}
, decltype(_impl_.reserved_name_){arena}
, decltype(_impl_.name_){}
, decltype(_impl_.options_){nullptr}
};
_impl_.name_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.name_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
} | O0 | cpp | google::protobuf::DescriptorProto::SharedCtor(google::protobuf::Arena*, bool):
subq $0x88, %rsp
movb %dl, %al
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
andb $0x1, %al
movb %al, 0x6f(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x38(%rsp)
addq $0x10, %rax
movq %rax, 0x40(%rsp)
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq 0x48(%rsp), %rcx
movl $0x0, (%rax)
addq $0x4, %rax
cmpq %rcx, %rax
movq %rax, 0x50(%rsp)
jne 0xd5e1d
movq 0x40(%rsp), %rax
movq %rax, %rdi
addq $0x4, %rdi
movl $0x0, 0x4(%rax)
callq 0xd3ff0
movq 0x40(%rsp), %rdi
addq $0x8, %rdi
movq %rdi, 0x28(%rsp)
movq 0x70(%rsp), %rsi
callq 0xde110
movq 0x40(%rsp), %rdi
addq $0x20, %rdi
movq %rdi, 0x30(%rsp)
movq 0x70(%rsp), %rsi
callq 0xde080
jmp 0xd5e85
movq 0x40(%rsp), %rdi
addq $0x38, %rdi
movq %rdi, 0x20(%rsp)
movq 0x70(%rsp), %rsi
callq 0xde0b0
jmp 0xd5e9f
movq 0x40(%rsp), %rdi
addq $0x50, %rdi
movq %rdi, 0x18(%rsp)
movq 0x70(%rsp), %rsi
callq 0xde570
jmp 0xd5eb9
movq 0x40(%rsp), %rdi
addq $0x68, %rdi
movq %rdi, 0x10(%rsp)
movq 0x70(%rsp), %rsi
callq 0xde110
jmp 0xd5ed3
movq 0x40(%rsp), %rdi
subq $-0x80, %rdi
movq %rdi, 0x8(%rsp)
movq 0x70(%rsp), %rsi
callq 0xde5a0
jmp 0xd5eed
movq 0x40(%rsp), %rdi
addq $0x98, %rdi
movq %rdi, (%rsp)
movq 0x70(%rsp), %rsi
callq 0xde5d0
jmp 0xd5f09
movq 0x40(%rsp), %rdi
addq $0xb0, %rdi
movq 0x70(%rsp), %rsi
callq 0x1cc9f0
jmp 0xd5f21
movq 0x40(%rsp), %rdi
addq $0xc8, %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x13200
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rdi
movq $0x0, 0xd0(%rax)
addq $0x10, %rdi
addq $0xc8, %rdi
callq 0xd4b40
addq $0x88, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0xd6012
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0xd6008
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0xd5ffe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0xd5ff4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0xd5fea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0xd5fe0
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
callq 0xd6150
movq 0x8(%rsp), %rdi
callq 0xd61a0
movq 0x10(%rsp), %rdi
callq 0xd4a00
movq 0x18(%rsp), %rdi
callq 0xd61f0
movq 0x20(%rsp), %rdi
callq 0xd4aa0
movq 0x30(%rsp), %rdi
callq 0xd4af0
movq 0x28(%rsp), %rdi
callq 0xd4a00
movq 0x60(%rsp), %rdi
callq 0x13750
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf15DescriptorProto10SharedCtorEPNS0_5ArenaEb:
sub rsp, 88h
mov al, dl
mov [rsp+88h+var_10], rdi
mov [rsp+88h+var_18], rsi
and al, 1
mov [rsp+88h+var_19], al
mov rax, [rsp+88h+var_10]
mov [rsp+88h+var_50], rax
add rax, 10h
mov [rsp+88h+var_48], rax
mov [rsp+88h+var_8], rax
mov rax, [rsp+88h+var_8]
mov rcx, rax
add rcx, 4
mov [rsp+88h+var_40], rcx
mov [rsp+88h+var_38], rax
loc_D5E1D:
mov rax, [rsp+88h+var_38]
mov rcx, [rsp+88h+var_40]
mov dword ptr [rax], 0
add rax, 4
cmp rax, rcx
mov [rsp+88h+var_38], rax
jnz short loc_D5E1D
mov rax, [rsp+88h+var_48]
mov rdi, rax
add rdi, 4; this
mov dword ptr [rax+4], 0
call _ZN6google8protobuf8internal10CachedSizeC2Ev; google::protobuf::internal::CachedSize::CachedSize(void)
mov rdi, [rsp+88h+var_48]
add rdi, 8
mov [rsp+88h+var_60], rdi
mov rsi, [rsp+88h+var_18]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto>::RepeatedPtrField(google::protobuf::Arena *)
mov rdi, [rsp+88h+var_48]
add rdi, 20h ; ' '
mov [rsp+88h+var_58], rdi
mov rsi, [rsp+88h+var_18]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::RepeatedPtrField(google::protobuf::Arena *)
jmp short $+2
loc_D5E85:
mov rdi, [rsp+88h+var_48]
add rdi, 38h ; '8'
mov [rsp+88h+var_68], rdi
mov rsi, [rsp+88h+var_18]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_19EnumDescriptorProtoEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto>::RepeatedPtrField(google::protobuf::Arena *)
jmp short $+2
loc_D5E9F:
mov rdi, [rsp+88h+var_48]
add rdi, 50h ; 'P'
mov [rsp+88h+var_70], rdi
mov rsi, [rsp+88h+var_18]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_30DescriptorProto_ExtensionRangeEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto_ExtensionRange>::RepeatedPtrField(google::protobuf::Arena *)
jmp short $+2
loc_D5EB9:
mov rdi, [rsp+88h+var_48]
add rdi, 68h ; 'h'
mov [rsp+88h+var_78], rdi
mov rsi, [rsp+88h+var_18]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto>::RepeatedPtrField(google::protobuf::Arena *)
jmp short $+2
loc_D5ED3:
mov rdi, [rsp+88h+var_48]
sub rdi, 0FFFFFFFFFFFFFF80h
mov [rsp+88h+var_80], rdi
mov rsi, [rsp+88h+var_18]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_20OneofDescriptorProtoEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<google::protobuf::OneofDescriptorProto>::RepeatedPtrField(google::protobuf::Arena *)
jmp short $+2
loc_D5EED:
mov rdi, [rsp+88h+var_48]
add rdi, 98h
mov [rsp+88h+var_88], rdi
mov rsi, [rsp+88h+var_18]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_29DescriptorProto_ReservedRangeEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto_ReservedRange>::RepeatedPtrField(google::protobuf::Arena *)
jmp short $+2
loc_D5F09:
mov rdi, [rsp+88h+var_48]
add rdi, 0B0h
mov rsi, [rsp+88h+var_18]
call _ZN6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2EPNS0_5ArenaE; google::protobuf::RepeatedPtrField<std::string>::RepeatedPtrField(google::protobuf::Arena *)
jmp short $+2
loc_D5F21:
mov rdi, [rsp+88h+var_48]
add rdi, 0C8h
xor esi, esi
mov edx, 8
call _memset
mov rax, [rsp+88h+var_48]
mov rdi, [rsp+88h+var_50]
mov qword ptr [rax+0D0h], 0
add rdi, 10h
add rdi, 0C8h; this
call _ZN6google8protobuf8internal14ArenaStringPtr11InitDefaultEv; google::protobuf::internal::ArenaStringPtr::InitDefault(void)
add rsp, 88h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp loc_D6012
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_D6008
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_D5FFE
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_D5FF4
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_D5FEA
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_D5FE0
mov rdi, [rsp+0]
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
call _ZN6google8protobuf16RepeatedPtrFieldINS0_29DescriptorProto_ReservedRangeEED2Ev; google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto_ReservedRange>::~RepeatedPtrField()
loc_D5FE0:
mov rdi, [rsp+arg_0]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_20OneofDescriptorProtoEED2Ev; google::protobuf::RepeatedPtrField<google::protobuf::OneofDescriptorProto>::~RepeatedPtrField()
loc_D5FEA:
mov rdi, [rsp+arg_8]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEED2Ev; google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto>::~RepeatedPtrField()
loc_D5FF4:
mov rdi, [rsp+arg_10]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_30DescriptorProto_ExtensionRangeEED2Ev; google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto_ExtensionRange>::~RepeatedPtrField()
loc_D5FFE:
mov rdi, [rsp+arg_18]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_19EnumDescriptorProtoEED2Ev; google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto>::~RepeatedPtrField()
loc_D6008:
mov rdi, [rsp+arg_28]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEED2Ev; google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::~RepeatedPtrField()
loc_D6012:
mov rdi, [rsp+arg_20]
call _ZN6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEED2Ev; google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto>::~RepeatedPtrField()
mov rdi, [rsp+arg_58]
call __Unwind_Resume
| google::protobuf::internal::ArenaStringPtr * google::protobuf::DescriptorProto::SharedCtor(
google::protobuf::DescriptorProto *this,
google::protobuf::Arena *a2)
{
google::protobuf::DescriptorProto *v3; // [rsp+50h] [rbp-38h]
v3 = (google::protobuf::DescriptorProto *)((char *)this + 16);
do
{
*(_DWORD *)v3 = 0;
v3 = (google::protobuf::DescriptorProto *)((char *)v3 + 4);
}
while ( v3 != (google::protobuf::DescriptorProto *)((char *)this + 20) );
*((_DWORD *)this + 5) = 0;
google::protobuf::internal::CachedSize::CachedSize((google::protobuf::DescriptorProto *)((char *)this + 20));
google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto>::RepeatedPtrField((char *)this + 24, a2);
google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::RepeatedPtrField((char *)this + 48, a2);
google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto>::RepeatedPtrField((char *)this + 72, a2);
google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto_ExtensionRange>::RepeatedPtrField(
(char *)this + 96,
a2);
google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto>::RepeatedPtrField((char *)this + 120, a2);
google::protobuf::RepeatedPtrField<google::protobuf::OneofDescriptorProto>::RepeatedPtrField((char *)this + 144, a2);
google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto_ReservedRange>::RepeatedPtrField(
(char *)this + 168,
a2);
google::protobuf::RepeatedPtrField<std::string>::RepeatedPtrField((char *)this + 192, a2);
memset((char *)this + 216, 0LL, 8LL);
*((_QWORD *)this + 28) = 0LL;
return google::protobuf::internal::ArenaStringPtr::InitDefault((google::protobuf::DescriptorProto *)((char *)this + 216));
}
| SharedCtor:
SUB RSP,0x88
MOV AL,DL
MOV qword ptr [RSP + 0x78],RDI
MOV qword ptr [RSP + 0x70],RSI
AND AL,0x1
MOV byte ptr [RSP + 0x6f],AL
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x38],RAX
ADD RAX,0x10
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RSP + 0x48],RCX
MOV qword ptr [RSP + 0x50],RAX
LAB_001d5e1d:
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x48]
MOV dword ptr [RAX],0x0
ADD RAX,0x4
CMP RAX,RCX
MOV qword ptr [RSP + 0x50],RAX
JNZ 0x001d5e1d
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,RAX
ADD RDI,0x4
MOV dword ptr [RAX + 0x4],0x0
CALL 0x001d3ff0
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x8
MOV qword ptr [RSP + 0x28],RDI
MOV RSI,qword ptr [RSP + 0x70]
CALL 0x001de110
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x20
MOV qword ptr [RSP + 0x30],RDI
MOV RSI,qword ptr [RSP + 0x70]
LAB_001d5e7e:
CALL 0x001de080
JMP 0x001d5e85
LAB_001d5e85:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x38
MOV qword ptr [RSP + 0x20],RDI
MOV RSI,qword ptr [RSP + 0x70]
LAB_001d5e98:
CALL 0x001de0b0
JMP 0x001d5e9f
LAB_001d5e9f:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x50
MOV qword ptr [RSP + 0x18],RDI
MOV RSI,qword ptr [RSP + 0x70]
LAB_001d5eb2:
CALL 0x001de570
JMP 0x001d5eb9
LAB_001d5eb9:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x68
MOV qword ptr [RSP + 0x10],RDI
MOV RSI,qword ptr [RSP + 0x70]
LAB_001d5ecc:
CALL 0x001de110
JMP 0x001d5ed3
LAB_001d5ed3:
MOV RDI,qword ptr [RSP + 0x40]
SUB RDI,-0x80
MOV qword ptr [RSP + 0x8],RDI
MOV RSI,qword ptr [RSP + 0x70]
LAB_001d5ee6:
CALL 0x001de5a0
JMP 0x001d5eed
LAB_001d5eed:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0x98
MOV qword ptr [RSP],RDI
MOV RSI,qword ptr [RSP + 0x70]
LAB_001d5f02:
CALL 0x001de5d0
JMP 0x001d5f09
LAB_001d5f09:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0xb0
MOV RSI,qword ptr [RSP + 0x70]
LAB_001d5f1a:
CALL 0x002cc9f0
LAB_001d5f1f:
JMP 0x001d5f21
LAB_001d5f21:
MOV RDI,qword ptr [RSP + 0x40]
ADD RDI,0xc8
XOR ESI,ESI
MOV EDX,0x8
CALL 0x00113200
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + 0xd0],0x0
ADD RDI,0x10
ADD RDI,0xc8
CALL 0x001d4b40
ADD RSP,0x88
RET
|
/* google::protobuf::DescriptorProto::SharedCtor(google::protobuf::Arena*, bool) */
void google::protobuf::DescriptorProto::SharedCtor(Arena *param_1,bool param_2)
{
int7 in_register_00000031;
Arena *pAVar1;
Arena *local_38;
pAVar1 = (Arena *)CONCAT71(in_register_00000031,param_2);
local_38 = param_1 + 0x10;
do {
*(int4 *)local_38 = 0;
local_38 = local_38 + 4;
} while (local_38 != param_1 + 0x14);
*(int4 *)(param_1 + 0x14) = 0;
internal::CachedSize::CachedSize((CachedSize *)(param_1 + 0x14));
RepeatedPtrField<google::protobuf::FieldDescriptorProto>::RepeatedPtrField
((RepeatedPtrField<google::protobuf::FieldDescriptorProto> *)(param_1 + 0x18),pAVar1);
/* try { // try from 001d5e7e to 001d5e82 has its CatchHandler @ 001d5f66 */
RepeatedPtrField<google::protobuf::DescriptorProto>::RepeatedPtrField
((RepeatedPtrField<google::protobuf::DescriptorProto> *)(param_1 + 0x30),pAVar1);
/* try { // try from 001d5e98 to 001d5e9c has its CatchHandler @ 001d5f79 */
RepeatedPtrField<google::protobuf::EnumDescriptorProto>::RepeatedPtrField
((RepeatedPtrField<google::protobuf::EnumDescriptorProto> *)(param_1 + 0x48),pAVar1);
/* try { // try from 001d5eb2 to 001d5eb6 has its CatchHandler @ 001d5f89 */
RepeatedPtrField<google::protobuf::DescriptorProto_ExtensionRange>::RepeatedPtrField
((RepeatedPtrField<google::protobuf::DescriptorProto_ExtensionRange> *)(param_1 + 0x60),
pAVar1);
/* try { // try from 001d5ecc to 001d5ed0 has its CatchHandler @ 001d5f99 */
RepeatedPtrField<google::protobuf::FieldDescriptorProto>::RepeatedPtrField
((RepeatedPtrField<google::protobuf::FieldDescriptorProto> *)(param_1 + 0x78),pAVar1);
/* try { // try from 001d5ee6 to 001d5eea has its CatchHandler @ 001d5fa9 */
RepeatedPtrField<google::protobuf::OneofDescriptorProto>::RepeatedPtrField
((RepeatedPtrField<google::protobuf::OneofDescriptorProto> *)(param_1 + 0x90),pAVar1);
/* try { // try from 001d5f02 to 001d5f06 has its CatchHandler @ 001d5fb9 */
RepeatedPtrField<google::protobuf::DescriptorProto_ReservedRange>::RepeatedPtrField
((RepeatedPtrField<google::protobuf::DescriptorProto_ReservedRange> *)(param_1 + 0xa8),
pAVar1);
/* try { // try from 001d5f1a to 001d5f1e has its CatchHandler @ 001d5fc9 */
RepeatedPtrField<std::__cxx11::string>::RepeatedPtrField
((RepeatedPtrField<std::__cxx11::string> *)(param_1 + 0xc0),pAVar1);
memset(param_1 + 0xd8,0,8);
*(int8 *)(param_1 + 0xe0) = 0;
internal::ArenaStringPtr::InitDefault((ArenaStringPtr *)(param_1 + 0xd8));
return;
}
| |
42,377 | blst_uint64_from_fp | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c | void blst_uint64_from_fp(unsigned long long ret[6], const vec384 a)
{
const union {
long one;
char little;
} is_endian = { 1 };
if (sizeof(limb_t) == 8 || is_endian.little) {
from_fp((limb_t *)ret, a);
} else {
vec384 out;
int i;
from_fp(out, a);
for (i = 0; i < 6; i++)
ret[i] = out[2*i] | ((unsigned long long)out[2*i+1] << 32);
}
} | O3 | c | blst_uint64_from_fp:
pushq %rbp
movq %rsp, %rbp
leaq 0x27518(%rip), %rdx # 0x8cca0
movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD
popq %rbp
jmp 0x74800
| blst_uint64_from_fp:
push rbp
mov rbp, rsp
lea rdx, BLS12_381_P
mov rcx, 89F3FFFCFFFCFFFDh
pop rbp
jmp from_mont_384
| long long blst_uint64_from_fp(long long a1, long long a2)
{
return from_mont_384(a1, a2, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
}
| blst_uint64_from_fp:
PUSH RBP
MOV RBP,RSP
LEA RDX,[0x18cca0]
MOV RCX,-0x760c000300030003
POP RBP
JMP 0x00174800
|
void blst_uint64_from_fp(int8 param_1,int8 param_2)
{
from_mont_384(param_1,param_2,BLS12_381_P,0x89f3fffcfffcfffd);
return;
}
| |
42,378 | ma_dynstr_set | eloqsql/libmariadb/libmariadb/ma_string.c | my_bool ma_dynstr_set(DYNAMIC_STRING *str, const char *init_str)
{
uint length;
if (init_str && (length= (uint) strlen(init_str)+1) > str->max_length)
{
str->max_length=((length+str->alloc_increment-1)/str->alloc_increment)*
str->alloc_increment;
if (!str->max_length)
str->max_length=str->alloc_increment;
if (!(str->str=(char*) realloc(str->str,str->max_length)))
return(TRUE);
}
if (init_str)
{
str->length=length-1;
memcpy(str->str,init_str,length);
}
else
str->length=0;
return(FALSE);
} | O0 | c | ma_dynstr_set:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x55977
movq -0x18(%rbp), %rdi
callq 0x363e0
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl %eax, %eax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x55977
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
addq 0x18(%rcx), %rax
subq $0x1, %rax
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divq 0x18(%rcx)
movq %rax, %rcx
movq -0x10(%rbp), %rax
imulq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x5594e
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x360c0
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x55975
movb $0x1, -0x1(%rbp)
jmp 0x559b7
jmp 0x55977
cmpq $0x0, -0x18(%rbp)
je 0x559a7
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %eax
movl %eax, %edx
callq 0x360b0
jmp 0x559b3
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
| ma_dynstr_set:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_18], 0
jz loc_55977
mov rdi, [rbp+var_18]
call _strlen
add eax, 1
mov [rbp+var_1C], eax
mov eax, eax
mov rcx, [rbp+var_10]
cmp rax, [rcx+10h]
jbe short loc_55977
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
add rax, [rcx+18h]
sub rax, 1
mov rcx, [rbp+var_10]
xor edx, edx
div qword ptr [rcx+18h]
mov rcx, rax
mov rax, [rbp+var_10]
imul rcx, [rax+18h]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+10h], 0
jnz short loc_5594E
mov rax, [rbp+var_10]
mov rcx, [rax+18h]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
loc_5594E:
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
call _realloc
mov rcx, [rbp+var_10]
mov [rcx], rax
cmp rax, 0
jnz short loc_55975
mov [rbp+var_1], 1
jmp short loc_559B7
loc_55975:
jmp short $+2
loc_55977:
cmp [rbp+var_18], 0
jz short loc_559A7
mov eax, [rbp+var_1C]
sub eax, 1
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rsi, [rbp+var_18]
mov eax, [rbp+var_1C]
mov edx, eax
call _memcpy
jmp short loc_559B3
loc_559A7:
mov rax, [rbp+var_10]
mov qword ptr [rax+8], 0
loc_559B3:
mov [rbp+var_1], 0
loc_559B7:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char ma_dynstr_set(long long *a1, long long a2)
{
long long v2; // rax
unsigned int v4; // [rsp+4h] [rbp-1Ch]
if ( !a2 )
goto LABEL_7;
v4 = strlen(a2) + 1;
if ( v4 <= (unsigned long long)a1[2] )
goto LABEL_7;
a1[2] = a1[3] * ((a1[3] + (unsigned long long)v4 - 1) / a1[3]);
if ( !a1[2] )
a1[2] = a1[3];
v2 = realloc(*a1, a1[2]);
*a1 = v2;
if ( !v2 )
return 1;
LABEL_7:
if ( a2 )
{
a1[1] = v4 - 1;
memcpy(*a1, a2, v4);
}
else
{
a1[1] = 0LL;
}
return 0;
}
| ma_dynstr_set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00155977
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001363e0
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,EAX
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x10]
JBE 0x00155977
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RCX + 0x18]
SUB RAX,0x1
MOV RCX,qword ptr [RBP + -0x10]
XOR EDX,EDX
DIV qword ptr [RCX + 0x18]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
IMUL RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x0015594e
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
LAB_0015594e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x001360c0
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x00155975
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001559b7
LAB_00155975:
JMP 0x00155977
LAB_00155977:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001559a7
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x1
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x1c]
MOV EDX,EAX
CALL 0x001360b0
JMP 0x001559b3
LAB_001559a7:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],0x0
LAB_001559b3:
MOV byte ptr [RBP + -0x1],0x0
LAB_001559b7:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 ma_dynstr_set(int8 *param_1,char *param_2)
{
size_t sVar1;
void *pvVar2;
uint local_24;
if (param_2 != (char *)0x0) {
sVar1 = strlen(param_2);
local_24 = (int)sVar1 + 1;
if ((ulong)param_1[2] < (ulong)local_24) {
param_1[2] = ((((ulong)local_24 + param_1[3]) - 1) / (ulong)param_1[3]) * param_1[3];
if (param_1[2] == 0) {
param_1[2] = param_1[3];
}
pvVar2 = realloc((void *)*param_1,param_1[2]);
*param_1 = pvVar2;
if (pvVar2 == (void *)0x0) {
return 1;
}
}
}
if (param_2 == (char *)0x0) {
param_1[1] = 0;
}
else {
param_1[1] = (ulong)(local_24 - 1);
memcpy((void *)*param_1,param_2,(ulong)local_24);
}
return 0;
}
| |
42,379 | free_tree | eloqsql/mysys/tree.c | static int free_tree(TREE *tree, my_bool abort, myf free_flags)
{
int error, first_error= 0;
DBUG_ENTER("free_tree");
DBUG_PRINT("enter",("tree: %p", tree));
if (tree->root) /* If initialized */
{
if (tree->with_delete)
{
if ((error= delete_tree_element(tree, tree->root, abort)))
{
first_error= first_error ? first_error : error;
abort= 1;
}
}
else
{
if (tree->free)
{
if (tree->memory_limit)
(*tree->free)(NULL, free_init, tree->custom_arg);
if ((error= delete_tree_element(tree, tree->root, abort)))
first_error= first_error ? first_error : error;
if (tree->memory_limit)
(*tree->free)(NULL, free_end, tree->custom_arg);
}
free_root(&tree->mem_root, free_flags);
}
}
tree->root= &null_element;
tree->elements_in_tree=0;
tree->allocated=0;
DBUG_RETURN(first_error);
} | O3 | c | free_tree:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
movq (%rdi), %rsi
testq %rsi, %rsi
je 0xa47a9
cmpb $0x0, 0x278(%rbx)
je 0xa47ae
movsbl %r15b, %edx
movq %rbx, %rdi
callq 0xa5402
movl %eax, %r15d
jmp 0xa4818
xorl %r15d, %r15d
jmp 0xa4818
movq %rdx, %r14
movq 0x280(%rbx), %rax
testq %rax, %rax
je 0xa4806
cmpq $0x0, 0x218(%rbx)
je 0xa47d7
movq 0x230(%rbx), %rdx
xorl %edi, %edi
xorl %esi, %esi
callq *%rax
movq (%rbx), %rsi
movsbl %r15b, %edx
movq %rbx, %rdi
callq 0xa5402
movl %eax, %r15d
cmpq $0x0, 0x218(%rbx)
je 0xa4809
movq 0x230(%rbx), %rdx
xorl %edi, %edi
movl $0x2, %esi
callq *0x280(%rbx)
jmp 0xa4809
xorl %r15d, %r15d
leaq 0x238(%rbx), %rdi
movq %r14, %rsi
callq 0x9cd73
leaq 0x2e13a1(%rip), %rax # 0x385bc0
movq %rax, (%rbx)
movl $0x0, 0x20c(%rbx)
movq $0x0, 0x220(%rbx)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| free_tree:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r15d, esi
mov rbx, rdi
mov rsi, [rdi]
test rsi, rsi
jz short loc_A47A9
cmp byte ptr [rbx+278h], 0
jz short loc_A47AE
movsx edx, r15b
mov rdi, rbx
call delete_tree_element
mov r15d, eax
jmp short loc_A4818
loc_A47A9:
xor r15d, r15d
jmp short loc_A4818
loc_A47AE:
mov r14, rdx
mov rax, [rbx+280h]
test rax, rax
jz short loc_A4806
cmp qword ptr [rbx+218h], 0
jz short loc_A47D7
mov rdx, [rbx+230h]
xor edi, edi
xor esi, esi
call rax
mov rsi, [rbx]
loc_A47D7:
movsx edx, r15b
mov rdi, rbx
call delete_tree_element
mov r15d, eax
cmp qword ptr [rbx+218h], 0
jz short loc_A4809
mov rdx, [rbx+230h]
xor edi, edi
mov esi, 2
call qword ptr [rbx+280h]
jmp short loc_A4809
loc_A4806:
xor r15d, r15d
loc_A4809:
lea rdi, [rbx+238h]
mov rsi, r14
call free_root
loc_A4818:
lea rax, null_element
mov [rbx], rax
mov dword ptr [rbx+20Ch], 0
mov qword ptr [rbx+220h], 0
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long free_tree(long long *a1, char a2, char a3)
{
long long v4; // rsi
unsigned int v5; // r15d
void ( *v7)(_QWORD, _QWORD, long long); // rax
v4 = *a1;
if ( *a1 )
{
if ( *((_BYTE *)a1 + 632) )
{
v5 = delete_tree_element(a1, v4, (unsigned int)a2);
}
else
{
v7 = (void ( *)(_QWORD, _QWORD, long long))a1[80];
if ( v7 )
{
if ( a1[67] )
{
v7(0LL, 0LL, a1[70]);
v4 = *a1;
}
v5 = delete_tree_element(a1, v4, (unsigned int)a2);
if ( a1[67] )
((void ( *)(_QWORD, long long, long long))a1[80])(0LL, 2LL, a1[70]);
}
else
{
v5 = 0;
}
free_root(a1 + 71, a3);
}
}
else
{
v5 = 0;
}
*a1 = (long long)&null_element;
*((_DWORD *)a1 + 131) = 0;
a1[68] = 0LL;
return v5;
}
| free_tree:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15D,ESI
MOV RBX,RDI
MOV RSI,qword ptr [RDI]
TEST RSI,RSI
JZ 0x001a47a9
CMP byte ptr [RBX + 0x278],0x0
JZ 0x001a47ae
MOVSX EDX,R15B
MOV RDI,RBX
CALL 0x001a5402
MOV R15D,EAX
JMP 0x001a4818
LAB_001a47a9:
XOR R15D,R15D
JMP 0x001a4818
LAB_001a47ae:
MOV R14,RDX
MOV RAX,qword ptr [RBX + 0x280]
TEST RAX,RAX
JZ 0x001a4806
CMP qword ptr [RBX + 0x218],0x0
JZ 0x001a47d7
MOV RDX,qword ptr [RBX + 0x230]
XOR EDI,EDI
XOR ESI,ESI
CALL RAX
MOV RSI,qword ptr [RBX]
LAB_001a47d7:
MOVSX EDX,R15B
MOV RDI,RBX
CALL 0x001a5402
MOV R15D,EAX
CMP qword ptr [RBX + 0x218],0x0
JZ 0x001a4809
MOV RDX,qword ptr [RBX + 0x230]
XOR EDI,EDI
MOV ESI,0x2
CALL qword ptr [RBX + 0x280]
JMP 0x001a4809
LAB_001a4806:
XOR R15D,R15D
LAB_001a4809:
LEA RDI,[RBX + 0x238]
MOV RSI,R14
CALL 0x0019cd73
LAB_001a4818:
LEA RAX,[0x485bc0]
MOV qword ptr [RBX],RAX
MOV dword ptr [RBX + 0x20c],0x0
MOV qword ptr [RBX + 0x220],0x0
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 free_tree(long *param_1,char param_2,int8 param_3)
{
int4 uVar1;
long lVar2;
lVar2 = *param_1;
if (lVar2 == 0) {
uVar1 = 0;
}
else if ((char)param_1[0x4f] == '\0') {
if ((code *)param_1[0x50] == (code *)0x0) {
uVar1 = 0;
}
else {
if (param_1[0x43] != 0) {
(*(code *)param_1[0x50])(0,0,param_1[0x46]);
lVar2 = *param_1;
}
uVar1 = delete_tree_element(param_1,lVar2,(int)param_2);
if (param_1[0x43] != 0) {
(*(code *)param_1[0x50])(0,2,param_1[0x46]);
}
}
free_root(param_1 + 0x47,param_3);
}
else {
uVar1 = delete_tree_element(param_1,lVar2,(int)param_2);
}
*param_1 = (long)null_element;
*(int4 *)((long)param_1 + 0x20c) = 0;
param_1[0x44] = 0;
return uVar1;
}
| |
42,380 | Ui_MainWindow::retranslateUi(QMainWindow*) | The-SGR[P]silly-clicker/build_O0/SillyClicker_autogen/include/./ui_mainwindow.h | void retranslateUi(QMainWindow *MainWindow)
{
MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "MainWindow", nullptr));
pushButton->setText(QString());
label->setText(QCoreApplication::translate("MainWindow", "Clicks:", nullptr));
label_2->setText(QCoreApplication::translate("MainWindow", "0", nullptr));
pushButton_3->setText(QCoreApplication::translate("MainWindow", "Reset Clicks", nullptr));
gitBtn->setText(QCoreApplication::translate("MainWindow", "GitHub", nullptr));
extBtn->setText(QCoreApplication::translate("MainWindow", "Exit", nullptr));
pushButton_2->setText(QCoreApplication::translate("MainWindow", "Apply silly car :3", nullptr));
uniBtn->setText(QCoreApplication::translate("MainWindow", "Uni", nullptr));
millyBtn->setText(QCoreApplication::translate("MainWindow", "Milly", nullptr));
lunaBtn->setText(QCoreApplication::translate("MainWindow", "Lunaistabby", nullptr));
} | O0 | c | Ui_MainWindow::retranslateUi(QMainWindow*):
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp # imm = 0x1E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq 0x12c5(%rip), %rdx # 0x9315
xorl %eax, %eax
movl %eax, %ecx
leaq -0x28(%rbp), %rdi
movq %rdi, -0x130(%rbp)
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
movq %rdx, %rsi
callq 0x4570
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rsi
callq 0x4420
jmp 0x8082
leaq -0x28(%rbp), %rdi
callq 0x4c90
movq -0x140(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x150(%rbp)
leaq -0x50(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x77d0
movq -0x150(%rbp), %rdi
movq -0x148(%rbp), %rsi
callq 0x41f0
jmp 0x80c2
leaq -0x50(%rbp), %rdi
callq 0x4c90
movq -0x140(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x160(%rbp)
leaq 0x1231(%rip), %rsi # 0x9315
leaq 0x12db(%rip), %rdx # 0x93c6
xorl %eax, %eax
movl %eax, %ecx
leaq -0x68(%rbp), %rdi
movq %rdi, -0x158(%rbp)
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
callq 0x4570
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %rsi
callq 0x4290
jmp 0x811a
leaq -0x68(%rbp), %rdi
callq 0x4c90
movq -0x140(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x170(%rbp)
leaq 0x11d9(%rip), %rsi # 0x9315
leaq 0x11d0(%rip), %rdx # 0x9313
xorl %eax, %eax
movl %eax, %ecx
leaq -0x80(%rbp), %rdi
movq %rdi, -0x168(%rbp)
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
callq 0x4570
movq -0x170(%rbp), %rdi
movq -0x168(%rbp), %rsi
callq 0x4290
jmp 0x8172
leaq -0x80(%rbp), %rdi
callq 0x4c90
movq -0x140(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x180(%rbp)
leaq 0x1181(%rip), %rsi # 0x9315
leaq 0x1233(%rip), %rdx # 0x93ce
xorl %eax, %eax
movl %eax, %ecx
leaq -0x98(%rbp), %rdi
movq %rdi, -0x178(%rbp)
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
callq 0x4570
movq -0x180(%rbp), %rdi
movq -0x178(%rbp), %rsi
callq 0x41f0
jmp 0x81cd
leaq -0x98(%rbp), %rdi
callq 0x4c90
movq -0x140(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x190(%rbp)
leaq 0x1123(%rip), %rsi # 0x9315
leaq 0x11e2(%rip), %rdx # 0x93db
xorl %eax, %eax
movl %eax, %ecx
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x188(%rbp)
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
callq 0x4570
movq -0x190(%rbp), %rdi
movq -0x188(%rbp), %rsi
callq 0x41f0
jmp 0x822b
leaq -0xb0(%rbp), %rdi
callq 0x4c90
movq -0x140(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x1a0(%rbp)
leaq 0x10c5(%rip), %rsi # 0x9315
leaq 0xfa2(%rip), %rdx # 0x91f9
xorl %eax, %eax
movl %eax, %ecx
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x198(%rbp)
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
callq 0x4570
movq -0x1a0(%rbp), %rdi
movq -0x198(%rbp), %rsi
callq 0x41f0
jmp 0x8289
leaq -0xc8(%rbp), %rdi
callq 0x4c90
movq -0x140(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x1b0(%rbp)
leaq 0x1067(%rip), %rsi # 0x9315
leaq 0x112d(%rip), %rdx # 0x93e2
xorl %eax, %eax
movl %eax, %ecx
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
callq 0x4570
movq -0x1b0(%rbp), %rdi
movq -0x1a8(%rbp), %rsi
callq 0x41f0
jmp 0x82e7
leaq -0xe0(%rbp), %rdi
callq 0x4c90
movq -0x140(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x1c0(%rbp)
leaq 0x1009(%rip), %rsi # 0x9315
leaq 0x10e2(%rip), %rdx # 0x93f5
xorl %eax, %eax
movl %eax, %ecx
leaq -0xf8(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
callq 0x4570
movq -0x1c0(%rbp), %rdi
movq -0x1b8(%rbp), %rsi
callq 0x41f0
jmp 0x8345
leaq -0xf8(%rbp), %rdi
callq 0x4c90
movq -0x140(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x1d0(%rbp)
leaq 0xfab(%rip), %rsi # 0x9315
leaq 0x1088(%rip), %rdx # 0x93f9
xorl %eax, %eax
movl %eax, %ecx
leaq -0x110(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
callq 0x4570
movq -0x1d0(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
callq 0x41f0
jmp 0x83a3
leaq -0x110(%rbp), %rdi
callq 0x4c90
movq -0x140(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x1e0(%rbp)
leaq 0xf4d(%rip), %rsi # 0x9315
leaq 0x1030(%rip), %rdx # 0x93ff
xorl %eax, %eax
movl %eax, %ecx
leaq -0x128(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
callq 0x4570
movq -0x1e0(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
callq 0x41f0
jmp 0x8401
leaq -0x128(%rbp), %rdi
callq 0x4c90
addq $0x1e0, %rsp # imm = 0x1E0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4c90
jmp 0x8538
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4c90
jmp 0x8538
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x4c90
jmp 0x8538
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x4c90
jmp 0x8538
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x4c90
jmp 0x8538
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x4c90
jmp 0x8538
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x4c90
jmp 0x8538
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x4c90
jmp 0x8538
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x4c90
jmp 0x8538
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x4c90
jmp 0x8538
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x4c90
movq -0x30(%rbp), %rdi
callq 0x4200
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN13Ui_MainWindow13retranslateUiEP11QMainWindow:
push rbp
mov rbp, rsp
sub rsp, 1E0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_140], rax
mov rax, [rbp+var_10]
mov [rbp+var_138], rax
lea rdx, aMainwindow_0; "MainWindow"
xor eax, eax
mov ecx, eax; char *
lea rdi, [rbp+var_28]; this
mov [rbp+var_130], rdi
mov r8d, 0FFFFFFFFh; int
mov rsi, rdx; char *
call __ZN16QCoreApplication9translateEPKcS1_S1_i; QCoreApplication::translate(char const*,char const*,char const*,int)
mov rdi, [rbp+var_138]; this
mov rsi, [rbp+var_130]; QString *
call __ZN7QWidget14setWindowTitleERK7QString; QWidget::setWindowTitle(QString const&)
jmp short $+2
loc_8082:
lea rdi, [rbp+var_28]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rax, [rbp+var_140]
mov rax, [rax+8]
mov [rbp+var_150], rax
lea rdi, [rbp+var_50]; this
mov [rbp+var_148], rdi
call _ZN7QStringC2Ev; QString::QString(void)
mov rdi, [rbp+var_150]; this
mov rsi, [rbp+var_148]; QString *
call __ZN15QAbstractButton7setTextERK7QString; QAbstractButton::setText(QString const&)
jmp short $+2
loc_80C2:
lea rdi, [rbp+var_50]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rax, [rbp+var_140]
mov rax, [rax+10h]
mov [rbp+var_160], rax
lea rsi, aMainwindow_0; "MainWindow"
lea rdx, aClicks; "Clicks:"
xor eax, eax
mov ecx, eax; char *
lea rdi, [rbp+var_68]; this
mov [rbp+var_158], rdi
mov r8d, 0FFFFFFFFh; int
call __ZN16QCoreApplication9translateEPKcS1_S1_i; QCoreApplication::translate(char const*,char const*,char const*,int)
mov rdi, [rbp+var_160]; this
mov rsi, [rbp+var_158]; QString *
call __ZN6QLabel7setTextERK7QString; QLabel::setText(QString const&)
jmp short $+2
loc_811A:
lea rdi, [rbp+var_68]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rax, [rbp+var_140]
mov rax, [rax+18h]
mov [rbp+var_170], rax
lea rsi, aMainwindow_0; "MainWindow"
lea rdx, a0; "0"
xor eax, eax
mov ecx, eax; char *
lea rdi, [rbp+var_80]; this
mov [rbp+var_168], rdi
mov r8d, 0FFFFFFFFh; int
call __ZN16QCoreApplication9translateEPKcS1_S1_i; QCoreApplication::translate(char const*,char const*,char const*,int)
mov rdi, [rbp+var_170]; this
mov rsi, [rbp+var_168]; QString *
call __ZN6QLabel7setTextERK7QString; QLabel::setText(QString const&)
jmp short $+2
loc_8172:
lea rdi, [rbp+var_80]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rax, [rbp+var_140]
mov rax, [rax+30h]
mov [rbp+var_180], rax
lea rsi, aMainwindow_0; "MainWindow"
lea rdx, aResetClicks; "Reset Clicks"
xor eax, eax
mov ecx, eax; char *
lea rdi, [rbp+var_98]; this
mov [rbp+var_178], rdi
mov r8d, 0FFFFFFFFh; int
call __ZN16QCoreApplication9translateEPKcS1_S1_i; QCoreApplication::translate(char const*,char const*,char const*,int)
mov rdi, [rbp+var_180]; this
mov rsi, [rbp+var_178]; QString *
call __ZN15QAbstractButton7setTextERK7QString; QAbstractButton::setText(QString const&)
jmp short $+2
loc_81CD:
lea rdi, [rbp+var_98]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rax, [rbp+var_140]
mov rax, [rax+38h]
mov [rbp+var_190], rax
lea rsi, aMainwindow_0; "MainWindow"
lea rdx, aGithub; "GitHub"
xor eax, eax
mov ecx, eax; char *
lea rdi, [rbp+var_B0]; this
mov [rbp+var_188], rdi
mov r8d, 0FFFFFFFFh; int
call __ZN16QCoreApplication9translateEPKcS1_S1_i; QCoreApplication::translate(char const*,char const*,char const*,int)
mov rdi, [rbp+var_190]; this
mov rsi, [rbp+var_188]; QString *
call __ZN15QAbstractButton7setTextERK7QString; QAbstractButton::setText(QString const&)
jmp short $+2
loc_822B:
lea rdi, [rbp+var_B0]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rax, [rbp+var_140]
mov rax, [rax+40h]
mov [rbp+var_1A0], rax
lea rsi, aMainwindow_0; "MainWindow"
lea rdx, aExit; "Exit"
xor eax, eax
mov ecx, eax; char *
lea rdi, [rbp+var_C8]; this
mov [rbp+var_198], rdi
mov r8d, 0FFFFFFFFh; int
call __ZN16QCoreApplication9translateEPKcS1_S1_i; QCoreApplication::translate(char const*,char const*,char const*,int)
mov rdi, [rbp+var_1A0]; this
mov rsi, [rbp+var_198]; QString *
call __ZN15QAbstractButton7setTextERK7QString; QAbstractButton::setText(QString const&)
jmp short $+2
loc_8289:
lea rdi, [rbp+var_C8]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rax, [rbp+var_140]
mov rax, [rax+58h]
mov [rbp+var_1B0], rax
lea rsi, aMainwindow_0; "MainWindow"
lea rdx, aApplySillyCar3; "Apply silly car :3"
xor eax, eax
mov ecx, eax; char *
lea rdi, [rbp+var_E0]; this
mov [rbp+var_1A8], rdi
mov r8d, 0FFFFFFFFh; int
call __ZN16QCoreApplication9translateEPKcS1_S1_i; QCoreApplication::translate(char const*,char const*,char const*,int)
mov rdi, [rbp+var_1B0]; this
mov rsi, [rbp+var_1A8]; QString *
call __ZN15QAbstractButton7setTextERK7QString; QAbstractButton::setText(QString const&)
jmp short $+2
loc_82E7:
lea rdi, [rbp+var_E0]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rax, [rbp+var_140]
mov rax, [rax+60h]
mov [rbp+var_1C0], rax
lea rsi, aMainwindow_0; "MainWindow"
lea rdx, aUni; "Uni"
xor eax, eax
mov ecx, eax; char *
lea rdi, [rbp+var_F8]; this
mov [rbp+var_1B8], rdi
mov r8d, 0FFFFFFFFh; int
call __ZN16QCoreApplication9translateEPKcS1_S1_i; QCoreApplication::translate(char const*,char const*,char const*,int)
mov rdi, [rbp+var_1C0]; this
mov rsi, [rbp+var_1B8]; QString *
call __ZN15QAbstractButton7setTextERK7QString; QAbstractButton::setText(QString const&)
jmp short $+2
loc_8345:
lea rdi, [rbp+var_F8]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rax, [rbp+var_140]
mov rax, [rax+68h]
mov [rbp+var_1D0], rax
lea rsi, aMainwindow_0; "MainWindow"
lea rdx, aMilly; "Milly"
xor eax, eax
mov ecx, eax; char *
lea rdi, [rbp+var_110]; this
mov [rbp+var_1C8], rdi
mov r8d, 0FFFFFFFFh; int
call __ZN16QCoreApplication9translateEPKcS1_S1_i; QCoreApplication::translate(char const*,char const*,char const*,int)
mov rdi, [rbp+var_1D0]; this
mov rsi, [rbp+var_1C8]; QString *
call __ZN15QAbstractButton7setTextERK7QString; QAbstractButton::setText(QString const&)
jmp short $+2
loc_83A3:
lea rdi, [rbp+var_110]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rax, [rbp+var_140]
mov rax, [rax+70h]
mov [rbp+var_1E0], rax
lea rsi, aMainwindow_0; "MainWindow"
lea rdx, aLunaistabby; "Lunaistabby"
xor eax, eax
mov ecx, eax; char *
lea rdi, [rbp+var_128]; this
mov [rbp+var_1D8], rdi
mov r8d, 0FFFFFFFFh; int
call __ZN16QCoreApplication9translateEPKcS1_S1_i; QCoreApplication::translate(char const*,char const*,char const*,int)
mov rdi, [rbp+var_1E0]; this
mov rsi, [rbp+var_1D8]; QString *
call __ZN15QAbstractButton7setTextERK7QString; QAbstractButton::setText(QString const&)
jmp short $+2
loc_8401:
lea rdi, [rbp+var_128]; this
call _ZN7QStringD2Ev; QString::~QString()
add rsp, 1E0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_28]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp loc_8538
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_50]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp loc_8538
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_68]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp loc_8538
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_80]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp loc_8538
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_98]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp loc_8538
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_B0]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp loc_8538
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_C8]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_8538
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_E0]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_8538
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_F8]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_8538
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_110]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_8538
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
lea rdi, [rbp+var_128]; this
call _ZN7QStringD2Ev; QString::~QString()
loc_8538:
mov rdi, [rbp+var_30]
call __Unwind_Resume
| void Ui_MainWindow::retranslateUi(QAbstractButton **this, QMainWindow *a2)
{
QAbstractButton *v2; // [rsp+0h] [rbp-1E0h]
QAbstractButton *v3; // [rsp+10h] [rbp-1D0h]
QAbstractButton *v4; // [rsp+20h] [rbp-1C0h]
QAbstractButton *v5; // [rsp+30h] [rbp-1B0h]
QAbstractButton *v6; // [rsp+40h] [rbp-1A0h]
QAbstractButton *v7; // [rsp+50h] [rbp-190h]
QAbstractButton *v8; // [rsp+60h] [rbp-180h]
QLabel *v9; // [rsp+70h] [rbp-170h]
QLabel *v10; // [rsp+80h] [rbp-160h]
QAbstractButton *v11; // [rsp+90h] [rbp-150h]
_BYTE v12[24]; // [rsp+B8h] [rbp-128h] BYREF
_BYTE v13[24]; // [rsp+D0h] [rbp-110h] BYREF
_BYTE v14[24]; // [rsp+E8h] [rbp-F8h] BYREF
_BYTE v15[24]; // [rsp+100h] [rbp-E0h] BYREF
_BYTE v16[24]; // [rsp+118h] [rbp-C8h] BYREF
_BYTE v17[24]; // [rsp+130h] [rbp-B0h] BYREF
_BYTE v18[24]; // [rsp+148h] [rbp-98h] BYREF
_BYTE v19[24]; // [rsp+160h] [rbp-80h] BYREF
_BYTE v20[24]; // [rsp+178h] [rbp-68h] BYREF
_BYTE v21[28]; // [rsp+190h] [rbp-50h] BYREF
_BYTE v22[24]; // [rsp+1B8h] [rbp-28h] BYREF
QMainWindow *v23; // [rsp+1D0h] [rbp-10h]
Ui_MainWindow *v24; // [rsp+1D8h] [rbp-8h]
v24 = (Ui_MainWindow *)this;
v23 = a2;
QCoreApplication::translate((QCoreApplication *)v22, "MainWindow", "MainWindow", 0LL, -1);
QWidget::setWindowTitle(a2, (const QString *)v22);
QString::~QString((QString *)v22);
v11 = this[1];
QString::QString((QString *)v21);
QAbstractButton::setText(v11, (const QString *)v21);
QString::~QString((QString *)v21);
v10 = this[2];
QCoreApplication::translate((QCoreApplication *)v20, "MainWindow", "Clicks:", 0LL, -1);
QLabel::setText(v10, (const QString *)v20);
QString::~QString((QString *)v20);
v9 = this[3];
QCoreApplication::translate((QCoreApplication *)v19, "MainWindow", "0", 0LL, -1);
QLabel::setText(v9, (const QString *)v19);
QString::~QString((QString *)v19);
v8 = this[6];
QCoreApplication::translate((QCoreApplication *)v18, "MainWindow", "Reset Clicks", 0LL, -1);
QAbstractButton::setText(v8, (const QString *)v18);
QString::~QString((QString *)v18);
v7 = this[7];
QCoreApplication::translate((QCoreApplication *)v17, "MainWindow", "GitHub", 0LL, -1);
QAbstractButton::setText(v7, (const QString *)v17);
QString::~QString((QString *)v17);
v6 = this[8];
QCoreApplication::translate((QCoreApplication *)v16, "MainWindow", "Exit", 0LL, -1);
QAbstractButton::setText(v6, (const QString *)v16);
QString::~QString((QString *)v16);
v5 = this[11];
QCoreApplication::translate((QCoreApplication *)v15, "MainWindow", "Apply silly car :3", 0LL, -1);
QAbstractButton::setText(v5, (const QString *)v15);
QString::~QString((QString *)v15);
v4 = this[12];
QCoreApplication::translate((QCoreApplication *)v14, "MainWindow", "Uni", 0LL, -1);
QAbstractButton::setText(v4, (const QString *)v14);
QString::~QString((QString *)v14);
v3 = this[13];
QCoreApplication::translate((QCoreApplication *)v13, "MainWindow", "Milly", 0LL, -1);
QAbstractButton::setText(v3, (const QString *)v13);
QString::~QString((QString *)v13);
v2 = this[14];
QCoreApplication::translate((QCoreApplication *)v12, "MainWindow", "Lunaistabby", 0LL, -1);
QAbstractButton::setText(v2, (const QString *)v12);
QString::~QString((QString *)v12);
}
| retranslateUi:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1e0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x140],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x138],RAX
LEA RDX,[0x109315]
XOR EAX,EAX
MOV ECX,EAX
LEA RDI,[RBP + -0x28]
MOV qword ptr [RBP + -0x130],RDI
MOV R8D,0xffffffff
MOV RSI,RDX
CALL 0x00104570
MOV RDI,qword ptr [RBP + -0x138]
MOV RSI,qword ptr [RBP + -0x130]
LAB_0010807b:
CALL 0x00104420
JMP 0x00108082
LAB_00108082:
LEA RDI,[RBP + -0x28]
CALL 0x00104c90
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x150],RAX
LEA RDI,[RBP + -0x50]
MOV qword ptr [RBP + -0x148],RDI
CALL 0x001077d0
MOV RDI,qword ptr [RBP + -0x150]
MOV RSI,qword ptr [RBP + -0x148]
LAB_001080bb:
CALL 0x001041f0
LAB_001080c0:
JMP 0x001080c2
LAB_001080c2:
LEA RDI,[RBP + -0x50]
CALL 0x00104c90
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x160],RAX
LEA RSI,[0x109315]
LEA RDX,[0x1093c6]
XOR EAX,EAX
MOV ECX,EAX
LEA RDI,[RBP + -0x68]
MOV qword ptr [RBP + -0x158],RDI
MOV R8D,0xffffffff
CALL 0x00104570
MOV RDI,qword ptr [RBP + -0x160]
MOV RSI,qword ptr [RBP + -0x158]
LAB_00108113:
CALL 0x00104290
LAB_00108118:
JMP 0x0010811a
LAB_0010811a:
LEA RDI,[RBP + -0x68]
CALL 0x00104c90
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x170],RAX
LEA RSI,[0x109315]
LEA RDX,[0x109313]
XOR EAX,EAX
MOV ECX,EAX
LEA RDI,[RBP + -0x80]
MOV qword ptr [RBP + -0x168],RDI
MOV R8D,0xffffffff
CALL 0x00104570
MOV RDI,qword ptr [RBP + -0x170]
MOV RSI,qword ptr [RBP + -0x168]
LAB_0010816b:
CALL 0x00104290
LAB_00108170:
JMP 0x00108172
LAB_00108172:
LEA RDI,[RBP + -0x80]
CALL 0x00104c90
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x180],RAX
LEA RSI,[0x109315]
LEA RDX,[0x1093ce]
XOR EAX,EAX
MOV ECX,EAX
LEA RDI,[RBP + -0x98]
MOV qword ptr [RBP + -0x178],RDI
MOV R8D,0xffffffff
CALL 0x00104570
MOV RDI,qword ptr [RBP + -0x180]
MOV RSI,qword ptr [RBP + -0x178]
LAB_001081c6:
CALL 0x001041f0
LAB_001081cb:
JMP 0x001081cd
LAB_001081cd:
LEA RDI,[RBP + -0x98]
CALL 0x00104c90
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x190],RAX
LEA RSI,[0x109315]
LEA RDX,[0x1093db]
XOR EAX,EAX
MOV ECX,EAX
LEA RDI,[RBP + -0xb0]
MOV qword ptr [RBP + -0x188],RDI
MOV R8D,0xffffffff
CALL 0x00104570
MOV RDI,qword ptr [RBP + -0x190]
MOV RSI,qword ptr [RBP + -0x188]
LAB_00108224:
CALL 0x001041f0
LAB_00108229:
JMP 0x0010822b
LAB_0010822b:
LEA RDI,[RBP + -0xb0]
CALL 0x00104c90
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x1a0],RAX
LEA RSI,[0x109315]
LEA RDX,[0x1091f9]
XOR EAX,EAX
MOV ECX,EAX
LEA RDI,[RBP + -0xc8]
MOV qword ptr [RBP + -0x198],RDI
MOV R8D,0xffffffff
CALL 0x00104570
MOV RDI,qword ptr [RBP + -0x1a0]
MOV RSI,qword ptr [RBP + -0x198]
LAB_00108282:
CALL 0x001041f0
LAB_00108287:
JMP 0x00108289
LAB_00108289:
LEA RDI,[RBP + -0xc8]
CALL 0x00104c90
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x1b0],RAX
LEA RSI,[0x109315]
LEA RDX,[0x1093e2]
XOR EAX,EAX
MOV ECX,EAX
LEA RDI,[RBP + -0xe0]
MOV qword ptr [RBP + -0x1a8],RDI
MOV R8D,0xffffffff
CALL 0x00104570
MOV RDI,qword ptr [RBP + -0x1b0]
MOV RSI,qword ptr [RBP + -0x1a8]
LAB_001082e0:
CALL 0x001041f0
LAB_001082e5:
JMP 0x001082e7
LAB_001082e7:
LEA RDI,[RBP + -0xe0]
CALL 0x00104c90
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX + 0x60]
MOV qword ptr [RBP + -0x1c0],RAX
LEA RSI,[0x109315]
LEA RDX,[0x1093f5]
XOR EAX,EAX
MOV ECX,EAX
LEA RDI,[RBP + -0xf8]
MOV qword ptr [RBP + -0x1b8],RDI
MOV R8D,0xffffffff
CALL 0x00104570
MOV RDI,qword ptr [RBP + -0x1c0]
MOV RSI,qword ptr [RBP + -0x1b8]
LAB_0010833e:
CALL 0x001041f0
LAB_00108343:
JMP 0x00108345
LAB_00108345:
LEA RDI,[RBP + -0xf8]
CALL 0x00104c90
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX + 0x68]
MOV qword ptr [RBP + -0x1d0],RAX
LEA RSI,[0x109315]
LEA RDX,[0x1093f9]
XOR EAX,EAX
MOV ECX,EAX
LEA RDI,[RBP + -0x110]
MOV qword ptr [RBP + -0x1c8],RDI
MOV R8D,0xffffffff
CALL 0x00104570
MOV RDI,qword ptr [RBP + -0x1d0]
MOV RSI,qword ptr [RBP + -0x1c8]
LAB_0010839c:
CALL 0x001041f0
LAB_001083a1:
JMP 0x001083a3
LAB_001083a3:
LEA RDI,[RBP + -0x110]
CALL 0x00104c90
MOV RAX,qword ptr [RBP + -0x140]
MOV RAX,qword ptr [RAX + 0x70]
MOV qword ptr [RBP + -0x1e0],RAX
LEA RSI,[0x109315]
LEA RDX,[0x1093ff]
XOR EAX,EAX
MOV ECX,EAX
LEA RDI,[RBP + -0x128]
MOV qword ptr [RBP + -0x1d8],RDI
MOV R8D,0xffffffff
CALL 0x00104570
MOV RDI,qword ptr [RBP + -0x1e0]
MOV RSI,qword ptr [RBP + -0x1d8]
LAB_001083fa:
CALL 0x001041f0
LAB_001083ff:
JMP 0x00108401
LAB_00108401:
LEA RDI,[RBP + -0x128]
CALL 0x00104c90
ADD RSP,0x1e0
POP RBP
RET
|
/* Ui_MainWindow::retranslateUi(QMainWindow*) */
void __thiscall Ui_MainWindow::retranslateUi(Ui_MainWindow *this,QMainWindow *param_1)
{
QString *pQVar1;
QString local_130 [24];
QString local_118 [24];
QString local_100 [24];
QString local_e8 [24];
QString local_d0 [24];
QString local_b8 [24];
QString local_a0 [24];
QString local_88 [24];
QString local_70 [24];
QString local_58 [40];
QString local_30 [24];
QMainWindow *local_18;
Ui_MainWindow *local_10;
local_18 = param_1;
local_10 = this;
QCoreApplication::translate((char *)local_30,"MainWindow","MainWindow",0);
/* try { // try from 0010807b to 0010807f has its CatchHandler @ 00108416 */
QWidget::setWindowTitle((QString *)param_1);
QString::~QString(local_30);
pQVar1 = *(QString **)(this + 8);
QString::QString(local_58);
/* try { // try from 001080bb to 001080bf has its CatchHandler @ 00108430 */
QAbstractButton::setText(pQVar1);
QString::~QString(local_58);
pQVar1 = *(QString **)(this + 0x10);
QCoreApplication::translate((char *)local_70,"MainWindow","Clicks:",0);
/* try { // try from 00108113 to 00108117 has its CatchHandler @ 0010844a */
QLabel::setText(pQVar1);
QString::~QString(local_70);
pQVar1 = *(QString **)(this + 0x18);
QCoreApplication::translate((char *)local_88,"MainWindow","0",0);
/* try { // try from 0010816b to 0010816f has its CatchHandler @ 00108464 */
QLabel::setText(pQVar1);
QString::~QString(local_88);
pQVar1 = *(QString **)(this + 0x30);
QCoreApplication::translate((char *)local_a0,"MainWindow","Reset Clicks",0);
/* try { // try from 001081c6 to 001081ca has its CatchHandler @ 0010847e */
QAbstractButton::setText(pQVar1);
QString::~QString(local_a0);
pQVar1 = *(QString **)(this + 0x38);
QCoreApplication::translate((char *)local_b8,"MainWindow","GitHub",0);
/* try { // try from 00108224 to 00108228 has its CatchHandler @ 0010849b */
QAbstractButton::setText(pQVar1);
QString::~QString(local_b8);
pQVar1 = *(QString **)(this + 0x40);
QCoreApplication::translate((char *)local_d0,"MainWindow","Exit",0);
/* try { // try from 00108282 to 00108286 has its CatchHandler @ 001084b8 */
QAbstractButton::setText(pQVar1);
QString::~QString(local_d0);
pQVar1 = *(QString **)(this + 0x58);
QCoreApplication::translate((char *)local_e8,"MainWindow","Apply silly car :3",0);
/* try { // try from 001082e0 to 001082e4 has its CatchHandler @ 001084d2 */
QAbstractButton::setText(pQVar1);
QString::~QString(local_e8);
pQVar1 = *(QString **)(this + 0x60);
QCoreApplication::translate((char *)local_100,"MainWindow","Uni",0);
/* try { // try from 0010833e to 00108342 has its CatchHandler @ 001084ec */
QAbstractButton::setText(pQVar1);
QString::~QString(local_100);
pQVar1 = *(QString **)(this + 0x68);
QCoreApplication::translate((char *)local_118,"MainWindow","Milly",0);
/* try { // try from 0010839c to 001083a0 has its CatchHandler @ 00108506 */
QAbstractButton::setText(pQVar1);
QString::~QString(local_118);
pQVar1 = *(QString **)(this + 0x70);
QCoreApplication::translate((char *)local_130,"MainWindow","Lunaistabby",0);
/* try { // try from 001083fa to 001083fe has its CatchHandler @ 00108520 */
QAbstractButton::setText(pQVar1);
QString::~QString(local_130);
return;
}
| |
42,381 | match_pins | eloqsql/mysys/lf_alloc-pin.c | static int match_pins(LF_PINS *el, void *addr)
{
int i;
LF_PINS *el_end= el+LF_DYNARRAY_LEVEL_LENGTH;
for (; el < el_end; el++)
for (i= 0; i < LF_PINBOX_PINS; i++)
if (el->pin[i] == addr)
return 1;
return 0;
} | O0 | c | match_pins:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x7800, %rax # imm = 0x7800
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xfe729
movl $0x0, -0x1c(%rbp)
cmpl $0x4, -0x1c(%rbp)
jge 0xfe719
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x18(%rbp), %rax
jne 0xfe70c
movl $0x1, -0x4(%rbp)
jmp 0xfe730
jmp 0xfe70e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xfe6eb
jmp 0xfe71b
movq -0x10(%rbp), %rax
addq $0x78, %rax
movq %rax, -0x10(%rbp)
jmp 0xfe6da
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| match_pins:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
add rax, 7800h
mov [rbp+var_28], rax
loc_FE6DA:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_28]
jnb short loc_FE729
mov [rbp+var_1C], 0
loc_FE6EB:
cmp [rbp+var_1C], 4
jge short loc_FE719
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
mov rax, [rax+rcx*8]
cmp rax, [rbp+var_18]
jnz short loc_FE70C
mov [rbp+var_4], 1
jmp short loc_FE730
loc_FE70C:
jmp short $+2
loc_FE70E:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_FE6EB
loc_FE719:
jmp short $+2
loc_FE71B:
mov rax, [rbp+var_10]
add rax, 78h ; 'x'
mov [rbp+var_10], rax
jmp short loc_FE6DA
loc_FE729:
mov [rbp+var_4], 0
loc_FE730:
mov eax, [rbp+var_4]
pop rbp
retn
| long long match_pins(unsigned long long a1, long long a2)
{
int j; // [rsp+Ch] [rbp-1Ch]
unsigned long long i; // [rsp+18h] [rbp-10h]
for ( i = a1; i < a1 + 30720; i += 120LL )
{
for ( j = 0; j < 4; ++j )
{
if ( *(_QWORD *)(i + 8LL * j) == a2 )
return 1;
}
}
return 0;
}
| match_pins:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x7800
MOV qword ptr [RBP + -0x28],RAX
LAB_001fe6da:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x001fe729
MOV dword ptr [RBP + -0x1c],0x0
LAB_001fe6eb:
CMP dword ptr [RBP + -0x1c],0x4
JGE 0x001fe719
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RAX + RCX*0x8]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x001fe70c
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001fe730
LAB_001fe70c:
JMP 0x001fe70e
LAB_001fe70e:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001fe6eb
LAB_001fe719:
JMP 0x001fe71b
LAB_001fe71b:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x78
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001fe6da
LAB_001fe729:
MOV dword ptr [RBP + -0x4],0x0
LAB_001fe730:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 match_pins(ulong param_1,long param_2)
{
int local_24;
ulong local_18;
local_18 = param_1;
do {
if (param_1 + 0x7800 <= local_18) {
return 0;
}
for (local_24 = 0; local_24 < 4; local_24 = local_24 + 1) {
if (*(long *)(local_18 + (long)local_24 * 8) == param_2) {
return 1;
}
}
local_18 = local_18 + 0x78;
} while( true );
}
| |
42,382 | translog_get_next_chunk | eloqsql/storage/maria/ma_loghandler.c | static my_bool
translog_get_next_chunk(TRANSLOG_SCANNER_DATA *scanner)
{
uint16 len;
DBUG_ENTER("translog_get_next_chunk");
if (translog_scanner_eop(scanner))
len= TRANSLOG_PAGE_SIZE - scanner->page_offset;
else if ((len= translog_get_total_chunk_length(scanner->page,
scanner->page_offset)) == 0)
DBUG_RETURN(1);
scanner->page_offset+= len;
if (translog_scanner_eol(scanner))
{
scanner->page= END_OF_LOG;
scanner->page_offset= 0;
DBUG_RETURN(0);
}
if (translog_scanner_eop(scanner))
{
/* before reading next page we should unpin current one if it was pinned */
translog_free_link(scanner->direct_link);
if (translog_scanner_eof(scanner))
{
DBUG_PRINT("info", ("horizon: " LSN_FMT " pageaddr: " LSN_FMT,
LSN_IN_PARTS(scanner->horizon),
LSN_IN_PARTS(scanner->page_addr)));
/* if it is log end it have to be caught before */
DBUG_ASSERT(LSN_FILE_NO(scanner->horizon) >
LSN_FILE_NO(scanner->page_addr));
scanner->page_addr+= LSN_ONE_FILE;
scanner->page_addr= LSN_REPLACE_OFFSET(scanner->page_addr,
TRANSLOG_PAGE_SIZE);
if (translog_scanner_set_last_page(scanner))
DBUG_RETURN(1);
}
else
{
scanner->page_addr+= TRANSLOG_PAGE_SIZE; /* offset increased */
}
if (translog_scanner_get_page(scanner))
DBUG_RETURN(1);
scanner->page_offset= translog_get_first_chunk_offset(scanner->page);
if (translog_scanner_eol(scanner))
{
scanner->page= END_OF_LOG;
scanner->page_offset= 0;
DBUG_RETURN(0);
}
DBUG_ASSERT(scanner->page[scanner->page_offset] != TRANSLOG_FILLER);
}
DBUG_RETURN(0);
} | O3 | c | translog_get_next_chunk:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x2028(%rdi), %r14d
cmpq $0x1fff, %r14 # imm = 0x1FFF
ja 0x4a8b9
movq 0x2018(%rbx), %rdi
cmpb $-0x1, (%rdi,%r14)
je 0x4a8b9
movzwl %r14w, %esi
callq 0x4a4a4
testw %ax, %ax
jne 0x4a8c1
jmp 0x4a9da
movl $0x2000, %eax # imm = 0x2000
subl %r14d, %eax
movzwl %ax, %eax
addl %r14d, %eax
movl %eax, 0x2028(%rbx)
movq %rbx, %rdi
callq 0x4fc4b
testb %al, %al
je 0x4a8fc
leaq 0xbb4e00(%rip), %rax # 0xbff6e0
movq %rax, 0x2018(%rbx)
movl $0x0, 0x2028(%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl 0x2028(%rbx), %eax
cmpq $0x1fff, %rax # imm = 0x1FFF
ja 0x4a917
movq 0x2018(%rbx), %rcx
cmpb $-0x1, (%rcx,%rax)
jne 0x4a8f1
movq 0x2020(%rbx), %rdi
callq 0x4bb86
leaq 0x2000(%rbx), %r14
movq 0x2000(%rbx), %rax
cmpq 0x2010(%rbx), %rax
jne 0x4a974
movabsq $0x100000000, %rcx # imm = 0x100000000
addq %rcx, %rax
movabsq $0xffffff00000000, %rcx # imm = 0xFFFFFF00000000
andq %rax, %rcx
orq $0x2000, %rcx # imm = 0x2000
movq %rcx, 0x2000(%rbx)
movq %rbx, %rdi
callq 0x4bb28
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x4a8f3
jmp 0x4a97d
addq $0x2000, %rax # imm = 0x2000
movq %rax, (%r14)
leaq 0x2020(%rbx), %rax
leaq -0x20(%rbp), %rdi
movq %r14, (%rdi)
movb $0x0, 0x8(%rdi)
xorl %edx, %edx
cmpb $0x0, 0x202d(%rbx)
cmovneq %rax, %rdx
movq %rbx, %rsi
callq 0x4a0c4
movq %rax, 0x2018(%rbx)
testq %rax, %rax
je 0x4a9da
movzbl 0x6(%rax), %eax
leaq 0xbb4cf5(%rip), %rcx # 0xbff6b0
movsbl (%rcx,%rax,4), %eax
movl %eax, 0x2028(%rbx)
movq %rbx, %rdi
callq 0x4fc4b
testb %al, %al
jne 0x4a8d9
jmp 0x4a8f1
movb $0x1, %al
jmp 0x4a8f3
| translog_get_next_chunk:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov rbx, rdi
mov r14d, [rdi+2028h]
cmp r14, 1FFFh
ja short loc_4A8B9
mov rdi, [rbx+2018h]
cmp byte ptr [rdi+r14], 0FFh
jz short loc_4A8B9
movzx esi, r14w
call translog_get_total_chunk_length
test ax, ax
jnz short loc_4A8C1
jmp loc_4A9DA
loc_4A8B9:
mov eax, 2000h
sub eax, r14d
loc_4A8C1:
movzx eax, ax
add eax, r14d
mov [rbx+2028h], eax
mov rdi, rbx
call translog_scanner_eol
test al, al
jz short loc_4A8FC
loc_4A8D9:
lea rax, end_of_log
mov [rbx+2018h], rax
mov dword ptr [rbx+2028h], 0
loc_4A8F1:
xor eax, eax
loc_4A8F3:
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_4A8FC:
mov eax, [rbx+2028h]
cmp rax, 1FFFh
ja short loc_4A917
mov rcx, [rbx+2018h]
cmp byte ptr [rcx+rax], 0FFh
jnz short loc_4A8F1
loc_4A917:
mov rdi, [rbx+2020h]
call translog_free_link
lea r14, [rbx+2000h]
mov rax, [rbx+2000h]
cmp rax, [rbx+2010h]
jnz short loc_4A974
mov rcx, 100000000h
add rax, rcx
mov rcx, 0FFFFFF00000000h
and rcx, rax
or rcx, 2000h
mov [rbx+2000h], rcx
mov rdi, rbx
call translog_scanner_set_last_page
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_4A8F3
jmp short loc_4A97D
loc_4A974:
add rax, 2000h
mov [r14], rax
loc_4A97D:
lea rax, [rbx+2020h]
lea rdi, [rbp+var_20]
mov [rdi], r14
mov byte ptr [rdi+8], 0
xor edx, edx
cmp byte ptr [rbx+202Dh], 0
cmovnz rdx, rax
mov rsi, rbx
call translog_get_page
mov [rbx+2018h], rax
test rax, rax
jz short loc_4A9DA
movzx eax, byte ptr [rax+6]
lea rcx, page_overhead
movsx eax, byte ptr [rcx+rax*4]
mov [rbx+2028h], eax
mov rdi, rbx
call translog_scanner_eol
test al, al
jnz loc_4A8D9
jmp loc_4A8F1
loc_4A9DA:
mov al, 1
jmp loc_4A8F3
| char translog_get_next_chunk(long long a1)
{
unsigned long long v2; // r14
long long v3; // rdi
unsigned __int16 total_chunk_length; // ax
char result; // al
unsigned long long v6; // rax
long long v7; // rax
char page; // cl
_QWORD *v9; // rdx
long long v10; // rax
long long *v11; // [rsp+0h] [rbp-20h] BYREF
char v12; // [rsp+8h] [rbp-18h]
v2 = *(unsigned int *)(a1 + 8232);
if ( v2 > 0x1FFF || (v3 = *(_QWORD *)(a1 + 8216), *(_BYTE *)(v3 + v2) == 0xFF) )
{
total_chunk_length = 0x2000 - v2;
}
else
{
total_chunk_length = translog_get_total_chunk_length(v3, (unsigned __int16)v2);
if ( !total_chunk_length )
return 1;
}
*(_DWORD *)(a1 + 8232) = v2 + total_chunk_length;
if ( (unsigned __int8)translog_scanner_eol(a1) )
{
LABEL_7:
*(_QWORD *)(a1 + 8216) = &end_of_log;
*(_DWORD *)(a1 + 8232) = 0;
return 0;
}
v6 = *(unsigned int *)(a1 + 8232);
if ( v6 <= 0x1FFF && *(_BYTE *)(*(_QWORD *)(a1 + 8216) + v6) != 0xFF )
return 0;
translog_free_link(*(_QWORD *)(a1 + 8224));
v7 = *(_QWORD *)(a1 + 0x2000);
if ( v7 != *(_QWORD *)(a1 + 8208) )
{
*(_QWORD *)(a1 + 0x2000) = v7 + 0x2000;
goto LABEL_16;
}
*(_QWORD *)(a1 + 0x2000) = (v7 + 0x100000000LL) & 0xFFFFFF00000000LL | 0x2000;
page = translog_scanner_set_last_page(a1);
result = 1;
if ( !page )
{
LABEL_16:
v11 = (long long *)(a1 + 0x2000);
v12 = 0;
v9 = 0LL;
if ( *(_BYTE *)(a1 + 8237) )
v9 = (_QWORD *)(a1 + 8224);
v10 = translog_get_page(&v11, a1, v9);
*(_QWORD *)(a1 + 8216) = v10;
if ( !v10 )
return 1;
*(_DWORD *)(a1 + 8232) = *((char *)&page_overhead + 4 * *(unsigned __int8 *)(v10 + 6));
if ( !(unsigned __int8)translog_scanner_eol(a1) )
return 0;
goto LABEL_7;
}
return result;
}
| translog_get_next_chunk:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV R14D,dword ptr [RDI + 0x2028]
CMP R14,0x1fff
JA 0x0014a8b9
MOV RDI,qword ptr [RBX + 0x2018]
CMP byte ptr [RDI + R14*0x1],0xff
JZ 0x0014a8b9
MOVZX ESI,R14W
CALL 0x0014a4a4
TEST AX,AX
JNZ 0x0014a8c1
JMP 0x0014a9da
LAB_0014a8b9:
MOV EAX,0x2000
SUB EAX,R14D
LAB_0014a8c1:
MOVZX EAX,AX
ADD EAX,R14D
MOV dword ptr [RBX + 0x2028],EAX
MOV RDI,RBX
CALL 0x0014fc4b
TEST AL,AL
JZ 0x0014a8fc
LAB_0014a8d9:
LEA RAX,[0xcff6e0]
MOV qword ptr [RBX + 0x2018],RAX
MOV dword ptr [RBX + 0x2028],0x0
LAB_0014a8f1:
XOR EAX,EAX
LAB_0014a8f3:
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
LAB_0014a8fc:
MOV EAX,dword ptr [RBX + 0x2028]
CMP RAX,0x1fff
JA 0x0014a917
MOV RCX,qword ptr [RBX + 0x2018]
CMP byte ptr [RCX + RAX*0x1],0xff
JNZ 0x0014a8f1
LAB_0014a917:
MOV RDI,qword ptr [RBX + 0x2020]
CALL 0x0014bb86
LEA R14,[RBX + 0x2000]
MOV RAX,qword ptr [RBX + 0x2000]
CMP RAX,qword ptr [RBX + 0x2010]
JNZ 0x0014a974
MOV RCX,0x100000000
ADD RAX,RCX
MOV RCX,0xffffff00000000
AND RCX,RAX
OR RCX,0x2000
MOV qword ptr [RBX + 0x2000],RCX
MOV RDI,RBX
CALL 0x0014bb28
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x0014a8f3
JMP 0x0014a97d
LAB_0014a974:
ADD RAX,0x2000
MOV qword ptr [R14],RAX
LAB_0014a97d:
LEA RAX,[RBX + 0x2020]
LEA RDI,[RBP + -0x20]
MOV qword ptr [RDI],R14
MOV byte ptr [RDI + 0x8],0x0
XOR EDX,EDX
CMP byte ptr [RBX + 0x202d],0x0
CMOVNZ RDX,RAX
MOV RSI,RBX
CALL 0x0014a0c4
MOV qword ptr [RBX + 0x2018],RAX
TEST RAX,RAX
JZ 0x0014a9da
MOVZX EAX,byte ptr [RAX + 0x6]
LEA RCX,[0xcff6b0]
MOVSX EAX,byte ptr [RCX + RAX*0x4]
MOV dword ptr [RBX + 0x2028],EAX
MOV RDI,RBX
CALL 0x0014fc4b
TEST AL,AL
JNZ 0x0014a8d9
JMP 0x0014a8f1
LAB_0014a9da:
MOV AL,0x1
JMP 0x0014a8f3
|
int8 translog_get_next_chunk(long param_1)
{
uint uVar1;
char cVar2;
uint uVar3;
long lVar4;
int8 uVar5;
ulong uVar6;
long *local_28;
int1 local_20;
uVar1 = *(uint *)(param_1 + 0x2028);
uVar6 = (ulong)uVar1;
if ((uVar6 < 0x2000) && (*(char *)(*(long *)(param_1 + 0x2018) + uVar6) != -1)) {
uVar3 = translog_get_total_chunk_length(*(long *)(param_1 + 0x2018),uVar6 & 0xffff);
if ((short)uVar3 != 0) goto LAB_0014a8c1;
LAB_0014a9da:
uVar5 = 1;
}
else {
uVar3 = 0x2000 - uVar1;
LAB_0014a8c1:
*(uint *)(param_1 + 0x2028) = (uVar3 & 0xffff) + uVar1;
cVar2 = translog_scanner_eol(param_1);
if (cVar2 == '\0') {
if ((0x1fff < (ulong)*(uint *)(param_1 + 0x2028)) ||
(*(char *)(*(long *)(param_1 + 0x2018) + (ulong)*(uint *)(param_1 + 0x2028)) == -1)) {
translog_free_link(*(int8 *)(param_1 + 0x2020));
local_28 = (long *)(param_1 + 0x2000);
lVar4 = *(long *)(param_1 + 0x2000);
if (lVar4 == *(long *)(param_1 + 0x2010)) {
*(ulong *)(param_1 + 0x2000) = lVar4 + 0x100000000U & 0xffffff00000000 | 0x2000;
cVar2 = translog_scanner_set_last_page(param_1);
if (cVar2 != '\0') {
return 1;
}
}
else {
*local_28 = lVar4 + 0x2000;
}
local_20 = 0;
lVar4 = 0;
if (*(char *)(param_1 + 0x202d) != '\0') {
lVar4 = param_1 + 0x2020;
}
lVar4 = translog_get_page(&local_28,param_1,lVar4);
*(long *)(param_1 + 0x2018) = lVar4;
if (lVar4 == 0) goto LAB_0014a9da;
*(int *)(param_1 + 0x2028) = (int)(char)page_overhead[(ulong)*(byte *)(lVar4 + 6) * 4];
cVar2 = translog_scanner_eol(param_1);
if (cVar2 != '\0') goto LAB_0014a8d9;
}
}
else {
LAB_0014a8d9:
*(int1 **)(param_1 + 0x2018) = &end_of_log;
*(int4 *)(param_1 + 0x2028) = 0;
}
uVar5 = 0;
}
return uVar5;
}
| |
42,383 | my_suspend_hook | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void
my_suspend_hook(my_bool suspend, void *data)
{
struct my_hook_data *hook_data= (struct my_hook_data *)data;
if (suspend)
{
hook_data->orig_pvio= hook_data->orig_mysql->net.pvio;
hook_data->orig_mysql->net.pvio= hook_data->new_mysql->net.pvio;
}
else
hook_data->orig_mysql->net.pvio= hook_data->orig_pvio;
} | O0 | c | my_suspend_hook:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpb $0x0, -0x1(%rbp)
je 0x41795
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
jmp 0x417a7
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopl (%rax)
| my_suspend_hook:
push rbp
mov rbp, rsp
mov al, dil
mov [rbp+var_1], al
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
cmp [rbp+var_1], 0
jz short loc_41795
mov rax, [rbp+var_18]
mov rax, [rax]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov [rax+10h], rcx
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rax], rcx
jmp short loc_417A7
loc_41795:
mov rax, [rbp+var_18]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rax], rcx
loc_417A7:
pop rbp
retn
| _QWORD * my_suspend_hook(char a1, long long a2)
{
long long v2; // rcx
_QWORD *result; // rax
if ( a1 )
{
*(_QWORD *)(a2 + 16) = **(_QWORD **)a2;
v2 = **(_QWORD **)(a2 + 8);
}
else
{
v2 = *(_QWORD *)(a2 + 16);
}
result = *(_QWORD **)a2;
**(_QWORD **)a2 = v2;
return result;
}
| my_suspend_hook:
PUSH RBP
MOV RBP,RSP
MOV AL,DIL
MOV byte ptr [RBP + -0x1],AL
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
CMP byte ptr [RBP + -0x1],0x0
JZ 0x00141795
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
JMP 0x001417a7
LAB_00141795:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
LAB_001417a7:
POP RBP
RET
|
void my_suspend_hook(char param_1,int8 *param_2)
{
if (param_1 == '\0') {
*(int8 *)*param_2 = param_2[2];
}
else {
param_2[2] = *(int8 *)*param_2;
*(int8 *)*param_2 = *(int8 *)param_2[1];
}
return;
}
| |
42,384 | 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>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/json.hpp | void push_back(const basic_json& val)
{
// push_back only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value = value_t::array;
assert_invariant();
}
// add element to array
const auto old_capacity = m_data.m_value.array->capacity();
m_data.m_value.array->push_back(val);
set_parent(m_data.m_value.array->back(), old_capacity);
} | 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>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
jne 0x7c75d
movb $0x2, (%r14)
callq 0x3f2da
movq %rax, 0x8(%r14)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x3f1a0
jmp 0x7c762
cmpl $0x2, %eax
jne 0x7c776
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x7febe
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
movq %r14, %rdi
callq 0x44c82
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x39dde(%rip), %rsi # 0xb6576
leaq 0x10(%rsp), %rdi
callq 0x649a5
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi # imm = 0x134
movq %r14, %rcx
callq 0x44b36
xorl %ebp, %ebp
leaq 0x80775(%rip), %rsi # 0xfcf38
leaq -0x3afb8(%rip), %rdx # 0x41812
movq %rbx, %rdi
callq 0x23fb0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x242a8
testb %bpl, %bpl
jne 0x7c7e9
jmp 0x7c7f1
movq %rax, %r14
movq %rbx, %rdi
callq 0x23690
movq %r14, %rdi
callq 0x24030
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSD_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jnz short loc_7C75D
mov byte ptr [r14], 2
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; 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>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>()
mov [r14+8], rax
push 1
pop rsi
mov rdi, r14
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)
jmp short loc_7C762
loc_7C75D:
cmp eax, 2
jnz short loc_7C776
loc_7C762:
mov rdi, [r14+8]
mov rsi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE9push_backERKSD_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
loc_7C776:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUsePushB; "cannot use push_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 134h; 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 rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7C7E9
jmp short loc_7C7F1
mov r14, rax
loc_7C7E9:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_7C7F1:
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>::push_back(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v4 = 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(&)[29],char const*>(
(long long)v5,
(long long)"cannot use push_back() with ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
308,
(long long)v5);
__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);
}
}
else
{
*(_BYTE *)a1 = 2;
*(_QWORD *)(a1 + 8) = 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>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>();
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 std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::push_back(
*(_QWORD *)(a1 + 8),
a2);
}
| push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JNZ 0x0017c75d
MOV byte ptr [R14],0x2
CALL 0x0013f2da
MOV qword ptr [R14 + 0x8],RAX
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x0013f1a0
JMP 0x0017c762
LAB_0017c75d:
CMP EAX,0x2
JNZ 0x0017c776
LAB_0017c762:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x0017febe
LAB_0017c776:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
MOV RDI,R14
CALL 0x00144c82
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0017c791:
LEA RSI,[0x1b6576]
LEA RDI,[RSP + 0x10]
CALL 0x001649a5
MOV BPL,0x1
LAB_0017c7a5:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x134
MOV RCX,R14
CALL 0x00144b36
XOR EBP,EBP
LEA RSI,[0x1fcf38]
LEA RDX,[0x141812]
MOV RDI,RBX
CALL 0x00123fb0
|
/* 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_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
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>
::push_back(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 *param_1)
{
vector *pvVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
pvVar1 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
();
*(vector **)(this + 8) = pvVar1;
assert_invariant(SUB81(this,0));
}
else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 0017c791 to 0017c7a1 has its CatchHandler @ 0017c7e6 */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"cannot use push_back() with ",&local_40);
/* try { // try from 0017c7a5 to 0017c7d1 has its CatchHandler @ 0017c7d2 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x134,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::push_back(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8),param_1);
return;
}
| |
42,385 | find_typeset | eloqsql/mysys/typelib.c | my_ulonglong find_typeset(const char *x, TYPELIB *lib, int *err)
{
my_ulonglong result;
int find;
const char *i;
DBUG_ENTER("find_set");
DBUG_PRINT("enter",("x: '%s' lib: %p", x, lib));
if (!lib->count)
{
DBUG_PRINT("exit",("no count"));
DBUG_RETURN(0);
}
result= 0;
*err= 0;
while (*x)
{
(*err)++;
i= x;
while (*x && *x != ',')
x++;
if (x[0] && x[1]) /* skip separator if found */
x++;
if ((find= find_type(i, lib, FIND_TYPE_COMMA_TERM) - 1) < 0)
DBUG_RETURN(0);
result|= (1ULL << find);
}
*err= 0;
DBUG_RETURN(result);
} | O3 | c | find_typeset:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x0, (%rsi)
je 0xaffe3
movq %rdi, %r13
movl $0x0, (%rdx)
cmpb $0x0, (%rdi)
je 0xaffe8
movq %rsi, %r14
xorl %r12d, %r12d
xorl %r15d, %r15d
movq %rdx, -0x30(%rbp)
incl %r12d
movl %r12d, (%rdx)
leaq 0x1(%r13), %rax
movzbl -0x1(%rax), %ecx
testl %ecx, %ecx
je 0xaffa2
cmpl $0x2c, %ecx
je 0xaff95
incq %rax
jmp 0xaff83
leaq -0x1(%rax), %rbx
cmpb $0x0, (%rax)
cmovneq %rax, %rbx
jmp 0xaffa8
decq %rax
movq %rax, %rbx
movq %r13, -0x38(%rbp)
movq %r13, %rdi
callq 0x2a330
addq %rax, %r13
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
movl $0x8, %edx
movq %r13, %rcx
callq 0xafda1
testl %eax, %eax
jle 0xaffe3
decb %al
btsq %rax, %r15
cmpb $0x0, (%rbx)
movq %rbx, %r13
movq -0x30(%rbp), %rdx
jne 0xaff79
jmp 0xaffeb
xorl %r15d, %r15d
jmp 0xafff1
xorl %r15d, %r15d
movl $0x0, (%rdx)
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| find_typeset:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
cmp dword ptr [rsi], 0
jz loc_AFFE3
mov r13, rdi
mov dword ptr [rdx], 0
cmp byte ptr [rdi], 0
jz short loc_AFFE8
mov r14, rsi
xor r12d, r12d
xor r15d, r15d
mov [rbp+var_30], rdx
loc_AFF79:
inc r12d
mov [rdx], r12d
lea rax, [r13+1]
loc_AFF83:
movzx ecx, byte ptr [rax-1]
test ecx, ecx
jz short loc_AFFA2
cmp ecx, 2Ch ; ','
jz short loc_AFF95
inc rax
jmp short loc_AFF83
loc_AFF95:
lea rbx, [rax-1]
cmp byte ptr [rax], 0
cmovnz rbx, rax
jmp short loc_AFFA8
loc_AFFA2:
dec rax
mov rbx, rax
loc_AFFA8:
mov [rbp+var_38], r13
mov rdi, r13
call _strlen
add r13, rax
lea rdi, [rbp+var_38]
mov rsi, r14
mov edx, 8
mov rcx, r13
call find_type_eol
test eax, eax
jle short loc_AFFE3
dec al
bts r15, rax
cmp byte ptr [rbx], 0
mov r13, rbx
mov rdx, [rbp+var_30]
jnz short loc_AFF79
jmp short loc_AFFEB
loc_AFFE3:
xor r15d, r15d
jmp short loc_AFFF1
loc_AFFE8:
xor r15d, r15d
loc_AFFEB:
mov dword ptr [rdx], 0
loc_AFFF1:
mov rax, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long find_typeset(_BYTE *a1, _DWORD *a2, _DWORD *a3)
{
_BYTE *v3; // r13
int v4; // r12d
long long v5; // r15
_BYTE *i; // rax
_BYTE *v7; // rbx
long long v8; // rax
int type_eol; // eax
_BYTE *v11; // [rsp+8h] [rbp-38h] BYREF
_DWORD *v12; // [rsp+10h] [rbp-30h]
if ( !*a2 )
return 0LL;
v3 = a1;
*a3 = 0;
if ( *a1 )
{
v4 = 0;
v5 = 0LL;
v12 = a3;
while ( 1 )
{
*a3 = ++v4;
for ( i = v3 + 1; ; ++i )
{
if ( !*(i - 1) )
{
v7 = i - 1;
goto LABEL_12;
}
if ( *(i - 1) == 44 )
break;
}
v7 = i - 1;
if ( *i )
v7 = i;
LABEL_12:
v11 = v3;
v8 = strlen(v3);
type_eol = find_type_eol(&v11, (long long)a2, 8, &v3[v8]);
if ( type_eol <= 0 )
return 0LL;
v5 |= 1LL << ((unsigned __int8)type_eol - 1);
v3 = v7;
a3 = v12;
if ( !*v7 )
goto LABEL_17;
}
}
v5 = 0LL;
LABEL_17:
*a3 = 0;
return v5;
}
| find_typeset:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CMP dword ptr [RSI],0x0
JZ 0x001affe3
MOV R13,RDI
MOV dword ptr [RDX],0x0
CMP byte ptr [RDI],0x0
JZ 0x001affe8
MOV R14,RSI
XOR R12D,R12D
XOR R15D,R15D
MOV qword ptr [RBP + -0x30],RDX
LAB_001aff79:
INC R12D
MOV dword ptr [RDX],R12D
LEA RAX,[R13 + 0x1]
LAB_001aff83:
MOVZX ECX,byte ptr [RAX + -0x1]
TEST ECX,ECX
JZ 0x001affa2
CMP ECX,0x2c
JZ 0x001aff95
INC RAX
JMP 0x001aff83
LAB_001aff95:
LEA RBX,[RAX + -0x1]
CMP byte ptr [RAX],0x0
CMOVNZ RBX,RAX
JMP 0x001affa8
LAB_001affa2:
DEC RAX
MOV RBX,RAX
LAB_001affa8:
MOV qword ptr [RBP + -0x38],R13
MOV RDI,R13
CALL 0x0012a330
ADD R13,RAX
LEA RDI,[RBP + -0x38]
MOV RSI,R14
MOV EDX,0x8
MOV RCX,R13
CALL 0x001afda1
TEST EAX,EAX
JLE 0x001affe3
DEC AL
BTS R15,RAX
CMP byte ptr [RBX],0x0
MOV R13,RBX
MOV RDX,qword ptr [RBP + -0x30]
JNZ 0x001aff79
JMP 0x001affeb
LAB_001affe3:
XOR R15D,R15D
JMP 0x001afff1
LAB_001affe8:
XOR R15D,R15D
LAB_001affeb:
MOV dword ptr [RDX],0x0
LAB_001afff1:
MOV RAX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong find_typeset(char *param_1,int *param_2,int *param_3)
{
int iVar1;
char *pcVar2;
size_t sVar3;
char *pcVar4;
int iVar5;
ulong uVar6;
char *local_40;
int *local_38;
if (*param_2 == 0) {
LAB_001affe3:
uVar6 = 0;
}
else {
*param_3 = 0;
if (*param_1 == '\0') {
uVar6 = 0;
}
else {
iVar5 = 0;
uVar6 = 0;
local_38 = param_3;
do {
iVar5 = iVar5 + 1;
*local_38 = iVar5;
pcVar2 = param_1;
do {
pcVar4 = pcVar2;
pcVar2 = pcVar4 + 1;
if (*pcVar4 == '\0') goto LAB_001affa8;
} while (*pcVar4 != ',');
if (*pcVar2 != '\0') {
pcVar4 = pcVar2;
}
LAB_001affa8:
local_40 = param_1;
sVar3 = strlen(param_1);
iVar1 = find_type_eol(&local_40,param_2,8,param_1 + sVar3);
if (iVar1 < 1) goto LAB_001affe3;
uVar6 = uVar6 | 1L << ((ulong)(byte)((char)iVar1 - 1) & 0x3f);
param_3 = local_38;
param_1 = pcVar4;
} while (*pcVar4 != '\0');
}
*param_3 = 0;
}
return uVar6;
}
| |
42,386 | ggml_vec_dot_q5_1_q8_1 | monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-quants.c | void ggml_vec_dot_q5_1_q8_1(int n, float * restrict s, size_t bs, const void * restrict vx, size_t bx, const void * restrict vy, size_t by, int nrc) {
const int qk = QK8_1;
const int nb = n / qk;
int ib = 0;
float sumf = 0;
assert(n % qk == 0);
assert(qk == QK5_1);
assert(nrc == 1);
UNUSED(nrc);
UNUSED(bx);
UNUSED(by);
UNUSED(bs);
const block_q5_1 * restrict x = vx;
const block_q8_1 * restrict y = vy;
#if defined(__ARM_NEON)
float32x4_t sumv0 = vdupq_n_f32(0.0f);
float32x4_t sumv1 = vdupq_n_f32(0.0f);
float summs0 = 0.0f;
float summs1 = 0.0f;
uint32_t qh0;
uint32_t qh1;
uint64_t tmp0[4];
uint64_t tmp1[4];
for (; ib + 1 < nb; ib += 2) {
const block_q5_1 * restrict x0 = &x[ib];
const block_q5_1 * restrict x1 = &x[ib + 1];
const block_q8_1 * restrict y0 = &y[ib];
const block_q8_1 * restrict y1 = &y[ib + 1];
const uint8x16_t m4b = vdupq_n_u8(0x0F);
summs0 += GGML_FP16_TO_FP32(x0->m) * GGML_FP16_TO_FP32(y0->s);
summs1 += GGML_FP16_TO_FP32(x1->m) * GGML_FP16_TO_FP32(y1->s);
// extract the 5th bit via lookup table ((b) << 4)
memcpy(&qh0, x0->qh, sizeof(qh0));
memcpy(&qh1, x1->qh, sizeof(qh1));
tmp0[0] = table_b2b_0[(qh0 >> 0) & 0xFF];
tmp0[1] = table_b2b_0[(qh0 >> 8) & 0xFF];
tmp0[2] = table_b2b_0[(qh0 >> 16) & 0xFF];
tmp0[3] = table_b2b_0[(qh0 >> 24) ];
tmp1[0] = table_b2b_0[(qh1 >> 0) & 0xFF];
tmp1[1] = table_b2b_0[(qh1 >> 8) & 0xFF];
tmp1[2] = table_b2b_0[(qh1 >> 16) & 0xFF];
tmp1[3] = table_b2b_0[(qh1 >> 24) ];
const int8x16_t qhl0 = vld1q_s8((const int8_t *)(tmp0 + 0));
const int8x16_t qhh0 = vld1q_s8((const int8_t *)(tmp0 + 2));
const int8x16_t qhl1 = vld1q_s8((const int8_t *)(tmp1 + 0));
const int8x16_t qhh1 = vld1q_s8((const int8_t *)(tmp1 + 2));
const uint8x16_t v0_0 = vld1q_u8(x0->qs);
const uint8x16_t v0_1 = vld1q_u8(x1->qs);
// 4-bit -> 8-bit
const int8x16_t v0_0l = vreinterpretq_s8_u8(vandq_u8 (v0_0, m4b));
const int8x16_t v0_0h = vreinterpretq_s8_u8(vshrq_n_u8(v0_0, 4));
const int8x16_t v0_1l = vreinterpretq_s8_u8(vandq_u8 (v0_1, m4b));
const int8x16_t v0_1h = vreinterpretq_s8_u8(vshrq_n_u8(v0_1, 4));
// add high bit
const int8x16_t v0_0lf = vorrq_s8(v0_0l, qhl0);
const int8x16_t v0_0hf = vorrq_s8(v0_0h, qhh0);
const int8x16_t v0_1lf = vorrq_s8(v0_1l, qhl1);
const int8x16_t v0_1hf = vorrq_s8(v0_1h, qhh1);
// load y
const int8x16_t v1_0l = vld1q_s8(y0->qs);
const int8x16_t v1_0h = vld1q_s8(y0->qs + 16);
const int8x16_t v1_1l = vld1q_s8(y1->qs);
const int8x16_t v1_1h = vld1q_s8(y1->qs + 16);
sumv0 = vmlaq_n_f32(sumv0, vcvtq_f32_s32(vaddq_s32(
ggml_vdotq_s32(vdupq_n_s32(0), v0_0lf, v1_0l),
ggml_vdotq_s32(vdupq_n_s32(0), v0_0hf, v1_0h))), GGML_FP16_TO_FP32(x0->d)*GGML_FP16_TO_FP32(y0->d));
sumv1 = vmlaq_n_f32(sumv1, vcvtq_f32_s32(vaddq_s32(
ggml_vdotq_s32(vdupq_n_s32(0), v0_1lf, v1_1l),
ggml_vdotq_s32(vdupq_n_s32(0), v0_1hf, v1_1h))), GGML_FP16_TO_FP32(x1->d)*GGML_FP16_TO_FP32(y1->d));
}
sumf = vaddvq_f32(sumv0) + vaddvq_f32(sumv1) + summs0 + summs1;
#elif defined(__wasm_simd128__)
v128_t sumv = wasm_f32x4_splat(0.0f);
float summs = 0.0f;
uint32_t qh;
uint64_t tmp[4];
// TODO: check if unrolling this is better
for (; ib < nb; ++ib) {
const block_q5_1 * restrict x0 = &x[ib];
const block_q8_1 * restrict y0 = &y[ib];
summs += GGML_FP16_TO_FP32(x0->m) * GGML_FP16_TO_FP32(y0->s);
const v128_t m4b = wasm_i8x16_splat(0x0F);
// extract the 5th bit
memcpy(&qh, x0->qh, sizeof(qh));
tmp[0] = table_b2b_0[(qh >> 0) & 0xFF];
tmp[1] = table_b2b_0[(qh >> 8) & 0xFF];
tmp[2] = table_b2b_0[(qh >> 16) & 0xFF];
tmp[3] = table_b2b_0[(qh >> 24) ];
const v128_t qhl = wasm_v128_load(tmp + 0);
const v128_t qhh = wasm_v128_load(tmp + 2);
const v128_t v0 = wasm_v128_load(x0->qs);
// 4-bit -> 8-bit
const v128_t v0l = wasm_v128_and (v0, m4b);
const v128_t v0h = wasm_u8x16_shr(v0, 4);
// add high bit
const v128_t v0lf = wasm_v128_or(v0l, qhl);
const v128_t v0hf = wasm_v128_or(v0h, qhh);
// load y
const v128_t v1l = wasm_v128_load(y0->qs);
const v128_t v1h = wasm_v128_load(y0->qs + 16);
// int8x16 -> int16x8
const v128_t v0lfl = wasm_i16x8_extend_low_i8x16 (v0lf);
const v128_t v0lfh = wasm_i16x8_extend_high_i8x16(v0lf);
const v128_t v0hfl = wasm_i16x8_extend_low_i8x16 (v0hf);
const v128_t v0hfh = wasm_i16x8_extend_high_i8x16(v0hf);
const v128_t v1ll = wasm_i16x8_extend_low_i8x16 (v1l);
const v128_t v1lh = wasm_i16x8_extend_high_i8x16(v1l);
const v128_t v1hl = wasm_i16x8_extend_low_i8x16 (v1h);
const v128_t v1hh = wasm_i16x8_extend_high_i8x16(v1h);
// dot product
sumv = wasm_f32x4_add(sumv,
wasm_f32x4_mul(wasm_f32x4_convert_i32x4(wasm_i32x4_add(
wasm_i32x4_add(wasm_i32x4_dot_i16x8(v0lfl, v1ll),
wasm_i32x4_dot_i16x8(v0lfh, v1lh)),
wasm_i32x4_add(wasm_i32x4_dot_i16x8(v0hfl, v1hl),
wasm_i32x4_dot_i16x8(v0hfh, v1hh)))),
wasm_f32x4_splat(GGML_FP16_TO_FP32(x0->d) * GGML_FP16_TO_FP32(y0->d))));
}
sumf = wasm_f32x4_extract_lane(sumv, 0) + wasm_f32x4_extract_lane(sumv, 1) +
wasm_f32x4_extract_lane(sumv, 2) + wasm_f32x4_extract_lane(sumv, 3) + summs;
#elif defined(__AVX2__)
// Initialize accumulator with zeros
__m256 acc = _mm256_setzero_ps();
float summs = 0.0f;
// Main loop
for (; ib < nb; ++ib) {
const __m256 dx = _mm256_set1_ps(GGML_FP16_TO_FP32(x[ib].d));
summs += GGML_FP16_TO_FP32(x[ib].m) * GGML_FP16_TO_FP32(y[ib].s);
__m256i qx = bytes_from_nibbles_32(x[ib].qs);
__m256i bxhi = bytes_from_bits_32(x[ib].qh);
bxhi = _mm256_and_si256(bxhi, _mm256_set1_epi8(0x10));
qx = _mm256_or_si256(qx, bxhi);
const __m256 dy = _mm256_set1_ps(GGML_FP16_TO_FP32(y[ib].d));
const __m256i qy = _mm256_loadu_si256((const __m256i *)y[ib].qs);
const __m256 q = mul_sum_us8_pairs_float(qx, qy);
acc = _mm256_fmadd_ps(q, _mm256_mul_ps(dx, dy), acc);
}
sumf = hsum_float_8(acc) + summs;
#elif defined(__AVX__)
// Initialize accumulator with zeros
__m256 acc = _mm256_setzero_ps();
__m128i mask = _mm_set1_epi8(0x10);
float summs = 0.0f;
// Main loop
for (; ib < nb; ++ib) {
const __m256 dx = _mm256_set1_ps(GGML_FP16_TO_FP32(x[ib].d));
summs += GGML_FP16_TO_FP32(x[ib].m) * GGML_FP16_TO_FP32(y[ib].s);
__m256i bx_0 = bytes_from_nibbles_32(x[ib].qs);
const __m256i bxhi = bytes_from_bits_32(x[ib].qh);
__m128i bxhil = _mm256_castsi256_si128(bxhi);
__m128i bxhih = _mm256_extractf128_si256(bxhi, 1);
bxhil = _mm_and_si128(bxhil, mask);
bxhih = _mm_and_si128(bxhih, mask);
__m128i bxl = _mm256_castsi256_si128(bx_0);
__m128i bxh = _mm256_extractf128_si256(bx_0, 1);
bxl = _mm_or_si128(bxl, bxhil);
bxh = _mm_or_si128(bxh, bxhih);
bx_0 = MM256_SET_M128I(bxh, bxl);
const __m256 dy = _mm256_set1_ps(GGML_FP16_TO_FP32(y[ib].d));
const __m256i by_0 = _mm256_loadu_si256((const __m256i *)y[ib].qs);
const __m256 q = mul_sum_us8_pairs_float(bx_0, by_0);
acc = _mm256_add_ps(_mm256_mul_ps(q, _mm256_mul_ps(dx, dy)), acc);
}
sumf = hsum_float_8(acc) + summs;
#elif defined(__riscv_v_intrinsic)
uint32_t qh;
size_t vl = __riscv_vsetvl_e8m1(qk/2);
// temporary registers for shift operations
vuint32m2_t vt_1 = __riscv_vid_v_u32m2(vl);
vuint32m2_t vt_2 = __riscv_vadd_vx_u32m2(vt_1, 12, vl);
for (; ib < nb; ++ib) {
memcpy(&qh, x[ib].qh, sizeof(uint32_t));
// load qh
vuint32m2_t vqh = __riscv_vmv_v_x_u32m2(qh, vl);
// ((qh >> (j + 0)) << 4) & 0x10;
vuint32m2_t xhr_0 = __riscv_vsrl_vv_u32m2(vqh, vt_1, vl);
vuint32m2_t xhl_0 = __riscv_vsll_vx_u32m2(xhr_0, 4, vl);
vuint32m2_t xha_0 = __riscv_vand_vx_u32m2(xhl_0, 0x10, vl);
// ((qh >> (j + 12)) ) & 0x10;
vuint32m2_t xhr_1 = __riscv_vsrl_vv_u32m2(vqh, vt_2, vl);
vuint32m2_t xha_1 = __riscv_vand_vx_u32m2(xhr_1, 0x10, vl);
// narrowing
vuint16m1_t xhc_0 = __riscv_vncvt_x_x_w_u16m1(xha_0, vl);
vuint8mf2_t xh_0 = __riscv_vncvt_x_x_w_u8mf2(xhc_0, vl);
vuint16m1_t xhc_1 = __riscv_vncvt_x_x_w_u16m1(xha_1, vl);
vuint8mf2_t xh_1 = __riscv_vncvt_x_x_w_u8mf2(xhc_1, vl);
// load
vuint8mf2_t tx = __riscv_vle8_v_u8mf2(x[ib].qs, vl);
vint8mf2_t y0 = __riscv_vle8_v_i8mf2(y[ib].qs, vl);
vint8mf2_t y1 = __riscv_vle8_v_i8mf2(y[ib].qs+16, vl);
vuint8mf2_t x_at = __riscv_vand_vx_u8mf2(tx, 0x0F, vl);
vuint8mf2_t x_lt = __riscv_vsrl_vx_u8mf2(tx, 0x04, vl);
vuint8mf2_t x_a = __riscv_vor_vv_u8mf2(x_at, xh_0, vl);
vuint8mf2_t x_l = __riscv_vor_vv_u8mf2(x_lt, xh_1, vl);
vint8mf2_t v0 = __riscv_vreinterpret_v_u8mf2_i8mf2(x_a);
vint8mf2_t v1 = __riscv_vreinterpret_v_u8mf2_i8mf2(x_l);
vint16m1_t vec_mul1 = __riscv_vwmul_vv_i16m1(v0, y0, vl);
vint16m1_t vec_mul2 = __riscv_vwmul_vv_i16m1(v1, y1, vl);
vint32m1_t vec_zero = __riscv_vmv_v_x_i32m1(0, vl);
vint32m1_t vs1 = __riscv_vwredsum_vs_i16m1_i32m1(vec_mul1, vec_zero, vl);
vint32m1_t vs2 = __riscv_vwredsum_vs_i16m1_i32m1(vec_mul2, vs1, vl);
int sumi = __riscv_vmv_x_s_i32m1_i32(vs2);
sumf += (GGML_FP16_TO_FP32(x[ib].d)*GGML_FP16_TO_FP32(y[ib].d))*sumi + GGML_FP16_TO_FP32(x[ib].m)*GGML_FP16_TO_FP32(y[ib].s);
}
#elif defined(__POWER9_VECTOR__)
const vector signed char lowMask = vec_splats((signed char)0xF);
const vector signed int v0 = vec_splats((int32_t)0);
const vector unsigned char v4 = vec_splats((unsigned char)0x4);
vector float vsumf0 = vec_splats(0.0f);
#pragma GCC unroll 4
for (; ib < nb; ++ib) {
__builtin_prefetch(x[ib].qs, 0, 1);
__builtin_prefetch(y[ib].qs, 0, 1);
vector float vxd = vec_splats(GGML_FP16_TO_FP32(x[ib].d));
vector float vyd = vec_splats(GGML_FP16_TO_FP32(y[ib].d));
vector float vd = vec_mul(vxd, vyd);
vector float vxmin = vec_splats(GGML_FP16_TO_FP32(x[ib].m));
vector float vys = {GGML_FP16_TO_FP32(y[ib].s), 0.f, 0.f, 0.f};
vsumf0 = vec_madd(vxmin, vys, vsumf0);
vector unsigned long long aux64x2_0 = {(uint64_t)(table_b2b_0[x[ib].qh[0]]), (uint64_t)(table_b2b_0[x[ib].qh[1]])};
vector unsigned long long aux64x2_1 = {(uint64_t)(table_b2b_0[x[ib].qh[2]]), (uint64_t)(table_b2b_0[x[ib].qh[3]])};
vector signed char qh0 = (vector signed char)aux64x2_0;
vector signed char qh1 = (vector signed char)aux64x2_1;
vector signed char qxs = (vector signed char)vec_xl( 0, x[ib].qs);
vector unsigned char q5x0 = (vector unsigned char)vec_or(vec_and(qxs, lowMask), qh0);
vector unsigned char q5x1 = (vector unsigned char)vec_or(vec_sr(qxs, v4), qh1);
vector signed char q8y0 = vec_xl( 0, y[ib].qs);
vector signed char q8y1 = vec_xl( 16, y[ib].qs);
vector signed int vsumi0 = v0;
vsumi0 = vec_msum(q8y0, q5x0, vsumi0);
vsumi0 = vec_msum(q8y1, q5x1, vsumi0);
vsumf0 = vec_madd(vec_ctf(vsumi0, 0), vd, vsumf0);
}
vsumf0 = vec_add(vsumf0, vec_sld(vsumf0, vsumf0, 4));
vsumf0 = vec_add(vsumf0, vec_sld(vsumf0, vsumf0, 8));
sumf = vec_extract(vsumf0, 0);
#elif defined(__loongarch_asx)
// Initialize accumulator with zeros
__m256 acc = (__m256)__lasx_xvldi(0);
float summs = 0.0f;
// Main loop
for (; ib < nb; ++ib) {
const __m256 dx = __lasx_xvreplfr2vr_s(GGML_FP16_TO_FP32(x[ib].d));
summs += GGML_FP16_TO_FP32(x[ib].m) * GGML_FP16_TO_FP32(y[ib].s);
__m256i qx = bytes_from_nibbles_32(x[ib].qs);
__m256i bxhi = bytes_from_bits_32(x[ib].qh);
bxhi = __lasx_xvand_v(bxhi, __lasx_xvreplgr2vr_b(0x10));
qx = __lasx_xvor_v(qx, bxhi);
const __m256 dy = __lasx_xvreplfr2vr_s(GGML_FP16_TO_FP32(y[ib].d));
const __m256i qy = __lasx_xvld((const __m256i *)y[ib].qs, 0);
const __m256 q = mul_sum_us8_pairs_float(qx, qy);
acc = __lasx_xvfmadd_s(q, __lasx_xvfmul_s(dx, dy), acc);
}
sumf = hsum_float_8(acc) + summs;
#endif
for (; ib < nb; ++ib) {
uint32_t qh;
memcpy(&qh, x[ib].qh, sizeof(qh));
int sumi0 = 0;
int sumi1 = 0;
for (int j = 0; j < qk/2; ++j) {
const uint8_t xh_0 = ((qh >> (j + 0)) << 4) & 0x10;
const uint8_t xh_1 = ((qh >> (j + 12)) ) & 0x10;
const int32_t x0 = (x[ib].qs[j] & 0xF) | xh_0;
const int32_t x1 = (x[ib].qs[j] >> 4) | xh_1;
sumi0 += (x0 * y[ib].qs[j]);
sumi1 += (x1 * y[ib].qs[j + qk/2]);
}
int sumi = sumi0 + sumi1;
sumf += (GGML_FP16_TO_FP32(x[ib].d)*GGML_FP16_TO_FP32(y[ib].d))*sumi + GGML_FP16_TO_FP32(x[ib].m)*GGML_FP16_TO_FP32(y[ib].s);
}
*s = sumf;
} | O3 | c | ggml_vec_dot_q5_1_q8_1:
pushq %rbp
pushq %r14
pushq %rbx
leal 0x1f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
sarl $0x5, %eax
cmpl $0x20, %edi
jl 0x30b15
movl %eax, %edi
leaq 0x4(%r9), %rdx
shlq $0x3, %rdi
leaq (%rdi,%rdi,2), %rdi
vxorps %xmm0, %xmm0, %xmm0
vxorps %xmm1, %xmm1, %xmm1
xorl %r8d, %r8d
movq 0x3451d(%rip), %r10 # 0x64f70
vmovdqa 0x24925(%rip), %ymm2 # 0x55380
vpbroadcastq 0x24b24(%rip), %ymm3 # 0x55588
vpcmpeqd %ymm4, %ymm4, %ymm4
vpbroadcastq 0x24b1f(%rip), %ymm5 # 0x55590
vpbroadcastq 0x24b1e(%rip), %ymm6 # 0x55598
vpbroadcastw 0x24b6f(%rip), %ymm7 # 0x555f2
movzwl (%rcx,%r8), %r11d
vmovss (%r10,%r11,4), %xmm8
movzwl 0x2(%rcx,%r8), %r11d
vmovss (%r10,%r11,4), %xmm9
movzwl -0x2(%rdx), %r11d
vfmadd231ss (%r10,%r11,4), %xmm9, %xmm0 # xmm0 = (xmm9 * mem) + xmm0
vmovdqu 0x8(%rcx,%r8), %xmm9
vpsrlw $0x4, %xmm9, %xmm10
vinserti128 $0x1, %xmm10, %ymm9, %ymm9
vmovd 0x4(%rcx,%r8), %xmm10
vpermq $0x44, %ymm10, %ymm10 # ymm10 = ymm10[0,1,0,1]
vpshufb %ymm2, %ymm10, %ymm10
vpor %ymm3, %ymm10, %ymm10
vpcmpeqb %ymm4, %ymm10, %ymm10
vpand %ymm5, %ymm10, %ymm10
vpternlogq $0xf8, %ymm6, %ymm9, %ymm10
movzwl -0x4(%rdx), %r11d
vpmaddubsw (%rdx), %ymm10, %ymm9
vpmaddwd %ymm7, %ymm9, %ymm9
vmulss (%r10,%r11,4), %xmm8, %xmm8
vcvtdq2ps %ymm9, %ymm9
vbroadcastss %xmm8, %ymm8
vfmadd231ps %ymm8, %ymm9, %ymm1 # ymm1 = (ymm9 * ymm8) + ymm1
addq $0x24, %rdx
addq $0x18, %r8
cmpq %r8, %rdi
jne 0x30a83
movl %eax, %edx
jmp 0x30b1f
xorl %edx, %edx
vxorps %xmm1, %xmm1, %xmm1
vxorps %xmm0, %xmm0, %xmm0
vextractf128 $0x1, %ymm1, %xmm2
vaddps %xmm1, %xmm2, %xmm1
vshufpd $0x1, %xmm1, %xmm1, %xmm2 # xmm2 = xmm1[1,0]
vaddps %xmm2, %xmm1, %xmm1
vhaddps %xmm1, %xmm1, %xmm1
vaddss %xmm1, %xmm0, %xmm0
cmpl %eax, %edx
jge 0x30ca3
movl %edx, %edx
leaq (%rdx,%rdx,2), %rdi
leaq (%rcx,%rdi,8), %rdi
addq $0x8, %rdi
leaq (%rdx,%rdx,8), %r8
vpmovsxbd 0x22cbb(%rip), %ymm1 # 0x53818
vpbroadcastd 0x247ea(%rip), %ymm2 # 0x55350
vpbroadcastd 0x247e9(%rip), %ymm3 # 0x55358
leaq (%r9,%r8,4), %r8
addq $0x14, %r8
vpbroadcastd 0x24330(%rip), %ymm4 # 0x54eb0
vpbroadcastd 0x225b3(%rip), %ymm5 # 0x5313c
movq 0x343e0(%rip), %r10 # 0x64f70
leaq (%rdx,%rdx,2), %r11
leaq (%rcx,%r11,8), %r11
vpbroadcastd 0x4(%r11), %ymm8
vpxor %xmm7, %xmm7, %xmm7
xorl %ebx, %ebx
vpxor %xmm6, %xmm6, %xmm6
vmovdqa %ymm1, %ymm9
vmovdqa %ymm1, %ymm10
vpsrlvd %ymm9, %ymm8, %ymm11
vpslld $0x4, %ymm11, %ymm11
vpaddd %ymm3, %ymm10, %ymm12
vpsrlvd %ymm12, %ymm8, %ymm12
vpmovzxbd (%rdi,%rbx), %ymm13
vpand %ymm4, %ymm13, %ymm14
vpternlogd $0xf8, %ymm2, %ymm11, %ymm14
vpsrld $0x4, %ymm13, %ymm11
vpternlogd $0xf8, %ymm2, %ymm12, %ymm11
vpmovsxbw -0x10(%r8,%rbx), %xmm12
vpmovdw %ymm14, %xmm13
vpmaddwd %xmm12, %xmm13, %xmm12
vpaddd %ymm7, %ymm12, %ymm7
vpmovsxbw (%r8,%rbx), %xmm12
vpmovdw %ymm11, %xmm11
vpmaddwd %xmm12, %xmm11, %xmm11
vpaddd %ymm6, %ymm11, %ymm6
addq $0x8, %rbx
vpaddd %ymm5, %ymm9, %ymm9
vpaddd %ymm5, %ymm10, %ymm10
cmpq $0x10, %rbx
jne 0x30bb0
vextracti128 $0x1, %ymm7, %xmm8
vphaddd %xmm7, %xmm8, %xmm7
vphaddd %xmm7, %xmm7, %xmm7
vphaddd %xmm7, %xmm7, %xmm7
vextracti128 $0x1, %ymm6, %xmm8
vphaddd %xmm6, %xmm8, %xmm6
vphaddd %xmm6, %xmm6, %xmm6
vphaddd %xmm6, %xmm6, %xmm6
vmovd %xmm7, %ebx
vmovd %xmm6, %ebp
addl %ebx, %ebp
movzwl (%r11), %ebx
vmovss (%r10,%rbx,4), %xmm6
leaq (%rdx,%rdx,8), %rbx
movzwl (%r9,%rbx,4), %r14d
vmulss (%r10,%r14,4), %xmm6, %xmm6
vcvtsi2ss %ebp, %xmm15, %xmm7
movzwl 0x2(%r11), %r11d
vmovss (%r10,%r11,4), %xmm8
movzwl 0x2(%r9,%rbx,4), %r11d
vmulss (%r10,%r11,4), %xmm8, %xmm8
vfmadd231ss %xmm7, %xmm6, %xmm8 # xmm8 = (xmm6 * xmm7) + xmm8
vaddss %xmm0, %xmm8, %xmm0
incq %rdx
addq $0x18, %rdi
addq $0x24, %r8
cmpl %edx, %eax
jg 0x30b90
vmovss %xmm0, (%rsi)
popq %rbx
popq %r14
popq %rbp
vzeroupper
retq
| ggml_vec_dot_q5_1_q8_1:
push rbp
push r14
push rbx
lea eax, [rdi+1Fh]
test edi, edi
cmovns eax, edi
sar eax, 5
cmp edi, 20h ; ' '
jl loc_30B15
mov edi, eax
lea rdx, [r9+4]
shl rdi, 3
lea rdi, [rdi+rdi*2]
vxorps xmm0, xmm0, xmm0
vxorps xmm1, xmm1, xmm1
xor r8d, r8d
mov r10, cs:ggml_table_f32_f16_ptr
vmovdqa ymm2, cs:ymmword_55380
vpbroadcastq ymm3, cs:qword_55588
vpcmpeqd ymm4, ymm4, ymm4
vpbroadcastq ymm5, cs:qword_55590
vpbroadcastq ymm6, cs:qword_55598
vpbroadcastw ymm7, cs:word_555F2
loc_30A83:
movzx r11d, word ptr [rcx+r8]
vmovss xmm8, dword ptr [r10+r11*4]
movzx r11d, word ptr [rcx+r8+2]
vmovss xmm9, dword ptr [r10+r11*4]
movzx r11d, word ptr [rdx-2]
vfmadd231ss xmm0, xmm9, dword ptr [r10+r11*4]
vmovdqu xmm9, xmmword ptr [rcx+r8+8]
vpsrlw xmm10, xmm9, 4
vinserti128 ymm9, ymm9, xmm10, 1
vmovd xmm10, dword ptr [rcx+r8+4]
vpermq ymm10, ymm10, 44h ; 'D'
vpshufb ymm10, ymm10, ymm2
vpor ymm10, ymm10, ymm3
vpcmpeqb ymm10, ymm10, ymm4
vpand ymm10, ymm10, ymm5
vpternlogq ymm10, ymm9, ymm6, 0F8h
movzx r11d, word ptr [rdx-4]
vpmaddubsw ymm9, ymm10, ymmword ptr [rdx]
vpmaddwd ymm9, ymm9, ymm7
vmulss xmm8, xmm8, dword ptr [r10+r11*4]
vcvtdq2ps ymm9, ymm9
vbroadcastss ymm8, xmm8
vfmadd231ps ymm1, ymm9, ymm8
add rdx, 24h ; '$'
add r8, 18h
cmp rdi, r8
jnz loc_30A83
mov edx, eax
jmp short loc_30B1F
loc_30B15:
xor edx, edx
vxorps xmm1, xmm1, xmm1
vxorps xmm0, xmm0, xmm0
loc_30B1F:
vextractf128 xmm2, ymm1, 1
vaddps xmm1, xmm2, xmm1
vshufpd xmm2, xmm1, xmm1, 1
vaddps xmm1, xmm1, xmm2
vhaddps xmm1, xmm1, xmm1
vaddss xmm0, xmm0, xmm1
cmp edx, eax
jge loc_30CA3
mov edx, edx
lea rdi, [rdx+rdx*2]
lea rdi, [rcx+rdi*8]
add rdi, 8
lea r8, [rdx+rdx*8]
vpmovsxbd ymm1, cs:qword_53818
vpbroadcastd ymm2, cs:dword_55350
vpbroadcastd ymm3, cs:dword_55358
lea r8, [r9+r8*4]
add r8, 14h
vpbroadcastd ymm4, cs:dword_54EB0
vpbroadcastd ymm5, dword ptr cs:ymmword_5313C
mov r10, cs:ggml_table_f32_f16_ptr
loc_30B90:
lea r11, [rdx+rdx*2]
lea r11, [rcx+r11*8]
vpbroadcastd ymm8, dword ptr [r11+4]
vpxor xmm7, xmm7, xmm7
xor ebx, ebx
vpxor xmm6, xmm6, xmm6
vmovdqa ymm9, ymm1
vmovdqa ymm10, ymm1
loc_30BB0:
vpsrlvd ymm11, ymm8, ymm9
vpslld ymm11, ymm11, 4
vpaddd ymm12, ymm10, ymm3
vpsrlvd ymm12, ymm8, ymm12
vpmovzxbd ymm13, qword ptr [rdi+rbx]
vpand ymm14, ymm13, ymm4
vpternlogd ymm14, ymm11, ymm2, 0F8h
vpsrld ymm11, ymm13, 4
vpternlogd ymm11, ymm12, ymm2, 0F8h
vpmovsxbw xmm12, qword ptr [r8+rbx-10h]
vpmovdw xmm13, ymm14
vpmaddwd xmm12, xmm13, xmm12
vpaddd ymm7, ymm12, ymm7
vpmovsxbw xmm12, qword ptr [r8+rbx]
vpmovdw xmm11, ymm11
vpmaddwd xmm11, xmm11, xmm12
vpaddd ymm6, ymm11, ymm6
add rbx, 8
vpaddd ymm9, ymm9, ymm5
vpaddd ymm10, ymm10, ymm5
cmp rbx, 10h
jnz short loc_30BB0
vextracti128 xmm8, ymm7, 1
vphaddd xmm7, xmm8, xmm7
vphaddd xmm7, xmm7, xmm7
vphaddd xmm7, xmm7, xmm7
vextracti128 xmm8, ymm6, 1
vphaddd xmm6, xmm8, xmm6
vphaddd xmm6, xmm6, xmm6
vphaddd xmm6, xmm6, xmm6
vmovd ebx, xmm7
vmovd ebp, xmm6
add ebp, ebx
movzx ebx, word ptr [r11]
vmovss xmm6, dword ptr [r10+rbx*4]
lea rbx, [rdx+rdx*8]
movzx r14d, word ptr [r9+rbx*4]
vmulss xmm6, xmm6, dword ptr [r10+r14*4]
vcvtsi2ss xmm7, xmm15, ebp
movzx r11d, word ptr [r11+2]
vmovss xmm8, dword ptr [r10+r11*4]
movzx r11d, word ptr [r9+rbx*4+2]
vmulss xmm8, xmm8, dword ptr [r10+r11*4]
vfmadd231ss xmm8, xmm6, xmm7
vaddss xmm0, xmm8, xmm0
inc rdx
add rdi, 18h
add r8, 24h ; '$'
cmp eax, edx
jg loc_30B90
loc_30CA3:
vmovss dword ptr [rsi], xmm0
pop rbx
pop r14
pop rbp
vzeroupper
retn
| long long ggml_vec_dot_q5_1_q8_1(
int a1,
long long _RSI,
__m128 _XMM0,
__m128 _XMM1,
double a5,
double a6,
double a7,
double a8,
__m128 _XMM6,
__m128 _XMM7,
long long a11,
long long _RCX,
long long a13,
long long a14)
{
long long result; // rax
long long v20; // rdx
long long v48; // rdx
result = (unsigned int)(a1 / 32);
if ( a1 < 32 )
{
LODWORD(v48) = 0;
__asm
{
vxorps xmm1, xmm1, xmm1
vxorps xmm0, xmm0, xmm0
}
}
else
{
v20 = a14 + 4;
__asm
{
vxorps xmm0, xmm0, xmm0
vxorps xmm1, xmm1, xmm1
}
_R8 = 0LL;
_R10 = &ggml_table_f32_f16;
__asm
{
vmovdqa ymm2, cs:ymmword_55380
vpbroadcastq ymm3, cs:qword_55588
vpcmpeqd ymm4, ymm4, ymm4
vpbroadcastq ymm5, cs:qword_55590
vpbroadcastq ymm6, cs:qword_55598
vpbroadcastw ymm7, cs:word_555F2
}
do
{
_R11 = *(unsigned __int16 *)(_RCX + _R8);
__asm { vmovss xmm8, dword ptr [r10+r11*4] }
_R11 = *(unsigned __int16 *)(_RCX + _R8 + 2);
__asm
{
vmovss xmm9, dword ptr [r10+r11*4]
vfmadd231ss xmm0, xmm9, dword ptr [r10+r11*4]
vmovdqu xmm9, xmmword ptr [rcx+r8+8]
vpsrlw xmm10, xmm9, 4
vinserti128 ymm9, ymm9, xmm10, 1
vmovd xmm10, dword ptr [rcx+r8+4]
vpermq ymm10, ymm10, 44h ; 'D'
vpshufb ymm10, ymm10, ymm2
vpor ymm10, ymm10, ymm3
vpcmpeqb ymm10, ymm10, ymm4
vpand ymm10, ymm10, ymm5
vpternlogq ymm10, ymm9, ymm6, 0F8h
vpmaddubsw ymm9, ymm10, ymmword ptr [rdx]
vpmaddwd ymm9, ymm9, ymm7
vmulss xmm8, xmm8, dword ptr [r10+r11*4]
vcvtdq2ps ymm9, ymm9
vbroadcastss ymm8, xmm8
vfmadd231ps ymm1, ymm9, ymm8
}
v20 += 36LL;
_R8 += 24LL;
}
while ( 24LL * (unsigned int)result != _R8 );
LODWORD(v48) = a1 / 32;
}
__asm
{
vextractf128 xmm2, ymm1, 1
vaddps xmm1, xmm2, xmm1
vshufpd xmm2, xmm1, xmm1, 1
vaddps xmm1, xmm1, xmm2
vhaddps xmm1, xmm1, xmm1
vaddss xmm0, xmm0, xmm1
}
if ( (int)v48 < (int)result )
{
v48 = (unsigned int)v48;
_RDI = _RCX + 24LL * (unsigned int)v48 + 8;
__asm
{
vpmovsxbd ymm1, cs:qword_53818
vpbroadcastd ymm2, cs:dword_55350
vpbroadcastd ymm3, cs:dword_55358
}
_R8 = a14 + 36LL * (unsigned int)v48 + 20;
__asm
{
vpbroadcastd ymm4, cs:dword_54EB0
vpbroadcastd ymm5, dword ptr cs:ymmword_5313C
}
_R10 = &ggml_table_f32_f16;
do
{
_R11 = (unsigned __int16 *)(_RCX + 24 * v48);
__asm
{
vpbroadcastd ymm8, dword ptr [r11+4]
vpxor xmm7, xmm7, xmm7
}
_RBX = 0LL;
__asm
{
vpxor xmm6, xmm6, xmm6
vmovdqa ymm9, ymm1
vmovdqa ymm10, ymm1
}
do
{
__asm
{
vpsrlvd ymm11, ymm8, ymm9
vpslld ymm11, ymm11, 4
vpaddd ymm12, ymm10, ymm3
vpsrlvd ymm12, ymm8, ymm12
vpmovzxbd ymm13, qword ptr [rdi+rbx]
vpand ymm14, ymm13, ymm4
vpternlogd ymm14, ymm11, ymm2, 0F8h
vpsrld ymm11, ymm13, 4
vpternlogd ymm11, ymm12, ymm2, 0F8h
vpmovsxbw xmm12, qword ptr [r8+rbx-10h]
vpmovdw xmm13, ymm14
vpmaddwd xmm12, xmm13, xmm12
vpaddd ymm7, ymm12, ymm7
vpmovsxbw xmm12, qword ptr [r8+rbx]
vpmovdw xmm11, ymm11
vpmaddwd xmm11, xmm11, xmm12
vpaddd ymm6, ymm11, ymm6
}
_RBX += 8LL;
__asm
{
vpaddd ymm9, ymm9, ymm5
vpaddd ymm10, ymm10, ymm5
}
}
while ( _RBX != 16 );
__asm
{
vextracti128 xmm8, ymm7, 1
vphaddd xmm7, xmm8, xmm7
vphaddd xmm7, xmm7, xmm7
vphaddd xmm7, xmm7, xmm7
vextracti128 xmm8, ymm6, 1
vphaddd xmm6, xmm8, xmm6
vphaddd xmm6, xmm6, xmm6
vphaddd xmm6, xmm6, xmm6
vmovd ebx, xmm7
vmovd ebp, xmm6
}
_RBX = *_R11;
__asm
{
vmovss xmm6, dword ptr [r10+rbx*4]
vmulss xmm6, xmm6, dword ptr [r10+r14*4]
vcvtsi2ss xmm7, xmm15, ebp
}
_R11 = _R11[1];
__asm
{
vmovss xmm8, dword ptr [r10+r11*4]
vmulss xmm8, xmm8, dword ptr [r10+r11*4]
vfmadd231ss xmm8, xmm6, xmm7
vaddss xmm0, xmm8, xmm0
}
++v48;
_RDI += 24LL;
_R8 += 36LL;
}
while ( (int)result > (int)v48 );
}
__asm
{
vmovss dword ptr [rsi], xmm0
vzeroupper
}
return result;
}
| ggml_vec_dot_q5_1_q8_1:
PUSH RBP
PUSH R14
PUSH RBX
LEA EAX,[RDI + 0x1f]
TEST EDI,EDI
CMOVNS EAX,EDI
SAR EAX,0x5
CMP EDI,0x20
JL 0x00130b15
MOV EDI,EAX
LEA RDX,[R9 + 0x4]
SHL RDI,0x3
LEA RDI,[RDI + RDI*0x2]
VXORPS XMM0,XMM0,XMM0
VXORPS XMM1,XMM1,XMM1
XOR R8D,R8D
MOV R10,qword ptr [0x00164f70]
VMOVDQA YMM2,ymmword ptr [0x00155380]
VPBROADCASTQ YMM3,qword ptr [0x00155588]
VPCMPEQD YMM4,YMM4,YMM4
VPBROADCASTQ YMM5,qword ptr [0x00155590]
VPBROADCASTQ YMM6,qword ptr [0x00155598]
VPBROADCASTW YMM7,word ptr [0x001555f2]
LAB_00130a83:
MOVZX R11D,word ptr [RCX + R8*0x1]
VMOVSS XMM8,dword ptr [R10 + R11*0x4]
MOVZX R11D,word ptr [RCX + R8*0x1 + 0x2]
VMOVSS XMM9,dword ptr [R10 + R11*0x4]
MOVZX R11D,word ptr [RDX + -0x2]
VFMADD231SS XMM0,XMM9,dword ptr [R10 + R11*0x4]
VMOVDQU XMM9,xmmword ptr [RCX + R8*0x1 + 0x8]
VPSRLW XMM10,XMM9,0x4
VINSERTI128 YMM9,YMM9,XMM10,0x1
VMOVD XMM10,dword ptr [RCX + R8*0x1 + 0x4]
VPERMQ YMM10,YMM10,0x44
VPSHUFB YMM10,YMM10,YMM2
VPOR YMM10,YMM10,YMM3
VPCMPEQB YMM10,YMM10,YMM4
VPAND YMM10,YMM10,YMM5
VPTERNLOGQ YMM10,YMM9,YMM6,0xf8
MOVZX R11D,word ptr [RDX + -0x4]
VPMADDUBSW YMM9,YMM10,ymmword ptr [RDX]
VPMADDWD YMM9,YMM9,YMM7
VMULSS XMM8,XMM8,dword ptr [R10 + R11*0x4]
VCVTDQ2PS YMM9,YMM9
VBROADCASTSS YMM8,XMM8
VFMADD231PS YMM1,YMM9,YMM8
ADD RDX,0x24
ADD R8,0x18
CMP RDI,R8
JNZ 0x00130a83
MOV EDX,EAX
JMP 0x00130b1f
LAB_00130b15:
XOR EDX,EDX
VXORPS XMM1,XMM1,XMM1
VXORPS XMM0,XMM0,XMM0
LAB_00130b1f:
VEXTRACTF128 XMM2,YMM1,0x1
VADDPS XMM1,XMM2,XMM1
VSHUFPD XMM2,XMM1,XMM1,0x1
VADDPS XMM1,XMM1,XMM2
VHADDPS XMM1,XMM1,XMM1
VADDSS XMM0,XMM0,XMM1
CMP EDX,EAX
JGE 0x00130ca3
MOV EDX,EDX
LEA RDI,[RDX + RDX*0x2]
LEA RDI,[RCX + RDI*0x8]
ADD RDI,0x8
LEA R8,[RDX + RDX*0x8]
VPMOVSXBD YMM1,qword ptr [0x00153818]
VPBROADCASTD YMM2,dword ptr [0x00155350]
VPBROADCASTD YMM3,dword ptr [0x00155358]
LEA R8,[R9 + R8*0x4]
ADD R8,0x14
VPBROADCASTD YMM4,dword ptr [0x00154eb0]
VPBROADCASTD YMM5,dword ptr [0x0015313c]
MOV R10,qword ptr [0x00164f70]
LAB_00130b90:
LEA R11,[RDX + RDX*0x2]
LEA R11,[RCX + R11*0x8]
VPBROADCASTD YMM8,dword ptr [R11 + 0x4]
VPXOR XMM7,XMM7,XMM7
XOR EBX,EBX
VPXOR XMM6,XMM6,XMM6
VMOVDQA YMM9,YMM1
VMOVDQA YMM10,YMM1
LAB_00130bb0:
VPSRLVD YMM11,YMM8,YMM9
VPSLLD YMM11,YMM11,0x4
VPADDD YMM12,YMM10,YMM3
VPSRLVD YMM12,YMM8,YMM12
VPMOVZXBD YMM13,qword ptr [RDI + RBX*0x1]
VPAND YMM14,YMM13,YMM4
VPTERNLOGD YMM14,YMM11,YMM2,0xf8
VPSRLD YMM11,YMM13,0x4
VPTERNLOGD YMM11,YMM12,YMM2,0xf8
VPMOVSXBW XMM12,qword ptr [R8 + RBX*0x1 + -0x10]
VPMOVDW XMM13,YMM14
VPMADDWD XMM12,XMM13,XMM12
VPADDD YMM7,YMM12,YMM7
VPMOVSXBW XMM12,qword ptr [R8 + RBX*0x1]
VPMOVDW XMM11,YMM11
VPMADDWD XMM11,XMM11,XMM12
VPADDD YMM6,YMM11,YMM6
ADD RBX,0x8
VPADDD YMM9,YMM9,YMM5
VPADDD YMM10,YMM10,YMM5
CMP RBX,0x10
JNZ 0x00130bb0
VEXTRACTI128 XMM8,YMM7,0x1
VPHADDD XMM7,XMM8,XMM7
VPHADDD XMM7,XMM7,XMM7
VPHADDD XMM7,XMM7,XMM7
VEXTRACTI128 XMM8,YMM6,0x1
VPHADDD XMM6,XMM8,XMM6
VPHADDD XMM6,XMM6,XMM6
VPHADDD XMM6,XMM6,XMM6
VMOVD EBX,XMM7
VMOVD EBP,XMM6
ADD EBP,EBX
MOVZX EBX,word ptr [R11]
VMOVSS XMM6,dword ptr [R10 + RBX*0x4]
LEA RBX,[RDX + RDX*0x8]
MOVZX R14D,word ptr [R9 + RBX*0x4]
VMULSS XMM6,XMM6,dword ptr [R10 + R14*0x4]
VCVTSI2SS XMM7,XMM15,EBP
MOVZX R11D,word ptr [R11 + 0x2]
VMOVSS XMM8,dword ptr [R10 + R11*0x4]
MOVZX R11D,word ptr [R9 + RBX*0x4 + 0x2]
VMULSS XMM8,XMM8,dword ptr [R10 + R11*0x4]
VFMADD231SS XMM8,XMM6,XMM7
VADDSS XMM0,XMM8,XMM0
INC RDX
ADD RDI,0x18
ADD R8,0x24
CMP EAX,EDX
JG 0x00130b90
LAB_00130ca3:
VMOVSS dword ptr [RSI],XMM0
POP RBX
POP R14
POP RBP
VZEROUPPER
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ggml_vec_dot_q5_1_q8_1
(int param_1,float *param_2,int8 param_3,long param_4,int8 param_5,
long param_6)
{
ushort *puVar1;
int4 uVar2;
int1 auVar3 [16];
int1 auVar4 [16];
int1 auVar5 [16];
int1 auVar6 [16];
uint uVar7;
uint uVar9;
int1 (*pauVar10) [32];
ulong uVar11;
long lVar12;
long lVar13;
long lVar14;
int1 auVar15 [32];
int1 auVar16 [32];
float fVar17;
int1 auVar18 [64];
int1 auVar19 [16];
int1 auVar20 [64];
int1 auVar21 [32];
int1 auVar22 [32];
int1 auVar23 [32];
int1 auVar24 [32];
int1 in_ZMM4 [64];
int1 auVar25 [32];
int1 auVar26 [32];
int1 auVar27 [16];
int1 auVar28 [32];
int1 auVar29 [32];
int1 auVar30 [16];
int1 auVar31 [16];
int1 auVar32 [32];
int1 auVar33 [32];
int1 auVar34 [16];
int1 in_register_000015c4 [12];
int iVar8;
iVar8 = param_1 + 0x1f;
if (-1 < param_1) {
iVar8 = param_1;
}
uVar7 = iVar8 >> 5;
if (param_1 < 0x20) {
auVar15 = SUB6432(ZEXT864(0),0);
auVar18 = ZEXT864(0);
uVar9 = 0;
}
else {
pauVar10 = (int1 (*) [32])(param_6 + 4);
auVar18 = ZEXT864(0);
auVar20 = ZEXT864(0);
lVar13 = 0;
auVar22._8_8_ = DAT_00155588;
auVar22._0_8_ = DAT_00155588;
auVar22._16_8_ = DAT_00155588;
auVar22._24_8_ = DAT_00155588;
auVar21 = vpcmpeqd_avx2(in_ZMM4._0_32_,in_ZMM4._0_32_);
auVar25._8_8_ = DAT_00155590;
auVar25._0_8_ = DAT_00155590;
auVar25._16_8_ = DAT_00155590;
auVar25._24_8_ = DAT_00155590;
auVar16._8_8_ = DAT_00155598;
auVar16._0_8_ = DAT_00155598;
auVar16._16_8_ = DAT_00155598;
auVar16._24_8_ = DAT_00155598;
auVar33._2_2_ = DAT_001555f2;
auVar33._0_2_ = DAT_001555f2;
auVar33._4_2_ = DAT_001555f2;
auVar33._6_2_ = DAT_001555f2;
auVar33._8_2_ = DAT_001555f2;
auVar33._10_2_ = DAT_001555f2;
auVar33._12_2_ = DAT_001555f2;
auVar33._14_2_ = DAT_001555f2;
auVar33._16_2_ = DAT_001555f2;
auVar33._18_2_ = DAT_001555f2;
auVar33._20_2_ = DAT_001555f2;
auVar33._22_2_ = DAT_001555f2;
auVar33._24_2_ = DAT_001555f2;
auVar33._26_2_ = DAT_001555f2;
auVar33._28_2_ = DAT_001555f2;
auVar33._30_2_ = DAT_001555f2;
do {
auVar6 = vfmadd231ss_fma(auVar18._0_16_,
ZEXT416(*(uint *)(PTR_ggml_table_f32_f16_00164f70 +
(ulong)*(ushort *)(param_4 + 2 + lVar13) * 4)),
ZEXT416(*(uint *)(PTR_ggml_table_f32_f16_00164f70 +
(ulong)*(ushort *)(pauVar10[-1] + 0x1e) * 4)));
auVar18 = ZEXT1664(auVar6);
auVar6 = *(int1 (*) [16])(param_4 + 8 + lVar13);
auVar30 = vpsrlw_avx(auVar6,4);
auVar32._0_16_ = ZEXT116(0) * auVar30 + ZEXT116(1) * auVar6;
auVar32._16_16_ = ZEXT116(0) * SUB4816((int1 [48])0x0,0) + ZEXT116(1) * auVar30;
auVar15 = vpermq_avx2(ZEXT432(*(uint *)(param_4 + 4 + lVar13)),0x44);
auVar15 = vpshufb_avx2(auVar15,_DAT_00155380);
auVar15 = vpor_avx2(auVar15,auVar22);
auVar15 = vpcmpeqb_avx2(auVar15,auVar21);
auVar15 = vpand_avx2(auVar15,auVar25);
auVar15 = vpternlogq_avx512vl(auVar15,auVar32,auVar16,0xf8);
auVar15 = vpmaddubsw_avx2(auVar15,*pauVar10);
auVar15 = vpmaddwd_avx2(auVar15,auVar33);
fVar17 = *(float *)(PTR_ggml_table_f32_f16_00164f70 + (ulong)*(ushort *)(param_4 + lVar13) * 4
) *
*(float *)(PTR_ggml_table_f32_f16_00164f70 +
(ulong)*(ushort *)(pauVar10[-1] + 0x1c) * 4);
auVar15 = vcvtdq2ps_avx(auVar15);
auVar28._4_4_ = fVar17;
auVar28._0_4_ = fVar17;
auVar28._8_4_ = fVar17;
auVar28._12_4_ = fVar17;
auVar28._16_4_ = fVar17;
auVar28._20_4_ = fVar17;
auVar28._24_4_ = fVar17;
auVar28._28_4_ = fVar17;
auVar6 = vfmadd231ps_fma(auVar20._0_32_,auVar15,auVar28);
auVar20 = ZEXT1664(auVar6);
auVar15 = ZEXT1632(auVar6);
pauVar10 = (int1 (*) [32])(pauVar10[1] + 4);
lVar13 = lVar13 + 0x18;
uVar9 = uVar7;
} while ((ulong)uVar7 * 0x18 != lVar13);
}
auVar30._0_4_ = auVar15._16_4_ + auVar15._0_4_;
auVar30._4_4_ = auVar15._20_4_ + auVar15._4_4_;
auVar30._8_4_ = auVar15._24_4_ + auVar15._8_4_;
auVar30._12_4_ = auVar15._28_4_ + auVar15._12_4_;
auVar6 = vshufpd_avx(auVar30,auVar30,1);
auVar19._0_4_ = auVar30._0_4_ + auVar6._0_4_;
auVar19._4_4_ = auVar30._4_4_ + auVar6._4_4_;
auVar19._8_4_ = auVar30._8_4_ + auVar6._8_4_;
auVar19._12_4_ = auVar30._12_4_ + auVar6._12_4_;
auVar6 = vhaddps_avx(auVar19,auVar19);
fVar17 = auVar18._0_4_ + auVar6._0_4_;
if ((int)uVar9 < (int)uVar7) {
uVar11 = (ulong)uVar9;
lVar13 = param_4 + uVar11 * 0x18 + 8;
auVar6._8_8_ = 0;
auVar6._0_8_ = DAT_00153818;
auVar15 = vpmovsxbd_avx2(auVar6);
auVar21._4_4_ = DAT_00155350;
auVar21._0_4_ = DAT_00155350;
auVar21._8_4_ = DAT_00155350;
auVar21._12_4_ = DAT_00155350;
auVar21._16_4_ = DAT_00155350;
auVar21._20_4_ = DAT_00155350;
auVar21._24_4_ = DAT_00155350;
auVar21._28_4_ = DAT_00155350;
auVar23._4_4_ = DAT_00155358;
auVar23._0_4_ = DAT_00155358;
auVar23._8_4_ = DAT_00155358;
auVar23._12_4_ = DAT_00155358;
auVar23._16_4_ = DAT_00155358;
auVar23._20_4_ = DAT_00155358;
auVar23._24_4_ = DAT_00155358;
auVar23._28_4_ = DAT_00155358;
lVar14 = param_6 + uVar11 * 0x24 + 0x14;
auVar24._4_4_ = DAT_00154eb0;
auVar24._0_4_ = DAT_00154eb0;
auVar24._8_4_ = DAT_00154eb0;
auVar24._12_4_ = DAT_00154eb0;
auVar24._16_4_ = DAT_00154eb0;
auVar24._20_4_ = DAT_00154eb0;
auVar24._24_4_ = DAT_00154eb0;
auVar24._28_4_ = DAT_00154eb0;
auVar26._4_4_ = DAT_0015313c;
auVar26._0_4_ = DAT_0015313c;
auVar26._8_4_ = DAT_0015313c;
auVar26._12_4_ = DAT_0015313c;
auVar26._16_4_ = DAT_0015313c;
auVar26._20_4_ = DAT_0015313c;
auVar26._24_4_ = DAT_0015313c;
auVar26._28_4_ = DAT_0015313c;
do {
puVar1 = (ushort *)(param_4 + uVar11 * 0x18);
uVar2 = *(int4 *)(puVar1 + 2);
auVar29._4_4_ = uVar2;
auVar29._0_4_ = uVar2;
auVar29._8_4_ = uVar2;
auVar29._12_4_ = uVar2;
auVar29._16_4_ = uVar2;
auVar29._20_4_ = uVar2;
auVar29._24_4_ = uVar2;
auVar29._28_4_ = uVar2;
auVar20 = ZEXT1664((int1 [16])0x0);
lVar12 = 0;
auVar18 = ZEXT1664((int1 [16])0x0);
auVar22 = auVar15;
auVar25 = auVar15;
do {
auVar16 = vpsrlvd_avx2(auVar29,auVar22);
auVar32 = vpslld_avx2(auVar16,4);
auVar16 = vpaddd_avx2(auVar25,auVar23);
auVar28 = vpsrlvd_avx2(auVar29,auVar16);
auVar3._8_8_ = 0;
auVar3._0_8_ = *(ulong *)(lVar13 + lVar12);
auVar33 = vpmovzxbd_avx2(auVar3);
auVar16 = vpand_avx2(auVar33,auVar24);
auVar16 = vpternlogd_avx512vl(auVar16,auVar32,auVar21,0xf8);
auVar33 = vpsrld_avx2(auVar33,4);
auVar33 = vpternlogd_avx512vl(auVar33,auVar28,auVar21,0xf8);
auVar4._8_8_ = 0;
auVar4._0_8_ = *(ulong *)(lVar14 + -0x10 + lVar12);
auVar6 = vpmovsxbw_avx(auVar4);
auVar30 = vpmovdw_avx512vl(auVar16);
auVar34._8_8_ = 0;
auVar34._0_8_ = auVar30._0_8_;
auVar6 = vpmaddwd_avx(auVar34,auVar6);
auVar16 = vpaddd_avx2(ZEXT1632(auVar6),auVar20._0_32_);
auVar20 = ZEXT3264(auVar16);
auVar5._8_8_ = 0;
auVar5._0_8_ = *(ulong *)(lVar14 + lVar12);
auVar6 = vpmovsxbw_avx(auVar5);
auVar30 = vpmovdw_avx512vl(auVar33);
auVar31._8_8_ = 0;
auVar31._0_8_ = auVar30._0_8_;
auVar6 = vpmaddwd_avx(auVar31,auVar6);
auVar33 = vpaddd_avx2(ZEXT1632(auVar6),auVar18._0_32_);
auVar18 = ZEXT3264(auVar33);
lVar12 = lVar12 + 8;
auVar22 = vpaddd_avx2(auVar22,auVar26);
auVar25 = vpaddd_avx2(auVar25,auVar26);
} while (lVar12 != 0x10);
auVar6 = vphaddd_avx(auVar16._16_16_,auVar16._0_16_);
auVar6 = vphaddd_avx(auVar6,auVar6);
auVar6 = vphaddd_avx(auVar6,auVar6);
auVar30 = vphaddd_avx(auVar33._16_16_,auVar33._0_16_);
auVar30 = vphaddd_avx(auVar30,auVar30);
auVar30 = vphaddd_avx(auVar30,auVar30);
auVar27._0_4_ = (float)(auVar30._0_4_ + auVar6._0_4_);
auVar27._4_12_ = in_register_000015c4;
auVar6 = vfmadd231ss_fma(ZEXT416((uint)(*(float *)(PTR_ggml_table_f32_f16_00164f70 +
(ulong)puVar1[1] * 4) *
*(float *)(PTR_ggml_table_f32_f16_00164f70 +
(ulong)*(ushort *)
(param_6 + 2 + uVar11 * 0x24) * 4))),
ZEXT416((uint)(*(float *)(PTR_ggml_table_f32_f16_00164f70 +
(ulong)*puVar1 * 4) *
*(float *)(PTR_ggml_table_f32_f16_00164f70 +
(ulong)*(ushort *)(param_6 + uVar11 * 0x24) *
4))),auVar27);
fVar17 = auVar6._0_4_ + fVar17;
uVar11 = uVar11 + 1;
lVar13 = lVar13 + 0x18;
lVar14 = lVar14 + 0x24;
} while ((int)uVar11 < (int)uVar7);
}
*param_2 = fVar17;
return;
}
| |
42,387 | StartTree::Matrix<float>::recalculateTotalForOneRow(unsigned long, unsigned long) | iqtree3/utils/bionj2.cpp | void recalculateTotalForOneRow(size_t a, size_t b) {
//recalculate total for row, a, excluding
//column b (a<=b).
T replacementRowTotal = 0;
for (size_t i=0; i<a; ++i) {
replacementRowTotal += rows[a][i];
}
for (size_t i=a+1; i<b; ++i) {
replacementRowTotal += rows[a][i];
}
for (size_t i=b+1; i<n; ++i) {
replacementRowTotal += rows[a][i];
}
rowTotals[a] = replacementRowTotal;
} | O3 | cpp | StartTree::Matrix<float>::recalculateTotalForOneRow(unsigned long, unsigned long):
testq %rsi, %rsi
je 0x1b845
movq 0x20(%rdi), %rax
movq (%rax,%rsi,8), %rax
xorps %xmm0, %xmm0
xorl %ecx, %ecx
addss (%rax,%rcx,4), %xmm0
incq %rcx
cmpq %rcx, %rsi
jne 0x1b836
jmp 0x1b848
xorps %xmm0, %xmm0
leaq 0x1(%rsi), %rax
cmpq %rdx, %rax
jae 0x1b866
movq 0x20(%rdi), %rcx
movq (%rcx,%rsi,8), %rcx
addss (%rcx,%rax,4), %xmm0
incq %rax
cmpq %rax, %rdx
jne 0x1b859
movq 0x8(%rdi), %rax
incq %rdx
cmpq %rax, %rdx
jae 0x1b887
movq 0x20(%rdi), %rcx
movq (%rcx,%rsi,8), %rcx
addss (%rcx,%rdx,4), %xmm0
incq %rdx
cmpq %rdx, %rax
jne 0x1b87a
movq 0x28(%rdi), %rax
movss %xmm0, (%rax,%rsi,4)
retq
nop
| _ZN9StartTree6MatrixIfE25recalculateTotalForOneRowEmm:
test rsi, rsi
jz short loc_1B845
mov rax, [rdi+20h]
mov rax, [rax+rsi*8]
xorps xmm0, xmm0
xor ecx, ecx
loc_1B836:
addss xmm0, dword ptr [rax+rcx*4]
inc rcx
cmp rsi, rcx
jnz short loc_1B836
jmp short loc_1B848
loc_1B845:
xorps xmm0, xmm0
loc_1B848:
lea rax, [rsi+1]
cmp rax, rdx
jnb short loc_1B866
mov rcx, [rdi+20h]
mov rcx, [rcx+rsi*8]
loc_1B859:
addss xmm0, dword ptr [rcx+rax*4]
inc rax
cmp rdx, rax
jnz short loc_1B859
loc_1B866:
mov rax, [rdi+8]
inc rdx
cmp rdx, rax
jnb short loc_1B887
mov rcx, [rdi+20h]
mov rcx, [rcx+rsi*8]
loc_1B87A:
addss xmm0, dword ptr [rcx+rdx*4]
inc rdx
cmp rax, rdx
jnz short loc_1B87A
loc_1B887:
mov rax, [rdi+28h]
movss dword ptr [rax+rsi*4], xmm0
retn
| long long StartTree::Matrix<float>::recalculateTotalForOneRow(_QWORD *a1, long long a2, unsigned long long a3)
{
float v3; // xmm0_4
long long i; // rcx
long long v5; // rax
unsigned long long v6; // rax
unsigned long long v7; // rdx
long long result; // rax
if ( a2 )
{
v3 = 0.0;
for ( i = 0LL; i != a2; ++i )
v3 = v3 + *(float *)(*(_QWORD *)(a1[4] + 8 * a2) + 4 * i);
}
else
{
v3 = 0.0;
}
v5 = a2 + 1;
if ( a2 + 1 < a3 )
{
do
v3 = v3 + *(float *)(*(_QWORD *)(a1[4] + 8 * a2) + 4 * v5++);
while ( a3 != v5 );
}
v6 = a1[1];
v7 = a3 + 1;
if ( v7 < v6 )
{
do
v3 = v3 + *(float *)(*(_QWORD *)(a1[4] + 8 * a2) + 4 * v7++);
while ( v6 != v7 );
}
result = a1[5];
*(float *)(result + 4 * a2) = v3;
return result;
}
| recalculateTotalForOneRow:
TEST RSI,RSI
JZ 0x0011b845
MOV RAX,qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RAX + RSI*0x8]
XORPS XMM0,XMM0
XOR ECX,ECX
LAB_0011b836:
ADDSS XMM0,dword ptr [RAX + RCX*0x4]
INC RCX
CMP RSI,RCX
JNZ 0x0011b836
JMP 0x0011b848
LAB_0011b845:
XORPS XMM0,XMM0
LAB_0011b848:
LEA RAX,[RSI + 0x1]
CMP RAX,RDX
JNC 0x0011b866
MOV RCX,qword ptr [RDI + 0x20]
MOV RCX,qword ptr [RCX + RSI*0x8]
LAB_0011b859:
ADDSS XMM0,dword ptr [RCX + RAX*0x4]
INC RAX
CMP RDX,RAX
JNZ 0x0011b859
LAB_0011b866:
MOV RAX,qword ptr [RDI + 0x8]
INC RDX
CMP RDX,RAX
JNC 0x0011b887
MOV RCX,qword ptr [RDI + 0x20]
MOV RCX,qword ptr [RCX + RSI*0x8]
LAB_0011b87a:
ADDSS XMM0,dword ptr [RCX + RDX*0x4]
INC RDX
CMP RAX,RDX
JNZ 0x0011b87a
LAB_0011b887:
MOV RAX,qword ptr [RDI + 0x28]
MOVSS dword ptr [RAX + RSI*0x4],XMM0
RET
|
/* StartTree::Matrix<float>::recalculateTotalForOneRow(unsigned long, unsigned long) */
void __thiscall
StartTree::Matrix<float>::recalculateTotalForOneRow(Matrix<float> *this,ulong param_1,ulong param_2)
{
ulong uVar1;
float fVar2;
if (param_1 == 0) {
fVar2 = 0.0;
}
else {
fVar2 = 0.0;
uVar1 = 0;
do {
fVar2 = fVar2 + *(float *)(*(long *)(*(long *)(this + 0x20) + param_1 * 8) + uVar1 * 4);
uVar1 = uVar1 + 1;
} while (param_1 != uVar1);
}
uVar1 = param_1 + 1;
if (uVar1 < param_2) {
do {
fVar2 = fVar2 + *(float *)(*(long *)(*(long *)(this + 0x20) + param_1 * 8) + uVar1 * 4);
uVar1 = uVar1 + 1;
} while (param_2 != uVar1);
}
uVar1 = param_2 + 1;
if (uVar1 < *(ulong *)(this + 8)) {
do {
fVar2 = fVar2 + *(float *)(*(long *)(*(long *)(this + 0x20) + param_1 * 8) + uVar1 * 4);
uVar1 = uVar1 + 1;
} while (*(ulong *)(this + 8) != uVar1);
}
*(float *)(*(long *)(this + 0x28) + param_1 * 4) = fVar2;
return;
}
| |
42,388 | minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | llama.cpp/common/json.hpp | T & operator[](KeyType && key)
{
return emplace(std::forward<KeyType>(key), T{}).first->second;
} | O3 | cpp | minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x40(%rsp), %r14
movq $0x0, 0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%r14)
movaps %xmm0, -0x30(%r14)
movaps %xmm0, -0x20(%r14)
movaps %xmm0, -0x10(%r14)
movb $0x0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x858ca
movq %r14, %rdi
movl $0x1, %esi
callq 0x858ca
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0xbddd8
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0x858ca
movq %r14, %rdi
callq 0x89fe4
leaq 0x38(%rsp), %rdi
callq 0x71092
leaq 0x28(%rsp), %rdi
callq 0x71092
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x71092
movq -0x10(%r14), %rdi
testq %rdi, %rdi
je 0xbdb62
movq 0xa445b(%rip), %rax # 0x161f98
cmpb $0x0, (%rax)
je 0xbdb4d
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xbdb57
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xbdb62
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x10, %rbx
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb6738
movq %rbx, %rdi
callq 0x20ad0
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r15, rdi
lea r14, [rsp+68h+var_28]
mov qword ptr [r14+8], 0
xorps xmm0, xmm0
movaps xmmword ptr [r14-40h], xmm0
movaps xmmword ptr [r14-30h], xmm0
movaps xmmword ptr [r14-20h], xmm0
movaps xmmword ptr [r14-10h], xmm0
mov byte ptr [r14], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdx, rsp
mov rdi, r15
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_
mov rbx, rax
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+68h+var_30]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+68h+var_40]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r14, [rsp+68h+var_50]
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [r14-10h]
test rdi, rdi
jz short loc_BDB62
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_BDB4D
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_BDB57
loc_BDB4D:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_BDB57:
cmp eax, 1
jnz short loc_BDB62
mov rax, [rdi]
call qword ptr [rax+18h]
loc_BDB62:
add rbx, 10h
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_(
long long a1,
long long a2)
{
long long v2; // rbx
long long v3; // rdi
signed __int32 v4; // eax
__int128 v6; // [rsp+0h] [rbp-68h] BYREF
__int128 v7; // [rsp+10h] [rbp-58h] BYREF
__int128 v8; // [rsp+20h] [rbp-48h] BYREF
__int128 v9; // [rsp+30h] [rbp-38h] BYREF
char v10[8]; // [rsp+40h] [rbp-28h] BYREF
long long v11; // [rsp+48h] [rbp-20h]
v11 = 0LL;
v6 = 0LL;
v7 = 0LL;
v8 = 0LL;
v9 = 0LL;
v10[0] = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10);
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(v10);
v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_(
a1,
a2,
&v6);
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(v10);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v10);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v9 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v8 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v7 + 1);
v3 = *((_QWORD *)&v6 + 1);
if ( *((_QWORD *)&v6 + 1) )
{
if ( _libc_single_threaded )
{
v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1;
}
else
{
v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v4 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL);
}
return v2 + 16;
}
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R15,RDI
LEA R14,[RSP + 0x40]
MOV qword ptr [R14 + 0x8],0x0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x40],XMM0
MOVAPS xmmword ptr [R14 + -0x30],XMM0
MOVAPS xmmword ptr [R14 + -0x20],XMM0
MOVAPS xmmword ptr [R14 + -0x10],XMM0
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x001858ca
MOV RDI,R14
MOV ESI,0x1
CALL 0x001858ca
LAB_001bdae9:
MOV RDX,RSP
MOV RDI,R15
MOV RSI,RBX
CALL 0x001bddd8
LAB_001bdaf7:
MOV RBX,RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x001858ca
MOV RDI,R14
CALL 0x00189fe4
LEA RDI,[RSP + 0x38]
CALL 0x00171092
LEA RDI,[RSP + 0x28]
CALL 0x00171092
LEA R14,[RSP + 0x18]
MOV RDI,R14
CALL 0x00171092
MOV RDI,qword ptr [R14 + -0x10]
TEST RDI,RDI
JZ 0x001bdb62
MOV RAX,qword ptr [0x00261f98]
CMP byte ptr [RAX],0x0
JZ 0x001bdb4d
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001bdb57
LAB_001bdb4d:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001bdb57:
CMP EAX,0x1
JNZ 0x001bdb62
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001bdb62:
ADD RBX,0x10
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
long _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_
(int8 param_1,int8 param_2)
{
int *piVar1;
int iVar2;
long lVar3;
bool bVar4;
int8 local_68;
long *plStack_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
int8 uStack_30;
data local_28 [8];
int8 local_20;
local_20 = 0;
local_68 = 0;
plStack_60 = (long *)0x0;
local_58 = 0;
uStack_50 = 0;
local_48 = 0;
uStack_40 = 0;
local_38 = 0;
uStack_30 = 0;
local_28[0] = (data)0x0;
bVar4 = SUB81(local_28,0);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
/* try { // try from 001bdae9 to 001bdaf6 has its CatchHandler @ 001bdb73 */
lVar3 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_
(param_1,param_2,&local_68);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_30);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_50);
if (plStack_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_00261f98 == '\0') {
LOCK();
piVar1 = (int *)((long)plStack_60 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)plStack_60 + 0xc);
*(int *)((long)plStack_60 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*plStack_60 + 0x18))();
}
}
return lVar3 + 0x10;
}
| |
42,389 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++() | monkey531[P]llama/common/./json.hpp | iter_impl& operator++()
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
std::advance(m_it.object_iterator, 1);
break;
}
case value_t::array:
{
std::advance(m_it.array_iterator, 1);
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
++m_it.primitive_iterator;
break;
}
}
return *this;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator++():
movq (%rdi), %rax
testq %rax, %rax
je 0x2fe51
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x2fe42
cmpl $0x1, %eax
jne 0x2fe49
addq $0x30, 0x8(%rdi)
jmp 0x2fe4d
addq $0x10, 0x10(%rdi)
jmp 0x2fe4d
incq 0x18(%rdi)
movq %rdi, %rax
retq
pushq %rax
leaq 0x64f25(%rip), %rdi # 0x94d7e
leaq 0x64f6a(%rip), %rdx # 0x94dca
leaq 0x6a086(%rip), %rcx # 0x99eed
movl $0x33c0, %esi # imm = 0x33C0
xorl %eax, %eax
callq 0x21b30
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv:
mov rax, [rdi]
test rax, rax
jz short loc_2FE51
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_2FE42
cmp eax, 1
jnz short loc_2FE49
add qword ptr [rdi+8], 30h ; '0'
jmp short loc_2FE4D
loc_2FE42:
add qword ptr [rdi+10h], 10h
jmp short loc_2FE4D
loc_2FE49:
inc qword ptr [rdi+18h]
loc_2FE4D:
mov rax, rdi
retn
loc_2FE51:
push rax
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 33C0h
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator++(
unsigned __int8 **a1)
{
int v1; // eax
if ( *a1 )
{
v1 = **a1;
if ( v1 == 2 )
{
a1[2] += 16;
}
else if ( v1 == 1 )
{
a1[1] += 48;
}
else
{
++a1[3];
}
return (long long)a1;
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
13248LL,
"GGML_ASSERT(%s) failed",
"m_object != nullptr");
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp");
}
}
| operator++:
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x0012fe51
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x0012fe42
CMP EAX,0x1
JNZ 0x0012fe49
ADD qword ptr [RDI + 0x8],0x30
JMP 0x0012fe4d
LAB_0012fe42:
ADD qword ptr [RDI + 0x10],0x10
JMP 0x0012fe4d
LAB_0012fe49:
INC qword ptr [RDI + 0x18]
LAB_0012fe4d:
MOV RAX,RDI
RET
LAB_0012fe51:
PUSH RAX
LEA RDI,[0x194d7e]
LEA RDX,[0x194dca]
LEA RCX,[0x199eed]
MOV ESI,0x33c0
XOR EAX,EAX
CALL 0x00121b30
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::TEMPNAMEPLACEHOLDERVALUE() */
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::operator++(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
char cVar1;
int8 in_R8;
int8 in_R9;
if (*(char **)this != (char *)0x0) {
cVar1 = **(char **)this;
if (cVar1 == '\x02') {
*(long *)(this + 0x10) = *(long *)(this + 0x10) + 0x10;
}
else if (cVar1 == '\x01') {
*(long *)(this + 8) = *(long *)(this + 8) + 0x30;
}
else {
*(long *)(this + 0x18) = *(long *)(this + 0x18) + 1;
}
return this;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",0x33c0,
"GGML_ASSERT(%s) failed","m_object != nullptr",in_R8,in_R9,0);
}
| |
42,390 | testing::internal::ForkingDeathTest::Wait() | giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-death-test.cc | int ForkingDeathTest::Wait() {
if (!spawned()) return 0;
ReadAndInterpretStatusByte();
int status_value;
GTEST_DEATH_TEST_CHECK_SYSCALL_(waitpid(child_pid_, &status_value, 0));
set_status(status_value);
return status_value;
} | O3 | cpp | testing::internal::ForkingDeathTest::Wait():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
xorl %eax, %eax
cmpb $0x1, 0x28(%rdi)
jne 0x1061d
movq %rdi, %rbx
callq 0xf144
leaq 0xc(%rsp), %r14
movl 0x3c(%rbx), %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x83d0
cmpl $-0x1, %eax
jne 0x10616
callq 0x8070
cmpl $0x4, (%rax)
je 0x105a0
leaq 0xe8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x31b3e(%rip), %rsi # 0x4210d
leaq 0x31b4a(%rip), %rdx # 0x42120
leaq 0xd8(%rsp), %rbx
movq %rbx, %rdi
callq 0x3911e
leaq 0x31a39(%rip), %rsi # 0x42026
movq %rbx, %rdi
callq 0x8a50
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x1062f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x1063c
movl 0xc(%rsp), %eax
movl %eax, 0x2c(%rbx)
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
movq 0x8(%rax), %rdx
leaq 0x58(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x31ac2(%rip), %rsi # 0x42121
callq 0x8a50
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x10687
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x10694
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x40(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x34(%rsp), %rsi
movl $0x43d, (%rsi) # imm = 0x43D
leaq 0xb8(%rsp), %rdi
callq 0x31e77
leaq 0xf8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0x31dcf
leaq 0x3302f(%rip), %rsi # 0x43714
leaq 0xf8(%rsp), %rdi
callq 0x8a50
leaq 0x88(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x10717
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x10727
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
movq 0x8(%rax), %rdx
leaq 0x78(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x31b69(%rip), %rsi # 0x422b3
callq 0x8a50
leaq 0xa8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x10773
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x10786
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
movq 0x8(%rax), %rdx
leaq 0x98(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x31b92(%rip), %rsi # 0x4233e
callq 0x8a50
leaq 0x20(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x107d6
movups (%rcx), %xmm0
leaq 0x20(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x107e3
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0xf01b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x10828
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x10828
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1084a
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x1084a
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x10869
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x10869
movq %rax, %rbx
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1088f
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x1088f
movq %rax, %rbx
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x108b5
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x108b5
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x108d1
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x108d1
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x108ed
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x108ed
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1090a
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rdi
callq 0x8990
| _ZN7testing8internal16ForkingDeathTest4WaitEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 118h
xor eax, eax
cmp byte ptr [rdi+28h], 1
jnz loc_1061D
mov rbx, rdi
call _ZN7testing8internal13DeathTestImpl26ReadAndInterpretStatusByteEv; testing::internal::DeathTestImpl::ReadAndInterpretStatusByte(void)
lea r14, [rsp+148h+var_13C]
loc_105A0:
mov edi, [rbx+3Ch]
mov rsi, r14
xor edx, edx
call _waitpid
cmp eax, 0FFFFFFFFh
jnz short loc_10616
call ___errno_location
cmp dword ptr [rax], 4
jz short loc_105A0
lea r14, [rsp+148h+var_60]
mov [r14-10h], r14
lea rsi, aCheckFailedFil; "CHECK failed: File "
lea rdx, aCheckFailedFil+13h; ""
lea rbx, [rsp+148h+var_70]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r15, [rsp+148h+var_E0]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_1062F
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
jmp short loc_1063C
loc_10616:
mov eax, [rsp+148h+var_13C]
mov [rbx+2Ch], eax
loc_1061D:
add rsp, 118h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1062F:
mov [rsp+148h+var_F0], rdx
mov rdx, [rcx]
mov [rsp+148h+var_E0], rdx
loc_1063C:
mov rdx, [rax+8]
lea rdi, [rsp+148h+var_F0]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aLine; ", line "
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r12, [rsp+148h+var_100]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_10687
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
jmp short loc_10694
loc_10687:
mov [rsp+148h+var_110], rdx
mov rdx, [rcx]
mov [rsp+148h+var_100], rdx
loc_10694:
mov rdx, [rax+8]
mov [rsp+148h+var_108], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, [rsp+148h+var_114]
mov dword ptr [rsi], 43Dh
lea rdi, [rsp+148h+var_90]
call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&)
lea rdi, [rsp+148h+var_50]
lea rsi, [rsp+148h+var_110]
lea rdx, [rsp+148h+var_90]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rsi, asc_43713+1; ": "
lea rdi, [rsp+148h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r13, [rsp+148h+var_C0]
mov [r13-10h], r13
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_10717
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r13+0], xmm0
jmp short loc_10727
loc_10717:
mov [rsp+148h+var_D0], rdx
mov rdx, [rcx]
mov [rsp+148h+var_C0], rdx
loc_10727:
mov rdx, [rax+8]
lea rdi, [rsp+148h+var_D0]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aWaitpidChildPi; "waitpid(child_pid_, &status_value, 0)"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rbp, [rsp+148h+var_A0]
mov [rbp-10h], rbp
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_10773
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbp+0], xmm0
jmp short loc_10786
loc_10773:
mov [rsp+148h+var_B0], rdx
mov rdx, [rcx]
mov [rsp+148h+var_A0], rdx
loc_10786:
mov rdx, [rax+8]
lea rdi, [rsp+148h+var_B0]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aFcntlPipeFd1FS+1Dh; " != -1"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rcx, [rsp+148h+var_128]
mov [rcx-10h], rcx
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_107D6
movups xmm0, xmmword ptr [rcx]
lea rdx, [rsp+148h+var_128]
movups xmmword ptr [rdx], xmm0
jmp short loc_107E3
loc_107D6:
mov [rsp+148h+var_138], rdx
mov rdx, [rcx]
mov [rsp+148h+var_128], rdx
loc_107E3:
mov rdx, [rax+8]
lea rdi, [rsp+148h+var_138]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
call _ZN7testing8internalL14DeathTestAbortERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::DeathTestAbort(std::string const&)
mov rbx, rax
mov rdi, [rsp+148h+var_138]; void *
lea rax, [rsp+148h+var_128]
cmp rdi, rax
jz short loc_10828
mov rsi, [rsp+148h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_10828
mov rbx, rax
loc_10828:
mov rdi, [rsp+148h+var_B0]; void *
cmp rdi, rbp
jz short loc_1084A
mov rsi, [rsp+148h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1084A
mov rbx, rax
loc_1084A:
mov rdi, [rsp+148h+var_D0]; void *
cmp rdi, r13
jz short loc_10869
mov rsi, [rsp+148h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_10869
mov rbx, rax
loc_10869:
lea rax, [rsp+148h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1088F
mov rsi, [rsp+148h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1088F
mov rbx, rax
loc_1088F:
lea rax, [rsp+148h+var_80]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_108B5
mov rsi, [rsp+148h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_108B5
mov rbx, rax
loc_108B5:
mov rdi, [rsp+148h+var_110]; void *
cmp rdi, r12
jz short loc_108D1
mov rsi, [rsp+148h+var_100]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_108D1
mov rbx, rax
loc_108D1:
mov rdi, [rsp+148h+var_F0]; void *
cmp rdi, r15
jz short loc_108ED
mov rsi, [rsp+148h+var_E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_108ED
mov rbx, rax
loc_108ED:
mov rdi, [rsp+148h+var_70]; void *
cmp rdi, r14
jz short loc_1090A
mov rsi, [rsp+148h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1090A:
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::ForkingDeathTest::Wait(testing::internal::ForkingDeathTest *this)
{
long long result; // rax
long long v2; // rax
__int128 *v3; // rcx
long long v4; // rax
__int128 *v5; // rcx
long long v6; // rax
__int128 *v7; // rcx
long long v8; // rax
__int128 *v9; // rcx
long long v10; // rax
long long v11; // r8
long long v12; // r9
__int128 *v13; // rcx
long long v14; // rdx
long long v15; // rbx
char v16; // [rsp+0h] [rbp-148h]
unsigned int v17; // [rsp+Ch] [rbp-13Ch] BYREF
void *v18; // [rsp+10h] [rbp-138h] BYREF
long long v19; // [rsp+18h] [rbp-130h]
__int128 v20; // [rsp+20h] [rbp-128h] BYREF
int v21; // [rsp+34h] [rbp-114h] BYREF
void *v22[2]; // [rsp+38h] [rbp-110h] BYREF
__int128 v23; // [rsp+48h] [rbp-100h] BYREF
void *v24[2]; // [rsp+58h] [rbp-F0h] BYREF
__int128 v25; // [rsp+68h] [rbp-E0h] BYREF
void *v26[2]; // [rsp+78h] [rbp-D0h] BYREF
__int128 v27; // [rsp+88h] [rbp-C0h] BYREF
void *v28[2]; // [rsp+98h] [rbp-B0h] BYREF
__int128 v29; // [rsp+A8h] [rbp-A0h] BYREF
void *v30[2]; // [rsp+B8h] [rbp-90h] BYREF
long long v31; // [rsp+C8h] [rbp-80h] BYREF
void *v32[2]; // [rsp+D8h] [rbp-70h] BYREF
_QWORD v33[2]; // [rsp+E8h] [rbp-60h] BYREF
void *v34[2]; // [rsp+F8h] [rbp-50h] BYREF
long long v35; // [rsp+108h] [rbp-40h] BYREF
result = 0LL;
if ( *((_BYTE *)this + 40) == 1 )
{
testing::internal::DeathTestImpl::ReadAndInterpretStatusByte(this);
while ( (unsigned int)waitpid(*((unsigned int *)this + 15), &v17, 0LL) == -1 )
{
if ( *(_DWORD *)__errno_location() != 4 )
{
v32[0] = v33;
std::string::_M_construct<char const*>(v32, "CHECK failed: File ", "");
v2 = std::string::append(
v32,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/sr"
"c/gtest-death-test.cc");
v24[0] = &v25;
v3 = (__int128 *)(v2 + 16);
if ( *(_QWORD *)v2 == v2 + 16 )
{
v25 = *v3;
}
else
{
v24[0] = *(void **)v2;
*(_QWORD *)&v25 = *(_QWORD *)v3;
}
v24[1] = *(void **)(v2 + 8);
*(_QWORD *)v2 = v3;
*(_QWORD *)(v2 + 8) = 0LL;
*(_BYTE *)(v2 + 16) = 0;
v4 = std::string::append(v24, ", line ");
v22[0] = &v23;
v5 = (__int128 *)(v4 + 16);
if ( *(_QWORD *)v4 == v4 + 16 )
{
v23 = *v5;
}
else
{
v22[0] = *(void **)v4;
*(_QWORD *)&v23 = *(_QWORD *)v5;
}
v22[1] = *(void **)(v4 + 8);
*(_QWORD *)v4 = v5;
*(_QWORD *)(v4 + 8) = 0LL;
*(_BYTE *)(v4 + 16) = 0;
v21 = 1085;
testing::internal::StreamableToString<int>(v30, &v21);
std::operator+<char>(v34, v22, v30);
v6 = std::string::append(v34, ": ");
v26[0] = &v27;
v7 = (__int128 *)(v6 + 16);
if ( *(_QWORD *)v6 == v6 + 16 )
{
v27 = *v7;
}
else
{
v26[0] = *(void **)v6;
*(_QWORD *)&v27 = *(_QWORD *)v7;
}
v26[1] = *(void **)(v6 + 8);
*(_QWORD *)v6 = v7;
*(_QWORD *)(v6 + 8) = 0LL;
*(_BYTE *)(v6 + 16) = 0;
v8 = std::string::append(v26, "waitpid(child_pid_, &status_value, 0)");
v28[0] = &v29;
v9 = (__int128 *)(v8 + 16);
if ( *(_QWORD *)v8 == v8 + 16 )
{
v29 = *v9;
}
else
{
v28[0] = *(void **)v8;
*(_QWORD *)&v29 = *(_QWORD *)v9;
}
v28[1] = *(void **)(v8 + 8);
*(_QWORD *)v8 = v9;
*(_QWORD *)(v8 + 8) = 0LL;
*(_BYTE *)(v8 + 16) = 0;
v10 = std::string::append(v28, " != -1");
v18 = &v20;
v13 = (__int128 *)(v10 + 16);
if ( *(_QWORD *)v10 == v10 + 16 )
{
v20 = *v13;
}
else
{
v18 = *(void **)v10;
*(_QWORD *)&v20 = *(_QWORD *)v13;
}
v19 = *(_QWORD *)(v10 + 8);
v14 = v19;
*(_QWORD *)v10 = v13;
*(_QWORD *)(v10 + 8) = 0LL;
*(_BYTE *)(v10 + 16) = 0;
v15 = testing::internal::DeathTestAbort(
(testing::UnitTest *)&v18,
(long long)" != -1",
v14,
(long long)v13,
v11,
v12,
v16);
if ( v18 != &v20 )
operator delete(v18, v20 + 1);
if ( v28[0] != &v29 )
operator delete(v28[0], v29 + 1);
if ( v26[0] != &v27 )
operator delete(v26[0], v27 + 1);
if ( v34[0] != &v35 )
operator delete(v34[0], v35 + 1);
if ( v30[0] != &v31 )
operator delete(v30[0], v31 + 1);
if ( v22[0] != &v23 )
operator delete(v22[0], v23 + 1);
if ( v24[0] != &v25 )
operator delete(v24[0], v25 + 1);
if ( v32[0] != v33 )
operator delete(v32[0], v33[0] + 1LL);
_Unwind_Resume(v15);
}
}
result = v17;
*((_DWORD *)this + 11) = v17;
}
return result;
}
| Wait:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x118
XOR EAX,EAX
CMP byte ptr [RDI + 0x28],0x1
JNZ 0x0011061d
MOV RBX,RDI
CALL 0x0010f144
LEA R14,[RSP + 0xc]
LAB_001105a0:
MOV EDI,dword ptr [RBX + 0x3c]
MOV RSI,R14
XOR EDX,EDX
CALL 0x001083d0
CMP EAX,-0x1
JNZ 0x00110616
CALL 0x00108070
CMP dword ptr [RAX],0x4
JZ 0x001105a0
LEA R14,[RSP + 0xe8]
MOV qword ptr [R14 + -0x10],R14
LEA RSI,[0x14210d]
LEA RDX,[0x142120]
LEA RBX,[RSP + 0xd8]
MOV RDI,RBX
CALL 0x0013911e
LAB_001105e6:
LEA RSI,[0x142026]
MOV RDI,RBX
CALL 0x00108a50
LEA R15,[RSP + 0x68]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x0011062f
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
JMP 0x0011063c
LAB_00110616:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RBX + 0x2c],EAX
LAB_0011061d:
ADD RSP,0x118
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011062f:
MOV qword ptr [RSP + 0x58],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x68],RDX
LAB_0011063c:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x58]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_00110658:
LEA RSI,[0x142121]
CALL 0x00108a50
LEA R12,[RSP + 0x48]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x00110687
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
JMP 0x00110694
LAB_00110687:
MOV qword ptr [RSP + 0x38],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x48],RDX
LAB_00110694:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA RSI,[RSP + 0x34]
MOV dword ptr [RSI],0x43d
LAB_001106b7:
LEA RDI,[RSP + 0xb8]
CALL 0x00131e77
LAB_001106c4:
LEA RDI,[RSP + 0xf8]
LEA RSI,[RSP + 0x38]
LEA RDX,[RSP + 0xb8]
CALL 0x00131dcf
LAB_001106de:
LEA RSI,[0x143714]
LEA RDI,[RSP + 0xf8]
CALL 0x00108a50
LEA R13,[RSP + 0x88]
MOV qword ptr [R13 + -0x10],R13
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x00110717
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R13],XMM0
JMP 0x00110727
LAB_00110717:
MOV qword ptr [RSP + 0x78],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x88],RDX
LAB_00110727:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x78]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_00110743:
LEA RSI,[0x1422b3]
CALL 0x00108a50
LEA RBP,[RSP + 0xa8]
MOV qword ptr [RBP + -0x10],RBP
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x00110773
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RBP],XMM0
JMP 0x00110786
LAB_00110773:
MOV qword ptr [RSP + 0x98],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0xa8],RDX
LAB_00110786:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x98]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001107a5:
LEA RSI,[0x14233e]
CALL 0x00108a50
LEA RCX,[RSP + 0x20]
MOV qword ptr [RCX + -0x10],RCX
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x001107d6
MOVUPS XMM0,xmmword ptr [RCX]
LEA RDX,[RSP + 0x20]
MOVUPS xmmword ptr [RDX],XMM0
JMP 0x001107e3
LAB_001107d6:
MOV qword ptr [RSP + 0x10],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x20],RDX
LAB_001107e3:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001107ff:
CALL 0x0010f01b
LAB_00110804:
MOV RBX,RAX
MOV RDI,qword ptr [RSP + 0x10]
LEA RAX,[RSP + 0x20]
CMP RDI,RAX
JZ 0x00110828
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001084e0
JMP 0x00110828
LAB_00110828:
MOV RDI,qword ptr [RSP + 0x98]
CMP RDI,RBP
JZ 0x0011084a
MOV RSI,qword ptr [RSP + 0xa8]
INC RSI
CALL 0x001084e0
JMP 0x0011084a
LAB_0011084a:
MOV RDI,qword ptr [RSP + 0x78]
CMP RDI,R13
JZ 0x00110869
MOV RSI,qword ptr [RSP + 0x88]
INC RSI
CALL 0x001084e0
JMP 0x00110869
LAB_00110869:
LEA RAX,[RSP + 0x108]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011088f
MOV RSI,qword ptr [RSP + 0x108]
INC RSI
CALL 0x001084e0
JMP 0x0011088f
LAB_0011088f:
LEA RAX,[RSP + 0xc8]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001108b5
MOV RSI,qword ptr [RSP + 0xc8]
INC RSI
CALL 0x001084e0
JMP 0x001108b5
LAB_001108b5:
MOV RDI,qword ptr [RSP + 0x38]
CMP RDI,R12
JZ 0x001108d1
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001084e0
JMP 0x001108d1
LAB_001108d1:
MOV RDI,qword ptr [RSP + 0x58]
CMP RDI,R15
JZ 0x001108ed
MOV RSI,qword ptr [RSP + 0x68]
INC RSI
CALL 0x001084e0
JMP 0x001108ed
LAB_001108ed:
MOV RDI,qword ptr [RSP + 0xd8]
CMP RDI,R14
JZ 0x0011090a
MOV RSI,qword ptr [RSP + 0xe8]
INC RSI
CALL 0x001084e0
LAB_0011090a:
MOV RDI,RBX
CALL 0x00108990
|
/* testing::internal::ForkingDeathTest::Wait() */
int __thiscall testing::internal::ForkingDeathTest::Wait(ForkingDeathTest *this)
{
__pid_t _Var1;
int iVar2;
int *piVar3;
long *plVar4;
int8 uVar5;
long *plVar6;
int local_13c;
long *local_138;
long local_130;
long local_128;
long lStack_120;
int local_114;
long *local_110;
long local_108;
long local_100;
long lStack_f8;
long *local_f0;
long local_e8;
long local_e0;
long lStack_d8;
long *local_d0;
long local_c8;
long local_c0;
long lStack_b8;
long *local_b0;
long local_a8;
long local_a0;
long lStack_98;
long *local_90 [2];
long local_80 [2];
long *local_70 [2];
long local_60 [2];
long *local_50 [2];
long local_40 [2];
iVar2 = 0;
if (this[0x28] == (ForkingDeathTest)0x1) {
DeathTestImpl::ReadAndInterpretStatusByte((DeathTestImpl *)this);
while( true ) {
_Var1 = waitpid(*(__pid_t *)(this + 0x3c),&local_13c,0);
if (_Var1 != -1) break;
piVar3 = __errno_location();
if (*piVar3 != 4) {
local_70[0] = local_60;
std::__cxx11::string::_M_construct<char_const*>(local_70,"CHECK failed: File ","");
/* try { // try from 001105e6 to 001105f4 has its CatchHandler @ 001108ea */
plVar4 = (long *)std::__cxx11::string::append((char *)local_70);
local_f0 = (long *)*plVar4;
plVar6 = plVar4 + 2;
if (local_f0 == plVar6) {
local_e0 = *plVar6;
lStack_d8 = plVar4[3];
local_f0 = &local_e0;
}
else {
local_e0 = *plVar6;
}
local_e8 = plVar4[1];
*plVar4 = (long)plVar6;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
/* try { // try from 00110658 to 00110663 has its CatchHandler @ 001108ce */
plVar4 = (long *)std::__cxx11::string::append((char *)&local_f0);
local_110 = (long *)*plVar4;
plVar6 = plVar4 + 2;
if (local_110 == plVar6) {
local_100 = *plVar6;
lStack_f8 = plVar4[3];
local_110 = &local_100;
}
else {
local_100 = *plVar6;
}
local_108 = plVar4[1];
*plVar4 = (long)plVar6;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
local_114 = 0x43d;
/* try { // try from 001106b7 to 001106c3 has its CatchHandler @ 001108b2 */
StreamableToString<int>((internal *)local_90,&local_114);
/* try { // try from 001106c4 to 001106dd has its CatchHandler @ 0011088c */
std::operator+((string *)local_50,(string *)&local_110);
/* try { // try from 001106de to 001106f1 has its CatchHandler @ 00110866 */
plVar4 = (long *)std::__cxx11::string::append((char *)local_50);
local_d0 = (long *)*plVar4;
plVar6 = plVar4 + 2;
if (local_d0 == plVar6) {
local_c0 = *plVar6;
lStack_b8 = plVar4[3];
local_d0 = &local_c0;
}
else {
local_c0 = *plVar6;
}
local_c8 = plVar4[1];
*plVar4 = (long)plVar6;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
/* try { // try from 00110743 to 0011074e has its CatchHandler @ 00110847 */
plVar4 = (long *)std::__cxx11::string::append((char *)&local_d0);
local_b0 = (long *)*plVar4;
plVar6 = plVar4 + 2;
if (local_b0 == plVar6) {
local_a0 = *plVar6;
lStack_98 = plVar4[3];
local_b0 = &local_a0;
}
else {
local_a0 = *plVar6;
}
local_a8 = plVar4[1];
*plVar4 = (long)plVar6;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
/* try { // try from 001107a5 to 001107b0 has its CatchHandler @ 00110825 */
plVar4 = (long *)std::__cxx11::string::append((char *)&local_b0);
local_138 = (long *)*plVar4;
plVar6 = plVar4 + 2;
if (local_138 == plVar6) {
local_128 = *plVar6;
lStack_120 = plVar4[3];
local_138 = &local_128;
}
else {
local_128 = *plVar6;
}
local_130 = plVar4[1];
*plVar4 = (long)plVar6;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
/* try { // try from 001107ff to 00110803 has its CatchHandler @ 00110804 */
uVar5 = DeathTestAbort((string *)&local_138);
/* catch() { ... } // from try @ 001107ff with catch @ 00110804 */
if (local_138 != &local_128) {
operator_delete(local_138,local_128 + 1);
}
if (local_b0 != &local_a0) {
operator_delete(local_b0,local_a0 + 1);
}
if (local_d0 != &local_c0) {
operator_delete(local_d0,local_c0 + 1);
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
if (local_90[0] != local_80) {
operator_delete(local_90[0],local_80[0] + 1);
}
if (local_110 != &local_100) {
operator_delete(local_110,local_100 + 1);
}
if (local_f0 != &local_e0) {
operator_delete(local_f0,local_e0 + 1);
}
if (local_70[0] != local_60) {
operator_delete(local_70[0],local_60[0] + 1);
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar5);
}
}
*(int *)(this + 0x2c) = local_13c;
iVar2 = local_13c;
}
return iVar2;
}
| |
42,391 | ScanDirectoryFiles | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | static void ScanDirectoryFiles(const char *basePath, FilePathList *files, const char *filter)
{
static char path[MAX_FILEPATH_LENGTH] = { 0 };
memset(path, 0, MAX_FILEPATH_LENGTH);
struct dirent *dp = NULL;
DIR *dir = opendir(basePath);
if (dir != NULL)
{
while ((dp = readdir(dir)) != NULL)
{
if ((strcmp(dp->d_name, ".") != 0) &&
(strcmp(dp->d_name, "..") != 0))
{
#if defined(_WIN32)
sprintf(path, "%s\\%s", basePath, dp->d_name);
#else
sprintf(path, "%s/%s", basePath, dp->d_name);
#endif
if (filter != NULL)
{
if (IsPathFile(path))
{
if (IsFileExtension(path, filter))
{
strcpy(files->paths[files->count], path);
files->count++;
}
}
else
{
if (TextFindIndex(filter, DIRECTORY_FILTER_TAG) >= 0)
{
strcpy(files->paths[files->count], path);
files->count++;
}
}
}
else
{
strcpy(files->paths[files->count], path);
files->count++;
}
}
}
closedir(dir);
}
else TRACELOG(LOG_WARNING, "FILEIO: Directory cannot be opened (%s)", basePath);
} | O0 | c | ScanDirectoryFiles:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x14e175(%rip), %rdi # 0x21f9c0
xorl %esi, %esi
movl $0x1000, %edx # imm = 0x1000
callq 0xa2d0
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa810
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xd19cf
jmp 0xd1879
movq -0x28(%rbp), %rdi
callq 0xa860
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xd19c4
movq -0x20(%rbp), %rdi
addq $0x13, %rdi
leaq 0xecc57(%rip), %rsi # 0x1be4f6
callq 0xa750
cmpl $0x0, %eax
je 0xd19bf
movq -0x20(%rbp), %rdi
addq $0x13, %rdi
leaq 0xecc39(%rip), %rsi # 0x1be4f5
callq 0xa750
cmpl $0x0, %eax
je 0xd19bf
movq -0x8(%rbp), %rdx
movq -0x20(%rbp), %rcx
addq $0x13, %rcx
leaq 0x14e0e3(%rip), %rdi # 0x21f9c0
leaq 0xe4333(%rip), %rsi # 0x1b5c17
movb $0x0, %al
callq 0xa0f0
cmpq $0x0, -0x18(%rbp)
je 0xd1991
leaq 0x14e0c3(%rip), %rdi # 0x21f9c0
callq 0xd1f50
testb $0x1, %al
jne 0xd1908
jmp 0xd194c
movq -0x18(%rbp), %rsi
leaq 0x14e0ad(%rip), %rdi # 0x21f9c0
callq 0xd10c0
testb $0x1, %al
jne 0xd191e
jmp 0xd194a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %ecx
movq (%rax,%rcx,8), %rdi
leaq 0x14e088(%rip), %rsi # 0x21f9c0
callq 0xa4a0
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0xd198f
movq -0x18(%rbp), %rdi
leaq 0xeada5(%rip), %rsi # 0x1bc6fc
callq 0xe7460
cmpl $0x0, %eax
jl 0xd198d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %ecx
movq (%rax,%rcx,8), %rdi
leaq 0x14e045(%rip), %rsi # 0x21f9c0
callq 0xa4a0
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0xd198f
jmp 0xd19bd
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %ecx
movq (%rax,%rcx,8), %rdi
leaq 0x14e015(%rip), %rsi # 0x21f9c0
callq 0xa4a0
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0xd19bf
jmp 0xd1879
movq -0x28(%rbp), %rdi
callq 0xa910
jmp 0xd19e6
movq -0x8(%rbp), %rdx
movl $0x4, %edi
leaq 0xead21(%rip), %rsi # 0x1bc700
movb $0x0, %al
callq 0x182c40
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| ScanDirectoryFiles:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rdi, ScanDirectoryFiles_path
xor esi, esi
mov edx, 1000h
call _memset
mov [rbp+var_20], 0
mov rdi, [rbp+var_8]
call _opendir
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jz loc_D19CF
jmp short $+2
loc_D1879:
mov rdi, [rbp+var_28]
call _readdir
mov [rbp+var_20], rax
cmp rax, 0
jz loc_D19C4
mov rdi, [rbp+var_20]
add rdi, 13h
lea rsi, asc_1BE4F4+2; "."
call _strcmp
cmp eax, 0
jz loc_D19BF
mov rdi, [rbp+var_20]
add rdi, 13h
lea rsi, asc_1BE4F4+1; ".."
call _strcmp
cmp eax, 0
jz loc_D19BF
mov rdx, [rbp+var_8]
mov rcx, [rbp+var_20]
add rcx, 13h
lea rdi, ScanDirectoryFiles_path
lea rsi, aSS_0; "%s/%s"
mov al, 0
call _sprintf
cmp [rbp+var_18], 0
jz loc_D1991
lea rdi, ScanDirectoryFiles_path
call IsPathFile
test al, 1
jnz short loc_D1908
jmp short loc_D194C
loc_D1908:
mov rsi, [rbp+var_18]
lea rdi, ScanDirectoryFiles_path
call IsFileExtension
test al, 1
jnz short loc_D191E
jmp short loc_D194A
loc_D191E:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov ecx, [rcx+4]
mov rdi, [rax+rcx*8]
lea rsi, ScanDirectoryFiles_path
call _strcpy
mov rax, [rbp+var_10]
mov ecx, [rax+4]
add ecx, 1
mov [rax+4], ecx
loc_D194A:
jmp short loc_D198F
loc_D194C:
mov rdi, [rbp+var_18]
lea rsi, aDir; "DIR"
call TextFindIndex
cmp eax, 0
jl short loc_D198D
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov ecx, [rcx+4]
mov rdi, [rax+rcx*8]
lea rsi, ScanDirectoryFiles_path
call _strcpy
mov rax, [rbp+var_10]
mov ecx, [rax+4]
add ecx, 1
mov [rax+4], ecx
loc_D198D:
jmp short $+2
loc_D198F:
jmp short loc_D19BD
loc_D1991:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov ecx, [rcx+4]
mov rdi, [rax+rcx*8]
lea rsi, ScanDirectoryFiles_path
call _strcpy
mov rax, [rbp+var_10]
mov ecx, [rax+4]
add ecx, 1
mov [rax+4], ecx
loc_D19BD:
jmp short $+2
loc_D19BF:
jmp loc_D1879
loc_D19C4:
mov rdi, [rbp+var_28]
call _closedir
jmp short loc_D19E6
loc_D19CF:
mov rdx, [rbp+var_8]
mov edi, 4
lea rsi, aFileioDirector; "FILEIO: Directory cannot be opened (%s)"
mov al, 0
call TraceLog
loc_D19E6:
add rsp, 30h
pop rbp
retn
| long long ScanDirectoryFiles(const char *a1, long long a2, long long a3)
{
int v3; // ecx
int v4; // r8d
int v5; // r9d
long long v7; // [rsp+8h] [rbp-28h]
long long v8; // [rsp+10h] [rbp-20h]
memset(&ScanDirectoryFiles_path, 0LL, 4096LL);
v7 = opendir(a1);
if ( !v7 )
return TraceLog(4, (unsigned int)"FILEIO: Directory cannot be opened (%s)", (_DWORD)a1, v3, v4, v5);
while ( 1 )
{
v8 = readdir(v7);
if ( !v8 )
break;
if ( (unsigned int)strcmp(v8 + 19, ".") && (unsigned int)strcmp(v8 + 19, "..") )
{
sprintf(&ScanDirectoryFiles_path, "%s/%s", a1, (const char *)(v8 + 19));
if ( a3 )
{
if ( (IsPathFile(&ScanDirectoryFiles_path) & 1) != 0 )
{
if ( (IsFileExtension((long long)&ScanDirectoryFiles_path, a3) & 1) != 0 )
{
strcpy(*(_QWORD *)(*(_QWORD *)(a2 + 8) + 8LL * *(unsigned int *)(a2 + 4)), &ScanDirectoryFiles_path);
++*(_DWORD *)(a2 + 4);
}
}
else if ( (int)TextFindIndex(a3, "DIR") >= 0 )
{
strcpy(*(_QWORD *)(*(_QWORD *)(a2 + 8) + 8LL * *(unsigned int *)(a2 + 4)), &ScanDirectoryFiles_path);
++*(_DWORD *)(a2 + 4);
}
}
else
{
strcpy(*(_QWORD *)(*(_QWORD *)(a2 + 8) + 8LL * *(unsigned int *)(a2 + 4)), &ScanDirectoryFiles_path);
++*(_DWORD *)(a2 + 4);
}
}
}
return closedir(v7);
}
| ScanDirectoryFiles:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RDI,[0x31f9c0]
XOR ESI,ESI
MOV EDX,0x1000
CALL 0x0010a2d0
MOV qword ptr [RBP + -0x20],0x0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0010a810
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001d19cf
JMP 0x001d1879
LAB_001d1879:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0010a860
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x001d19c4
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x13
LEA RSI,[0x2be4f6]
CALL 0x0010a750
CMP EAX,0x0
JZ 0x001d19bf
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x13
LEA RSI,[0x2be4f5]
CALL 0x0010a750
CMP EAX,0x0
JZ 0x001d19bf
MOV RDX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x13
LEA RDI,[0x31f9c0]
LEA RSI,[0x2b5c17]
MOV AL,0x0
CALL 0x0010a0f0
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001d1991
LEA RDI,[0x31f9c0]
CALL 0x001d1f50
TEST AL,0x1
JNZ 0x001d1908
JMP 0x001d194c
LAB_001d1908:
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x31f9c0]
CALL 0x001d10c0
TEST AL,0x1
JNZ 0x001d191e
JMP 0x001d194a
LAB_001d191e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x4]
MOV RDI,qword ptr [RAX + RCX*0x8]
LEA RSI,[0x31f9c0]
CALL 0x0010a4a0
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x4]
ADD ECX,0x1
MOV dword ptr [RAX + 0x4],ECX
LAB_001d194a:
JMP 0x001d198f
LAB_001d194c:
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[0x2bc6fc]
CALL 0x001e7460
CMP EAX,0x0
JL 0x001d198d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x4]
MOV RDI,qword ptr [RAX + RCX*0x8]
LEA RSI,[0x31f9c0]
CALL 0x0010a4a0
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x4]
ADD ECX,0x1
MOV dword ptr [RAX + 0x4],ECX
LAB_001d198d:
JMP 0x001d198f
LAB_001d198f:
JMP 0x001d19bd
LAB_001d1991:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x4]
MOV RDI,qword ptr [RAX + RCX*0x8]
LEA RSI,[0x31f9c0]
CALL 0x0010a4a0
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x4]
ADD ECX,0x1
MOV dword ptr [RAX + 0x4],ECX
LAB_001d19bd:
JMP 0x001d19bf
LAB_001d19bf:
JMP 0x001d1879
LAB_001d19c4:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0010a910
JMP 0x001d19e6
LAB_001d19cf:
MOV RDX,qword ptr [RBP + -0x8]
MOV EDI,0x4
LEA RSI,[0x2bc700]
MOV AL,0x0
CALL 0x00282c40
LAB_001d19e6:
ADD RSP,0x30
POP RBP
RET
|
void ScanDirectoryFiles(char *param_1,long param_2,long param_3)
{
int iVar1;
DIR *__dirp;
dirent *pdVar2;
ulong uVar3;
memset(ScanDirectoryFiles_path,0,0x1000);
__dirp = opendir(param_1);
if (__dirp == (DIR *)0x0) {
TraceLog(4,"FILEIO: Directory cannot be opened (%s)",param_1);
}
else {
while (pdVar2 = readdir(__dirp), pdVar2 != (dirent *)0x0) {
iVar1 = strcmp(pdVar2->d_name,".");
if ((iVar1 != 0) && (iVar1 = strcmp(pdVar2->d_name,".."), iVar1 != 0)) {
sprintf(ScanDirectoryFiles_path,"%s/%s",param_1,pdVar2->d_name);
if (param_3 == 0) {
strcpy(*(char **)(*(long *)(param_2 + 8) + (ulong)*(uint *)(param_2 + 4) * 8),
ScanDirectoryFiles_path);
*(int *)(param_2 + 4) = *(int *)(param_2 + 4) + 1;
}
else {
uVar3 = IsPathFile(ScanDirectoryFiles_path);
if ((uVar3 & 1) == 0) {
iVar1 = TextFindIndex(param_3,&DAT_002bc6fc);
if (-1 < iVar1) {
strcpy(*(char **)(*(long *)(param_2 + 8) + (ulong)*(uint *)(param_2 + 4) * 8),
ScanDirectoryFiles_path);
*(int *)(param_2 + 4) = *(int *)(param_2 + 4) + 1;
}
}
else {
uVar3 = IsFileExtension(ScanDirectoryFiles_path,param_3);
if ((uVar3 & 1) != 0) {
strcpy(*(char **)(*(long *)(param_2 + 8) + (ulong)*(uint *)(param_2 + 4) * 8),
ScanDirectoryFiles_path);
*(int *)(param_2 + 4) = *(int *)(param_2 + 4) + 1;
}
}
}
}
}
closedir(__dirp);
}
return;
}
| |
42,392 | ScanDirectoryFiles | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | static void ScanDirectoryFiles(const char *basePath, FilePathList *files, const char *filter)
{
static char path[MAX_FILEPATH_LENGTH] = { 0 };
memset(path, 0, MAX_FILEPATH_LENGTH);
struct dirent *dp = NULL;
DIR *dir = opendir(basePath);
if (dir != NULL)
{
while ((dp = readdir(dir)) != NULL)
{
if ((strcmp(dp->d_name, ".") != 0) &&
(strcmp(dp->d_name, "..") != 0))
{
#if defined(_WIN32)
sprintf(path, "%s\\%s", basePath, dp->d_name);
#else
sprintf(path, "%s/%s", basePath, dp->d_name);
#endif
if (filter != NULL)
{
if (IsPathFile(path))
{
if (IsFileExtension(path, filter))
{
strcpy(files->paths[files->count], path);
files->count++;
}
}
else
{
if (TextFindIndex(filter, DIRECTORY_FILTER_TAG) >= 0)
{
strcpy(files->paths[files->count], path);
files->count++;
}
}
}
else
{
strcpy(files->paths[files->count], path);
files->count++;
}
}
}
closedir(dir);
}
else TRACELOG(LOG_WARNING, "FILEIO: Directory cannot be opened (%s)", basePath);
} | O2 | c | ScanDirectoryFiles:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xc8e4b(%rip), %rdi # 0x12c920
movl $0x1000, %edx # imm = 0x1000
xorl %esi, %esi
callq 0x92c0
movq %rbx, %rdi
callq 0x9800
testq %rax, %rax
je 0x63bab
movq %rax, %r12
leaq 0xc8e24(%rip), %r13 # 0x12c920
leaq 0x62808(%rip), %rbp # 0xc630b
movq %r12, %rdi
callq 0x9850
testq %rax, %rax
je 0x63b95
cmpb $0x2e, 0x13(%rax)
jne 0x63b2c
cmpb $0x0, 0x14(%rax)
je 0x63b03
cmpb $0x2e, 0x14(%rax)
jne 0x63b2c
cmpb $0x0, 0x15(%rax)
je 0x63b03
addq $0x13, %rax
movq %r13, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x90d0
testq %r14, %r14
je 0x63b78
movq %r13, %rdi
callq 0x63f36
testb %al, %al
je 0x63b65
movq %r13, %rdi
movq %r14, %rsi
callq 0x63627
testb %al, %al
je 0x63b03
jmp 0x63b78
movq %r14, %rdi
leaq 0x69261(%rip), %rsi # 0xccdd0
callq 0x7289e
testl %eax, %eax
js 0x63b03
movq 0x8(%r15), %rax
movl 0x4(%r15), %ecx
movq (%rax,%rcx,8), %rdi
movq %r13, %rsi
callq 0x94a0
incl 0x4(%r15)
jmp 0x63b03
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x98f0
leaq 0x69222(%rip), %rsi # 0xccdd4
pushq $0x4
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa128b
| ScanDirectoryFiles:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea rdi, ScanDirectoryFiles_path
mov edx, 1000h
xor esi, esi
call _memset
mov rdi, rbx
call _opendir
test rax, rax
jz loc_63BAB
mov r12, rax
lea r13, ScanDirectoryFiles_path
lea rbp, aSS_0; "%s/%s"
loc_63B03:
mov rdi, r12
call _readdir
test rax, rax
jz loc_63B95
cmp byte ptr [rax+13h], 2Eh ; '.'
jnz short loc_63B2C
cmp byte ptr [rax+14h], 0
jz short loc_63B03
cmp byte ptr [rax+14h], 2Eh ; '.'
jnz short loc_63B2C
cmp byte ptr [rax+15h], 0
jz short loc_63B03
loc_63B2C:
add rax, 13h
mov rdi, r13
mov rsi, rbp
mov rdx, rbx
mov rcx, rax
xor eax, eax
call _sprintf
test r14, r14
jz short loc_63B78
mov rdi, r13
call IsPathFile
test al, al
jz short loc_63B65
mov rdi, r13
mov rsi, r14
call IsFileExtension
test al, al
jz short loc_63B03
jmp short loc_63B78
loc_63B65:
mov rdi, r14
lea rsi, aDir; "DIR"
call TextFindIndex
test eax, eax
js short loc_63B03
loc_63B78:
mov rax, [r15+8]
mov ecx, [r15+4]
mov rdi, [rax+rcx*8]
mov rsi, r13
call _strcpy
inc dword ptr [r15+4]
jmp loc_63B03
loc_63B95:
mov rdi, r12
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _closedir
loc_63BAB:
lea rsi, aFileioDirector; "FILEIO: Directory cannot be opened (%s)"
push 4
pop rdi
mov rdx, rbx
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp TraceLog
| long long ScanDirectoryFiles(const char *a1, long long a2, long long a3)
{
long long v4; // rax
int v5; // ecx
int v6; // r8d
int v7; // r9d
long long v8; // r12
long long v9; // rax
memset(&ScanDirectoryFiles_path, 0LL, 4096LL);
v4 = opendir(a1);
if ( v4 )
{
v8 = v4;
while ( 1 )
{
do
{
v9 = readdir(v8);
if ( !v9 )
return closedir(v8);
}
while ( *(_BYTE *)(v9 + 19) == 46 && (!*(_BYTE *)(v9 + 20) || *(_BYTE *)(v9 + 20) == 46 && !*(_BYTE *)(v9 + 21)) );
sprintf(&ScanDirectoryFiles_path, "%s/%s", a1, (const char *)(v9 + 19));
if ( a3 )
{
if ( (unsigned __int8)IsPathFile(&ScanDirectoryFiles_path) )
{
if ( (unsigned __int8)IsFileExtension((long long)&ScanDirectoryFiles_path, a3) )
goto LABEL_13;
}
else if ( (int)TextFindIndex(a3, "DIR") >= 0 )
{
goto LABEL_13;
}
}
else
{
LABEL_13:
strcpy(*(_QWORD *)(*(_QWORD *)(a2 + 8) + 8LL * *(unsigned int *)(a2 + 4)), &ScanDirectoryFiles_path);
++*(_DWORD *)(a2 + 4);
}
}
}
return TraceLog(4, (unsigned int)"FILEIO: Directory cannot be opened (%s)", (_DWORD)a1, v5, v6, v7);
}
| ScanDirectoryFiles:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA RDI,[0x22c920]
MOV EDX,0x1000
XOR ESI,ESI
CALL 0x001092c0
MOV RDI,RBX
CALL 0x00109800
TEST RAX,RAX
JZ 0x00163bab
MOV R12,RAX
LEA R13,[0x22c920]
LEA RBP,[0x1c630b]
LAB_00163b03:
MOV RDI,R12
CALL 0x00109850
TEST RAX,RAX
JZ 0x00163b95
CMP byte ptr [RAX + 0x13],0x2e
JNZ 0x00163b2c
CMP byte ptr [RAX + 0x14],0x0
JZ 0x00163b03
CMP byte ptr [RAX + 0x14],0x2e
JNZ 0x00163b2c
CMP byte ptr [RAX + 0x15],0x0
JZ 0x00163b03
LAB_00163b2c:
ADD RAX,0x13
MOV RDI,R13
MOV RSI,RBP
MOV RDX,RBX
MOV RCX,RAX
XOR EAX,EAX
CALL 0x001090d0
TEST R14,R14
JZ 0x00163b78
MOV RDI,R13
CALL 0x00163f36
TEST AL,AL
JZ 0x00163b65
MOV RDI,R13
MOV RSI,R14
CALL 0x00163627
TEST AL,AL
JZ 0x00163b03
JMP 0x00163b78
LAB_00163b65:
MOV RDI,R14
LEA RSI,[0x1ccdd0]
CALL 0x0017289e
TEST EAX,EAX
JS 0x00163b03
LAB_00163b78:
MOV RAX,qword ptr [R15 + 0x8]
MOV ECX,dword ptr [R15 + 0x4]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RSI,R13
CALL 0x001094a0
INC dword ptr [R15 + 0x4]
JMP 0x00163b03
LAB_00163b95:
MOV RDI,R12
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001098f0
LAB_00163bab:
LEA RSI,[0x1ccdd4]
PUSH 0x4
POP RDI
MOV RDX,RBX
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001a128b
|
void ScanDirectoryFiles(char *param_1,long param_2,long param_3)
{
char cVar1;
int iVar2;
DIR *__dirp;
dirent *pdVar3;
memset(ScanDirectoryFiles_path,0,0x1000);
__dirp = opendir(param_1);
if (__dirp == (DIR *)0x0) {
TraceLog(4,"FILEIO: Directory cannot be opened (%s)",param_1);
return;
}
LAB_00163b03:
while( true ) {
do {
pdVar3 = readdir(__dirp);
if (pdVar3 == (dirent *)0x0) {
closedir(__dirp);
return;
}
} while ((pdVar3->d_name[0] == '.') &&
((pdVar3->d_name[1] == '\0' ||
((pdVar3->d_name[1] == '.' && (pdVar3->d_name[2] == '\0'))))));
sprintf(ScanDirectoryFiles_path,"%s/%s",param_1,pdVar3->d_name);
if (param_3 == 0) break;
cVar1 = IsPathFile(ScanDirectoryFiles_path);
if (cVar1 == '\0') goto LAB_00163b65;
cVar1 = IsFileExtension(ScanDirectoryFiles_path,param_3);
if (cVar1 != '\0') break;
}
goto LAB_00163b78;
LAB_00163b65:
iVar2 = TextFindIndex(param_3,&DAT_001ccdd0);
if (-1 < iVar2) {
LAB_00163b78:
strcpy(*(char **)(*(long *)(param_2 + 8) + (ulong)*(uint *)(param_2 + 4) * 8),
ScanDirectoryFiles_path);
*(int *)(param_2 + 4) = *(int *)(param_2 + 4) + 1;
}
goto LAB_00163b03;
}
| |
42,393 | ScanDirectoryFiles | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | static void ScanDirectoryFiles(const char *basePath, FilePathList *files, const char *filter)
{
static char path[MAX_FILEPATH_LENGTH] = { 0 };
memset(path, 0, MAX_FILEPATH_LENGTH);
struct dirent *dp = NULL;
DIR *dir = opendir(basePath);
if (dir != NULL)
{
while ((dp = readdir(dir)) != NULL)
{
if ((strcmp(dp->d_name, ".") != 0) &&
(strcmp(dp->d_name, "..") != 0))
{
#if defined(_WIN32)
sprintf(path, "%s\\%s", basePath, dp->d_name);
#else
sprintf(path, "%s/%s", basePath, dp->d_name);
#endif
if (filter != NULL)
{
if (IsPathFile(path))
{
if (IsFileExtension(path, filter))
{
strcpy(files->paths[files->count], path);
files->count++;
}
}
else
{
if (TextFindIndex(filter, DIRECTORY_FILTER_TAG) >= 0)
{
strcpy(files->paths[files->count], path);
files->count++;
}
}
}
else
{
strcpy(files->paths[files->count], path);
files->count++;
}
}
}
closedir(dir);
}
else TRACELOG(LOG_WARNING, "FILEIO: Directory cannot be opened (%s)", basePath);
} | O3 | c | ScanDirectoryFiles:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xca8a6(%rip), %rdi # 0x140900
movl $0x1000, %edx # imm = 0x1000
xorl %esi, %esi
callq 0xa2d0
movq %rbx, %rdi
callq 0xa810
testq %rax, %rax
je 0x76169
movq %rax, %r12
movq %rax, %rdi
callq 0xa860
testq %rax, %rax
je 0x76150
leaq 0xca86e(%rip), %r13 # 0x140900
leaq 0x8(%rsp), %rbp
cmpb $0x2e, 0x13(%rax)
jne 0x760b7
cmpb $0x0, 0x14(%rax)
je 0x7613f
cmpb $0x2e, 0x14(%rax)
jne 0x760b7
cmpb $0x0, 0x15(%rax)
je 0x7613f
addq $0x13, %rax
movq %r13, %rdi
leaq 0x6a0be(%rip), %rsi # 0xe0183
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xa0e0
testq %r14, %r14
je 0x76127
movl $0x90, %edx
movq %rbp, %rdi
xorl %esi, %esi
callq 0xa2d0
movq %r13, %rdi
movq %rbp, %rsi
callq 0xa480
movl 0x20(%rsp), %eax
movl $0xf000, %ecx # imm = 0xF000
andl %ecx, %eax
cmpl $0x8000, %eax # imm = 0x8000
jne 0x76114
movq %r13, %rdi
movq %r14, %rsi
callq 0x75b52
testb %al, %al
jne 0x76127
jmp 0x7613f
movq %r14, %rdi
leaq 0x70b2a(%rip), %rsi # 0xe6c48
callq 0x85e78
testl %eax, %eax
js 0x7613f
movq 0x8(%r15), %rax
movl 0x4(%r15), %ecx
movq (%rax,%rcx,8), %rdi
movq %r13, %rsi
callq 0xa4b0
incl 0x4(%r15)
movq %r12, %rdi
callq 0xa860
testq %rax, %rax
jne 0x76097
movq %r12, %rdi
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa900
leaq 0x70adc(%rip), %rsi # 0xe6c4c
movl $0x4, %edi
movq %rbx, %rdx
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb9db7
| ScanDirectoryFiles:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea rdi, ScanDirectoryFiles_path
mov edx, 1000h
xor esi, esi
call _memset
mov rdi, rbx
call _opendir
test rax, rax
jz loc_76169
mov r12, rax
mov rdi, rax
call _readdir
test rax, rax
jz loc_76150
lea r13, ScanDirectoryFiles_path
lea rbp, [rsp+0C8h+var_C0]
loc_76097:
cmp byte ptr [rax+13h], 2Eh ; '.'
jnz short loc_760B7
cmp byte ptr [rax+14h], 0
jz loc_7613F
cmp byte ptr [rax+14h], 2Eh ; '.'
jnz short loc_760B7
cmp byte ptr [rax+15h], 0
jz loc_7613F
loc_760B7:
add rax, 13h
mov rdi, r13
lea rsi, aSS_0; "%s/%s"
mov rdx, rbx
mov rcx, rax
xor eax, eax
call _sprintf
test r14, r14
jz short loc_76127
mov edx, 90h
mov rdi, rbp
xor esi, esi
call _memset
mov rdi, r13
mov rsi, rbp
call _stat
mov eax, [rsp+0C8h+var_A8]
mov ecx, 0F000h
and eax, ecx
cmp eax, 8000h
jnz short loc_76114
mov rdi, r13
mov rsi, r14
call IsFileExtension
test al, al
jnz short loc_76127
jmp short loc_7613F
loc_76114:
mov rdi, r14
lea rsi, aDir; "DIR"
call TextFindIndex
test eax, eax
js short loc_7613F
loc_76127:
mov rax, [r15+8]
mov ecx, [r15+4]
mov rdi, [rax+rcx*8]
mov rsi, r13
call _strcpy
inc dword ptr [r15+4]
loc_7613F:
mov rdi, r12
call _readdir
test rax, rax
jnz loc_76097
loc_76150:
mov rdi, r12
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _closedir
loc_76169:
lea rsi, aFileioDirector; "FILEIO: Directory cannot be opened (%s)"
mov edi, 4
mov rdx, rbx
xor eax, eax
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp TraceLog
| long long ScanDirectoryFiles(const char *a1, long long a2, long long a3)
{
long long v4; // rax
int v5; // ecx
int v6; // r8d
int v7; // r9d
long long v8; // r12
long long v9; // rax
_BYTE v11[24]; // [rsp+8h] [rbp-C0h] BYREF
int v12; // [rsp+20h] [rbp-A8h]
memset(&ScanDirectoryFiles_path, 0LL, 4096LL);
v4 = opendir(a1);
if ( !v4 )
return TraceLog(4, (unsigned int)"FILEIO: Directory cannot be opened (%s)", (_DWORD)a1, v5, v6, v7);
v8 = v4;
v9 = readdir(v4);
if ( v9 )
{
while ( 1 )
{
if ( *(_BYTE *)(v9 + 19) == 46 && (!*(_BYTE *)(v9 + 20) || *(_BYTE *)(v9 + 20) == 46 && !*(_BYTE *)(v9 + 21)) )
goto LABEL_13;
sprintf(&ScanDirectoryFiles_path, "%s/%s", a1, (const char *)(v9 + 19));
if ( !a3 )
goto LABEL_12;
memset(v11, 0LL, 144LL);
stat(&ScanDirectoryFiles_path, v11);
if ( (v12 & 0xF000) == 0x8000 )
break;
if ( (int)TextFindIndex(a3, "DIR") >= 0 )
goto LABEL_12;
LABEL_13:
v9 = readdir(v8);
if ( !v9 )
return closedir(v8);
}
if ( !IsFileExtension((long long)&ScanDirectoryFiles_path, a3) )
goto LABEL_13;
LABEL_12:
strcpy(*(_QWORD *)(*(_QWORD *)(a2 + 8) + 8LL * *(unsigned int *)(a2 + 4)), &ScanDirectoryFiles_path);
++*(_DWORD *)(a2 + 4);
goto LABEL_13;
}
return closedir(v8);
}
| ScanDirectoryFiles:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA RDI,[0x240900]
MOV EDX,0x1000
XOR ESI,ESI
CALL 0x0010a2d0
MOV RDI,RBX
CALL 0x0010a810
TEST RAX,RAX
JZ 0x00176169
MOV R12,RAX
MOV RDI,RAX
CALL 0x0010a860
TEST RAX,RAX
JZ 0x00176150
LEA R13,[0x240900]
LEA RBP,[RSP + 0x8]
LAB_00176097:
CMP byte ptr [RAX + 0x13],0x2e
JNZ 0x001760b7
CMP byte ptr [RAX + 0x14],0x0
JZ 0x0017613f
CMP byte ptr [RAX + 0x14],0x2e
JNZ 0x001760b7
CMP byte ptr [RAX + 0x15],0x0
JZ 0x0017613f
LAB_001760b7:
ADD RAX,0x13
MOV RDI,R13
LEA RSI,[0x1e0183]
MOV RDX,RBX
MOV RCX,RAX
XOR EAX,EAX
CALL 0x0010a0e0
TEST R14,R14
JZ 0x00176127
MOV EDX,0x90
MOV RDI,RBP
XOR ESI,ESI
CALL 0x0010a2d0
MOV RDI,R13
MOV RSI,RBP
CALL 0x0010a480
MOV EAX,dword ptr [RSP + 0x20]
MOV ECX,0xf000
AND EAX,ECX
CMP EAX,0x8000
JNZ 0x00176114
MOV RDI,R13
MOV RSI,R14
CALL 0x00175b52
TEST AL,AL
JNZ 0x00176127
JMP 0x0017613f
LAB_00176114:
MOV RDI,R14
LEA RSI,[0x1e6c48]
CALL 0x00185e78
TEST EAX,EAX
JS 0x0017613f
LAB_00176127:
MOV RAX,qword ptr [R15 + 0x8]
MOV ECX,dword ptr [R15 + 0x4]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RSI,R13
CALL 0x0010a4b0
INC dword ptr [R15 + 0x4]
LAB_0017613f:
MOV RDI,R12
CALL 0x0010a860
TEST RAX,RAX
JNZ 0x00176097
LAB_00176150:
MOV RDI,R12
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0010a900
LAB_00176169:
LEA RSI,[0x1e6c4c]
MOV EDI,0x4
MOV RDX,RBX
XOR EAX,EAX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001b9db7
|
void ScanDirectoryFiles(char *param_1,long param_2,long param_3)
{
char cVar1;
int iVar2;
DIR *__dirp;
dirent *pdVar3;
stat local_c0;
memset(ScanDirectoryFiles_path,0,0x1000);
__dirp = opendir(param_1);
if (__dirp == (DIR *)0x0) {
TraceLog(4,"FILEIO: Directory cannot be opened (%s)",param_1);
return;
}
pdVar3 = readdir(__dirp);
if (pdVar3 != (dirent *)0x0) {
do {
if ((pdVar3->d_name[0] == '.') &&
((pdVar3->d_name[1] == '\0' || ((pdVar3->d_name[1] == '.' && (pdVar3->d_name[2] == '\0'))))
)) goto LAB_0017613f;
sprintf(ScanDirectoryFiles_path,"%s/%s",param_1,pdVar3->d_name);
if (param_3 == 0) {
LAB_00176127:
strcpy(*(char **)(*(long *)(param_2 + 8) + (ulong)*(uint *)(param_2 + 4) * 8),
ScanDirectoryFiles_path);
*(int *)(param_2 + 4) = *(int *)(param_2 + 4) + 1;
}
else {
memset(&local_c0,0,0x90);
stat(ScanDirectoryFiles_path,&local_c0);
if ((local_c0.st_mode & 0xf000) == 0x8000) {
cVar1 = IsFileExtension(ScanDirectoryFiles_path,param_3);
if (cVar1 != '\0') goto LAB_00176127;
}
else {
iVar2 = TextFindIndex(param_3,&DAT_001e6c48);
if (-1 < iVar2) goto LAB_00176127;
}
}
LAB_0017613f:
pdVar3 = readdir(__dirp);
} while (pdVar3 != (dirent *)0x0);
}
closedir(__dirp);
return;
}
| |
42,394 | 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>::at<char const (&) [13], 0>(char const (&) [13]) | monkey531[P]llama/common/json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [13], 0>(char const (&) [13]):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x96fe5
movq %rsi, %r15
movq 0x8(%r14), %rdi
callq 0x9a988
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x97043
addq $0x20, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x265e0
movq %rax, %rbx
movq %r14, %rdi
callq 0x6a48e
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3b324(%rip), %rsi # 0xd232b
leaq 0x8(%rsp), %rdi
callq 0x99965
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x6a342
xorl %ebp, %ebp
leaq 0x88166(%rip), %rsi # 0x11f198
leaq -0x2fe93(%rip), %rdx # 0x671a6
movq %rbx, %rdi
callq 0x275b0
jmp 0x970ad
pushq $0x20
popq %rdi
callq 0x265e0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x2b096
leaq 0x3b2f4(%rip), %rsi # 0xd235b
leaq 0x3b2f3(%rip), %rcx # 0xd2361
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x99f6f
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x68d46
xorl %ebp, %ebp
leaq 0x8807a(%rip), %rsi # 0x11f118
leaq -0x2feff(%rip), %rdx # 0x671a6
movq %rbx, %rdi
callq 0x275b0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x27998
jmp 0x970c2
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
jmp 0x970d3
jmp 0x970df
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x27998
testb %bpl, %bpl
jne 0x970e2
jmp 0x970ea
movq %rax, %r14
movq %rbx, %rdi
callq 0x268f0
movq %r14, %rdi
callq 0x27660
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_96FE5
mov r15, rsi
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_97043
add rax, 20h ; ' '
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_96FE5:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_40]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_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
jmp short loc_970AD
loc_97043:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_60]
lea rdx, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_970AD:
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_970C2
mov r14, rax
mov bpl, 1
loc_970C2:
lea rdi, [rsp+68h+var_40]
jmp short loc_970D3
jmp short loc_970DF
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
loc_970D3:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_970E2
jmp short loc_970EA
loc_970DF:
mov r14, rax
loc_970E2:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_970EA:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx
_BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v7[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v6, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
(long long)v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8));
if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::string::basic_string<std::allocator<char>>(v7, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v6,
"key '",
v7,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v5,
403,
(long long)v6,
a1);
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v2 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x00196fe5
MOV R15,RSI
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0019a988
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x00197043
ADD RAX,0x20
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00196fe5:
PUSH 0x20
POP RDI
CALL 0x001265e0
MOV RBX,RAX
MOV RDI,R14
CALL 0x0016a48e
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_00197000:
LEA RSI,[0x1d232b]
LEA RDI,[RSP + 0x8]
CALL 0x00199965
MOV BPL,0x1
LAB_00197014:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0016a342
XOR EBP,EBP
LEA RSI,[0x21f198]
LEA RDX,[0x1671a6]
MOV RDI,RBX
CALL 0x001275b0
LAB_00197043:
PUSH 0x20
POP RDI
CALL 0x001265e0
MOV RBX,RAX
LAB_0019704e:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
MOV RSI,R15
CALL 0x0012b096
LAB_00197060:
LEA RSI,[0x1d235b]
LEA RCX,[0x1d2361]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x00199f6f
MOV BPL,0x1
LAB_00197080:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x00168d46
XOR EBP,EBP
LEA RSI,[0x21f118]
LEA RDX,[0x1671a6]
MOV RDI,RBX
CALL 0x001275b0
|
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long lVar1;
int8 uVar2;
allocator local_61;
detail local_60 [32];
char *local_40 [4];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 00197000 to 00197010 has its CatchHandler @ 001970df */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_60,"cannot use at() with ",local_40);
/* try { // try from 00197014 to 00197040 has its CatchHandler @ 001970cb */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x130,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA13_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(*(int8 *)(param_1 + 8));
if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) {
return lVar1 + 0x20;
}
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 0019704e to 0019705f has its CatchHandler @ 001970c9 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61);
/* try { // try from 00197060 to 0019707c has its CatchHandler @ 001970bc */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_60,"key \'",(string *)local_40,"\' not found");
/* try { // try from 00197080 to 001970ac has its CatchHandler @ 001970ad */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x193,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
| |
42,395 | 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>::at<char const (&) [13], 0>(char const (&) [13]) | monkey531[P]llama/common/json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | O3 | 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>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [13], 0>(char const (&) [13]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xc8537
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xc8521
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1d2a0
testl %eax, %eax
je 0xc8516
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xc84f7
jmp 0xc8519
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xc8595
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1d5b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x8f08a
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x4def2(%rip), %rsi # 0x11644b
leaq 0x20(%rsp), %rdi
callq 0xce305
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x8ee32
xorl %ebp, %ebp
leaq 0x8bc14(%rip), %rsi # 0x154198
leaq -0x3d1f7(%rip), %rdx # 0x8b394
movq %rbx, %rdi
callq 0x1e5b0
jmp 0xc860e
movl $0x20, %edi
callq 0x1d5b0
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1d4f0
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x25e6a
leaq 0x4deb1(%rip), %rsi # 0x11647b
leaq 0x4deb0(%rip), %rcx # 0x116481
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xce8e2
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x8d4da
xorl %ebp, %ebp
leaq 0x8bb19(%rip), %rsi # 0x154118
leaq -0x3d272(%rip), %rdx # 0x8b394
movq %rbx, %rdi
callq 0x1e5b0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc862c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1dc50
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xc8677
movq 0x10(%rsp), %rsi
jmp 0xc866f
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xc8681
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1dc50
jmp 0xc8681
jmp 0xc867e
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc8677
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1dc50
testb %bpl, %bpl
jne 0xc8681
jmp 0xc8689
movq %rax, %r14
movq %rbx, %rdi
callq 0x1d8c0
movq %r14, %rdi
callq 0x1e660
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_C8537
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_C8521
loc_C84F7:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_C8516
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_C84F7
jmp short loc_C8519
loc_C8516:
mov rax, rbx
loc_C8519:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_C8521:
cmp rax, rbx
jz short loc_C8595
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_C8537:
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)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; 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
jmp short loc_C860E
loc_C8595:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_C860E:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C862C
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C862C:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_C8677
mov rsi, [rsp+68h+var_58]
jmp short loc_C866F
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_C8681
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C8681
jmp short loc_C867E
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C8677
mov rsi, [rsp+68h+var_38]
loc_C866F:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C8677:
test bpl, bpl
jnz short loc_C8681
jmp short loc_C8689
loc_C867E:
mov r14, rax
loc_C8681:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C8689:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v11, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(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 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v11,
"key '",
v9,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001c8537
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001c8521
LAB_001c84f7:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011d2a0
TEST EAX,EAX
JZ 0x001c8516
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001c84f7
JMP 0x001c8519
LAB_001c8516:
MOV RAX,RBX
LAB_001c8519:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001c8521:
CMP RAX,RBX
JZ 0x001c8595
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001c8537:
MOV EDI,0x20
CALL 0x0011d5b0
MOV RBX,RAX
MOV RDI,R14
CALL 0x0018f08a
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001c8552:
LEA RSI,[0x21644b]
LEA RDI,[RSP + 0x20]
CALL 0x001ce305
MOV BPL,0x1
LAB_001c8566:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0018ee32
XOR EBP,EBP
LEA RSI,[0x254198]
LEA RDX,[0x18b394]
MOV RDI,RBX
CALL 0x0011e5b0
LAB_001c8595:
MOV EDI,0x20
CALL 0x0011d5b0
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011d4f0
LEA RDX,[RAX + R15*0x1]
LAB_001c85b8:
MOV RDI,RSP
MOV RSI,R15
CALL 0x00125e6a
LAB_001c85c3:
LEA RSI,[0x21647b]
LEA RCX,[0x216481]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001ce8e2
MOV BPL,0x1
LAB_001c85e1:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0018d4da
XOR EBP,EBP
LEA RSI,[0x254118]
LEA RDX,[0x18b394]
MOV RDI,RBX
CALL 0x0011e5b0
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001c8552 to 001c8562 has its CatchHandler @ 001c867e */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001c8566 to 001c8592 has its CatchHandler @ 001c8659 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001c85b8 to 001c85c2 has its CatchHandler @ 001c8657 */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001c85c3 to 001c85dd has its CatchHandler @ 001c863c */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001c85e1 to 001c860d has its CatchHandler @ 001c860e */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| |
42,396 | my_suspend_hook | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void
my_suspend_hook(my_bool suspend, void *data)
{
struct my_hook_data *hook_data= (struct my_hook_data *)data;
if (suspend)
{
hook_data->orig_pvio= hook_data->orig_mysql->net.pvio;
hook_data->orig_mysql->net.pvio= hook_data->new_mysql->net.pvio;
}
else
hook_data->orig_mysql->net.pvio= hook_data->orig_pvio;
} | O0 | c | my_suspend_hook:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpb $0x0, -0x1(%rbp)
je 0x22475
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
jmp 0x22487
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopl (%rax)
| my_suspend_hook:
push rbp
mov rbp, rsp
mov al, dil
mov [rbp+var_1], al
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
cmp [rbp+var_1], 0
jz short loc_22475
mov rax, [rbp+var_18]
mov rax, [rax]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov [rax+10h], rcx
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rax], rcx
jmp short loc_22487
loc_22475:
mov rax, [rbp+var_18]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rax], rcx
loc_22487:
pop rbp
retn
| _QWORD * my_suspend_hook(char a1, long long a2)
{
long long v2; // rcx
_QWORD *result; // rax
if ( a1 )
{
*(_QWORD *)(a2 + 16) = **(_QWORD **)a2;
v2 = **(_QWORD **)(a2 + 8);
}
else
{
v2 = *(_QWORD *)(a2 + 16);
}
result = *(_QWORD **)a2;
**(_QWORD **)a2 = v2;
return result;
}
| my_suspend_hook:
PUSH RBP
MOV RBP,RSP
MOV AL,DIL
MOV byte ptr [RBP + -0x1],AL
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
CMP byte ptr [RBP + -0x1],0x0
JZ 0x00122475
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
JMP 0x00122487
LAB_00122475:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
LAB_00122487:
POP RBP
RET
|
void my_suspend_hook(char param_1,int8 *param_2)
{
if (param_1 == '\0') {
*(int8 *)*param_2 = param_2[2];
}
else {
param_2[2] = *(int8 *)*param_2;
*(int8 *)*param_2 = *(int8 *)param_2[1];
}
return;
}
| |
42,397 | ftparser_call_deinitializer | eloqsql/storage/myisam/ft_parser.c | void ftparser_call_deinitializer(MI_INFO *info)
{
uint i, j, keys= info->s->state.header.keys;
free_root(&info->ft_memroot, MYF(0));
if (! info->ftparser_param)
return;
for (i= 0; i < keys; i++)
{
MI_KEYDEF *keyinfo= &info->s->keyinfo[i];
for (j=0; j < MAX_PARAM_NR; j++)
{
MYSQL_FTPARSER_PARAM *ftparser_param=
&info->ftparser_param[keyinfo->ftkey_nr * MAX_PARAM_NR + j];
if (keyinfo->flag & HA_FULLTEXT && ftparser_param->mysql_add_word)
{
if (keyinfo->parser->deinit)
keyinfo->parser->deinit(ftparser_param);
ftparser_param->mysql_add_word= 0;
}
else
break;
}
}
} | O3 | c | ftparser_call_deinitializer:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movb 0x12(%rax), %r14b
addq $0x90, %rdi
xorl %esi, %esi
callq 0x58a57
cmpq $0x0, 0xd0(%rbx)
setne %al
testb %r14b, %r14b
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x48ac5
movzbl %r14b, %eax
movq %rax, -0x30(%rbp)
xorl %r12d, %r12d
movq (%rbx), %rax
imulq $0x70, %r12, %r13
addq 0x218(%rax), %r13
movb $0x1, %r15b
xorl %eax, %eax
testb $-0x80, 0xa(%r13)
je 0x48abc
movl 0x20(%r13), %ecx
leal (%rax,%rcx,2), %r14d
shlq $0x6, %r14
addq 0xd0(%rbx), %r14
cmpq $0x0, 0x8(%r14)
je 0x48abc
movq 0x38(%r13), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x48aa3
movq %r14, %rdi
callq *%rax
movq $0x0, 0x8(%r14)
movl $0x1, %eax
testb $0x1, %r15b
movl $0x0, %r15d
jne 0x48a70
incq %r12
cmpq -0x30(%rbp), %r12
jne 0x48a5d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ftparser_call_deinitializer:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov rax, [rdi]
mov r14b, [rax+12h]
add rdi, 90h
xor esi, esi
call free_root
cmp qword ptr [rbx+0D0h], 0
setnz al
test r14b, r14b
setnz cl
and cl, al
cmp cl, 1
jnz short loc_48AC5
movzx eax, r14b
mov [rbp+var_30], rax
xor r12d, r12d
loc_48A5D:
mov rax, [rbx]
imul r13, r12, 70h ; 'p'
add r13, [rax+218h]
mov r15b, 1
xor eax, eax
loc_48A70:
test byte ptr [r13+0Ah], 80h
jz short loc_48ABC
mov ecx, [r13+20h]
lea r14d, [rax+rcx*2]
shl r14, 6
add r14, [rbx+0D0h]
cmp qword ptr [r14+8], 0
jz short loc_48ABC
mov rax, [r13+38h]
mov rax, [rax+18h]
test rax, rax
jz short loc_48AA3
mov rdi, r14
call rax
loc_48AA3:
mov qword ptr [r14+8], 0
mov eax, 1
test r15b, 1
mov r15d, 0
jnz short loc_48A70
loc_48ABC:
inc r12
cmp r12, [rbp+var_30]
jnz short loc_48A5D
loc_48AC5:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char ftparser_call_deinitializer(_QWORD *a1)
{
unsigned __int8 v1; // r14
int v2; // eax
long long v3; // r12
long long v4; // r13
char v5; // r15
unsigned long long v6; // r14
void ( *v7)(unsigned long long); // rax
bool v8; // zf
long long v10; // [rsp+0h] [rbp-30h]
v1 = *(_BYTE *)(*a1 + 18LL);
free_root(a1 + 18, 0LL);
LOBYTE(v2) = a1[26] != 0LL;
if ( ((unsigned __int8)v2 & (v1 != 0)) == 1 )
{
v10 = v1;
v3 = 0LL;
do
{
v4 = *(_QWORD *)(*a1 + 536LL) + 112 * v3;
v5 = 1;
v2 = 0;
do
{
if ( *(char *)(v4 + 10) >= 0 )
break;
v6 = a1[26] + ((unsigned long long)(unsigned int)(v2 + 2 * *(_DWORD *)(v4 + 32)) << 6);
if ( !*(_QWORD *)(v6 + 8) )
break;
v7 = *(void ( **)(unsigned long long))(*(_QWORD *)(v4 + 56) + 24LL);
if ( v7 )
v7(v6);
*(_QWORD *)(v6 + 8) = 0LL;
v2 = 1;
v8 = (v5 & 1) == 0;
v5 = 0;
}
while ( !v8 );
++v3;
}
while ( v3 != v10 );
}
return v2;
}
| ftparser_call_deinitializer:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV R14B,byte ptr [RAX + 0x12]
ADD RDI,0x90
XOR ESI,ESI
CALL 0x00158a57
CMP qword ptr [RBX + 0xd0],0x0
SETNZ AL
TEST R14B,R14B
SETNZ CL
AND CL,AL
CMP CL,0x1
JNZ 0x00148ac5
MOVZX EAX,R14B
MOV qword ptr [RBP + -0x30],RAX
XOR R12D,R12D
LAB_00148a5d:
MOV RAX,qword ptr [RBX]
IMUL R13,R12,0x70
ADD R13,qword ptr [RAX + 0x218]
MOV R15B,0x1
XOR EAX,EAX
LAB_00148a70:
TEST byte ptr [R13 + 0xa],0x80
JZ 0x00148abc
MOV ECX,dword ptr [R13 + 0x20]
LEA R14D,[RAX + RCX*0x2]
SHL R14,0x6
ADD R14,qword ptr [RBX + 0xd0]
CMP qword ptr [R14 + 0x8],0x0
JZ 0x00148abc
MOV RAX,qword ptr [R13 + 0x38]
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JZ 0x00148aa3
MOV RDI,R14
CALL RAX
LAB_00148aa3:
MOV qword ptr [R14 + 0x8],0x0
MOV EAX,0x1
TEST R15B,0x1
MOV R15D,0x0
JNZ 0x00148a70
LAB_00148abc:
INC R12
CMP R12,qword ptr [RBP + -0x30]
JNZ 0x00148a5d
LAB_00148ac5:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ftparser_call_deinitializer(long *param_1)
{
byte bVar1;
code *pcVar2;
bool bVar3;
int iVar4;
ulong uVar5;
long lVar6;
long lVar7;
bool bVar8;
bVar1 = *(byte *)(*param_1 + 0x12);
free_root(param_1 + 0x12,0);
if (bVar1 != 0 && param_1[0x1a] != 0) {
uVar5 = 0;
do {
lVar6 = uVar5 * 0x70 + *(long *)(*param_1 + 0x218);
iVar4 = 0;
bVar3 = true;
do {
bVar8 = bVar3;
if ((*(byte *)(lVar6 + 10) & 0x80) == 0) break;
lVar7 = (ulong)(uint)(iVar4 + *(int *)(lVar6 + 0x20) * 2) * 0x40 + param_1[0x1a];
if (*(long *)(lVar7 + 8) == 0) break;
pcVar2 = *(code **)(*(long *)(lVar6 + 0x38) + 0x18);
if (pcVar2 != (code *)0x0) {
(*pcVar2)(lVar7);
}
*(int8 *)(lVar7 + 8) = 0;
iVar4 = 1;
bVar3 = false;
} while (bVar8);
uVar5 = uVar5 + 1;
} while (uVar5 != bVar1);
}
return;
}
| |
42,398 | qdevtools::QFlagsEdit::setMetaEnum(QMetaEnum const&) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | void setMetaEnum(const QMetaEnum& metaEnum)
{
metaEnum_ = metaEnum;
auto layout = static_cast<Layout*>(this->layout());
while (layout->count() > 0) {
auto item = layout->itemAt(0);
delete item->widget();
delete item;
}
if (metaEnum.isFlag()) {
for (int i = 0; i < metaEnum.keyCount(); ++i) {
auto key = metaEnum.key(i);
auto box = new QCheckBox(key);
layout->addWidget(box);
}
} else {
auto box = new QComboBox;
for (int i = 0; i < metaEnum.keyCount(); ++i) {
auto key = metaEnum.key(i);
box->addItem(key, metaEnum.value(i));
}
layout->addWidget(box);
}
} | O0 | cpp | qdevtools::QFlagsEdit::setMetaEnum(QMetaEnum const&):
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp # imm = 0x120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, 0x28(%rdi)
movq 0x8(%rax), %rax
movq %rax, 0x30(%rdi)
callq 0xf820
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0xc8(%rax)
cmpl $0x0, %eax
jle 0x1be8c
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0xa8(%rax)
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq %rax, -0xc8(%rbp)
cmpq $0x0, %rax
je 0x1be6c
movq -0xc8(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0xd0(%rbp)
cmpq $0x0, %rax
je 0x1be8a
movq -0xd0(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1be23
movq -0x10(%rbp), %rdi
callq 0xf7d0
testb $0x1, %al
jne 0x1be9e
jmp 0x1bfb4
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0xd4(%rbp)
movq -0x10(%rbp), %rdi
callq 0xf4a0
movl %eax, %ecx
movl -0xd4(%rbp), %eax
cmpl %ecx, %eax
jge 0x1bfaf
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0xf940
movq %rax, -0x30(%rbp)
movl $0x28, %edi
callq 0xf910
movq %rax, -0xe0(%rbp)
movb $0x1, -0x5d(%rbp)
movq -0x30(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x1b660
jmp 0x1befb
movq -0xe0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
leaq -0x50(%rbp), %rsi
callq 0xf7f0
jmp 0x1bf11
movb $0x0, -0x5d(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x1b1e0
movq -0xe0(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0x64(%rbp), %rdi
callq 0x1c410
movq -0xf0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movl -0x64(%rbp), %ecx
xorl %edx, %edx
callq 0xf950
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1bea5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x1bf91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x1b1e0
testb $0x1, -0x5d(%rbp)
jne 0x1bf99
jmp 0x1bfaa
movq -0xe0(%rbp), %rdi
movl $0x28, %esi
callq 0xf0d0
jmp 0x1c138
jmp 0x1c12f
movl $0x28, %edi
callq 0xf910
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xf8(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0xf4d0
jmp 0x1bfd6
movq -0xf8(%rbp), %rax
movq %rax, -0x70(%rbp)
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0xfc(%rbp)
movq -0x10(%rbp), %rdi
callq 0xf4a0
movl %eax, %ecx
movl -0xfc(%rbp), %eax
cmpl %ecx, %eax
jge 0x1c0f2
movq -0x10(%rbp), %rdi
movl -0x74(%rbp), %esi
callq 0xf940
movq %rax, -0x80(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x80(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x1b660
movq -0x10(%rbp), %rdi
movl -0x74(%rbp), %esi
callq 0xfd40
movl %eax, -0x100(%rbp)
jmp 0x1c049
movl -0x100(%rbp), %esi
leaq -0xb8(%rbp), %rdi
callq 0xf890
jmp 0x1c05d
movq -0x108(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
callq 0x22250
jmp 0x1c079
leaq -0xb8(%rbp), %rdi
callq 0xf310
leaq -0x98(%rbp), %rdi
callq 0x1b1e0
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x1bfe8
movq -0xf8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
movl $0x28, %esi
callq 0xf0d0
jmp 0x1c138
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x1c0e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0xf310
leaq -0x98(%rbp), %rdi
callq 0x1b1e0
jmp 0x1c138
movq -0x18(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0xbc(%rbp), %rdi
callq 0x1c410
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
movl -0xbc(%rbp), %ecx
xorl %edx, %edx
callq 0xf950
addq $0x120, %rsp # imm = 0x120
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0xf410
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN9qdevtools10QFlagsEdit11setMetaEnumERK9QMetaEnum:
push rbp
mov rbp, rsp
sub rsp, 120h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; this
mov rax, [rbp+var_10]
mov rcx, [rax]
mov [rdi+28h], rcx
mov rax, [rax+8]
mov [rdi+30h], rax
call __ZNK7QWidget6layoutEv; QWidget::layout(void)
mov [rbp+var_18], rax
loc_1BE23:
mov rdi, [rbp+var_18]
mov rax, [rdi]
call qword ptr [rax+0C8h]
cmp eax, 0
jle short loc_1BE8C
mov rdi, [rbp+var_18]
mov rax, [rdi]
xor esi, esi
call qword ptr [rax+0A8h]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
mov rax, [rdi]
call qword ptr [rax+68h]
mov [rbp+var_C8], rax
cmp rax, 0
jz short loc_1BE6C
mov rdi, [rbp+var_C8]
mov rax, [rdi]
call qword ptr [rax+20h]
loc_1BE6C:
mov rax, [rbp+var_20]
mov [rbp+var_D0], rax
cmp rax, 0
jz short loc_1BE8A
mov rdi, [rbp+var_D0]
mov rax, [rdi]
call qword ptr [rax+8]
loc_1BE8A:
jmp short loc_1BE23
loc_1BE8C:
mov rdi, [rbp+var_10]; this
call __ZNK9QMetaEnum6isFlagEv; QMetaEnum::isFlag(void)
test al, 1
jnz short loc_1BE9E
jmp loc_1BFB4
loc_1BE9E:
mov [rbp+var_24], 0
loc_1BEA5:
mov eax, [rbp+var_24]
mov [rbp+var_D4], eax
mov rdi, [rbp+var_10]; this
call __ZNK9QMetaEnum8keyCountEv; QMetaEnum::keyCount(void)
mov ecx, eax
mov eax, [rbp+var_D4]
cmp eax, ecx
jge loc_1BFAF
mov rdi, [rbp+var_10]; this
mov esi, [rbp+var_24]; int
call __ZNK9QMetaEnum3keyEi; QMetaEnum::key(int)
mov [rbp+var_30], rax
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_E0], rax
mov [rbp+var_5D], 1
mov rsi, [rbp+var_30]; char *
lea rdi, [rbp+var_50]; this
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_1BEFB:
mov rdi, [rbp+var_E0]; this
xor eax, eax
mov edx, eax; QWidget *
lea rsi, [rbp+var_50]; QString *
call __ZN9QCheckBoxC1ERK7QStringP7QWidget; QCheckBox::QCheckBox(QString const&,QWidget *)
jmp short $+2
loc_1BF11:
mov [rbp+var_5D], 0
lea rdi, [rbp+var_50]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rax, [rbp+var_E0]
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov [rbp+var_F0], rax
mov rax, [rbp+var_38]
mov [rbp+var_E8], rax
lea rdi, [rbp+var_64]
call _ZN6QFlagsIN2Qt13AlignmentFlagEEC2Ev; QFlags<Qt::AlignmentFlag>::QFlags(void)
mov rdi, [rbp+var_F0]
mov rsi, [rbp+var_E8]
mov ecx, [rbp+var_64]
xor edx, edx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp loc_1BEA5
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp short loc_1BF91
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_50]; this
call _ZN7QStringD2Ev; QString::~QString()
loc_1BF91:
test [rbp+var_5D], 1
jnz short loc_1BF99
jmp short loc_1BFAA
loc_1BF99:
mov rdi, [rbp+var_E0]; void *
mov esi, 28h ; '('; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1BFAA:
jmp loc_1C138
loc_1BFAF:
jmp loc_1C12F
loc_1BFB4:
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_F8], rax
xor eax, eax
mov esi, eax; QWidget *
call __ZN9QComboBoxC1EP7QWidget; QComboBox::QComboBox(QWidget *)
jmp short $+2
loc_1BFD6:
mov rax, [rbp+var_F8]
mov [rbp+var_70], rax
mov [rbp+var_74], 0
loc_1BFE8:
mov eax, [rbp+var_74]
mov [rbp+var_FC], eax
mov rdi, [rbp+var_10]; this
call __ZNK9QMetaEnum8keyCountEv; QMetaEnum::keyCount(void)
mov ecx, eax
mov eax, [rbp+var_FC]
cmp eax, ecx
jge loc_1C0F2
mov rdi, [rbp+var_10]; this
mov esi, [rbp+var_74]; int
call __ZNK9QMetaEnum3keyEi; QMetaEnum::key(int)
mov [rbp+var_80], rax
mov rax, [rbp+var_70]
mov [rbp+var_108], rax
mov rsi, [rbp+var_80]; char *
lea rdi, [rbp+var_98]; this
call _ZN7QStringC2EPKc; QString::QString(char const*)
mov rdi, [rbp+var_10]; this
mov esi, [rbp+var_74]; int
call __ZNK9QMetaEnum5valueEi; QMetaEnum::value(int)
mov [rbp+var_100], eax
jmp short $+2
loc_1C049:
mov esi, [rbp+var_100]; int
lea rdi, [rbp+var_B8]; this
call __ZN8QVariantC1Ei; QVariant::QVariant(int)
jmp short $+2
loc_1C05D:
mov rdi, [rbp+var_108]; this
lea rsi, [rbp+var_98]; QString *
lea rdx, [rbp+var_B8]; QVariant *
call _ZN9QComboBox7addItemERK7QStringRK8QVariant; QComboBox::addItem(QString const&,QVariant const&)
jmp short $+2
loc_1C079:
lea rdi, [rbp+var_B8]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
lea rdi, [rbp+var_98]; this
call _ZN7QStringD2Ev; QString::~QString()
mov eax, [rbp+var_74]
add eax, 1
mov [rbp+var_74], eax
jmp loc_1BFE8
mov rdi, [rbp+var_F8]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
mov esi, 28h ; '('; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1C138
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp short loc_1C0E4
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_B8]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
loc_1C0E4:
lea rdi, [rbp+var_98]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_1C138
loc_1C0F2:
mov rax, [rbp+var_18]
mov [rbp+var_118], rax
mov rax, [rbp+var_70]
mov [rbp+var_110], rax
lea rdi, [rbp+var_BC]
call _ZN6QFlagsIN2Qt13AlignmentFlagEEC2Ev; QFlags<Qt::AlignmentFlag>::QFlags(void)
mov rdi, [rbp+var_118]
mov rsi, [rbp+var_110]
mov ecx, [rbp+var_BC]
xor edx, edx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
loc_1C12F:
add rsp, 120h
pop rbp
retn
loc_1C138:
mov rdi, [rbp+var_58]
call __Unwind_Resume
| long long qdevtools::QFlagsEdit::setMetaEnum(qdevtools::QFlagsEdit *this, const QMetaEnum *a2)
{
int v2; // ecx
long long result; // rax
long long v4; // [rsp+8h] [rbp-118h]
QComboBox *v5; // [rsp+10h] [rbp-110h]
QComboBox *v6; // [rsp+18h] [rbp-108h]
int v7; // [rsp+20h] [rbp-100h]
int v8; // [rsp+24h] [rbp-FCh]
QComboBox *v9; // [rsp+28h] [rbp-F8h]
long long v10; // [rsp+30h] [rbp-F0h]
QCheckBox *v11; // [rsp+40h] [rbp-E0h]
int v12; // [rsp+4Ch] [rbp-D4h]
long long v13; // [rsp+58h] [rbp-C8h]
unsigned int v14; // [rsp+64h] [rbp-BCh] BYREF
_BYTE v15[32]; // [rsp+68h] [rbp-B8h] BYREF
_BYTE v16[24]; // [rsp+88h] [rbp-98h] BYREF
char *v17; // [rsp+A0h] [rbp-80h]
int j; // [rsp+ACh] [rbp-74h]
QComboBox *v19; // [rsp+B0h] [rbp-70h]
unsigned int v20; // [rsp+BCh] [rbp-64h] BYREF
char v21; // [rsp+C3h] [rbp-5Dh]
_BYTE v22[24]; // [rsp+D0h] [rbp-50h] BYREF
QCheckBox *v23; // [rsp+E8h] [rbp-38h]
char *v24; // [rsp+F0h] [rbp-30h]
int i; // [rsp+FCh] [rbp-24h]
long long v26; // [rsp+100h] [rbp-20h]
long long v27; // [rsp+108h] [rbp-18h]
QMetaEnum *v28; // [rsp+110h] [rbp-10h]
QWidget *v29; // [rsp+118h] [rbp-8h]
v29 = this;
v28 = a2;
*((_QWORD *)this + 5) = *(_QWORD *)a2;
*((_QWORD *)this + 6) = *((_QWORD *)a2 + 1);
v27 = QWidget::layout(this);
while ( (*(int ( **)(long long))(*(_QWORD *)v27 + 200LL))(v27) > 0 )
{
v26 = (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v27 + 168LL))(v27, 0LL);
v13 = (*(long long ( **)(long long))(*(_QWORD *)v26 + 104LL))(v26);
if ( v13 )
(*(void ( **)(long long))(*(_QWORD *)v13 + 32LL))(v13);
if ( v26 )
(*(void ( **)(long long))(*(_QWORD *)v26 + 8LL))(v26);
}
if ( (QMetaEnum::isFlag(v28) & 1) != 0 )
{
for ( i = 0; ; ++i )
{
v12 = i;
v2 = QMetaEnum::keyCount(v28);
result = (unsigned int)v12;
if ( v12 >= v2 )
break;
v24 = (char *)QMetaEnum::key(v28, i);
v11 = (QCheckBox *)operator new(0x28uLL);
v21 = 1;
QString::QString((QString *)v22, (QByteArrayView *)v24);
QCheckBox::QCheckBox(v11, (const QString *)v22, 0LL);
v21 = 0;
QString::~QString((QString *)v22);
v23 = v11;
v10 = v27;
QFlags<Qt::AlignmentFlag>::QFlags(&v20);
QBoxLayout::addWidget(v10, v11, 0LL, v20);
}
}
else
{
v9 = (QComboBox *)operator new(0x28uLL);
QComboBox::QComboBox(v9, 0LL);
v19 = v9;
for ( j = 0; ; ++j )
{
v8 = j;
if ( v8 >= (int)QMetaEnum::keyCount(v28) )
break;
v17 = (char *)QMetaEnum::key(v28, j);
v6 = v19;
QString::QString((QString *)v16, (QByteArrayView *)v17);
v7 = QMetaEnum::value(v28, j);
QVariant::QVariant((QVariant *)v15, v7);
QComboBox::addItem(v6, (const QString *)v16, (const QVariant *)v15);
QVariant::~QVariant((QVariant *)v15);
QString::~QString((QString *)v16);
}
v4 = v27;
v5 = v19;
QFlags<Qt::AlignmentFlag>::QFlags(&v14);
return QBoxLayout::addWidget(v4, v5, 0LL, v14);
}
return result;
}
| setMetaEnum:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x120
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RDI + 0x28],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RDI + 0x30],RAX
CALL 0x0010f820
MOV qword ptr [RBP + -0x18],RAX
LAB_0011be23:
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0xc8]
CMP EAX,0x0
JLE 0x0011be8c
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RDI]
XOR ESI,ESI
CALL qword ptr [RAX + 0xa8]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x68]
MOV qword ptr [RBP + -0xc8],RAX
CMP RAX,0x0
JZ 0x0011be6c
MOV RDI,qword ptr [RBP + -0xc8]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x20]
LAB_0011be6c:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0xd0],RAX
CMP RAX,0x0
JZ 0x0011be8a
MOV RDI,qword ptr [RBP + -0xd0]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0011be8a:
JMP 0x0011be23
LAB_0011be8c:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0010f7d0
TEST AL,0x1
JNZ 0x0011be9e
JMP 0x0011bfb4
LAB_0011be9e:
MOV dword ptr [RBP + -0x24],0x0
LAB_0011bea5:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0xd4],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0010f4a0
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0xd4]
CMP EAX,ECX
JGE 0x0011bfaf
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x24]
CALL 0x0010f940
MOV qword ptr [RBP + -0x30],RAX
MOV EDI,0x28
CALL 0x0010f910
MOV qword ptr [RBP + -0xe0],RAX
MOV byte ptr [RBP + -0x5d],0x1
MOV RSI,qword ptr [RBP + -0x30]
LAB_0011bef0:
LEA RDI,[RBP + -0x50]
CALL 0x0011b660
JMP 0x0011befb
LAB_0011befb:
MOV RDI,qword ptr [RBP + -0xe0]
XOR EAX,EAX
MOV EDX,EAX
LEA RSI,[RBP + -0x50]
CALL 0x0010f7f0
LAB_0011bf0f:
JMP 0x0011bf11
LAB_0011bf11:
MOV byte ptr [RBP + -0x5d],0x0
LEA RDI,[RBP + -0x50]
CALL 0x0011b1e0
MOV RAX,qword ptr [RBP + -0xe0]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0xf0],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xe8],RAX
LEA RDI,[RBP + -0x64]
CALL 0x0011c410
MOV RDI,qword ptr [RBP + -0xf0]
MOV RSI,qword ptr [RBP + -0xe8]
MOV ECX,dword ptr [RBP + -0x64]
XOR EDX,EDX
CALL 0x0010f950
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0011bea5
LAB_0011bfaf:
JMP 0x0011c12f
LAB_0011bfb4:
MOV EDI,0x28
CALL 0x0010f910
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0xf8],RAX
LAB_0011bfcb:
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010f4d0
LAB_0011bfd4:
JMP 0x0011bfd6
LAB_0011bfd6:
MOV RAX,qword ptr [RBP + -0xf8]
MOV qword ptr [RBP + -0x70],RAX
MOV dword ptr [RBP + -0x74],0x0
LAB_0011bfe8:
MOV EAX,dword ptr [RBP + -0x74]
MOV dword ptr [RBP + -0xfc],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0010f4a0
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0xfc]
CMP EAX,ECX
JGE 0x0011c0f2
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x74]
CALL 0x0010f940
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x108],RAX
MOV RSI,qword ptr [RBP + -0x80]
LEA RDI,[RBP + -0x98]
CALL 0x0011b660
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x74]
LAB_0011c03c:
CALL 0x0010fd40
MOV dword ptr [RBP + -0x100],EAX
JMP 0x0011c049
LAB_0011c049:
MOV ESI,dword ptr [RBP + -0x100]
LEA RDI,[RBP + -0xb8]
CALL 0x0010f890
JMP 0x0011c05d
LAB_0011c05d:
MOV RDI,qword ptr [RBP + -0x108]
LEA RSI,[RBP + -0x98]
LEA RDX,[RBP + -0xb8]
CALL 0x00122250
LAB_0011c077:
JMP 0x0011c079
LAB_0011c079:
LEA RDI,[RBP + -0xb8]
CALL 0x0010f310
LEA RDI,[RBP + -0x98]
CALL 0x0011b1e0
MOV EAX,dword ptr [RBP + -0x74]
ADD EAX,0x1
MOV dword ptr [RBP + -0x74],EAX
JMP 0x0011bfe8
LAB_0011c0f2:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x118],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x110],RAX
LEA RDI,[RBP + -0xbc]
CALL 0x0011c410
MOV RDI,qword ptr [RBP + -0x118]
MOV RSI,qword ptr [RBP + -0x110]
MOV ECX,dword ptr [RBP + -0xbc]
XOR EDX,EDX
CALL 0x0010f950
LAB_0011c12f:
ADD RSP,0x120
POP RBP
RET
|
/* qdevtools::QFlagsEdit::setMetaEnum(QMetaEnum const&) */
void __thiscall qdevtools::QFlagsEdit::setMetaEnum(QFlagsEdit *this,QMetaEnum *param_1)
{
int iVar1;
int iVar2;
long *plVar3;
ulong uVar4;
QCheckBox *this_00;
QComboBox *pQVar5;
int4 local_c4;
QVariant_conflict local_c0 [32];
QString local_a0 [24];
char *local_88;
int local_7c;
QComboBox *local_78;
int4 local_6c;
int1 local_65;
QString local_58 [24];
QCheckBox *local_40;
char *local_38;
int local_2c;
long *local_28;
long *local_20;
QMetaEnum *local_18;
QFlagsEdit *local_10;
*(int8 *)(this + 0x28) = *(int8 *)param_1;
*(int8 *)(this + 0x30) = *(int8 *)(param_1 + 8);
local_18 = param_1;
local_10 = this;
local_20 = (long *)QWidget::layout();
while (iVar1 = (**(code **)(*local_20 + 200))(), 0 < iVar1) {
local_28 = (long *)(**(code **)(*local_20 + 0xa8))(local_20,0);
plVar3 = (long *)(**(code **)(*local_28 + 0x68))();
if (plVar3 != (long *)0x0) {
(**(code **)(*plVar3 + 0x20))();
}
if (local_28 != (long *)0x0) {
(**(code **)(*local_28 + 8))();
}
}
uVar4 = QMetaEnum::isFlag();
if ((uVar4 & 1) == 0) {
pQVar5 = (QComboBox *)operator_new(0x28);
/* try { // try from 0011bfcb to 0011bfd3 has its CatchHandler @ 0011c09f */
QComboBox::QComboBox(pQVar5,(QWidget *)0x0);
local_78 = pQVar5;
for (local_7c = 0; iVar1 = local_7c, iVar2 = QMetaEnum::keyCount(), plVar3 = local_20,
pQVar5 = local_78, iVar1 < iVar2; local_7c = local_7c + 1) {
local_88 = (char *)QMetaEnum::key((int)local_18);
pQVar5 = local_78;
QString::QString(local_a0,local_88);
/* try { // try from 0011c03c to 0011c05a has its CatchHandler @ 0011c0be */
iVar1 = QMetaEnum::value((int)local_18);
QVariant::QVariant(local_c0,iVar1);
/* try { // try from 0011c05d to 0011c076 has its CatchHandler @ 0011c0cc */
QComboBox::addItem(pQVar5,local_a0,local_c0);
QVariant::~QVariant(local_c0);
QString::~QString(local_a0);
}
QFlags<Qt::AlignmentFlag>::QFlags((QFlags<Qt::AlignmentFlag> *)&local_c4);
QBoxLayout::addWidget(plVar3,pQVar5,0,local_c4);
}
else {
for (local_2c = 0; iVar1 = local_2c, iVar2 = QMetaEnum::keyCount(), iVar1 < iVar2;
local_2c = local_2c + 1) {
local_38 = (char *)QMetaEnum::key((int)local_18);
this_00 = (QCheckBox *)operator_new(0x28);
local_65 = 1;
/* try { // try from 0011bef0 to 0011bef8 has its CatchHandler @ 0011bf6e */
QString::QString(local_58,local_38);
/* try { // try from 0011befb to 0011bf0e has its CatchHandler @ 0011bf7c */
QCheckBox::QCheckBox(this_00,local_58,(QWidget *)0x0);
local_65 = 0;
QString::~QString(local_58);
plVar3 = local_20;
local_40 = this_00;
QFlags<Qt::AlignmentFlag>::QFlags((QFlags<Qt::AlignmentFlag> *)&local_6c);
QBoxLayout::addWidget(plVar3,this_00,0,local_6c);
}
}
return;
}
| |
42,399 | qdevtools::QFlagsEdit::setMetaEnum(QMetaEnum const&) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | void setMetaEnum(const QMetaEnum& metaEnum)
{
metaEnum_ = metaEnum;
auto layout = static_cast<Layout*>(this->layout());
while (layout->count() > 0) {
auto item = layout->itemAt(0);
delete item->widget();
delete item;
}
if (metaEnum.isFlag()) {
for (int i = 0; i < metaEnum.keyCount(); ++i) {
auto key = metaEnum.key(i);
auto box = new QCheckBox(key);
layout->addWidget(box);
}
} else {
auto box = new QComboBox;
for (int i = 0; i < metaEnum.keyCount(); ++i) {
auto key = metaEnum.key(i);
box->addItem(key, metaEnum.value(i));
}
layout->addWidget(box);
}
} | O1 | cpp | qdevtools::QFlagsEdit::setMetaEnum(QMetaEnum const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movups (%rsi), %xmm0
movups %xmm0, 0x28(%rdi)
callq 0xf820
movq %rax, %r14
movq (%rax), %rax
movq %r14, %rdi
callq *0xc8(%rax)
testl %eax, %eax
jle 0x16182
movq (%r14), %rax
movq %r14, %rdi
xorl %esi, %esi
callq *0xa8(%rax)
movq %rax, %r15
movq (%rax), %rax
movq %r15, %rdi
callq *0x68(%rax)
testq %rax, %rax
je 0x16174
movq (%rax), %rcx
movq %rax, %rdi
callq *0x20(%rcx)
movq (%r15), %rax
movq %r15, %rdi
callq *0x8(%rax)
movq (%r14), %rax
jmp 0x1613f
movq %rbx, %rdi
callq 0xf7d0
testb %al, %al
je 0x1624d
movq %rbx, %rdi
callq 0xf4a0
testl %eax, %eax
jle 0x16374
xorl %r12d, %r12d
movq %rsp, %rbp
movq %rbx, %rdi
movl %r12d, %esi
callq 0xf940
movq %rax, %r13
movl $0x28, %edi
callq 0xf910
movq %rax, %r15
testq %r13, %r13
je 0x161d5
movq %r13, %rdi
callq 0xf250
movq %rax, %rsi
jmp 0x161d7
xorl %esi, %esi
leaq 0x38(%rsp), %rdi
movq %r13, %rdx
callq 0xf6f0
movups 0x38(%rsp), %xmm0
movaps %xmm0, (%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0xf7f0
movq (%rsp), %rax
testq %rax, %rax
je 0x16225
lock
decl (%rax)
jne 0x16225
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf950
incl %r12d
movq %rbx, %rdi
callq 0xf4a0
cmpl %eax, %r12d
jl 0x161a8
jmp 0x16374
movq %r14, 0x28(%rsp)
movl $0x28, %edi
callq 0xf910
movq %rax, 0x20(%rsp)
movq %rax, %rdi
xorl %esi, %esi
callq 0xf4d0
movq %rbx, %rdi
callq 0xf4a0
testl %eax, %eax
jle 0x16361
xorl %r12d, %r12d
leaq 0x38(%rsp), %r15
leaq 0x30(%rsp), %rbp
movq %rbx, %rdi
movq %r15, %rbx
movq %rbp, %r15
movq %rdi, %r14
movl %r12d, %esi
callq 0xf940
movq %rax, %rbp
testq %rax, %rax
je 0x162b1
movq %rbp, %rdi
callq 0xf250
movq %rax, %rsi
jmp 0x162b3
xorl %esi, %esi
movq %rbx, %r13
movq %rbx, %rdi
movq %rbp, %rdx
callq 0xf6f0
movups 0x38(%rsp), %xmm0
movaps %xmm0, (%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movl %r12d, %esi
callq 0xfd40
movq %r13, %rdi
movl %eax, %esi
callq 0xf890
movq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0xf960
movl %eax, %ebp
movq %r15, %rdi
callq 0xf360
movq %r13, %rdi
movl %ebp, %esi
movq %r15, %rbp
movq %r15, %rdx
movq %rsp, %rcx
movq %rbx, %r15
movq %rbx, %r8
callq 0xf390
movq %rbp, %rdi
callq 0xf450
movq %r15, %rdi
callq 0xf300
movq (%rsp), %rax
testq %rax, %rax
movq %r14, %rbx
je 0x1634d
lock
decl (%rax)
jne 0x1634d
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
incl %r12d
movq %rbx, %rdi
callq 0xf4a0
cmpl %eax, %r12d
jl 0x16288
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf950
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x28, %esi
movq 0x20(%rsp), %rdi
jmp 0x163e1
movq %rax, %rbx
jmp 0x163a4
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xf450
leaq 0x38(%rsp), %rdi
callq 0xf300
jmp 0x163eb
movq %rax, %rbx
jmp 0x163d9
movq %rax, %rbx
movq (%rsp), %rax
testq %rax, %rax
je 0x163d9
lock
decl (%rax)
jne 0x163d9
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
movl $0x28, %esi
movq %r15, %rdi
callq 0xf0d0
jmp 0x1640c
movq %rax, %rbx
movq (%rsp), %rax
testq %rax, %rax
je 0x1640c
lock
decl (%rax)
jne 0x1640c
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
movq %rbx, %rdi
callq 0xf410
| _ZN9qdevtools10QFlagsEdit11setMetaEnumERK9QMetaEnum:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rsi
movups xmm0, xmmword ptr [rsi]
movups xmmword ptr [rdi+28h], xmm0
call __ZNK7QWidget6layoutEv; QWidget::layout(void)
mov r14, rax
mov rax, [rax]
loc_1613F:
mov rdi, r14
call qword ptr [rax+0C8h]
test eax, eax
jle short loc_16182
mov rax, [r14]
mov rdi, r14
xor esi, esi
call qword ptr [rax+0A8h]
mov r15, rax
mov rax, [rax]
mov rdi, r15
call qword ptr [rax+68h]
test rax, rax
jz short loc_16174
mov rcx, [rax]
mov rdi, rax
call qword ptr [rcx+20h]
loc_16174:
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+8]
mov rax, [r14]
jmp short loc_1613F
loc_16182:
mov rdi, rbx; this
call __ZNK9QMetaEnum6isFlagEv; QMetaEnum::isFlag(void)
test al, al
jz loc_1624D
mov rdi, rbx; this
call __ZNK9QMetaEnum8keyCountEv; QMetaEnum::keyCount(void)
test eax, eax
jle loc_16374
xor r12d, r12d
mov rbp, rsp
loc_161A8:
mov rdi, rbx; this
mov esi, r12d; int
call __ZNK9QMetaEnum3keyEi; QMetaEnum::key(int)
mov r13, rax
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
test r13, r13
jz short loc_161D5
mov rdi, r13
call _strlen
mov rsi, rax
jmp short loc_161D7
loc_161D5:
xor esi, esi
loc_161D7:
lea rdi, [rsp+88h+var_50]
mov rdx, r13
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
movups xmm0, [rsp+88h+var_50]
movaps [rsp+88h+var_88], xmm0
mov rax, [rsp+88h+var_40]
mov [rsp+88h+var_78], rax
mov rdi, r15; this
mov rsi, rbp; QString *
xor edx, edx; QWidget *
call __ZN9QCheckBoxC1ERK7QStringP7QWidget; QCheckBox::QCheckBox(QString const&,QWidget *)
mov rax, qword ptr [rsp+88h+var_88]
test rax, rax
jz short loc_16225
lock dec dword ptr [rax]
jnz short loc_16225
mov rdi, qword ptr [rsp+88h+var_88]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_16225:
mov rdi, r14
mov rsi, r15
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
inc r12d
mov rdi, rbx; this
call __ZNK9QMetaEnum8keyCountEv; QMetaEnum::keyCount(void)
cmp r12d, eax
jl loc_161A8
jmp loc_16374
loc_1624D:
mov [rsp+88h+var_60], r14
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov [rsp+88h+var_68], rax
mov rdi, rax; this
xor esi, esi; QWidget *
call __ZN9QComboBoxC1EP7QWidget; QComboBox::QComboBox(QWidget *)
mov rdi, rbx; this
call __ZNK9QMetaEnum8keyCountEv; QMetaEnum::keyCount(void)
test eax, eax
jle loc_16361
xor r12d, r12d
lea r15, [rsp+88h+var_50]
lea rbp, [rsp+88h+var_58]
loc_16288:
mov rdi, rbx; this
mov rbx, r15
mov r15, rbp
mov r14, rdi
mov esi, r12d; int
call __ZNK9QMetaEnum3keyEi; QMetaEnum::key(int)
mov rbp, rax
test rax, rax
jz short loc_162B1
mov rdi, rbp
call _strlen
mov rsi, rax
jmp short loc_162B3
loc_162B1:
xor esi, esi
loc_162B3:
mov r13, rbx
mov rdi, rbx
mov rdx, rbp
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
movups xmm0, [rsp+88h+var_50]
movaps [rsp+88h+var_88], xmm0
mov rax, [rsp+88h+var_40]
mov [rsp+88h+var_78], rax
mov rdi, r14; this
mov esi, r12d; int
call __ZNK9QMetaEnum5valueEi; QMetaEnum::value(int)
mov rdi, r13; this
mov esi, eax; int
call __ZN8QVariantC1Ei; QVariant::QVariant(int)
mov r13, [rsp+88h+var_68]
mov rdi, r13; this
call __ZNK9QComboBox5countEv; QComboBox::count(void)
mov ebp, eax
mov rdi, r15; this
call __ZN5QIconC1Ev; QIcon::QIcon(void)
mov rdi, r13; this
mov esi, ebp; int
mov rbp, r15
mov rdx, r15; QIcon *
mov rcx, rsp; QString *
mov r15, rbx
mov r8, rbx; QVariant *
call __ZN9QComboBox10insertItemEiRK5QIconRK7QStringRK8QVariant; QComboBox::insertItem(int,QIcon const&,QString const&,QVariant const&)
mov rdi, rbp; this
call __ZN5QIconD1Ev; QIcon::~QIcon()
mov rdi, r15; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov rax, qword ptr [rsp+88h+var_88]
test rax, rax
mov rbx, r14
jz short loc_1634D
lock dec dword ptr [rax]
jnz short loc_1634D
mov rdi, qword ptr [rsp+88h+var_88]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_1634D:
inc r12d
mov rdi, rbx; this
call __ZNK9QMetaEnum8keyCountEv; QMetaEnum::keyCount(void)
cmp r12d, eax
jl loc_16288
loc_16361:
mov rdi, [rsp+88h+var_60]
mov rsi, [rsp+88h+var_68]
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
loc_16374:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov esi, 28h ; '('
mov rdi, [rsp+arg_18]
jmp short loc_163E1
mov rbx, rax
jmp short loc_163A4
mov rbx, rax
lea rdi, [rsp+arg_28]; this
call __ZN5QIconD1Ev; QIcon::~QIcon()
loc_163A4:
lea rdi, [rsp+arg_30]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
jmp short loc_163EB
mov rbx, rax
jmp short loc_163D9
mov rbx, rax
mov rax, [rsp+0]
test rax, rax
jz short loc_163D9
lock dec dword ptr [rax]
jnz short loc_163D9
mov rdi, [rsp+0]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_163D9:
mov esi, 28h ; '('; unsigned __int64
mov rdi, r15; void *
loc_163E1:
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1640C
mov rbx, rax
loc_163EB:
mov rax, [rsp+0]
test rax, rax
jz short loc_1640C
lock dec dword ptr [rax]
jnz short loc_1640C
mov rdi, [rsp+0]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_1640C:
mov rdi, rbx
call __Unwind_Resume
| long long qdevtools::QFlagsEdit::setMetaEnum(qdevtools::QFlagsEdit *this, const QMetaEnum *a2)
{
QMetaEnum *v2; // rbx
long long *v3; // r14
long long i; // rax
long long v5; // r15
long long v6; // rax
long long result; // rax
int v8; // r12d
long long v9; // r13
QCheckBox *v10; // r15
long long v11; // rsi
int v12; // r12d
QVariant *v13; // r15
QIcon *v14; // rbp
QMetaEnum *v15; // rdi
QVariant *v16; // rbx
QIcon *v17; // r15
long long v18; // rax
long long v19; // rbp
long long v20; // rsi
int v21; // eax
QComboBox *v22; // r13
int v23; // ebp
int v24; // esi
const QIcon *v25; // rdx
__int128 v26; // [rsp+0h] [rbp-88h] BYREF
long long v27; // [rsp+10h] [rbp-78h]
QComboBox *v28; // [rsp+20h] [rbp-68h]
long long *v29; // [rsp+28h] [rbp-60h]
char v30; // [rsp+30h] [rbp-58h] BYREF
__int128 v31; // [rsp+38h] [rbp-50h] BYREF
long long v32; // [rsp+48h] [rbp-40h]
v2 = a2;
*(_OWORD *)((char *)this + 40) = *(_OWORD *)a2;
v3 = (long long *)QWidget::layout(this);
for ( i = *v3; (*(int ( **)(long long *))(i + 200))(v3) > 0; i = *v3 )
{
v5 = (*(long long ( **)(long long *, _QWORD))(*v3 + 168))(v3, 0LL);
v6 = (*(long long ( **)(long long))(*(_QWORD *)v5 + 104LL))(v5);
if ( v6 )
(*(void ( **)(long long))(*(_QWORD *)v6 + 32LL))(v6);
(*(void ( **)(long long))(*(_QWORD *)v5 + 8LL))(v5);
}
if ( (unsigned __int8)QMetaEnum::isFlag(a2) )
{
result = QMetaEnum::keyCount(a2);
if ( (int)result > 0 )
{
v8 = 0;
do
{
v9 = QMetaEnum::key(v2, v8);
v10 = (QCheckBox *)operator new(0x28uLL);
if ( v9 )
v11 = strlen(v9);
else
v11 = 0LL;
QString::fromUtf8(&v31, v11, v9);
v26 = v31;
v27 = v32;
QCheckBox::QCheckBox(v10, (const QString *)&v26, 0LL);
if ( (_QWORD)v26 && !_InterlockedDecrement((volatile signed __int32 *)v26) )
QArrayData::deallocate(v26, 2LL);
QBoxLayout::addWidget(v3, v10, 0LL, 0LL);
++v8;
result = QMetaEnum::keyCount(v2);
}
while ( v8 < (int)result );
}
}
else
{
v29 = v3;
v28 = (QComboBox *)operator new(0x28uLL);
QComboBox::QComboBox(v28, 0LL);
if ( (int)QMetaEnum::keyCount(a2) > 0 )
{
v12 = 0;
v13 = (QVariant *)&v31;
v14 = (QIcon *)&v30;
do
{
v15 = v2;
v16 = v13;
v17 = v14;
v18 = QMetaEnum::key(v15, v12);
v19 = v18;
if ( v18 )
v20 = strlen(v18);
else
v20 = 0LL;
QString::fromUtf8(v16, v20, v19);
v26 = v31;
v27 = v32;
v21 = QMetaEnum::value(v15, v12);
QVariant::QVariant(v16, v21);
v22 = v28;
v23 = QComboBox::count(v28);
QIcon::QIcon(v17);
v24 = v23;
v14 = v17;
v25 = v17;
v13 = v16;
QComboBox::insertItem(v22, v24, v25, (const QString *)&v26, v16);
QIcon::~QIcon(v14);
QVariant::~QVariant(v16);
v2 = v15;
if ( (_QWORD)v26 && !_InterlockedDecrement((volatile signed __int32 *)v26) )
QArrayData::deallocate(v26, 2LL);
++v12;
}
while ( v12 < (int)QMetaEnum::keyCount(v15) );
}
return QBoxLayout::addWidget(v29, v28, 0LL, 0LL);
}
return result;
}
| setMetaEnum:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RSI
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS xmmword ptr [RDI + 0x28],XMM0
CALL 0x0010f820
MOV R14,RAX
MOV RAX,qword ptr [RAX]
LAB_0011613f:
MOV RDI,R14
CALL qword ptr [RAX + 0xc8]
TEST EAX,EAX
JLE 0x00116182
MOV RAX,qword ptr [R14]
MOV RDI,R14
XOR ESI,ESI
CALL qword ptr [RAX + 0xa8]
MOV R15,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,R15
CALL qword ptr [RAX + 0x68]
TEST RAX,RAX
JZ 0x00116174
MOV RCX,qword ptr [RAX]
MOV RDI,RAX
CALL qword ptr [RCX + 0x20]
LAB_00116174:
MOV RAX,qword ptr [R15]
MOV RDI,R15
CALL qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14]
JMP 0x0011613f
LAB_00116182:
MOV RDI,RBX
CALL 0x0010f7d0
TEST AL,AL
JZ 0x0011624d
MOV RDI,RBX
CALL 0x0010f4a0
TEST EAX,EAX
JLE 0x00116374
XOR R12D,R12D
MOV RBP,RSP
LAB_001161a8:
MOV RDI,RBX
MOV ESI,R12D
CALL 0x0010f940
MOV R13,RAX
MOV EDI,0x28
CALL 0x0010f910
MOV R15,RAX
TEST R13,R13
JZ 0x001161d5
MOV RDI,R13
CALL 0x0010f250
MOV RSI,RAX
JMP 0x001161d7
LAB_001161d5:
XOR ESI,ESI
LAB_001161d7:
LEA RDI,[RSP + 0x38]
MOV RDX,R13
CALL 0x0010f6f0
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVAPS xmmword ptr [RSP],XMM0
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x10],RAX
LAB_001161f7:
MOV RDI,R15
MOV RSI,RBP
XOR EDX,EDX
CALL 0x0010f7f0
LAB_00116204:
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x00116225
DEC.LOCK dword ptr [RAX]
JNZ 0x00116225
MOV RDI,qword ptr [RSP]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x0010f610
LAB_00116225:
MOV RDI,R14
MOV RSI,R15
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f950
INC R12D
MOV RDI,RBX
CALL 0x0010f4a0
CMP R12D,EAX
JL 0x001161a8
JMP 0x00116374
LAB_0011624d:
MOV qword ptr [RSP + 0x28],R14
MOV EDI,0x28
CALL 0x0010f910
LAB_0011625c:
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0010f4d0
LAB_0011626b:
MOV RDI,RBX
CALL 0x0010f4a0
TEST EAX,EAX
JLE 0x00116361
XOR R12D,R12D
LEA R15,[RSP + 0x38]
LEA RBP,[RSP + 0x30]
LAB_00116288:
MOV RDI,RBX
MOV RBX,R15
MOV R15,RBP
MOV R14,RDI
MOV ESI,R12D
CALL 0x0010f940
MOV RBP,RAX
TEST RAX,RAX
JZ 0x001162b1
MOV RDI,RBP
CALL 0x0010f250
MOV RSI,RAX
JMP 0x001162b3
LAB_001162b1:
XOR ESI,ESI
LAB_001162b3:
MOV R13,RBX
MOV RDI,RBX
MOV RDX,RBP
CALL 0x0010f6f0
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVAPS xmmword ptr [RSP],XMM0
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x10],RAX
LAB_001162d4:
MOV RDI,R14
MOV ESI,R12D
CALL 0x0010fd40
MOV RDI,R13
MOV ESI,EAX
CALL 0x0010f890
LAB_001162e9:
MOV R13,qword ptr [RSP + 0x20]
MOV RDI,R13
CALL 0x0010f960
MOV EBP,EAX
MOV RDI,R15
CALL 0x0010f360
LAB_00116300:
MOV RDI,R13
MOV ESI,EBP
MOV RBP,R15
MOV RDX,R15
MOV RCX,RSP
MOV R15,RBX
MOV R8,RBX
CALL 0x0010f390
LAB_00116319:
MOV RDI,RBP
CALL 0x0010f450
MOV RDI,R15
CALL 0x0010f300
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
MOV RBX,R14
JZ 0x0011634d
DEC.LOCK dword ptr [RAX]
JNZ 0x0011634d
MOV RDI,qword ptr [RSP]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x0010f610
LAB_0011634d:
INC R12D
MOV RDI,RBX
CALL 0x0010f4a0
CMP R12D,EAX
JL 0x00116288
LAB_00116361:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x20]
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f950
LAB_00116374:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* qdevtools::QFlagsEdit::setMetaEnum(QMetaEnum const&) */
void __thiscall qdevtools::QFlagsEdit::setMetaEnum(QFlagsEdit *this,QMetaEnum *param_1)
{
int8 uVar1;
QComboBox *pQVar2;
char cVar3;
int iVar4;
int iVar5;
int iVar6;
uint uVar7;
long *plVar8;
long lVar9;
long *plVar10;
long *plVar11;
char *pcVar12;
QCheckBox *this_00;
size_t sVar13;
QArrayData *local_88;
int8 uStack_80;
int8 local_78;
QComboBox *local_68;
long *local_60;
QIcon local_58 [8];
QArrayData *local_50;
int8 uStack_48;
int8 local_40;
uVar1 = *(int8 *)(param_1 + 8);
*(int8 *)(this + 0x28) = *(int8 *)param_1;
*(int8 *)(this + 0x30) = uVar1;
plVar8 = (long *)QWidget::layout();
lVar9 = *plVar8;
while (iVar4 = (**(code **)(lVar9 + 200))(plVar8), 0 < iVar4) {
plVar10 = (long *)(**(code **)(*plVar8 + 0xa8))(plVar8);
plVar11 = (long *)(**(code **)(*plVar10 + 0x68))(plVar10);
if (plVar11 != (long *)0x0) {
(**(code **)(*plVar11 + 0x20))(plVar11);
}
(**(code **)(*plVar10 + 8))(plVar10);
lVar9 = *plVar8;
}
cVar3 = QMetaEnum::isFlag();
iVar4 = (int)param_1;
if (cVar3 == '\0') {
local_60 = plVar8;
local_68 = (QComboBox *)operator_new(0x28);
/* try { // try from 0011625c to 0011626a has its CatchHandler @ 00116383 */
QComboBox::QComboBox(local_68,(QWidget *)0x0);
iVar5 = QMetaEnum::keyCount();
if (0 < iVar5) {
iVar5 = 0;
do {
pcVar12 = (char *)QMetaEnum::key(iVar4);
if (pcVar12 == (char *)0x0) {
sVar13 = 0;
}
else {
sVar13 = strlen(pcVar12);
}
QString::fromUtf8((QVariant *)&local_50,sVar13,pcVar12);
local_88 = local_50;
uStack_80 = uStack_48;
local_78 = local_40;
/* try { // try from 001162d4 to 001162e8 has its CatchHandler @ 001163e8 */
iVar6 = QMetaEnum::value(iVar4);
QVariant::QVariant((QVariant *)&local_50,iVar6);
pQVar2 = local_68;
/* try { // try from 001162e9 to 001162f5 has its CatchHandler @ 00116392 */
uVar7 = QComboBox::count();
QIcon::QIcon(local_58);
/* try { // try from 00116300 to 00116318 has its CatchHandler @ 00116397 */
QComboBox::insertItem
((int)pQVar2,(QIcon *)(ulong)uVar7,(QString *)local_58,(QVariant *)&local_88);
QIcon::~QIcon(local_58);
QVariant::~QVariant((QVariant *)&local_50);
if (local_88 != (QArrayData *)0x0) {
LOCK();
*(int *)local_88 = *(int *)local_88 + -1;
UNLOCK();
if (*(int *)local_88 == 0) {
QArrayData::deallocate(local_88,2,8);
}
}
iVar5 = iVar5 + 1;
iVar6 = QMetaEnum::keyCount();
} while (iVar5 < iVar6);
}
QBoxLayout::addWidget(local_60,local_68,0,0);
}
else {
iVar5 = QMetaEnum::keyCount();
if (0 < iVar5) {
iVar5 = 0;
do {
pcVar12 = (char *)QMetaEnum::key(iVar4);
this_00 = (QCheckBox *)operator_new(0x28);
if (pcVar12 == (char *)0x0) {
sVar13 = 0;
}
else {
sVar13 = strlen(pcVar12);
}
/* try { // try from 001161d7 to 001161e3 has its CatchHandler @ 001163b0 */
QString::fromUtf8(&local_50,sVar13,pcVar12);
local_88 = local_50;
uStack_80 = uStack_48;
local_78 = local_40;
/* try { // try from 001161f7 to 00116203 has its CatchHandler @ 001163b5 */
QCheckBox::QCheckBox(this_00,(QString *)&local_88,(QWidget *)0x0);
if (local_88 != (QArrayData *)0x0) {
LOCK();
*(int *)local_88 = *(int *)local_88 + -1;
UNLOCK();
if (*(int *)local_88 == 0) {
QArrayData::deallocate(local_88,2,8);
}
}
QBoxLayout::addWidget(plVar8,this_00,0,0);
iVar5 = iVar5 + 1;
iVar6 = QMetaEnum::keyCount();
} while (iVar5 < iVar6);
}
}
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.