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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
12,400
|
my_base64_needed_encoded_length
|
eloqsql/mysys/base64.c
|
int
my_base64_needed_encoded_length(int length_of_data)
{
int nb_base64_chars;
nb_base64_chars= (length_of_data + 2) / 3 * 4;
return
nb_base64_chars + /* base64 char incl padding */
(nb_base64_chars - 1)/ 76 + /* newlines */
1; /* NUL termination of string */
}
|
O3
|
c
|
my_base64_needed_encoded_length:
pushq %rbp
movq %rsp, %rbp
addl $0x2, %edi
movslq %edi, %rax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
leal -0x1(,%rax,4), %ecx
movslq %ecx, %rcx
imulq $0x6bca1af3, %rcx, %rcx # imm = 0x6BCA1AF3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
leal (%rcx,%rax,4), %eax
incl %eax
popq %rbp
retq
|
my_base64_needed_encoded_length:
push rbp
mov rbp, rsp
add edi, 2
movsxd rax, edi
imul rax, 55555556h
mov rcx, rax
shr rcx, 3Fh
shr rax, 20h
add eax, ecx
lea ecx, ds:0FFFFFFFFFFFFFFFFh[rax*4]
movsxd rcx, ecx
imul rcx, 6BCA1AF3h
mov rdx, rcx
shr rdx, 3Fh
sar rcx, 25h
add ecx, edx
lea eax, [rcx+rax*4]
inc eax
pop rbp
retn
|
long long my_base64_needed_encoded_length(int a1)
{
return (unsigned int)((4 * ((a1 + 2) / 3) - 1) / 76 + 4 * ((a1 + 2) / 3) + 1);
}
|
my_base64_needed_encoded_length:
PUSH RBP
MOV RBP,RSP
ADD EDI,0x2
MOVSXD RAX,EDI
IMUL RAX,RAX,0x55555556
MOV RCX,RAX
SHR RCX,0x3f
SHR RAX,0x20
ADD EAX,ECX
LEA ECX,[-0x1 + RAX*0x4]
MOVSXD RCX,ECX
IMUL RCX,RCX,0x6bca1af3
MOV RDX,RCX
SHR RDX,0x3f
SAR RCX,0x25
ADD ECX,EDX
LEA EAX,[RCX + RAX*0x4]
INC EAX
POP RBP
RET
|
int my_base64_needed_encoded_length(int param_1)
{
int iVar1;
iVar1 = (param_1 + 2) / 3;
return (iVar1 * 4 + -1) / 0x4c + iVar1 * 4 + 1;
}
|
|
12,401
|
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 0x5ea62
jmp 0x5ea64
jmp 0x5ea66
jmp 0x5ea68
jmp 0x5ea6a
movq -0x18(%rbp), %rax
movb $0x1, 0x21(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x38(%rax)
jne 0x5eb0b
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 0x99ea0
movb %al, -0x19(%rbp)
jmp 0x5eafe
jmp 0x5eb00
movb -0x19(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x5ebb4
jmp 0x5eb0d
jmp 0x5eb0f
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 0x99ea0
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 0xdea60
jmp 0x5ebac
jmp 0x5ebae
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_5EA62:
jmp short $+2
loc_5EA64:
jmp short $+2
loc_5EA66:
jmp short $+2
loc_5EA68:
jmp short $+2
loc_5EA6A:
mov rax, [rbp+var_18]
mov byte ptr [rax+21h], 1
mov rax, [rbp+var_18]
cmp dword ptr [rax+38h], 0
jnz loc_5EB0B
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_5EAFE:
jmp short $+2
loc_5EB00:
mov al, [rbp+var_19]
mov [rbp+var_1], al
jmp loc_5EBB4
loc_5EB0B:
jmp short $+2
loc_5EB0D:
jmp short $+2
loc_5EB0F:
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_5EBAC:
jmp short $+2
loc_5EBAE:
mov al, [rbp+var_19]
mov [rbp+var_1], al
loc_5EBB4:
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 0x0015ea62
LAB_0015ea62:
JMP 0x0015ea64
LAB_0015ea64:
JMP 0x0015ea66
LAB_0015ea66:
JMP 0x0015ea68
LAB_0015ea68:
JMP 0x0015ea6a
LAB_0015ea6a:
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 0x0015eb0b
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 0x00199ea0
MOV byte ptr [RBP + -0x19],AL
JMP 0x0015eafe
LAB_0015eafe:
JMP 0x0015eb00
LAB_0015eb00:
MOV AL,byte ptr [RBP + -0x19]
MOV byte ptr [RBP + -0x1],AL
JMP 0x0015ebb4
LAB_0015eb0b:
JMP 0x0015eb0d
LAB_0015eb0d:
JMP 0x0015eb0f
LAB_0015eb0f:
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 0x00199ea0
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 0x001dea60
JMP 0x0015ebac
LAB_0015ebac:
JMP 0x0015ebae
LAB_0015ebae:
MOV AL,byte ptr [RBP + -0x19]
MOV byte ptr [RBP + -0x1],AL
LAB_0015ebb4:
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);
}
|
|
12,402
|
my_setwd
|
eloqsql/mysys/my_getwd.c
|
int my_setwd(const char *dir, myf MyFlags)
{
int res;
size_t length;
char *start, *pos;
DBUG_ENTER("my_setwd");
DBUG_PRINT("my",("dir: '%s' MyFlags %lu", dir, MyFlags));
start=(char *) dir;
if (! dir[0] || (dir[0] == FN_LIBCHAR && dir[1] == 0))
dir=FN_ROOTDIR;
if ((res=chdir((char*) dir)) != 0)
{
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_SETWD,MYF(ME_BELL),start,errno);
}
else
{
if (test_if_hard_path(start))
{ /* Hard pathname */
pos= strmake(&curr_dir[0],start,(size_t) FN_REFLEN-1);
if (pos[-1] != FN_LIBCHAR)
{
length=(uint) (pos-(char*) curr_dir);
curr_dir[length]=FN_LIBCHAR; /* must end with '/' */
curr_dir[length+1]='\0';
}
}
else
curr_dir[0]='\0'; /* Don't save name */
}
DBUG_RETURN(res);
}
|
O0
|
c
|
my_setwd:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0xefc72
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0xefc9c
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xefca7
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0xefca7
leaq 0x64506(%rip), %rax # 0x1541a9
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2a900
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0xefd00
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x34(%rbp)
callq 0xf5a70
movl -0x34(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0xefcfe
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x2a760
movq -0x40(%rbp), %rdx
movl (%rax), %ecx
movl $0x11, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0xef520
jmp 0xefd75
movq -0x28(%rbp), %rdi
callq 0xefd90
cmpl $0x0, %eax
je 0xefd69
movq -0x28(%rbp), %rsi
leaq 0xb91c97(%rip), %rdi # 0xc819b0
movl $0x1ff, %edx # imm = 0x1FF
callq 0x14d810
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
je 0xefd67
movq -0x30(%rbp), %rax
leaq 0xb91c71(%rip), %rcx # 0xc819b0
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
leaq 0xb91c5d(%rip), %rax # 0xc819b0
movb $0x2f, (%rax,%rcx)
movq -0x20(%rbp), %rcx
leaq 0xb91c4e(%rip), %rax # 0xc819b0
movb $0x0, 0x1(%rax,%rcx)
jmp 0xefd73
leaq 0xb91c40(%rip), %rax # 0xc819b0
movb $0x0, (%rax)
jmp 0xefd75
jmp 0xefd77
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_setwd:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_EFC72:
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
cmp byte ptr [rax], 0
jz short loc_EFC9C
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_EFCA7
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+1]
cmp eax, 0
jnz short loc_EFCA7
loc_EFC9C:
lea rax, word_1541A9
mov [rbp+var_8], rax
loc_EFCA7:
mov rdi, [rbp+var_8]
call _chdir
mov [rbp+var_14], eax
cmp eax, 0
jz short loc_EFD00
call ___errno_location
mov eax, [rax]
mov [rbp+var_34], eax
call _my_thread_var
mov ecx, [rbp+var_34]
mov [rax], ecx
mov rax, [rbp+var_10]
and rax, 10h
cmp rax, 0
jz short loc_EFCFE
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
call ___errno_location
mov rdx, [rbp+var_40]
mov ecx, [rax]
mov edi, 11h
mov esi, 4
mov al, 0
call my_error
loc_EFCFE:
jmp short loc_EFD75
loc_EFD00:
mov rdi, [rbp+var_28]
call test_if_hard_path
cmp eax, 0
jz short loc_EFD69
mov rsi, [rbp+var_28]
lea rdi, curr_dir
mov edx, 1FFh
call strmake
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jz short loc_EFD67
mov rax, [rbp+var_30]
lea rcx, curr_dir
sub rax, rcx
mov eax, eax
mov [rbp+var_20], rax
mov rcx, [rbp+var_20]
lea rax, curr_dir
mov byte ptr [rax+rcx], 2Fh ; '/'
mov rcx, [rbp+var_20]
lea rax, curr_dir
mov byte ptr [rax+rcx+1], 0
loc_EFD67:
jmp short loc_EFD73
loc_EFD69:
lea rax, curr_dir
mov byte ptr [rax], 0
loc_EFD73:
jmp short $+2
loc_EFD75:
jmp short $+2
loc_EFD77:
mov eax, [rbp+var_14]
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
add rsp, 50h
pop rbp
retn
|
long long my_setwd(__int16 *a1, const char *a2)
{
unsigned int *v2; // rax
int v4; // [rsp+1Ch] [rbp-34h]
long long v5; // [rsp+20h] [rbp-30h]
unsigned int v6; // [rsp+3Ch] [rbp-14h]
__int16 *v7; // [rsp+48h] [rbp-8h]
v7 = a1;
if ( !*(_BYTE *)a1 || *(_BYTE *)a1 == 47 && !*((_BYTE *)a1 + 1) )
v7 = &word_1541A9;
v6 = chdir(v7);
if ( v6 )
{
v4 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(v7, a2) = v4;
if ( ((unsigned __int8)a2 & 0x10) != 0 )
{
v2 = (unsigned int *)__errno_location();
my_error(0x11u, 4LL, a1, *v2);
}
}
else if ( (unsigned int)test_if_hard_path(a1) )
{
v5 = strmake(curr_dir, a1, 511LL);
if ( *(_BYTE *)(v5 - 1) != 47 )
{
curr_dir[(unsigned int)(v5 - (_QWORD)curr_dir)] = 47;
curr_dir[(unsigned int)(v5 - (_QWORD)curr_dir) + 1] = 0;
}
}
else
{
curr_dir[0] = 0;
}
return v6;
}
|
my_setwd:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x001efc72
LAB_001efc72:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX],0x0
JZ 0x001efc9c
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001efca7
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
JNZ 0x001efca7
LAB_001efc9c:
LEA RAX,[0x2541a9]
MOV qword ptr [RBP + -0x8],RAX
LAB_001efca7:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a900
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JZ 0x001efd00
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
CALL 0x001f5a70
MOV ECX,dword ptr [RBP + -0x34]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x10
CMP RAX,0x0
JZ 0x001efcfe
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
CALL 0x0012a760
MOV RDX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RAX]
MOV EDI,0x11
MOV ESI,0x4
MOV AL,0x0
CALL 0x001ef520
LAB_001efcfe:
JMP 0x001efd75
LAB_001efd00:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001efd90
CMP EAX,0x0
JZ 0x001efd69
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[0xd819b0]
MOV EDX,0x1ff
CALL 0x0024d810
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JZ 0x001efd67
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0xd819b0]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0xd819b0]
MOV byte ptr [RAX + RCX*0x1],0x2f
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0xd819b0]
MOV byte ptr [RAX + RCX*0x1 + 0x1],0x0
LAB_001efd67:
JMP 0x001efd73
LAB_001efd69:
LEA RAX,[0xd819b0]
MOV byte ptr [RAX],0x0
LAB_001efd73:
JMP 0x001efd75
LAB_001efd75:
JMP 0x001efd77
LAB_001efd77:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
ADD RSP,0x50
POP RBP
RET
|
int my_setwd(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
uint uVar3;
int *piVar4;
long lVar5;
char *local_10;
if ((*param_1 == '\0') || ((local_10 = param_1, *param_1 == '/' && (param_1[1] == '\0')))) {
local_10 = "/";
}
iVar1 = chdir(local_10);
if (iVar1 == 0) {
iVar2 = test_if_hard_path(param_1);
if (iVar2 == 0) {
curr_dir = 0;
}
else {
lVar5 = strmake(&curr_dir,param_1,0x1ff);
if (*(char *)(lVar5 + -1) != '/') {
uVar3 = (int)lVar5 - 0xd819b0;
(&curr_dir)[uVar3] = 0x2f;
(&DAT_00d819b1)[uVar3] = 0;
}
}
}
else {
piVar4 = __errno_location();
iVar2 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar2;
if ((param_2 & 0x10) != 0) {
piVar4 = __errno_location();
my_error(0x11,4,param_1,*piVar4);
}
}
return iVar1;
}
|
|
12,403
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [6], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12]>(char const (&) [6], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12])
|
monkey531[P]llama/common/./json.hpp
|
inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
}
|
O1
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [6], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12]>(char const (&) [6], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12]):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x1f4d0
movq %rax, %r12
movq (%r14), %rdi
callq 0x1f4d0
addq %rax, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x200d0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20520
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x20520
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x892df
movq (%r13), %rsi
incq %rsi
callq 0x1fae0
movq %r14, %rdi
callq 0x20380
|
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA28_KcPS9_EEET_DpOT0_:
push r15
push r14
push r13
push r12
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r13, [rdi+10h]
mov [rdi], r13
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
call _strlen
mov r12, rax
mov rdi, [r14]
call _strlen
add r12, rax
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r14]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r13
jz short loc_892DF
mov rsi, [r13+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_892DF:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>(
long long a1,
long long a2,
_QWORD *a3)
{
long long v4; // r12
long long v5; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = strlen(a2);
v5 = strlen(*a3);
std::string::reserve(a1, v5 + v4);
std::string::append(a1, a2);
std::string::append(a1, *a3);
return a1;
}
|
concat<std::__cxx11::string,char_const(&)[28],char_const*>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R13,[RDI + 0x10]
MOV qword ptr [RDI],R13
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
CALL 0x0011f4d0
MOV R12,RAX
MOV RDI,qword ptr [R14]
CALL 0x0011f4d0
ADD R12,RAX
LAB_0018929a:
MOV RDI,RBX
MOV RSI,R12
CALL 0x001200d0
MOV RDI,RBX
MOV RSI,R15
CALL 0x00120520
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x00120520
LAB_001892bb:
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [28], char const*>(char const (&) [28], char const*&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[28],char_const*>
(detail *this,char *param_1,char **param_2)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
strlen(param_1);
strlen(*param_2);
/* try { // try from 0018929a to 001892ba has its CatchHandler @ 001892c8 */
std::__cxx11::string::reserve((ulong)this);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::append((char *)this);
return this;
}
|
|
12,404
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [6], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12]>(char const (&) [6], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12])
|
monkey531[P]llama/common/./json.hpp
|
inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
}
|
O2
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [6], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12]>(char const (&) [6], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12]):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x4f2ed
movq %rbx, %rdi
movq %rax, %rsi
callq 0x29110
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xbfc58
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x29678
movq %r14, %rdi
callq 0x293c0
|
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_:
push r15
push r14
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
and qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
mov rsi, rdx
call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJPKcEEEmS4_DpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(char const*,char const* const&)
mov rdi, rbx
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA32_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_
mov rax, rbx
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(
long long a1,
long long a2,
_QWORD *a3)
{
long long v4; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(a2, a3);
std::string::reserve(a1, v4);
ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA32_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_(
a1,
a2,
a3);
return a1;
}
|
concat<std::__cxx11::string,char_const(&)[32],char_const*>:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
AND qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
MOV RSI,RDX
CALL 0x0014f2ed
LAB_001bfbe7:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00129110
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x001bfc58
LAB_001bfc00:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [32], char const*>(char const (&) [32], char const*&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[32],char_const*>
(detail *this,char *param_1,char **param_2)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
concat_length<char_const*>(param_1,param_2);
/* try { // try from 001bfbe7 to 001bfbff has its CatchHandler @ 001bfc09 */
std::__cxx11::string::reserve((ulong)this);
_ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA32_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_
(this,param_1,param_2);
return this;
}
|
|
12,405
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [6], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12]>(char const (&) [6], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12])
|
monkey531[P]llama/common/./json.hpp
|
inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
}
|
O3
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [6], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12]>(char const (&) [6], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [12]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %rbp
movq %rbp, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x1f4d0
movq %rax, %r13
addq 0x8(%r15), %r13
movq %r14, %rdi
callq 0x1f4d0
addq %rax, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x200d0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x20520
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x1f310
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20520
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %rbp, %rdi
je 0xf4a8a
movq (%rbp), %rsi
incq %rsi
callq 0x1fae0
movq %r14, %rdi
callq 0x20380
|
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA13_KcS8_RA17_S9_EEET_DpOT0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
lea rbp, [rdi+10h]
mov [rdi], rbp
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
call _strlen
mov r13, rax
add r13, [r15+8]
mov rdi, r14
call _strlen
add r13, rax
mov rdi, rbx
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, rbp
jz short loc_F4A8A
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F4A8A:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[13],std::string,char const(&)[17]>(
long long a1,
long long a2,
_QWORD *a3,
long long a4)
{
long long v6; // r13
long long v7; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v6 = a3[1] + strlen(a2);
v7 = strlen(a4);
std::string::reserve(a1, v7 + v6);
std::string::append(a1, a2);
std::string::_M_append(a1, *a3);
std::string::append(a1, a4);
return a1;
}
|
concat<std::__cxx11::string,char_const(&)[13],std::__cxx11::string,char_const(&)[17]>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
LEA RBP,[RDI + 0x10]
MOV qword ptr [RDI],RBP
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
CALL 0x0011f4d0
MOV R13,RAX
ADD R13,qword ptr [R15 + 0x8]
MOV RDI,R14
CALL 0x0011f4d0
ADD R13,RAX
LAB_001f4a31:
MOV RDI,RBX
MOV RSI,R13
CALL 0x001200d0
MOV RDI,RBX
MOV RSI,R12
CALL 0x00120520
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,RBX
CALL 0x0011f310
MOV RDI,RBX
MOV RSI,R14
CALL 0x00120520
LAB_001f4a61:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [13], std::__cxx11::string, char const (&) [17]>(char const (&) [13], std::__cxx11::string&&,
char const (&) [17]) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[13],std::__cxx11::string,char_const(&)[17]>
(detail *this,char *param_1,string *param_2,char *param_3)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
strlen(param_1);
strlen(param_3);
/* try { // try from 001f4a31 to 001f4a60 has its CatchHandler @ 001f4a73 */
std::__cxx11::string::reserve((ulong)this);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::_M_append((char *)this,*(ulong *)param_2);
std::__cxx11::string::append((char *)this);
return this;
}
|
|
12,406
|
maria_get_pointer_length
|
eloqsql/storage/maria/ma_create.c
|
uint maria_get_pointer_length(ulonglong file_length, uint def)
{
DBUG_ASSERT(def >= 2 && def <= 7);
if (file_length) /* If not default */
{
#ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS
if (file_length >= (1ULL << 56))
def=8;
else
#endif
if (file_length >= (1ULL << 48))
def=7;
else if (file_length >= (1ULL << 40))
def=6;
else if (file_length >= (1ULL << 32))
def=5;
else if (file_length >= (1ULL << 24))
def=4;
else if (file_length >= (1ULL << 16))
def=3;
else
def=2;
}
return def;
}
|
O0
|
c
|
maria_get_pointer_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0x736fd
cmpq $0x0, -0x8(%rbp)
je 0x7378a
movabsq $0x1000000000000, %rax # imm = 0x1000000000000
cmpq %rax, -0x8(%rbp)
jb 0x73721
movl $0x7, -0xc(%rbp)
jmp 0x73788
movabsq $0x10000000000, %rax # imm = 0x10000000000
cmpq %rax, -0x8(%rbp)
jb 0x7373a
movl $0x6, -0xc(%rbp)
jmp 0x73786
movabsq $0x100000000, %rax # imm = 0x100000000
cmpq %rax, -0x8(%rbp)
jb 0x73753
movl $0x5, -0xc(%rbp)
jmp 0x73784
cmpq $0x1000000, -0x8(%rbp) # imm = 0x1000000
jb 0x73766
movl $0x4, -0xc(%rbp)
jmp 0x73782
cmpq $0x10000, -0x8(%rbp) # imm = 0x10000
jb 0x73779
movl $0x3, -0xc(%rbp)
jmp 0x73780
movl $0x2, -0xc(%rbp)
jmp 0x73782
jmp 0x73784
jmp 0x73786
jmp 0x73788
jmp 0x7378a
movl -0xc(%rbp), %eax
popq %rbp
retq
nop
|
maria_get_pointer_length:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_736FD:
cmp [rbp+var_8], 0
jz loc_7378A
mov rax, 1000000000000h
cmp [rbp+var_8], rax
jb short loc_73721
mov [rbp+var_C], 7
jmp short loc_73788
loc_73721:
mov rax, 10000000000h
cmp [rbp+var_8], rax
jb short loc_7373A
mov [rbp+var_C], 6
jmp short loc_73786
loc_7373A:
mov rax, 100000000h
cmp [rbp+var_8], rax
jb short loc_73753
mov [rbp+var_C], 5
jmp short loc_73784
loc_73753:
cmp [rbp+var_8], 1000000h
jb short loc_73766
mov [rbp+var_C], 4
jmp short loc_73782
loc_73766:
cmp [rbp+var_8], 10000h
jb short loc_73779
mov [rbp+var_C], 3
jmp short loc_73780
loc_73779:
mov [rbp+var_C], 2
loc_73780:
jmp short $+2
loc_73782:
jmp short $+2
loc_73784:
jmp short $+2
loc_73786:
jmp short $+2
loc_73788:
jmp short $+2
loc_7378A:
mov eax, [rbp+var_C]
pop rbp
retn
|
long long maria_get_pointer_length(unsigned long long a1, unsigned int a2)
{
if ( a1 )
{
if ( a1 < 0x1000000000000LL )
{
if ( a1 < 0x10000000000LL )
{
if ( a1 < 0x100000000LL )
{
if ( a1 < 0x1000000 )
{
if ( a1 < 0x10000 )
return 2;
else
return 3;
}
else
{
return 4;
}
}
else
{
return 5;
}
}
else
{
return 6;
}
}
else
{
return 7;
}
}
return a2;
}
|
maria_get_pointer_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
JMP 0x001736fd
LAB_001736fd:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0017378a
MOV RAX,0x1000000000000
CMP qword ptr [RBP + -0x8],RAX
JC 0x00173721
MOV dword ptr [RBP + -0xc],0x7
JMP 0x00173788
LAB_00173721:
MOV RAX,0x10000000000
CMP qword ptr [RBP + -0x8],RAX
JC 0x0017373a
MOV dword ptr [RBP + -0xc],0x6
JMP 0x00173786
LAB_0017373a:
MOV RAX,0x100000000
CMP qword ptr [RBP + -0x8],RAX
JC 0x00173753
MOV dword ptr [RBP + -0xc],0x5
JMP 0x00173784
LAB_00173753:
CMP qword ptr [RBP + -0x8],0x1000000
JC 0x00173766
MOV dword ptr [RBP + -0xc],0x4
JMP 0x00173782
LAB_00173766:
CMP qword ptr [RBP + -0x8],0x10000
JC 0x00173779
MOV dword ptr [RBP + -0xc],0x3
JMP 0x00173780
LAB_00173779:
MOV dword ptr [RBP + -0xc],0x2
LAB_00173780:
JMP 0x00173782
LAB_00173782:
JMP 0x00173784
LAB_00173784:
JMP 0x00173786
LAB_00173786:
JMP 0x00173788
LAB_00173788:
JMP 0x0017378a
LAB_0017378a:
MOV EAX,dword ptr [RBP + -0xc]
POP RBP
RET
|
int4 maria_get_pointer_length(ulong param_1,int4 param_2)
{
int4 local_14;
local_14 = param_2;
if (param_1 != 0) {
if (param_1 < 0x1000000000000) {
if (param_1 < 0x10000000000) {
if (param_1 < 0x100000000) {
if (param_1 < 0x1000000) {
if (param_1 < 0x10000) {
local_14 = 2;
}
else {
local_14 = 3;
}
}
else {
local_14 = 4;
}
}
else {
local_14 = 5;
}
}
else {
local_14 = 6;
}
}
else {
local_14 = 7;
}
}
return local_14;
}
|
|
12,407
|
ftxui::TerminalInputParser::ParseUTF8()
|
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/terminal_input_parser.cpp
|
TerminalInputParser::Output TerminalInputParser::ParseUTF8() {
auto head = Current();
unsigned char selector = 0b1000'0000; // NOLINT
// The non code-point part of the first byte.
unsigned char mask = selector;
// Find the first zero in the first byte.
unsigned int first_zero = 8; // NOLINT
for (unsigned int i = 0; i < 8; ++i) { // NOLINT
mask |= selector;
if (!(head & selector)) {
first_zero = i;
break;
}
selector >>= 1U;
}
// Accumulate the value of the first byte.
auto value = uint32_t(head & ~mask); // NOLINT
// Invalid UTF8, with more than 5 bytes.
const unsigned int max_utf8_bytes = 5;
if (first_zero == 1 || first_zero >= max_utf8_bytes) {
return DROP;
}
// Multi byte UTF-8.
for (unsigned int i = 2; i <= first_zero; ++i) {
if (!Eat()) {
return UNCOMPLETED;
}
// Invalid continuation byte.
head = Current();
if ((head & 0b1100'0000) != 0b1000'0000) { // NOLINT
return DROP;
}
value <<= 6; // NOLINT
value += head & 0b0011'1111; // NOLINT
}
// Check for overlong UTF8 encoding.
int extra_byte = 0;
if (value <= 0b000'0000'0111'1111) { // NOLINT
extra_byte = 0; // NOLINT
} else if (value <= 0b000'0111'1111'1111) { // NOLINT
extra_byte = 1; // NOLINT
} else if (value <= 0b1111'1111'1111'1111) { // NOLINT
extra_byte = 2; // NOLINT
} else if (value <= 0b1'0000'1111'1111'1111'1111) { // NOLINT
extra_byte = 3; // NOLINT
} else { // NOLINT
return DROP;
}
if (extra_byte != position_) {
return DROP;
}
return CHARACTER;
}
|
O1
|
cpp
|
ftxui::TerminalInputParser::ParseUTF8():
pushq %rbx
movq %rdi, %rax
movslq 0x8(%rsi), %rdx
movq 0x10(%rsi), %rcx
movzbl (%rcx,%rdx), %r9d
movl $0x80, %edi
movb $-0x80, %r8b
xorl %edx, %edx
movl %r8d, %r10d
movl %edi, %r8d
orb %r10b, %r8b
testl %r9d, %edi
je 0x3368d
shrl %edi
incl %edx
cmpl $0x8, %edx
jne 0x33671
movl $0x8, %edx
cmpl $0x1, %edx
sete %dil
cmpl $0x5, %edx
setae %r10b
orb %dil, %r10b
movl $0x1, %edi
jne 0x3373c
movzbl %r8b, %r8d
notl %r8d
andl %r9d, %r8d
cmpl $0x2, %edx
jb 0x336f3
movslq 0x8(%rsi), %r9
movslq 0x18(%rsi), %r10
incq %r9
decl %edx
movl %r9d, 0x8(%rsi)
cmpq %r10, %r9
jge 0x3373a
movzbl (%rcx,%r9), %r11d
movl %r11d, %ebx
andl $-0x40, %ebx
cmpl $0x80, %ebx
jne 0x3373c
shll $0x6, %r8d
andl $0x3f, %r11d
orl %r11d, %r8d
incq %r9
decl %edx
jne 0x336c5
xorl %ecx, %ecx
cmpl $0x80, %r8d
jb 0x3372d
movl $0x1, %ecx
cmpl $0x800, %r8d # imm = 0x800
jb 0x3372d
movl $0x2, %ecx
cmpl $0x10000, %r8d # imm = 0x10000
jb 0x3372d
movl $0x1, %edi
movl $0x3, %ecx
cmpl $0x10ffff, %r8d # imm = 0x10FFFF
ja 0x3373c
xorl %edi, %edi
cmpl 0x8(%rsi), %ecx
sete %dil
incl %edi
jmp 0x3373c
xorl %edi, %edi
movl %edi, (%rax)
popq %rbx
retq
|
_ZN5ftxui19TerminalInputParser9ParseUTF8Ev:
push rbx
mov rax, rdi
movsxd rdx, dword ptr [rsi+8]
mov rcx, [rsi+10h]
movzx r9d, byte ptr [rcx+rdx]
mov edi, 80h
mov r8b, 80h
xor edx, edx
loc_33671:
mov r10d, r8d
mov r8d, edi
or r8b, r10b
test edi, r9d
jz short loc_3368D
shr edi, 1
inc edx
cmp edx, 8
jnz short loc_33671
mov edx, 8
loc_3368D:
cmp edx, 1
setz dil
cmp edx, 5
setnb r10b
or r10b, dil
mov edi, 1
jnz loc_3373C
movzx r8d, r8b
not r8d
and r8d, r9d
cmp edx, 2
jb short loc_336F3
movsxd r9, dword ptr [rsi+8]
movsxd r10, dword ptr [rsi+18h]
inc r9
dec edx
loc_336C5:
mov [rsi+8], r9d
cmp r9, r10
jge short loc_3373A
movzx r11d, byte ptr [rcx+r9]
mov ebx, r11d
and ebx, 0FFFFFFC0h
cmp ebx, 80h
jnz short loc_3373C
shl r8d, 6
and r11d, 3Fh
or r8d, r11d
inc r9
dec edx
jnz short loc_336C5
loc_336F3:
xor ecx, ecx
cmp r8d, 80h
jb short loc_3372D
mov ecx, 1
cmp r8d, 800h
jb short loc_3372D
mov ecx, 2
cmp r8d, offset loc_10000
jb short loc_3372D
mov edi, 1
mov ecx, 3
cmp r8d, 10FFFFh
ja short loc_3373C
loc_3372D:
xor edi, edi
cmp ecx, [rsi+8]
setz dil
inc edi
jmp short loc_3373C
loc_3373A:
xor edi, edi
loc_3373C:
mov [rax], edi
pop rbx
retn
|
ftxui::TerminalInputParser * ftxui::TerminalInputParser::ParseUTF8(
ftxui::TerminalInputParser *this,
long long a2)
{
ftxui::TerminalInputParser *result; // rax
long long v3; // rcx
int v4; // r9d
unsigned int v5; // edi
unsigned __int8 v6; // r8
unsigned int v7; // edx
int v8; // edi
unsigned int v9; // r8d
long long v10; // r10
long long v11; // r9
unsigned int v12; // edx
int v13; // ecx
result = this;
v3 = *(_QWORD *)(a2 + 16);
v4 = *(unsigned __int8 *)(v3 + *(int *)(a2 + 8));
v5 = 128;
v6 = 0x80;
v7 = 0;
while ( 1 )
{
v6 |= v5;
if ( (v4 & v5) == 0 )
break;
v5 >>= 1;
if ( ++v7 == 8 )
{
v7 = 8;
break;
}
}
v8 = 1;
if ( v7 != 1 && v7 < 5 )
{
v9 = v4 & ~v6;
if ( v7 < 2 )
{
LABEL_11:
v13 = 0;
if ( v9 < 0x80
|| (v13 = 1, v9 < 0x800)
|| (v13 = 2, v9 < (unsigned int)&loc_10000)
|| (v8 = 1, v13 = 3, v9 <= 0x10FFFF) )
{
v8 = (v13 == *(_DWORD *)(a2 + 8)) + 1;
}
}
else
{
v10 = *(int *)(a2 + 24);
v11 = *(int *)(a2 + 8) + 1LL;
v12 = v7 - 1;
while ( 1 )
{
*(_DWORD *)(a2 + 8) = v11;
if ( v11 >= v10 )
break;
if ( (*(_BYTE *)(v3 + v11) & 0xC0) != 0x80 )
goto LABEL_17;
v9 = *(_BYTE *)(v3 + v11++) & 0x3F | (v9 << 6);
if ( !--v12 )
goto LABEL_11;
}
v8 = 0;
}
}
LABEL_17:
*(_DWORD *)result = v8;
return result;
}
|
ParseUTF8:
PUSH RBX
MOV RAX,RDI
MOVSXD RDX,dword ptr [RSI + 0x8]
MOV RCX,qword ptr [RSI + 0x10]
MOVZX R9D,byte ptr [RCX + RDX*0x1]
MOV EDI,0x80
MOV R8B,0x80
XOR EDX,EDX
LAB_00133671:
MOV R10D,R8D
MOV R8D,EDI
OR R8B,R10B
TEST EDI,R9D
JZ 0x0013368d
SHR EDI,0x1
INC EDX
CMP EDX,0x8
JNZ 0x00133671
MOV EDX,0x8
LAB_0013368d:
CMP EDX,0x1
SETZ DIL
CMP EDX,0x5
SETNC R10B
OR R10B,DIL
MOV EDI,0x1
JNZ 0x0013373c
MOVZX R8D,R8B
NOT R8D
AND R8D,R9D
CMP EDX,0x2
JC 0x001336f3
MOVSXD R9,dword ptr [RSI + 0x8]
MOVSXD R10,dword ptr [RSI + 0x18]
INC R9
DEC EDX
LAB_001336c5:
MOV dword ptr [RSI + 0x8],R9D
CMP R9,R10
JGE 0x0013373a
MOVZX R11D,byte ptr [RCX + R9*0x1]
MOV EBX,R11D
AND EBX,0xffffffc0
CMP EBX,0x80
JNZ 0x0013373c
SHL R8D,0x6
AND R11D,0x3f
OR R8D,R11D
INC R9
DEC EDX
JNZ 0x001336c5
LAB_001336f3:
XOR ECX,ECX
CMP R8D,0x80
JC 0x0013372d
MOV ECX,0x1
CMP R8D,0x800
JC 0x0013372d
MOV ECX,0x2
CMP R8D,0x10000
JC 0x0013372d
MOV EDI,0x1
MOV ECX,0x3
CMP R8D,0x10ffff
JA 0x0013373c
LAB_0013372d:
XOR EDI,EDI
CMP ECX,dword ptr [RSI + 0x8]
SETZ DIL
INC EDI
JMP 0x0013373c
LAB_0013373a:
XOR EDI,EDI
LAB_0013373c:
MOV dword ptr [RAX],EDI
POP RBX
RET
|
/* ftxui::TerminalInputParser::ParseUTF8() */
void ftxui::TerminalInputParser::ParseUTF8(void)
{
uint uVar1;
int iVar2;
long in_RSI;
uint uVar3;
int iVar4;
int *in_RDI;
byte bVar5;
uint uVar6;
long lVar7;
uVar3 = 0x80;
bVar5 = 0x80;
uVar1 = 0;
do {
bVar5 = (byte)uVar3 | bVar5;
uVar6 = (uint)*(byte *)(*(long *)(in_RSI + 0x10) + (long)*(int *)(in_RSI + 8));
if ((uVar3 & uVar6) == 0) goto LAB_0013368d;
uVar3 = uVar3 >> 1;
uVar1 = uVar1 + 1;
} while (uVar1 != 8);
uVar1 = 8;
LAB_0013368d:
iVar4 = 1;
if (uVar1 < 5 && uVar1 != 1) {
uVar6 = ~(uint)bVar5 & uVar6;
if (1 < uVar1) {
lVar7 = (long)*(int *)(in_RSI + 8);
iVar2 = uVar1 - 1;
do {
lVar7 = lVar7 + 1;
*(int *)(in_RSI + 8) = (int)lVar7;
if (*(int *)(in_RSI + 0x18) <= lVar7) {
iVar4 = 0;
goto LAB_0013373c;
}
bVar5 = *(byte *)(*(long *)(in_RSI + 0x10) + lVar7);
if ((bVar5 & 0xc0) != 0x80) goto LAB_0013373c;
uVar6 = uVar6 << 6 | bVar5 & 0x3f;
iVar2 = iVar2 + -1;
} while (iVar2 != 0);
}
iVar2 = 0;
if (((0x7f < uVar6) && (iVar2 = 1, 0x7ff < uVar6)) && (iVar2 = 2, 0xffff < uVar6)) {
iVar4 = 1;
iVar2 = 3;
if (0x10ffff < uVar6) goto LAB_0013373c;
}
iVar4 = (iVar2 == *(int *)(in_RSI + 8)) + 1;
}
LAB_0013373c:
*in_RDI = iVar4;
return;
}
|
|
12,408
|
js_promise_all_resolve_element
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_promise_all_resolve_element(JSContext *ctx,
JSValue this_val,
int argc, JSValue *argv,
int magic,
JSValue *func_data)
{
int resolve_type = magic & 3;
int is_reject = magic & 4;
BOOL alreadyCalled = JS_ToBool(ctx, func_data[0]);
JSValue values = func_data[2];
JSValue resolve = func_data[3];
JSValue resolve_element_env = func_data[4];
JSValue ret, obj;
int is_zero, index;
if (JS_ToInt32(ctx, &index, func_data[1]))
return JS_EXCEPTION;
if (alreadyCalled)
return JS_UNDEFINED;
func_data[0] = js_bool(TRUE);
if (resolve_type == PROMISE_MAGIC_allSettled) {
JSValue str;
obj = JS_NewObject(ctx);
if (JS_IsException(obj))
return JS_EXCEPTION;
str = js_new_string8(ctx, is_reject ? "rejected" : "fulfilled");
if (JS_IsException(str))
goto fail1;
if (JS_DefinePropertyValue(ctx, obj, JS_ATOM_status,
str,
JS_PROP_C_W_E) < 0)
goto fail1;
if (JS_DefinePropertyValue(ctx, obj,
is_reject ? JS_ATOM_reason : JS_ATOM_value,
js_dup(argv[0]),
JS_PROP_C_W_E) < 0) {
fail1:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
}
} else {
obj = js_dup(argv[0]);
}
if (JS_DefinePropertyValueUint32(ctx, values, index,
obj, JS_PROP_C_W_E) < 0)
return JS_EXCEPTION;
is_zero = remainingElementsCount_add(ctx, resolve_element_env, -1);
if (is_zero < 0)
return JS_EXCEPTION;
if (is_zero) {
if (resolve_type == PROMISE_MAGIC_any) {
JSValue error;
error = js_aggregate_error_constructor(ctx, values);
if (JS_IsException(error))
return JS_EXCEPTION;
ret = JS_Call(ctx, resolve, JS_UNDEFINED, 1, &error);
JS_FreeValue(ctx, error);
} else {
ret = JS_Call(ctx, resolve, JS_UNDEFINED, 1, &values);
}
if (JS_IsException(ret))
return ret;
JS_FreeValue(ctx, ret);
}
return JS_UNDEFINED;
}
|
O1
|
c
|
js_promise_all_resolve_element:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %r9d, %r12d
movq %r8, %r15
movq %rdi, %rbx
movq 0xc0(%rsp), %r13
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rsi, 0x20(%rsp)
cmpl $-0x9, %edx
jb 0x54a17
movq 0x20(%rsp), %rax
incl (%rax)
movq %rbx, %rdi
callq 0x22d0d
movl %eax, %ebp
movups 0x20(%r13), %xmm0
movaps %xmm0, 0x40(%rsp)
movq 0x30(%r13), %rax
movq %rax, 0x58(%rsp)
movq 0x38(%r13), %rax
movq %rax, 0x60(%rsp)
movq 0x40(%r13), %rax
movq %rax, 0x70(%rsp)
movq 0x48(%r13), %rax
movq %rax, 0x68(%rsp)
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
movq %rdx, 0x20(%rsp)
cmpl $-0x9, %ecx
jb 0x54a68
movq 0x20(%rsp), %rax
incl (%rax)
leaq 0x3c(%rsp), %rsi
movq %rbx, %rdi
callq 0x279c3
movl $0x6, %r14d
testl %eax, %eax
je 0x54a86
xorl %r15d, %r15d
xorl %eax, %eax
jmp 0x54a95
testl %ebp, %ebp
je 0x54ab0
xorl %r15d, %r15d
xorl %eax, %eax
movl $0x3, %r14d
orq %rax, %r15
movq %r15, %rax
movq %r14, %rdx
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r12d, %ebp
andl $0x3, %ebp
movl $0x1, %eax
movq %rax, (%r13)
movq %rax, 0x8(%r13)
cmpl $0x1, %ebp
jne 0x54b9d
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x20f05
movq %rdx, %r13
cmpl $0x6, %r13d
je 0x54a7f
movq %rax, 0x30(%rsp)
xorl %edx, %edx
testb $0x4, %r12b
sete %dl
leaq 0x4b855(%rip), %rax # 0xa0358
leaq 0x4b845(%rip), %rsi # 0xa034f
cmoveq %rax, %rsi
orl $0x8, %edx
movq %rbx, %rdi
callq 0x201dd
movq %rdx, %r9
cmpl $0x6, %r9d
je 0x54cd6
movl $0x7, (%rsp)
movq %rbx, %rdi
movq 0x30(%rsp), %rsi
movq %r13, %rdx
movl $0x8a, %ecx
movq %rax, %r8
callq 0x26abb
testl %eax, %eax
js 0x54cd6
testb $0x4, %r12b
movl $0x41, %eax
movl $0x8b, %ecx
cmovel %eax, %ecx
movq (%r15), %r8
movq 0x8(%r15), %r9
movq %r8, 0x20(%rsp)
cmpl $-0x9, %r9d
jb 0x54b77
movq 0x20(%rsp), %rax
incl (%rax)
movl $0x7, (%rsp)
movq %rbx, %rdi
movq 0x30(%rsp), %rsi
movq %r13, %rdx
callq 0x26abb
testl %eax, %eax
js 0x54cd6
movq 0x30(%rsp), %rdi
jmp 0x54bb6
movq (%r15), %rdi
movq 0x8(%r15), %r13
movq %rdi, 0x20(%rsp)
cmpl $-0x9, %r13d
jb 0x54bb6
movq 0x20(%rsp), %rax
incl (%rax)
movslq 0x3c(%rsp), %rax
xorl %r15d, %r15d
testq %rax, %rax
movq 0x40(%rsp), %rsi
movl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
movq 0x48(%rsp), %rdx
movq %rdi, 0x20(%rsp)
movq %xmm0, %rcx
cmovnsq %rax, %rcx
movq %r13, 0x28(%rsp)
movl $0x7, %r8d
cmovnsq %r15, %r8
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x7, %r9d
callq 0x26b2d
testl %eax, %eax
js 0x54a82
movq %rbx, %rdi
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdx
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
callq 0x54d70
testl %eax, %eax
js 0x54a7f
je 0x54a8a
cmpl $0x2, %ebp
jne 0x54cec
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %rbx, %rdi
callq 0x54e02
movq %rax, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movl %edx, %r13d
cmpq $0x6, %r13
je 0x54cca
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x78(%rsp), %rbp
movq %rbp, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x3, %r8d
movq %rbx, %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x284ca
movq %rax, %r15
movq %rdx, %r12
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
cmpl $0x6, %r13d
je 0x54a7f
jmp 0x54d3e
movq 0x18(%rbx), %rdi
movq 0x30(%rsp), %rsi
movq %r13, %rdx
callq 0x1d8c6
jmp 0x54a7f
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x3, %r8d
movq %rbx, %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x284ca
movq %rax, %r15
movq %rdx, %r12
cmpl $0x6, %r12d
jne 0x54d5c
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %r15, %rax
movl %r15d, %r15d
movq %r12, %r14
jmp 0x54a95
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1d8c6
jmp 0x54a8a
|
js_promise_all_resolve_element:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r12d, r9d
mov r15, r8
mov rbx, rdi
mov r13, [rsp+0B8h+arg_0]
mov rsi, [r13+0]
mov rdx, [r13+8]
mov qword ptr [rsp+0B8h+var_98], rsi
cmp edx, 0FFFFFFF7h
jb short loc_54A17
mov rax, qword ptr [rsp+0B8h+var_98]
inc dword ptr [rax]
loc_54A17:
mov rdi, rbx
call JS_ToBoolFree
mov ebp, eax
movups xmm0, xmmword ptr [r13+20h]
movaps [rsp+0B8h+var_78], xmm0
mov rax, [r13+30h]
mov [rsp+0B8h+var_60], rax
mov rax, [r13+38h]
mov [rsp+0B8h+var_58], rax
mov rax, [r13+40h]
mov [rsp+0B8h+var_48], rax
mov rax, [r13+48h]
mov [rsp+0B8h+var_50], rax
mov rdx, [r13+10h]
mov rcx, [r13+18h]
mov qword ptr [rsp+0B8h+var_98], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_54A68
mov rax, qword ptr [rsp+0B8h+var_98]
inc dword ptr [rax]
loc_54A68:
lea rsi, [rsp+0B8h+var_7C]
mov rdi, rbx
call JS_ToInt32Free
mov r14d, 6
test eax, eax
jz short loc_54A86
loc_54A7F:
xor r15d, r15d
loc_54A82:
xor eax, eax
jmp short loc_54A95
loc_54A86:
test ebp, ebp
jz short loc_54AB0
loc_54A8A:
xor r15d, r15d
xor eax, eax
mov r14d, 3
loc_54A95:
or r15, rax
mov rax, r15
mov rdx, r14
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_54AB0:
mov ebp, r12d
and ebp, 3
mov eax, 1
mov [r13+0], rax
mov [r13+8], rax
cmp ebp, 1
jnz loc_54B9D
mov rax, [rbx+40h]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
mov rdi, rbx
mov ecx, 1
call JS_NewObjectProtoClass
mov r13, rdx
cmp r13d, 6
jz short loc_54A7F
mov [rsp+0B8h+var_88], rax
xor edx, edx
test r12b, 4
setz dl
lea rax, aFulfilled; "fulfilled"
lea rsi, aRejected; "rejected"
cmovz rsi, rax
or edx, 8
mov rdi, rbx
call js_new_string8_len
mov r9, rdx
cmp r9d, 6
jz loc_54CD6
mov dword ptr [rsp+0B8h+var_B8], 7
mov rdi, rbx
mov rsi, [rsp+0B8h+var_88]
mov rdx, r13
mov ecx, 8Ah
mov r8, rax
call JS_DefinePropertyValue
test eax, eax
js loc_54CD6
test r12b, 4
mov eax, 41h ; 'A'
mov ecx, 8Bh
cmovz ecx, eax
mov r8, [r15]
mov r9, [r15+8]
mov qword ptr [rsp+0B8h+var_98], r8
cmp r9d, 0FFFFFFF7h
jb short loc_54B77
mov rax, qword ptr [rsp+0B8h+var_98]
inc dword ptr [rax]
loc_54B77:
mov dword ptr [rsp+0B8h+var_B8], 7
mov rdi, rbx
mov rsi, [rsp+0B8h+var_88]
mov rdx, r13
call JS_DefinePropertyValue
test eax, eax
js loc_54CD6
mov rdi, [rsp+0B8h+var_88]
jmp short loc_54BB6
loc_54B9D:
mov rdi, [r15]
mov r13, [r15+8]
mov qword ptr [rsp+0B8h+var_98], rdi
cmp r13d, 0FFFFFFF7h
jb short loc_54BB6
mov rax, qword ptr [rsp+0B8h+var_98]
inc dword ptr [rax]
loc_54BB6:
movsxd rax, [rsp+0B8h+var_7C]
xor r15d, r15d
test rax, rax
mov rsi, qword ptr [rsp+0B8h+var_78]
mov ecx, eax
xorps xmm0, xmm0
cvtsi2sd xmm0, rcx
mov rdx, qword ptr [rsp+0B8h+var_78+8]
mov qword ptr [rsp+0B8h+var_98], rdi
movq rcx, xmm0
cmovns rcx, rax
mov qword ptr [rsp+0B8h+var_98+8], r13
mov r8d, 7
cmovns r8, r15
movups xmm0, [rsp+0B8h+var_98]
movups [rsp+0B8h+var_B8], xmm0
mov rdi, rbx
mov r9d, 7
call JS_DefinePropertyValueValue
test eax, eax
js loc_54A82
mov rdi, rbx
mov rsi, [rsp+0B8h+var_48]
mov rdx, [rsp+0B8h+var_50]
mov ecx, 0FFFFFFFFh
call remainingElementsCount_add
test eax, eax
js loc_54A7F
jz loc_54A8A
cmp ebp, 2
jnz loc_54CEC
mov rsi, qword ptr [rsp+0B8h+var_78]
mov rdx, qword ptr [rsp+0B8h+var_78+8]
mov rdi, rbx
call js_aggregate_error_constructor
mov [rsp+0B8h+var_40], rax
mov [rsp+0B8h+var_38], rdx
mov r13d, edx
cmp r13, 6
jz short loc_54CCA
mov dword ptr [rsp+0B8h+var_98], 0
mov qword ptr [rsp+0B8h+var_98+8], 3
movups xmm0, [rsp+0B8h+var_98]
movups [rsp+0B8h+var_B8], xmm0
lea rbp, [rsp+0B8h+var_40]
mov [rsp+0B8h+var_A8], rbp
mov [rsp+0B8h+var_A0], 2
mov r8d, 3
mov rdi, rbx
mov rsi, [rsp+0B8h+var_60]
mov rdx, [rsp+0B8h+var_58]
xor ecx, ecx
mov r9d, 1
call JS_CallInternal
mov r15, rax
mov r12, rdx
mov rsi, [rbp+0]
mov rdx, [rbp+8]
mov rdi, [rbx+18h]
call JS_FreeValueRT
loc_54CCA:
cmp r13d, 6
jz loc_54A7F
jmp short loc_54D3E
loc_54CD6:
mov rdi, [rbx+18h]
mov rsi, [rsp+0B8h+var_88]
mov rdx, r13
call JS_FreeValueRT
jmp loc_54A7F
loc_54CEC:
mov dword ptr [rsp+0B8h+var_98], 0
mov qword ptr [rsp+0B8h+var_98+8], 3
movups xmm0, [rsp+0B8h+var_98]
movups [rsp+0B8h+var_B8], xmm0
lea rax, [rsp+0B8h+var_78]
mov [rsp+0B8h+var_A8], rax
mov [rsp+0B8h+var_A0], 2
mov r8d, 3
mov rdi, rbx
mov rsi, [rsp+0B8h+var_60]
mov rdx, [rsp+0B8h+var_58]
xor ecx, ecx
mov r9d, 1
call JS_CallInternal
mov r15, rax
mov r12, rdx
loc_54D3E:
cmp r12d, 6
jnz short loc_54D5C
mov rax, 0FFFFFFFF00000000h
and rax, r15
mov r15d, r15d
mov r14, r12
jmp loc_54A95
loc_54D5C:
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r12
call JS_FreeValueRT
jmp loc_54A8A
|
unsigned long long js_promise_all_resolve_element(
long long a1,
double a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
unsigned int a14,
long long a15)
{
long long v15; // r12
_DWORD *v18; // rsi
long long v19; // rdx
int v20; // ebp
__int128 v21; // xmm0
unsigned long long v22; // rdx
long long v23; // rcx
double v24; // xmm4_8
double v25; // xmm5_8
unsigned long long v26; // r15
unsigned long long v27; // rax
int v29; // ebp
long long v30; // rax
long long v31; // rdx
long long v32; // r13
const char *v33; // rsi
_DWORD *v34; // rax
long long v35; // rdx
__m128 v36; // xmm4
__m128 v37; // xmm5
__m128 v38; // xmm4
__m128 v39; // xmm5
long long v40; // rcx
_DWORD *v41; // r8
long long v42; // r9
_DWORD *v43; // rdi
double v44; // rcx
long long v45; // r8
int v46; // eax
__m128 v47; // xmm4
__m128 v48; // xmm5
__m128 v49; // xmm4
__m128 v50; // xmm5
long long v51; // rdx
int v52; // r13d
long long v53; // rdx
long long v54; // rdx
__m128 v55; // [rsp+20h] [rbp-98h]
_DWORD *v56; // [rsp+30h] [rbp-88h]
int v57; // [rsp+3Ch] [rbp-7Ch] BYREF
__int128 v58; // [rsp+40h] [rbp-78h] BYREF
long long v59; // [rsp+58h] [rbp-60h]
long long v60; // [rsp+60h] [rbp-58h]
long long v61; // [rsp+68h] [rbp-50h]
long long v62; // [rsp+70h] [rbp-48h]
_DWORD *v63; // [rsp+78h] [rbp-40h] BYREF
long long v64; // [rsp+80h] [rbp-38h]
v15 = a14;
v18 = *(_DWORD **)a15;
v19 = *(_QWORD *)(a15 + 8);
if ( (unsigned int)v19 >= 0xFFFFFFF7 )
++**(_DWORD **)a15;
v20 = JS_ToBoolFree(a1, (long long)v18, v19);
v21 = *(_OWORD *)(a15 + 32);
v58 = v21;
v59 = *(_QWORD *)(a15 + 48);
v60 = *(_QWORD *)(a15 + 56);
v62 = *(_QWORD *)(a15 + 64);
v61 = *(_QWORD *)(a15 + 72);
v22 = *(_QWORD *)(a15 + 16);
v23 = *(_QWORD *)(a15 + 24);
if ( (unsigned int)v23 >= 0xFFFFFFF7 )
++**(_DWORD **)(a15 + 16);
if ( (unsigned int)JS_ToInt32Free(a1, &v57, v22, v23) )
goto LABEL_6;
if ( v20 )
{
LABEL_9:
v26 = 0LL;
v27 = 0LL;
return v27 | v26;
}
v29 = v15 & 3;
*(_QWORD *)a15 = 1LL;
*(_QWORD *)(a15 + 8) = 1LL;
if ( v29 == 1 )
{
v30 = JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 16LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 24LL),
1u);
v32 = v31;
if ( (_DWORD)v31 == 6 )
goto LABEL_6;
v56 = (_DWORD *)v30;
v33 = "rejected";
if ( (v15 & 4) == 0 )
v33 = "fulfilled";
v34 = (_DWORD *)js_new_string8_len(a1, (long long)v33, ((v15 & 4) == 0) | 8u);
if ( (_DWORD)v35 == 6
|| (int)JS_DefinePropertyValue(
a1,
(unsigned long long)v56,
v32,
138LL,
v34,
v35,
*(double *)&v21,
a3,
a4,
a5,
v36,
v37,
a8,
a9,
7) < 0 )
{
goto LABEL_37;
}
v40 = 139LL;
if ( (v15 & 4) == 0 )
v40 = 65LL;
v41 = *(_DWORD **)a13;
v42 = *(_QWORD *)(a13 + 8);
if ( (unsigned int)v42 >= 0xFFFFFFF7 )
++**(_DWORD **)a13;
if ( (int)JS_DefinePropertyValue(
a1,
(unsigned long long)v56,
v32,
v40,
v41,
v42,
*(double *)&v21,
a3,
a4,
a5,
v38,
v39,
a8,
a9,
7) < 0 )
{
LABEL_37:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v56, v32);
goto LABEL_6;
}
v43 = v56;
}
else
{
v43 = *(_DWORD **)a13;
v32 = *(_QWORD *)(a13 + 8);
if ( (unsigned int)v32 >= 0xFFFFFFF7 )
++**(_DWORD **)a13;
}
v26 = 0LL;
v55.m128_i32[1] = HIDWORD(v43);
v44 = (double)v57;
if ( v57 >= 0LL )
*(_QWORD *)&v44 = v57;
v45 = 7LL;
if ( v57 >= 0LL )
v45 = 0LL;
if ( (int)JS_DefinePropertyValueValue(
a1,
v58,
*((long long *)&v58 + 1),
*(_DWORD **)&v44,
v45,
7,
*(double *)&v43,
a3,
a4,
a5,
v24,
v25,
a8,
a9,
v43,
v32) < 0 )
goto LABEL_7;
v46 = remainingElementsCount_add(a1, v62, v61, 0xFFFFFFFFLL);
if ( v46 >= 0 )
{
if ( !v46 )
goto LABEL_9;
if ( v29 != 2 )
{
v55.m128_i32[0] = 0;
v55.m128_u64[1] = 3LL;
v26 = JS_CallInternal(
a1,
v59,
v60,
0LL,
3LL,
1LL,
v55,
a3,
a4,
a5,
v47,
v48,
a8,
a9,
v55.m128_i8[0],
3,
(long long)&v58,
2u);
v15 = v54;
LABEL_39:
if ( (_DWORD)v15 == 6 )
{
v27 = v26 & 0xFFFFFFFF00000000LL;
v26 = (unsigned int)v26;
return v27 | v26;
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v26, v15);
goto LABEL_9;
}
v63 = (_DWORD *)js_aggregate_error_constructor(a1, v58, *((_QWORD *)&v58 + 1));
v64 = v51;
v52 = v51;
if ( (unsigned int)v51 != 6LL )
{
v55.m128_i32[0] = 0;
v55.m128_u64[1] = 3LL;
v26 = JS_CallInternal(
a1,
v59,
v60,
0LL,
3LL,
1LL,
v55,
a3,
a4,
a5,
v49,
v50,
a8,
a9,
v55.m128_i8[0],
3,
(long long)&v63,
2u);
v15 = v53;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v63, v64);
}
if ( v52 != 6 )
goto LABEL_39;
}
LABEL_6:
v26 = 0LL;
LABEL_7:
v27 = 0LL;
return v27 | v26;
}
|
js_promise_all_resolve_element:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R12D,R9D
MOV R15,R8
MOV RBX,RDI
MOV R13,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV qword ptr [RSP + 0x20],RSI
CMP EDX,-0x9
JC 0x00154a17
MOV RAX,qword ptr [RSP + 0x20]
INC dword ptr [RAX]
LAB_00154a17:
MOV RDI,RBX
CALL 0x00122d0d
MOV EBP,EAX
MOVUPS XMM0,xmmword ptr [R13 + 0x20]
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOV RAX,qword ptr [R13 + 0x30]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [R13 + 0x38]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [R13 + 0x40]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [R13 + 0x48]
MOV qword ptr [RSP + 0x68],RAX
MOV RDX,qword ptr [R13 + 0x10]
MOV RCX,qword ptr [R13 + 0x18]
MOV qword ptr [RSP + 0x20],RDX
CMP ECX,-0x9
JC 0x00154a68
MOV RAX,qword ptr [RSP + 0x20]
INC dword ptr [RAX]
LAB_00154a68:
LEA RSI,[RSP + 0x3c]
MOV RDI,RBX
CALL 0x001279c3
MOV R14D,0x6
TEST EAX,EAX
JZ 0x00154a86
LAB_00154a7f:
XOR R15D,R15D
LAB_00154a82:
XOR EAX,EAX
JMP 0x00154a95
LAB_00154a86:
TEST EBP,EBP
JZ 0x00154ab0
LAB_00154a8a:
XOR R15D,R15D
XOR EAX,EAX
MOV R14D,0x3
LAB_00154a95:
OR R15,RAX
MOV RAX,R15
MOV RDX,R14
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00154ab0:
MOV EBP,R12D
AND EBP,0x3
MOV EAX,0x1
MOV qword ptr [R13],RAX
MOV qword ptr [R13 + 0x8],RAX
CMP EBP,0x1
JNZ 0x00154b9d
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x00120f05
MOV R13,RDX
CMP R13D,0x6
JZ 0x00154a7f
MOV qword ptr [RSP + 0x30],RAX
XOR EDX,EDX
TEST R12B,0x4
SETZ DL
LEA RAX,[0x1a0358]
LEA RSI,[0x1a034f]
CMOVZ RSI,RAX
OR EDX,0x8
MOV RDI,RBX
CALL 0x001201dd
MOV R9,RDX
CMP R9D,0x6
JZ 0x00154cd6
MOV dword ptr [RSP],0x7
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,R13
MOV ECX,0x8a
MOV R8,RAX
CALL 0x00126abb
TEST EAX,EAX
JS 0x00154cd6
TEST R12B,0x4
MOV EAX,0x41
MOV ECX,0x8b
CMOVZ ECX,EAX
MOV R8,qword ptr [R15]
MOV R9,qword ptr [R15 + 0x8]
MOV qword ptr [RSP + 0x20],R8
CMP R9D,-0x9
JC 0x00154b77
MOV RAX,qword ptr [RSP + 0x20]
INC dword ptr [RAX]
LAB_00154b77:
MOV dword ptr [RSP],0x7
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,R13
CALL 0x00126abb
TEST EAX,EAX
JS 0x00154cd6
MOV RDI,qword ptr [RSP + 0x30]
JMP 0x00154bb6
LAB_00154b9d:
MOV RDI,qword ptr [R15]
MOV R13,qword ptr [R15 + 0x8]
MOV qword ptr [RSP + 0x20],RDI
CMP R13D,-0x9
JC 0x00154bb6
MOV RAX,qword ptr [RSP + 0x20]
INC dword ptr [RAX]
LAB_00154bb6:
MOVSXD RAX,dword ptr [RSP + 0x3c]
XOR R15D,R15D
TEST RAX,RAX
MOV RSI,qword ptr [RSP + 0x40]
MOV ECX,EAX
XORPS XMM0,XMM0
CVTSI2SD XMM0,RCX
MOV RDX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x20],RDI
MOVQ RCX,XMM0
CMOVNS RCX,RAX
MOV qword ptr [RSP + 0x28],R13
MOV R8D,0x7
CMOVNS R8,R15
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
MOV R9D,0x7
CALL 0x00126b2d
TEST EAX,EAX
JS 0x00154a82
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x68]
MOV ECX,0xffffffff
CALL 0x00154d70
TEST EAX,EAX
JS 0x00154a7f
JZ 0x00154a8a
CMP EBP,0x2
JNZ 0x00154cec
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
MOV RDI,RBX
CALL 0x00154e02
MOV qword ptr [RSP + 0x78],RAX
MOV qword ptr [RSP + 0x80],RDX
MOV R13D,EDX
CMP R13,0x6
JZ 0x00154cca
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
LEA RBP,[RSP + 0x78]
MOV qword ptr [RSP + 0x10],RBP
MOV dword ptr [RSP + 0x18],0x2
MOV R8D,0x3
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
XOR ECX,ECX
MOV R9D,0x1
CALL 0x001284ca
MOV R15,RAX
MOV R12,RDX
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011d8c6
LAB_00154cca:
CMP R13D,0x6
JZ 0x00154a7f
JMP 0x00154d3e
LAB_00154cd6:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,R13
CALL 0x0011d8c6
JMP 0x00154a7f
LAB_00154cec:
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
LEA RAX,[RSP + 0x40]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0x2
MOV R8D,0x3
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
XOR ECX,ECX
MOV R9D,0x1
CALL 0x001284ca
MOV R15,RAX
MOV R12,RDX
LAB_00154d3e:
CMP R12D,0x6
JNZ 0x00154d5c
MOV RAX,-0x100000000
AND RAX,R15
MOV R15D,R15D
MOV R14,R12
JMP 0x00154a95
LAB_00154d5c:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R12
CALL 0x0011d8c6
JMP 0x00154a8a
|
int1 [16] js_promise_all_resolve_element(long param_1)
{
int *piVar1;
int8 uVar2;
int1 auVar3 [12];
int iVar4;
int iVar5;
double dVar6;
ulong uVar7;
int8 uVar8;
double dVar9;
char *pcVar11;
int1 (*in_R8) [16];
int8 uVar12;
uint in_R9D;
int8 uVar13;
ulong uVar14;
bool bVar15;
int1 auVar16 [16];
int1 auVar17 [16];
int8 *in_stack_00000008;
int4 local_98;
int4 uStack_90;
uint local_7c;
int4 local_78;
int4 uStack_74;
int4 uStack_70;
int4 uStack_6c;
int8 local_60;
int8 local_58;
int8 local_50;
int8 local_48;
int1 local_40 [16];
int8 uVar10;
if (0xfffffff6 < (uint)in_stack_00000008[1]) {
*(int *)*in_stack_00000008 = *(int *)*in_stack_00000008 + 1;
}
iVar4 = JS_ToBoolFree(param_1);
local_78 = *(int4 *)(in_stack_00000008 + 4);
uStack_74 = *(int4 *)((long)in_stack_00000008 + 0x24);
uStack_70 = *(int4 *)(in_stack_00000008 + 5);
uStack_6c = *(int4 *)((long)in_stack_00000008 + 0x2c);
local_60 = in_stack_00000008[6];
local_58 = in_stack_00000008[7];
local_48 = in_stack_00000008[8];
local_50 = in_stack_00000008[9];
if (0xfffffff6 < (uint)in_stack_00000008[3]) {
*(int *)in_stack_00000008[2] = *(int *)in_stack_00000008[2] + 1;
}
iVar5 = JS_ToInt32Free(param_1,&local_7c);
uVar13 = 6;
if (iVar5 == 0) {
if (iVar4 != 0) {
LAB_00154a8a:
uVar14 = 0;
uVar7 = 0;
uVar13 = 3;
goto LAB_00154a95;
}
*in_stack_00000008 = 1;
in_stack_00000008[1] = 1;
if ((in_R9D & 3) == 1) {
auVar16 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1);
auVar3 = auVar16._0_12_;
uVar10 = auVar16._8_8_;
uVar12 = auVar16._0_8_;
if (auVar16._8_4_ != 6) {
bVar15 = (in_R9D & 4) == 0;
pcVar11 = "rejected";
if (bVar15) {
pcVar11 = "fulfilled";
}
auVar16 = js_new_string8_len(param_1,pcVar11,bVar15 | 8);
if ((auVar16._8_4_ != 6) &&
(iVar4 = JS_DefinePropertyValue(param_1,uVar12,uVar10,0x8a,auVar16._0_8_,auVar16._8_8_,7)
, -1 < iVar4)) {
uVar8 = 0x8b;
if ((in_R9D & 4) == 0) {
uVar8 = 0x41;
}
piVar1 = *(int **)*in_R8;
uVar2 = *(int8 *)(*in_R8 + 8);
if (0xfffffff6 < (uint)uVar2) {
*piVar1 = *piVar1 + 1;
}
iVar4 = JS_DefinePropertyValue(param_1,uVar12,uVar10,uVar8,piVar1,uVar2,7);
if (-1 < iVar4) goto LAB_00154bb6;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar12,uVar10);
}
}
else {
auVar16 = *in_R8;
auVar3 = SUB1612(*in_R8,0);
if (0xfffffff6 < (uint)*(int8 *)(*in_R8 + 8)) {
**(int **)*in_R8 = **(int **)*in_R8 + 1;
auVar3 = auVar16._0_12_;
}
LAB_00154bb6:
dVar6 = (double)(long)(int)local_7c;
auVar16 = ZEXT416(in_R9D) << 0x40;
dVar9 = (double)local_7c;
if (-1 < (long)dVar6) {
dVar9 = dVar6;
}
uVar12 = 7;
if (-1 < (long)dVar6) {
uVar12 = 0;
}
local_98 = auVar3._0_4_;
uStack_90 = auVar3._8_4_;
iVar4 = JS_DefinePropertyValueValue
(param_1,CONCAT44(uStack_74,local_78),CONCAT44(uStack_6c,uStack_70),dVar9,
uVar12,7,local_98,uStack_90);
if (-1 < iVar4) {
iVar4 = remainingElementsCount_add(param_1,local_48,local_50,0xffffffff);
if (-1 < iVar4) {
if (iVar4 == 0) goto LAB_00154a8a;
if ((in_R9D & 3) == 2) {
auVar17 = js_aggregate_error_constructor
(param_1,CONCAT44(uStack_74,local_78),CONCAT44(uStack_6c,uStack_70))
;
local_40 = auVar17;
if ((auVar17._8_8_ & 0xffffffff) != 6) {
auVar16 = JS_CallInternal(param_1,local_60,local_58,0,3,1,0,3,local_40,2);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_40._0_8_,local_40._8_8_);
}
if (auVar17._8_4_ == 6) goto LAB_00154a82;
}
else {
auVar16 = JS_CallInternal(param_1,local_60,local_58,0,3,1,0,3,&local_78,2);
}
uVar13 = auVar16._8_8_;
uVar14 = auVar16._0_8_;
if (auVar16._8_4_ == 6) {
uVar7 = uVar14 & 0xffffffff00000000;
uVar14 = uVar14 & 0xffffffff;
goto LAB_00154a95;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar14,uVar13);
goto LAB_00154a8a;
}
}
}
}
LAB_00154a82:
uVar14 = 0;
uVar7 = 0;
LAB_00154a95:
auVar16._8_8_ = uVar13;
auVar16._0_8_ = uVar14 | uVar7;
return auVar16;
}
|
|
12,409
|
ma_read_rnd_mempack_record
|
eloqsql/storage/maria/ma_packrec.c
|
static int _ma_read_rnd_mempack_record(MARIA_HA *info,
uchar *buf,
register MARIA_RECORD_POS filepos,
my_bool skip_deleted_blocks
__attribute__((unused)))
{
MARIA_BLOCK_INFO block_info;
MARIA_SHARE *share= info->s;
uchar *pos,*start;
DBUG_ENTER("_ma_read_rnd_mempack_record");
if (filepos >= share->state.state.data_file_length)
{
my_errno=HA_ERR_END_OF_FILE;
goto err;
}
if (!(pos= (uchar*) _ma_mempack_get_block_info(info, &info->bit_buff,
&block_info,
&info->rec_buff,
&info->rec_buff_size,
(uchar*)
(start= share->file_map +
filepos))))
goto err;
#ifndef DBUG_OFF
if (block_info.rec_len > info->s->max_pack_length)
{
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
goto err;
}
#endif
info->packed_length=block_info.rec_len;
info->cur_row.lastpos= filepos;
info->cur_row.nextpos= filepos+(uint) (pos-start)+block_info.rec_len;
info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED;
DBUG_RETURN (_ma_pack_rec_unpack(info, &info->bit_buff, buf,
pos, block_info.rec_len));
err:
DBUG_RETURN(my_errno);
}
|
O3
|
c
|
ma_read_rnd_mempack_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rdi
cmpq %rdx, 0x40(%rdi)
jbe 0x4597d
movq %rdx, %r15
movq %rsi, %rbx
leaq 0x290(%r14), %r12
leaq 0x3a0(%r14), %rcx
leaq 0x460(%r14), %r8
movq 0x5f0(%rdi), %r13
addq %rdx, %r13
leaq -0x88(%rbp), %rdx
movq %r12, %rsi
movq %r13, %r9
callq 0x4728d
testq %rax, %rax
je 0x45988
movq -0x70(%rbp), %r8
movq %r8, 0x450(%r14)
movq %r15, 0x98(%r14)
movl %eax, %ecx
subl %r13d, %ecx
addq %r8, %r15
addq %rcx, %r15
movq %r15, 0xa0(%r14)
orb $-0x7e, 0x624(%r14)
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x459ad
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %rax, %rcx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x453ed
callq 0xa2412
movl $0x89, (%rax)
callq 0xa2412
movl (%rax), %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x459ad
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29260
|
_ma_read_rnd_mempack_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rdi, [rdi]
cmp [rdi+40h], rdx
jbe loc_4597D
mov r15, rdx
mov rbx, rsi
lea r12, [r14+290h]
lea rcx, [r14+3A0h]
lea r8, [r14+460h]
mov r13, [rdi+5F0h]
add r13, rdx
lea rdx, [rbp+var_88]
mov rsi, r12
mov r9, r13
call _ma_mempack_get_block_info
test rax, rax
jz short loc_45988
mov r8, [rbp+var_70]
mov [r14+450h], r8
mov [r14+98h], r15
mov ecx, eax
sub ecx, r13d
add r15, r8
add r15, rcx
mov [r14+0A0h], r15
or byte ptr [r14+624h], 82h
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_459AD
mov rdi, r14
mov rsi, r12
mov rdx, rbx
mov rcx, rax
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _ma_pack_rec_unpack
loc_4597D:
call _my_thread_var
mov dword ptr [rax], 89h
loc_45988:
call _my_thread_var
mov eax, [rax]
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_459AD
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_459AD:
call ___stack_chk_fail
|
long long ma_read_rnd_mempack_record(long long *a1, long long a2, unsigned long long a3)
{
long long v4; // rdi
unsigned long long v6; // r13
long long block_info; // rax
int v8; // r9d
long long v9; // r8
_BYTE v11[24]; // [rsp+8h] [rbp-88h] BYREF
long long v12; // [rsp+20h] [rbp-70h]
unsigned long long v13; // [rsp+60h] [rbp-30h]
v13 = __readfsqword(0x28u);
v4 = *a1;
if ( *(_QWORD *)(v4 + 64) <= a3 )
{
*(_DWORD *)my_thread_var(v4) = 137;
}
else
{
v6 = a3 + *(_QWORD *)(v4 + 1520);
block_info = ma_mempack_get_block_info(v4, a1 + 82, v11, a1 + 116, a1 + 140, v6);
if ( block_info )
{
v9 = v12;
a1[138] = v12;
a1[19] = a3;
a1[20] = (unsigned int)(block_info - v6) + v9 + a3;
*((_BYTE *)a1 + 1572) |= 0x82u;
return ma_pack_rec_unpack(a1, (long long)(a1 + 82), a2, block_info, v9, v8);
}
}
return *(unsigned int *)my_thread_var(v4);
}
|
_ma_read_rnd_mempack_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RDI]
CMP qword ptr [RDI + 0x40],RDX
JBE 0x0014597d
MOV R15,RDX
MOV RBX,RSI
LEA R12,[R14 + 0x290]
LEA RCX,[R14 + 0x3a0]
LEA R8,[R14 + 0x460]
MOV R13,qword ptr [RDI + 0x5f0]
ADD R13,RDX
LEA RDX,[RBP + -0x88]
MOV RSI,R12
MOV R9,R13
CALL 0x0014728d
TEST RAX,RAX
JZ 0x00145988
MOV R8,qword ptr [RBP + -0x70]
MOV qword ptr [R14 + 0x450],R8
MOV qword ptr [R14 + 0x98],R15
MOV ECX,EAX
SUB ECX,R13D
ADD R15,R8
ADD R15,RCX
MOV qword ptr [R14 + 0xa0],R15
OR byte ptr [R14 + 0x624],0x82
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x001459ad
MOV RDI,R14
MOV RSI,R12
MOV RDX,RBX
MOV RCX,RAX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001453ed
LAB_0014597d:
CALL 0x001a2412
MOV dword ptr [RAX],0x89
LAB_00145988:
CALL 0x001a2412
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x001459ad
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001459ad:
CALL 0x00129260
|
ulong _ma_read_rnd_mempack_record(long *param_1,int8 param_2,ulong param_3)
{
long lVar1;
ulong uVar2;
int4 *puVar3;
uint *puVar4;
long lVar5;
long in_FS_OFFSET;
int1 local_90 [24];
long local_78;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *param_1;
if (param_3 < *(ulong *)(lVar1 + 0x40)) {
lVar5 = *(long *)(lVar1 + 0x5f0) + param_3;
lVar1 = _ma_mempack_get_block_info
(lVar1,param_1 + 0x52,local_90,param_1 + 0x74,param_1 + 0x8c,lVar5);
if (lVar1 != 0) {
param_1[0x8a] = local_78;
param_1[0x13] = param_3;
param_1[0x14] = param_3 + local_78 + (ulong)(uint)((int)lVar1 - (int)lVar5);
*(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 0x82;
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
uVar2 = _ma_pack_rec_unpack(param_1,param_1 + 0x52,param_2,lVar1);
return uVar2;
}
goto LAB_001459ad;
}
}
else {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x89;
}
puVar4 = (uint *)_my_thread_var();
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return (ulong)*puVar4;
}
LAB_001459ad:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
12,410
|
lunasvg::Path::ensure()
|
dmazzella[P]pylunasvg/lunasvg/source/graphics.cpp
|
plutovg_path_t* Path::ensure()
{
if(isNull()) {
m_data = plutovg_path_create();
} else if(!isUnique()) {
plutovg_path_destroy(m_data);
m_data = plutovg_path_clone(m_data);
}
return m_data;
}
|
O0
|
cpp
|
lunasvg::Path::ensure():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x14660
testb $0x1, %al
jne 0x1221f
jmp 0x12230
callq 0x5fd20
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x12261
movq -0x10(%rbp), %rdi
callq 0x12670
testb $0x1, %al
jne 0x1225f
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x5fdf0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x624c0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x12261
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
|
_ZN7lunasvg4Path6ensureEv:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZNK7lunasvg4Path6isNullEv; lunasvg::Path::isNull(void)
test al, 1
jnz short loc_1221F
jmp short loc_12230
loc_1221F:
call plutovg_path_create
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
jmp short loc_12261
loc_12230:
mov rdi, [rbp+var_10]; this
call _ZNK7lunasvg4Path8isUniqueEv; lunasvg::Path::isUnique(void)
test al, 1
jnz short loc_1225F
mov rax, [rbp+var_10]
mov rdi, [rax]
call plutovg_path_destroy
mov rax, [rbp+var_10]
mov rdi, [rax]
call plutovg_path_clone
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax], rcx
loc_1225F:
jmp short $+2
loc_12261:
mov rax, [rbp+var_10]
mov rax, [rax]
add rsp, 10h
pop rbp
retn
|
long long lunasvg::Path::ensure(lunasvg::Path *this)
{
if ( (lunasvg::Path::isNull(this) & 1) != 0 )
{
*(_QWORD *)this = plutovg_path_create();
}
else if ( (lunasvg::Path::isUnique(this) & 1) == 0 )
{
plutovg_path_destroy(*(_QWORD *)this);
*(_QWORD *)this = plutovg_path_clone(*(_QWORD *)this);
}
return *(_QWORD *)this;
}
|
ensure:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x00114660
TEST AL,0x1
JNZ 0x0011221f
JMP 0x00112230
LAB_0011221f:
CALL 0x0015fd20
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
JMP 0x00112261
LAB_00112230:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00112670
TEST AL,0x1
JNZ 0x0011225f
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0015fdf0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x001624c0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
LAB_0011225f:
JMP 0x00112261
LAB_00112261:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
ADD RSP,0x10
POP RBP
RET
|
/* lunasvg::Path::ensure() */
int8 __thiscall lunasvg::Path::ensure(Path *this)
{
ulong uVar1;
int8 uVar2;
uVar1 = isNull(this);
if ((uVar1 & 1) == 0) {
uVar1 = isUnique(this);
if ((uVar1 & 1) == 0) {
plutovg_path_destroy(*(int8 *)this);
uVar2 = plutovg_path_clone(*(int8 *)this);
*(int8 *)this = uVar2;
}
}
else {
uVar2 = plutovg_path_create();
*(int8 *)this = uVar2;
}
return *(int8 *)this;
}
|
|
12,411
|
LefDefParser::lefiNonDefault::numCuts(int) const
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiNonDefault.cpp
|
int
lefiNonDefault::numCuts(int index) const
{
char msg[160];
if (index < 0 || index >= numMinCuts_) {
sprintf(msg, "ERROR (LEFPARS-1407): The index number %d given for the NONDEFAULT CUT is invalid.\nValid index is from 0 to %d", index, numMinCuts_);
lefiError(0, 1407, msg);
return 0;
}
return numCuts_[index];
}
|
O3
|
cpp
|
LefDefParser::lefiNonDefault::numCuts(int) const:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movl %esi, %edx
testl %esi, %esi
setns %al
movl 0xd8(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x2050e
movq 0xe8(%rdi), %rax
movl %edx, %ecx
movl (%rax,%rcx,4), %ebx
jmp 0x20533
leaq 0x2f627(%rip), %rsi # 0x4fb3c
xorl %ebx, %ebx
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
xorl %edi, %edi
movl $0x57f, %esi # imm = 0x57F
movq %r14, %rdx
callq 0x27ae8
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
|
_ZNK12LefDefParser14lefiNonDefault7numCutsEi:
push r14
push rbx
sub rsp, 0A8h
mov edx, esi
test esi, esi
setns al
mov ecx, [rdi+0D8h]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_2050E
mov rax, [rdi+0E8h]
mov ecx, edx
mov ebx, [rax+rcx*4]
jmp short loc_20533
loc_2050E:
lea rsi, aErrorLefpars14_8; "ERROR (LEFPARS-1407): The index number "...
xor ebx, ebx
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
xor edi, edi; this
mov esi, 57Fh; int
mov rdx, r14; int
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
loc_20533:
mov eax, ebx
add rsp, 0A8h
pop rbx
pop r14
retn
|
long long LefDefParser::lefiNonDefault::numCuts(LefDefParser::lefiNonDefault *this, signed int a2)
{
int v2; // ecx
unsigned int v3; // ebx
const char *v4; // rcx
_BYTE v6[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 54);
if ( v2 > a2 && a2 >= 0 )
{
return *(unsigned int *)(*((_QWORD *)this + 29) + 4LL * (unsigned int)a2);
}
else
{
v3 = 0;
sprintf(
v6,
"ERROR (LEFPARS-1407): The index number %d given for the NONDEFAULT CUT is invalid.\nValid index is from 0 to %d",
a2,
v2);
LefDefParser::lefiError(0LL, 1407, (int)v6, v4);
}
return v3;
}
|
numCuts:
PUSH R14
PUSH RBX
SUB RSP,0xa8
MOV EDX,ESI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0xd8]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x0012050e
MOV RAX,qword ptr [RDI + 0xe8]
MOV ECX,EDX
MOV EBX,dword ptr [RAX + RCX*0x4]
JMP 0x00120533
LAB_0012050e:
LEA RSI,[0x14fb3c]
XOR EBX,EBX
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00102050
XOR EDI,EDI
MOV ESI,0x57f
MOV RDX,R14
CALL 0x00127ae8
LAB_00120533:
MOV EAX,EBX
ADD RSP,0xa8
POP RBX
POP R14
RET
|
/* LefDefParser::lefiNonDefault::numCuts(int) const */
int4 __thiscall LefDefParser::lefiNonDefault::numCuts(lefiNonDefault *this,int param_1)
{
int4 uVar1;
char acStack_b8 [168];
if (param_1 < 0 || *(int *)(this + 0xd8) <= param_1) {
uVar1 = 0;
sprintf(acStack_b8,
"ERROR (LEFPARS-1407): The index number %d given for the NONDEFAULT CUT is invalid.\nValid index is from 0 to %d"
);
lefiError(0,0x57f,acStack_b8);
}
else {
uVar1 = *(int4 *)(*(long *)(this + 0xe8) + (ulong)(uint)param_1 * 4);
}
return uVar1;
}
|
|
12,412
|
ggml::cpu::aarch64::extra_buffer_type::extra_buffer_type()
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
|
bool supports_op(ggml_backend_dev_t, const struct ggml_tensor * op) override {
if ( op->op == GGML_OP_MUL_MAT &&
op->src[0]->buffer &&
(ggml_n_dims(op->src[0]) == 2) &&
op->src[0]->buffer->buft == ggml_backend_cpu_aarch64_buffer_type() &&
ggml_aarch64_get_optimal_repack_type(op->src[0])
) {
if (op->src[1]->buffer && !ggml_backend_buft_is_host(op->src[1]->buffer->buft)) {
return false;
}
if (op->src[1]->type == GGML_TYPE_F32) {
return true;
}
//if (op->src[1]->type == GGML_TYPE_Q8_0) {
// return true;
//}
// may be possible if Q8_0 packed...
} else if (op->op == GGML_OP_MUL_MAT_ID
&& op->src[0]->buffer
&& (ggml_n_dims(op->src[0]) == 3)
&& op->src[0]->buffer->buft == ggml_backend_cpu_aarch64_buffer_type()
&& ggml_aarch64_get_optimal_repack_type(op->src[0])
) {
if (op->src[1]->buffer && !ggml_backend_buft_is_host(op->src[1]->buffer->buft)) {
return false;
}
if (op->src[1]->type == GGML_TYPE_F32) {
return true;
}
//if (op->src[1]->type == GGML_TYPE_Q8_0) {
// return true;
//}
}
return false;
}
|
O0
|
cpp
|
ggml::cpu::aarch64::extra_buffer_type::extra_buffer_type():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xffc0
movq 0x8(%rsp), %rax
movq 0x88d1c(%rip), %rcx # 0xbff40
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x18, %rsp
retq
|
_ZN4ggml3cpu7aarch6417extra_buffer_typeC2Ev:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]; this
mov [rsp+18h+var_10], rdi
call __ZN4ggml3cpu17extra_buffer_typeC2Ev; ggml::cpu::extra_buffer_type::extra_buffer_type(void)
mov rax, [rsp+18h+var_10]
mov rcx, cs:_ZTVN4ggml3cpu7aarch6417extra_buffer_typeE_ptr
add rcx, 10h
mov [rax], rcx
add rsp, 18h
retn
|
ggml::cpu::aarch64::extra_buffer_type * ggml::cpu::aarch64::extra_buffer_type::extra_buffer_type(
ggml::cpu::aarch64::extra_buffer_type *this)
{
ggml::cpu::aarch64::extra_buffer_type *result; // rax
ggml::cpu::extra_buffer_type::extra_buffer_type(this);
result = this;
*(_QWORD *)this = &`vtable for'ggml::cpu::aarch64::extra_buffer_type + 2;
return result;
}
|
extra_buffer_type:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0010ffc0
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [0x001bff40]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
ADD RSP,0x18
RET
|
/* ggml::cpu::aarch64::extra_buffer_type::extra_buffer_type() */
void __thiscall ggml::cpu::aarch64::extra_buffer_type::extra_buffer_type(extra_buffer_type *this)
{
cpu::extra_buffer_type::extra_buffer_type((extra_buffer_type *)this);
*(int **)this = PTR_vtable_001bff40 + 0x10;
return;
}
|
|
12,413
|
ggml::cpu::aarch64::extra_buffer_type::extra_buffer_type()
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
|
bool supports_op(ggml_backend_dev_t, const struct ggml_tensor * op) override {
if ( op->op == GGML_OP_MUL_MAT &&
op->src[0]->buffer &&
(ggml_n_dims(op->src[0]) == 2) &&
op->src[0]->buffer->buft == ggml_backend_cpu_aarch64_buffer_type() &&
ggml_aarch64_get_optimal_repack_type(op->src[0])
) {
if (op->src[1]->buffer && !ggml_backend_buft_is_host(op->src[1]->buffer->buft)) {
return false;
}
if (op->src[1]->type == GGML_TYPE_F32) {
return true;
}
//if (op->src[1]->type == GGML_TYPE_Q8_0) {
// return true;
//}
// may be possible if Q8_0 packed...
} else if (op->op == GGML_OP_MUL_MAT_ID
&& op->src[0]->buffer
&& (ggml_n_dims(op->src[0]) == 3)
&& op->src[0]->buffer->buft == ggml_backend_cpu_aarch64_buffer_type()
&& ggml_aarch64_get_optimal_repack_type(op->src[0])
) {
if (op->src[1]->buffer && !ggml_backend_buft_is_host(op->src[1]->buffer->buft)) {
return false;
}
if (op->src[1]->type == GGML_TYPE_F32) {
return true;
}
//if (op->src[1]->type == GGML_TYPE_Q8_0) {
// return true;
//}
}
return false;
}
|
O1
|
cpp
|
ggml::cpu::aarch64::extra_buffer_type::extra_buffer_type():
pushq %rbx
movq %rdi, %rbx
callq 0xa6f0
movl $0x8, %esi
movq %rbx, %rdi
popq %rbx
jmp 0xa910
nop
|
_ZN4ggml3cpu7aarch6417extra_buffer_typeD0Ev:
push rbx
mov rbx, rdi
call __ZN4ggml3cpu17extra_buffer_typeD2Ev; ggml::cpu::extra_buffer_type::~extra_buffer_type()
mov esi, 8; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
|
void ggml::cpu::aarch64::extra_buffer_type::~extra_buffer_type(ggml::cpu::aarch64::extra_buffer_type *this)
{
ggml::cpu::extra_buffer_type::~extra_buffer_type(this);
operator delete(this, 8uLL);
}
|
~extra_buffer_type:
PUSH RBX
MOV RBX,RDI
CALL 0x0010a6f0
MOV ESI,0x8
MOV RDI,RBX
POP RBX
JMP 0x0010a910
|
/* ggml::cpu::aarch64::extra_buffer_type::~extra_buffer_type() */
void __thiscall ggml::cpu::aarch64::extra_buffer_type::~extra_buffer_type(extra_buffer_type *this)
{
cpu::extra_buffer_type::~extra_buffer_type((extra_buffer_type *)this);
operator_delete(this,8);
return;
}
|
|
12,414
|
inherit_charset_data
|
eloqsql/mysys/charset.c
|
static void
inherit_charset_data(struct charset_info_st *cs, CHARSET_INFO *refcs)
{
if (!cs->to_upper)
cs->to_upper= refcs->to_upper;
if (!cs->to_lower)
cs->to_lower= refcs->to_lower;
if (!cs->m_ctype)
cs->m_ctype= refcs->m_ctype;
if (!cs->tab_to_uni)
cs->tab_to_uni= refcs->tab_to_uni;
}
|
O3
|
c
|
inherit_charset_data:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0x50(%rdi)
jne 0x29564
movq 0x50(%rsi), %rax
movq %rax, 0x50(%rdi)
cmpq $0x0, 0x48(%rdi)
jne 0x29573
movq 0x48(%rsi), %rax
movq %rax, 0x48(%rdi)
cmpq $0x0, 0x40(%rdi)
jne 0x29582
movq 0x40(%rsi), %rax
movq %rax, 0x40(%rdi)
cmpq $0x0, 0x68(%rdi)
jne 0x29591
movq 0x68(%rsi), %rax
movq %rax, 0x68(%rdi)
popq %rbp
retq
nop
|
inherit_charset_data:
push rbp
mov rbp, rsp
cmp qword ptr [rdi+50h], 0
jnz short loc_29564
mov rax, [rsi+50h]
mov [rdi+50h], rax
loc_29564:
cmp qword ptr [rdi+48h], 0
jnz short loc_29573
mov rax, [rsi+48h]
mov [rdi+48h], rax
loc_29573:
cmp qword ptr [rdi+40h], 0
jnz short loc_29582
mov rax, [rsi+40h]
mov [rdi+40h], rax
loc_29582:
cmp qword ptr [rdi+68h], 0
jnz short loc_29591
mov rax, [rsi+68h]
mov [rdi+68h], rax
loc_29591:
pop rbp
retn
|
long long inherit_charset_data(_QWORD *a1, _QWORD *a2)
{
long long result; // rax
if ( !a1[10] )
{
result = a2[10];
a1[10] = result;
}
if ( !a1[9] )
{
result = a2[9];
a1[9] = result;
}
if ( !a1[8] )
{
result = a2[8];
a1[8] = result;
}
if ( !a1[13] )
{
result = a2[13];
a1[13] = result;
}
return result;
}
|
inherit_charset_data:
PUSH RBP
MOV RBP,RSP
CMP qword ptr [RDI + 0x50],0x0
JNZ 0x00129564
MOV RAX,qword ptr [RSI + 0x50]
MOV qword ptr [RDI + 0x50],RAX
LAB_00129564:
CMP qword ptr [RDI + 0x48],0x0
JNZ 0x00129573
MOV RAX,qword ptr [RSI + 0x48]
MOV qword ptr [RDI + 0x48],RAX
LAB_00129573:
CMP qword ptr [RDI + 0x40],0x0
JNZ 0x00129582
MOV RAX,qword ptr [RSI + 0x40]
MOV qword ptr [RDI + 0x40],RAX
LAB_00129582:
CMP qword ptr [RDI + 0x68],0x0
JNZ 0x00129591
MOV RAX,qword ptr [RSI + 0x68]
MOV qword ptr [RDI + 0x68],RAX
LAB_00129591:
POP RBP
RET
|
void inherit_charset_data(long param_1,long param_2)
{
if (*(long *)(param_1 + 0x50) == 0) {
*(int8 *)(param_1 + 0x50) = *(int8 *)(param_2 + 0x50);
}
if (*(long *)(param_1 + 0x48) == 0) {
*(int8 *)(param_1 + 0x48) = *(int8 *)(param_2 + 0x48);
}
if (*(long *)(param_1 + 0x40) == 0) {
*(int8 *)(param_1 + 0x40) = *(int8 *)(param_2 + 0x40);
}
if (*(long *)(param_1 + 0x68) == 0) {
*(int8 *)(param_1 + 0x68) = *(int8 *)(param_2 + 0x68);
}
return;
}
|
|
12,415
|
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 0x36e60
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x373a2
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x25260
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x373a4
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_373A2
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_373A2:
jmp short $+2
loc_373A4:
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 0x00136e60
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x001373a2
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00125260
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_001373a2:
JMP 0x001373a4
LAB_001373a4:
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;
}
|
|
12,416
|
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 0x300d9
movq %rax, %r15
testq %rax, %rax
je 0x30427
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x24290
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_30427
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call _memcpy
mov byte ptr [r15+rbx], 0
loc_30427:
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
v5 = my_malloc(a1, a3 + 1, a4);
v6 = v5;
if ( v5 )
{
memcpy(v5, a2);
*(_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 0x001300d9
MOV R15,RAX
TEST RAX,RAX
JZ 0x00130427
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00124290
MOV byte ptr [R15 + RBX*0x1],0x0
LAB_00130427:
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;
}
|
|
12,417
|
google::protobuf::compiler::java::ToCamelCase(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 ToCamelCase(const std::string& input, bool lower_first) {
bool capitalize_next = !lower_first;
std::string result;
result.reserve(input.size());
for (char i : input) {
if (i == '_') {
capitalize_next = true;
} else if (capitalize_next) {
result.push_back(ToUpperCh(i));
capitalize_next = false;
} else {
result.push_back(i);
}
}
// Lower-case the first letter.
if (lower_first && !result.empty()) {
result[0] = ToLowerCh(result[0]);
}
return result;
}
|
O0
|
cpp
|
google::protobuf::compiler::java::ToCamelCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool):
subq $0x78, %rsp
movq %rdi, 0x28(%rsp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, 0x20(%rsp)
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
andb $0x1, %al
movb %al, 0x67(%rsp)
movb 0x67(%rsp), %al
notb %al
andb $0x1, %al
movb %al, 0x66(%rsp)
movb $0x0, 0x65(%rsp)
callq 0x21390
movq 0x68(%rsp), %rdi
callq 0x21300
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x21850
jmp 0x736c2
movq 0x68(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0x21240
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rdi
callq 0x21b40
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x77d20
testb $0x1, %al
jne 0x73702
jmp 0x73797
leaq 0x40(%rsp), %rdi
callq 0x77d60
movb (%rax), %al
movb %al, 0x37(%rsp)
movsbl 0x37(%rsp), %eax
cmpl $0x5f, %eax
jne 0x73740
movb $0x1, 0x66(%rsp)
jmp 0x73786
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
callq 0x21cc8
jmp 0x73812
testb $0x1, 0x66(%rsp)
je 0x73771
movsbl 0x37(%rsp), %edi
callq 0x73820
movb %al, 0x1f(%rsp)
jmp 0x73757
movq 0x28(%rsp), %rdi
movb 0x1f(%rsp), %al
movsbl %al, %esi
callq 0x21c20
jmp 0x7376a
movb $0x0, 0x66(%rsp)
jmp 0x73784
movq 0x28(%rsp), %rdi
movsbl 0x37(%rsp), %esi
callq 0x21c20
jmp 0x73782
jmp 0x73784
jmp 0x73786
jmp 0x73788
leaq 0x40(%rsp), %rdi
callq 0x77d70
jmp 0x736ea
testb $0x1, 0x67(%rsp)
je 0x737f2
movq 0x28(%rsp), %rdi
callq 0x212d0
testb $0x1, %al
jne 0x737f2
movq 0x28(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x21bc0
movq %rax, 0x10(%rsp)
jmp 0x737c1
movq 0x10(%rsp), %rax
movsbl (%rax), %edi
callq 0x73860
movb %al, 0xf(%rsp)
jmp 0x737d4
movq 0x28(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x21bc0
movq %rax, (%rsp)
jmp 0x737e8
movq (%rsp), %rax
movb 0xf(%rsp), %cl
movb %cl, (%rax)
movb $0x1, 0x65(%rsp)
testb $0x1, 0x65(%rsp)
jne 0x73808
movq 0x28(%rsp), %rdi
callq 0x21cc8
movq 0x20(%rsp), %rax
addq $0x78, %rsp
retq
movq 0x58(%rsp), %rdi
callq 0x21700
nopl (%rax)
|
_ZN6google8protobuf8compiler4java11ToCamelCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb:
sub rsp, 78h
mov [rsp+78h+var_50], rdi
mov al, dl
mov rcx, rdi
mov [rsp+78h+var_58], rcx
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
and al, 1
mov [rsp+78h+var_11], al
mov al, [rsp+78h+var_11]
not al
and al, 1
mov [rsp+78h+var_12], al
mov [rsp+78h+var_13], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rdi, [rsp+78h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rsp+78h+var_50]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
jmp short $+2
loc_736C2:
mov rax, [rsp+78h+var_10]
mov [rsp+78h+var_30], rax
mov rdi, [rsp+78h+var_30]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov [rsp+78h+var_38], rax
mov rdi, [rsp+78h+var_30]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov qword ptr [rsp+78h+var_40], rax
loc_736EA:
lea rdi, [rsp+78h+var_38]
lea rsi, [rsp+78h+var_40]; char
call _ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&)
test al, 1
jnz short loc_73702
jmp loc_73797
loc_73702:
lea rdi, [rsp+78h+var_38]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void)
mov al, [rax]
mov [rsp+78h+var_41], al
movsx eax, [rsp+78h+var_41]
cmp eax, 5Fh ; '_'
jnz short loc_73740
mov [rsp+78h+var_12], 1
jmp short loc_73786
mov rdi, [rsp+arg_20]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_73812
loc_73740:
test [rsp+78h+var_12], 1
jz short loc_73771
movsx edi, [rsp+78h+var_41]; this
call _ZN6google8protobuf8compiler4java9ToUpperChEc; google::protobuf::compiler::java::ToUpperCh(char)
mov [rsp+78h+var_59], al
jmp short $+2
loc_73757:
mov rdi, [rsp+78h+var_50]
mov al, [rsp+78h+var_59]
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_7376A:
mov [rsp+78h+var_12], 0
jmp short loc_73784
loc_73771:
mov rdi, [rsp+78h+var_50]
movsx esi, [rsp+78h+var_41]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_73782:
jmp short $+2
loc_73784:
jmp short $+2
loc_73786:
jmp short $+2
loc_73788:
lea rdi, [rsp+78h+var_38]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void)
jmp loc_736EA
loc_73797:
test [rsp+78h+var_11], 1
jz short loc_737F2
mov rdi, [rsp+78h+var_50]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_737F2
mov rdi, [rsp+78h+var_50]
xor eax, eax
mov esi, eax; char
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov [rsp+78h+var_68], rax
jmp short $+2
loc_737C1:
mov rax, [rsp+78h+var_68]
movsx edi, byte ptr [rax]; this
call _ZN6google8protobuf8compiler4java9ToLowerChEc; google::protobuf::compiler::java::ToLowerCh(char)
mov [rsp+78h+var_69], al
jmp short $+2
loc_737D4:
mov rdi, [rsp+78h+var_50]
xor eax, eax
mov esi, eax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov [rsp+78h+var_78], rax
jmp short $+2
loc_737E8:
mov rax, [rsp+78h+var_78]
mov cl, [rsp+78h+var_69]
mov [rax], cl
loc_737F2:
mov [rsp+78h+var_13], 1
test [rsp+78h+var_13], 1
jnz short loc_73808
mov rdi, [rsp+78h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_73808:
mov rax, [rsp+78h+var_58]
add rsp, 78h
retn
loc_73812:
mov rdi, [rsp+arg_50]
call __Unwind_Resume
|
long long google::protobuf::compiler::java::ToCamelCase(long long a1, long long a2, char a3)
{
long long v3; // rsi
char v5; // [rsp+Fh] [rbp-69h]
char *v6; // [rsp+10h] [rbp-68h]
char v7; // [rsp+1Fh] [rbp-59h]
char v8; // [rsp+37h] [rbp-41h]
char v9[8]; // [rsp+38h] [rbp-40h] BYREF
_QWORD v10[4]; // [rsp+40h] [rbp-38h] BYREF
char v11; // [rsp+65h] [rbp-13h]
bool v12; // [rsp+66h] [rbp-12h]
char v13; // [rsp+67h] [rbp-11h]
long long v14; // [rsp+68h] [rbp-10h]
long long v15; // [rsp+70h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = a3 & 1;
v12 = (a3 & 1) == 0;
v11 = 0;
std::string::basic_string(a1);
v3 = std::string::size(a2);
std::string::reserve(a1, v3);
v10[1] = v14;
v10[0] = std::string::begin(v14);
*(_QWORD *)v9 = std::string::end(v14);
while ( (__gnu_cxx::operator!=<char const*,std::string>(v10, v9) & 1) != 0 )
{
v8 = *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v10);
if ( v8 == 95 )
{
v12 = 1;
}
else if ( v12 )
{
v7 = google::protobuf::compiler::java::ToUpperCh((google::protobuf::compiler::java *)(unsigned int)v8, (char)v9);
std::string::push_back(a1, (unsigned int)v7);
v12 = 0;
}
else
{
std::string::push_back(a1, (unsigned int)v8);
}
__gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v10);
}
if ( (v13 & 1) != 0 && (std::string::empty(a1) & 1) == 0 )
{
v6 = (char *)std::string::operator[](a1, 0LL);
v5 = google::protobuf::compiler::java::ToLowerCh((google::protobuf::compiler::java *)(unsigned int)*v6, 0);
*(_BYTE *)std::string::operator[](a1, 0LL) = v5;
}
return a1;
}
|
ToCamelCase:
SUB RSP,0x78
MOV qword ptr [RSP + 0x28],RDI
MOV AL,DL
MOV RCX,RDI
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
AND AL,0x1
MOV byte ptr [RSP + 0x67],AL
MOV AL,byte ptr [RSP + 0x67]
NOT AL
AND AL,0x1
MOV byte ptr [RSP + 0x66],AL
MOV byte ptr [RSP + 0x65],0x0
CALL 0x00121390
MOV RDI,qword ptr [RSP + 0x68]
CALL 0x00121300
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,RAX
LAB_001736bb:
CALL 0x00121850
JMP 0x001736c2
LAB_001736c2:
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x00121240
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x00121b40
MOV qword ptr [RSP + 0x38],RAX
LAB_001736ea:
LEA RDI,[RSP + 0x40]
LEA RSI,[RSP + 0x38]
CALL 0x00177d20
TEST AL,0x1
JNZ 0x00173702
JMP 0x00173797
LAB_00173702:
LEA RDI,[RSP + 0x40]
CALL 0x00177d60
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x37],AL
MOVSX EAX,byte ptr [RSP + 0x37]
CMP EAX,0x5f
JNZ 0x00173740
MOV byte ptr [RSP + 0x66],0x1
JMP 0x00173786
LAB_00173740:
TEST byte ptr [RSP + 0x66],0x1
JZ 0x00173771
MOVSX EDI,byte ptr [RSP + 0x37]
CALL 0x00173820
MOV byte ptr [RSP + 0x1f],AL
JMP 0x00173757
LAB_00173757:
MOV RDI,qword ptr [RSP + 0x28]
MOV AL,byte ptr [RSP + 0x1f]
MOVSX ESI,AL
CALL 0x00121c20
JMP 0x0017376a
LAB_0017376a:
MOV byte ptr [RSP + 0x66],0x0
JMP 0x00173784
LAB_00173771:
MOV RDI,qword ptr [RSP + 0x28]
MOVSX ESI,byte ptr [RSP + 0x37]
CALL 0x00121c20
JMP 0x00173782
LAB_00173782:
JMP 0x00173784
LAB_00173784:
JMP 0x00173786
LAB_00173786:
JMP 0x00173788
LAB_00173788:
LEA RDI,[RSP + 0x40]
CALL 0x00177d70
JMP 0x001736ea
LAB_00173797:
TEST byte ptr [RSP + 0x67],0x1
JZ 0x001737f2
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001212d0
TEST AL,0x1
JNZ 0x001737f2
MOV RDI,qword ptr [RSP + 0x28]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00121bc0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001737c1
LAB_001737c1:
MOV RAX,qword ptr [RSP + 0x10]
MOVSX EDI,byte ptr [RAX]
CALL 0x00173860
MOV byte ptr [RSP + 0xf],AL
JMP 0x001737d4
LAB_001737d4:
MOV RDI,qword ptr [RSP + 0x28]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00121bc0
LAB_001737e2:
MOV qword ptr [RSP],RAX
JMP 0x001737e8
LAB_001737e8:
MOV RAX,qword ptr [RSP]
MOV CL,byte ptr [RSP + 0xf]
MOV byte ptr [RAX],CL
LAB_001737f2:
MOV byte ptr [RSP + 0x65],0x1
TEST byte ptr [RSP + 0x65],0x1
JNZ 0x00173808
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00121cc8
LAB_00173808:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x78
RET
|
/* WARNING: Removing unreachable block (ram,0x001737fe) */
/* google::protobuf::compiler::java::ToCamelCase(std::__cxx11::string const&, bool) */
java * __thiscall
google::protobuf::compiler::java::ToCamelCase(java *this,string *param_1,bool param_2)
{
bool bVar1;
int1 uVar2;
ulong uVar3;
char *pcVar4;
int1 *puVar5;
int8 local_40;
int8 local_38;
string *local_30;
int1 local_13;
byte local_12;
byte local_11;
string *local_10;
java *local_8;
local_12 = ~param_2 & 1;
local_13 = 0;
local_11 = param_2;
local_10 = param_1;
local_8 = this;
std::__cxx11::string::string((string *)this);
std::__cxx11::string::size();
/* try { // try from 001736bb to 001737e1 has its CatchHandler @ 00173723 */
std::__cxx11::string::reserve((ulong)this);
local_30 = local_10;
local_38 = std::__cxx11::string::begin();
local_40 = std::__cxx11::string::end();
while (bVar1 = __gnu_cxx::operator!=
((__normal_iterator *)&local_38,(__normal_iterator *)&local_40), bVar1) {
pcVar4 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator*
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_38);
if (*pcVar4 == '_') {
local_12 = 1;
}
else if ((local_12 & 1) == 0) {
std::__cxx11::string::push_back((char)this);
}
else {
ToUpperCh(*pcVar4);
std::__cxx11::string::push_back((char)this);
local_12 = 0;
}
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_38);
}
if (((local_11 & 1) != 0) && (uVar3 = std::__cxx11::string::empty(), (uVar3 & 1) == 0)) {
pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)this);
uVar2 = ToLowerCh(*pcVar4);
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)this);
*puVar5 = uVar2;
}
return this;
}
|
|
12,418
|
google::protobuf::compiler::java::ToCamelCase(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 ToCamelCase(const std::string& input, bool lower_first) {
bool capitalize_next = !lower_first;
std::string result;
result.reserve(input.size());
for (char i : input) {
if (i == '_') {
capitalize_next = true;
} else if (capitalize_next) {
result.push_back(ToUpperCh(i));
capitalize_next = false;
} else {
result.push_back(i);
}
}
// Lower-case the first letter.
if (lower_first && !result.empty()) {
result[0] = ToLowerCh(result[0]);
}
return result;
}
|
O3
|
cpp
|
google::protobuf::compiler::java::ToCamelCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rsi
callq 0x1f770
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x43421
movq (%r14), %r14
movl %ebp, %eax
xorb $0x1, %al
xorl %r13d, %r13d
movb (%r14,%r13), %cl
cmpb $0x5f, %cl
sete %r15b
je 0x43416
leal -0x61(%rcx), %edx
leal -0x20(%rcx), %esi
cmpb $0x1a, %dl
movzbl %cl, %ecx
movzbl %sil, %edx
cmovael %ecx, %edx
testb $0x1, %al
cmovel %ecx, %edx
movsbl %dl, %esi
movq %rbx, %rdi
callq 0x1f420
incq %r13
movl %r15d, %eax
cmpq %r13, %r12
jne 0x433e6
testb %bpl, %bpl
je 0x43445
cmpq $0x0, 0x8(%rbx)
je 0x43445
movq (%rbx), %rax
movzbl (%rax), %ecx
leal -0x41(%rcx), %edx
leal 0x20(%rcx), %esi
cmpb $0x1a, %dl
movzbl %sil, %edx
cmovael %ecx, %edx
movb %dl, (%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x43459
movq %rax, %r14
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x4346a
callq 0x1f4a0
movq %r14, %rdi
callq 0x1f860
|
_ZN6google8protobuf8compiler4java11ToCamelCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, edx
mov r14, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rsp+38h+var_38], rax
mov [rdi], rax
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rsi, [rsi+8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov r12, [r14+8]
test r12, r12
jz short loc_43421
mov r14, [r14]
mov eax, ebp
xor al, 1
xor r13d, r13d
loc_433E6:
mov cl, [r14+r13]
cmp cl, 5Fh ; '_'
setz r15b
jz short loc_43416
lea edx, [rcx-61h]
lea esi, [rcx-20h]
cmp dl, 1Ah
movzx ecx, cl
movzx edx, sil
cmovnb edx, ecx
test al, 1
cmovz edx, ecx
movsx esi, dl
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
loc_43416:
inc r13
mov eax, r15d
cmp r12, r13
jnz short loc_433E6
loc_43421:
test bpl, bpl
jz short loc_43445
cmp qword ptr [rbx+8], 0
jz short loc_43445
mov rax, [rbx]
movzx ecx, byte ptr [rax]
lea edx, [rcx-41h]
lea esi, [rcx+20h]
cmp dl, 1Ah
movzx edx, sil
cmovnb edx, ecx
mov [rax], dl
loc_43445:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_43459:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, [rsp+0]
jz short loc_4346A
call __ZdlPv; operator delete(void *)
loc_4346A:
mov rdi, r14
call __Unwind_Resume
|
char ** google::protobuf::compiler::java::ToCamelCase(char **a1, long long *a2, char a3)
{
long long v4; // r12
long long v5; // r14
char v6; // al
long long i; // r13
char v8; // cl
bool v9; // r15
char v10; // dl
char v11; // cl
char v12; // dl
*a1 = (char *)(a1 + 2);
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
std::string::reserve(a1, a2[1]);
v4 = a2[1];
if ( v4 )
{
v5 = *a2;
v6 = a3 ^ 1;
for ( i = 0LL; i != v4; ++i )
{
v8 = *(_BYTE *)(v5 + i);
v9 = v8 == 95;
if ( v8 != 95 )
{
v10 = v8 - 32;
if ( (unsigned __int8)(v8 - 97) >= 0x1Au )
v10 = *(_BYTE *)(v5 + i);
if ( (v6 & 1) == 0 )
v10 = *(_BYTE *)(v5 + i);
std::string::push_back(a1, (unsigned int)v10);
}
v6 = v9;
}
}
if ( a3 && a1[1] )
{
v11 = **a1;
v12 = v11 + 32;
if ( (unsigned __int8)(v11 - 65) >= 0x1Au )
v12 = **a1;
**a1 = v12;
}
return a1;
}
|
ToCamelCase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RSP],RAX
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RSI,qword ptr [RSI + 0x8]
LAB_001433ce:
CALL 0x0011f770
MOV R12,qword ptr [R14 + 0x8]
TEST R12,R12
JZ 0x00143421
MOV R14,qword ptr [R14]
MOV EAX,EBP
XOR AL,0x1
XOR R13D,R13D
LAB_001433e6:
MOV CL,byte ptr [R14 + R13*0x1]
CMP CL,0x5f
SETZ R15B
JZ 0x00143416
LEA EDX,[RCX + -0x61]
LEA ESI,[RCX + -0x20]
CMP DL,0x1a
MOVZX ECX,CL
MOVZX EDX,SIL
CMOVNC EDX,ECX
TEST AL,0x1
CMOVZ EDX,ECX
MOVSX ESI,DL
LAB_0014340e:
MOV RDI,RBX
CALL 0x0011f420
LAB_00143416:
INC R13
MOV EAX,R15D
CMP R12,R13
JNZ 0x001433e6
LAB_00143421:
TEST BPL,BPL
JZ 0x00143445
CMP qword ptr [RBX + 0x8],0x0
JZ 0x00143445
MOV RAX,qword ptr [RBX]
MOVZX ECX,byte ptr [RAX]
LEA EDX,[RCX + -0x41]
LEA ESI,[RCX + 0x20]
CMP DL,0x1a
MOVZX EDX,SIL
CMOVNC EDX,ECX
MOV byte ptr [RAX],DL
LAB_00143445:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::compiler::java::ToCamelCase(std::__cxx11::string const&, bool) */
java * __thiscall
google::protobuf::compiler::java::ToCamelCase(java *this,string *param_1,bool param_2)
{
char cVar1;
long lVar2;
long lVar3;
char cVar4;
long lVar5;
*(java **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (java)0x0;
/* try { // try from 001433ce to 001433d2 has its CatchHandler @ 00143457 */
std::__cxx11::string::reserve((ulong)this);
lVar2 = *(long *)(param_1 + 8);
if (lVar2 != 0) {
lVar3 = *(long *)param_1;
lVar5 = 0;
do {
if (*(char *)(lVar3 + lVar5) != '_') {
/* try { // try from 0014340e to 00143415 has its CatchHandler @ 00143459 */
std::__cxx11::string::push_back((char)this);
}
lVar5 = lVar5 + 1;
} while (lVar2 != lVar5);
}
if ((param_2) && (*(long *)(this + 8) != 0)) {
cVar1 = **(char **)this;
cVar4 = cVar1 + ' ';
if (0x19 < (byte)(cVar1 + 0xbfU)) {
cVar4 = cVar1;
}
**(char **)this = cVar4;
}
return this;
}
|
|
12,419
|
spdlog::logger::dump_backtrace_()
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/logger-inl.h
|
SPDLOG_INLINE void logger::dump_backtrace_() {
using details::log_msg;
if (tracer_.enabled() && !tracer_.empty()) {
sink_it_(
log_msg{name(), level::info, "****************** Backtrace Start ******************"});
tracer_.foreach_pop([this](const log_msg &msg) { this->sink_it_(msg); });
sink_it_(
log_msg{name(), level::info, "****************** Backtrace End ********************"});
}
}
|
O0
|
c
|
spdlog::logger::dump_backtrace_():
subq $0x198, %rsp # imm = 0x198
movq %rdi, 0x170(%rsp)
movq 0x170(%rsp), %rdi
movq %rdi, 0x30(%rsp)
addq $0x68, %rdi
callq 0x3a0e0
testb $0x1, %al
jne 0x3de5e
jmp 0x3e035
movq 0x30(%rsp), %rdi
addq $0x68, %rdi
callq 0x3a3f0
testb $0x1, %al
jne 0x3e035
movq 0x30(%rsp), %rdi
callq 0x3c0a0
movq %rax, %rsi
leaq 0x100(%rsp), %rdi
callq 0x29a50
leaq 0xf0(%rsp), %rax
movq %rax, 0x180(%rsp)
leaq 0xd9672(%rip), %rax # 0x117517
movq %rax, 0x178(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x178(%rsp), %rcx
movq %rcx, (%rax)
movq 0x178(%rsp), %rdi
callq 0x16290
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdx
movq 0xf0(%rsp), %r8
movq 0xf8(%rsp), %r9
leaq 0x110(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movl $0x2, %ecx
callq 0x3a770
movq 0x18(%rsp), %rsi
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
movq 0x30(%rsp), %rax
movq %rax, %rcx
addq $0x68, %rcx
movq %rcx, 0x20(%rsp)
movq %rax, 0xc8(%rsp)
leaq 0xd0(%rsp), %rdi
movq %rdi, 0x28(%rsp)
leaq 0xc8(%rsp), %rsi
callq 0x3ed00
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x3a460
jmp 0x3df6c
leaq 0xd0(%rsp), %rdi
callq 0x43040
movq 0x30(%rsp), %rdi
callq 0x3c0a0
movq %rax, %rsi
leaq 0x48(%rsp), %rdi
callq 0x29a50
leaq 0x38(%rsp), %rax
movq %rax, 0x190(%rsp)
leaq 0xd95a9(%rip), %rax # 0x11754d
movq %rax, 0x188(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x188(%rsp), %rcx
movq %rcx, (%rax)
movq 0x188(%rsp), %rdi
callq 0x16290
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x38(%rsp), %r8
movq 0x40(%rsp), %r9
leaq 0x58(%rsp), %rdi
movl $0x2, %ecx
callq 0x3a770
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
leaq 0x58(%rsp), %rsi
callq *0x18(%rax)
jmp 0x3e035
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x43040
jmp 0x3e03d
addq $0x198, %rsp # imm = 0x198
retq
movq 0xc0(%rsp), %rdi
callq 0x16cf0
nopw (%rax,%rax)
|
_ZN6spdlog6logger15dump_backtrace_Ev:
sub rsp, 198h
mov [rsp+198h+var_28], rdi
mov rdi, [rsp+198h+var_28]
mov [rsp+198h+var_168], rdi
add rdi, 68h ; 'h'; this
call _ZNK6spdlog7details10backtracer7enabledEv; spdlog::details::backtracer::enabled(void)
test al, 1
jnz short loc_3DE5E
jmp loc_3E035
loc_3DE5E:
mov rdi, [rsp+198h+var_168]
add rdi, 68h ; 'h'; this
call _ZNK6spdlog7details10backtracer5emptyEv; spdlog::details::backtracer::empty(void)
test al, 1
jnz loc_3E035
mov rdi, [rsp+198h+var_168]
call _ZNK6spdlog6logger4nameB5cxx11Ev; spdlog::logger::name(void)
mov rsi, rax
lea rdi, [rsp+198h+var_98]
call _ZN3fmt3v1017basic_string_viewIcEC2ISt11char_traitsIcESaIcEEERKNSt7__cxx1112basic_stringIcT_T0_EE; fmt::v10::basic_string_view<char>::basic_string_view<std::char_traits<char>,std::allocator<char>>(std::string const&)
lea rax, [rsp+198h+var_A8]
mov [rsp+198h+var_18], rax
lea rax, aBacktraceStart; "****************** Backtrace Start ****"...
mov [rsp+198h+var_20], rax
mov rax, [rsp+198h+var_18]
mov [rsp+198h+var_188], rax
mov rcx, [rsp+198h+var_20]
mov [rax], rcx
mov rdi, [rsp+198h+var_20]
call _strlen
mov rcx, rax
mov rax, [rsp+198h+var_188]
mov [rax+8], rcx
mov rsi, [rsp+198h+var_98]
mov rdx, [rsp+198h+var_90]
mov r8, [rsp+198h+var_A8]
mov r9, [rsp+198h+var_A0]
lea rdi, [rsp+198h+var_88]
mov [rsp+198h+var_180], rdi
mov ecx, 2
call _ZN6spdlog7details7log_msgC2EN3fmt3v1017basic_string_viewIcEENS_5level10level_enumES5_; spdlog::details::log_msg::log_msg(fmt::v10::basic_string_view<char>,spdlog::level::level_enum,fmt::v10::basic_string_view<char>)
mov rsi, [rsp+198h+var_180]
mov rdi, [rsp+198h+var_168]
mov rax, [rdi]
mov rax, [rax+18h]
call rax
mov rax, [rsp+198h+var_168]
mov rcx, rax
add rcx, 68h ; 'h'
mov [rsp+198h+var_178], rcx
mov [rsp+198h+var_D0], rax
lea rdi, [rsp+198h+var_C8]
mov [rsp+198h+var_170], rdi
lea rsi, [rsp+198h+var_D0]
call _ZNSt8functionIFvRKN6spdlog7details7log_msgEEEC2IZNS0_6logger15dump_backtrace_EvE3$_0vEEOT_; std::function<void ()(spdlog::details::log_msg const&)>::function<spdlog::logger::dump_backtrace_(void)::$_0,void>(spdlog::logger::dump_backtrace_(void)::$_0 &&)
mov rdi, [rsp+198h+var_178]
mov rsi, [rsp+198h+var_170]
call _ZN6spdlog7details10backtracer11foreach_popESt8functionIFvRKNS0_7log_msgEEE; spdlog::details::backtracer::foreach_pop(std::function<void ()(spdlog::details::log_msg const&)>)
jmp short $+2
loc_3DF6C:
lea rdi, [rsp+198h+var_C8]
call _ZNSt8functionIFvRKN6spdlog7details7log_msgEEED2Ev; std::function<void ()(spdlog::details::log_msg const&)>::~function()
mov rdi, [rsp+198h+var_168]
call _ZNK6spdlog6logger4nameB5cxx11Ev; spdlog::logger::name(void)
mov rsi, rax
lea rdi, [rsp+198h+var_150]
call _ZN3fmt3v1017basic_string_viewIcEC2ISt11char_traitsIcESaIcEEERKNSt7__cxx1112basic_stringIcT_T0_EE; fmt::v10::basic_string_view<char>::basic_string_view<std::char_traits<char>,std::allocator<char>>(std::string const&)
lea rax, [rsp+198h+var_160]
mov [rsp+198h+var_8], rax
lea rax, aBacktraceEnd; "****************** Backtrace End ******"...
mov [rsp+198h+var_10], rax
mov rax, [rsp+198h+var_8]
mov [rsp+198h+var_190], rax
mov rcx, [rsp+198h+var_10]
mov [rax], rcx
mov rdi, [rsp+198h+var_10]
call _strlen
mov rcx, rax
mov rax, [rsp+198h+var_190]
mov [rax+8], rcx
mov rsi, [rsp+198h+var_150]
mov rdx, [rsp+198h+var_148]
mov r8, [rsp+198h+var_160]
mov r9, [rsp+198h+var_158]
lea rdi, [rsp+198h+var_140]
mov ecx, 2
call _ZN6spdlog7details7log_msgC2EN3fmt3v1017basic_string_viewIcEENS_5level10level_enumES5_; spdlog::details::log_msg::log_msg(fmt::v10::basic_string_view<char>,spdlog::level::level_enum,fmt::v10::basic_string_view<char>)
mov rdi, [rsp+198h+var_168]
mov rax, [rdi]
lea rsi, [rsp+198h+var_140]
call qword ptr [rax+18h]
jmp short loc_3E035
mov rcx, rax
mov eax, edx
mov [rsp+arg_B8], rcx
mov [rsp+arg_B4], eax
lea rdi, [rsp+arg_C8]
call _ZNSt8functionIFvRKN6spdlog7details7log_msgEEED2Ev; std::function<void ()(spdlog::details::log_msg const&)>::~function()
jmp short loc_3E03D
loc_3E035:
add rsp, 198h
retn
loc_3E03D:
mov rdi, [rsp+arg_B8]
call __Unwind_Resume
|
char spdlog::logger::dump_backtrace_(spdlog::logger *this)
{
char result; // al
long long v2; // rax
long long v3; // rax
const char *v4; // [rsp+38h] [rbp-160h] BYREF
long long v5; // [rsp+40h] [rbp-158h]
long long v6[2]; // [rsp+48h] [rbp-150h] BYREF
_BYTE v7[112]; // [rsp+58h] [rbp-140h] BYREF
spdlog::logger *v8; // [rsp+C8h] [rbp-D0h] BYREF
_BYTE v9[32]; // [rsp+D0h] [rbp-C8h] BYREF
const char *v10; // [rsp+F0h] [rbp-A8h] BYREF
long long v11; // [rsp+F8h] [rbp-A0h]
long long v12[2]; // [rsp+100h] [rbp-98h] BYREF
_BYTE v13[96]; // [rsp+110h] [rbp-88h] BYREF
spdlog::logger *v14; // [rsp+170h] [rbp-28h]
const char *v15; // [rsp+178h] [rbp-20h]
const char **v16; // [rsp+180h] [rbp-18h]
const char *v17; // [rsp+188h] [rbp-10h]
const char **v18; // [rsp+190h] [rbp-8h]
v14 = this;
result = spdlog::details::backtracer::enabled((spdlog::logger *)((char *)this + 104));
if ( (result & 1) != 0 )
{
result = spdlog::details::backtracer::empty((spdlog::logger *)((char *)this + 104));
if ( (result & 1) == 0 )
{
v2 = spdlog::logger::name[abi:cxx11]((long long)this);
fmt::v10::basic_string_view<char>::basic_string_view<std::char_traits<char>,std::allocator<char>>(v12, v2);
v16 = &v10;
v15 = "****************** Backtrace Start ******************";
v10 = "****************** Backtrace Start ******************";
v11 = strlen("****************** Backtrace Start ******************");
spdlog::details::log_msg::log_msg((spdlog::details::os *)v13, v12[0], v12[1], 2, (long long)v10, v11);
(*(void ( **)(spdlog::logger *, _BYTE *))(*(_QWORD *)this + 24LL))(this, v13);
v8 = this;
std::function<void ()(spdlog::details::log_msg const&)>::function<spdlog::logger::dump_backtrace_(void)::$_0,void>(
v9,
&v8);
spdlog::details::backtracer::foreach_pop((long long)this + 104, (long long)v9);
std::function<void ()(spdlog::details::log_msg const&)>::~function(v9);
v3 = spdlog::logger::name[abi:cxx11]((long long)this);
fmt::v10::basic_string_view<char>::basic_string_view<std::char_traits<char>,std::allocator<char>>(v6, v3);
v18 = &v4;
v17 = "****************** Backtrace End ********************";
v4 = "****************** Backtrace End ********************";
v5 = strlen("****************** Backtrace End ********************");
spdlog::details::log_msg::log_msg((spdlog::details::os *)v7, v6[0], v6[1], 2, (long long)v4, v5);
return (*(long long ( **)(spdlog::logger *, _BYTE *))(*(_QWORD *)this + 24LL))(this, v7);
}
}
return result;
}
|
dump_backtrace_:
SUB RSP,0x198
MOV qword ptr [RSP + 0x170],RDI
MOV RDI,qword ptr [RSP + 0x170]
MOV qword ptr [RSP + 0x30],RDI
ADD RDI,0x68
CALL 0x0013a0e0
TEST AL,0x1
JNZ 0x0013de5e
JMP 0x0013e035
LAB_0013de5e:
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x68
CALL 0x0013a3f0
TEST AL,0x1
JNZ 0x0013e035
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x0013c0a0
MOV RSI,RAX
LEA RDI,[RSP + 0x100]
CALL 0x00129a50
LEA RAX,[RSP + 0xf0]
MOV qword ptr [RSP + 0x180],RAX
LEA RAX,[0x217517]
MOV qword ptr [RSP + 0x178],RAX
MOV RAX,qword ptr [RSP + 0x180]
MOV qword ptr [RSP + 0x10],RAX
MOV RCX,qword ptr [RSP + 0x178]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x178]
CALL 0x00116290
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RSI,qword ptr [RSP + 0x100]
MOV RDX,qword ptr [RSP + 0x108]
MOV R8,qword ptr [RSP + 0xf0]
MOV R9,qword ptr [RSP + 0xf8]
LEA RDI,[RSP + 0x110]
MOV qword ptr [RSP + 0x18],RDI
MOV ECX,0x2
CALL 0x0013a770
MOV RSI,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x18]
CALL RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,RAX
ADD RCX,0x68
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0xc8],RAX
LEA RDI,[RSP + 0xd0]
MOV qword ptr [RSP + 0x28],RDI
LEA RSI,[RSP + 0xc8]
CALL 0x0013ed00
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
LAB_0013df65:
CALL 0x0013a460
LAB_0013df6a:
JMP 0x0013df6c
LAB_0013df6c:
LEA RDI,[RSP + 0xd0]
CALL 0x00143040
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x0013c0a0
MOV RSI,RAX
LEA RDI,[RSP + 0x48]
CALL 0x00129a50
LEA RAX,[RSP + 0x38]
MOV qword ptr [RSP + 0x190],RAX
LEA RAX,[0x21754d]
MOV qword ptr [RSP + 0x188],RAX
MOV RAX,qword ptr [RSP + 0x190]
MOV qword ptr [RSP + 0x8],RAX
MOV RCX,qword ptr [RSP + 0x188]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x188]
CALL 0x00116290
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
MOV R8,qword ptr [RSP + 0x38]
MOV R9,qword ptr [RSP + 0x40]
LEA RDI,[RSP + 0x58]
MOV ECX,0x2
CALL 0x0013a770
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RDI]
LEA RSI,[RSP + 0x58]
CALL qword ptr [RAX + 0x18]
JMP 0x0013e035
LAB_0013e035:
ADD RSP,0x198
RET
|
/* spdlog::logger::dump_backtrace_() */
void __thiscall spdlog::logger::dump_backtrace_(logger *this)
{
ulong uVar1;
string *psVar2;
size_t sVar3;
char *local_160 [2];
int8 local_150;
int8 local_148;
log_msg local_140 [112];
logger *local_d0;
function<void(spdlog::details::log_msg_const&)> local_c8 [32];
char *local_a8 [2];
int8 local_98;
int8 local_90;
log_msg local_88 [96];
logger *local_28;
char *local_20;
char **local_18;
char *local_10;
char **local_8;
local_28 = this;
uVar1 = details::backtracer::enabled((backtracer *)(this + 0x68));
if (((uVar1 & 1) != 0) &&
(uVar1 = details::backtracer::empty((backtracer *)(this + 0x68)), (uVar1 & 1) == 0)) {
psVar2 = (string *)name_abi_cxx11_(this);
fmt::v10::basic_string_view<char>::
basic_string_view<std::char_traits<char>,std::allocator<char>>
((basic_string_view<char> *)&local_98,psVar2);
local_18 = local_a8;
local_20 = "****************** Backtrace Start ******************";
local_a8[0] = "****************** Backtrace Start ******************";
sVar3 = strlen("****************** Backtrace Start ******************");
details::log_msg::log_msg(local_88,local_98,local_90,2,local_a8[0],sVar3);
(**(code **)(*(long *)this + 0x18))(this,local_88);
local_d0 = this;
std::function<void(spdlog::details::log_msg_const&)>::
function<spdlog::logger::dump_backtrace_()::__0,void>(local_c8,(__0 *)&local_d0);
/* try { // try from 0013df65 to 0013df69 has its CatchHandler @ 0013e012 */
details::backtracer::foreach_pop((backtracer *)(this + 0x68),local_c8);
std::function<void(spdlog::details::log_msg_const&)>::~function(local_c8);
psVar2 = (string *)name_abi_cxx11_(this);
fmt::v10::basic_string_view<char>::
basic_string_view<std::char_traits<char>,std::allocator<char>>
((basic_string_view<char> *)&local_150,psVar2);
local_8 = local_160;
local_10 = "****************** Backtrace End ********************";
local_160[0] = "****************** Backtrace End ********************";
sVar3 = strlen("****************** Backtrace End ********************");
details::log_msg::log_msg(local_140,local_150,local_148,2,local_160[0],sVar3);
(**(code **)(*(long *)this + 0x18))(this,local_140);
}
return;
}
|
|
12,420
|
my_mb_wc_euc_kr
|
eloqsql/strings/ctype-euc_kr.c
|
static int
my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_ksc5601_uni_onechar((hi<<8)+s[1])))
return -2;
return 2;
}
|
O0
|
c
|
my_mb_wc_euc_kr:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x9861e
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x9870b
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0x98646
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x9870b
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x98660
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x9870b
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
movl $0x81, %eax
cmpl %ecx, %eax
jg 0x986ce
movl -0x2c(%rbp), %eax
movzbl %al, %eax
cmpl $0xfe, %eax
jg 0x986ce
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x41, %eax
jl 0x98696
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x5a, %eax
jle 0x986d7
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x61, %eax
jl 0x986b0
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x7a, %eax
jle 0x986d7
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x81, %eax
jl 0x986ce
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfe, %eax
jle 0x986d7
movl $0x0, -0x4(%rbp)
jmp 0x9870b
movl -0x2c(%rbp), %edi
shll $0x8, %edi
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
addl %eax, %edi
callq 0x98a80
cltq
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x98704
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x9870b
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_mb_wc_euc_kr:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_9861E
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_9870B
loc_9861E:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_98646
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_9870B
loc_98646:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_98660
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_9870B
loc_98660:
mov eax, [rbp+var_2C]
movzx ecx, al
mov eax, 81h
cmp eax, ecx
jg short loc_986CE
mov eax, [rbp+var_2C]
movzx eax, al
cmp eax, 0FEh
jg short loc_986CE
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 41h ; 'A'
jl short loc_98696
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 5Ah ; 'Z'
jle short loc_986D7
loc_98696:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 61h ; 'a'
jl short loc_986B0
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 7Ah ; 'z'
jle short loc_986D7
loc_986B0:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 81h
jl short loc_986CE
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FEh
jle short loc_986D7
loc_986CE:
mov [rbp+var_4], 0
jmp short loc_9870B
loc_986D7:
mov edi, [rbp+var_2C]
shl edi, 8
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
add edi, eax
call func_ksc5601_uni_onechar
cdqe
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jnz short loc_98704
mov [rbp+var_4], 0FFFFFFFEh
jmp short loc_9870B
loc_98704:
mov [rbp+var_4], 2
loc_9870B:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_mb_wc_euc_kr(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
int v4; // eax
unsigned int v6; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v6 = *a3;
if ( v6 >= 0x80 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( (unsigned __int8)v6 < 0x81u
|| (unsigned __int8)v6 == 255
|| (a3[1] < 0x41u || a3[1] > 0x5Au) && (a3[1] < 0x61u || a3[1] > 0x7Au) && (a3[1] < 0x81u || a3[1] == 255) )
{
return 0;
}
else
{
v4 = func_ksc5601_uni_onechar(a3[1] + (v6 << 8));
*a2 = v4;
if ( v4 )
return 2;
else
return (unsigned int)-2;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_mb_wc_euc_kr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0019861e
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0019870b
LAB_0019861e:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x00198646
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0019870b
LAB_00198646:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00198660
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0019870b
LAB_00198660:
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX ECX,AL
MOV EAX,0x81
CMP EAX,ECX
JG 0x001986ce
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX EAX,AL
CMP EAX,0xfe
JG 0x001986ce
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x41
JL 0x00198696
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x5a
JLE 0x001986d7
LAB_00198696:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x61
JL 0x001986b0
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x7a
JLE 0x001986d7
LAB_001986b0:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x81
JL 0x001986ce
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfe
JLE 0x001986d7
LAB_001986ce:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0019870b
LAB_001986d7:
MOV EDI,dword ptr [RBP + -0x2c]
SHL EDI,0x8
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
ADD EDI,EAX
CALL 0x00198a80
CDQE
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x00198704
MOV dword ptr [RBP + -0x4],0xfffffffe
JMP 0x0019870b
LAB_00198704:
MOV dword ptr [RBP + -0x4],0x2
LAB_0019870b:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_mb_wc_euc_kr(int8 param_1,long *param_2,byte *param_3,byte *param_4)
{
uint uVar1;
int iVar2;
int4 local_c;
if (param_3 < param_4) {
uVar1 = (uint)*param_3;
if (uVar1 < 0x80) {
*param_2 = (long)(int)uVar1;
local_c = 1;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if (((uVar1 < 0x81) || (0xfe < uVar1)) ||
((((param_3[1] < 0x41 || (0x5a < param_3[1])) &&
((param_3[1] < 0x61 || (0x7a < param_3[1])))) &&
((param_3[1] < 0x81 || (param_3[1] == 0xff)))))) {
local_c = 0;
}
else {
iVar2 = func_ksc5601_uni_onechar(uVar1 * 0x100 + (uint)param_3[1]);
*param_2 = (long)iVar2;
if ((long)iVar2 == 0) {
local_c = 0xfffffffe;
}
else {
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
12,421
|
ma_log_change
|
eloqsql/storage/maria/ma_write.c
|
my_bool _ma_log_change(MARIA_PAGE *ma_page, const uchar *key_pos, uint length,
enum en_key_debug debug_marker __attribute__((unused)))
{
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 2 + 6 + 7], *log_pos;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4];
uint offset= (uint) (key_pos - ma_page->buff), translog_parts;
MARIA_HA *info= ma_page->info;
my_off_t page= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_change");
DBUG_PRINT("enter", ("page: %lu length: %u", (ulong) page, length));
DBUG_ASSERT(info->s->now_transactional);
DBUG_ASSERT(offset + length <= ma_page->size);
DBUG_ASSERT(ma_page->org_size == ma_page->size);
/* Store address of new root page */
page= ma_page->pos / info->s->block_size;
page_store(log_data + FILEID_STORE_SIZE, page);
log_pos= log_data+ FILEID_STORE_SIZE + PAGE_STORE_SIZE;
#ifdef EXTRA_DEBUG_KEY_CHANGES
(*log_pos++)= KEY_OP_DEBUG;
(*log_pos++)= debug_marker;
#endif
log_pos[0]= KEY_OP_OFFSET;
int2store(log_pos+1, offset);
log_pos[3]= KEY_OP_CHANGE;
int2store(log_pos+4, length);
log_pos+= 6;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (log_pos - log_data);
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= key_pos;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= length;
translog_parts= 2;
_ma_log_key_changes(ma_page,
log_array + TRANSLOG_INTERNAL_PARTS + translog_parts,
log_pos, &length, &translog_parts);
if (translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t) (log_pos - log_data) + length,
TRANSLOG_INTERNAL_PARTS + translog_parts,
log_array, log_data, NULL))
DBUG_RETURN(1);
DBUG_RETURN(0);
}
|
O3
|
c
|
ma_log_change:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edx, %r8d
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl 0x10(%rdi), %r9d
movq (%rdi), %rcx
movq 0x18(%rdi), %rax
movq (%rcx), %rdx
movl 0x7bc(%rdx), %edi
xorl %edx, %edx
divq %rdi
leaq -0x20(%rbp), %r10
leaq -0x90(%rbp), %r11
movq %r10, 0x20(%r11)
movq $0xd, 0x28(%r11)
movq %rsi, 0x30(%r11)
movl %esi, %edx
subl %r9d, %edx
movl %eax, 0x2(%r10)
shrq $0x20, %rax
movb %al, 0x6(%r10)
movb $0x1, 0x7(%r10)
movw %dx, 0x8(%r10)
movb $0x3, 0xa(%r10)
movw %r8w, 0xb(%r10)
movl %r8d, %eax
movq %rax, 0x38(%r11)
movq 0x8(%rcx), %rdx
addl $0xd, %r8d
subq $0x8, %rsp
leaq -0x28(%rbp), %rdi
movl $0xc, %esi
movl $0x4, %r9d
pushq $0x0
pushq %r10
pushq %r11
callq 0x2d77c
addq $0x20, %rsp
testb %al, %al
setne %al
movq %fs:0x28, %rcx
cmpq -0x8(%rbp), %rcx
jne 0x5a8f8
addq $0x90, %rsp
popq %rbp
retq
callq 0x2b280
|
_ma_log_change:
push rbp
mov rbp, rsp
sub rsp, 90h
mov r8d, edx
mov rax, fs:28h
mov [rbp+var_8], rax
mov r9d, [rdi+10h]
mov rcx, [rdi]
mov rax, [rdi+18h]
mov rdx, [rcx]
mov edi, [rdx+7BCh]
xor edx, edx
div rdi
lea r10, [rbp+var_20]
lea r11, [rbp+var_90]
mov [r11+20h], r10
mov qword ptr [r11+28h], 0Dh
mov [r11+30h], rsi
mov edx, esi
sub edx, r9d
mov [r10+2], eax
shr rax, 20h
mov [r10+6], al
mov byte ptr [r10+7], 1
mov [r10+8], dx
mov byte ptr [r10+0Ah], 3
mov [r10+0Bh], r8w
mov eax, r8d
mov [r11+38h], rax
mov rdx, [rcx+8]
add r8d, 0Dh
sub rsp, 8
lea rdi, [rbp+var_28]
mov esi, 0Ch
mov r9d, 4
push 0
push r10
push r11
call translog_write_record
add rsp, 20h
test al, al
setnz al
mov rcx, fs:28h
cmp rcx, [rbp+var_8]
jnz short loc_5A8F8
add rsp, 90h
pop rbp
retn
loc_5A8F8:
call ___stack_chk_fail
|
bool ma_log_change(long long a1, long long a2, unsigned int a3)
{
int v3; // r9d
_QWORD *v4; // rcx
unsigned long long v5; // rax
__int128 v7; // [rsp+8h] [rbp-90h] BYREF
__int16 *v8; // [rsp+28h] [rbp-70h]
long long v9; // [rsp+30h] [rbp-68h]
long long v10; // [rsp+38h] [rbp-60h]
long long v11; // [rsp+40h] [rbp-58h]
_BYTE v12[8]; // [rsp+70h] [rbp-28h] BYREF
__int16 v13; // [rsp+78h] [rbp-20h] BYREF
int v14; // [rsp+7Ah] [rbp-1Eh]
char v15; // [rsp+7Eh] [rbp-1Ah]
char v16; // [rsp+7Fh] [rbp-19h]
__int16 v17; // [rsp+80h] [rbp-18h]
char v18; // [rsp+82h] [rbp-16h]
__int16 v19; // [rsp+83h] [rbp-15h]
unsigned long long v20; // [rsp+90h] [rbp-8h]
v20 = __readfsqword(0x28u);
v3 = *(_DWORD *)(a1 + 16);
v4 = *(_QWORD **)a1;
v5 = *(_QWORD *)(a1 + 24) / (unsigned long long)*(unsigned int *)(**(_QWORD **)a1 + 1980LL);
v8 = &v13;
v9 = 13LL;
v10 = a2;
v14 = v5;
v15 = BYTE4(v5);
v16 = 1;
v17 = a2 - v3;
v18 = 3;
v19 = a3;
v11 = a3;
return (unsigned __int8)translog_write_record(
(unsigned long long)v12,
&byte_9[3],
v4[1],
v4,
a3 + 13,
4,
&v7,
&v13,
0LL) != 0;
}
|
_ma_log_change:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV R8D,EDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV R9D,dword ptr [RDI + 0x10]
MOV RCX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x18]
MOV RDX,qword ptr [RCX]
MOV EDI,dword ptr [RDX + 0x7bc]
XOR EDX,EDX
DIV RDI
LEA R10,[RBP + -0x20]
LEA R11,[RBP + -0x90]
MOV qword ptr [R11 + 0x20],R10
MOV qword ptr [R11 + 0x28],0xd
MOV qword ptr [R11 + 0x30],RSI
MOV EDX,ESI
SUB EDX,R9D
MOV dword ptr [R10 + 0x2],EAX
SHR RAX,0x20
MOV byte ptr [R10 + 0x6],AL
MOV byte ptr [R10 + 0x7],0x1
MOV word ptr [R10 + 0x8],DX
MOV byte ptr [R10 + 0xa],0x3
MOV word ptr [R10 + 0xb],R8W
MOV EAX,R8D
MOV qword ptr [R11 + 0x38],RAX
MOV RDX,qword ptr [RCX + 0x8]
ADD R8D,0xd
SUB RSP,0x8
LEA RDI,[RBP + -0x28]
MOV ESI,0xc
MOV R9D,0x4
PUSH 0x0
PUSH R10
PUSH R11
CALL 0x0012d77c
ADD RSP,0x20
TEST AL,AL
SETNZ AL
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x8]
JNZ 0x0015a8f8
ADD RSP,0x90
POP RBP
RET
LAB_0015a8f8:
CALL 0x0012b280
|
bool _ma_log_change(long *param_1,int8 param_2,uint param_3)
{
long *plVar1;
int1 auVar2 [16];
char cVar3;
long in_FS_OFFSET;
int1 local_98 [32];
int1 *local_78;
int8 local_70;
int8 local_68;
ulong local_60;
int1 local_30 [8];
int1 local_28 [2];
int4 local_26;
int1 local_22;
int1 local_21;
short local_20;
int1 local_1e;
int2 local_1d;
long local_10;
local_60 = (ulong)param_3;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
plVar1 = (long *)*param_1;
auVar2._8_8_ = 0;
auVar2._0_8_ = param_1[3];
auVar2 = auVar2 / ZEXT416(*(uint *)(*plVar1 + 0x7bc));
local_78 = local_28;
local_70 = 0xd;
local_20 = (short)param_2 - (short)(int)param_1[2];
local_26 = auVar2._0_4_;
local_22 = auVar2[4];
local_21 = 1;
local_1e = 3;
local_1d = (int2)param_3;
local_68 = param_2;
cVar3 = translog_write_record(local_30,0xc,plVar1[1],plVar1,param_3 + 0xd,4,local_98,local_78,0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return cVar3 != '\0';
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
12,422
|
my_b_cache_read_r
|
eloqsql/mysys/mf_iocache.c
|
static int _my_b_cache_read_r(IO_CACHE *cache, uchar *Buffer, size_t Count)
{
my_off_t pos_in_file;
size_t length, diff_length, left_length= 0;
IO_CACHE_SHARE *cshare= cache->share;
DBUG_ENTER("_my_b_cache_read_r");
DBUG_ASSERT(!(cache->myflags & MY_ENCRYPT));
while (Count)
{
size_t cnt, len;
pos_in_file= cache->pos_in_file + (cache->read_end - cache->buffer);
diff_length= (size_t) (pos_in_file & (IO_SIZE-1));
length=IO_ROUND_UP(Count+diff_length)-diff_length;
length= ((length <= cache->read_length) ?
length + IO_ROUND_DN(cache->read_length - length) :
length - IO_ROUND_UP(length - cache->read_length));
if (cache->type != READ_FIFO &&
(length > (cache->end_of_file - pos_in_file)))
length= (size_t) (cache->end_of_file - pos_in_file);
if (length == 0)
{
cache->error= (int) left_length;
DBUG_RETURN(1);
}
if (lock_io_cache(cache, pos_in_file))
{
/* With a synchronized write/read cache we won't come here... */
DBUG_ASSERT(!cshare->source_cache);
/*
... unless the writer has gone before this thread entered the
lock. Simulate EOF in this case. It can be distinguished by
cache->file.
*/
if (cache->file < 0)
len= 0;
else
{
/*
Whenever a function which operates on IO_CACHE flushes/writes
some part of the IO_CACHE to disk it will set the property
"seek_not_done" to indicate this to other functions operating
on the IO_CACHE.
*/
if (cache->seek_not_done)
{
if (mysql_file_seek(cache->file, pos_in_file, MY_SEEK_SET, MYF(0))
== MY_FILEPOS_ERROR)
{
cache->error= -1;
unlock_io_cache(cache);
DBUG_RETURN(1);
}
}
len= mysql_file_read(cache->file, cache->buffer, length, cache->myflags);
}
DBUG_PRINT("io_cache_share", ("read %lu bytes", (ulong) len));
cache->read_end= cache->buffer + (len == (size_t) -1 ? 0 : len);
cache->error= (len == length ? 0 : (int) len);
cache->pos_in_file= pos_in_file;
/* Copy important values to the share. */
cshare->error= cache->error;
cshare->read_end= cache->read_end;
cshare->pos_in_file= pos_in_file;
/* Mark all threads as running and wake them. */
unlock_io_cache(cache);
}
else
{
/*
With a synchronized write/read cache readers always come here.
Copy important values from the share.
*/
cache->error= cshare->error;
cache->read_end= cshare->read_end;
cache->pos_in_file= cshare->pos_in_file;
len= ((cache->error == -1) ? (size_t) -1 :
(size_t) (cache->read_end - cache->buffer));
}
cache->read_pos= cache->buffer;
cache->seek_not_done= 0;
if (len == 0 || len == (size_t) -1)
{
DBUG_PRINT("io_cache_share", ("reader error. len %lu left %lu",
(ulong) len, (ulong) left_length));
cache->error= (int) left_length;
DBUG_RETURN(1);
}
cnt= (len > Count) ? Count : len;
if (cnt)
memcpy(Buffer, cache->read_pos, cnt);
Count -= cnt;
Buffer+= cnt;
left_length+= cnt;
cache->read_pos+= cnt;
}
DBUG_RETURN(0);
}
|
O0
|
c
|
my_b_cache_read_r:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0xe31a0
jmp 0xe31a2
cmpq $0x0, -0x20(%rbp)
je 0xe3583
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq 0x20(%rdx), %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
andq $0xfff, %rax # imm = 0xFFF
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq -0x38(%rbp), %rax
addq $0x1000, %rax # imm = 0x1000
subq $0x1, %rax
movabsq $0xfffff000, %rcx # imm = 0xFFFFF000
andq %rcx, %rax
subq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xf0(%rcx), %rax
ja 0xe323d
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0xf0(%rcx), %rcx
subq -0x30(%rbp), %rcx
movabsq $0xfffff000, %rdx # imm = 0xFFFFF000
andq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
jmp 0xe326f
movq -0x30(%rbp), %rax
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rdx
subq 0xf0(%rdx), %rcx
addq $0x1000, %rcx # imm = 0x1000
subq $0x1, %rcx
movabsq $0xfffff000, %rdx # imm = 0xFFFFF000
andq %rdx, %rcx
subq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x4, 0xb0(%rax)
je 0xe32a9
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq -0x28(%rbp), %rcx
cmpq %rcx, %rax
jbe 0xe32a9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0xe32cc
movq -0x40(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xe4(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xe358c
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xe4d50
cmpl $0x0, %eax
je 0xe3440
jmp 0xe32e4
jmp 0xe32e6
movq -0x10(%rbp), %rax
cmpl $0x0, 0xd4(%rax)
jge 0xe3300
movq $0x0, -0x58(%rbp)
jmp 0xe3395
movq -0x10(%rbp), %rax
cmpl $0x0, 0xe0(%rax)
je 0xe335f
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x28(%rbp), %rcx
leaq 0x7728c(%rip), %rdi # 0x15a5ae
movl $0x4cb, %esi # imm = 0x4CB
xorl %r8d, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0xe21d0
cmpq $-0x1, %rax
jne 0xe335d
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rdi
callq 0xe4fb0
movl $0x1, -0x4(%rbp)
jmp 0xe358c
jmp 0xe335f
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x30(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %r9
leaq 0x77227(%rip), %rdi # 0x15a5ae
movl $0x4d3, %esi # imm = 0x4D3
callq 0xe4be0
movq %rax, -0x58(%rbp)
jmp 0xe3397
jmp 0xe3399
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x68(%rbp)
cmpq $-0x1, -0x58(%rbp)
jne 0xe33b4
xorl %eax, %eax
movq %rax, -0x70(%rbp)
jmp 0xe33bc
movq -0x58(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rcx
movq -0x70(%rbp), %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x58(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0xe33e0
xorl %eax, %eax
movl %eax, -0x74(%rbp)
jmp 0xe33e7
movq -0x58(%rbp), %rax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xe4(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl 0xe4(%rax), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0xe0(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0xd0(%rax)
movq -0x28(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x10(%rbp), %rdi
callq 0xe4fb0
jmp 0xe34b2
movq -0x48(%rbp), %rax
movl 0xe0(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xe4(%rax)
movq -0x48(%rbp), %rax
movq 0xd0(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x48(%rbp), %rax
movq 0xb8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0xe4(%rax)
jne 0xe3493
movq $-0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0xe34aa
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0xe0(%rax)
cmpq $0x0, -0x58(%rbp)
je 0xe34de
cmpq $-0x1, -0x58(%rbp)
jne 0xe34fe
jmp 0xe34e0
jmp 0xe34e2
movq -0x40(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xe4(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xe358c
movq -0x58(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0xe3515
movq -0x20(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0xe3520
movq -0x58(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xe3547
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x50(%rbp), %rdx
callq 0x2a0b0
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x50(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x50(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x50(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
jmp 0xe31a2
jmp 0xe3585
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_my_b_cache_read_r:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_40], 0
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_48], rax
jmp short $+2
loc_E31A0:
jmp short $+2
loc_E31A2:
cmp [rbp+var_20], 0
jz loc_E3583
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_10]
mov rcx, [rcx+18h]
mov rdx, [rbp+var_10]
mov rdx, [rdx+20h]
sub rcx, rdx
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
and rax, 0FFFh
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_38]
add rax, 1000h
sub rax, 1
mov rcx, 0FFFFF000h
and rax, rcx
sub rax, [rbp+var_38]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
cmp rax, [rcx+0F0h]
ja short loc_E323D
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov rcx, [rcx+0F0h]
sub rcx, [rbp+var_30]
mov rdx, 0FFFFF000h
and rcx, rdx
add rax, rcx
mov [rbp+var_60], rax
jmp short loc_E326F
loc_E323D:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_30]
mov rdx, [rbp+var_10]
sub rcx, [rdx+0F0h]
add rcx, 1000h
sub rcx, 1
mov rdx, 0FFFFF000h
and rcx, rdx
sub rax, rcx
mov [rbp+var_60], rax
loc_E326F:
mov rax, [rbp+var_60]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+0B0h], 4
jz short loc_E32A9
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rcx, [rbp+var_28]
cmp rax, rcx
jbe short loc_E32A9
mov rax, [rbp+var_10]
mov rax, [rax+8]
sub rax, [rbp+var_28]
mov [rbp+var_30], rax
loc_E32A9:
cmp [rbp+var_30], 0
jnz short loc_E32CC
mov rax, [rbp+var_40]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+0E4h], ecx
mov [rbp+var_4], 1
jmp loc_E358C
loc_E32CC:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
call lock_io_cache
cmp eax, 0
jz loc_E3440
jmp short $+2
loc_E32E4:
jmp short $+2
loc_E32E6:
mov rax, [rbp+var_10]
cmp dword ptr [rax+0D4h], 0
jge short loc_E3300
mov [rbp+var_58], 0
jmp loc_E3395
loc_E3300:
mov rax, [rbp+var_10]
cmp dword ptr [rax+0E0h], 0
jz short loc_E335F
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_28]
lea rdi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4CBh
xor r8d, r8d
xor eax, eax
mov r9d, eax
call inline_mysql_file_seek_6
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_E335D
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0FFFFFFFFh
mov rdi, [rbp+var_10]
call unlock_io_cache
mov [rbp+var_4], 1
jmp loc_E358C
loc_E335D:
jmp short $+2
loc_E335F:
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
mov r8, [rbp+var_30]
mov rax, [rbp+var_10]
mov r9, [rax+0F8h]
lea rdi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4D3h
call inline_mysql_file_read_5
mov [rbp+var_58], rax
loc_E3395:
jmp short $+2
loc_E3397:
jmp short $+2
loc_E3399:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov [rbp+var_68], rax
cmp [rbp+var_58], 0FFFFFFFFFFFFFFFFh
jnz short loc_E33B4
xor eax, eax
mov [rbp+var_70], rax
jmp short loc_E33BC
loc_E33B4:
mov rax, [rbp+var_58]
mov [rbp+var_70], rax
loc_E33BC:
mov rcx, [rbp+var_68]
mov rax, [rbp+var_70]
add rcx, rax
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov rax, [rbp+var_58]
cmp rax, [rbp+var_30]
jnz short loc_E33E0
xor eax, eax
mov [rbp+var_74], eax
jmp short loc_E33E7
loc_E33E0:
mov rax, [rbp+var_58]
mov [rbp+var_74], eax
loc_E33E7:
mov ecx, [rbp+var_74]
mov rax, [rbp+var_10]
mov [rax+0E4h], ecx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+0E4h]
mov rax, [rbp+var_48]
mov [rax+0E0h], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+18h]
mov rax, [rbp+var_48]
mov [rax+0D0h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_48]
mov [rax+0B8h], rcx
mov rdi, [rbp+var_10]
call unlock_io_cache
jmp short loc_E34B2
loc_E3440:
mov rax, [rbp+var_48]
mov ecx, [rax+0E0h]
mov rax, [rbp+var_10]
mov [rax+0E4h], ecx
mov rax, [rbp+var_48]
mov rcx, [rax+0D0h]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov rax, [rbp+var_48]
mov rcx, [rax+0B8h]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+0E4h], 0FFFFFFFFh
jnz short loc_E3493
mov rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_80], rax
jmp short loc_E34AA
loc_E3493:
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+20h]
sub rax, rcx
mov [rbp+var_80], rax
loc_E34AA:
mov rax, [rbp+var_80]
mov [rbp+var_58], rax
loc_E34B2:
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+0E0h], 0
cmp [rbp+var_58], 0
jz short loc_E34DE
cmp [rbp+var_58], 0FFFFFFFFFFFFFFFFh
jnz short loc_E34FE
loc_E34DE:
jmp short $+2
loc_E34E0:
jmp short $+2
loc_E34E2:
mov rax, [rbp+var_40]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+0E4h], ecx
mov [rbp+var_4], 1
jmp loc_E358C
loc_E34FE:
mov rax, [rbp+var_58]
cmp rax, [rbp+var_20]
jbe short loc_E3515
mov rax, [rbp+var_20]
mov [rbp+var_88], rax
jmp short loc_E3520
loc_E3515:
mov rax, [rbp+var_58]
mov [rbp+var_88], rax
loc_E3520:
mov rax, [rbp+var_88]
mov [rbp+var_50], rax
cmp [rbp+var_50], 0
jz short loc_E3547
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rdx, [rbp+var_50]
call _memcpy
loc_E3547:
mov rcx, [rbp+var_50]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_50]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rax, [rbp+var_50]
add rax, [rbp+var_40]
mov [rbp+var_40], rax
mov rcx, [rbp+var_50]
mov rax, [rbp+var_10]
add rcx, [rax+10h]
mov [rax+10h], rcx
jmp loc_E31A2
loc_E3583:
jmp short $+2
loc_E3585:
mov [rbp+var_4], 0
loc_E358C:
mov eax, [rbp+var_4]
add rsp, 90h
pop rbp
retn
|
long long my_b_cache_read_r(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v4; // [rsp+8h] [rbp-88h]
long long v5; // [rsp+10h] [rbp-80h]
int v6; // [rsp+1Ch] [rbp-74h]
unsigned long long v7; // [rsp+20h] [rbp-70h]
unsigned long long v8; // [rsp+30h] [rbp-60h]
unsigned long long v9; // [rsp+38h] [rbp-58h]
long long v10; // [rsp+48h] [rbp-48h]
int v11; // [rsp+50h] [rbp-40h]
unsigned long long v12; // [rsp+60h] [rbp-30h]
long long v13; // [rsp+60h] [rbp-30h]
long long v14; // [rsp+68h] [rbp-28h]
v11 = 0;
v10 = *(_QWORD *)(a1 + 152);
while ( a3 )
{
v14 = *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32) + *(_QWORD *)a1;
v12 = (((v14 & 0xFFF) + a3 + 4095) & 0xFFFFF000) - (v14 & 0xFFF);
if ( v12 > *(_QWORD *)(a1 + 240) )
v8 = v12 - ((v12 - *(_QWORD *)(a1 + 240) + 4095) & 0xFFFFF000);
else
v8 = ((*(_QWORD *)(a1 + 240) - v12) & 0xFFFFF000) + v12;
v13 = v8;
if ( *(_DWORD *)(a1 + 176) != 4 && v8 > *(_QWORD *)(a1 + 8) - v14 )
v13 = *(_QWORD *)(a1 + 8) - v14;
if ( !v13 )
{
*(_DWORD *)(a1 + 228) = v11;
return 1;
}
if ( (unsigned int)lock_io_cache(a1, v14) )
{
if ( *(int *)(a1 + 212) >= 0 )
{
if ( *(_DWORD *)(a1 + 224)
&& inline_mysql_file_seek_6(
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x4CBu,
*(_DWORD *)(a1 + 212),
v14,
0,
0LL) == -1 )
{
*(_DWORD *)(a1 + 228) = -1;
unlock_io_cache(a1);
return 1;
}
v9 = inline_mysql_file_read_5(
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1235LL,
*(unsigned int *)(a1 + 212),
*(_QWORD *)(a1 + 32),
v13,
*(_QWORD *)(a1 + 248));
}
else
{
v9 = 0LL;
}
if ( v9 == -1LL )
v7 = 0LL;
else
v7 = v9;
*(_QWORD *)(a1 + 24) = v7 + *(_QWORD *)(a1 + 32);
if ( v9 == v13 )
v6 = 0;
else
v6 = v9;
*(_DWORD *)(a1 + 228) = v6;
*(_QWORD *)a1 = v14;
*(_DWORD *)(v10 + 224) = *(_DWORD *)(a1 + 228);
*(_QWORD *)(v10 + 208) = *(_QWORD *)(a1 + 24);
*(_QWORD *)(v10 + 184) = v14;
unlock_io_cache(a1);
}
else
{
*(_DWORD *)(a1 + 228) = *(_DWORD *)(v10 + 224);
*(_QWORD *)(a1 + 24) = *(_QWORD *)(v10 + 208);
*(_QWORD *)a1 = *(_QWORD *)(v10 + 184);
if ( *(_DWORD *)(a1 + 228) == -1 )
v5 = -1LL;
else
v5 = *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32);
v9 = v5;
}
*(_QWORD *)(a1 + 16) = *(_QWORD *)(a1 + 32);
*(_DWORD *)(a1 + 224) = 0;
if ( !v9 || v9 == -1LL )
{
*(_DWORD *)(a1 + 228) = v11;
return 1;
}
if ( v9 <= a3 )
v4 = v9;
else
v4 = a3;
memcpy(a2, *(_QWORD *)(a1 + 16), v4);
a3 -= v4;
a2 += v4;
v11 += v4;
*(_QWORD *)(a1 + 16) += v4;
}
return 0;
}
|
_my_b_cache_read_r:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x40],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001e31a0
LAB_001e31a0:
JMP 0x001e31a2
LAB_001e31a2:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001e3583
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x18]
MOV RDX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RDX + 0x20]
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0xfff
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1000
SUB RAX,0x1
MOV RCX,0xfffff000
AND RAX,RCX
SUB RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0xf0]
JA 0x001e323d
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0xf0]
SUB RCX,qword ptr [RBP + -0x30]
MOV RDX,0xfffff000
AND RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001e326f
LAB_001e323d:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x10]
SUB RCX,qword ptr [RDX + 0xf0]
ADD RCX,0x1000
SUB RCX,0x1
MOV RDX,0xfffff000
AND RCX,RDX
SUB RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
LAB_001e326f:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0xb0],0x4
JZ 0x001e32a9
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,qword ptr [RBP + -0x28]
CMP RAX,RCX
JBE 0x001e32a9
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
SUB RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
LAB_001e32a9:
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x001e32cc
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],ECX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e358c
LAB_001e32cc:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001e4d50
CMP EAX,0x0
JZ 0x001e3440
JMP 0x001e32e4
LAB_001e32e4:
JMP 0x001e32e6
LAB_001e32e6:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0xd4],0x0
JGE 0x001e3300
MOV qword ptr [RBP + -0x58],0x0
JMP 0x001e3395
LAB_001e3300:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0xe0],0x0
JZ 0x001e335f
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x28]
LEA RDI,[0x25a5ae]
MOV ESI,0x4cb
XOR R8D,R8D
XOR EAX,EAX
MOV R9D,EAX
CALL 0x001e21d0
CMP RAX,-0x1
JNZ 0x001e335d
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],0xffffffff
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e4fb0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e358c
LAB_001e335d:
JMP 0x001e335f
LAB_001e335f:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
MOV R8,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV R9,qword ptr [RAX + 0xf8]
LEA RDI,[0x25a5ae]
MOV ESI,0x4d3
CALL 0x001e4be0
MOV qword ptr [RBP + -0x58],RAX
LAB_001e3395:
JMP 0x001e3397
LAB_001e3397:
JMP 0x001e3399
LAB_001e3399:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x68],RAX
CMP qword ptr [RBP + -0x58],-0x1
JNZ 0x001e33b4
XOR EAX,EAX
MOV qword ptr [RBP + -0x70],RAX
JMP 0x001e33bc
LAB_001e33b4:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x70],RAX
LAB_001e33bc:
MOV RCX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + -0x70]
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001e33e0
XOR EAX,EAX
MOV dword ptr [RBP + -0x74],EAX
JMP 0x001e33e7
LAB_001e33e0:
MOV RAX,qword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x74],EAX
LAB_001e33e7:
MOV ECX,dword ptr [RBP + -0x74]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],ECX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0xe4]
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0xe0],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0xd0],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0xb8],RCX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e4fb0
JMP 0x001e34b2
LAB_001e3440:
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RAX + 0xe0]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],ECX
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RAX + 0xd0]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0xe4],-0x1
JNZ 0x001e3493
MOV RAX,-0x1
MOV qword ptr [RBP + -0x80],RAX
JMP 0x001e34aa
LAB_001e3493:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x80],RAX
LAB_001e34aa:
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x58],RAX
LAB_001e34b2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe0],0x0
CMP qword ptr [RBP + -0x58],0x0
JZ 0x001e34de
CMP qword ptr [RBP + -0x58],-0x1
JNZ 0x001e34fe
LAB_001e34de:
JMP 0x001e34e0
LAB_001e34e0:
JMP 0x001e34e2
LAB_001e34e2:
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],ECX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e358c
LAB_001e34fe:
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001e3515
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x88],RAX
JMP 0x001e3520
LAB_001e3515:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x88],RAX
LAB_001e3520:
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001e3547
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x0012a0b0
LAB_001e3547:
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001e31a2
LAB_001e3583:
JMP 0x001e3585
LAB_001e3585:
MOV dword ptr [RBP + -0x4],0x0
LAB_001e358c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x90
POP RBP
RET
|
int4 _my_b_cache_read_r(ulong *param_1,void *param_2,ulong param_3)
{
ulong uVar1;
int iVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
size_t local_90;
ulong local_88;
int4 local_7c;
ulong local_78;
ulong local_68;
ulong local_60;
long local_48;
ulong local_38;
ulong local_28;
void *local_20;
local_48 = 0;
uVar1 = param_1[0x13];
local_28 = param_3;
local_20 = param_2;
while( true ) {
if (local_28 == 0) {
return 0;
}
uVar3 = *param_1 + (param_1[3] - param_1[4]);
local_68 = (local_28 + (uVar3 & 0xfff) + 0xfff & 0xfffff000) - (uVar3 & 0xfff);
if (param_1[0x1e] < local_68) {
uVar5 = -((local_68 - param_1[0x1e]) + 0xfff & 0xfffff000);
}
else {
uVar5 = param_1[0x1e] - local_68 & 0xfffff000;
}
local_68 = local_68 + uVar5;
local_38 = local_68;
if (((int)param_1[0x16] != 4) && (param_1[1] - uVar3 < local_68)) {
local_38 = param_1[1] - uVar3;
}
if (local_38 == 0) {
*(int *)((long)param_1 + 0xe4) = (int)local_48;
return 1;
}
iVar2 = lock_io_cache(param_1,uVar3);
if (iVar2 == 0) {
*(int4 *)((long)param_1 + 0xe4) = *(int4 *)(uVar1 + 0xe0);
param_1[3] = *(ulong *)(uVar1 + 0xd0);
*param_1 = *(ulong *)(uVar1 + 0xb8);
if (*(int *)((long)param_1 + 0xe4) == -1) {
local_88 = 0xffffffffffffffff;
}
else {
local_88 = param_1[3] - param_1[4];
}
local_60 = local_88;
}
else {
if (*(int *)((long)param_1 + 0xd4) < 0) {
local_60 = 0;
}
else {
if (((int)param_1[0x1c] != 0) &&
(lVar4 = inline_mysql_file_seek
("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x4cb,
*(int4 *)((long)param_1 + 0xd4),uVar3,0,0), lVar4 == -1)) {
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
unlock_io_cache(param_1);
return 1;
}
local_60 = inline_mysql_file_read
("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x4d3,
*(int4 *)((long)param_1 + 0xd4),param_1[4],local_38,
param_1[0x1f]);
}
if (local_60 == 0xffffffffffffffff) {
local_78 = 0;
}
else {
local_78 = local_60;
}
param_1[3] = param_1[4] + local_78;
if (local_60 == local_38) {
local_7c = 0;
}
else {
local_7c = (int4)local_60;
}
*(int4 *)((long)param_1 + 0xe4) = local_7c;
*param_1 = uVar3;
*(int4 *)(uVar1 + 0xe0) = *(int4 *)((long)param_1 + 0xe4);
*(ulong *)(uVar1 + 0xd0) = param_1[3];
*(ulong *)(uVar1 + 0xb8) = uVar3;
unlock_io_cache(param_1);
}
param_1[2] = param_1[4];
*(int4 *)(param_1 + 0x1c) = 0;
if ((local_60 == 0) || (local_60 == 0xffffffffffffffff)) break;
if (local_28 < local_60) {
local_90 = local_28;
}
else {
local_90 = local_60;
}
if (local_90 != 0) {
memcpy(local_20,(void *)param_1[2],local_90);
}
local_28 = local_28 - local_90;
local_20 = (void *)(local_90 + (long)local_20);
local_48 = local_90 + local_48;
param_1[2] = local_90 + param_1[2];
}
*(int *)((long)param_1 + 0xe4) = (int)local_48;
return 1;
}
|
|
12,423
|
nglog::LogSink::ToString[abi:cxx11](nglog::LogSeverity, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long)
|
ng-log[P]ng-log/src/logging.cc
|
string LogSink::ToString(LogSeverity severity, const char* file, int line,
const LogMessageTime& time, const char* message,
size_t message_len) {
ostringstream stream;
stream.fill('0');
stream << LogSeverityNames[severity][0];
if (FLAGS_log_year_in_prefix) {
stream << setw(4) << 1900 + time.year();
}
stream << setw(2) << 1 + time.month() << setw(2) << time.day() << ' '
<< setw(2) << time.hour() << ':' << setw(2) << time.min() << ':'
<< setw(2) << time.sec() << '.' << setw(6) << time.usec() << ' '
<< setfill(' ') << setw(5) << std::this_thread::get_id()
<< setfill('0') << ' ' << file << ':' << line << "] ";
// A call to `write' is enclosed in parenthneses to prevent possible macro
// expansion. On Windows, `write' could be a macro defined for portability.
(stream.write)(message, static_cast<std::streamsize>(message_len));
return stream.str();
}
|
O1
|
cpp
|
nglog::LogSink::ToString[abi:cxx11](nglog::LogSeverity, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp # imm = 0x188
movq %r9, 0x8(%rsp)
movq %r8, %r12
movl %ecx, %ebp
movq %rdx, %r15
movl %esi, %r13d
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x7710
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %r14
addq $0x10, %r14
cmpb $0x0, 0xe1(%r14)
jne 0xd32c
movq %r14, %rdi
movl $0x20, %esi
callq 0x74c0
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x30, 0xe0(%r14)
movl %r13d, %eax
leaq 0x24222(%rip), %rcx # 0x31560
movq (%rcx,%rax,8), %rax
movb (%rax), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
leaq 0x10(%rsp), %rdi
movl $0x1, %edx
callq 0x75c0
leaq 0x2571c(%rip), %rax # 0x32a7d
cmpb $0x1, (%rax)
jne 0xd38a
leaq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x4, 0x20(%rsp,%rax)
movl $0x76c, %esi # imm = 0x76C
addl 0x14(%r12), %esi
callq 0x7910
leaq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x20(%rsp,%rax)
movl 0x10(%r12), %esi
incl %esi
callq 0x7910
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movl 0xc(%r12), %esi
movq %rax, %rdi
callq 0x7910
leaq 0x7(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x75c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movl 0x8(%r12), %esi
movq %rax, %rdi
callq 0x7910
leaq 0x7(%rsp), %rsi
movb $0x3a, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x75c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movl 0x4(%r12), %esi
movq %rax, %rdi
callq 0x7910
leaq 0x7(%rsp), %rsi
movb $0x3a, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x75c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movl (%r12), %esi
movq %rax, %rdi
callq 0x7910
leaq 0x7(%rsp), %rsi
movb $0x2e, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x75c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x6, 0x10(%rax,%rcx)
movq 0x40(%r12), %rsi
movq %rax, %rdi
callq 0x74b0
leaq 0x7(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x75c0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rax
movq %r12, %r13
addq %rax, %r13
cmpb $0x0, 0xe1(%r12,%rax)
jne 0xd4db
movq %r13, %rdi
movl $0x20, %esi
callq 0x74c0
movb %al, 0xe0(%r13)
movb $0x1, 0xe1(%r13)
movb $0x20, 0xe0(%r13)
movq (%r12), %rax
movq -0x18(%rax), %rax
movq $0x5, 0x10(%r12,%rax)
callq 0x7440
testq %rax, %rax
je 0xd50e
movq %r12, %rdi
movq %rax, %rsi
callq 0x7340
movq %rax, %r12
jmp 0xd522
leaq 0x18204(%rip), %rsi # 0x25719
movl $0x24, %edx
movq %r12, %rdi
callq 0x75c0
movq (%r12), %rax
movq -0x18(%rax), %rax
leaq (%r12,%rax), %r14
cmpb $0x0, 0xe1(%r12,%rax)
jne 0xd555
movq %r14, %rdi
movl $0x20, %esi
callq 0x74c0
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x30, 0xe0(%r14)
leaq 0x7(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %r12, %rdi
callq 0x75c0
movq %rax, %r12
testq %r15, %r15
je 0xd592
movq %r15, %rdi
callq 0x71e0
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x75c0
jmp 0xd5ad
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x78f0
leaq 0x7(%rsp), %rsi
movb $0x3a, (%rsi)
movl $0x1, %edx
movq %r12, %rdi
callq 0x75c0
movq %rax, %rdi
movl %ebp, %esi
callq 0x7910
leaq 0x176db(%rip), %rsi # 0x24cae
movl $0x2, %edx
movq %rax, %rdi
callq 0x75c0
movq 0x1c0(%rsp), %rdx
leaq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x76c0
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x7850
movq 0x2495d(%rip), %rsi # 0x31f68
leaq 0x10(%rsp), %rdi
callq 0x7270
leaq 0x80(%rsp), %rdi
callq 0x7160
movq %rbx, %rax
addq $0x188, %rsp # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x24927(%rip), %rsi # 0x31f68
leaq 0x10(%rsp), %rdi
callq 0x7270
leaq 0x80(%rsp), %rdi
callq 0x7160
movq %rbx, %rdi
callq 0x7930
|
_ZN5nglog7LogSink8ToStringB5cxx11ENS_11LogSeverityEPKciRKNS_14LogMessageTimeES3_m:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 188h
mov [rsp+1B8h+var_1B0], r9
mov r12, r8
mov ebp, ecx
mov r15, rdx
mov r13d, esi
mov rbx, rdi
lea r14, [rsp+1B8h+var_1A8]
mov rdi, r14
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [r14]
mov rax, [rax-18h]
lea r14, [rsp+rax+1B8h+var_1B8]
add r14, 10h
cmp byte ptr [r14+0E1h], 0
jnz short loc_D32C
mov rdi, r14
mov esi, 20h ; ' '
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
mov [r14+0E0h], al
mov byte ptr [r14+0E1h], 1
loc_D32C:
mov byte ptr [r14+0E0h], 30h ; '0'
mov eax, r13d
lea rcx, _ZN5nglogL16LogSeverityNamesE; nglog::LogSeverityNames
mov rax, [rcx+rax*8]
mov al, [rax]
lea rsi, [rsp+1B8h+var_1B1]
mov [rsi], al
lea rdi, [rsp+1B8h+var_1A8]
mov edx, 1
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rax, _ZN3fLB24FLAGS_log_year_in_prefixE; fLB::FLAGS_log_year_in_prefix
cmp byte ptr [rax], 1
jnz short loc_D38A
lea rdi, [rsp+1B8h+var_1A8]
mov rax, [rdi]
mov rax, [rax-18h]
mov [rsp+rax+1B8h+var_198], 4
mov esi, 76Ch
add esi, [r12+14h]
call __ZNSolsEi; std::ostream::operator<<(int)
loc_D38A:
lea rdi, [rsp+1B8h+var_1A8]
mov rax, [rdi]
mov rax, [rax-18h]
mov [rsp+rax+1B8h+var_198], 2
mov esi, [r12+10h]
inc esi
call __ZNSolsEi; std::ostream::operator<<(int)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 2
mov esi, [r12+0Ch]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 20h ; ' '
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 2
mov esi, [r12+8]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 3Ah ; ':'
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 2
mov esi, [r12+4]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 3Ah ; ':'
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 2
mov esi, [r12]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 2Eh ; '.'
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 6
mov rsi, [r12+40h]
mov rdi, rax
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 20h ; ' '
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r12, rax
mov rax, [rax]
mov rax, [rax-18h]
mov r13, r12
add r13, rax
cmp byte ptr [r12+rax+0E1h], 0
jnz short loc_D4DB
mov rdi, r13
mov esi, 20h ; ' '
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
mov [r13+0E0h], al
mov byte ptr [r13+0E1h], 1
loc_D4DB:
mov byte ptr [r13+0E0h], 20h ; ' '
mov rax, [r12]
mov rax, [rax-18h]
mov qword ptr [r12+rax+10h], 5
call _pthread_self
test rax, rax
jz short loc_D50E
mov rdi, r12
mov rsi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r12, rax
jmp short loc_D522
loc_D50E:
lea rsi, aThreadIdOfANon; "thread::id of a non-executing thread"
mov edx, 24h ; '$'
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_D522:
mov rax, [r12]
mov rax, [rax-18h]
lea r14, [r12+rax]
cmp byte ptr [r12+rax+0E1h], 0
jnz short loc_D555
mov rdi, r14
mov esi, 20h ; ' '
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
mov [r14+0E0h], al
mov byte ptr [r14+0E1h], 1
loc_D555:
mov byte ptr [r14+0E0h], 30h ; '0'
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 20h ; ' '
mov edx, 1
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r12, rax
test r15, r15
jz short loc_D592
mov rdi, r15
call _strlen
mov rdi, r12
mov rsi, r15
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_D5AD
loc_D592:
mov rax, [r12]
mov rax, [rax-18h]
mov rdi, r12
add rdi, rax
mov esi, [r12+rax+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_D5AD:
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 3Ah ; ':'
mov edx, 1
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rax
mov esi, ebp
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aLog_0+4; "] "
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdx, [rsp+1B8h+arg_0]; __int64
lea rdi, [rsp+1B8h+var_1A8]; this
mov rsi, [rsp+1B8h+var_1B0]; char *
call __ZNSo5writeEPKcl; std::ostream::write(char const*,long)
lea rsi, [rsp+1B8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1B8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1B8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 188h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_78]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
long long nglog::LogSink::ToString[abi:cxx11](
long long a1,
int a2,
long long a3,
unsigned int a4,
unsigned int *a5,
char *a6,
long long a7)
{
long long v10; // rax
_BYTE *v11; // r14
_QWORD *v12; // rax
long long v13; // rax
_QWORD *v14; // rax
long long v15; // rax
_QWORD *v16; // rax
long long v17; // rax
_QWORD *v18; // rax
long long v19; // rax
_QWORD *v20; // rax
long long v21; // rax
_QWORD *v22; // r12
long long v23; // rax
char *v24; // r13
long long v25; // rax
char *v26; // r14
_QWORD *v27; // rax
_QWORD *v28; // r12
long long v29; // rax
long long v30; // rax
long long v31; // rax
char v33; // [rsp+7h] [rbp-1B1h] BYREF
char *v34; // [rsp+8h] [rbp-1B0h]
long long v35; // [rsp+10h] [rbp-1A8h] BYREF
_BYTE v36[104]; // [rsp+18h] [rbp-1A0h] BYREF
_BYTE v37[312]; // [rsp+80h] [rbp-138h] BYREF
v34 = a6;
std::ostringstream::basic_ostringstream(&v35);
v10 = *(_QWORD *)(v35 - 24);
v11 = &v36[v10 - 8];
if ( !v37[v10 + 113] )
{
v11[224] = std::ios::widen(&v36[v10 - 8], 32LL);
v11[225] = 1;
}
v11[224] = 48;
v33 = *nglog::LogSeverityNames[a2];
std::__ostream_insert<char,std::char_traits<char>>(&v35, &v33, 1LL);
if ( fLB::FLAGS_log_year_in_prefix == 1 )
{
*(_QWORD *)&v36[*(_QWORD *)(v35 - 24) + 8] = 4LL;
std::ostream::operator<<(&v35, a5[5] + 1900);
}
*(_QWORD *)&v36[*(_QWORD *)(v35 - 24) + 8] = 2LL;
v12 = (_QWORD *)std::ostream::operator<<(&v35, a5[4] + 1);
*(_QWORD *)((char *)v12 + *(_QWORD *)(*v12 - 24LL) + 16) = 2LL;
v13 = std::ostream::operator<<(v12, a5[3]);
v33 = 32;
v14 = (_QWORD *)std::__ostream_insert<char,std::char_traits<char>>(v13, &v33, 1LL);
*(_QWORD *)((char *)v14 + *(_QWORD *)(*v14 - 24LL) + 16) = 2LL;
v15 = std::ostream::operator<<(v14, a5[2]);
v33 = 58;
v16 = (_QWORD *)std::__ostream_insert<char,std::char_traits<char>>(v15, &v33, 1LL);
*(_QWORD *)((char *)v16 + *(_QWORD *)(*v16 - 24LL) + 16) = 2LL;
v17 = std::ostream::operator<<(v16, a5[1]);
v33 = 58;
v18 = (_QWORD *)std::__ostream_insert<char,std::char_traits<char>>(v17, &v33, 1LL);
*(_QWORD *)((char *)v18 + *(_QWORD *)(*v18 - 24LL) + 16) = 2LL;
v19 = std::ostream::operator<<(v18, *a5);
v33 = 46;
v20 = (_QWORD *)std::__ostream_insert<char,std::char_traits<char>>(v19, &v33, 1LL);
*(_QWORD *)((char *)v20 + *(_QWORD *)(*v20 - 24LL) + 16) = 6LL;
v21 = std::ostream::_M_insert<long>(v20, *((_QWORD *)a5 + 8));
v33 = 32;
v22 = (_QWORD *)std::__ostream_insert<char,std::char_traits<char>>(v21, &v33, 1LL);
v23 = *(_QWORD *)(*v22 - 24LL);
v24 = (char *)v22 + v23;
if ( !*((_BYTE *)v22 + v23 + 225) )
{
v24[224] = std::ios::widen((char *)v22 + v23, 32LL);
v24[225] = 1;
}
v24[224] = 32;
*(_QWORD *)((char *)v22 + *(_QWORD *)(*v22 - 24LL) + 16) = 5LL;
if ( pthread_self() )
v22 = (_QWORD *)std::ostream::_M_insert<unsigned long>(v22);
else
std::__ostream_insert<char,std::char_traits<char>>(v22, "thread::id of a non-executing thread", 36LL);
v25 = *(_QWORD *)(*v22 - 24LL);
v26 = (char *)v22 + v25;
if ( !*((_BYTE *)v22 + v25 + 225) )
{
v26[224] = std::ios::widen((char *)v22 + v25, 32LL);
v26[225] = 1;
}
v26[224] = 48;
v33 = 32;
v27 = (_QWORD *)std::__ostream_insert<char,std::char_traits<char>>(v22, &v33, 1LL);
v28 = v27;
if ( a3 )
{
v29 = strlen(a3);
std::__ostream_insert<char,std::char_traits<char>>(v28, a3, v29);
}
else
{
std::ios::clear(
(char *)v27 + *(_QWORD *)(*v27 - 24LL),
*(_DWORD *)((char *)v27 + *(_QWORD *)(*v27 - 24LL) + 32) | 1u);
}
v33 = 58;
v30 = std::__ostream_insert<char,std::char_traits<char>>(v28, &v33, 1LL);
v31 = std::ostream::operator<<(v30, a4);
std::__ostream_insert<char,std::char_traits<char>>(v31, "] ", 2LL);
std::ostream::write((std::ostream *)&v35, v34, a7);
std::stringbuf::str(a1, v36);
std::ostringstream::~ostringstream(&v35, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v37);
return a1;
}
|
ToString[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x188
MOV qword ptr [RSP + 0x8],R9
MOV R12,R8
MOV EBP,ECX
MOV R15,RDX
MOV R13D,ESI
MOV RBX,RDI
LEA R14,[RSP + 0x10]
MOV RDI,R14
CALL 0x00107710
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + -0x18]
LEA R14,[RSP + RAX*0x1]
ADD R14,0x10
CMP byte ptr [R14 + 0xe1],0x0
JNZ 0x0010d32c
LAB_0010d310:
MOV RDI,R14
MOV ESI,0x20
CALL 0x001074c0
MOV byte ptr [R14 + 0xe0],AL
MOV byte ptr [R14 + 0xe1],0x1
LAB_0010d32c:
MOV byte ptr [R14 + 0xe0],0x30
MOV EAX,R13D
LEA RCX,[0x131560]
MOV RAX,qword ptr [RCX + RAX*0x8]
MOV AL,byte ptr [RAX]
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],AL
LEA RDI,[RSP + 0x10]
MOV EDX,0x1
CALL 0x001075c0
LEA RAX,[0x132a7d]
CMP byte ptr [RAX],0x1
JNZ 0x0010d38a
LEA RDI,[RSP + 0x10]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RSP + RAX*0x1 + 0x20],0x4
MOV ESI,0x76c
ADD ESI,dword ptr [R12 + 0x14]
CALL 0x00107910
LAB_0010d38a:
LEA RDI,[RSP + 0x10]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RSP + RAX*0x1 + 0x20],0x2
MOV ESI,dword ptr [R12 + 0x10]
INC ESI
CALL 0x00107910
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2
MOV ESI,dword ptr [R12 + 0xc]
MOV RDI,RAX
CALL 0x00107910
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x20
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001075c0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2
MOV ESI,dword ptr [R12 + 0x8]
MOV RDI,RAX
CALL 0x00107910
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x3a
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001075c0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2
MOV ESI,dword ptr [R12 + 0x4]
MOV RDI,RAX
CALL 0x00107910
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x3a
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001075c0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2
MOV ESI,dword ptr [R12]
MOV RDI,RAX
CALL 0x00107910
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x2e
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001075c0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x6
MOV RSI,qword ptr [R12 + 0x40]
MOV RDI,RAX
CALL 0x001074b0
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x20
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001075c0
MOV R12,RAX
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + -0x18]
MOV R13,R12
ADD R13,RAX
CMP byte ptr [R12 + RAX*0x1 + 0xe1],0x0
JNZ 0x0010d4db
MOV RDI,R13
MOV ESI,0x20
CALL 0x001074c0
MOV byte ptr [R13 + 0xe0],AL
MOV byte ptr [R13 + 0xe1],0x1
LAB_0010d4db:
MOV byte ptr [R13 + 0xe0],0x20
MOV RAX,qword ptr [R12]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [R12 + RAX*0x1 + 0x10],0x5
CALL 0x00107440
TEST RAX,RAX
JZ 0x0010d50e
MOV RDI,R12
MOV RSI,RAX
CALL 0x00107340
MOV R12,RAX
JMP 0x0010d522
LAB_0010d50e:
LEA RSI,[0x125719]
MOV EDX,0x24
MOV RDI,R12
CALL 0x001075c0
LAB_0010d522:
MOV RAX,qword ptr [R12]
MOV RAX,qword ptr [RAX + -0x18]
LEA R14,[R12 + RAX*0x1]
CMP byte ptr [R12 + RAX*0x1 + 0xe1],0x0
JNZ 0x0010d555
MOV RDI,R14
MOV ESI,0x20
CALL 0x001074c0
MOV byte ptr [R14 + 0xe0],AL
MOV byte ptr [R14 + 0xe1],0x1
LAB_0010d555:
MOV byte ptr [R14 + 0xe0],0x30
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x20
MOV EDX,0x1
MOV RDI,R12
CALL 0x001075c0
MOV R12,RAX
TEST R15,R15
JZ 0x0010d592
MOV RDI,R15
CALL 0x001071e0
MOV RDI,R12
MOV RSI,R15
MOV RDX,RAX
CALL 0x001075c0
JMP 0x0010d5ad
LAB_0010d592:
MOV RAX,qword ptr [R12]
MOV RAX,qword ptr [RAX + -0x18]
MOV RDI,R12
ADD RDI,RAX
MOV ESI,dword ptr [R12 + RAX*0x1 + 0x20]
OR ESI,0x1
CALL 0x001078f0
LAB_0010d5ad:
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x3a
MOV EDX,0x1
MOV RDI,R12
CALL 0x001075c0
MOV RDI,RAX
MOV ESI,EBP
CALL 0x00107910
LEA RSI,[0x124cae]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x001075c0
MOV RDX,qword ptr [RSP + 0x1c0]
LEA RDI,[RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001076c0
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x00107850
LAB_0010d604:
MOV RSI,qword ptr [0x00131f68]
LEA RDI,[RSP + 0x10]
CALL 0x00107270
LEA RDI,[RSP + 0x80]
CALL 0x00107160
MOV RAX,RBX
ADD RSP,0x188
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::LogSink::ToString[abi:cxx11](nglog::LogSeverity, char const*, int, nglog::LogMessageTime
const&, char const*, unsigned long) */
int8
nglog::LogSink::ToString_abi_cxx11_
(int8 param_1,uint param_2,char *param_3,int param_4,int *param_5,long param_6)
{
long lVar1;
char cVar2;
ostream oVar3;
ostream *poVar4;
pthread_t pVar5;
size_t sVar6;
ostream *poVar7;
int1 auStack_1b8 [7];
char local_1b1;
long local_1b0;
long local_1a8 [2];
int8 auStack_198 [12];
ios_base local_138 [112];
char acStack_c8 [152];
local_1b0 = param_6;
std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8);
lVar1 = *(long *)(local_1a8[0] + -0x18);
if (acStack_c8[lVar1 + 1] == '\0') {
/* try { // try from 0010d310 to 0010d603 has its CatchHandler @ 0010d637 */
cVar2 = std::ios::widen((char)auStack_1b8 + (char)lVar1 + '\x10');
acStack_c8[lVar1] = cVar2;
acStack_c8[lVar1 + 1] = '\x01';
}
acStack_c8[lVar1] = '0';
local_1b1 = **(char **)(LogSeverityNames + (ulong)param_2 * 8);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,&local_1b1,1);
if (fLB::FLAGS_log_year_in_prefix == '\x01') {
*(int8 *)((long)auStack_198 + *(long *)(local_1a8[0] + -0x18)) = 4;
std::ostream::operator<<((ostream *)local_1a8,param_5[5] + 0x76c);
}
*(int8 *)((long)auStack_198 + *(long *)(local_1a8[0] + -0x18)) = 2;
poVar4 = (ostream *)std::ostream::operator<<((ostream *)local_1a8,param_5[4] + 1);
*(int8 *)(poVar4 + *(long *)(*(long *)poVar4 + -0x18) + 0x10) = 2;
poVar4 = (ostream *)std::ostream::operator<<(poVar4,param_5[3]);
local_1b1 = ' ';
poVar4 = std::__ostream_insert<char,std::char_traits<char>>(poVar4,&local_1b1,1);
*(int8 *)(poVar4 + *(long *)(*(long *)poVar4 + -0x18) + 0x10) = 2;
poVar4 = (ostream *)std::ostream::operator<<(poVar4,param_5[2]);
local_1b1 = ':';
poVar4 = std::__ostream_insert<char,std::char_traits<char>>(poVar4,&local_1b1,1);
*(int8 *)(poVar4 + *(long *)(*(long *)poVar4 + -0x18) + 0x10) = 2;
poVar4 = (ostream *)std::ostream::operator<<(poVar4,param_5[1]);
local_1b1 = ':';
poVar4 = std::__ostream_insert<char,std::char_traits<char>>(poVar4,&local_1b1,1);
*(int8 *)(poVar4 + *(long *)(*(long *)poVar4 + -0x18) + 0x10) = 2;
poVar4 = (ostream *)std::ostream::operator<<(poVar4,*param_5);
local_1b1 = '.';
poVar4 = std::__ostream_insert<char,std::char_traits<char>>(poVar4,&local_1b1,1);
*(int8 *)(poVar4 + *(long *)(*(long *)poVar4 + -0x18) + 0x10) = 6;
poVar4 = std::ostream::_M_insert<long>((long)poVar4);
local_1b1 = ' ';
poVar4 = std::__ostream_insert<char,std::char_traits<char>>(poVar4,&local_1b1,1);
poVar7 = poVar4 + *(long *)(*(long *)poVar4 + -0x18);
if (poVar4[*(long *)(*(long *)poVar4 + -0x18) + 0xe1] == (ostream)0x0) {
oVar3 = (ostream)std::ios::widen((char)poVar7);
poVar7[0xe0] = oVar3;
poVar7[0xe1] = (ostream)0x1;
}
poVar7[0xe0] = (ostream)0x20;
*(int8 *)(poVar4 + *(long *)(*(long *)poVar4 + -0x18) + 0x10) = 5;
pVar5 = pthread_self();
if (pVar5 == 0) {
std::__ostream_insert<char,std::char_traits<char>>
(poVar4,"thread::id of a non-executing thread",0x24);
}
else {
poVar4 = std::ostream::_M_insert<unsigned_long>((ulong)poVar4);
}
poVar7 = poVar4 + *(long *)(*(long *)poVar4 + -0x18);
if (poVar4[*(long *)(*(long *)poVar4 + -0x18) + 0xe1] == (ostream)0x0) {
oVar3 = (ostream)std::ios::widen((char)poVar7);
poVar7[0xe0] = oVar3;
poVar7[0xe1] = (ostream)0x1;
}
poVar7[0xe0] = (ostream)0x30;
local_1b1 = ' ';
poVar4 = std::__ostream_insert<char,std::char_traits<char>>(poVar4,&local_1b1,1);
if (param_3 == (char *)0x0) {
std::ios::clear(poVar4 + *(long *)(*(long *)poVar4 + -0x18),
*(uint *)(poVar4 + *(long *)(*(long *)poVar4 + -0x18) + 0x20) | 1);
}
else {
sVar6 = strlen(param_3);
std::__ostream_insert<char,std::char_traits<char>>(poVar4,param_3,sVar6);
}
local_1b1 = ':';
poVar4 = std::__ostream_insert<char,std::char_traits<char>>(poVar4,&local_1b1,1);
poVar4 = (ostream *)std::ostream::operator<<(poVar4,param_4);
std::__ostream_insert<char,std::char_traits<char>>(poVar4,"] ",2);
std::ostream::write((char *)local_1a8,local_1b0);
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8);
std::ios_base::~ios_base(local_138);
return param_1;
}
|
|
12,424
|
nglog::LogSink::ToString[abi:cxx11](nglog::LogSeverity, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long)
|
ng-log[P]ng-log/src/logging.cc
|
string LogSink::ToString(LogSeverity severity, const char* file, int line,
const LogMessageTime& time, const char* message,
size_t message_len) {
ostringstream stream;
stream.fill('0');
stream << LogSeverityNames[severity][0];
if (FLAGS_log_year_in_prefix) {
stream << setw(4) << 1900 + time.year();
}
stream << setw(2) << 1 + time.month() << setw(2) << time.day() << ' '
<< setw(2) << time.hour() << ':' << setw(2) << time.min() << ':'
<< setw(2) << time.sec() << '.' << setw(6) << time.usec() << ' '
<< setfill(' ') << setw(5) << std::this_thread::get_id()
<< setfill('0') << ' ' << file << ':' << line << "] ";
// A call to `write' is enclosed in parenthneses to prevent possible macro
// expansion. On Windows, `write' could be a macro defined for portability.
(stream.write)(message, static_cast<std::streamsize>(message_len));
return stream.str();
}
|
O3
|
cpp
|
nglog::LogSink::ToString[abi:cxx11](nglog::LogSeverity, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp # imm = 0x188
movq %r9, 0x8(%rsp)
movq %r8, %r12
movl %ecx, %ebp
movq %rdx, %r15
movl %esi, %r13d
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x7710
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%rsp,%rax), %r14
addq $0x10, %r14
cmpb $0x0, 0xe1(%r14)
jne 0xd0ef
movq %r14, %rdi
movl $0x20, %esi
callq 0x74c0
movb $0x1, 0xe1(%r14)
movb $0x30, 0xe0(%r14)
movl %r13d, %eax
leaq 0x2449f(%rip), %rcx # 0x315a0
movq (%rcx,%rax,8), %rax
movb (%rax), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
leaq 0x10(%rsp), %rdi
movl $0x1, %edx
callq 0x75c0
leaq 0x25959(%rip), %rax # 0x32a7d
cmpb $0x1, (%rax)
jne 0xd14d
leaq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x4, 0x20(%rsp,%rax)
movl $0x76c, %esi # imm = 0x76C
addl 0x14(%r12), %esi
callq 0x7910
leaq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x20(%rsp,%rax)
movl 0x10(%r12), %esi
incl %esi
callq 0x7910
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movl 0xc(%r12), %esi
movq %rax, %rdi
callq 0x7910
leaq 0x7(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x75c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movl 0x8(%r12), %esi
movq %rax, %rdi
callq 0x7910
leaq 0x7(%rsp), %rsi
movb $0x3a, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x75c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movl 0x4(%r12), %esi
movq %rax, %rdi
callq 0x7910
leaq 0x7(%rsp), %rsi
movb $0x3a, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x75c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x10(%rax,%rcx)
movl (%r12), %esi
movq %rax, %rdi
callq 0x7910
leaq 0x7(%rsp), %rsi
movb $0x2e, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x75c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x6, 0x10(%rax,%rcx)
movq 0x40(%r12), %rsi
movq %rax, %rdi
callq 0x74b0
leaq 0x7(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x75c0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rcx
movq %r12, %r13
addq %rcx, %r13
cmpb $0x0, 0xe1(%r12,%rcx)
jne 0xd29b
movq %r13, %rdi
movl $0x20, %esi
callq 0x74c0
movb $0x1, 0xe1(%r13)
movq (%r12), %rax
movb $0x20, 0xe0(%r13)
movq -0x18(%rax), %rax
movq $0x5, 0x10(%r12,%rax)
callq 0x7440
testq %rax, %rax
je 0xd2ca
movq %r12, %rdi
movq %rax, %rsi
callq 0x7340
movq %rax, %r12
jmp 0xd2de
leaq 0x18430(%rip), %rsi # 0x25701
movl $0x24, %edx
movq %r12, %rdi
callq 0x75c0
movq (%r12), %rax
movq -0x18(%rax), %rax
leaq (%r12,%rax), %r14
cmpb $0x0, 0xe1(%r12,%rax)
jne 0xd30a
movq %r14, %rdi
movl $0x20, %esi
callq 0x74c0
movb $0x1, 0xe1(%r14)
movb $0x30, 0xe0(%r14)
leaq 0x7(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %r12, %rdi
callq 0x75c0
movq %rax, %r12
testq %r15, %r15
je 0xd347
movq %r15, %rdi
callq 0x71e0
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x75c0
jmp 0xd362
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x78f0
leaq 0x7(%rsp), %rsi
movb $0x3a, (%rsi)
movl $0x1, %edx
movq %r12, %rdi
callq 0x75c0
movq %rax, %rdi
movl %ebp, %esi
callq 0x7910
leaq 0x1790e(%rip), %rsi # 0x24c96
movl $0x2, %edx
movq %rax, %rdi
callq 0x75c0
movq 0x1c0(%rsp), %rdx
leaq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x76c0
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x7850
movq 0x24ba8(%rip), %rsi # 0x31f68
leaq 0x10(%rsp), %rdi
callq 0x7270
leaq 0x80(%rsp), %rdi
callq 0x7160
movq %rbx, %rax
addq $0x188, %rsp # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x24b72(%rip), %rsi # 0x31f68
leaq 0x10(%rsp), %rdi
callq 0x7270
leaq 0x80(%rsp), %rdi
callq 0x7160
movq %rbx, %rdi
callq 0x7930
|
_ZN5nglog7LogSink8ToStringB5cxx11ENS_11LogSeverityEPKciRKNS_14LogMessageTimeES3_m:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 188h
mov [rsp+1B8h+var_1B0], r9
mov r12, r8
mov ebp, ecx
mov r15, rdx
mov r13d, esi
mov rbx, rdi
lea r14, [rsp+1B8h+var_1A8]
mov rdi, r14
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [r14]
mov rax, [rax-18h]
lea r14, [rsp+rax+1B8h+var_1B8]
add r14, 10h
cmp byte ptr [r14+0E1h], 0
jnz short loc_D0EF
mov rdi, r14
mov esi, 20h ; ' '
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
mov byte ptr [r14+0E1h], 1
loc_D0EF:
mov byte ptr [r14+0E0h], 30h ; '0'
mov eax, r13d
lea rcx, _ZN5nglogL16LogSeverityNamesE; nglog::LogSeverityNames
mov rax, [rcx+rax*8]
mov al, [rax]
lea rsi, [rsp+1B8h+var_1B1]
mov [rsi], al
lea rdi, [rsp+1B8h+var_1A8]
mov edx, 1
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rax, _ZN3fLB24FLAGS_log_year_in_prefixE; fLB::FLAGS_log_year_in_prefix
cmp byte ptr [rax], 1
jnz short loc_D14D
lea rdi, [rsp+1B8h+var_1A8]
mov rax, [rdi]
mov rax, [rax-18h]
mov [rsp+rax+1B8h+var_198], 4
mov esi, 76Ch
add esi, [r12+14h]
call __ZNSolsEi; std::ostream::operator<<(int)
loc_D14D:
lea rdi, [rsp+1B8h+var_1A8]
mov rax, [rdi]
mov rax, [rax-18h]
mov [rsp+rax+1B8h+var_198], 2
mov esi, [r12+10h]
inc esi
call __ZNSolsEi; std::ostream::operator<<(int)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 2
mov esi, [r12+0Ch]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 20h ; ' '
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 2
mov esi, [r12+8]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 3Ah ; ':'
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 2
mov esi, [r12+4]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 3Ah ; ':'
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 2
mov esi, [r12]
mov rdi, rax
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 2Eh ; '.'
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rcx, [rax]
mov rcx, [rcx-18h]
mov qword ptr [rax+rcx+10h], 6
mov rsi, [r12+40h]
mov rdi, rax
call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long)
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 20h ; ' '
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r12, rax
mov rax, [rax]
mov rcx, [rax-18h]
mov r13, r12
add r13, rcx
cmp byte ptr [r12+rcx+0E1h], 0
jnz short loc_D29B
mov rdi, r13
mov esi, 20h ; ' '
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
mov byte ptr [r13+0E1h], 1
mov rax, [r12]
loc_D29B:
mov byte ptr [r13+0E0h], 20h ; ' '
mov rax, [rax-18h]
mov qword ptr [r12+rax+10h], 5
call _pthread_self
test rax, rax
jz short loc_D2CA
mov rdi, r12
mov rsi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r12, rax
jmp short loc_D2DE
loc_D2CA:
lea rsi, aThreadIdOfANon; "thread::id of a non-executing thread"
mov edx, 24h ; '$'
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_D2DE:
mov rax, [r12]
mov rax, [rax-18h]
lea r14, [r12+rax]
cmp byte ptr [r12+rax+0E1h], 0
jnz short loc_D30A
mov rdi, r14
mov esi, 20h ; ' '
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
mov byte ptr [r14+0E1h], 1
loc_D30A:
mov byte ptr [r14+0E0h], 30h ; '0'
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 20h ; ' '
mov edx, 1
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r12, rax
test r15, r15
jz short loc_D347
mov rdi, r15
call _strlen
mov rdi, r12
mov rsi, r15
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_D362
loc_D347:
mov rax, [r12]
mov rax, [rax-18h]
mov rdi, r12
add rdi, rax
mov esi, [r12+rax+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_D362:
lea rsi, [rsp+1B8h+var_1B1]
mov byte ptr [rsi], 3Ah ; ':'
mov edx, 1
mov rdi, r12
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rax
mov esi, ebp
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aLog_0+4; "] "
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdx, [rsp+1B8h+arg_0]; __int64
lea rdi, [rsp+1B8h+var_1A8]; this
mov rsi, [rsp+1B8h+var_1B0]; char *
call __ZNSo5writeEPKcl; std::ostream::write(char const*,long)
lea rsi, [rsp+1B8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1B8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1B8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 188h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_78]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
|
long long nglog::LogSink::ToString[abi:cxx11](
long long a1,
int a2,
long long a3,
unsigned int a4,
unsigned int *a5,
char *a6,
long long a7)
{
long long v10; // rax
_BYTE *v11; // r14
_QWORD *v12; // rax
long long v13; // rax
_QWORD *v14; // rax
long long v15; // rax
_QWORD *v16; // rax
long long v17; // rax
_QWORD *v18; // rax
long long v19; // rax
_QWORD *v20; // rax
long long v21; // rax
_QWORD *v22; // r12
long long v23; // rax
long long v24; // rcx
char *v25; // r13
long long v26; // rax
char *v27; // r14
_QWORD *v28; // rax
_QWORD *v29; // r12
long long v30; // rax
long long v31; // rax
long long v32; // rax
char v34; // [rsp+7h] [rbp-1B1h] BYREF
char *v35; // [rsp+8h] [rbp-1B0h]
long long v36; // [rsp+10h] [rbp-1A8h] BYREF
_BYTE v37[104]; // [rsp+18h] [rbp-1A0h] BYREF
_BYTE v38[312]; // [rsp+80h] [rbp-138h] BYREF
v35 = a6;
std::ostringstream::basic_ostringstream(&v36);
v10 = *(_QWORD *)(v36 - 24);
v11 = &v37[v10 - 8];
if ( !v38[v10 + 113] )
{
std::ios::widen(&v37[v10 - 8], 32LL);
v11[225] = 1;
}
v11[224] = 48;
v34 = *nglog::LogSeverityNames[a2];
std::__ostream_insert<char,std::char_traits<char>>(&v36, &v34, 1LL);
if ( fLB::FLAGS_log_year_in_prefix == 1 )
{
*(_QWORD *)&v37[*(_QWORD *)(v36 - 24) + 8] = 4LL;
std::ostream::operator<<(&v36, a5[5] + 1900);
}
*(_QWORD *)&v37[*(_QWORD *)(v36 - 24) + 8] = 2LL;
v12 = (_QWORD *)std::ostream::operator<<(&v36, a5[4] + 1);
*(_QWORD *)((char *)v12 + *(_QWORD *)(*v12 - 24LL) + 16) = 2LL;
v13 = std::ostream::operator<<(v12, a5[3]);
v34 = 32;
v14 = (_QWORD *)std::__ostream_insert<char,std::char_traits<char>>(v13, &v34, 1LL);
*(_QWORD *)((char *)v14 + *(_QWORD *)(*v14 - 24LL) + 16) = 2LL;
v15 = std::ostream::operator<<(v14, a5[2]);
v34 = 58;
v16 = (_QWORD *)std::__ostream_insert<char,std::char_traits<char>>(v15, &v34, 1LL);
*(_QWORD *)((char *)v16 + *(_QWORD *)(*v16 - 24LL) + 16) = 2LL;
v17 = std::ostream::operator<<(v16, a5[1]);
v34 = 58;
v18 = (_QWORD *)std::__ostream_insert<char,std::char_traits<char>>(v17, &v34, 1LL);
*(_QWORD *)((char *)v18 + *(_QWORD *)(*v18 - 24LL) + 16) = 2LL;
v19 = std::ostream::operator<<(v18, *a5);
v34 = 46;
v20 = (_QWORD *)std::__ostream_insert<char,std::char_traits<char>>(v19, &v34, 1LL);
*(_QWORD *)((char *)v20 + *(_QWORD *)(*v20 - 24LL) + 16) = 6LL;
v21 = std::ostream::_M_insert<long>(v20, *((_QWORD *)a5 + 8));
v34 = 32;
v22 = (_QWORD *)std::__ostream_insert<char,std::char_traits<char>>(v21, &v34, 1LL);
v23 = *v22;
v24 = *(_QWORD *)(*v22 - 24LL);
v25 = (char *)v22 + v24;
if ( !*((_BYTE *)v22 + v24 + 225) )
{
std::ios::widen((char *)v22 + v24, 32LL);
v25[225] = 1;
v23 = *v22;
}
v25[224] = 32;
*(_QWORD *)((char *)v22 + *(_QWORD *)(v23 - 24) + 16) = 5LL;
if ( pthread_self() )
v22 = (_QWORD *)std::ostream::_M_insert<unsigned long>(v22);
else
std::__ostream_insert<char,std::char_traits<char>>(v22, "thread::id of a non-executing thread", 36LL);
v26 = *(_QWORD *)(*v22 - 24LL);
v27 = (char *)v22 + v26;
if ( !*((_BYTE *)v22 + v26 + 225) )
{
std::ios::widen((char *)v22 + v26, 32LL);
v27[225] = 1;
}
v27[224] = 48;
v34 = 32;
v28 = (_QWORD *)std::__ostream_insert<char,std::char_traits<char>>(v22, &v34, 1LL);
v29 = v28;
if ( a3 )
{
v30 = strlen(a3);
std::__ostream_insert<char,std::char_traits<char>>(v29, a3, v30);
}
else
{
std::ios::clear(
(char *)v28 + *(_QWORD *)(*v28 - 24LL),
*(_DWORD *)((char *)v28 + *(_QWORD *)(*v28 - 24LL) + 32) | 1u);
}
v34 = 58;
v31 = std::__ostream_insert<char,std::char_traits<char>>(v29, &v34, 1LL);
v32 = std::ostream::operator<<(v31, a4);
std::__ostream_insert<char,std::char_traits<char>>(v32, "] ", 2LL);
std::ostream::write((std::ostream *)&v36, v35, a7);
std::stringbuf::str(a1, v37);
std::ostringstream::~ostringstream(&v36, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v38);
return a1;
}
|
ToString[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x188
MOV qword ptr [RSP + 0x8],R9
MOV R12,R8
MOV EBP,ECX
MOV R15,RDX
MOV R13D,ESI
MOV RBX,RDI
LEA R14,[RSP + 0x10]
MOV RDI,R14
CALL 0x00107710
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + -0x18]
LEA R14,[RSP + RAX*0x1]
ADD R14,0x10
CMP byte ptr [R14 + 0xe1],0x0
JNZ 0x0010d0ef
LAB_0010d0da:
MOV RDI,R14
MOV ESI,0x20
CALL 0x001074c0
MOV byte ptr [R14 + 0xe1],0x1
LAB_0010d0ef:
MOV byte ptr [R14 + 0xe0],0x30
MOV EAX,R13D
LEA RCX,[0x1315a0]
MOV RAX,qword ptr [RCX + RAX*0x8]
MOV AL,byte ptr [RAX]
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],AL
LEA RDI,[RSP + 0x10]
MOV EDX,0x1
CALL 0x001075c0
LEA RAX,[0x132a7d]
CMP byte ptr [RAX],0x1
JNZ 0x0010d14d
LEA RDI,[RSP + 0x10]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RSP + RAX*0x1 + 0x20],0x4
MOV ESI,0x76c
ADD ESI,dword ptr [R12 + 0x14]
CALL 0x00107910
LAB_0010d14d:
LEA RDI,[RSP + 0x10]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RSP + RAX*0x1 + 0x20],0x2
MOV ESI,dword ptr [R12 + 0x10]
INC ESI
CALL 0x00107910
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2
MOV ESI,dword ptr [R12 + 0xc]
MOV RDI,RAX
CALL 0x00107910
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x20
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001075c0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2
MOV ESI,dword ptr [R12 + 0x8]
MOV RDI,RAX
CALL 0x00107910
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x3a
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001075c0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2
MOV ESI,dword ptr [R12 + 0x4]
MOV RDI,RAX
CALL 0x00107910
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x3a
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001075c0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x2
MOV ESI,dword ptr [R12]
MOV RDI,RAX
CALL 0x00107910
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x2e
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001075c0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RAX + RCX*0x1 + 0x10],0x6
MOV RSI,qword ptr [R12 + 0x40]
MOV RDI,RAX
CALL 0x001074b0
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x20
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001075c0
MOV R12,RAX
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + -0x18]
MOV R13,R12
ADD R13,RCX
CMP byte ptr [R12 + RCX*0x1 + 0xe1],0x0
JNZ 0x0010d29b
MOV RDI,R13
MOV ESI,0x20
CALL 0x001074c0
MOV byte ptr [R13 + 0xe1],0x1
MOV RAX,qword ptr [R12]
LAB_0010d29b:
MOV byte ptr [R13 + 0xe0],0x20
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [R12 + RAX*0x1 + 0x10],0x5
CALL 0x00107440
TEST RAX,RAX
JZ 0x0010d2ca
MOV RDI,R12
MOV RSI,RAX
CALL 0x00107340
MOV R12,RAX
JMP 0x0010d2de
LAB_0010d2ca:
LEA RSI,[0x125701]
MOV EDX,0x24
MOV RDI,R12
CALL 0x001075c0
LAB_0010d2de:
MOV RAX,qword ptr [R12]
MOV RAX,qword ptr [RAX + -0x18]
LEA R14,[R12 + RAX*0x1]
CMP byte ptr [R12 + RAX*0x1 + 0xe1],0x0
JNZ 0x0010d30a
MOV RDI,R14
MOV ESI,0x20
CALL 0x001074c0
MOV byte ptr [R14 + 0xe1],0x1
LAB_0010d30a:
MOV byte ptr [R14 + 0xe0],0x30
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x20
MOV EDX,0x1
MOV RDI,R12
CALL 0x001075c0
MOV R12,RAX
TEST R15,R15
JZ 0x0010d347
MOV RDI,R15
CALL 0x001071e0
MOV RDI,R12
MOV RSI,R15
MOV RDX,RAX
CALL 0x001075c0
JMP 0x0010d362
LAB_0010d347:
MOV RAX,qword ptr [R12]
MOV RAX,qword ptr [RAX + -0x18]
MOV RDI,R12
ADD RDI,RAX
MOV ESI,dword ptr [R12 + RAX*0x1 + 0x20]
OR ESI,0x1
CALL 0x001078f0
LAB_0010d362:
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],0x3a
MOV EDX,0x1
MOV RDI,R12
CALL 0x001075c0
MOV RDI,RAX
MOV ESI,EBP
CALL 0x00107910
LEA RSI,[0x124c96]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x001075c0
MOV RDX,qword ptr [RSP + 0x1c0]
LEA RDI,[RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001076c0
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x00107850
LAB_0010d3b9:
MOV RSI,qword ptr [0x00131f68]
LEA RDI,[RSP + 0x10]
CALL 0x00107270
LEA RDI,[RSP + 0x80]
CALL 0x00107160
MOV RAX,RBX
ADD RSP,0x188
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::LogSink::ToString[abi:cxx11](nglog::LogSeverity, char const*, int, nglog::LogMessageTime
const&, char const*, unsigned long) */
int8
nglog::LogSink::ToString_abi_cxx11_
(int8 param_1,uint param_2,char *param_3,int param_4,int *param_5,long param_6)
{
ostream *poVar1;
long lVar2;
pthread_t pVar3;
size_t sVar4;
ostream *poVar5;
int1 auStack_1b8 [7];
char local_1b1;
long local_1b0;
long local_1a8 [2];
int8 auStack_198 [12];
ios_base local_138 [112];
char acStack_c8 [152];
local_1b0 = param_6;
std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8);
lVar2 = *(long *)(local_1a8[0] + -0x18);
if (acStack_c8[lVar2 + 1] == '\0') {
/* try { // try from 0010d0da to 0010d3b8 has its CatchHandler @ 0010d3ec */
std::ios::widen((char)auStack_1b8 + (char)lVar2 + '\x10');
acStack_c8[lVar2 + 1] = '\x01';
}
acStack_c8[lVar2] = '0';
local_1b1 = **(char **)(LogSeverityNames + (ulong)param_2 * 8);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,&local_1b1,1);
if (fLB::FLAGS_log_year_in_prefix == '\x01') {
*(int8 *)((long)auStack_198 + *(long *)(local_1a8[0] + -0x18)) = 4;
std::ostream::operator<<((ostream *)local_1a8,param_5[5] + 0x76c);
}
*(int8 *)((long)auStack_198 + *(long *)(local_1a8[0] + -0x18)) = 2;
poVar1 = (ostream *)std::ostream::operator<<((ostream *)local_1a8,param_5[4] + 1);
*(int8 *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x10) = 2;
poVar1 = (ostream *)std::ostream::operator<<(poVar1,param_5[3]);
local_1b1 = ' ';
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(poVar1,&local_1b1,1);
*(int8 *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x10) = 2;
poVar1 = (ostream *)std::ostream::operator<<(poVar1,param_5[2]);
local_1b1 = ':';
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(poVar1,&local_1b1,1);
*(int8 *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x10) = 2;
poVar1 = (ostream *)std::ostream::operator<<(poVar1,param_5[1]);
local_1b1 = ':';
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(poVar1,&local_1b1,1);
*(int8 *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x10) = 2;
poVar1 = (ostream *)std::ostream::operator<<(poVar1,*param_5);
local_1b1 = '.';
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(poVar1,&local_1b1,1);
*(int8 *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x10) = 6;
poVar1 = std::ostream::_M_insert<long>((long)poVar1);
local_1b1 = ' ';
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(poVar1,&local_1b1,1);
lVar2 = *(long *)poVar1;
poVar5 = poVar1 + *(long *)(lVar2 + -0x18);
if (poVar1[*(long *)(lVar2 + -0x18) + 0xe1] == (ostream)0x0) {
std::ios::widen((char)poVar5);
poVar5[0xe1] = (ostream)0x1;
lVar2 = *(long *)poVar1;
}
poVar5[0xe0] = (ostream)0x20;
*(int8 *)(poVar1 + *(long *)(lVar2 + -0x18) + 0x10) = 5;
pVar3 = pthread_self();
if (pVar3 == 0) {
std::__ostream_insert<char,std::char_traits<char>>
(poVar1,"thread::id of a non-executing thread",0x24);
}
else {
poVar1 = std::ostream::_M_insert<unsigned_long>((ulong)poVar1);
}
poVar5 = poVar1 + *(long *)(*(long *)poVar1 + -0x18);
if (poVar1[*(long *)(*(long *)poVar1 + -0x18) + 0xe1] == (ostream)0x0) {
std::ios::widen((char)poVar5);
poVar5[0xe1] = (ostream)0x1;
}
poVar5[0xe0] = (ostream)0x30;
local_1b1 = ' ';
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(poVar1,&local_1b1,1);
if (param_3 == (char *)0x0) {
std::ios::clear(poVar1 + *(long *)(*(long *)poVar1 + -0x18),
*(uint *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x20) | 1);
}
else {
sVar4 = strlen(param_3);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,param_3,sVar4);
}
local_1b1 = ':';
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(poVar1,&local_1b1,1);
poVar1 = (ostream *)std::ostream::operator<<(poVar1,param_4);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"] ",2);
std::ostream::write((char *)local_1a8,local_1b0);
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8);
std::ios_base::~ios_base(local_138);
return param_1;
}
|
|
12,425
|
matrix_f_mul_scalar
|
tsotchke[P]eshkol/src/core/utils/vector.c
|
MatrixF* matrix_f_mul_scalar(Arena* arena, const MatrixF* mat, float scalar) {
assert(arena != NULL);
assert(mat != NULL);
MatrixF* result = matrix_f_create(arena, mat->rows, mat->cols);
if (!result) {
return NULL;
}
// Multiply the matrix by the scalar
for (size_t i = 0; i < mat->rows; i++) {
for (size_t j = 0; j < mat->cols; j++) {
result->data[i][j] = mat->data[i][j] * scalar;
}
}
return result;
}
|
O0
|
c
|
matrix_f_mul_scalar:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movss %xmm0, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x6c2e
jmp 0x6c4d
leaq 0x35a0(%rip), %rdi # 0xa1d5
leaq 0x4b1c(%rip), %rsi # 0xb758
movl $0x3a3, %edx # imm = 0x3A3
leaq 0x5115(%rip), %rcx # 0xbd5d
callq 0x1090
cmpq $0x0, -0x18(%rbp)
je 0x6c56
jmp 0x6c75
leaq 0x4fb8(%rip), %rdi # 0xbc15
leaq 0x4af4(%rip), %rsi # 0xb758
movl $0x3a4, %edx # imm = 0x3A4
leaq 0x50ed(%rip), %rcx # 0xbd5d
callq 0x1090
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rdx
callq 0x6220
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x6ca6
movq $0x0, -0x8(%rbp)
jmp 0x6d2d
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x6d25
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x6d15
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
mulss -0x1c(%rbp), %xmm0
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6cc4
jmp 0x6d17
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x6cae
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
matrix_f_mul_scalar:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
movss [rbp+var_1C], xmm0
cmp [rbp+var_10], 0
jz short loc_6C2E
jmp short loc_6C4D
loc_6C2E:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 3A3h
lea rcx, aMatrixfMatrixF_3; "MatrixF *matrix_f_mul_scalar(Arena *, c"...
call ___assert_fail
loc_6C4D:
cmp [rbp+var_18], 0
jz short loc_6C56
jmp short loc_6C75
loc_6C56:
lea rdi, aMatNull; "mat != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 3A4h
lea rcx, aMatrixfMatrixF_3; "MatrixF *matrix_f_mul_scalar(Arena *, c"...
call ___assert_fail
loc_6C75:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+40h]
mov rax, [rbp+var_18]
mov rdx, [rax+48h]
call matrix_f_create
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_6CA6
mov [rbp+var_8], 0
jmp loc_6D2D
loc_6CA6:
mov [rbp+var_30], 0
loc_6CAE:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
cmp rax, [rcx+40h]
jnb short loc_6D25
mov [rbp+var_38], 0
loc_6CC4:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
cmp rax, [rcx+48h]
jnb short loc_6D15
mov rax, [rbp+var_18]
mov rcx, [rbp+var_30]
shl rcx, 4
add rax, rcx
mov rcx, [rbp+var_38]
movss xmm0, dword ptr [rax+rcx*4]
mulss xmm0, [rbp+var_1C]
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
shl rcx, 4
add rax, rcx
mov rcx, [rbp+var_38]
movss dword ptr [rax+rcx*4], xmm0
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp short loc_6CC4
loc_6D15:
jmp short $+2
loc_6D17:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_6CAE
loc_6D25:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_6D2D:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long matrix_f_mul_scalar(_QWORD *a1, long long a2, float a3)
{
unsigned long long j; // [rsp+8h] [rbp-38h]
unsigned long long i; // [rsp+10h] [rbp-30h]
long long v6; // [rsp+18h] [rbp-28h]
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
931LL,
"MatrixF *matrix_f_mul_scalar(Arena *, const MatrixF *, float)");
if ( !a2 )
__assert_fail(
"mat != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
932LL,
"MatrixF *matrix_f_mul_scalar(Arena *, const MatrixF *, float)");
v6 = matrix_f_create(a1, *(_QWORD *)(a2 + 64), *(_QWORD *)(a2 + 72));
if ( !v6 )
return 0LL;
for ( i = 0LL; i < *(_QWORD *)(a2 + 64); ++i )
{
for ( j = 0LL; j < *(_QWORD *)(a2 + 72); ++j )
*(float *)(16 * i + v6 + 4 * j) = *(float *)(16 * i + a2 + 4 * j) * a3;
}
return v6;
}
|
matrix_f_mul_scalar:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOVSS dword ptr [RBP + -0x1c],XMM0
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00106c2e
JMP 0x00106c4d
LAB_00106c2e:
LEA RDI,[0x10a1c3]
LEA RSI,[0x10b724]
MOV EDX,0x3a3
LEA RCX,[0x10bd17]
CALL 0x00101090
LAB_00106c4d:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00106c56
JMP 0x00106c75
LAB_00106c56:
LEA RDI,[0x10bbcf]
LEA RSI,[0x10b724]
MOV EDX,0x3a4
LEA RCX,[0x10bd17]
CALL 0x00101090
LAB_00106c75:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX + 0x48]
CALL 0x00106220
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x00106ca6
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00106d2d
LAB_00106ca6:
MOV qword ptr [RBP + -0x30],0x0
LAB_00106cae:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x40]
JNC 0x00106d25
MOV qword ptr [RBP + -0x38],0x0
LAB_00106cc4:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x48]
JNC 0x00106d15
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MULSS XMM0,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x38]
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00106cc4
LAB_00106d15:
JMP 0x00106d17
LAB_00106d17:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00106cae
LAB_00106d25:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_00106d2d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long matrix_f_mul_scalar(float param_1,long param_2,long param_3)
{
ulong local_40;
ulong local_38;
long local_10;
if (param_2 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c",
0x3a3,"MatrixF *matrix_f_mul_scalar(Arena *, const MatrixF *, float)");
}
if (param_3 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("mat != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c",
0x3a4,"MatrixF *matrix_f_mul_scalar(Arena *, const MatrixF *, float)");
}
local_10 = matrix_f_create(param_2,*(int8 *)(param_3 + 0x40),*(int8 *)(param_3 + 0x48)
);
if (local_10 == 0) {
local_10 = 0;
}
else {
for (local_38 = 0; local_38 < *(ulong *)(param_3 + 0x40); local_38 = local_38 + 1) {
for (local_40 = 0; local_40 < *(ulong *)(param_3 + 0x48); local_40 = local_40 + 1) {
*(float *)(local_10 + local_38 * 0x10 + local_40 * 4) =
*(float *)(param_3 + local_38 * 0x10 + local_40 * 4) * param_1;
}
}
}
return local_10;
}
|
|
12,426
|
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&)
|
monkey531[P]llama/common/common.cpp
|
bool string_parse_kv_override(const char * data, std::vector<llama_model_kv_override> & overrides) {
const char * sep = strchr(data, '=');
if (sep == nullptr || sep - data >= 128) {
LOG_ERR("%s: malformed KV override '%s'\n", __func__, data);
return false;
}
llama_model_kv_override kvo;
std::strncpy(kvo.key, data, sep - data);
kvo.key[sep - data] = 0;
sep++;
if (strncmp(sep, "int:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_INT;
kvo.val_i64 = std::atol(sep);
} else if (strncmp(sep, "float:", 6) == 0) {
sep += 6;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_FLOAT;
kvo.val_f64 = std::atof(sep);
} else if (strncmp(sep, "bool:", 5) == 0) {
sep += 5;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_BOOL;
if (std::strcmp(sep, "true") == 0) {
kvo.val_bool = true;
} else if (std::strcmp(sep, "false") == 0) {
kvo.val_bool = false;
} else {
LOG_ERR("%s: invalid boolean value for KV override '%s'\n", __func__, data);
return false;
}
} else if (strncmp(sep, "str:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_STR;
if (strlen(sep) > 127) {
LOG_ERR("%s: malformed KV override '%s', value cannot exceed 127 chars\n", __func__, data);
return false;
}
strncpy(kvo.val_str, sep, 127);
kvo.val_str[127] = '\0';
} else {
LOG_ERR("%s: invalid type for KV override '%s'\n", __func__, data);
return false;
}
overrides.emplace_back(std::move(kvo));
return true;
}
|
O2
|
cpp
|
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x3d
popq %rsi
callq 0x22290
testq %rax, %rax
je 0x3f1a7
movq %rax, %r15
movq %rax, %r12
subq %rbx, %r12
cmpq $0x80, %r12
jl 0x3f1e1
leaq 0xa52b2(%rip), %rax # 0xe4460
cmpl $0x0, (%rax)
js 0x3f359
callq 0x7e14a
leaq 0x5dbc0(%rip), %rdx # 0x9cd83
leaq 0x5dbd9(%rip), %rcx # 0x9cda3
xorl %ebp, %ebp
pushq $0x4
popq %rsi
movq %rax, %rdi
movq %rbx, %r8
xorl %eax, %eax
callq 0x7e1e2
jmp 0x3f35b
leaq 0xc(%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x22410
movb $0x0, 0xc(%rsp,%r12)
leaq 0x1(%r15), %r12
leaq 0x5dbba(%rip), %rsi # 0x9cdbc
pushq $0x4
popq %rdx
movq %r12, %rdi
callq 0x223c0
testl %eax, %eax
je 0x3f27c
leaq 0x5dba9(%rip), %rsi # 0x9cdc1
pushq $0x6
popq %rdx
movq %r12, %rdi
callq 0x223c0
testl %eax, %eax
je 0x3f297
leaq 0x5db9a(%rip), %rsi # 0x9cdc8
pushq $0x5
popq %rdx
movq %r12, %rdi
callq 0x223c0
testl %eax, %eax
je 0x3f2c9
leaq 0x5dbb6(%rip), %rsi # 0x9cdfe
pushq $0x4
popq %rdx
movq %r12, %rdi
callq 0x223c0
testl %eax, %eax
je 0x3f320
leaq 0xa51fe(%rip), %rax # 0xe4460
cmpl $0x0, (%rax)
js 0x3f359
callq 0x7e14a
leaq 0x5dbcb(%rip), %rdx # 0x9ce42
jmp 0x3f1c3
addq $0x5, %r15
andl $0x0, 0x8(%rsp)
movq %r15, %rdi
callq 0x22960
movq %rax, 0x90(%rsp)
jmp 0x3f2b4
addq $0x7, %r15
movl $0x1, 0x8(%rsp)
movq %r15, %rdi
callq 0x229b0
movsd %xmm0, 0x90(%rsp)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x431e6
movb $0x1, %bpl
jmp 0x3f35b
addq $0x6, %r15
movl $0x2, 0x8(%rsp)
leaq 0x5c4e5(%rip), %rsi # 0x9b7c1
movq %r15, %rdi
callq 0x22b00
testl %eax, %eax
je 0x3f36d
leaq 0x5c4c8(%rip), %rsi # 0x9b7bb
movq %r15, %rdi
callq 0x22b00
testl %eax, %eax
je 0x3f399
leaq 0xa5156(%rip), %rax # 0xe4460
cmpl $0x0, (%rax)
js 0x3f359
callq 0x7e14a
leaq 0x5dab3(%rip), %rdx # 0x9cdce
jmp 0x3f1c3
addq $0x5, %r15
movl $0x3, 0x8(%rsp)
movq %r15, %rdi
callq 0x22360
cmpq $0x80, %rax
jb 0x3f37a
leaq 0xa511d(%rip), %rax # 0xe4460
cmpl $0x0, (%rax)
js 0x3f359
callq 0x7e14a
leaq 0x5daaf(%rip), %rdx # 0x9ce03
jmp 0x3f1c3
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x90(%rsp)
jmp 0x3f2b4
leaq 0x90(%rsp), %rbx
pushq $0x7f
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22410
movb $0x0, 0x7f(%rbx)
jmp 0x3f2b4
movb $0x0, 0x90(%rsp)
jmp 0x3f2b4
|
_Z24string_parse_kv_overridePKcRSt6vectorI23llama_model_kv_overrideSaIS2_EE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 110h
mov r14, rsi
mov rbx, rdi
push 3Dh ; '='
pop rsi
call _strchr
test rax, rax
jz short loc_3F1A7
mov r15, rax
mov r12, rax
sub r12, rbx
cmp r12, 80h
jl short loc_3F1E1
loc_3F1A7:
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_3F359
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSMalformedKvOv; "%s: malformed KV override '%s'\n"
loc_3F1C3:
lea rcx, aStringParseKvO; "string_parse_kv_override"
xor ebp, ebp
push 4
pop rsi
mov rdi, rax
mov r8, rbx
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp loc_3F35B
loc_3F1E1:
lea rdi, [rsp+138h+var_12C]
mov rsi, rbx
mov rdx, r12
call _strncpy
mov [rsp+r12+138h+var_12C], 0
lea r12, [r15+1]
lea rsi, aInt; "int:"
push 4
pop rdx
mov rdi, r12
call _strncmp
test eax, eax
jz short loc_3F27C
lea rsi, aFloat; "float:"
push 6
pop rdx
mov rdi, r12
call _strncmp
test eax, eax
jz short loc_3F297
lea rsi, aBool; "bool:"
push 5
pop rdx
mov rdi, r12
call _strncmp
test eax, eax
jz loc_3F2C9
lea rsi, aStr; "str:"
push 4
pop rdx
mov rdi, r12
call _strncmp
test eax, eax
jz loc_3F320
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_3F359
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSInvalidTypeFo; "%s: invalid type for KV override '%s'\n"
jmp loc_3F1C3
loc_3F27C:
add r15, 5
and [rsp+138h+var_130], 0
mov rdi, r15
call _atol
mov [rsp+138h+var_A8], rax
jmp short loc_3F2B4
loc_3F297:
add r15, 7
mov [rsp+138h+var_130], 1
mov rdi, r15
call _atof
movsd [rsp+138h+var_A8], xmm0
loc_3F2B4:
lea rsi, [rsp+138h+var_130]
mov rdi, r14
call _ZNSt6vectorI23llama_model_kv_overrideSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<llama_model_kv_override>::emplace_back<llama_model_kv_override>(llama_model_kv_override &&)
mov bpl, 1
jmp loc_3F35B
loc_3F2C9:
add r15, 6
mov [rsp+138h+var_130], 2
lea rsi, aTrue; "true"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_3F36D
lea rsi, aFalse; "false"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_3F399
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_3F359
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSInvalidBoolea; "%s: invalid boolean value for KV overri"...
jmp loc_3F1C3
loc_3F320:
add r15, 5
mov [rsp+138h+var_130], 3
mov rdi, r15
call _strlen
cmp rax, 80h
jb short loc_3F37A
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_3F359
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSMalformedKvOv_0; "%s: malformed KV override '%s', value c"...
jmp loc_3F1C3
loc_3F359:
xor ebp, ebp
loc_3F35B:
mov eax, ebp
add rsp, 110h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_3F36D:
mov byte ptr [rsp+138h+var_A8], 1
jmp loc_3F2B4
loc_3F37A:
lea rbx, [rsp+138h+var_A8]
push 7Fh
pop rdx
mov rdi, rbx
mov rsi, r15
call _strncpy
mov byte ptr [rbx+7Fh], 0
jmp loc_3F2B4
loc_3F399:
mov byte ptr [rsp+138h+var_A8], 0
jmp loc_3F2B4
|
long long string_parse_kv_override(long long a1, long long a2)
{
unsigned int v2; // ebp
long long v3; // rax
long long v4; // r15
long long v5; // r12
int v6; // eax
int v7; // r9d
const char *v8; // rdx
long long v9; // r15
long long v10; // r15
int v12; // [rsp+8h] [rbp-130h] BYREF
_BYTE v13[132]; // [rsp+Ch] [rbp-12Ch] BYREF
long long v14[15]; // [rsp+90h] [rbp-A8h] BYREF
char v15; // [rsp+10Fh] [rbp-29h]
v3 = strchr(a1, 61LL);
if ( v3 )
{
v4 = v3;
v5 = v3 - a1;
if ( v3 - a1 < 128 )
{
strncpy(v13, a1, v3 - a1);
v13[v5] = 0;
if ( !(unsigned int)strncmp(v4 + 1, "int:", 4LL) )
{
v12 = 0;
v14[0] = atol(v4 + 5);
}
else if ( !(unsigned int)strncmp(v4 + 1, "float:", 6LL) )
{
v12 = 1;
v14[0] = atof(v4 + 7);
}
else if ( !(unsigned int)strncmp(v4 + 1, "bool:", 5LL) )
{
v9 = v4 + 6;
v12 = 2;
if ( !(unsigned int)strcmp(v9) )
{
LOBYTE(v14[0]) = 1;
}
else
{
if ( (unsigned int)strcmp(v9) )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: invalid boolean value for KV override '%s'\n";
goto LABEL_5;
}
return 0;
}
LOBYTE(v14[0]) = 0;
}
}
else
{
if ( (unsigned int)strncmp(v4 + 1, "str:", 4LL) )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: invalid type for KV override '%s'\n";
goto LABEL_5;
}
return 0;
}
v10 = v4 + 5;
v12 = 3;
if ( (unsigned long long)strlen(v10) >= 0x80 )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: malformed KV override '%s', value cannot exceed 127 chars\n";
goto LABEL_5;
}
return 0;
}
strncpy(v14, v10, 127LL);
v15 = 0;
}
std::vector<llama_model_kv_override>::emplace_back<llama_model_kv_override>(a2, &v12);
LOBYTE(v2) = 1;
return v2;
}
}
if ( common_log_verbosity_thold < 0 )
return 0;
v6 = common_log_main();
v8 = "%s: malformed KV override '%s'\n";
LABEL_5:
v2 = 0;
common_log_add(v6, 4, (_DWORD)v8, (unsigned int)"string_parse_kv_override", a1, v7);
return v2;
}
|
string_parse_kv_override:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x110
MOV R14,RSI
MOV RBX,RDI
PUSH 0x3d
POP RSI
CALL 0x00122290
TEST RAX,RAX
JZ 0x0013f1a7
MOV R15,RAX
MOV R12,RAX
SUB R12,RBX
CMP R12,0x80
JL 0x0013f1e1
LAB_0013f1a7:
LEA RAX,[0x1e4460]
CMP dword ptr [RAX],0x0
JS 0x0013f359
CALL 0x0017e14a
LEA RDX,[0x19cd83]
LAB_0013f1c3:
LEA RCX,[0x19cda3]
XOR EBP,EBP
PUSH 0x4
POP RSI
MOV RDI,RAX
MOV R8,RBX
XOR EAX,EAX
CALL 0x0017e1e2
JMP 0x0013f35b
LAB_0013f1e1:
LEA RDI,[RSP + 0xc]
MOV RSI,RBX
MOV RDX,R12
CALL 0x00122410
MOV byte ptr [RSP + R12*0x1 + 0xc],0x0
LEA R12,[R15 + 0x1]
LEA RSI,[0x19cdbc]
PUSH 0x4
POP RDX
MOV RDI,R12
CALL 0x001223c0
TEST EAX,EAX
JZ 0x0013f27c
LEA RSI,[0x19cdc1]
PUSH 0x6
POP RDX
MOV RDI,R12
CALL 0x001223c0
TEST EAX,EAX
JZ 0x0013f297
LEA RSI,[0x19cdc8]
PUSH 0x5
POP RDX
MOV RDI,R12
CALL 0x001223c0
TEST EAX,EAX
JZ 0x0013f2c9
LEA RSI,[0x19cdfe]
PUSH 0x4
POP RDX
MOV RDI,R12
CALL 0x001223c0
TEST EAX,EAX
JZ 0x0013f320
LEA RAX,[0x1e4460]
CMP dword ptr [RAX],0x0
JS 0x0013f359
CALL 0x0017e14a
LEA RDX,[0x19ce42]
JMP 0x0013f1c3
LAB_0013f27c:
ADD R15,0x5
AND dword ptr [RSP + 0x8],0x0
MOV RDI,R15
CALL 0x00122960
MOV qword ptr [RSP + 0x90],RAX
JMP 0x0013f2b4
LAB_0013f297:
ADD R15,0x7
MOV dword ptr [RSP + 0x8],0x1
MOV RDI,R15
CALL 0x001229b0
MOVSD qword ptr [RSP + 0x90],XMM0
LAB_0013f2b4:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x001431e6
MOV BPL,0x1
JMP 0x0013f35b
LAB_0013f2c9:
ADD R15,0x6
MOV dword ptr [RSP + 0x8],0x2
LEA RSI,[0x19b7c1]
MOV RDI,R15
CALL 0x00122b00
TEST EAX,EAX
JZ 0x0013f36d
LEA RSI,[0x19b7bb]
MOV RDI,R15
CALL 0x00122b00
TEST EAX,EAX
JZ 0x0013f399
LEA RAX,[0x1e4460]
CMP dword ptr [RAX],0x0
JS 0x0013f359
CALL 0x0017e14a
LEA RDX,[0x19cdce]
JMP 0x0013f1c3
LAB_0013f320:
ADD R15,0x5
MOV dword ptr [RSP + 0x8],0x3
MOV RDI,R15
CALL 0x00122360
CMP RAX,0x80
JC 0x0013f37a
LEA RAX,[0x1e4460]
CMP dword ptr [RAX],0x0
JS 0x0013f359
CALL 0x0017e14a
LEA RDX,[0x19ce03]
JMP 0x0013f1c3
LAB_0013f359:
XOR EBP,EBP
LAB_0013f35b:
MOV EAX,EBP
ADD RSP,0x110
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0013f36d:
MOV byte ptr [RSP + 0x90],0x1
JMP 0x0013f2b4
LAB_0013f37a:
LEA RBX,[RSP + 0x90]
PUSH 0x7f
POP RDX
MOV RDI,RBX
MOV RSI,R15
CALL 0x00122410
MOV byte ptr [RBX + 0x7f],0x0
JMP 0x0013f2b4
LAB_0013f399:
MOV byte ptr [RSP + 0x90],0x0
JMP 0x0013f2b4
|
/* string_parse_kv_override(char const*, std::vector<llama_model_kv_override,
std::allocator<llama_model_kv_override> >&) */
ulong string_parse_kv_override(char *param_1,vector *param_2)
{
char *__s1;
int iVar1;
char *pcVar2;
int8 uVar3;
int8 unaff_RBP;
ulong uVar4;
size_t sVar5;
int4 local_130;
char local_12c [132];
double local_a8 [15];
int1 local_29;
pcVar2 = strchr(param_1,0x3d);
if ((pcVar2 == (char *)0x0) || (sVar5 = (long)pcVar2 - (long)param_1, 0x7f < (long)sVar5)) {
if (common_log_verbosity_thold < 0) goto LAB_0013f359;
uVar3 = common_log_main();
pcVar2 = "%s: malformed KV override \'%s\'\n";
goto LAB_0013f1c3;
}
strncpy(local_12c,param_1,sVar5);
local_12c[sVar5] = '\0';
__s1 = pcVar2 + 1;
iVar1 = strncmp(__s1,"int:",4);
if (iVar1 == 0) {
local_130 = 0;
local_a8[0] = (double)atol(pcVar2 + 5);
}
else {
iVar1 = strncmp(__s1,"float:",6);
if (iVar1 == 0) {
local_130 = 1;
local_a8[0] = atof(pcVar2 + 7);
}
else {
iVar1 = strncmp(__s1,"bool:",5);
if (iVar1 != 0) {
iVar1 = strncmp(__s1,"str:",4);
if (iVar1 == 0) {
local_130 = 3;
sVar5 = strlen(pcVar2 + 5);
if (sVar5 < 0x80) {
strncpy((char *)local_a8,pcVar2 + 5,0x7f);
local_29 = 0;
goto LAB_0013f2b4;
}
if (common_log_verbosity_thold < 0) goto LAB_0013f359;
uVar3 = common_log_main();
pcVar2 = "%s: malformed KV override \'%s\', value cannot exceed 127 chars\n";
}
else {
if (common_log_verbosity_thold < 0) {
LAB_0013f359:
uVar4 = 0;
goto LAB_0013f35b;
}
uVar3 = common_log_main();
pcVar2 = "%s: invalid type for KV override \'%s\'\n";
}
LAB_0013f1c3:
uVar4 = 0;
common_log_add(uVar3,4,pcVar2,"string_parse_kv_override",param_1);
goto LAB_0013f35b;
}
local_130 = 2;
iVar1 = strcmp(pcVar2 + 6,"true");
if (iVar1 == 0) {
local_a8[0] = (double)CONCAT71(local_a8[0]._1_7_,1);
}
else {
iVar1 = strcmp(pcVar2 + 6,"false");
if (iVar1 != 0) {
if (common_log_verbosity_thold < 0) goto LAB_0013f359;
uVar3 = common_log_main();
pcVar2 = "%s: invalid boolean value for KV override \'%s\'\n";
goto LAB_0013f1c3;
}
local_a8[0] = (double)((ulong)local_a8[0] & 0xffffffffffffff00);
}
}
}
LAB_0013f2b4:
std::vector<llama_model_kv_override,std::allocator<llama_model_kv_override>>::
emplace_back<llama_model_kv_override>
((vector<llama_model_kv_override,std::allocator<llama_model_kv_override>> *)param_2,
(llama_model_kv_override *)&local_130);
uVar4 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
LAB_0013f35b:
return uVar4 & 0xffffffff;
}
|
|
12,427
|
testing::UnitTest::test_suite_to_run_count() const
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/include/gtest/gtest.h
|
const internal::UnitTestImpl* impl() const { return impl_; }
|
O1
|
c
|
testing::UnitTest::test_suite_to_run_count() const:
movq 0x40(%rdi), %rax
movq 0xb8(%rax), %rcx
movq 0xc0(%rax), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x2d454
movq (%rcx), %rsi
movzbl 0x70(%rsi), %esi
addl %esi, %eax
addq $0x8, %rcx
jmp 0x2d440
retq
nop
|
_ZNK7testing8UnitTest22test_case_to_run_countEv:
mov rax, [rdi+40h]
mov rcx, [rax+0B8h]
mov rdx, [rax+0C0h]
xor eax, eax
loc_2D440:
cmp rcx, rdx
jz short locret_2D454
mov rsi, [rcx]
movzx esi, byte ptr [rsi+70h]
add eax, esi
add rcx, 8
jmp short loc_2D440
locret_2D454:
retn
|
long long testing::UnitTest::test_case_to_run_count(testing::UnitTest *this)
{
long long v1; // rax
long long v2; // rcx
long long v3; // rdx
long long result; // rax
v1 = *((_QWORD *)this + 8);
v2 = *(_QWORD *)(v1 + 184);
v3 = *(_QWORD *)(v1 + 192);
result = 0LL;
while ( v2 != v3 )
{
result = *(unsigned __int8 *)(*(_QWORD *)v2 + 112LL) + (unsigned int)result;
v2 += 8LL;
}
return result;
}
|
test_case_to_run_count:
MOV RAX,qword ptr [RDI + 0x40]
MOV RCX,qword ptr [RAX + 0xb8]
MOV RDX,qword ptr [RAX + 0xc0]
XOR EAX,EAX
LAB_0012d440:
CMP RCX,RDX
JZ 0x0012d454
MOV RSI,qword ptr [RCX]
MOVZX ESI,byte ptr [RSI + 0x70]
ADD EAX,ESI
ADD RCX,0x8
JMP 0x0012d440
LAB_0012d454:
RET
|
/* testing::UnitTest::test_case_to_run_count() const */
int __thiscall testing::UnitTest::test_case_to_run_count(UnitTest *this)
{
int iVar1;
long *plVar2;
iVar1 = 0;
for (plVar2 = *(long **)(*(long *)(this + 0x40) + 0xb8);
plVar2 != *(long **)(*(long *)(this + 0x40) + 0xc0); plVar2 = plVar2 + 1) {
iVar1 = iVar1 + (uint)*(byte *)(*plVar2 + 0x70);
}
return iVar1;
}
|
|
12,428
|
common_chat_format_name[abi:cxx11](common_chat_format)
|
monkey531[P]llama/common/chat.cpp
|
std::string common_chat_format_name(common_chat_format format) {
switch (format) {
case COMMON_CHAT_FORMAT_CONTENT_ONLY: return "Content-only";
case COMMON_CHAT_FORMAT_GENERIC: return "Generic";
case COMMON_CHAT_FORMAT_MISTRAL_NEMO: return "Mistral Nemo";
case COMMON_CHAT_FORMAT_LLAMA_3_X: return "Llama 3.x";
case COMMON_CHAT_FORMAT_LLAMA_3_X_WITH_BUILTIN_TOOLS: return "Llama 3.x with builtin tools";
case COMMON_CHAT_FORMAT_DEEPSEEK_R1: return "DeepSeek R1";
case COMMON_CHAT_FORMAT_FIREFUNCTION_V2: return "FireFunction v2";
case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2: return "Functionary v3.2";
case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1: return "Functionary v3.1 Llama 3.1";
case COMMON_CHAT_FORMAT_HERMES_2_PRO: return "Hermes 2 Pro";
case COMMON_CHAT_FORMAT_COMMAND_R7B: return "Command R7B";
default:
throw std::runtime_error("Unknown chat format");
}
}
|
O2
|
cpp
|
common_chat_format_name[abi:cxx11](common_chat_format):
pushq %r14
pushq %rbx
subq $0x18, %rsp
cmpl $0xa, %esi
ja 0x997df
movq %rdi, %rbx
movl %esi, %eax
leaq 0x1eda8(%rip), %rcx # 0xb84d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1fde0(%rip), %rsi # 0xb9518
leaq 0x17(%rsp), %rdx
jmp 0x997cc
leaq 0x1fdfb(%rip), %rsi # 0xb9544
leaq 0x13(%rsp), %rdx
jmp 0x997cc
leaq 0x1fe52(%rip), %rsi # 0xb95a9
leaq 0xe(%rsp), %rdx
jmp 0x997cc
leaq 0x1fdc8(%rip), %rsi # 0xb952d
leaq 0x15(%rsp), %rdx
jmp 0x997cc
leaq 0x1fdc7(%rip), %rsi # 0xb953a
leaq 0x14(%rsp), %rdx
jmp 0x997cc
leaq 0x1fdfc(%rip), %rsi # 0xb957d
leaq 0x10(%rsp), %rdx
jmp 0x997cc
leaq 0x1fd96(%rip), %rsi # 0xb9525
leaq 0x16(%rsp), %rdx
jmp 0x997cc
leaq 0x1fdc4(%rip), %rsi # 0xb9561
leaq 0x12(%rsp), %rdx
jmp 0x997cc
leaq 0x1fdc2(%rip), %rsi # 0xb956d
leaq 0x11(%rsp), %rdx
jmp 0x997cc
leaq 0x1fdfd(%rip), %rsi # 0xb95b6
leaq 0xd(%rsp), %rdx
jmp 0x997cc
leaq 0x1fdc7(%rip), %rsi # 0xb958e
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x26f76
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x23460
movq %rax, %rbx
leaq 0x1fdd1(%rip), %rsi # 0xb95c2
movq %rax, %rdi
callq 0x23320
movq 0x627f0(%rip), %rsi # 0xfbff0
movq 0x62751(%rip), %rdx # 0xfbf58
movq %rbx, %rdi
callq 0x23f20
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23fa0
|
_Z23common_chat_format_nameB5cxx1118common_chat_format:
push r14
push rbx
sub rsp, 18h
cmp esi, 0Ah; switch 11 cases
ja def_9972F; jumptable 000000000009972F default case
mov rbx, rdi
mov eax, esi
lea rcx, jpt_9972F
movsxd rax, ds:(jpt_9972F - 0B84D0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_99731:
lea rsi, aContentOnly; jumptable 000000000009972F case 0
lea rdx, [rsp+28h+var_11]
jmp loc_997CC
loc_99742:
lea rsi, aLlama3XWithBui; jumptable 000000000009972F case 4
lea rdx, [rsp+28h+var_15]
jmp short loc_997CC
loc_99750:
lea rsi, aHermes2Pro; jumptable 000000000009972F case 9
lea rdx, [rsp+28h+var_1A]
jmp short loc_997CC
loc_9975E:
lea rsi, aMistralNemo; jumptable 000000000009972F case 2
lea rdx, [rsp+28h+var_13]
jmp short loc_997CC
loc_9976C:
lea rsi, aLlama3X; jumptable 000000000009972F case 3
lea rdx, [rsp+28h+var_14]
jmp short loc_997CC
loc_9977A:
lea rsi, aFunctionaryV32; jumptable 000000000009972F case 7
lea rdx, [rsp+28h+var_18]
jmp short loc_997CC
loc_99788:
lea rsi, aGeneric; jumptable 000000000009972F case 1
lea rdx, [rsp+28h+var_12]
jmp short loc_997CC
loc_99796:
lea rsi, aDeepseekR1; jumptable 000000000009972F case 5
lea rdx, [rsp+28h+var_16]
jmp short loc_997CC
loc_997A4:
lea rsi, aFirefunctionV2; jumptable 000000000009972F case 6
lea rdx, [rsp+28h+var_17]
jmp short loc_997CC
loc_997B2:
lea rsi, aCommandR7b; jumptable 000000000009972F case 10
lea rdx, [rsp+28h+var_1B]
jmp short loc_997CC
loc_997C0:
lea rsi, aFunctionaryV31; jumptable 000000000009972F case 8
lea rdx, [rsp+28h+var_19]
loc_997CC:
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
retn
def_9972F:
push 10h; jumptable 000000000009972F default case
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUnknownChatFor; "Unknown chat format"
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, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
|
_QWORD * common_chat_format_name[abi:cxx11](_QWORD *a1, int a2)
{
const char *v2; // rsi
std::runtime_error *exception; // rbx
switch ( a2 )
{
case 0:
v2 = "Content-only";
break;
case 1:
v2 = "Generic";
break;
case 2:
v2 = "Mistral Nemo";
break;
case 3:
v2 = "Llama 3.x";
break;
case 4:
v2 = "Llama 3.x with builtin tools";
break;
case 5:
v2 = "DeepSeek R1";
break;
case 6:
v2 = "FireFunction v2";
break;
case 7:
v2 = "Functionary v3.2";
break;
case 8:
v2 = "Functionary v3.1 Llama 3.1";
break;
case 9:
v2 = "Hermes 2 Pro";
break;
case 10:
v2 = "Command R7B";
break;
default:
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Unknown chat format");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
std::string::basic_string<std::allocator<char>>(a1, (long long)v2);
return a1;
}
|
common_chat_format_name[abi:cxx11]:
PUSH R14
PUSH RBX
SUB RSP,0x18
CMP ESI,0xa
JA 0x001997df
MOV RBX,RDI
MOV EAX,ESI
LEA RCX,[0x1b84d0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RSI,[0x1b9518]
LEA RDX,[RSP + 0x17]
JMP 0x001997cc
caseD_4:
LEA RSI,[0x1b9544]
LEA RDX,[RSP + 0x13]
JMP 0x001997cc
caseD_9:
LEA RSI,[0x1b95a9]
LEA RDX,[RSP + 0xe]
JMP 0x001997cc
caseD_2:
LEA RSI,[0x1b952d]
LEA RDX,[RSP + 0x15]
JMP 0x001997cc
caseD_3:
LEA RSI,[0x1b953a]
LEA RDX,[RSP + 0x14]
JMP 0x001997cc
caseD_7:
LEA RSI,[0x1b957d]
LEA RDX,[RSP + 0x10]
JMP 0x001997cc
caseD_1:
LEA RSI,[0x1b9525]
LEA RDX,[RSP + 0x16]
JMP 0x001997cc
caseD_5:
LEA RSI,[0x1b9561]
LEA RDX,[RSP + 0x12]
JMP 0x001997cc
caseD_6:
LEA RSI,[0x1b956d]
LEA RDX,[RSP + 0x11]
JMP 0x001997cc
caseD_a:
LEA RSI,[0x1b95b6]
LEA RDX,[RSP + 0xd]
JMP 0x001997cc
caseD_8:
LEA RSI,[0x1b958e]
LEA RDX,[RSP + 0xf]
LAB_001997cc:
MOV RDI,RBX
CALL 0x00126f76
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
RET
default:
PUSH 0x10
POP RDI
CALL 0x00123460
MOV RBX,RAX
LAB_001997ea:
LEA RSI,[0x1b95c2]
MOV RDI,RAX
CALL 0x00123320
LAB_001997f9:
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,RBX
CALL 0x00123f20
|
/* common_chat_format_name[abi:cxx11](common_chat_format) */
string * common_chat_format_name_abi_cxx11_(string *param_1,int4 param_2)
{
runtime_error *this;
allocator *paVar1;
char *pcVar2;
allocator local_1b;
allocator local_1a;
allocator local_19;
allocator local_18;
allocator local_17;
allocator local_16;
allocator local_15;
allocator local_14;
allocator local_13;
allocator local_12;
allocator local_11;
switch(param_2) {
case 0:
pcVar2 = "Content-only";
paVar1 = &local_11;
break;
case 1:
pcVar2 = "Generic";
paVar1 = &local_12;
break;
case 2:
pcVar2 = "Mistral Nemo";
paVar1 = &local_13;
break;
case 3:
pcVar2 = "Llama 3.x";
paVar1 = &local_14;
break;
case 4:
pcVar2 = "Llama 3.x with builtin tools";
paVar1 = &local_15;
break;
case 5:
pcVar2 = "DeepSeek R1";
paVar1 = &local_16;
break;
case 6:
pcVar2 = "FireFunction v2";
paVar1 = &local_17;
break;
case 7:
pcVar2 = "Functionary v3.2";
paVar1 = &local_18;
break;
case 8:
pcVar2 = "Functionary v3.1 Llama 3.1";
paVar1 = &local_19;
break;
case 9:
pcVar2 = "Hermes 2 Pro";
paVar1 = &local_1a;
break;
case 10:
pcVar2 = "Command R7B";
paVar1 = &local_1b;
break;
default:
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001997ea to 001997f8 has its CatchHandler @ 0019980f */
std::runtime_error::runtime_error(this,"Unknown chat format");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
std::__cxx11::string::string<std::allocator<char>>(param_1,pcVar2,paVar1);
return param_1;
}
|
|
12,429
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long)
|
monkey531[P]llama/common/json.hpp
|
inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta,
std::uint64_t rest, std::uint64_t ten_k)
{
JSON_ASSERT(len >= 1);
JSON_ASSERT(dist <= delta);
JSON_ASSERT(rest <= delta);
JSON_ASSERT(ten_k > 0);
// <--------------------------- delta ---->
// <---- dist --------->
// --------------[------------------+-------------------]--------------
// M- w M+
//
// ten_k
// <------>
// <---- rest ---->
// --------------[------------------+----+--------------]--------------
// w V
// = buf * 10^k
//
// ten_k represents a unit-in-the-last-place in the decimal representation
// stored in buf.
// Decrement buf by ten_k while this takes buf closer to w.
// The tests are written in this order to avoid overflow in unsigned
// integer arithmetic.
while (rest < dist
&& delta - rest >= ten_k
&& (rest + ten_k < dist || dist - rest > rest + ten_k - dist))
{
JSON_ASSERT(buf[len - 1] != '0');
buf[len - 1]--;
rest += ten_k;
}
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long):
pushq %rax
testl %esi, %esi
jle 0x7bc74
cmpq %rcx, %rdx
ja 0x7bc90
movq %rcx, %r10
subq %r8, %r10
jb 0x7bcac
testq %r9, %r9
je 0x7bcc8
movq %rdx, %rax
subq %r8, %rax
setbe %r11b
cmpq %r9, %r10
setb %r10b
orb %r11b, %r10b
jne 0x7bc51
movl %esi, %esi
addq %r9, %r8
subq %r8, %rcx
movq %rdx, %r10
negq %r10
cmpq %rdx, %r8
jb 0x7bc27
leaq (%r10,%r8), %r11
cmpq %r11, %rax
jbe 0x7bc51
movb -0x1(%rdi,%rsi), %r11b
cmpb $0x30, %r11b
je 0x7bc53
decb %r11b
movb %r11b, -0x1(%rdi,%rsi)
subq %r9, %rcx
setb %r11b
cmpq %rdx, %r8
jae 0x7bc51
subq %r9, %rax
addq %r9, %r8
testb %r11b, %r11b
je 0x7bc19
popq %rax
retq
leaq 0x2e1ad(%rip), %rdi # 0xa9e07
leaq 0x2b62b(%rip), %rdx # 0xa728c
leaq 0x30f9a(%rip), %rcx # 0xacc02
movl $0x444d, %esi # imm = 0x444D
xorl %eax, %eax
callq 0x18ad0
leaq 0x2e18c(%rip), %rdi # 0xa9e07
leaq 0x2b60a(%rip), %rdx # 0xa728c
leaq 0x30f4a(%rip), %rcx # 0xacbd3
movl $0x4431, %esi # imm = 0x4431
jmp 0x7bc6d
leaq 0x2e170(%rip), %rdi # 0xa9e07
leaq 0x2b5ee(%rip), %rdx # 0xa728c
leaq 0x30f37(%rip), %rcx # 0xacbdc
movl $0x4432, %esi # imm = 0x4432
jmp 0x7bc6d
leaq 0x2e154(%rip), %rdi # 0xa9e07
leaq 0x2b5d2(%rip), %rdx # 0xa728c
leaq 0x30f29(%rip), %rcx # 0xacbea
movl $0x4433, %esi # imm = 0x4433
jmp 0x7bc6d
leaq 0x2e138(%rip), %rdi # 0xa9e07
leaq 0x2b5b6(%rip), %rdx # 0xa728c
leaq 0x30f1b(%rip), %rcx # 0xacbf8
movl $0x4434, %esi # imm = 0x4434
jmp 0x7bc6d
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm:
push rax
test esi, esi
jle loc_7BC74
cmp rdx, rcx
ja loc_7BC90
mov r10, rcx
sub r10, r8
jb loc_7BCAC
test r9, r9
jz loc_7BCC8
mov rax, rdx
sub rax, r8
setbe r11b
cmp r10, r9
setb r10b
or r10b, r11b
jnz short loc_7BC51
mov esi, esi
add r8, r9
sub rcx, r8
mov r10, rdx
neg r10
loc_7BC19:
cmp r8, rdx
jb short loc_7BC27
lea r11, [r10+r8]
cmp rax, r11
jbe short loc_7BC51
loc_7BC27:
mov r11b, [rdi+rsi-1]
cmp r11b, 30h ; '0'
jz short loc_7BC53
dec r11b
mov [rdi+rsi-1], r11b
sub rcx, r9
setb r11b
cmp r8, rdx
jnb short loc_7BC51
sub rax, r9
add r8, r9
test r11b, r11b
jz short loc_7BC19
loc_7BC51:
pop rax
retn
loc_7BC53:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufLen10; "buf[len - 1] != '0'"
mov esi, 444Dh
loc_7BC6D:
xor eax, eax
call _ggml_abort
loc_7BC74:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aLen1; "len >= 1"
mov esi, 4431h
jmp short loc_7BC6D
loc_7BC90:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDistDelta; "dist <= delta"
mov esi, 4432h
jmp short loc_7BC6D
loc_7BCAC:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRestDelta; "rest <= delta"
mov esi, 4433h
jmp short loc_7BC6D
loc_7BCC8:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTenK0; "ten_k > 0"
mov esi, 4434h
jmp short loc_7BC6D
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm0,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2,
unsigned long long a3,
unsigned long long a4,
unsigned long long a5,
unsigned long long a6)
{
unsigned long long v6; // rax
unsigned long long v7; // r8
unsigned long long v8; // rcx
char v9; // r11
bool v10; // cf
if ( (int)a2 <= 0 )
goto LABEL_14;
if ( a3 > a4 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17458LL,
"GGML_ASSERT(%s) failed",
"dist <= delta");
goto LABEL_14;
}
if ( a4 < a5 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17459LL,
"GGML_ASSERT(%s) failed",
"rest <= delta");
goto LABEL_14;
}
if ( !a6 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17460LL,
"GGML_ASSERT(%s) failed",
"ten_k > 0");
goto LABEL_14;
}
v6 = a3 - a5;
if ( a3 > a5 && a4 - a5 >= a6 )
{
v7 = a6 + a5;
v8 = a4 - v7;
while ( 1 )
{
if ( v7 >= a3 && v6 <= v7 - a3 )
return;
v9 = *((_BYTE *)this + (unsigned int)a2 - 1);
if ( v9 == 48 )
break;
*((_BYTE *)this + (unsigned int)a2 - 1) = v9 - 1;
v10 = v8 < a6;
v8 -= a6;
if ( v7 < a3 )
{
v6 -= a6;
v7 += a6;
if ( !v10 )
continue;
}
return;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17485LL,
"GGML_ASSERT(%s) failed",
"buf[len - 1] != '0'");
while ( 1 )
LABEL_14:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17457LL,
"GGML_ASSERT(%s) failed",
"len >= 1");
}
}
|
grisu2_round:
PUSH RAX
TEST ESI,ESI
JLE 0x0017bc74
CMP RDX,RCX
JA 0x0017bc90
MOV R10,RCX
SUB R10,R8
JC 0x0017bcac
TEST R9,R9
JZ 0x0017bcc8
MOV RAX,RDX
SUB RAX,R8
SETBE R11B
CMP R10,R9
SETC R10B
OR R10B,R11B
JNZ 0x0017bc51
MOV ESI,ESI
ADD R8,R9
SUB RCX,R8
MOV R10,RDX
NEG R10
LAB_0017bc19:
CMP R8,RDX
JC 0x0017bc27
LEA R11,[R10 + R8*0x1]
CMP RAX,R11
JBE 0x0017bc51
LAB_0017bc27:
MOV R11B,byte ptr [RDI + RSI*0x1 + -0x1]
CMP R11B,0x30
JZ 0x0017bc53
DEC R11B
MOV byte ptr [RDI + RSI*0x1 + -0x1],R11B
SUB RCX,R9
SETC R11B
CMP R8,RDX
JNC 0x0017bc51
SUB RAX,R9
ADD R8,R9
TEST R11B,R11B
JZ 0x0017bc19
LAB_0017bc51:
POP RAX
RET
LAB_0017bc53:
LEA RDI,[0x1a9e07]
LEA RDX,[0x1a728c]
LEA RCX,[0x1acc02]
MOV ESI,0x444d
LAB_0017bc6d:
XOR EAX,EAX
CALL 0x00118ad0
LAB_0017bc74:
LEA RDI,[0x1a9e07]
LEA RDX,[0x1a728c]
LEA RCX,[0x1acbd3]
MOV ESI,0x4431
JMP 0x0017bc6d
LAB_0017bc90:
LEA RDI,[0x1a9e07]
LEA RDX,[0x1a728c]
LEA RCX,[0x1acbdc]
MOV ESI,0x4432
JMP 0x0017bc6d
LAB_0017bcac:
LEA RDI,[0x1a9e07]
LEA RDX,[0x1a728c]
LEA RCX,[0x1acbea]
MOV ESI,0x4433
JMP 0x0017bc6d
LAB_0017bcc8:
LEA RDI,[0x1a9e07]
LEA RDX,[0x1a728c]
LEA RCX,[0x1acbf8]
MOV ESI,0x4434
JMP 0x0017bc6d
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned
long, unsigned long, unsigned long) */
int8
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round
(char *param_1,int param_2,ulong param_3,ulong param_4,ulong param_5,ulong param_6)
{
int8 in_RAX;
ulong uVar1;
ulong uVar2;
char *pcVar3;
int8 uVar4;
ulong uVar5;
bool bVar6;
if (param_2 < 1) {
pcVar3 = "len >= 1";
uVar4 = 0x4431;
}
else if (param_4 < param_3) {
pcVar3 = "dist <= delta";
uVar4 = 0x4432;
}
else if (param_4 < param_5) {
pcVar3 = "rest <= delta";
uVar4 = 0x4433;
}
else {
if (param_6 != 0) {
uVar1 = param_3 - param_5;
if (param_6 <= param_4 - param_5 && (param_5 <= param_3 && uVar1 != 0)) {
uVar5 = param_5 + param_6;
uVar2 = param_4 - uVar5;
do {
if ((param_3 <= uVar5) && (uVar1 <= uVar5 - param_3)) {
return in_RAX;
}
if (param_1[(ulong)(uint)param_2 - 1] == '0') {
pcVar3 = "buf[len - 1] != \'0\'";
uVar4 = 0x444d;
goto LAB_0017bc6d;
}
param_1[(ulong)(uint)param_2 - 1] = param_1[(ulong)(uint)param_2 - 1] + -1;
bVar6 = param_6 <= uVar2;
uVar2 = uVar2 - param_6;
if (param_3 <= uVar5) {
return in_RAX;
}
uVar1 = uVar1 - param_6;
uVar5 = uVar5 + param_6;
} while (bVar6);
}
return in_RAX;
}
pcVar3 = "ten_k > 0";
uVar4 = 0x4434;
}
LAB_0017bc6d:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar4,
"GGML_ASSERT(%s) failed",pcVar3);
}
|
|
12,430
|
my_thread_global_init
|
eloqsql/mysys/my_thr_init.c
|
my_bool my_thread_global_init(void)
{
int pth_ret;
/* Normally this should never be called twice */
DBUG_ASSERT(my_thread_global_init_done == 0);
if (my_thread_global_init_done)
return 0;
my_thread_global_init_done= 1;
/*
THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even
after my_thread_global_end() is called.
my_thr_key_mysys_exist is used to protect against application like QT
that calls my_thread_global_init() + my_thread_global_end() multiple times
without calling my_init() + my_end().
*/
if (!my_thr_key_mysys_exists &&
(pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0)
{
fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret);
return 1;
}
my_thr_key_mysys_exists= 1;
/* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */
my_thread_init_internal_mutex();
if (my_thread_init())
return 1;
my_thread_init_common_mutex();
return 0;
}
|
O3
|
c
|
my_thread_global_init:
cmpb $0x0, 0xb65ebd(%rip) # 0xc073a0
je 0xa14e8
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movb $0x1, 0xb65eab(%rip) # 0xc073a0
leaq 0xb65be0(%rip), %rbx # 0xc070dc
cmpb $0x0, (%rbx)
je 0xa151f
movb $0x1, (%rbx)
callq 0xa1337
callq 0xa1559
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0xa1552
callq 0xa11aa
xorl %eax, %eax
jmp 0xa1552
leaq 0xb65e7e(%rip), %rdi # 0xc073a4
xorl %esi, %esi
callq 0x296e0
testl %eax, %eax
je 0xa1501
movq 0x2e1a78(%rip), %rcx # 0x382fb0
movq (%rcx), %rdi
leaq 0x3a09e(%rip), %rdx # 0xdb5e0
movl $0x1, %esi
movl %eax, %ecx
xorl %eax, %eax
callq 0x29200
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
my_thread_global_init:
cmp cs:my_thread_global_init_done, 0
jz short loc_A14E8
xor eax, eax
retn
loc_A14E8:
push rbp
mov rbp, rsp
push rbx
push rax
mov cs:my_thread_global_init_done, 1
lea rbx, my_thr_key_mysys_exists
cmp byte ptr [rbx], 0
jz short loc_A151F
loc_A1501:
mov byte ptr [rbx], 1
call my_thread_init_internal_mutex
call my_thread_init
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_A1552
call my_thread_init_common_mutex
xor eax, eax
jmp short loc_A1552
loc_A151F:
lea rdi, THR_KEY_mysys
xor esi, esi
call _pthread_key_create
test eax, eax
jz short loc_A1501
mov rcx, cs:stderr_ptr
mov rdi, [rcx]
lea rdx, aCanTInitialize; "Can't initialize threads: error %d\n"
mov esi, 1
mov ecx, eax
xor eax, eax
call ___fprintf_chk
mov al, 1
loc_A1552:
add rsp, 8
pop rbx
pop rbp
retn
|
char my_thread_global_init(void *a1)
{
char result; // al
char v2; // cl
int v3; // eax
if ( my_thread_global_init_done )
return 0;
my_thread_global_init_done = 1;
if ( my_thr_key_mysys_exists || (a1 = &THR_KEY_mysys, (v3 = pthread_key_create(&THR_KEY_mysys, 0LL)) == 0) )
{
my_thr_key_mysys_exists = 1;
my_thread_init_internal_mutex();
v2 = my_thread_init(a1);
result = 1;
if ( !v2 )
{
my_thread_init_common_mutex();
return 0;
}
}
else
{
__fprintf_chk(stderr, 1LL, "Can't initialize threads: error %d\n", v3);
return 1;
}
return result;
}
|
my_thread_global_init:
CMP byte ptr [0x00d073a0],0x0
JZ 0x001a14e8
XOR EAX,EAX
RET
LAB_001a14e8:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV byte ptr [0x00d073a0],0x1
LEA RBX,[0xd070dc]
CMP byte ptr [RBX],0x0
JZ 0x001a151f
LAB_001a1501:
MOV byte ptr [RBX],0x1
CALL 0x001a1337
CALL 0x001a1559
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x001a1552
CALL 0x001a11aa
XOR EAX,EAX
JMP 0x001a1552
LAB_001a151f:
LEA RDI,[0xd073a4]
XOR ESI,ESI
CALL 0x001296e0
TEST EAX,EAX
JZ 0x001a1501
MOV RCX,qword ptr [0x00482fb0]
MOV RDI,qword ptr [RCX]
LEA RDX,[0x1db5e0]
MOV ESI,0x1
MOV ECX,EAX
XOR EAX,EAX
CALL 0x00129200
MOV AL,0x1
LAB_001a1552:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
bool my_thread_global_init(void)
{
char cVar1;
int iVar2;
if (my_thread_global_init_done != '\0') {
return false;
}
my_thread_global_init_done = 1;
if ((my_thr_key_mysys_exists == '\0') &&
(iVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), iVar2 != 0)) {
__fprintf_chk(*(int8 *)PTR_stderr_00482fb0,1,"Can\'t initialize threads: error %d\n",iVar2
);
return true;
}
my_thr_key_mysys_exists = 1;
my_thread_init_internal_mutex();
cVar1 = my_thread_init();
if (cVar1 == '\0') {
my_thread_init_common_mutex();
}
return cVar1 != '\0';
}
|
|
12,431
|
mysql_list_fields_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_list_fields_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_list_fields,
(parms->mysql, parms->table, parms->wild),
parms->mysql,
MYSQL_RES *,
r_ptr)
}
|
O0
|
c
|
mysql_list_fields_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x51d60
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mysql_list_fields_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov rax, [rbp+var_10]
mov rdx, [rax+10h]
call mysql_list_fields
mov [rbp+var_18], rax
mov rcx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
|
long long mysql_list_fields_start_internal(long long a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
*(_QWORD *)(v2 + 8) = mysql_list_fields(*(_QWORD *)a1, *(const char **)(a1 + 8), *(const char **)(a1 + 16));
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_list_fields_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x10]
CALL 0x00151d60
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_list_fields_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_list_fields(*param_1,param_1[1],param_1[2]);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
12,432
|
getopt_double
|
eloqsql/mysys/my_getopt.c
|
static double getopt_double(char *arg, const struct my_option *optp, int *err)
{
double num;
int error;
char *end= arg + 1000; /* Big enough as *arg is \0 terminated */
num= my_strtod(arg, &end, &error);
if (end[0] != 0 || error)
{
my_getopt_error_reporter(ERROR_LEVEL,
"Invalid decimal value for option '%s'\n", optp->name);
*err= EXIT_ARGUMENT_INVALID;
return 0.0;
}
return getopt_double_limit_value(num, optp, NULL);
}
|
O0
|
c
|
getopt_double:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x3e8, %rax # imm = 0x3E8
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
callq 0x76b40
movsd %xmm0, -0x28(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x2d33a
cmpl $0x0, -0x2c(%rbp)
je 0x2d36c
leaq 0x1a81bf(%rip), %rax # 0x1d5500
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rdx
xorl %edi, %edi
leaq 0x52d7c(%rip), %rsi # 0x800d0
movb $0x0, %al
callq *%rcx
movq -0x20(%rbp), %rax
movl $0xd, (%rax)
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x2d383
movsd -0x28(%rbp), %xmm0
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2c210
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nop
|
getopt_double:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
add rax, 3E8h
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_38]
lea rdx, [rbp+var_2C]
call my_strtod
movsd [rbp+var_28], xmm0
mov rax, [rbp+var_38]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_2D33A
cmp [rbp+var_2C], 0
jz short loc_2D36C
loc_2D33A:
lea rax, my_getopt_error_reporter
mov rcx, [rax]
mov rax, [rbp+var_18]
mov rdx, [rax]
xor edi, edi
lea rsi, aInvalidDecimal; "Invalid decimal value for option '%s'\n"
mov al, 0
call rcx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0Dh
xorps xmm0, xmm0
movsd [rbp+var_8], xmm0
jmp short loc_2D383
loc_2D36C:
movsd xmm0, [rbp+var_28]
mov rdi, [rbp+var_18]
xor eax, eax
mov esi, eax
call getopt_double_limit_value
movsd [rbp+var_8], xmm0
loc_2D383:
movsd xmm0, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
double getopt_double(long long a1, const char **a2, _DWORD *a3)
{
_BYTE *v4; // [rsp+8h] [rbp-38h] BYREF
int v5; // [rsp+14h] [rbp-2Ch] BYREF
double v6; // [rsp+18h] [rbp-28h]
_DWORD *v7; // [rsp+20h] [rbp-20h]
const char **v8; // [rsp+28h] [rbp-18h]
long long v9; // [rsp+30h] [rbp-10h]
v9 = a1;
v8 = a2;
v7 = a3;
v4 = (_BYTE *)(a1 + 1000);
v6 = my_strtod(a1, &v4, &v5);
if ( !*v4 && !v5 )
return getopt_double_limit_value(v8, 0LL, v6);
my_getopt_error_reporter(0, (long long)"Invalid decimal value for option '%s'\n", *v8);
*v7 = 13;
return 0.0;
}
|
getopt_double:
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 RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3e8
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x38]
LEA RDX,[RBP + -0x2c]
CALL 0x00176b40
MOVSD qword ptr [RBP + -0x28],XMM0
MOV RAX,qword ptr [RBP + -0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x0012d33a
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x0012d36c
LAB_0012d33a:
LEA RAX,[0x2d5500]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX]
XOR EDI,EDI
LEA RSI,[0x1800d0]
MOV AL,0x0
CALL RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0xd
XORPS XMM0,XMM0
MOVSD qword ptr [RBP + -0x8],XMM0
JMP 0x0012d383
LAB_0012d36c:
MOVSD XMM0,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RBP + -0x18]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0012c210
MOVSD qword ptr [RBP + -0x8],XMM0
LAB_0012d383:
MOVSD XMM0,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 getopt_double(long param_1,int8 *param_2,int4 *param_3)
{
char *local_40;
int local_34;
int8 local_30;
int4 *local_28;
int8 *local_20;
long local_18;
int8 local_10;
local_40 = (char *)(param_1 + 1000);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_30 = my_strtod(param_1,&local_40,&local_34);
if ((*local_40 == '\0') && (local_34 == 0)) {
local_10 = getopt_double_limit_value(local_30,local_20,0);
}
else {
(*(code *)my_getopt_error_reporter)(0,"Invalid decimal value for option \'%s\'\n",*local_20);
*local_28 = 0xd;
local_10 = 0;
}
return local_10;
}
|
|
12,433
|
async1
|
eloqsql/libmariadb/unittest/libmariadb/async.c
|
static int async1(MYSQL *unused __attribute__((unused)))
{
int err= 0, rc;
MYSQL mysql, *ret;
MYSQL_RES *res;
MYSQL_ROW row;
int status;
uint default_timeout;
int i;
if (skip_async)
return SKIP;
for (i=0; i < 100; i++)
{
mysql_init(&mysql);
rc= mysql_options(&mysql, MYSQL_OPT_NONBLOCK, 0);
check_mysql_rc(rc, (MYSQL *)&mysql);
/* set timeouts to 300 microseconds */
default_timeout= 3;
mysql_options(&mysql, MYSQL_OPT_READ_TIMEOUT, &default_timeout);
mysql_options(&mysql, MYSQL_OPT_CONNECT_TIMEOUT, &default_timeout);
mysql_options(&mysql, MYSQL_OPT_WRITE_TIMEOUT, &default_timeout);
mysql_options(&mysql, MYSQL_READ_DEFAULT_GROUP, "myapp");
if (force_tls)
mysql_ssl_set(&mysql, NULL, NULL, NULL, NULL,NULL);
/* Returns 0 when done, else flag for what to wait for when need to block. */
status= mysql_real_connect_start(&ret, &mysql, hostname, username, password, schema, port, socketname, 0);
while (status)
{
status= wait_for_mysql(&mysql, status);
status= mysql_real_connect_cont(&ret, &mysql, status);
}
if (!ret)
{
diag("Error: %s", mysql_error(&mysql));
FAIL_IF(!ret, "Failed to mysql_real_connect()");
}
if (force_tls && !mysql_get_ssl_cipher(&mysql))
{
diag("Error: No tls connection");
return FAIL;
}
status= mysql_real_query_start(&err, &mysql, SL("SHOW STATUS"));
while (status)
{
status= wait_for_mysql(&mysql, status);
status= mysql_real_query_cont(&err, &mysql, status);
}
FAIL_IF(err, "mysql_real_query() returns error");
/* This method cannot block. */
res= mysql_use_result(&mysql);
FAIL_IF(!res, "mysql_use_result() returns error");
for (;;)
{
status= mysql_fetch_row_start(&row, res);
while (status)
{
status= wait_for_mysql(&mysql, status);
status= mysql_fetch_row_cont(&row, res, status);
}
if (!row)
break;
}
FAIL_IF(mysql_errno(&mysql), "Got error while retrieving rows");
mysql_free_result(res);
/*
mysql_close() sends a COM_QUIT packet, and so in principle could block
waiting for the socket to accept the data.
In practise, for many applications it will probably be fine to use the
blocking mysql_close().
*/
status= mysql_close_start(&mysql);
while (status)
{
status= wait_for_mysql(&mysql, status);
status= mysql_close_cont(&mysql, status);
}
}
return OK;
}
|
O3
|
c
|
async1:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x528, %rsp # imm = 0x528
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x52c(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpb $0x0, 0x34586(%rip) # 0x48f31
jne 0x14cb1
leaq -0x528(%rbp), %rbx
leaq -0x540(%rbp), %r12
leaq -0x52c(%rbp), %r13
leaq -0x548(%rbp), %r15
xorl %eax, %eax
movl %eax, -0x530(%rbp)
movq %rbx, %rdi
callq 0x18411
movq %rbx, %rdi
movl $0x1770, %esi # imm = 0x1770
xorl %edx, %edx
callq 0x1c67d
testl %eax, %eax
jne 0x14be2
movl $0x3, -0x534(%rbp)
movq %rbx, %rdi
movl $0xb, %esi
leaq -0x534(%rbp), %r14
movq %r14, %rdx
callq 0x1c67d
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1c67d
movq %rbx, %rdi
movl $0xc, %esi
movq %r14, %rdx
callq 0x1c67d
movq %rbx, %rdi
movl $0x5, %esi
leaq 0x1fcab(%rip), %rdx # 0x346ec
callq 0x1c67d
cmpl $0x0, 0x344d3(%rip) # 0x48f20
je 0x14a63
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x18577
movq 0x34486(%rip), %rdx # 0x48ef0
movq 0x34487(%rip), %rcx # 0x48ef8
movq 0x34488(%rip), %r8 # 0x48f00
movq 0x34489(%rip), %r9 # 0x48f08
movl 0x3448b(%rip), %eax # 0x48f10
subq $0x8, %rsp
movq %r12, %rdi
movq %rbx, %rsi
pushq $0x0
pushq 0x34481(%rip) # 0x48f18
pushq %rax
callq 0x28cfb
addq $0x20, %rsp
testl %eax, %eax
je 0x14abe
movq %rbx, %rdi
movl %eax, %esi
callq 0x14e90
movq %r12, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x28e2f
jmp 0x14aa1
cmpq $0x0, -0x540(%rbp)
jne 0x14aef
movq %rbx, %rdi
callq 0x1c76e
leaq 0x1fc1b(%rip), %rdi # 0x346f2
movq %rax, %rsi
xorl %eax, %eax
callq 0x14feb
cmpq $0x0, -0x540(%rbp)
je 0x14c8b
cmpl $0x0, 0x3442a(%rip) # 0x48f20
je 0x14b09
movq %rbx, %rdi
callq 0x1863c
testq %rax, %rax
je 0x14c7b
movl $0xb, %ecx
movq %r13, %rdi
movq %rbx, %rsi
leaq 0x1fc19(%rip), %rdx # 0x34734
callq 0x28f44
testl %eax, %eax
je 0x14b3d
movq %rbx, %rdi
movl %eax, %esi
callq 0x14e90
movq %r13, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x29041
jmp 0x14b20
cmpl $0x0, -0x52c(%rbp)
jne 0x14c27
movq %rbx, %rdi
callq 0x19b24
movq %rax, %r14
testq %rax, %rax
je 0x14c43
movq %r15, %rdi
movq %r14, %rsi
callq 0x29159
testl %eax, %eax
je 0x14b86
movq %rbx, %rdi
movl %eax, %esi
callq 0x14e90
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x29263
jmp 0x14b69
cmpq $0x0, -0x548(%rbp)
jne 0x14b5e
movq %rbx, %rdi
callq 0x1c759
testl %eax, %eax
jne 0x14c5f
movq %r14, %rdi
callq 0x163a2
movq %rbx, %rdi
callq 0x29f7e
testl %eax, %eax
je 0x14bca
movq %rbx, %rdi
movl %eax, %esi
callq 0x14e90
movq %rbx, %rdi
movl %eax, %esi
callq 0x29faf
jmp 0x14bb0
movl -0x530(%rbp), %eax
incl %eax
cmpl $0x64, %eax
jne 0x149cf
xorl %eax, %eax
jmp 0x14cb1
movl %eax, %r14d
leaq -0x528(%rbp), %rbx
movq %rbx, %rdi
callq 0x1c76e
movq %rax, %r15
movq %rbx, %rdi
callq 0x1c759
leaq 0x1f547(%rip), %rdi # 0x3414d
leaq 0x1fa8f(%rip), %r8 # 0x3469c
movl %r14d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x97, %r9d
xorl %eax, %eax
callq 0x14feb
jmp 0x14cac
leaq 0x1f3da(%rip), %rdi # 0x34008
leaq 0x1fb0b(%rip), %rsi # 0x34740
leaq 0x1fa60(%rip), %rdx # 0x3469c
movl $0xbb, %ecx
jmp 0x14ca5
leaq 0x1f3be(%rip), %rdi # 0x34008
leaq 0x1fb10(%rip), %rsi # 0x34761
leaq 0x1fa44(%rip), %rdx # 0x3469c
movl $0xbf, %ecx
jmp 0x14ca5
leaq 0x1f3a2(%rip), %rdi # 0x34008
leaq 0x1fb15(%rip), %rsi # 0x34782
leaq 0x1fa28(%rip), %rdx # 0x3469c
movl $0xcc, %ecx
jmp 0x14ca5
leaq 0x1fa99(%rip), %rdi # 0x3471b
xorl %eax, %eax
callq 0x14feb
jmp 0x14cac
leaq 0x1f376(%rip), %rdi # 0x34008
leaq 0x1fa63(%rip), %rsi # 0x346fc
leaq 0x1f9fc(%rip), %rdx # 0x3469c
movl $0xac, %ecx
xorl %eax, %eax
callq 0x14feb
movl $0x1, %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x14cd2
addq $0x528, %rsp # imm = 0x528
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x13500
|
async1:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 528h
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_52C], 0
mov eax, 0FFFFFFFFh
cmp cs:skip_async, 0
jnz loc_14CB1
lea rbx, [rbp+var_528]
lea r12, [rbp+var_540]
lea r13, [rbp+var_52C]
lea r15, [rbp+var_548]
xor eax, eax
loc_149CF:
mov [rbp+var_530], eax
mov rdi, rbx
call mysql_init
mov rdi, rbx
mov esi, 1770h
xor edx, edx
call mysql_options
test eax, eax
jnz loc_14BE2
mov [rbp+var_534], 3
mov rdi, rbx
mov esi, 0Bh
lea r14, [rbp+var_534]
mov rdx, r14
call mysql_options
mov rdi, rbx
xor esi, esi
mov rdx, r14
call mysql_options
mov rdi, rbx
mov esi, 0Ch
mov rdx, r14
call mysql_options
mov rdi, rbx
mov esi, 5
lea rdx, aMyapp; "myapp"
call mysql_options
cmp cs:force_tls, 0
jz short loc_14A63
mov rdi, rbx
xor esi, esi
xor edx, edx
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call mysql_ssl_set
loc_14A63:
mov rdx, cs:hostname
mov rcx, cs:username
mov r8, cs:password
mov r9, cs:schema
mov eax, cs:port
sub rsp, 8
mov rdi, r12
mov rsi, rbx
push 0
push cs:socketname
push rax
call mysql_real_connect_start
add rsp, 20h
loc_14AA1:
test eax, eax
jz short loc_14ABE
mov rdi, rbx
mov esi, eax
call wait_for_mysql
mov rdi, r12
mov rsi, rbx
mov edx, eax
call mysql_real_connect_cont
jmp short loc_14AA1
loc_14ABE:
cmp [rbp+var_540], 0
jnz short loc_14AEF
mov rdi, rbx
call mysql_error
lea rdi, aErrorS_0; "Error: %s"
mov rsi, rax
xor eax, eax
call diag
cmp [rbp+var_540], 0
jz loc_14C8B
loc_14AEF:
cmp cs:force_tls, 0
jz short loc_14B09
mov rdi, rbx
call mysql_get_ssl_cipher
test rax, rax
jz loc_14C7B
loc_14B09:
mov ecx, 0Bh
mov rdi, r13
mov rsi, rbx
lea rdx, aShowStatus; "SHOW STATUS"
call mysql_real_query_start
loc_14B20:
test eax, eax
jz short loc_14B3D
mov rdi, rbx
mov esi, eax
call wait_for_mysql
mov rdi, r13
mov rsi, rbx
mov edx, eax
call mysql_real_query_cont
jmp short loc_14B20
loc_14B3D:
cmp [rbp+var_52C], 0
jnz loc_14C27
mov rdi, rbx
call mysql_use_result
mov r14, rax
test rax, rax
jz loc_14C43
loc_14B5E:
mov rdi, r15
mov rsi, r14
call mysql_fetch_row_start
loc_14B69:
test eax, eax
jz short loc_14B86
mov rdi, rbx
mov esi, eax
call wait_for_mysql
mov rdi, r15
mov rsi, r14
mov edx, eax
call mysql_fetch_row_cont
jmp short loc_14B69
loc_14B86:
cmp [rbp+var_548], 0
jnz short loc_14B5E
mov rdi, rbx
call mysql_errno
test eax, eax
jnz loc_14C5F
mov rdi, r14
call mysql_free_result
mov rdi, rbx
call mysql_close_start
loc_14BB0:
test eax, eax
jz short loc_14BCA
mov rdi, rbx
mov esi, eax
call wait_for_mysql
mov rdi, rbx
mov esi, eax
call mysql_close_cont
jmp short loc_14BB0
loc_14BCA:
mov eax, [rbp+var_530]
inc eax
cmp eax, 64h ; 'd'
jnz loc_149CF
xor eax, eax
jmp loc_14CB1
loc_14BE2:
mov r14d, eax
lea rbx, [rbp+var_528]
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r14d
mov rdx, r15
mov ecx, eax
mov r9d, 97h
xor eax, eax
call diag
jmp loc_14CAC
loc_14C27:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aMysqlRealQuery; "mysql_real_query() returns error"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0BBh
jmp short loc_14CA5
loc_14C43:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aMysqlUseResult; "mysql_use_result() returns error"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0BFh
jmp short loc_14CA5
loc_14C5F:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aGotErrorWhileR; "Got error while retrieving rows"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0CCh
jmp short loc_14CA5
loc_14C7B:
lea rdi, aErrorNoTlsConn; "Error: No tls connection"
xor eax, eax
call diag
jmp short loc_14CAC
loc_14C8B:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aFailedToMysqlR; "Failed to mysql_real_connect()"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0ACh
loc_14CA5:
xor eax, eax
call diag
loc_14CAC:
mov eax, 1
loc_14CB1:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_14CD2
add rsp, 528h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_14CD2:
call ___stack_chk_fail
|
long long async1()
{
long long result; // rax
int v1; // eax
int v2; // eax
_BYTE *v3; // rsi
unsigned int i; // eax
unsigned int v5; // eax
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v10; // r8d
int v11; // r9d
int v12; // edx
int v13; // ecx
int v14; // r8d
int v15; // r9d
unsigned int j; // eax
unsigned int v17; // eax
long long v18; // r14
unsigned int k; // eax
unsigned int v20; // eax
unsigned int m; // eax
unsigned int v22; // eax
int v23; // r14d
int v24; // r15d
int v25; // eax
const char *v26; // rsi
int v27; // ecx
long long v28; // [rsp+8h] [rbp-548h] BYREF
long long v29; // [rsp+10h] [rbp-540h] BYREF
int v30; // [rsp+1Ch] [rbp-534h] BYREF
int v31; // [rsp+20h] [rbp-530h]
int v32; // [rsp+24h] [rbp-52Ch] BYREF
_BYTE v33[1272]; // [rsp+28h] [rbp-528h] BYREF
unsigned long long v34; // [rsp+520h] [rbp-30h]
v34 = __readfsqword(0x28u);
v32 = 0;
result = 0xFFFFFFFFLL;
if ( !skip_async )
{
v1 = 0;
while ( 1 )
{
v31 = v1;
mysql_init(v33);
v2 = mysql_options(v33, 6000LL, 0LL);
if ( v2 )
{
v23 = v2;
v24 = mysql_error(v33);
v25 = mysql_errno(v33);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v23,
v24,
v25,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/async.c",
151);
return 1LL;
}
v30 = 3;
mysql_options(v33, 11LL, &v30);
mysql_options(v33, 0LL, &v30);
mysql_options(v33, 12LL, &v30);
mysql_options(v33, 5LL, "myapp");
if ( force_tls )
mysql_ssl_set(v33, 0LL, 0LL, 0LL, 0LL, 0LL);
v3 = v33;
for ( i = mysql_real_connect_start(
(unsigned int)&v29,
(unsigned int)v33,
hostname,
username,
password,
schema,
port,
socketname,
0LL); i; i = mysql_real_connect_cont(&v29, v33, v5) )
{
v5 = wait_for_mysql(v33, i);
v3 = v33;
}
if ( !v29 )
{
LODWORD(v3) = mysql_error(v33);
diag((unsigned int)"Error: %s", (_DWORD)v3, v6, v7, v8, v9);
if ( !v29 )
break;
}
if ( force_tls && !mysql_get_ssl_cipher(v33) )
{
diag((unsigned int)"Error: No tls connection", (_DWORD)v3, v12, v13, v14, v15);
return 1LL;
}
for ( j = mysql_real_query_start(&v32, v33, "SHOW STATUS", 11LL); j; j = mysql_real_query_cont(&v32, v33, v17) )
v17 = wait_for_mysql(v33, j);
if ( v32 )
{
v26 = "mysql_real_query() returns error";
v27 = 187;
goto LABEL_34;
}
v18 = mysql_use_result(v33);
if ( !v18 )
{
v26 = "mysql_use_result() returns error";
v27 = 191;
goto LABEL_34;
}
do
{
for ( k = mysql_fetch_row_start(&v28, v18); k; k = mysql_fetch_row_cont(&v28, v18, v20) )
v20 = wait_for_mysql(v33, k);
}
while ( v28 );
if ( (unsigned int)mysql_errno(v33) )
{
v26 = "Got error while retrieving rows";
v27 = 204;
goto LABEL_34;
}
mysql_free_result(v18);
for ( m = mysql_close_start(v33); m; m = mysql_close_cont(v33, v22) )
v22 = wait_for_mysql(v33, m);
v1 = v31 + 1;
if ( v31 == 99 )
return 0LL;
}
v26 = "Failed to mysql_real_connect()";
v27 = 172;
LABEL_34:
diag(
(unsigned int)"Error: %s (%s: %d)",
(_DWORD)v26,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/async.c",
v27,
v10,
v11);
return 1LL;
}
return result;
}
|
async1:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x528
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV dword ptr [RBP + -0x52c],0x0
MOV EAX,0xffffffff
CMP byte ptr [0x00148f31],0x0
JNZ 0x00114cb1
LEA RBX,[RBP + -0x528]
LEA R12,[RBP + -0x540]
LEA R13,[RBP + -0x52c]
LEA R15,[RBP + -0x548]
XOR EAX,EAX
LAB_001149cf:
MOV dword ptr [RBP + -0x530],EAX
MOV RDI,RBX
CALL 0x00118411
MOV RDI,RBX
MOV ESI,0x1770
XOR EDX,EDX
CALL 0x0011c67d
TEST EAX,EAX
JNZ 0x00114be2
MOV dword ptr [RBP + -0x534],0x3
MOV RDI,RBX
MOV ESI,0xb
LEA R14,[RBP + -0x534]
MOV RDX,R14
CALL 0x0011c67d
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R14
CALL 0x0011c67d
MOV RDI,RBX
MOV ESI,0xc
MOV RDX,R14
CALL 0x0011c67d
MOV RDI,RBX
MOV ESI,0x5
LEA RDX,[0x1346ec]
CALL 0x0011c67d
CMP dword ptr [0x00148f20],0x0
JZ 0x00114a63
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00118577
LAB_00114a63:
MOV RDX,qword ptr [0x00148ef0]
MOV RCX,qword ptr [0x00148ef8]
MOV R8,qword ptr [0x00148f00]
MOV R9,qword ptr [0x00148f08]
MOV EAX,dword ptr [0x00148f10]
SUB RSP,0x8
MOV RDI,R12
MOV RSI,RBX
PUSH 0x0
PUSH qword ptr [0x00148f18]
PUSH RAX
CALL 0x00128cfb
ADD RSP,0x20
LAB_00114aa1:
TEST EAX,EAX
JZ 0x00114abe
MOV RDI,RBX
MOV ESI,EAX
CALL 0x00114e90
MOV RDI,R12
MOV RSI,RBX
MOV EDX,EAX
CALL 0x00128e2f
JMP 0x00114aa1
LAB_00114abe:
CMP qword ptr [RBP + -0x540],0x0
JNZ 0x00114aef
MOV RDI,RBX
CALL 0x0011c76e
LEA RDI,[0x1346f2]
MOV RSI,RAX
XOR EAX,EAX
CALL 0x00114feb
CMP qword ptr [RBP + -0x540],0x0
JZ 0x00114c8b
LAB_00114aef:
CMP dword ptr [0x00148f20],0x0
JZ 0x00114b09
MOV RDI,RBX
CALL 0x0011863c
TEST RAX,RAX
JZ 0x00114c7b
LAB_00114b09:
MOV ECX,0xb
MOV RDI,R13
MOV RSI,RBX
LEA RDX,[0x134734]
CALL 0x00128f44
LAB_00114b20:
TEST EAX,EAX
JZ 0x00114b3d
MOV RDI,RBX
MOV ESI,EAX
CALL 0x00114e90
MOV RDI,R13
MOV RSI,RBX
MOV EDX,EAX
CALL 0x00129041
JMP 0x00114b20
LAB_00114b3d:
CMP dword ptr [RBP + -0x52c],0x0
JNZ 0x00114c27
MOV RDI,RBX
CALL 0x00119b24
MOV R14,RAX
TEST RAX,RAX
JZ 0x00114c43
LAB_00114b5e:
MOV RDI,R15
MOV RSI,R14
CALL 0x00129159
LAB_00114b69:
TEST EAX,EAX
JZ 0x00114b86
MOV RDI,RBX
MOV ESI,EAX
CALL 0x00114e90
MOV RDI,R15
MOV RSI,R14
MOV EDX,EAX
CALL 0x00129263
JMP 0x00114b69
LAB_00114b86:
CMP qword ptr [RBP + -0x548],0x0
JNZ 0x00114b5e
MOV RDI,RBX
CALL 0x0011c759
TEST EAX,EAX
JNZ 0x00114c5f
MOV RDI,R14
CALL 0x001163a2
MOV RDI,RBX
CALL 0x00129f7e
LAB_00114bb0:
TEST EAX,EAX
JZ 0x00114bca
MOV RDI,RBX
MOV ESI,EAX
CALL 0x00114e90
MOV RDI,RBX
MOV ESI,EAX
CALL 0x00129faf
JMP 0x00114bb0
LAB_00114bca:
MOV EAX,dword ptr [RBP + -0x530]
INC EAX
CMP EAX,0x64
JNZ 0x001149cf
XOR EAX,EAX
JMP 0x00114cb1
LAB_00114be2:
MOV R14D,EAX
LEA RBX,[RBP + -0x528]
MOV RDI,RBX
CALL 0x0011c76e
MOV R15,RAX
MOV RDI,RBX
CALL 0x0011c759
LEA RDI,[0x13414d]
LEA R8,[0x13469c]
MOV ESI,R14D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x97
XOR EAX,EAX
CALL 0x00114feb
JMP 0x00114cac
LAB_00114c27:
LEA RDI,[0x134008]
LEA RSI,[0x134740]
LEA RDX,[0x13469c]
MOV ECX,0xbb
JMP 0x00114ca5
LAB_00114c43:
LEA RDI,[0x134008]
LEA RSI,[0x134761]
LEA RDX,[0x13469c]
MOV ECX,0xbf
JMP 0x00114ca5
LAB_00114c5f:
LEA RDI,[0x134008]
LEA RSI,[0x134782]
LEA RDX,[0x13469c]
MOV ECX,0xcc
JMP 0x00114ca5
LAB_00114c7b:
LEA RDI,[0x13471b]
XOR EAX,EAX
CALL 0x00114feb
JMP 0x00114cac
LAB_00114c8b:
LEA RDI,[0x134008]
LEA RSI,[0x1346fc]
LEA RDX,[0x13469c]
MOV ECX,0xac
LAB_00114ca5:
XOR EAX,EAX
CALL 0x00114feb
LAB_00114cac:
MOV EAX,0x1
LAB_00114cb1:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00114cd2
ADD RSP,0x528
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00114cd2:
CALL 0x00113500
|
int8 async1(void)
{
int iVar1;
int4 uVar2;
int8 uVar3;
long lVar4;
char *pcVar5;
long in_FS_OFFSET;
long local_550;
long local_548;
int4 local_53c;
int local_538;
int local_534;
int1 local_530 [1272];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_534 = 0;
uVar3 = 0xffffffff;
if (skip_async == '\0') {
iVar1 = 0;
do {
local_538 = iVar1;
mysql_init(local_530);
iVar1 = mysql_options(local_530,6000,0);
if (iVar1 != 0) {
uVar3 = mysql_error(local_530);
uVar2 = mysql_errno(local_530);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/async.c",0x97)
;
LAB_00114cac:
uVar3 = 1;
goto LAB_00114cb1;
}
local_53c = 3;
mysql_options(local_530,0xb,&local_53c);
mysql_options(local_530,0,&local_53c);
mysql_options(local_530,0xc,&local_53c);
mysql_options(local_530,5,"myapp");
if (force_tls != 0) {
mysql_ssl_set(local_530,0,0,0,0,0);
}
iVar1 = mysql_real_connect_start
(&local_548,local_530,hostname,username,password,schema,port,socketname,0);
while (iVar1 != 0) {
uVar2 = wait_for_mysql(local_530,iVar1);
iVar1 = mysql_real_connect_cont(&local_548,local_530,uVar2);
}
if (local_548 == 0) {
uVar3 = mysql_error(local_530);
diag("Error: %s",uVar3);
if (local_548 != 0) goto LAB_00114aef;
pcVar5 = "Failed to mysql_real_connect()";
uVar3 = 0xac;
LAB_00114ca5:
diag("Error: %s (%s: %d)",pcVar5,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/async.c",uVar3
);
goto LAB_00114cac;
}
LAB_00114aef:
if (force_tls != 0) {
lVar4 = mysql_get_ssl_cipher(local_530);
if (lVar4 == 0) {
diag("Error: No tls connection");
goto LAB_00114cac;
}
}
iVar1 = mysql_real_query_start(&local_534,local_530,"SHOW STATUS");
while (iVar1 != 0) {
uVar2 = wait_for_mysql(local_530,iVar1);
iVar1 = mysql_real_query_cont(&local_534,local_530,uVar2);
}
if (local_534 != 0) {
pcVar5 = "mysql_real_query() returns error";
uVar3 = 0xbb;
goto LAB_00114ca5;
}
lVar4 = mysql_use_result(local_530);
if (lVar4 == 0) {
pcVar5 = "mysql_use_result() returns error";
uVar3 = 0xbf;
goto LAB_00114ca5;
}
do {
iVar1 = mysql_fetch_row_start(&local_550,lVar4);
while (iVar1 != 0) {
uVar2 = wait_for_mysql(local_530,iVar1);
iVar1 = mysql_fetch_row_cont(&local_550,lVar4,uVar2);
}
} while (local_550 != 0);
iVar1 = mysql_errno(local_530);
if (iVar1 != 0) {
pcVar5 = "Got error while retrieving rows";
uVar3 = 0xcc;
goto LAB_00114ca5;
}
mysql_free_result(lVar4);
iVar1 = mysql_close_start(local_530);
while (iVar1 != 0) {
uVar2 = wait_for_mysql(local_530,iVar1);
iVar1 = mysql_close_cont(local_530,uVar2);
}
iVar1 = local_538 + 1;
} while (iVar1 != 100);
uVar3 = 0;
}
LAB_00114cb1:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
12,434
|
trnman_new_trn
|
eloqsql/storage/maria/trnman.c
|
TRN *trnman_new_trn(WT_THD *wt)
{
int res;
TRN *trn;
union { TRN *trn; void *v; } tmp;
DBUG_ENTER("trnman_new_trn");
/*
we have a mutex, to do simple things under it - allocate a TRN,
increment trnman_active_transactions, set trn->min_read_from.
Note that all the above is fast. generating short_id may be slow,
as it involves scanning a large array - so it's done outside of the
mutex.
*/
DBUG_PRINT("info", ("mysql_mutex_lock LOCK_trn_list"));
mysql_mutex_lock(&LOCK_trn_list);
/* Allocating a new TRN structure */
tmp.trn= pool;
/*
Popping an unused TRN from the pool
(ABA isn't possible, we're behind a mutex
*/
while (tmp.trn && !my_atomic_casptr((void **)(char*) &pool, &tmp.v,
(void *)tmp.trn->next))
/* no-op */;
/* Nothing in the pool ? Allocate a new one */
if (!(trn= tmp.trn))
{
/*
trn should be completely initialized at create time to allow
one to keep a known state on it.
(Like redo_lns, which is assumed to be 0 at start of row handling
and reset to zero before end of row handling)
*/
trn= (TRN *)my_malloc(PSI_INSTRUMENT_ME, sizeof(TRN), MYF(MY_WME | MY_ZEROFILL));
if (unlikely(!trn))
{
DBUG_PRINT("info", ("mysql_mutex_unlock LOCK_trn_list"));
mysql_mutex_unlock(&LOCK_trn_list);
return 0;
}
trnman_allocated_transactions++;
mysql_mutex_init(key_TRN_state_lock, &trn->state_lock, MY_MUTEX_INIT_FAST);
}
trn->wt= wt;
trn->pins= lf_hash_get_pins(&trid_to_trn);
if (!trn->pins)
{
trnman_free_trn(trn);
mysql_mutex_unlock(&LOCK_trn_list);
return 0;
}
trnman_active_transactions++;
trn->min_read_from= active_list_min.next->trid;
trn->trid= new_trid();
trn->next= &active_list_max;
trn->prev= active_list_max.prev;
active_list_max.prev= trn->prev->next= trn;
trid_min_read_from= active_list_min.next->min_read_from;
DBUG_PRINT("info", ("mysql_mutex_unlock LOCK_trn_list"));
mysql_mutex_unlock(&LOCK_trn_list);
if (unlikely(!trn->min_read_from))
{
/*
We are the only transaction. Set min_read_from so that we can read
our own rows
*/
trn->min_read_from= trn->trid + 1;
}
/* no other transaction can read changes done by this one */
trn->commit_trid= MAX_TRID;
trn->rec_lsn= trn->undo_lsn= trn->first_undo_lsn= 0;
trn->used_tables= 0;
trn->used_instances= 0;
trn->locked_tables= 0;
trn->flags= 0;
/*
only after the following function TRN is considered initialized,
so it must be done the last
*/
mysql_mutex_lock(&trn->state_lock);
trn->short_id= get_short_trid(trn);
mysql_mutex_unlock(&trn->state_lock);
res= lf_hash_insert(&trid_to_trn, trn->pins, &trn);
DBUG_ASSERT(res <= 0);
if (res)
{
trnman_end_trn(trn, 0);
return 0;
}
DBUG_PRINT("exit", ("trn: %p trid: 0x%lu min_read_from: 0x%lu",
trn, (ulong) trn->trid, (ulong) trn->min_read_from));
DBUG_RETURN(trn);
}
|
O3
|
c
|
trnman_new_trn:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpq $0x0, 0xb9edaf(%rip) # 0xbff350
jne 0x60823
leaq 0xb9ed62(%rip), %rdi # 0xbff310
callq 0x29200
movq 0xb9ec7e(%rip), %rbx # 0xbff238
testq %rbx, %rbx
je 0x605e9
movq %rbx, %rcx
movq 0x68(%rbx), %rdx
movq %rbx, %rax
lock
cmpxchgq %rdx, 0xb9ec66(%rip) # 0xbff238
movq %rax, %rbx
cmoveq %rcx, %rbx
je 0x605e0
testq %rbx, %rbx
jne 0x605bf
movq %rbx, -0x20(%rbp)
testq %rbx, %rbx
jne 0x6064e
movl $0xb0, %esi
movl $0x30, %edx
xorl %edi, %edi
callq 0x9fdb5
movq %rax, -0x20(%rbp)
testq %rax, %rax
je 0x60880
movq %rax, %rbx
incl 0xb9ec20(%rip) # 0xbff230
leaq 0x39c5dd(%rip), %rax # 0x3fcbf4
movl (%rax), %edi
movq %rbx, %r15
addq $0x10, %r15
leaq 0x3259e9(%rip), %rax # 0x386010
movq (%rax), %rax
movq %r15, %rsi
callq *0x40(%rax)
movq %rax, 0x50(%rbx)
movq %r15, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
leaq 0xba7f2a(%rip), %rsi # 0xc08570
movq %r15, %rdi
callq 0x29320
movq %r14, 0x8(%rbx)
leaq 0xb9ec17(%rip), %rdi # 0xbff270
callq 0x2f205
movq %rax, (%rbx)
testq %rax, %rax
je 0x607f6
incl 0xb9ebb8(%rip) # 0xbff228
movq 0xb9e959(%rip), %rax # 0xbfefd0
movq 0x78(%rax), %rax
movq %rax, 0x80(%rbx)
movq 0xb9ebb7(%rip), %rax # 0xbff240
incq %rax
movq %rax, 0xb9ebad(%rip) # 0xbff240
movq %rax, 0x78(%rbx)
leaq 0xb9e97a(%rip), %rax # 0xbff018
movq %rax, 0x68(%rbx)
movq 0xb9e9df(%rip), %rax # 0xbff088
movq %rax, 0x70(%rbx)
movq %rbx, 0x68(%rax)
movq %rbx, 0xb9e9d0(%rip) # 0xbff088
movq 0xb9e911(%rip), %rax # 0xbfefd0
movq 0x80(%rax), %rax
movq %rax, 0x323b0b(%rip) # 0x3841d8
movq 0xb9ec7c(%rip), %rdi # 0xbff350
testq %rdi, %rdi
jne 0x6082d
leaq 0xb9ec2c(%rip), %rdi # 0xbff310
callq 0x291c0
cmpq $0x0, 0x80(%rbx)
je 0x60842
movq $-0x1, 0x88(%rbx)
movw $0x0, 0xae(%rbx)
leaq 0x10(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x90(%rbx)
movups %xmm0, 0x9c(%rbx)
cmpq $0x0, 0x50(%rbx)
jne 0x60855
callq 0x29200
movq 0xb9eb05(%rip), %rax # 0xbff240
addq %rbx, %rax
imulq $0x4c319, %rax, %rcx # imm = 0x4C319
movabsq $-0x7fff7fff7fff7fff, %rdx # imm = 0x8000800080008001
movq %rcx, %rax
mulq %rdx
shrq $0xf, %rdx
movq %rdx, %rax
shlq $0x10, %rax
subq %rax, %rdx
addq %rcx, %rdx
incq %rdx
movq 0xb9e7f0(%rip), %rcx # 0xbfef60
cmpq $0x0, (%rcx,%rdx,8)
je 0x6077b
movl %edx, %esi
jmp 0x60790
xorl %eax, %eax
lock
cmpxchgq %rbx, (%rcx,%rdx,8)
movq 0xb9e7d6(%rip), %rcx # 0xbfef60
movl %edx, %esi
movl %edx, %eax
je 0x6079d
incq %rdx
xorl %eax, %eax
cmpl $0xffff, %esi # imm = 0xFFFF
jl 0x60770
movl $0x1, %edx
testl %eax, %eax
je 0x60770
movq -0x20(%rbp), %r14
movw %ax, 0xac(%r14)
leaq 0x10(%r14), %rbx
movq 0x50(%r14), %rdi
testq %rdi, %rdi
jne 0x6086b
movq %rbx, %rdi
callq 0x291c0
movq (%r14), %rsi
leaq 0xb9ea73(%rip), %rdi # 0xbff248
leaq -0x20(%rbp), %rbx
movq %rbx, %rdx
callq 0x2f3e0
movl %eax, %ecx
movq (%rbx), %rax
testl %ecx, %ecx
je 0x60818
movq %rax, %rdi
xorl %esi, %esi
callq 0x60916
jmp 0x60816
movq %rbx, %rdi
callq 0x6089c
movq 0xb9eb4b(%rip), %rdi # 0xbff350
testq %rdi, %rdi
jne 0x60887
leaq 0xb9eaff(%rip), %rdi # 0xbff310
callq 0x291c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2cf50
jmp 0x605b3
leaq 0x3257dc(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x606dd
movq 0x78(%rbx), %rax
incq %rax
movq %rax, 0x80(%rbx)
jmp 0x606f7
leaq 0x79e69(%rip), %rsi # 0xda6c5
movl $0x173, %edx # imm = 0x173
callq 0x2eb6f
jmp 0x60734
leaq 0x32579e(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x607c3
callq 0x2cf6d
jmp 0x60816
leaq 0x325782(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x6080a
|
trnman_new_trn:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rdi
cmp cs:qword_BFF350, 0
jnz loc_60823
lea rdi, LOCK_trn_list
call _pthread_mutex_lock
loc_605B3:
mov rbx, cs:pool
test rbx, rbx
jz short loc_605E9
loc_605BF:
mov rcx, rbx
mov rdx, [rbx+68h]
mov rax, rbx
lock cmpxchg cs:pool, rdx
mov rbx, rax
cmovz rbx, rcx
jz short loc_605E0
test rbx, rbx
jnz short loc_605BF
loc_605E0:
mov [rbp+var_20], rbx
test rbx, rbx
jnz short loc_6064E
loc_605E9:
mov esi, 0B0h
mov edx, 30h ; '0'
xor edi, edi
call my_malloc
mov [rbp+var_20], rax
test rax, rax
jz loc_60880
mov rbx, rax
inc cs:trnman_allocated_transactions
lea rax, key_TRN_state_lock
mov edi, [rax]
mov r15, rbx
add r15, 10h
lea rax, PSI_server
mov rax, [rax]
mov rsi, r15
call qword ptr [rax+40h]
mov [rbx+50h], rax
mov [rbx+48h], r15
xorps xmm0, xmm0
movups xmmword ptr [rbx+38h], xmm0
lea rsi, my_fast_mutexattr
mov rdi, r15
call _pthread_mutex_init
loc_6064E:
mov [rbx+8], r14
lea rdi, unk_BFF270
call lf_pinbox_get_pins
mov [rbx], rax
test rax, rax
jz loc_607F6
inc cs:trnman_active_transactions
mov rax, cs:qword_BFEFD0
mov rax, [rax+78h]
mov [rbx+80h], rax
mov rax, cs:global_trid_generator
inc rax
mov cs:global_trid_generator, rax
mov [rbx+78h], rax
lea rax, active_list_max
mov [rbx+68h], rax
mov rax, cs:qword_BFF088
mov [rbx+70h], rax
mov [rax+68h], rbx
mov cs:qword_BFF088, rbx
mov rax, cs:qword_BFEFD0
mov rax, [rax+80h]
mov cs:trid_min_read_from, rax
mov rdi, cs:qword_BFF350
test rdi, rdi
jnz loc_6082D
loc_606DD:
lea rdi, LOCK_trn_list
call _pthread_mutex_unlock
cmp qword ptr [rbx+80h], 0
jz loc_60842
loc_606F7:
mov qword ptr [rbx+88h], 0FFFFFFFFFFFFFFFFh
mov word ptr [rbx+0AEh], 0
lea rdi, [rbx+10h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+58h], xmm0
movups xmmword ptr [rbx+90h], xmm0
movups xmmword ptr [rbx+9Ch], xmm0
cmp qword ptr [rbx+50h], 0
jnz loc_60855
call _pthread_mutex_lock
loc_60734:
mov rax, cs:global_trid_generator
add rax, rbx
imul rcx, rax, 4C319h
mov rdx, 8000800080008001h
mov rax, rcx
mul rdx
shr rdx, 0Fh
mov rax, rdx
shl rax, 10h
sub rdx, rax
add rdx, rcx
inc rdx
mov rcx, cs:short_trid_to_active_trn
loc_60770:
cmp qword ptr [rcx+rdx*8], 0
jz short loc_6077B
mov esi, edx
jmp short loc_60790
loc_6077B:
xor eax, eax
lock cmpxchg [rcx+rdx*8], rbx
mov rcx, cs:short_trid_to_active_trn
mov esi, edx
mov eax, edx
jz short loc_6079D
loc_60790:
inc rdx
xor eax, eax
cmp esi, 0FFFFh
jl short loc_60770
loc_6079D:
mov edx, 1
test eax, eax
jz short loc_60770
mov r14, [rbp+var_20]
mov [r14+0ACh], ax
lea rbx, [r14+10h]
mov rdi, [r14+50h]
test rdi, rdi
jnz loc_6086B
loc_607C3:
mov rdi, rbx
call _pthread_mutex_unlock
mov rsi, [r14]
lea rdi, trid_to_trn
lea rbx, [rbp+var_20]
mov rdx, rbx
call lf_hash_insert
mov ecx, eax
mov rax, [rbx]
test ecx, ecx
jz short loc_60818
mov rdi, rax
xor esi, esi
call trnman_end_trn
jmp short loc_60816
loc_607F6:
mov rdi, rbx
call trnman_free_trn
mov rdi, cs:qword_BFF350
test rdi, rdi
jnz short loc_60887
loc_6080A:
lea rdi, LOCK_trn_list
call _pthread_mutex_unlock
loc_60816:
xor eax, eax
loc_60818:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_60823:
call trnman_new_trn_cold_1
jmp loc_605B3
loc_6082D:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_606DD
loc_60842:
mov rax, [rbx+78h]
inc rax
mov [rbx+80h], rax
jmp loc_606F7
loc_60855:
lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 173h
call psi_mutex_lock
jmp loc_60734
loc_6086B:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_607C3
loc_60880:
call trnman_new_trn_cold_2
jmp short loc_60816
loc_60887:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_6080A
|
signed long long trnman_new_trn(long long a1)
{
signed long long v1; // rax
signed long long v2; // rbx
signed long long v3; // rcx
bool v4; // zf
signed long long v5; // rax
long long v6; // rax
long long v7; // r15
long long pins; // rax
long long v9; // rax
long long v10; // rdi
unsigned long long v11; // rdx
long long v12; // rcx
long long v13; // rsi
int v14; // eax
long long *v15; // r14
long long v16; // rdi
int v17; // ecx
signed long long result; // rax
signed long long v19[4]; // [rsp+0h] [rbp-20h] BYREF
v19[0] = v1;
if ( qword_BFF350 )
trnman_new_trn_cold_1(a1);
else
pthread_mutex_lock(&LOCK_trn_list);
v2 = pool;
if ( !pool )
goto LABEL_8;
while ( 1 )
{
v3 = v2;
v5 = _InterlockedCompareExchange64(&pool, *(_QWORD *)(v2 + 104), v2);
v4 = v2 == v5;
v2 = v5;
if ( v4 )
break;
if ( !v5 )
goto LABEL_7;
}
v2 = v3;
LABEL_7:
v19[0] = v2;
if ( !v2 )
{
LABEL_8:
v6 = my_malloc(0LL, 176LL, 48LL);
v19[0] = v6;
if ( !v6 )
{
trnman_new_trn_cold_2();
return 0LL;
}
v2 = v6;
++trnman_allocated_transactions;
v7 = v6 + 16;
*(_QWORD *)(v6 + 80) = ((long long ( *)(_QWORD, long long))PSI_server[8])(key_TRN_state_lock, v6 + 16);
*(_QWORD *)(v2 + 72) = v7;
*(_OWORD *)(v2 + 56) = 0LL;
pthread_mutex_init(v7, &my_fast_mutexattr);
}
*(_QWORD *)(v2 + 8) = a1;
pins = lf_pinbox_get_pins((long long)&unk_BFF270);
*(_QWORD *)v2 = pins;
if ( !pins )
{
trnman_free_trn(v2);
if ( qword_BFF350 )
PSI_server[44]();
pthread_mutex_unlock(&LOCK_trn_list);
return 0LL;
}
++trnman_active_transactions;
*(_QWORD *)(v2 + 128) = *(_QWORD *)(qword_BFEFD0 + 120);
*(_QWORD *)(v2 + 120) = ++global_trid_generator;
*(_QWORD *)(v2 + 104) = &active_list_max;
v9 = qword_BFF088;
*(_QWORD *)(v2 + 112) = qword_BFF088;
*(_QWORD *)(v9 + 104) = v2;
qword_BFF088 = v2;
trid_min_read_from = *(_QWORD *)(qword_BFEFD0 + 128);
if ( qword_BFF350 )
PSI_server[44]();
pthread_mutex_unlock(&LOCK_trn_list);
if ( !*(_QWORD *)(v2 + 128) )
*(_QWORD *)(v2 + 128) = *(_QWORD *)(v2 + 120) + 1LL;
*(_QWORD *)(v2 + 136) = -1LL;
*(_WORD *)(v2 + 174) = 0;
v10 = v2 + 16;
*(_OWORD *)(v2 + 88) = 0LL;
*(_OWORD *)(v2 + 144) = 0LL;
*(_OWORD *)(v2 + 156) = 0LL;
if ( *(_QWORD *)(v2 + 80) )
psi_mutex_lock(v10, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 0x173u);
else
pthread_mutex_lock(v10);
v11 = 312089 * (v2 + global_trid_generator) % 0xFFFFuLL + 1;
v12 = short_trid_to_active_trn;
do
{
do
{
if ( *(_QWORD *)(v12 + 8 * v11) )
{
v13 = (unsigned int)v11;
}
else
{
v4 = _InterlockedCompareExchange64((volatile signed long long *)(v12 + 8 * v11), v2, 0LL) == 0;
v12 = short_trid_to_active_trn;
v13 = (unsigned int)v11;
v14 = v11;
if ( v4 )
break;
}
++v11;
v14 = 0;
}
while ( (int)v13 < 0xFFFF );
v11 = 1LL;
}
while ( !v14 );
v15 = (long long *)v19[0];
*(_WORD *)(v19[0] + 172) = v14;
v16 = v15[10];
if ( v16 )
((void ( *)(long long, long long, long long, long long))PSI_server[44])(v16, v13, 1LL, v12);
pthread_mutex_unlock(v15 + 2);
v17 = lf_hash_insert((long long)&trid_to_trn, *v15, (long long)v19);
result = v19[0];
if ( v17 )
{
trnman_end_trn(v19[0], 0LL);
return 0LL;
}
return result;
}
|
trnman_new_trn:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
CMP qword ptr [0x00cff350],0x0
JNZ 0x00160823
LEA RDI,[0xcff310]
CALL 0x00129200
LAB_001605b3:
MOV RBX,qword ptr [0x00cff238]
TEST RBX,RBX
JZ 0x001605e9
LAB_001605bf:
MOV RCX,RBX
MOV RDX,qword ptr [RBX + 0x68]
MOV RAX,RBX
CMPXCHG.LOCK qword ptr [0x00cff238],RDX
MOV RBX,RAX
CMOVZ RBX,RCX
JZ 0x001605e0
TEST RBX,RBX
JNZ 0x001605bf
LAB_001605e0:
MOV qword ptr [RBP + -0x20],RBX
TEST RBX,RBX
JNZ 0x0016064e
LAB_001605e9:
MOV ESI,0xb0
MOV EDX,0x30
XOR EDI,EDI
CALL 0x0019fdb5
MOV qword ptr [RBP + -0x20],RAX
TEST RAX,RAX
JZ 0x00160880
MOV RBX,RAX
INC dword ptr [0x00cff230]
LEA RAX,[0x4fcbf4]
MOV EDI,dword ptr [RAX]
MOV R15,RBX
ADD R15,0x10
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
MOV qword ptr [RBX + 0x50],RAX
MOV qword ptr [RBX + 0x48],R15
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x38],XMM0
LEA RSI,[0xd08570]
MOV RDI,R15
CALL 0x00129320
LAB_0016064e:
MOV qword ptr [RBX + 0x8],R14
LEA RDI,[0xcff270]
CALL 0x0012f205
MOV qword ptr [RBX],RAX
TEST RAX,RAX
JZ 0x001607f6
INC dword ptr [0x00cff228]
MOV RAX,qword ptr [0x00cfefd0]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBX + 0x80],RAX
MOV RAX,qword ptr [0x00cff240]
INC RAX
MOV qword ptr [0x00cff240],RAX
MOV qword ptr [RBX + 0x78],RAX
LEA RAX,[0xcff018]
MOV qword ptr [RBX + 0x68],RAX
MOV RAX,qword ptr [0x00cff088]
MOV qword ptr [RBX + 0x70],RAX
MOV qword ptr [RAX + 0x68],RBX
MOV qword ptr [0x00cff088],RBX
MOV RAX,qword ptr [0x00cfefd0]
MOV RAX,qword ptr [RAX + 0x80]
MOV qword ptr [0x004841d8],RAX
MOV RDI,qword ptr [0x00cff350]
TEST RDI,RDI
JNZ 0x0016082d
LAB_001606dd:
LEA RDI,[0xcff310]
CALL 0x001291c0
CMP qword ptr [RBX + 0x80],0x0
JZ 0x00160842
LAB_001606f7:
MOV qword ptr [RBX + 0x88],-0x1
MOV word ptr [RBX + 0xae],0x0
LEA RDI,[RBX + 0x10]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOVUPS xmmword ptr [RBX + 0x90],XMM0
MOVUPS xmmword ptr [RBX + 0x9c],XMM0
CMP qword ptr [RBX + 0x50],0x0
JNZ 0x00160855
CALL 0x00129200
LAB_00160734:
MOV RAX,qword ptr [0x00cff240]
ADD RAX,RBX
IMUL RCX,RAX,0x4c319
MOV RDX,-0x7fff7fff7fff7fff
MOV RAX,RCX
MUL RDX
SHR RDX,0xf
MOV RAX,RDX
SHL RAX,0x10
SUB RDX,RAX
ADD RDX,RCX
INC RDX
MOV RCX,qword ptr [0x00cfef60]
LAB_00160770:
CMP qword ptr [RCX + RDX*0x8],0x0
JZ 0x0016077b
MOV ESI,EDX
JMP 0x00160790
LAB_0016077b:
XOR EAX,EAX
CMPXCHG.LOCK qword ptr [RCX + RDX*0x8],RBX
MOV RCX,qword ptr [0x00cfef60]
MOV ESI,EDX
MOV EAX,EDX
JZ 0x0016079d
LAB_00160790:
INC RDX
XOR EAX,EAX
CMP ESI,0xffff
JL 0x00160770
LAB_0016079d:
MOV EDX,0x1
TEST EAX,EAX
JZ 0x00160770
MOV R14,qword ptr [RBP + -0x20]
MOV word ptr [R14 + 0xac],AX
LEA RBX,[R14 + 0x10]
MOV RDI,qword ptr [R14 + 0x50]
TEST RDI,RDI
JNZ 0x0016086b
LAB_001607c3:
MOV RDI,RBX
CALL 0x001291c0
MOV RSI,qword ptr [R14]
LEA RDI,[0xcff248]
LEA RBX,[RBP + -0x20]
MOV RDX,RBX
CALL 0x0012f3e0
MOV ECX,EAX
MOV RAX,qword ptr [RBX]
TEST ECX,ECX
JZ 0x00160818
MOV RDI,RAX
XOR ESI,ESI
CALL 0x00160916
JMP 0x00160816
LAB_001607f6:
MOV RDI,RBX
CALL 0x0016089c
MOV RDI,qword ptr [0x00cff350]
TEST RDI,RDI
JNZ 0x00160887
LAB_0016080a:
LEA RDI,[0xcff310]
CALL 0x001291c0
LAB_00160816:
XOR EAX,EAX
LAB_00160818:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00160823:
CALL 0x0012cf50
JMP 0x001605b3
LAB_0016082d:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001606dd
LAB_00160842:
MOV RAX,qword ptr [RBX + 0x78]
INC RAX
MOV qword ptr [RBX + 0x80],RAX
JMP 0x001606f7
LAB_00160855:
LEA RSI,[0x1da6c5]
MOV EDX,0x173
CALL 0x0012eb6f
JMP 0x00160734
LAB_0016086b:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001607c3
LAB_00160880:
CALL 0x0012cf6d
JMP 0x00160816
LAB_00160887:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0016080a
|
long * trnman_new_trn(long param_1)
{
long *plVar1;
int iVar2;
long *in_RAX;
long *plVar3;
long *plVar4;
long lVar5;
long lVar6;
pthread_mutex_t *ppVar7;
bool bVar8;
long *local_28;
local_28 = in_RAX;
if (LOCK_trn_list._64_8_ == 0) {
pthread_mutex_lock((pthread_mutex_t *)LOCK_trn_list);
}
else {
trnman_new_trn_cold_1();
}
plVar4 = pool;
if (pool != (long *)0x0) {
do {
LOCK();
bVar8 = plVar4 != pool;
plVar3 = plVar4;
plVar1 = (long *)plVar4[0xd];
if (bVar8) {
plVar3 = pool;
plVar1 = pool;
}
pool = plVar1;
UNLOCK();
} while ((bVar8) && (plVar4 = plVar3, plVar3 != (long *)0x0));
local_28 = plVar4;
if (plVar4 != (long *)0x0) goto LAB_0016064e;
}
plVar4 = (long *)my_malloc(0,0xb0,0x30);
local_28 = plVar4;
if (plVar4 == (long *)0x0) {
trnman_new_trn_cold_2();
return (long *)0x0;
}
trnman_allocated_transactions = trnman_allocated_transactions + 1;
ppVar7 = (pthread_mutex_t *)(plVar4 + 2);
lVar5 = (**(code **)(PSI_server + 0x40))(key_TRN_state_lock,ppVar7);
plVar4[10] = lVar5;
plVar4[9] = (long)ppVar7;
plVar4[7] = 0;
plVar4[8] = 0;
pthread_mutex_init(ppVar7,(pthread_mutexattr_t *)&my_fast_mutexattr);
LAB_0016064e:
plVar4[1] = param_1;
lVar5 = lf_pinbox_get_pins(0xcff270);
*plVar4 = lVar5;
if (lVar5 == 0) {
trnman_free_trn(plVar4);
if (LOCK_trn_list._64_8_ != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_trn_list);
}
else {
trnman_active_transactions = trnman_active_transactions + 1;
plVar4[0x10] = *(long *)(active_list_min._104_8_ + 0x78);
global_trid_generator = global_trid_generator + 1;
plVar4[0xf] = global_trid_generator;
plVar4[0xd] = (long)active_list_max;
plVar4[0xe] = active_list_max._112_8_;
*(long **)(active_list_max._112_8_ + 0x68) = plVar4;
trid_min_read_from = *(int8 *)(active_list_min._104_8_ + 0x80);
active_list_max._112_8_ = plVar4;
if (LOCK_trn_list._64_8_ != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_trn_list);
if (plVar4[0x10] == 0) {
plVar4[0x10] = plVar4[0xf] + 1;
}
plVar4[0x11] = -1;
*(int2 *)((long)plVar4 + 0xae) = 0;
plVar4[0xb] = 0;
plVar4[0xc] = 0;
plVar4[0x12] = 0;
plVar4[0x13] = 0;
*(int8 *)((long)plVar4 + 0x9c) = 0;
*(int8 *)((long)plVar4 + 0xa4) = 0;
if (plVar4[10] == 0) {
pthread_mutex_lock((pthread_mutex_t *)(plVar4 + 2));
}
else {
psi_mutex_lock((pthread_mutex_t *)(plVar4 + 2),
"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x173);
}
plVar3 = local_28;
lVar6 = (ulong)((global_trid_generator + (long)plVar4) * 0x4c319) % 0xffff + 1;
lVar5 = short_trid_to_active_trn;
LAB_00160770:
do {
iVar2 = (int)lVar6;
if (*(long *)(lVar5 + lVar6 * 8) == 0) {
plVar1 = (long *)(lVar5 + lVar6 * 8);
LOCK();
bVar8 = *plVar1 == 0;
if (bVar8) {
*plVar1 = (long)plVar4;
}
UNLOCK();
lVar5 = short_trid_to_active_trn;
if (!bVar8) goto LAB_00160790;
}
else {
LAB_00160790:
lVar6 = lVar6 + 1;
bVar8 = iVar2 < 0xffff;
iVar2 = 0;
if (bVar8) goto LAB_00160770;
}
lVar6 = 1;
} while (iVar2 == 0);
*(short *)((long)local_28 + 0xac) = (short)iVar2;
ppVar7 = (pthread_mutex_t *)(local_28 + 2);
if (local_28[10] != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar7);
iVar2 = lf_hash_insert(trid_to_trn,*plVar3,&local_28);
if (iVar2 == 0) {
return local_28;
}
trnman_end_trn(local_28,0);
}
return (long *)0x0;
}
|
|
12,435
|
create_last_word_mask
|
eloqsql/mysys/my_bitmap.c
|
void create_last_word_mask(MY_BITMAP *map)
{
unsigned char const mask= invers_last_byte_mask(map->n_bits);
/*
The first bytes are to be set to zero since they represent real bits
in the bitvector. The last bytes are set to 0xFF since they represent
bytes not used by the bitvector. Finally the last byte contains bits
as set by the mask above.
*/
unsigned char *ptr= (unsigned char*)&map->last_word_mask;
map->last_word_ptr= map->bitmap + no_words_in_map(map)-1;
switch (no_bytes_in_map(map) & 3) {
case 1:
map->last_word_mask= ~0U;
ptr[0]= mask;
return;
case 2:
map->last_word_mask= ~0U;
ptr[0]= 0;
ptr[1]= mask;
return;
case 3:
map->last_word_mask= 0U;
ptr[2]= mask;
ptr[3]= 0xFFU;
return;
case 0:
map->last_word_mask= 0U;
ptr[3]= mask;
return;
}
}
|
O3
|
c
|
create_last_word_mask:
pushq %rbp
movq %rsp, %rbp
movl 0x1c(%rdi), %eax
leal 0x7(%rax), %ecx
movq (%rdi), %rdx
addl $0x1f, %eax
shrl $0x5, %eax
leaq (%rdx,%rax,4), %rax
addq $-0x4, %rax
movq %rax, 0x8(%rdi)
movl %ecx, %eax
shrl $0x3, %eax
andl $0x3, %eax
leaq 0x44b46(%rip), %rdx # 0xe1bec
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movl $0x0, 0x18(%rdi)
addq $0x1b, %rdi
jmp 0x9d0e0
movl $0xffffff00, 0x18(%rdi) # imm = 0xFFFFFF00
addq $0x19, %rdi
jmp 0x9d0e0
movl $0xff000000, 0x18(%rdi) # imm = 0xFF000000
addq $0x1a, %rdi
jmp 0x9d0e0
addq $0x18, %rdi
movl $0xffffffff, (%rdi) # imm = 0xFFFFFFFF
andb $0x7, %cl
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
shll %cl, %eax
movb %al, (%rdi)
popq %rbp
retq
|
create_last_word_mask:
push rbp
mov rbp, rsp
mov eax, [rdi+1Ch]
lea ecx, [rax+7]
mov rdx, [rdi]
add eax, 1Fh
shr eax, 5
lea rax, [rdx+rax*4]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rdi+8], rax
mov eax, ecx
shr eax, 3
and eax, 3
lea rdx, jpt_9D0AD
movsxd rax, ds:(jpt_9D0AD - 0E1BECh)[rdx+rax*4]; switch 4 cases
add rax, rdx
jmp rax; switch jump
loc_9D0AF:
mov dword ptr [rdi+18h], 0; jumptable 000000000009D0AD case 0
add rdi, 1Bh
jmp short loc_9D0E0
loc_9D0BC:
mov dword ptr [rdi+18h], 0FFFFFF00h; jumptable 000000000009D0AD case 2
add rdi, 19h
jmp short loc_9D0E0
loc_9D0C9:
mov dword ptr [rdi+18h], 0FF000000h; jumptable 000000000009D0AD case 3
add rdi, 1Ah
jmp short loc_9D0E0
loc_9D0D6:
add rdi, 18h; jumptable 000000000009D0AD case 1
mov dword ptr [rdi], 0FFFFFFFFh
loc_9D0E0:
and cl, 7
mov eax, 0FFFFFFFEh
shl eax, cl
mov [rdi], al
pop rbp
retn
|
long long create_last_word_mask(long long a1)
{
int v1; // eax
_DWORD *v2; // rdi
long long result; // rax
v1 = *(_DWORD *)(a1 + 28);
*(_QWORD *)(a1 + 8) = *(_QWORD *)a1 + 4LL * ((unsigned int)(v1 + 31) >> 5) - 4;
switch ( ((unsigned int)(v1 + 7) >> 3) & 3 )
{
case 0u:
*(_DWORD *)(a1 + 24) = 0;
v2 = (_DWORD *)(a1 + 27);
break;
case 1u:
v2 = (_DWORD *)(a1 + 24);
*v2 = -1;
break;
case 2u:
*(_DWORD *)(a1 + 24) = -256;
v2 = (_DWORD *)(a1 + 25);
break;
case 3u:
*(_DWORD *)(a1 + 24) = -16777216;
v2 = (_DWORD *)(a1 + 26);
break;
}
result = (unsigned int)(-2 << ((v1 + 7) & 7));
*(_BYTE *)v2 = result;
return result;
}
|
create_last_word_mask:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RDI + 0x1c]
LEA ECX,[RAX + 0x7]
MOV RDX,qword ptr [RDI]
ADD EAX,0x1f
SHR EAX,0x5
LEA RAX,[RDX + RAX*0x4]
ADD RAX,-0x4
MOV qword ptr [RDI + 0x8],RAX
MOV EAX,ECX
SHR EAX,0x3
AND EAX,0x3
LEA RDX,[0x1e1bec]
MOVSXD RAX,dword ptr [RDX + RAX*0x4]
ADD RAX,RDX
switchD:
JMP RAX
caseD_0:
MOV dword ptr [RDI + 0x18],0x0
ADD RDI,0x1b
JMP 0x0019d0e0
caseD_2:
MOV dword ptr [RDI + 0x18],0xffffff00
ADD RDI,0x19
JMP 0x0019d0e0
caseD_3:
MOV dword ptr [RDI + 0x18],0xff000000
ADD RDI,0x1a
JMP 0x0019d0e0
caseD_1:
ADD RDI,0x18
MOV dword ptr [RDI],0xffffffff
LAB_0019d0e0:
AND CL,0x7
MOV EAX,0xfffffffe
SHL EAX,CL
MOV byte ptr [RDI],AL
POP RBP
RET
|
void create_last_word_mask(long *param_1)
{
uint uVar1;
uVar1 = *(int *)((long)param_1 + 0x1c) + 7;
param_1[1] = *param_1 + (ulong)(*(int *)((long)param_1 + 0x1c) + 0x1fU >> 5) * 4 + -4;
switch(uVar1 >> 3 & 3) {
case 0:
*(int4 *)(param_1 + 3) = 0;
param_1 = (long *)((long)param_1 + 0x1b);
break;
case 1:
param_1 = param_1 + 3;
*(int4 *)param_1 = 0xffffffff;
break;
case 2:
*(int4 *)(param_1 + 3) = 0xffffff00;
param_1 = (long *)((long)param_1 + 0x19);
break;
case 3:
*(int4 *)(param_1 + 3) = 0xff000000;
param_1 = (long *)((long)param_1 + 0x1a);
}
*(char *)param_1 = (char)(-2 << ((byte)uVar1 & 7));
return;
}
|
|
12,436
|
c4_eth_create_tx_path
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_tx.c
|
INTERNAL bytes_t c4_eth_create_tx_path(uint32_t tx_index, buffer_t* buf) {
bytes32_t tmp = {0};
buffer_t val_buf = stack_buffer(tmp);
bytes_t path = {.data = buf->data.data, .len = 0};
// create_path
if (tx_index > 0) {
buffer_add_be(&val_buf, tx_index, 4);
path = bytes_remove_leading_zeros(bytes(tmp, 4));
}
buf->data.len = 0;
rlp_add_item(buf, path);
return buf->data;
}
|
O0
|
c
|
c4_eth_create_tx_path:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x14(%rbp)
movq %rsi, -0x20(%rbp)
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x5110
movl $0x0, -0x58(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0xffffffe0, -0x48(%rbp) # imm = 0xFFFFFFE0
movl $0x0, -0x68(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
cmpl $0x0, -0x14(%rbp)
jbe 0x11b4c
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x58(%rbp), %rdi
movl $0x4, %edx
callq 0x196b0
movl $0x4, -0x88(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x88(%rbp), %edi
movq -0x80(%rbp), %rsi
callq 0x19ff0
movl %eax, -0x78(%rbp)
movq %rdx, -0x70(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq -0x20(%rbp), %rdi
movl -0x68(%rbp), %esi
movq -0x60(%rbp), %rdx
callq 0x16350
movq -0x20(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
c4_eth_create_tx_path:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_14], edi
mov [rbp+var_20], rsi
lea rdi, [rbp+var_40]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov [rbp+var_58], 0
lea rax, [rbp+var_40]
mov [rbp+var_50], rax
mov [rbp+var_48], 0FFFFFFE0h
mov dword ptr [rbp+var_68], 0
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov [rbp+var_60], rax
cmp [rbp+var_14], 0
jbe short loc_11B4C
mov eax, [rbp+var_14]
mov esi, eax
lea rdi, [rbp+var_58]
mov edx, 4
call buffer_add_be
mov [rbp+var_88], 4
lea rax, [rbp+var_40]
mov [rbp+var_80], rax
mov edi, [rbp+var_88]
mov rsi, [rbp+var_80]
call bytes_remove_leading_zeros
mov dword ptr [rbp+var_78], eax
mov [rbp+var_70], rdx
mov rax, [rbp+var_78]
mov [rbp+var_68], rax
mov rax, [rbp+var_70]
mov [rbp+var_60], rax
loc_11B4C:
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
mov rdi, [rbp+var_20]
mov esi, dword ptr [rbp+var_68]
mov rdx, [rbp+var_60]
call rlp_add_item
mov rax, [rbp+var_20]
movups xmm0, xmmword ptr [rax]
movaps [rbp+var_10], xmm0
mov eax, dword ptr [rbp+var_10]
mov rdx, qword ptr [rbp+var_10+8]
add rsp, 90h
pop rbp
retn
|
long long c4_eth_create_tx_path(unsigned int a1, long long a2)
{
long long v2; // rdx
unsigned int v4; // [rsp+28h] [rbp-68h]
long long v5; // [rsp+30h] [rbp-60h]
int v6; // [rsp+38h] [rbp-58h] BYREF
_BYTE *v7; // [rsp+40h] [rbp-50h]
int v8; // [rsp+48h] [rbp-48h]
_BYTE v9[32]; // [rsp+50h] [rbp-40h] BYREF
long long v10; // [rsp+70h] [rbp-20h]
unsigned int v11; // [rsp+7Ch] [rbp-14h]
v11 = a1;
v10 = a2;
memset(v9, 0LL, sizeof(v9));
v6 = 0;
v7 = v9;
v8 = -32;
v4 = 0;
v5 = *(_QWORD *)(v10 + 8);
if ( v11 )
{
buffer_add_be(&v6, v11, 4LL);
v4 = bytes_remove_leading_zeros(4LL, v9);
v5 = v2;
}
*(_DWORD *)v10 = 0;
rlp_add_item(v10, v4, v5);
return (unsigned int)*(_OWORD *)v10;
}
|
c4_eth_create_tx_path:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV dword ptr [RBP + -0x14],EDI
MOV qword ptr [RBP + -0x20],RSI
LEA RDI,[RBP + -0x40]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00105110
MOV dword ptr [RBP + -0x58],0x0
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOV dword ptr [RBP + -0x48],0xffffffe0
MOV dword ptr [RBP + -0x68],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x60],RAX
CMP dword ptr [RBP + -0x14],0x0
JBE 0x00111b4c
MOV EAX,dword ptr [RBP + -0x14]
MOV ESI,EAX
LEA RDI,[RBP + -0x58]
MOV EDX,0x4
CALL 0x001196b0
MOV dword ptr [RBP + -0x88],0x4
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0x80],RAX
MOV EDI,dword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x80]
CALL 0x00119ff0
MOV dword ptr [RBP + -0x78],EAX
MOV qword ptr [RBP + -0x70],RDX
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x60],RAX
LAB_00111b4c:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x60]
CALL 0x00116350
MOV RAX,qword ptr [RBP + -0x20]
MOVUPS XMM0,xmmword ptr [RAX]
MOVAPS xmmword ptr [RBP + -0x10],XMM0
MOV EAX,dword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
int1 [16] c4_eth_create_tx_path(int param_1,ulong *param_2)
{
int4 uVar1;
ulong extraout_RDX;
int1 auVar2 [16];
ulong local_68;
int4 local_60 [2];
int1 *local_58;
int4 local_50;
int1 local_48 [32];
ulong *local_28;
int local_1c;
local_28 = param_2;
local_1c = param_1;
memset(local_48,0,0x20);
local_60[0] = 0;
local_58 = local_48;
local_50 = 0xffffffe0;
uVar1 = 0;
local_68 = local_28[1];
if (local_1c != 0) {
buffer_add_be(local_60,local_1c,4);
uVar1 = bytes_remove_leading_zeros(4,local_48);
local_68 = extraout_RDX;
}
*(int4 *)local_28 = 0;
rlp_add_item(local_28,uVar1,local_68);
auVar2._0_8_ = *local_28 & 0xffffffff;
auVar2._8_8_ = local_28[1];
return auVar2;
}
|
|
12,437
|
c4_eth_create_tx_path
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_tx.c
|
INTERNAL bytes_t c4_eth_create_tx_path(uint32_t tx_index, buffer_t* buf) {
bytes32_t tmp = {0};
buffer_t val_buf = stack_buffer(tmp);
bytes_t path = {.data = buf->data.data, .len = 0};
// create_path
if (tx_index > 0) {
buffer_add_be(&val_buf, tx_index, 4);
path = bytes_remove_leading_zeros(bytes(tmp, 4));
}
buf->data.len = 0;
rlp_add_item(buf, path);
return buf->data;
}
|
O1
|
c
|
c4_eth_create_tx_path:
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movl $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movl $0xffffffe0, 0x18(%rsp) # imm = 0xFFFFFFE0
testl %edi, %edi
je 0xe3ea
movl %edi, %esi
leaq 0x8(%rsp), %rdi
movl $0x4, %edx
callq 0x13041
leaq 0x20(%rsp), %rsi
movl $0x4, %edi
callq 0x1354d
movl %eax, %esi
jmp 0xe3f0
movq 0x8(%rbx), %rdx
xorl %esi, %esi
movl $0x0, (%rbx)
movq %rbx, %rdi
callq 0x11188
movl (%rbx), %eax
movq 0x8(%rbx), %rdx
addq $0x40, %rsp
popq %rbx
retq
|
c4_eth_create_tx_path:
push rbx
sub rsp, 40h
mov rbx, rsi
xorps xmm0, xmm0
lea rax, [rsp+48h+var_28]
movaps xmmword ptr [rax+10h], xmm0
movaps xmmword ptr [rax], xmm0
mov [rsp+48h+var_40], 0
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_30], 0FFFFFFE0h
test edi, edi
jz short loc_E3EA
mov esi, edi
lea rdi, [rsp+48h+var_40]
mov edx, 4
call buffer_add_be
lea rsi, [rsp+48h+var_28]
mov edi, 4
call bytes_remove_leading_zeros
mov esi, eax
jmp short loc_E3F0
loc_E3EA:
mov rdx, [rbx+8]
xor esi, esi
loc_E3F0:
mov dword ptr [rbx], 0
mov rdi, rbx
call rlp_add_item
mov eax, [rbx]
mov rdx, [rbx+8]
add rsp, 40h
pop rbx
retn
|
long long c4_eth_create_tx_path(unsigned int a1, unsigned int *a2)
{
long long v3; // rsi
int v5; // [rsp+8h] [rbp-40h] BYREF
_BYTE *v6; // [rsp+10h] [rbp-38h]
int v7; // [rsp+18h] [rbp-30h]
_BYTE v8[40]; // [rsp+20h] [rbp-28h] BYREF
memset(v8, 0, 32);
v5 = 0;
v6 = v8;
v7 = -32;
if ( a1 )
{
buffer_add_be(&v5, a1, 4LL);
v3 = (unsigned int)bytes_remove_leading_zeros(4LL, v8);
}
else
{
v3 = 0LL;
}
*a2 = 0;
rlp_add_item(a2, v3);
return *a2;
}
|
c4_eth_create_tx_path:
PUSH RBX
SUB RSP,0x40
MOV RBX,RSI
XORPS XMM0,XMM0
LEA RAX,[RSP + 0x20]
MOVAPS xmmword ptr [RAX + 0x10],XMM0
MOVAPS xmmword ptr [RAX],XMM0
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0xffffffe0
TEST EDI,EDI
JZ 0x0010e3ea
MOV ESI,EDI
LEA RDI,[RSP + 0x8]
MOV EDX,0x4
CALL 0x00113041
LEA RSI,[RSP + 0x20]
MOV EDI,0x4
CALL 0x0011354d
MOV ESI,EAX
JMP 0x0010e3f0
LAB_0010e3ea:
MOV RDX,qword ptr [RBX + 0x8]
XOR ESI,ESI
LAB_0010e3f0:
MOV dword ptr [RBX],0x0
MOV RDI,RBX
CALL 0x00111188
MOV EAX,dword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
ADD RSP,0x40
POP RBX
RET
|
int1 [16] c4_eth_create_tx_path(int param_1,uint *param_2)
{
int4 uVar1;
int8 extraout_RDX;
int8 uVar2;
int1 auVar3 [16];
int4 local_40 [2];
int8 *local_38;
int4 local_30;
int8 local_28;
int8 uStack_20;
int8 local_18;
int8 uStack_10;
local_38 = &local_28;
local_18 = 0;
uStack_10 = 0;
local_28 = 0;
uStack_20 = 0;
local_40[0] = 0;
local_30 = 0xffffffe0;
if (param_1 == 0) {
uVar2 = *(int8 *)(param_2 + 2);
uVar1 = 0;
}
else {
buffer_add_be(local_40,param_1,4);
uVar1 = bytes_remove_leading_zeros(4,&local_28);
uVar2 = extraout_RDX;
}
*param_2 = 0;
rlp_add_item(param_2,uVar1,uVar2);
auVar3._4_4_ = 0;
auVar3._0_4_ = *param_2;
auVar3._8_8_ = *(int8 *)(param_2 + 2);
return auVar3;
}
|
|
12,438
|
c4_eth_create_tx_path
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_tx.c
|
INTERNAL bytes_t c4_eth_create_tx_path(uint32_t tx_index, buffer_t* buf) {
bytes32_t tmp = {0};
buffer_t val_buf = stack_buffer(tmp);
bytes_t path = {.data = buf->data.data, .len = 0};
// create_path
if (tx_index > 0) {
buffer_add_be(&val_buf, tx_index, 4);
path = bytes_remove_leading_zeros(bytes(tmp, 4));
}
buf->data.len = 0;
rlp_add_item(buf, path);
return buf->data;
}
|
O3
|
c
|
c4_eth_create_tx_path:
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movl $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movl $0xffffffe0, 0x18(%rsp) # imm = 0xFFFFFFE0
testl %edi, %edi
je 0xe1e0
movl %edi, %esi
leaq 0x8(%rsp), %rdi
movl $0x4, %edx
callq 0x12d54
leaq 0x20(%rsp), %rsi
movl $0x4, %edi
callq 0x13247
movl %eax, %esi
jmp 0xe1e6
movq 0x8(%rbx), %rdx
xorl %esi, %esi
movl $0x0, (%rbx)
movq %rbx, %rdi
callq 0x10ebd
movl (%rbx), %eax
movq 0x8(%rbx), %rdx
addq $0x40, %rsp
popq %rbx
retq
|
c4_eth_create_tx_path:
push rbx
sub rsp, 40h
mov rbx, rsi
xorps xmm0, xmm0
lea rax, [rsp+48h+var_28]
movaps xmmword ptr [rax+10h], xmm0
movaps xmmword ptr [rax], xmm0
mov [rsp+48h+var_40], 0
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_30], 0FFFFFFE0h
test edi, edi
jz short loc_E1E0
mov esi, edi
lea rdi, [rsp+48h+var_40]
mov edx, 4
call buffer_add_be
lea rsi, [rsp+48h+var_28]
mov edi, 4
call bytes_remove_leading_zeros
mov esi, eax
jmp short loc_E1E6
loc_E1E0:
mov rdx, [rbx+8]
xor esi, esi
loc_E1E6:
mov dword ptr [rbx], 0
mov rdi, rbx
call rlp_add_item
mov eax, [rbx]
mov rdx, [rbx+8]
add rsp, 40h
pop rbx
retn
|
long long c4_eth_create_tx_path(unsigned int a1, unsigned int *a2)
{
long long v3; // rsi
int v5; // [rsp+8h] [rbp-40h] BYREF
_BYTE *v6; // [rsp+10h] [rbp-38h]
int v7; // [rsp+18h] [rbp-30h]
_BYTE v8[40]; // [rsp+20h] [rbp-28h] BYREF
memset(v8, 0, 32);
v5 = 0;
v6 = v8;
v7 = -32;
if ( a1 )
{
buffer_add_be(&v5, a1, 4LL);
v3 = (unsigned int)bytes_remove_leading_zeros(4LL, v8);
}
else
{
v3 = 0LL;
}
*a2 = 0;
rlp_add_item(a2, v3);
return *a2;
}
|
c4_eth_create_tx_path:
PUSH RBX
SUB RSP,0x40
MOV RBX,RSI
XORPS XMM0,XMM0
LEA RAX,[RSP + 0x20]
MOVAPS xmmword ptr [RAX + 0x10],XMM0
MOVAPS xmmword ptr [RAX],XMM0
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0xffffffe0
TEST EDI,EDI
JZ 0x0010e1e0
MOV ESI,EDI
LEA RDI,[RSP + 0x8]
MOV EDX,0x4
CALL 0x00112d54
LEA RSI,[RSP + 0x20]
MOV EDI,0x4
CALL 0x00113247
MOV ESI,EAX
JMP 0x0010e1e6
LAB_0010e1e0:
MOV RDX,qword ptr [RBX + 0x8]
XOR ESI,ESI
LAB_0010e1e6:
MOV dword ptr [RBX],0x0
MOV RDI,RBX
CALL 0x00110ebd
MOV EAX,dword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
ADD RSP,0x40
POP RBX
RET
|
int1 [16] c4_eth_create_tx_path(int param_1,uint *param_2)
{
int4 uVar1;
int8 extraout_RDX;
int8 uVar2;
int1 auVar3 [16];
int4 local_40 [2];
int8 *local_38;
int4 local_30;
int8 local_28;
int8 uStack_20;
int8 local_18;
int8 uStack_10;
local_38 = &local_28;
local_18 = 0;
uStack_10 = 0;
local_28 = 0;
uStack_20 = 0;
local_40[0] = 0;
local_30 = 0xffffffe0;
if (param_1 == 0) {
uVar2 = *(int8 *)(param_2 + 2);
uVar1 = 0;
}
else {
buffer_add_be(local_40,param_1,4);
uVar1 = bytes_remove_leading_zeros(4,&local_28);
uVar2 = extraout_RDX;
}
*param_2 = 0;
rlp_add_item(param_2,uVar1,uVar2);
auVar3._4_4_ = 0;
auVar3._0_4_ = *param_2;
auVar3._8_8_ = *(int8 *)(param_2 + 2);
return auVar3;
}
|
|
12,439
|
PFS_table_share::destroy_index_stats()
|
eloqsql/storage/perfschema/pfs_instr_class.cc
|
void PFS_table_share::destroy_index_stats()
{
uint index;
for (index= 0; index <= MAX_INDEXES; index++)
{
void *addr= & this->m_race_index_stat[index];
void * volatile * typed_addr= static_cast<void * volatile *>(addr);
void *new_ptr= NULL;
void *old_ptr;
old_ptr= my_atomic_fasptr(typed_addr, new_ptr);
if (old_ptr != NULL)
{
PFS_table_share_index *pfs;
pfs= static_cast<PFS_table_share_index *>(old_ptr);
release_table_share_index_stat(pfs);
}
}
}
|
O0
|
cpp
|
PFS_table_share::destroy_index_stats():
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x40, -0xc(%rbp)
ja 0x39cf8
movq -0x50(%rbp), %rax
movl -0xc(%rbp), %ecx
leaq 0x1c8(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
xchgq %rax, (%rcx)
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x39ceb
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x39c30
jmp 0x39ced
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x39c8b
addq $0x50, %rsp
popq %rbp
retq
nop
|
_ZN15PFS_table_share19destroy_index_statsEv:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_50], rax
mov [rbp+var_C], 0
loc_39C8B:
cmp [rbp+var_C], 40h ; '@'
ja short loc_39CF8
mov rax, [rbp+var_50]
mov ecx, [rbp+var_C]
lea rax, [rax+rcx*8+1C8h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov [rbp+var_28], 0
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
xchg rax, [rcx]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jz short loc_39CEB
mov rax, [rbp+var_30]
mov [rbp+var_48], rax
mov rdi, [rbp+var_48]
call _Z30release_table_share_index_statP21PFS_table_share_index; release_table_share_index_stat(PFS_table_share_index *)
loc_39CEB:
jmp short $+2
loc_39CED:
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp short loc_39C8B
loc_39CF8:
add rsp, 50h
pop rbp
retn
|
long long PFS_table_share::destroy_index_stats(PFS_table_share *this)
{
long long result; // rax
long long v2; // [rsp+20h] [rbp-30h]
unsigned int i; // [rsp+44h] [rbp-Ch]
result = (long long)this;
for ( i = 0; i <= 0x40; ++i )
{
v2 = _InterlockedExchange64((volatile long long *)this + i + 57, 0LL);
if ( v2 )
release_table_share_index_stat(v2);
result = i + 1;
}
return result;
}
|
destroy_index_stats:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x50],RAX
MOV dword ptr [RBP + -0xc],0x0
LAB_00139c8b:
CMP dword ptr [RBP + -0xc],0x40
JA 0x00139cf8
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0xc]
LEA RAX,[RAX + RCX*0x8 + 0x1c8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x28],0x0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
XCHG qword ptr [RCX],RAX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00139ceb
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00139c30
LAB_00139ceb:
JMP 0x00139ced
LAB_00139ced:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x00139c8b
LAB_00139cf8:
ADD RSP,0x50
POP RBP
RET
|
/* PFS_table_share::destroy_index_stats() */
void __thiscall PFS_table_share::destroy_index_stats(PFS_table_share *this)
{
PFS_table_share_index *pPVar1;
uint local_14;
for (local_14 = 0; local_14 < 0x41; local_14 = local_14 + 1) {
LOCK();
pPVar1 = *(PFS_table_share_index **)(this + (ulong)local_14 * 8 + 0x1c8);
*(int8 *)(this + (ulong)local_14 * 8 + 0x1c8) = 0;
UNLOCK();
if (pPVar1 != (PFS_table_share_index *)0x0) {
release_table_share_index_stat(pPVar1);
}
}
return;
}
|
|
12,440
|
PolyLine<float>::random_lip() const
|
zkingston[P]unknot/src/knot.hh
|
[[nodiscard]] auto random_lip() const -> std::pair<PolyLine<RealT>, RealT>
{
return lip(rand() % size(), uniform_on_sphere<RealT>(std::sqrt(RealT{3.})));
}
|
O1
|
cpp
|
PolyLine<float>::random_lip() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x13a8, %rsp # imm = 0x13A8
movq %rsi, %r14
movq %rdi, %r12
callq 0xf230
movl %eax, %ebp
movq (%r14), %rbx
movq 0x8(%r14), %r13
cmpb $0x0, %fs:-0x20
je 0x3a00b
movl %ebp, 0x4(%rsp)
movq %r12, 0x8(%rsp)
cmpb $0x0, %fs:-0x8
je 0x3a04c
movl $0x0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq %fs:0x0, %rax
leaq -0x18(%rax), %r15
leaq -0x13a8(%rax), %r12
xorl %ebp, %ebp
movq %r15, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3bb80
vmovss %xmm0, 0x20(%rsp,%rbp)
addq $0x4, %rbp
cmpq $0xc, %rbp
jne 0x39f36
vmovsd 0x20(%rsp), %xmm0
vmulps %xmm0, %xmm0, %xmm2
vmovss 0x28(%rsp), %xmm1
vmulss %xmm1, %xmm1, %xmm3
vmovshdup %xmm2, %xmm4 # xmm4 = xmm2[1,1,3,3]
vaddss %xmm3, %xmm4, %xmm3
vaddss %xmm3, %xmm2, %xmm2
vxorps %xmm3, %xmm3, %xmm3
vucomiss %xmm3, %xmm2
jbe 0x39f9b
vsqrtss %xmm2, %xmm2, %xmm2
vbroadcastss %xmm2, %xmm3
vdivps %xmm3, %xmm0, %xmm0
vmovlps %xmm0, 0x20(%rsp)
vdivss %xmm2, %xmm1, %xmm0
vmovss %xmm0, 0x28(%rsp)
movslq 0x4(%rsp), %rax
subq %rbx, %r13
sarq $0x2, %r13
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %r13, %rcx
xorl %edx, %edx
divq %rcx
vmovsd 0x20(%rsp), %xmm0
vmulps 0x25506a(%rip){1to4}, %xmm0, %xmm0 # 0x28f034
leaq 0x10(%rsp), %rcx
vmovlps %xmm0, (%rcx)
vmovss 0x28(%rsp), %xmm0
vmulss 0x255053(%rip), %xmm0, %xmm0 # 0x28f034
vmovss %xmm0, 0x8(%rcx)
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b904
movq %rbx, %rax
addq $0x13a8, %rsp # imm = 0x13A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x2affe
movq %r15, %rdi
callq 0xfdc0
movl %eax, %edi
callq 0x10f1b
movq $0x270, %fs:-0x28 # imm = 0x270
leaq 0x20(%rsp), %rdi
callq 0xf9c0
movb $0x1, %fs:-0x20
jmp 0x39ef4
callq 0x10f50
jmp 0x39f0c
jmp 0x3a06d
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xf9c0
movq %rbx, %rdi
callq 0x101c0
movq %rax, %rdi
callq 0x14fdb
nop
|
_ZNK8PolyLineIfE10random_lipEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 13A8h
mov r14, rsi
mov r12, rdi
call _rand
mov ebp, eax
mov rbx, [r14]
mov r13, [r14+8]
cmp byte ptr fs:0FFFFFFFFFFFFFFE0h, 0
jz loc_3A00B
loc_39EF4:
mov [rsp+13D8h+var_13D4], ebp
mov [rsp+13D8h+var_13D0], r12; void *
cmp byte ptr fs:0FFFFFFFFFFFFFFF8h, 0
jz loc_3A04C
loc_39F0C:
mov [rsp+13D8h+var_13B0], 0; int
mov [rsp+13D8h+var_13B8], 0; void *
mov rax, fs:0
lea r15, [rax-18h]
lea r12, [rax-13A8h]
xor ebp, ebp
loc_39F36:
mov rdi, r15
mov rsi, r12
mov rdx, r15
call _ZNSt19normal_distributionIfEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEfRT_RKNS0_10param_typeE; std::normal_distribution<float>::operator()<std::mersenne_twister_engine<ulong,32ul,624ul,397ul,31ul,2567483615ul,11ul,4294967295ul,7ul,2636928640ul,15ul,4022730752ul,18ul,1812433253ul>>(std::mersenne_twister_engine<ulong,32ul,624ul,397ul,31ul,2567483615ul,11ul,4294967295ul,7ul,2636928640ul,15ul,4022730752ul,18ul,1812433253ul> &,std::normal_distribution<float>::param_type const&)
vmovss dword ptr [rsp+rbp+13D8h+var_13B8], xmm0
add rbp, 4
cmp rbp, 0Ch
jnz short loc_39F36
vmovsd xmm0, [rsp+13D8h+var_13B8]
vmulps xmm2, xmm0, xmm0
vmovss xmm1, [rsp+13D8h+var_13B0]
vmulss xmm3, xmm1, xmm1
vmovshdup xmm4, xmm2
vaddss xmm3, xmm4, xmm3
vaddss xmm2, xmm2, xmm3
vxorps xmm3, xmm3, xmm3
vucomiss xmm2, xmm3
jbe short loc_39F9B
vsqrtss xmm2, xmm2, xmm2
vbroadcastss xmm3, xmm2
vdivps xmm0, xmm0, xmm3
vmovlps [rsp+13D8h+var_13B8], xmm0
vdivss xmm0, xmm1, xmm2
vmovss [rsp+13D8h+var_13B0], xmm0
loc_39F9B:
movsxd rax, [rsp+13D8h+var_13D4]
sub r13, rbx
sar r13, 2
mov rcx, 0AAAAAAAAAAAAAAABh
imul rcx, r13
xor edx, edx; int
div rcx
vmovsd xmm0, [rsp+13D8h+var_13B8]
vmulps xmm0, xmm0, dword ptr cs:xmmword_28F034
lea rcx, [rsp+13D8h+var_13C8]; int
vmovlps qword ptr [rcx], xmm0
vmovss xmm0, [rsp+13D8h+var_13B0]
vmulss xmm0, xmm0, dword ptr cs:xmmword_28F034
vmovss dword ptr [rcx+8], xmm0
mov rbx, [rsp+13D8h+var_13D0]
mov rdi, rbx; int
mov rsi, r14; int
call _ZNK8PolyLineIfE3lipEmRKN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEE; PolyLine<float>::lip(ulong,Eigen::Matrix<float,3,1,0,3,1> const&)
mov rax, rbx
add rsp, 13A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3A00B:
lea r15, [rsp+13D8h+var_13B8]
mov rdi, r15; this
call _ZNSt13random_deviceC2Ev; std::random_device::random_device(void)
mov rdi, r15; this
call __ZNSt13random_device9_M_getvalEv; std::random_device::_M_getval(void)
mov edi, eax
call _ZNK8PolyLineIfE10random_lipEv_cold_1; PolyLine<float>::random_lip(void) [clone]
mov qword ptr fs:0FFFFFFFFFFFFFFD8h, 270h
lea rdi, [rsp+13D8h+var_13B8]; this
call __ZNSt13random_device7_M_finiEv; std::random_device::_M_fini(void)
mov byte ptr fs:0FFFFFFFFFFFFFFE0h, 1
jmp loc_39EF4
loc_3A04C:
call _ZNK8PolyLineIfE10random_lipEv_cold_2; PolyLine<float>::random_lip(void) [clone]
jmp loc_39F0C
jmp short loc_3A06D
mov rbx, rax
lea rdi, [rsp+13D8h+var_13B8]; this
call __ZNSt13random_device7_M_finiEv; std::random_device::_M_fini(void)
mov rdi, rbx
call __Unwind_Resume
loc_3A06D:
mov rdi, rax
call __clang_call_terminate
|
void * PolyLine<float>::random_lip(void *a1, long long *a2, __m128 _XMM0)
{
int v3; // ebp
long long v4; // rbx
long long v5; // r13
unsigned long long v6; // rax
unsigned long long v7; // r15
unsigned long long v8; // r12
int v10; // r8d
int v11; // r9d
unsigned int v26; // eax
int v27; // [rsp+0h] [rbp-13D8h]
int v28; // [rsp+4h] [rbp-13D4h]
int v29; // [rsp+10h] [rbp-13C8h] BYREF
long long v30; // [rsp+18h] [rbp-13C0h]
void *v31; // [rsp+20h] [rbp-13B8h] BYREF
int v32; // [rsp+28h] [rbp-13B0h]
long long v33; // [rsp+30h] [rbp-13A8h]
v3 = rand(a1);
v4 = *a2;
v5 = a2[1];
if ( !__readfsbyte(0xFFFFFFE0) )
{
std::random_device::random_device((std::random_device *)&v31);
v26 = std::random_device::_M_getval((std::random_device *)&v31);
PolyLine<float>::random_lip(v26);
__writefsqword(0xFFFFFFD8, 0x270uLL);
std::random_device::_M_fini((std::random_device *)&v31);
__writefsbyte(0xFFFFFFE0, 1u);
}
v28 = v3;
if ( !__readfsbyte(0xFFFFFFF8) )
PolyLine<float>::random_lip();
v32 = 0;
v31 = 0LL;
v6 = __readfsqword(0);
v7 = v6 - 24;
v8 = v6 - 5032;
for ( _RBP = 0LL; _RBP != 12; _RBP += 4LL )
{
*(double *)_XMM0.m128_u64 = std::normal_distribution<float>::operator()<std::mersenne_twister_engine<unsigned long,32ul,624ul,397ul,31ul,2567483615ul,11ul,4294967295ul,7ul,2636928640ul,15ul,4022730752ul,18ul,1812433253ul>>(
v7,
v8,
v7);
__asm { vmovss dword ptr [rsp+rbp+13D8h+var_13B8], xmm0 }
}
__asm
{
vmovsd xmm0, [rsp+13D8h+var_13B8]
vmulps xmm2, xmm0, xmm0
vmovss xmm1, [rsp+13D8h+var_13B0]
vmulss xmm3, xmm1, xmm1
vmovshdup xmm4, xmm2
vaddss xmm3, xmm4, xmm3
vaddss xmm2, xmm2, xmm3
vxorps xmm3, xmm3, xmm3
vucomiss xmm2, xmm3
vmovsd xmm0, [rsp+13D8h+var_13B8]
vmulps xmm0, xmm0, dword ptr cs:xmmword_28F034
}
_RCX = &v29;
__asm
{
vmovlps qword ptr [rcx], xmm0
vmovss xmm0, [rsp+13D8h+var_13B0]
vmulss xmm0, xmm0, dword ptr cs:xmmword_28F034
vmovss dword ptr [rcx+8], xmm0
}
PolyLine<float>::lip(
(int)a1,
(int)a2,
v28 % (0xAAAAAAAAAAAAAAABLL * ((v5 - v4) >> 2)),
(int)&v29,
v10,
v11,
v27,
a1,
v29,
v30,
v31,
v32,
v33);
return a1;
}
|
random_lip:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x13a8
MOV R14,RSI
MOV R12,RDI
CALL 0x0010f230
MOV EBP,EAX
MOV RBX,qword ptr [R14]
MOV R13,qword ptr [R14 + 0x8]
CMP byte ptr FS:[-0x20],0x0
JZ 0x0013a00b
LAB_00139ef4:
MOV dword ptr [RSP + 0x4],EBP
MOV qword ptr [RSP + 0x8],R12
CMP byte ptr FS:[-0x8],0x0
JZ 0x0013a04c
LAB_00139f0c:
MOV dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV RAX,qword ptr FS:[0x0]
LEA R15,[RAX + -0x18]
LEA R12,[RAX + -0x13a8]
XOR EBP,EBP
LAB_00139f36:
MOV RDI,R15
MOV RSI,R12
MOV RDX,R15
CALL 0x0013bb80
VMOVSS dword ptr [RSP + RBP*0x1 + 0x20],XMM0
ADD RBP,0x4
CMP RBP,0xc
JNZ 0x00139f36
VMOVSD XMM0,qword ptr [RSP + 0x20]
VMULPS XMM2,XMM0,XMM0
VMOVSS XMM1,dword ptr [RSP + 0x28]
VMULSS XMM3,XMM1,XMM1
VMOVSHDUP XMM4,XMM2
VADDSS XMM3,XMM4,XMM3
VADDSS XMM2,XMM2,XMM3
VXORPS XMM3,XMM3,XMM3
VUCOMISS XMM2,XMM3
JBE 0x00139f9b
VSQRTSS XMM2,XMM2,XMM2
VBROADCASTSS XMM3,XMM2
VDIVPS XMM0,XMM0,XMM3
VMOVLPS qword ptr [RSP + 0x20],XMM0
VDIVSS XMM0,XMM1,XMM2
VMOVSS dword ptr [RSP + 0x28],XMM0
LAB_00139f9b:
MOVSXD RAX,dword ptr [RSP + 0x4]
SUB R13,RBX
SAR R13,0x2
MOV RCX,-0x5555555555555555
IMUL RCX,R13
XOR EDX,EDX
DIV RCX
VMOVSD XMM0,qword ptr [RSP + 0x20]
VMULPS XMM0,XMM0,dword ptr [0x0038f034]
LEA RCX,[RSP + 0x10]
VMOVLPS qword ptr [RCX],XMM0
VMOVSS XMM0,dword ptr [RSP + 0x28]
VMULSS XMM0,XMM0,dword ptr [0x0038f034]
VMOVSS dword ptr [RCX + 0x8],XMM0
MOV RBX,qword ptr [RSP + 0x8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0013b904
MOV RAX,RBX
ADD RSP,0x13a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013a00b:
LEA R15,[RSP + 0x20]
MOV RDI,R15
CALL 0x0012affe
LAB_0013a018:
MOV RDI,R15
CALL 0x0010fdc0
LAB_0013a020:
MOV EDI,EAX
CALL 0x00110f1b
MOV qword ptr FS:[-0x28],0x270
LAB_0013a034:
LEA RDI,[RSP + 0x20]
CALL 0x0010f9c0
LAB_0013a03e:
MOV byte ptr FS:[-0x20],0x1
JMP 0x00139ef4
LAB_0013a04c:
CALL 0x00110f50
JMP 0x00139f0c
|
/* PolyLine<float>::random_lip() const */
ulong PolyLine<float>::random_lip(void)
{
normal_distribution<float> *this;
long lVar1;
int1 auVar2 [16];
uint uVar3;
long lVar4;
Matrix *in_RSI;
ulong in_RDI;
long *in_FS_OFFSET;
int1 auVar5 [16];
float fVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [16];
ulong local_13b8;
float local_13b0;
rand();
if ((char)in_FS_OFFSET[-4] == '\0') {
std::random_device::random_device((random_device *)&local_13b8);
/* try { // try from 0013a018 to 0013a01f has its CatchHandler @ 0013a058 */
uVar3 = std::random_device::_M_getval();
random_lip((PolyLine<float> *)(ulong)uVar3);
in_FS_OFFSET[-5] = 0x270;
/* try { // try from 0013a034 to 0013a03d has its CatchHandler @ 0013a056 */
std::random_device::_M_fini();
*(int1 *)(in_FS_OFFSET + -4) = 1;
}
if ((char)in_FS_OFFSET[-1] == '\0') {
random_lip();
}
local_13b0 = 0.0;
local_13b8 = 0;
lVar1 = *in_FS_OFFSET;
this = (normal_distribution<float> *)(lVar1 + -0x18);
lVar4 = 0;
do {
fVar6 = std::normal_distribution<float>::operator()
(this,(mersenne_twister_engine *)(lVar1 + -0x13a8),(param_type *)this);
*(float *)((long)&local_13b8 + lVar4) = fVar6;
lVar4 = lVar4 + 4;
} while (lVar4 != 0xc);
auVar7._8_8_ = 0;
auVar7._0_8_ = local_13b8;
auVar9._0_4_ = (float)local_13b8 * (float)local_13b8;
fVar6 = (float)(local_13b8 >> 0x20);
auVar9._4_4_ = fVar6 * fVar6;
auVar9._8_8_ = 0;
auVar5 = vmovshdup_avx(auVar9);
fVar6 = auVar9._0_4_ + auVar5._0_4_ + local_13b0 * local_13b0;
if (0.0 < fVar6) {
auVar5 = vsqrtss_avx(ZEXT416((uint)fVar6),ZEXT416((uint)fVar6));
fVar6 = auVar5._0_4_;
auVar5._4_4_ = fVar6;
auVar5._0_4_ = fVar6;
auVar5._8_4_ = fVar6;
auVar5._12_4_ = fVar6;
auVar5 = vdivps_avx(auVar7,auVar5);
local_13b8 = vmovlps_avx(auVar5);
local_13b0 = local_13b0 / fVar6;
}
auVar8._8_8_ = 0;
auVar8._0_8_ = local_13b8;
auVar2._4_4_ = DAT_0038f034;
auVar2._0_4_ = DAT_0038f034;
auVar2._8_4_ = DAT_0038f034;
auVar2._12_4_ = DAT_0038f034;
auVar5 = vmulps_avx512vl(auVar8,auVar2);
vmovlps_avx(auVar5);
lip(in_RDI,in_RSI);
return in_RDI;
}
|
|
12,441
|
string_view::operator==(string_view const&) const
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
bool operator==(const string_view & other) const {
std::string this_str = *this;
std::string other_str = other;
return this_str == other_str;
}
|
O3
|
cpp
|
string_view::operator==(string_view const&) const:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rcx
subq %rdx, %rcx
leaq 0x8(%rsp), %rdi
callq 0x186f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rcx
subq %rdx, %rcx
leaq 0x28(%rsp), %rdi
callq 0x186f0
movq 0x10(%rsp), %rdx
cmpq 0x30(%rsp), %rdx
jne 0xa5c60
movq 0x28(%rsp), %r14
testq %rdx, %rdx
je 0xa5c69
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x186e0
testl %eax, %eax
sete %bl
jmp 0xa5c6b
movq 0x28(%rsp), %r14
xorl %ebx, %ebx
jmp 0xa5c6b
movb $0x1, %bl
leaq 0x38(%rsp), %rax
cmpq %rax, %r14
je 0xa5c85
movq 0x38(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x186a0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa5ca0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa5cc8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rdi
callq 0x18b90
|
_ZNK11string_vieweqERKS_:
push r14
push rbx
sub rsp, 48h
mov rbx, rsi
mov rsi, [rdi]
mov rdx, [rdi+8]
mov rcx, [rdi+10h]
sub rcx, rdx
lea rdi, [rsp+58h+var_50]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rsi, [rbx]
mov rdx, [rbx+8]
mov rcx, [rbx+10h]
sub rcx, rdx
lea rdi, [rsp+58h+var_30]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdx, [rsp+58h+var_48]
cmp rdx, [rsp+58h+var_28]
jnz short loc_A5C60
mov r14, [rsp+58h+var_30]
test rdx, rdx
jz short loc_A5C69
mov rdi, [rsp+58h+var_50]
mov rsi, r14
call _bcmp
test eax, eax
setz bl
jmp short loc_A5C6B
loc_A5C60:
mov r14, [rsp+58h+var_30]
xor ebx, ebx
jmp short loc_A5C6B
loc_A5C69:
mov bl, 1
loc_A5C6B:
lea rax, [rsp+58h+var_20]
cmp r14, rax
jz short loc_A5C85
mov rsi, [rsp+58h+var_20]
inc rsi; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_A5C85:
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A5CA0
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A5CA0:
mov eax, ebx
add rsp, 48h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A5CC8
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A5CC8:
mov rdi, rbx
call __Unwind_Resume
|
long long string_view::operator==(_QWORD *a1, _QWORD *a2)
{
long long *v3; // r14
long long *v5; // [rsp+8h] [rbp-50h] BYREF
void *v6; // [rsp+10h] [rbp-48h]
long long v7; // [rsp+18h] [rbp-40h] BYREF
void *v8[2]; // [rsp+28h] [rbp-30h] BYREF
long long v9; // [rsp+38h] [rbp-20h] BYREF
std::string::substr(&v5, *a1, a1[1], a1[2] - a1[1]);
std::string::substr(v8, *a2, a2[1], a2[2] - a2[1]);
if ( v6 == v8[1] )
{
v3 = (long long *)v8[0];
if ( v6 )
LOBYTE(a2) = (unsigned int)bcmp(v5, v8[0]) == 0;
else
LOBYTE(a2) = 1;
}
else
{
v3 = (long long *)v8[0];
LODWORD(a2) = 0;
}
if ( v3 != &v9 )
operator delete(v3, v9 + 1);
if ( v5 != &v7 )
operator delete(v5, v7 + 1);
return (unsigned int)a2;
}
|
operator==:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RSI
MOV RSI,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI + 0x10]
SUB RCX,RDX
LEA RDI,[RSP + 0x8]
CALL 0x001186f0
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
SUB RCX,RDX
LAB_001a5c2c:
LEA RDI,[RSP + 0x28]
CALL 0x001186f0
LAB_001a5c36:
MOV RDX,qword ptr [RSP + 0x10]
CMP RDX,qword ptr [RSP + 0x30]
JNZ 0x001a5c60
MOV R14,qword ptr [RSP + 0x28]
TEST RDX,RDX
JZ 0x001a5c69
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R14
CALL 0x001186e0
TEST EAX,EAX
SETZ BL
JMP 0x001a5c6b
LAB_001a5c60:
MOV R14,qword ptr [RSP + 0x28]
XOR EBX,EBX
JMP 0x001a5c6b
LAB_001a5c69:
MOV BL,0x1
LAB_001a5c6b:
LEA RAX,[RSP + 0x38]
CMP R14,RAX
JZ 0x001a5c85
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
MOV RDI,R14
CALL 0x001186a0
LAB_001a5c85:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a5ca0
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186a0
LAB_001a5ca0:
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP R14
RET
|
/* string_view::TEMPNAMEPLACEHOLDERVALUE(string_view const&) const */
ulong __thiscall string_view::operator==(string_view *this,string_view *param_1)
{
int iVar1;
int7 uVar3;
ulong uVar2;
long *local_50;
size_t local_48;
long local_40 [2];
long *local_30;
size_t local_28;
long local_20 [2];
std::__cxx11::string::substr((ulong)&local_50,*(ulong *)this);
/* try { // try from 001a5c2c to 001a5c35 has its CatchHandler @ 001a5caa */
std::__cxx11::string::substr((ulong)&local_30,*(ulong *)param_1);
if (local_48 == local_28) {
uVar3 = (int7)((ulong)param_1 >> 8);
if (local_48 == 0) {
uVar2 = CONCAT71(uVar3,1);
}
else {
iVar1 = bcmp(local_50,local_30,local_48);
uVar2 = CONCAT71(uVar3,iVar1 == 0);
}
}
else {
uVar2 = 0;
}
if (local_30 != local_20) {
operator_delete(local_30,local_20[0] + 1);
}
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
return uVar2 & 0xffffffff;
}
|
|
12,442
|
nglog::ReprintFatalMessage()
|
ng-log[P]ng-log/src/logging.cc
|
void ReprintFatalMessage() {
if (fatal_message[0]) {
const size_t n = strlen(fatal_message);
if (!FLAGS_logtostderr) {
// Also write to stderr (don't color to avoid terminal checks)
WriteToStderr(fatal_message, n);
}
LogDestination::LogToAllLogfiles(NGLOG_ERROR, fatal_time, fatal_message, n);
}
}
|
O1
|
cpp
|
nglog::ReprintFatalMessage():
cmpb $0x0, 0x35f24(%rip) # 0x41bd0
je 0xbce6
pushq %rbx
leaq 0x35f1a(%rip), %rdi # 0x41bd0
callq 0x7200
movq %rax, %rbx
leaq 0x26d9d(%rip), %rax # 0x32a62
cmpb $0x0, (%rax)
je 0xbce7
leaq 0x35fff(%rip), %rsi # 0x41cd0
leaq 0x35ef8(%rip), %rdx # 0x41bd0
movl $0x2, %edi
movq %rbx, %rcx
popq %rbx
jmp 0x11768
retq
movq %rbx, %rdi
callq 0x7fed
jmp 0xbcca
nop
|
_ZN5nglog19ReprintFatalMessageEv:
cmp cs:_ZN5nglogL13fatal_messageE, 0; nglog::fatal_message
jz short locret_BCE6
push rbx
lea rdi, _ZN5nglogL13fatal_messageE; nglog::fatal_message
call _strlen
mov rbx, rax
lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr
cmp byte ptr [rax], 0
jz short loc_BCE7
loc_BCCA:
lea rsi, _ZN5nglogL10fatal_timeE; nglog::fatal_time
lea rdx, _ZN5nglogL13fatal_messageE; nglog::fatal_message
mov edi, 2
mov rcx, rbx
pop rbx
jmp _ZN5nglog14LogDestination16LogToAllLogfilesENS_11LogSeverityERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEPKcm; nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,char const*,ulong)
locret_BCE6:
retn
loc_BCE7:
mov rdi, rbx
call _ZN5nglog19ReprintFatalMessageEv_cold_1; nglog::ReprintFatalMessage(void) [clone]
jmp short loc_BCCA
|
void nglog::ReprintFatalMessage(nglog *this)
{
long long v1; // rbx
if ( nglog::fatal_message )
{
v1 = strlen(&nglog::fatal_message);
if ( !fLB::FLAGS_logtostderr )
nglog::ReprintFatalMessage(v1);
nglog::LogDestination::LogToAllLogfiles(2LL, &nglog::fatal_time, &nglog::fatal_message, v1);
}
}
|
ReprintFatalMessage:
CMP byte ptr [0x00141bd0],0x0
JZ 0x0010bce6
PUSH RBX
LEA RDI,[0x141bd0]
CALL 0x00107200
MOV RBX,RAX
LEA RAX,[0x132a62]
CMP byte ptr [RAX],0x0
JZ 0x0010bce7
LAB_0010bcca:
LEA RSI,[0x141cd0]
LEA RDX,[0x141bd0]
MOV EDI,0x2
MOV RCX,RBX
POP RBX
JMP 0x00111768
LAB_0010bce6:
RET
LAB_0010bce7:
MOV RDI,RBX
CALL 0x00107fed
JMP 0x0010bcca
|
/* nglog::ReprintFatalMessage() */
void nglog::ReprintFatalMessage(void)
{
nglog *this;
if (fatal_message != '\0') {
this = (nglog *)strlen(&fatal_message);
if (fLB::FLAGS_logtostderr == '\0') {
ReprintFatalMessage(this);
}
LogDestination::LogToAllLogfiles(2,&fatal_time,&fatal_message,this);
return;
}
return;
}
|
|
12,443
|
void testing::internal::PrintCharAndCodeTo<wchar_t>(wchar_t, std::ostream*)
|
seiftnesse[P]memoryallocator/build_O2/_deps/googletest-src/googletest/src/gtest-printers.cc
|
void PrintCharAndCodeTo(Char c, ostream* os) {
// First, print c as a literal in the most readable form we can find.
*os << GetCharWidthPrefix(c) << "'";
const CharFormat format = PrintAsCharLiteralTo(c, os);
*os << "'";
// To aid user debugging, we also print c's code in decimal, unless
// it's 0 (in which case c was printed as '\\0', making the code
// obvious).
if (c == 0) return;
*os << " (" << static_cast<int>(c);
// For more convenience, we print c's code again in hexadecimal,
// unless c was already printed in the form '\x##' or the code is in
// [1, 9].
if (format == kHexEscape || (1 <= c && c <= 9)) {
// Do nothing.
} else {
*os << ", 0x" << String::FormatHexInt(static_cast<int>(c));
}
*os << ")";
}
|
O2
|
cpp
|
void testing::internal::PrintCharAndCodeTo<wchar_t>(wchar_t, std::ostream*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movl %edi, %r14d
leaq 0x993e(%rip), %rsi # 0x3079f
movq %rbx, %rdi
callq 0x94b0
leaq 0xbd52(%rip), %rsi # 0x32bc2
movq %rax, %rdi
callq 0x94b0
cmpl $0xd, %r14d
ja 0x26e9a
movl %r14d, %eax
leaq 0xb318(%rip), %rcx # 0x321a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xc163(%rip), %rsi # 0x32ffb
jmp 0x26f10
cmpl $0x27, %r14d
je 0x26f09
cmpl $0x5c, %r14d
jne 0x26eaf
leaq 0xda99(%rip), %rsi # 0x34946
jmp 0x26f10
leal -0x20(%r14), %eax
cmpl $0x5e, %eax
ja 0x26fa3
movsbl %r14b, %esi
movq %rbx, %rdi
callq 0x9600
jmp 0x26f18
leaq 0xda7b(%rip), %rsi # 0x3494c
jmp 0x26f10
leaq 0xca84(%rip), %rsi # 0x3395e
jmp 0x26f10
leaq 0xca7e(%rip), %rsi # 0x33961
jmp 0x26f10
leaq 0xda5d(%rip), %rsi # 0x34949
jmp 0x26f10
leaq 0xca66(%rip), %rsi # 0x3395b
jmp 0x26f10
leaq 0xca57(%rip), %rsi # 0x33955
jmp 0x26f10
leaq 0xca51(%rip), %rsi # 0x33958
jmp 0x26f10
leaq 0xda33(%rip), %rsi # 0x34943
movq %rbx, %rdi
callq 0x94b0
xorl %ebp, %ebp
leaq 0xbca1(%rip), %rsi # 0x32bc2
movq %rbx, %rdi
callq 0x94b0
testl %r14d, %r14d
je 0x26f96
leaq 0x9849(%rip), %rsi # 0x3077e
movq %rbx, %rdi
callq 0x94b0
movq %rax, %rdi
movl %r14d, %esi
callq 0x99b0
cmpl $0xa, %r14d
setb %al
orb %bpl, %al
jne 0x26f87
leaq 0xd9e3(%rip), %rsi # 0x3493e
movq %rbx, %rdi
callq 0x94b0
movq %rax, %r15
movq %rsp, %r12
movq %r12, %rdi
movl %r14d, %esi
callq 0x1a3a8
movq %r15, %rdi
movq %r12, %rsi
callq 0x9440
movq %rsp, %rdi
callq 0x9af8
leaq 0xc47e(%rip), %rsi # 0x3340c
movq %rbx, %rdi
callq 0x94b0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ebp
leaq 0xd99a(%rip), %rsi # 0x3494f
movq %rbx, %rdi
callq 0x94b0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl 0x18(%rax,%rdx), %esi
andl $-0x4b, %esi
orl $0x8, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
orl $0x4000, 0x18(%rax,%rcx) # imm = 0x4000
movq %rax, %rdi
movl %r14d, %esi
callq 0x99b0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl %ebp, 0x18(%rbx,%rax)
movb $0x1, %bpl
jmp 0x26f1a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x9af8
movq %rbx, %rdi
callq 0x99d0
nop
|
_ZN7testing8internal18PrintCharAndCodeToIwEEvT_PSo:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov rbx, rsi
mov r14d, edi
lea rsi, aNull_0+3; "L"
mov rdi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, aUnknownTypePar+25h; "'"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
cmp r14d, 0Dh; switch 14 cases
ja short def_26E8F; jumptable 0000000000026E8F default case
mov eax, r14d
lea rcx, jpt_26E8F
movsxd rax, ds:(jpt_26E8F - 321A0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_26E91:
lea rsi, a0; jumptable 0000000000026E8F case 0
jmp short loc_26F10
def_26E8F:
cmp r14d, 27h ; '''; jumptable 0000000000026E8F default case
jz short loc_26F09
cmp r14d, 5Ch ; '\'
jnz short loc_26EAF; jumptable 0000000000026E8F cases 1-6
lea rsi, asc_34946; "\\\\"
jmp short loc_26F10
loc_26EAF:
lea eax, [r14-20h]; jumptable 0000000000026E8F cases 1-6
cmp eax, 5Eh ; '^'
ja loc_26FA3
movsx esi, r14b
mov rdi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
jmp short loc_26F18
loc_26ECA:
lea rsi, aV; jumptable 0000000000026E8F case 11
jmp short loc_26F10
loc_26ED3:
lea rsi, asc_3395E; jumptable 0000000000026E8F case 12
jmp short loc_26F10
loc_26EDC:
lea rsi, aR; jumptable 0000000000026E8F case 13
jmp short loc_26F10
loc_26EE5:
lea rsi, aA_0; jumptable 0000000000026E8F case 7
jmp short loc_26F10
loc_26EEE:
lea rsi, aN; jumptable 0000000000026E8F case 10
jmp short loc_26F10
loc_26EF7:
lea rsi, aB; jumptable 0000000000026E8F case 8
jmp short loc_26F10
loc_26F00:
lea rsi, aT; jumptable 0000000000026E8F case 9
jmp short loc_26F10
loc_26F09:
lea rsi, asc_34943; "\\'"
loc_26F10:
mov rdi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_26F18:
xor ebp, ebp
loc_26F1A:
lea rsi, aUnknownTypePar+25h; "'"
mov rdi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
test r14d, r14d
jz short loc_26F96
lea rsi, aExpected+9; " ("
mov rdi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov esi, r14d
call __ZNSolsEi; std::ostream::operator<<(int)
cmp r14d, 0Ah
setb al
or al, bpl
jnz short loc_26F87
lea rsi, a0x; ", 0x"
mov rdi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov r15, rax
mov r12, rsp
mov rdi, r12
mov esi, r14d
call _ZN7testing8internal6String15FormatHexUInt32B5cxx11Ej; testing::internal::String::FormatHexUInt32(uint)
mov rdi, r15
mov rsi, r12
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_26F87:
lea rsi, aTeardowntestsu+12h; ")"
mov rdi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_26F96:
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_26FA3:
mov rax, [rbx]
mov rax, [rax-18h]
mov ebp, [rbx+rax+18h]
lea rsi, asc_3494F; "\\x"
mov rdi, rbx
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rcx, [rax]
mov rdx, [rcx-18h]
mov esi, [rax+rdx+18h]
and esi, 0FFFFFFB5h
or esi, 8
mov [rax+rdx+18h], esi
mov rcx, [rcx-18h]
or dword ptr [rax+rcx+18h], 4000h
mov rdi, rax
mov esi, r14d
call __ZNSolsEi; std::ostream::operator<<(int)
mov rax, [rbx]
mov rax, [rax-18h]
mov [rbx+rax+18h], ebp
mov bpl, 1
jmp loc_26F1A
mov rbx, rax
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
long long testing::internal::PrintCharAndCodeTo<wchar_t>(unsigned int a1, _QWORD *a2)
{
long long v3; // rax
const char *v4; // rsi
char v5; // bp
long long result; // rax
long long v7; // rax
long long v8; // r15
int v9; // ebp
long long *v10; // rax
long long v11; // rcx
_BYTE v12[72]; // [rsp+0h] [rbp-48h] BYREF
v3 = std::operator<<<std::char_traits<char>>(a2, "L");
std::operator<<<std::char_traits<char>>(v3, "'");
switch ( a1 )
{
case 0u:
v4 = "\\0";
goto LABEL_16;
case 1u:
case 2u:
case 3u:
case 4u:
case 5u:
case 6u:
goto LABEL_6;
case 7u:
v4 = "\\a";
goto LABEL_16;
case 8u:
v4 = "\\b";
goto LABEL_16;
case 9u:
v4 = "\\t";
goto LABEL_16;
case 0xAu:
v4 = "\\n";
goto LABEL_16;
case 0xBu:
v4 = "\\v";
goto LABEL_16;
case 0xCu:
v4 = "\\f";
goto LABEL_16;
case 0xDu:
v4 = "\\r";
goto LABEL_16;
default:
if ( a1 == 39 )
{
v4 = "\\'";
goto LABEL_16;
}
if ( a1 == 92 )
{
v4 = "\\\\";
LABEL_16:
std::operator<<<std::char_traits<char>>(a2, v4);
goto LABEL_17;
}
LABEL_6:
if ( a1 - 32 <= 0x5E )
{
std::operator<<<std::char_traits<char>>(a2, (unsigned int)(char)a1);
LABEL_17:
v5 = 0;
goto LABEL_18;
}
v9 = *(_DWORD *)((char *)a2 + *(_QWORD *)(*a2 - 24LL) + 24);
v10 = (long long *)std::operator<<<std::char_traits<char>>(a2, "\\x");
v11 = *v10;
*(_DWORD *)((char *)v10 + *(_QWORD *)(*v10 - 24) + 24) = *(_DWORD *)((_BYTE *)v10 + *(_QWORD *)(*v10 - 24) + 24) & 0xFFFFFFB5 | 8;
*(_DWORD *)((char *)v10 + *(_QWORD *)(v11 - 24) + 24) |= 0x4000u;
std::ostream::operator<<(v10, a1);
*(_DWORD *)((char *)a2 + *(_QWORD *)(*a2 - 24LL) + 24) = v9;
v5 = 1;
LABEL_18:
result = std::operator<<<std::char_traits<char>>(a2, "'");
if ( a1 )
{
v7 = std::operator<<<std::char_traits<char>>(a2, " (");
std::ostream::operator<<(v7, a1);
if ( !((unsigned __int8)v5 | (a1 < 0xA)) )
{
v8 = std::operator<<<std::char_traits<char>>(a2, ", 0x");
testing::internal::String::FormatHexUInt32[abi:cxx11]((long long)v12, a1);
std::operator<<<char>(v8, v12);
std::string::~string(v12);
}
return std::operator<<<std::char_traits<char>>(a2, ")");
}
return result;
}
}
|
PrintCharAndCodeTo<wchar_t>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RBX,RSI
MOV R14D,EDI
LEA RSI,[0x13079f]
MOV RDI,RBX
CALL 0x001094b0
LEA RSI,[0x132bc2]
MOV RDI,RAX
CALL 0x001094b0
CMP R14D,0xd
JA 0x00126e9a
MOV EAX,R14D
LEA RCX,[0x1321a0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RSI,[0x132ffb]
JMP 0x00126f10
default:
CMP R14D,0x27
JZ 0x00126f09
CMP R14D,0x5c
JNZ 0x00126eaf
LEA RSI,[0x134946]
JMP 0x00126f10
caseD_1:
LEA EAX,[R14 + -0x20]
CMP EAX,0x5e
JA 0x00126fa3
MOVSX ESI,R14B
MOV RDI,RBX
CALL 0x00109600
JMP 0x00126f18
caseD_b:
LEA RSI,[0x13494c]
JMP 0x00126f10
caseD_c:
LEA RSI,[0x13395e]
JMP 0x00126f10
caseD_d:
LEA RSI,[0x133961]
JMP 0x00126f10
caseD_7:
LEA RSI,[0x134949]
JMP 0x00126f10
caseD_a:
LEA RSI,[0x13395b]
JMP 0x00126f10
caseD_8:
LEA RSI,[0x133955]
JMP 0x00126f10
caseD_9:
LEA RSI,[0x133958]
JMP 0x00126f10
LAB_00126f09:
LEA RSI,[0x134943]
LAB_00126f10:
MOV RDI,RBX
CALL 0x001094b0
LAB_00126f18:
XOR EBP,EBP
LAB_00126f1a:
LEA RSI,[0x132bc2]
MOV RDI,RBX
CALL 0x001094b0
TEST R14D,R14D
JZ 0x00126f96
LEA RSI,[0x13077e]
MOV RDI,RBX
CALL 0x001094b0
MOV RDI,RAX
MOV ESI,R14D
CALL 0x001099b0
CMP R14D,0xa
SETC AL
OR AL,BPL
JNZ 0x00126f87
LEA RSI,[0x13493e]
MOV RDI,RBX
CALL 0x001094b0
MOV R15,RAX
MOV R12,RSP
MOV RDI,R12
MOV ESI,R14D
CALL 0x0011a3a8
LAB_00126f74:
MOV RDI,R15
MOV RSI,R12
CALL 0x00109440
LAB_00126f7f:
MOV RDI,RSP
CALL 0x00109af8
LAB_00126f87:
LEA RSI,[0x13340c]
MOV RDI,RBX
CALL 0x001094b0
LAB_00126f96:
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00126fa3:
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
MOV EBP,dword ptr [RBX + RAX*0x1 + 0x18]
LEA RSI,[0x13494f]
MOV RDI,RBX
CALL 0x001094b0
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RCX + -0x18]
MOV ESI,dword ptr [RAX + RDX*0x1 + 0x18]
AND ESI,0xffffffb5
OR ESI,0x8
MOV dword ptr [RAX + RDX*0x1 + 0x18],ESI
MOV RCX,qword ptr [RCX + -0x18]
OR dword ptr [RAX + RCX*0x1 + 0x18],0x4000
MOV RDI,RAX
MOV ESI,R14D
CALL 0x001099b0
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
MOV dword ptr [RBX + RAX*0x1 + 0x18],EBP
MOV BPL,0x1
JMP 0x00126f1a
|
/* void testing::internal::PrintCharAndCodeTo<wchar_t>(wchar_t, std::ostream*) */
void testing::internal::PrintCharAndCodeTo<wchar_t>(wchar_t param_1,ostream *param_2)
{
int4 uVar1;
long lVar2;
long lVar3;
bool bVar4;
ostream *poVar5;
char *pcVar6;
string asStack_48 [32];
poVar5 = std::operator<<(param_2,"L");
std::operator<<(poVar5,"\'");
switch(param_1) {
case L'\0':
pcVar6 = "\\0";
break;
case L'\x01':
case L'\x02':
case L'\x03':
case L'\x04':
case L'\x05':
case L'\x06':
switchD_00126e8f_caseD_1:
if (0x5e < (uint)(param_1 + L'\xffffffe0')) {
uVar1 = *(int4 *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x18);
poVar5 = std::operator<<(param_2,"\\x");
lVar2 = *(long *)poVar5;
lVar3 = *(long *)(lVar2 + -0x18);
*(uint *)(poVar5 + lVar3 + 0x18) = *(uint *)(poVar5 + lVar3 + 0x18) & 0xffffffb5 | 8;
*(uint *)(poVar5 + *(long *)(lVar2 + -0x18) + 0x18) =
*(uint *)(poVar5 + *(long *)(lVar2 + -0x18) + 0x18) | 0x4000;
std::ostream::operator<<(poVar5,param_1);
*(int4 *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x18) = uVar1;
bVar4 = true;
goto LAB_00126f1a;
}
std::operator<<(param_2,(char)param_1);
goto LAB_00126f18;
case L'\a':
pcVar6 = "\\a";
break;
case L'\b':
pcVar6 = "\\b";
break;
case L'\t':
pcVar6 = "\\t";
break;
case L'\n':
pcVar6 = "\\n";
break;
case L'\v':
pcVar6 = "\\v";
break;
case L'\f':
pcVar6 = "\\f";
break;
case L'\r':
pcVar6 = "\\r";
break;
default:
if (param_1 == L'\'') {
pcVar6 = "\\\'";
}
else {
if (param_1 != L'\\') goto switchD_00126e8f_caseD_1;
pcVar6 = "\\\\";
}
}
std::operator<<(param_2,pcVar6);
LAB_00126f18:
bVar4 = false;
LAB_00126f1a:
std::operator<<(param_2,"\'");
if (param_1 != L'\0') {
poVar5 = std::operator<<(param_2," (");
std::ostream::operator<<(poVar5,param_1);
if (9 < (uint)param_1 && !bVar4) {
poVar5 = std::operator<<(param_2,", 0x");
String::FormatHexUInt32_abi_cxx11_((uint)asStack_48);
/* try { // try from 00126f74 to 00126f7e has its CatchHandler @ 00126ffc */
std::operator<<(poVar5,asStack_48);
std::__cxx11::string::~string(asStack_48);
}
std::operator<<(param_2,")");
}
return;
}
|
|
12,444
|
promptTextColumnLen(char const*, unsigned long)
|
llama.cpp/examples/run/linenoise.cpp/linenoise.cpp
|
static size_t promptTextColumnLen(const char * prompt, size_t plen) {
char buf[LINENOISE_MAX_LINE];
size_t buf_len = 0;
size_t off = 0;
while (off < plen) {
size_t len;
if (isAnsiEscape(prompt + off, plen - off, &len)) {
off += len;
continue;
}
buf[buf_len++] = prompt[off++];
}
return columnPos(buf, buf_len, buf_len);
}
|
O3
|
cpp
|
promptTextColumnLen(char const*, unsigned long):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1010, %rsp # imm = 0x1010
testq %rsi, %rsi
je 0x33e44
xorl %eax, %eax
movabsq $0x1020000c06ff, %rcx # imm = 0x1020000C06FF
xorl %ebx, %ebx
leaq (%rdi,%rax), %rdx
movq %rsi, %r9
subq %rax, %r9
cmpq $0x3, %r9
jb 0x33dd0
cmpw $0x5b1b, (%rdx) # imm = 0x5B1B
je 0x33de9
movb (%rdx), %dl
movb %dl, 0x10(%rsp,%rbx)
incq %rbx
movl $0x1, %r8d
addq %r8, %rax
cmpq %rsi, %rax
jb 0x33db9
jmp 0x33e0e
movl $0x2, %r8d
cmpq %r8, %r9
je 0x33dd0
movzbl (%rdx,%r8), %r10d
incq %r8
addl $-0x41, %r10d
cmpl $0x2c, %r10d
ja 0x33def
btq %r10, %rcx
jae 0x33def
jmp 0x33ddf
testq %rbx, %rbx
je 0x33e44
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
xorl %r13d, %r13d
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq *0xd7a9b(%rip) # 0x10b8d0
addq %rax, %r13
addq 0x8(%rsp), %r14
cmpq %rbx, %r13
jb 0x33e23
jmp 0x33e47
xorl %r14d, %r14d
movq %r14, %rax
addq $0x1010, %rsp # imm = 0x1010
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
_ZL19promptTextColumnLenPKcm:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1010h
test rsi, rsi
jz loc_33E44
xor eax, eax
mov rcx, 1020000C06FFh
xor ebx, ebx
loc_33DB9:
lea rdx, [rdi+rax]
mov r9, rsi
sub r9, rax
cmp r9, 3
jb short loc_33DD0
cmp word ptr [rdx], 5B1Bh
jz short loc_33DE9
loc_33DD0:
mov dl, [rdx]
mov [rsp+rbx+1038h+var_1028], dl
inc rbx
mov r8d, 1
loc_33DDF:
add rax, r8
cmp rax, rsi
jb short loc_33DB9
jmp short loc_33E0E
loc_33DE9:
mov r8d, 2
loc_33DEF:
cmp r9, r8
jz short loc_33DD0
movzx r10d, byte ptr [rdx+r8]
inc r8
add r10d, 0FFFFFFBFh
cmp r10d, 2Ch ; ','
ja short loc_33DEF
bt rcx, r10
jnb short loc_33DEF
jmp short loc_33DDF
loc_33E0E:
test rbx, rbx
jz short loc_33E44
xor r14d, r14d
lea r15, [rsp+1038h+var_1028]
lea r12, [rsp+1038h+var_1030]
xor r13d, r13d
loc_33E23:
mov rdi, r15; char *
mov rsi, rbx; unsigned __int64
mov rdx, r13; unsigned __int64
mov rcx, r12; unsigned __int64 *
call cs:_ZL11nextCharLen; defaultNextCharLen(char const*,ulong,ulong,ulong *)
add r13, rax
add r14, [rsp+1038h+var_1030]
cmp r13, rbx
jb short loc_33E23
jmp short loc_33E47
loc_33E44:
xor r14d, r14d
loc_33E47:
mov rax, r14
add rsp, 1010h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
long long promptTextColumnLen(const char *a1, unsigned long long a2)
{
unsigned long long v2; // rax
long long v3; // rcx
unsigned long long v4; // rbx
const char *v5; // rdx
long long v6; // r8
int v7; // r10d
unsigned long long v8; // r10
long long v9; // r14
unsigned long long v10; // r13
unsigned long long v12; // [rsp+8h] [rbp-1030h] BYREF
char v13[4136]; // [rsp+10h] [rbp-1028h] BYREF
if ( !a2 )
return 0LL;
v2 = 0LL;
v3 = 0x1020000C06FFLL;
v4 = 0LL;
do
{
v5 = &a1[v2];
if ( a2 - v2 >= 3 && *(_WORD *)v5 == 23323 )
{
v6 = 2LL;
while ( a2 - v2 != v6 )
{
v7 = (unsigned __int8)v5[v6++];
v8 = (unsigned int)(v7 - 65);
if ( (unsigned int)v8 <= 0x2C && _bittest64(&v3, v8) )
goto LABEL_6;
}
}
v13[v4++] = *v5;
v6 = 1LL;
LABEL_6:
v2 += v6;
}
while ( v2 < a2 );
if ( !v4 )
return 0LL;
v9 = 0LL;
v10 = 0LL;
do
{
v10 += nextCharLen(v13, v4, v10, &v12);
v9 += v12;
}
while ( v10 < v4 );
return v9;
}
|
promptTextColumnLen:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1010
TEST RSI,RSI
JZ 0x00133e44
XOR EAX,EAX
MOV RCX,0x1020000c06ff
XOR EBX,EBX
LAB_00133db9:
LEA RDX,[RDI + RAX*0x1]
MOV R9,RSI
SUB R9,RAX
CMP R9,0x3
JC 0x00133dd0
CMP word ptr [RDX],0x5b1b
JZ 0x00133de9
LAB_00133dd0:
MOV DL,byte ptr [RDX]
MOV byte ptr [RSP + RBX*0x1 + 0x10],DL
INC RBX
MOV R8D,0x1
LAB_00133ddf:
ADD RAX,R8
CMP RAX,RSI
JC 0x00133db9
JMP 0x00133e0e
LAB_00133de9:
MOV R8D,0x2
LAB_00133def:
CMP R9,R8
JZ 0x00133dd0
MOVZX R10D,byte ptr [RDX + R8*0x1]
INC R8
ADD R10D,-0x41
CMP R10D,0x2c
JA 0x00133def
BT RCX,R10
JNC 0x00133def
JMP 0x00133ddf
LAB_00133e0e:
TEST RBX,RBX
JZ 0x00133e44
XOR R14D,R14D
LEA R15,[RSP + 0x10]
LEA R12,[RSP + 0x8]
XOR R13D,R13D
LAB_00133e23:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R13
MOV RCX,R12
CALL qword ptr [0x0020b8d0]
ADD R13,RAX
ADD R14,qword ptr [RSP + 0x8]
CMP R13,RBX
JC 0x00133e23
JMP 0x00133e47
LAB_00133e44:
XOR R14D,R14D
LAB_00133e47:
MOV RAX,R14
ADD RSP,0x1010
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* promptTextColumnLen(char const*, unsigned long) */
long promptTextColumnLen(char *param_1,ulong param_2)
{
short *psVar1;
byte *pbVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
uint uVar7;
long lVar8;
long local_1030;
int1 local_1028 [4096];
if (param_2 != 0) {
uVar3 = 0;
uVar5 = 0;
do {
psVar1 = (short *)(param_1 + uVar3);
if ((param_2 - uVar3 < 3) || (*psVar1 != 0x5b1b)) {
LAB_00133dd0:
local_1028[uVar5] = (char)*psVar1;
uVar5 = uVar5 + 1;
uVar6 = 1;
}
else {
uVar6 = 2;
do {
if (param_2 - uVar3 == uVar6) goto LAB_00133dd0;
pbVar2 = (byte *)((long)psVar1 + uVar6);
uVar6 = uVar6 + 1;
uVar7 = *pbVar2 - 0x41;
} while ((0x2c < uVar7) || ((0x1020000c06ffU >> ((ulong)uVar7 & 0x3f) & 1) == 0));
}
uVar3 = uVar3 + uVar6;
} while (uVar3 < param_2);
if (uVar5 != 0) {
lVar8 = 0;
uVar3 = 0;
do {
lVar4 = (*(code *)nextCharLen)(local_1028,uVar5,uVar3,&local_1030);
uVar3 = uVar3 + lVar4;
lVar8 = lVar8 + local_1030;
} while (uVar3 < uVar5);
return lVar8;
}
}
return 0;
}
|
|
12,445
|
mj_clearEfc
|
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_io.h
|
static inline void mj_clearEfc(mjData* d) {
#define X(type, name, nr, nc) d->name = NULL;
MJDATA_ARENA_POINTERS
#undef X
d->nefc = 0;
d->nisland = 0;
d->contact = (mjContact*) d->arena;
}
|
O0
|
c
|
mj_clearEfc:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq $0x0, 0x27a58(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27a60(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27a68(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27a70(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27a78(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27a80(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27a88(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27a90(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27a98(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27aa0(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27aa8(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27ab0(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27ab8(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27ac0(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27ac8(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27ad0(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27ad8(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27ae0(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27ae8(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27af0(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27af8(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b68(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b70(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b78(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b80(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b88(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b48(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b50(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b58(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b60(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b00(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b08(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b10(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b18(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b20(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b28(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b30(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b38(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x27b40(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x2773c(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x27748(%rax)
movq -0x8(%rsp), %rax
movq 0x27770(%rax), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x27a58(%rax)
retq
nopl (%rax)
|
mj_clearEfc_0:
mov [rsp+var_8], rdi
mov rax, [rsp+var_8]
mov qword ptr [rax+27A58h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27A60h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27A68h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27A70h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27A78h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27A80h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27A88h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27A90h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27A98h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27AA0h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27AA8h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27AB0h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27AB8h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27AC0h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27AC8h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27AD0h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27AD8h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27AE0h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27AE8h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27AF0h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27AF8h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B68h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B70h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B78h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B80h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B88h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B48h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B50h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B58h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B60h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B00h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B08h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B10h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B18h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B20h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B28h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B30h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B38h], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+27B40h], 0
mov rax, [rsp+var_8]
mov dword ptr [rax+2773Ch], 0
mov rax, [rsp+var_8]
mov dword ptr [rax+27748h], 0
mov rax, [rsp+var_8]
mov rcx, [rax+27770h]
mov rax, [rsp+var_8]
mov [rax+27A58h], rcx
retn
|
long long mj_clearEfc_0(long long a1)
{
long long result; // rax
*(_QWORD *)(a1 + 162392) = 0LL;
*(_QWORD *)(a1 + 162400) = 0LL;
*(_QWORD *)(a1 + 162408) = 0LL;
*(_QWORD *)(a1 + 162416) = 0LL;
*(_QWORD *)(a1 + 162424) = 0LL;
*(_QWORD *)(a1 + 162432) = 0LL;
*(_QWORD *)(a1 + 162440) = 0LL;
*(_QWORD *)(a1 + 162448) = 0LL;
*(_QWORD *)(a1 + 162456) = 0LL;
*(_QWORD *)(a1 + 162464) = 0LL;
*(_QWORD *)(a1 + 162472) = 0LL;
*(_QWORD *)(a1 + 162480) = 0LL;
*(_QWORD *)(a1 + 162488) = 0LL;
*(_QWORD *)(a1 + 162496) = 0LL;
*(_QWORD *)(a1 + 162504) = 0LL;
*(_QWORD *)(a1 + 162512) = 0LL;
*(_QWORD *)(a1 + 162520) = 0LL;
*(_QWORD *)(a1 + 162528) = 0LL;
*(_QWORD *)(a1 + 162536) = 0LL;
*(_QWORD *)(a1 + 162544) = 0LL;
*(_QWORD *)(a1 + 162552) = 0LL;
*(_QWORD *)(a1 + 162664) = 0LL;
*(_QWORD *)(a1 + 162672) = 0LL;
*(_QWORD *)(a1 + 162680) = 0LL;
*(_QWORD *)(a1 + 162688) = 0LL;
*(_QWORD *)(a1 + 162696) = 0LL;
*(_QWORD *)(a1 + 162632) = 0LL;
*(_QWORD *)(a1 + 162640) = 0LL;
*(_QWORD *)(a1 + 162648) = 0LL;
*(_QWORD *)(a1 + 162656) = 0LL;
*(_QWORD *)(a1 + 162560) = 0LL;
*(_QWORD *)(a1 + 162568) = 0LL;
*(_QWORD *)(a1 + 162576) = 0LL;
*(_QWORD *)(a1 + 162584) = 0LL;
*(_QWORD *)(a1 + 162592) = 0LL;
*(_QWORD *)(a1 + 162600) = 0LL;
*(_QWORD *)(a1 + 162608) = 0LL;
*(_QWORD *)(a1 + 162616) = 0LL;
*(_QWORD *)(a1 + 162624) = 0LL;
*(_DWORD *)(a1 + 161596) = 0;
*(_DWORD *)(a1 + 161608) = 0;
result = a1;
*(_QWORD *)(a1 + 162392) = *(_QWORD *)(a1 + 161648);
return result;
}
|
mj_clearEfc:
MOV qword ptr [RSP + -0x8],RDI
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27a58],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27a60],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27a68],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27a70],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27a78],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27a80],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27a88],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27a90],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27a98],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27aa0],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27aa8],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27ab0],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27ab8],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27ac0],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27ac8],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27ad0],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27ad8],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27ae0],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27ae8],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27af0],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27af8],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b68],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b70],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b78],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b80],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b88],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b48],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b50],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b58],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b60],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b00],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b08],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b10],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b18],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b20],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b28],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b30],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b38],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27b40],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX + 0x2773c],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX + 0x27748],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV RCX,qword ptr [RAX + 0x27770]
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x27a58],RCX
RET
|
void mj_clearEfc(long param_1)
{
*(int8 *)(param_1 + 0x27a58) = 0;
*(int8 *)(param_1 + 0x27a60) = 0;
*(int8 *)(param_1 + 0x27a68) = 0;
*(int8 *)(param_1 + 0x27a70) = 0;
*(int8 *)(param_1 + 0x27a78) = 0;
*(int8 *)(param_1 + 0x27a80) = 0;
*(int8 *)(param_1 + 0x27a88) = 0;
*(int8 *)(param_1 + 0x27a90) = 0;
*(int8 *)(param_1 + 0x27a98) = 0;
*(int8 *)(param_1 + 0x27aa0) = 0;
*(int8 *)(param_1 + 0x27aa8) = 0;
*(int8 *)(param_1 + 0x27ab0) = 0;
*(int8 *)(param_1 + 0x27ab8) = 0;
*(int8 *)(param_1 + 0x27ac0) = 0;
*(int8 *)(param_1 + 0x27ac8) = 0;
*(int8 *)(param_1 + 0x27ad0) = 0;
*(int8 *)(param_1 + 0x27ad8) = 0;
*(int8 *)(param_1 + 0x27ae0) = 0;
*(int8 *)(param_1 + 0x27ae8) = 0;
*(int8 *)(param_1 + 0x27af0) = 0;
*(int8 *)(param_1 + 0x27af8) = 0;
*(int8 *)(param_1 + 0x27b68) = 0;
*(int8 *)(param_1 + 0x27b70) = 0;
*(int8 *)(param_1 + 0x27b78) = 0;
*(int8 *)(param_1 + 0x27b80) = 0;
*(int8 *)(param_1 + 0x27b88) = 0;
*(int8 *)(param_1 + 0x27b48) = 0;
*(int8 *)(param_1 + 0x27b50) = 0;
*(int8 *)(param_1 + 0x27b58) = 0;
*(int8 *)(param_1 + 0x27b60) = 0;
*(int8 *)(param_1 + 0x27b00) = 0;
*(int8 *)(param_1 + 0x27b08) = 0;
*(int8 *)(param_1 + 0x27b10) = 0;
*(int8 *)(param_1 + 0x27b18) = 0;
*(int8 *)(param_1 + 0x27b20) = 0;
*(int8 *)(param_1 + 0x27b28) = 0;
*(int8 *)(param_1 + 0x27b30) = 0;
*(int8 *)(param_1 + 0x27b38) = 0;
*(int8 *)(param_1 + 0x27b40) = 0;
*(int4 *)(param_1 + 0x2773c) = 0;
*(int4 *)(param_1 + 0x27748) = 0;
*(int8 *)(param_1 + 0x27a58) = *(int8 *)(param_1 + 0x27770);
return;
}
|
|
12,446
|
c4_state_add_request
|
corpus-core[P]colibri-stateless/src/util/state.c
|
void c4_state_add_request(c4_state_t* state, data_request_t* data_request) {
if (bytes_all_zero(bytes(data_request->id, 32))) {
if (data_request->payload.len)
sha256(data_request->payload, data_request->id);
else
sha256(bytes(data_request->url, strlen(data_request->url)), data_request->id);
}
data_request->next = state->requests;
state->requests = data_request;
}
|
O0
|
c
|
c4_state_add_request:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x20, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x58, %rax
movq %rax, -0x18(%rbp)
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0x18e90
testb $0x1, %al
jne 0x22437
jmp 0x2248d
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x2245b
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rdx
addq $0x58, %rdx
movl 0x20(%rax), %edi
movq 0x28(%rax), %rsi
callq 0x1f490
jmp 0x2248b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x5130
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdx
addq $0x58, %rdx
movl -0x30(%rbp), %edi
movq -0x28(%rbp), %rsi
callq 0x1f490
jmp 0x2248d
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
c4_state_add_request:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_20], 20h ; ' '
mov rax, [rbp+var_10]
add rax, 58h ; 'X'
mov [rbp+var_18], rax
mov edi, [rbp+var_20]
mov rsi, [rbp+var_18]
xor edx, edx
call bytes_all_equal
test al, 1
jnz short loc_22437
jmp short loc_2248D
loc_22437:
mov rax, [rbp+var_10]
cmp dword ptr [rax+20h], 0
jz short loc_2245B
mov rax, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, 58h ; 'X'
mov edi, [rax+20h]
mov rsi, [rax+28h]
call sha256
jmp short loc_2248B
loc_2245B:
mov rax, [rbp+var_10]
mov rdi, [rax+10h]
call _strlen
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_28], rax
mov rdx, [rbp+var_10]
add rdx, 58h ; 'X'
mov edi, [rbp+var_30]
mov rsi, [rbp+var_28]
call sha256
loc_2248B:
jmp short $+2
loc_2248D:
mov rax, [rbp+var_8]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax+50h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax], rcx
add rsp, 30h
pop rbp
retn
|
_QWORD * c4_state_add_request(_QWORD *a1, long long a2)
{
_QWORD *result; // rax
unsigned int v3; // [rsp+0h] [rbp-30h]
if ( (bytes_all_equal(0x20u, a2 + 88, 0) & 1) != 0 )
{
if ( *(_DWORD *)(a2 + 32) )
{
sha256(*(_DWORD *)(a2 + 32), *(_QWORD *)(a2 + 40), a2 + 88);
}
else
{
v3 = strlen(*(_QWORD *)(a2 + 16));
sha256(v3, *(_QWORD *)(a2 + 16), a2 + 88);
}
}
*(_QWORD *)(a2 + 80) = *a1;
result = a1;
*a1 = a2;
return result;
}
|
c4_state_add_request:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x20],0x20
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x58
MOV qword ptr [RBP + -0x18],RAX
MOV EDI,dword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x18]
XOR EDX,EDX
CALL 0x00118e90
TEST AL,0x1
JNZ 0x00122437
JMP 0x0012248d
LAB_00122437:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x20],0x0
JZ 0x0012245b
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x58
MOV EDI,dword ptr [RAX + 0x20]
MOV RSI,qword ptr [RAX + 0x28]
CALL 0x0011f490
JMP 0x0012248b
LAB_0012245b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00105130
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x58
MOV EDI,dword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x0011f490
LAB_0012248b:
JMP 0x0012248d
LAB_0012248d:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x50],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
ADD RSP,0x30
POP RBP
RET
|
void c4_state_add_request(long *param_1,long param_2)
{
ulong uVar1;
size_t sVar2;
uVar1 = bytes_all_equal(0x20,param_2 + 0x58,0);
if ((uVar1 & 1) != 0) {
if (*(int *)(param_2 + 0x20) == 0) {
sVar2 = strlen(*(char **)(param_2 + 0x10));
sha256(sVar2 & 0xffffffff,*(int8 *)(param_2 + 0x10),param_2 + 0x58);
}
else {
sha256(*(int4 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x28),param_2 + 0x58);
}
}
*(long *)(param_2 + 0x50) = *param_1;
*param_1 = param_2;
return;
}
|
|
12,447
|
my_8bit_collation_flags_from_data
|
eloqsql/strings/ctype-simple.c
|
uint my_8bit_collation_flags_from_data(CHARSET_INFO *cs)
{
uint flags= 0;
if (cs->sort_order && cs->sort_order['A'] < cs->sort_order['a'] &&
cs->sort_order['a'] < cs->sort_order['B'])
flags|= MY_CS_CSSORT;
return flags;
}
|
O0
|
c
|
my_8bit_collation_flags_from_data:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x550ad
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movzbl 0x41(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
movzbl 0x61(%rcx), %ecx
cmpl %ecx, %eax
jge 0x550ad
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movzbl 0x61(%rax), %eax
movq -0x8(%rbp), %rcx
movq 0x58(%rcx), %rcx
movzbl 0x42(%rcx), %ecx
cmpl %ecx, %eax
jge 0x550ad
movl -0xc(%rbp), %eax
orl $0x400, %eax # imm = 0x400
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_8bit_collation_flags_from_data:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+58h], 0
jz short loc_550AD
mov rax, [rbp+var_8]
mov rax, [rax+58h]
movzx eax, byte ptr [rax+41h]
mov rcx, [rbp+var_8]
mov rcx, [rcx+58h]
movzx ecx, byte ptr [rcx+61h]
cmp eax, ecx
jge short loc_550AD
mov rax, [rbp+var_8]
mov rax, [rax+58h]
movzx eax, byte ptr [rax+61h]
mov rcx, [rbp+var_8]
mov rcx, [rcx+58h]
movzx ecx, byte ptr [rcx+42h]
cmp eax, ecx
jge short loc_550AD
mov eax, [rbp+var_C]
or eax, 400h
mov [rbp+var_C], eax
loc_550AD:
mov eax, [rbp+var_C]
pop rbp
retn
|
long long my_8bit_collation_flags_from_data(long long a1)
{
unsigned int v2; // [rsp+0h] [rbp-Ch]
v2 = 0;
if ( *(_QWORD *)(a1 + 88)
&& *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 65LL) < (int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 97LL)
&& *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 97LL) < (int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + 66LL) )
{
return 1024;
}
return v2;
}
|
my_8bit_collation_flags_from_data:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x58],0x0
JZ 0x001550ad
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX EAX,byte ptr [RAX + 0x41]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x58]
MOVZX ECX,byte ptr [RCX + 0x61]
CMP EAX,ECX
JGE 0x001550ad
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX EAX,byte ptr [RAX + 0x61]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x58]
MOVZX ECX,byte ptr [RCX + 0x42]
CMP EAX,ECX
JGE 0x001550ad
MOV EAX,dword ptr [RBP + -0xc]
OR EAX,0x400
MOV dword ptr [RBP + -0xc],EAX
LAB_001550ad:
MOV EAX,dword ptr [RBP + -0xc]
POP RBP
RET
|
int4 my_8bit_collation_flags_from_data(long param_1)
{
int4 local_14;
local_14 = 0;
if (((*(long *)(param_1 + 0x58) != 0) &&
(*(byte *)(*(long *)(param_1 + 0x58) + 0x41) < *(byte *)(*(long *)(param_1 + 0x58) + 0x61)))
&& (*(byte *)(*(long *)(param_1 + 0x58) + 0x61) < *(byte *)(*(long *)(param_1 + 0x58) + 0x42)))
{
local_14 = 0x400;
}
return local_14;
}
|
|
12,448
|
check_hex
|
corpus-core[P]colibri-stateless/src/util/json_validate.c
|
static const char* check_hex(json_t val, int len, bool isuint, const char* error_prefix) {
if (val.type != JSON_TYPE_STRING) ERROR("%sExpected hex string", error_prefix);
if (val.start[1] != '0' && val.start[2] != 'x') ERROR("%sExpected hex prefixed (0x) string", error_prefix);
int l = 0;
for (int i = 3; i < val.len - 1; i++, l++) {
if (!isxdigit(val.start[i])) ERROR("%sExpected hex string", error_prefix);
}
if (len > 0 && (l % 2 || l / 2 != len)) ERROR("%sExpected hex string with fixed size (%d) but got %d bytes", error_prefix, len, l / 2);
if (isuint && (l == 0 || (val.start[3] == '0' && l > 1)))
ERROR("%sno leading zeros allowed for uint", error_prefix);
if (isuint && l / 2 > 32) ERROR("%sexpected uint with max 32 bytes length, but got %d bytes ", error_prefix, l / 2);
if (len < 0 && l / 2 > (-len)) ERROR("%sexpected uint with max %d bytes length, but got %d bytes ", error_prefix, -len, l / 2);
return NULL;
}
|
O0
|
c
|
check_hex:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %cl
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl %edi, -0xc(%rbp)
andb $0x1, %cl
movb %cl, -0xd(%rbp)
movq %rdx, -0x18(%rbp)
cmpl $0x1, 0x10(%rax)
je 0x21b05
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
leaq 0x32ce8(%rip), %rsi # 0x547dd
movb $0x0, %al
callq 0x19740
movq %rax, -0x8(%rbp)
jmp 0x21d03
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x30, %eax
je 0x21b44
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x78, %eax
je 0x21b44
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
leaq 0x32cbf(%rip), %rsi # 0x547f3
movb $0x0, %al
callq 0x19740
movq %rax, -0x8(%rbp)
jmp 0x21d03
movl $0x0, -0x1c(%rbp)
movl $0x3, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movslq -0x20(%rbp), %rax
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x21bc4
callq 0x5090
movq -0x28(%rbp), %rcx
movq (%rax), %rax
movq (%rcx), %rcx
movslq -0x20(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x1000, %eax # imm = 0x1000
cmpl $0x0, %eax
jne 0x21bae
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
leaq 0x32c3f(%rip), %rsi # 0x547dd
movb $0x0, %al
callq 0x19740
movq %rax, -0x8(%rbp)
jmp 0x21d03
jmp 0x21bb0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x21b52
cmpl $0x0, -0xc(%rbp)
jle 0x21c22
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x21bea
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl -0xc(%rbp), %eax
je 0x21c22
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %ecx
movl -0x1c(%rbp), %eax
movl $0x2, %esi
cltd
idivl %esi
movq -0x30(%rbp), %rdx
movl %eax, %r8d
xorl %eax, %eax
movl %eax, %edi
leaq 0x32c05(%rip), %rsi # 0x54817
movb $0x0, %al
callq 0x19740
movq %rax, -0x8(%rbp)
jmp 0x21d03
testb $0x1, -0xd(%rbp)
je 0x21c63
cmpl $0x0, -0x1c(%rbp)
je 0x21c44
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsbl 0x3(%rax), %eax
cmpl $0x30, %eax
jne 0x21c63
cmpl $0x1, -0x1c(%rbp)
jle 0x21c63
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
leaq 0x32c00(%rip), %rsi # 0x54853
movb $0x0, %al
callq 0x19740
movq %rax, -0x8(%rbp)
jmp 0x21d03
testb $0x1, -0xd(%rbp)
je 0x21caa
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x20, %eax
jle 0x21caa
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movq -0x38(%rbp), %rdx
movl %eax, %ecx
xorl %eax, %eax
movl %eax, %edi
leaq 0x32bda(%rip), %rsi # 0x54877
movb $0x0, %al
callq 0x19740
movq %rax, -0x8(%rbp)
jmp 0x21d03
cmpl $0x0, -0xc(%rbp)
jge 0x21cfb
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
cmpl %ecx, %eax
jle 0x21cfb
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
movl -0x1c(%rbp), %eax
movl $0x2, %esi
cltd
idivl %esi
movq -0x40(%rbp), %rdx
movl %eax, %r8d
xorl %eax, %eax
movl %eax, %edi
leaq 0x32bc5(%rip), %rsi # 0x548b3
movb $0x0, %al
callq 0x19740
movq %rax, -0x8(%rbp)
jmp 0x21d03
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
check_hex:
push rbp
mov rbp, rsp
sub rsp, 40h
mov cl, sil
lea rax, [rbp+arg_0]
mov [rbp+var_28], rax
mov [rbp+var_C], edi
and cl, 1
mov [rbp+var_D], cl
mov [rbp+var_18], rdx
cmp dword ptr [rax+10h], 1
jz short loc_21B05
mov rdx, [rbp+var_18]
xor eax, eax
mov edi, eax
lea rsi, aSexpectedHexSt; "%sExpected hex string"
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp loc_21D03
loc_21B05:
mov rax, [rbp+var_28]
mov rax, [rax]
movsx eax, byte ptr [rax+1]
cmp eax, 30h ; '0'
jz short loc_21B44
mov rax, [rbp+var_28]
mov rax, [rax]
movsx eax, byte ptr [rax+2]
cmp eax, 78h ; 'x'
jz short loc_21B44
mov rdx, [rbp+var_18]
xor eax, eax
mov edi, eax
lea rsi, aSexpectedHexPr; "%sExpected hex prefixed (0x) string"
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp loc_21D03
loc_21B44:
mov [rbp+var_1C], 0
mov [rbp+var_20], 3
loc_21B52:
mov rcx, [rbp+var_28]
movsxd rax, [rbp+var_20]
mov rcx, [rcx+8]
sub rcx, 1
cmp rax, rcx
jnb short loc_21BC4
call ___ctype_b_loc
mov rcx, [rbp+var_28]
mov rax, [rax]
mov rcx, [rcx]
movsxd rdx, [rbp+var_20]
movsx ecx, byte ptr [rcx+rdx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 1000h
cmp eax, 0
jnz short loc_21BAE
mov rdx, [rbp+var_18]
xor eax, eax
mov edi, eax
lea rsi, aSexpectedHexSt; "%sExpected hex string"
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp loc_21D03
loc_21BAE:
jmp short $+2
loc_21BB0:
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_21B52
loc_21BC4:
cmp [rbp+var_C], 0
jle short loc_21C22
mov eax, [rbp+var_1C]
mov ecx, 2
cdq
idiv ecx
cmp edx, 0
jnz short loc_21BEA
mov eax, [rbp+var_1C]
mov ecx, 2
cdq
idiv ecx
cmp eax, [rbp+var_C]
jz short loc_21C22
loc_21BEA:
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov ecx, [rbp+var_C]
mov eax, [rbp+var_1C]
mov esi, 2
cdq
idiv esi
mov rdx, [rbp+var_30]
mov r8d, eax
xor eax, eax
mov edi, eax
lea rsi, aSexpectedHexSt_0; "%sExpected hex string with fixed size ("...
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp loc_21D03
loc_21C22:
test [rbp+var_D], 1
jz short loc_21C63
cmp [rbp+var_1C], 0
jz short loc_21C44
mov rax, [rbp+var_28]
mov rax, [rax]
movsx eax, byte ptr [rax+3]
cmp eax, 30h ; '0'
jnz short loc_21C63
cmp [rbp+var_1C], 1
jle short loc_21C63
loc_21C44:
mov rdx, [rbp+var_18]
xor eax, eax
mov edi, eax
lea rsi, aSnoLeadingZero; "%sno leading zeros allowed for uint"
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp loc_21D03
loc_21C63:
test [rbp+var_D], 1
jz short loc_21CAA
mov eax, [rbp+var_1C]
mov ecx, 2
cdq
idiv ecx
cmp eax, 20h ; ' '
jle short loc_21CAA
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
mov eax, [rbp+var_1C]
mov ecx, 2
cdq
idiv ecx
mov rdx, [rbp+var_38]
mov ecx, eax
xor eax, eax
mov edi, eax
lea rsi, aSexpectedUintW; "%sexpected uint with max 32 bytes lengt"...
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp short loc_21D03
loc_21CAA:
cmp [rbp+var_C], 0
jge short loc_21CFB
mov eax, [rbp+var_1C]
mov ecx, 2
cdq
idiv ecx
xor ecx, ecx
sub ecx, [rbp+var_C]
cmp eax, ecx
jle short loc_21CFB
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
xor ecx, ecx
sub ecx, [rbp+var_C]
mov eax, [rbp+var_1C]
mov esi, 2
cdq
idiv esi
mov rdx, [rbp+var_40]
mov r8d, eax
xor eax, eax
mov edi, eax
lea rsi, aSexpectedUintW_0; "%sexpected uint with max %d bytes lengt"...
mov al, 0
call bprintf
mov [rbp+var_8], rax
jmp short loc_21D03
loc_21CFB:
mov [rbp+var_8], 0
loc_21D03:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
long long check_hex(
int a1,
char a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
_BYTE *a15,
long long a16,
int a17)
{
long long v17; // rcx
_QWORD *v18; // rax
char v20; // [rsp+0h] [rbp-40h]
int i; // [rsp+20h] [rbp-20h]
int v22; // [rsp+24h] [rbp-1Ch]
LOBYTE(a4) = a2 & 1;
if ( a17 != 1 )
return bprintf(0LL, (long long)"%sExpected hex string", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20);
if ( a15[1] != 48 && a15[2] != 120 )
return bprintf(
0LL,
(long long)"%sExpected hex prefixed (0x) string",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
v22 = 0;
for ( i = 3; ; ++i )
{
v17 = a16 - 1;
if ( i >= (unsigned long long)(a16 - 1) )
break;
v18 = (_QWORD *)__ctype_b_loc();
a4 = (char)a15[i];
if ( (*(_WORD *)(*v18 + 2 * a4) & 0x1000) == 0 )
return bprintf(0LL, (long long)"%sExpected hex string", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v20);
++v22;
}
if ( a1 > 0 )
{
if ( v22 % 2 )
return bprintf(
0LL,
(long long)"%sExpected hex string with fixed size (%d) but got %d bytes",
a3,
(unsigned int)a1,
(unsigned int)(v22 / 2),
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
v17 = 2LL;
if ( v22 / 2 != a1 )
return bprintf(
0LL,
(long long)"%sExpected hex string with fixed size (%d) but got %d bytes",
a3,
(unsigned int)a1,
(unsigned int)(v22 / 2),
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
}
if ( (a2 & 1) != 0 && (!v22 || a15[3] == 48 && v22 > 1) )
return bprintf(
0LL,
(long long)"%sno leading zeros allowed for uint",
a3,
v17,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
if ( (a2 & 1) != 0 && v22 / 2 > 32 )
return bprintf(
0LL,
(long long)"%sexpected uint with max 32 bytes length, but got %d bytes ",
a3,
(unsigned int)(v22 / 2),
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
if ( a1 >= 0 || v22 / 2 <= -a1 )
return 0LL;
return bprintf(
0LL,
(long long)"%sexpected uint with max %d bytes length, but got %d bytes ",
a3,
(unsigned int)-a1,
(unsigned int)(v22 / 2),
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
a3);
}
|
check_hex:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV CL,SIL
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0xc],EDI
AND CL,0x1
MOV byte ptr [RBP + -0xd],CL
MOV qword ptr [RBP + -0x18],RDX
CMP dword ptr [RAX + 0x10],0x1
JZ 0x00121b05
MOV RDX,qword ptr [RBP + -0x18]
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x1547dd]
MOV AL,0x0
CALL 0x00119740
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00121d03
LAB_00121b05:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x30
JZ 0x00121b44
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOVSX EAX,byte ptr [RAX + 0x2]
CMP EAX,0x78
JZ 0x00121b44
MOV RDX,qword ptr [RBP + -0x18]
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x1547f3]
MOV AL,0x0
CALL 0x00119740
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00121d03
LAB_00121b44:
MOV dword ptr [RBP + -0x1c],0x0
MOV dword ptr [RBP + -0x20],0x3
LAB_00121b52:
MOV RCX,qword ptr [RBP + -0x28]
MOVSXD RAX,dword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,0x1
CMP RAX,RCX
JNC 0x00121bc4
CALL 0x00105090
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RCX]
MOVSXD RDX,dword ptr [RBP + -0x20]
MOVSX ECX,byte ptr [RCX + RDX*0x1]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x1000
CMP EAX,0x0
JNZ 0x00121bae
MOV RDX,qword ptr [RBP + -0x18]
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x1547dd]
MOV AL,0x0
CALL 0x00119740
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00121d03
LAB_00121bae:
JMP 0x00121bb0
LAB_00121bb0:
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00121b52
LAB_00121bc4:
CMP dword ptr [RBP + -0xc],0x0
JLE 0x00121c22
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,0x2
CDQ
IDIV ECX
CMP EDX,0x0
JNZ 0x00121bea
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,0x2
CDQ
IDIV ECX
CMP EAX,dword ptr [RBP + -0xc]
JZ 0x00121c22
LAB_00121bea:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV ECX,dword ptr [RBP + -0xc]
MOV EAX,dword ptr [RBP + -0x1c]
MOV ESI,0x2
CDQ
IDIV ESI
MOV RDX,qword ptr [RBP + -0x30]
MOV R8D,EAX
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x154817]
MOV AL,0x0
CALL 0x00119740
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00121d03
LAB_00121c22:
TEST byte ptr [RBP + -0xd],0x1
JZ 0x00121c63
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00121c44
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOVSX EAX,byte ptr [RAX + 0x3]
CMP EAX,0x30
JNZ 0x00121c63
CMP dword ptr [RBP + -0x1c],0x1
JLE 0x00121c63
LAB_00121c44:
MOV RDX,qword ptr [RBP + -0x18]
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x154853]
MOV AL,0x0
CALL 0x00119740
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00121d03
LAB_00121c63:
TEST byte ptr [RBP + -0xd],0x1
JZ 0x00121caa
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,0x2
CDQ
IDIV ECX
CMP EAX,0x20
JLE 0x00121caa
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,0x2
CDQ
IDIV ECX
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,EAX
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x154877]
MOV AL,0x0
CALL 0x00119740
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00121d03
LAB_00121caa:
CMP dword ptr [RBP + -0xc],0x0
JGE 0x00121cfb
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,0x2
CDQ
IDIV ECX
XOR ECX,ECX
SUB ECX,dword ptr [RBP + -0xc]
CMP EAX,ECX
JLE 0x00121cfb
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
XOR ECX,ECX
SUB ECX,dword ptr [RBP + -0xc]
MOV EAX,dword ptr [RBP + -0x1c]
MOV ESI,0x2
CDQ
IDIV ESI
MOV RDX,qword ptr [RBP + -0x40]
MOV R8D,EAX
XOR EAX,EAX
MOV EDI,EAX
LEA RSI,[0x1548b3]
MOV AL,0x0
CALL 0x00119740
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00121d03
LAB_00121cfb:
MOV qword ptr [RBP + -0x8],0x0
LAB_00121d03:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 check_hex(int param_1,byte param_2,int8 param_3)
{
ushort **ppuVar1;
int8 uVar2;
long in_stack_00000008;
long in_stack_00000010;
int in_stack_00000018;
int local_28;
int local_24;
int8 local_10;
if (in_stack_00000018 == 1) {
if ((*(char *)(in_stack_00000008 + 1) == '0') || (*(char *)(in_stack_00000008 + 2) == 'x')) {
local_24 = 0;
for (local_28 = 3; (ulong)(long)local_28 < in_stack_00000010 - 1U; local_28 = local_28 + 1) {
ppuVar1 = __ctype_b_loc();
if (((*ppuVar1)[(int)*(char *)(in_stack_00000008 + local_28)] & 0x1000) == 0) {
uVar2 = bprintf(0,"%sExpected hex string",param_3);
return uVar2;
}
local_24 = local_24 + 1;
}
if ((param_1 < 1) || ((local_24 % 2 == 0 && (local_24 / 2 == param_1)))) {
if (((param_2 & 1) == 0) ||
((local_24 != 0 && ((*(char *)(in_stack_00000008 + 3) != '0' || (local_24 < 2)))))) {
if (((param_2 & 1) == 0) || (local_24 / 2 < 0x21)) {
if ((param_1 < 0) && (-param_1 < local_24 / 2)) {
local_10 = bprintf(0,"%sexpected uint with max %d bytes length, but got %d bytes ",
param_3,-param_1,(long)local_24 / 2 & 0xffffffff);
}
else {
local_10 = 0;
}
}
else {
local_10 = bprintf(0,"%sexpected uint with max 32 bytes length, but got %d bytes ",
param_3,(long)local_24 / 2 & 0xffffffff);
}
}
else {
local_10 = bprintf(0,"%sno leading zeros allowed for uint",param_3);
}
}
else {
local_10 = bprintf(0,"%sExpected hex string with fixed size (%d) but got %d bytes",param_3,
param_1,(long)local_24 / 2 & 0xffffffff);
}
}
else {
local_10 = bprintf(0,"%sExpected hex prefixed (0x) string",param_3);
}
}
else {
local_10 = bprintf(0,"%sExpected hex string",param_3);
}
return local_10;
}
|
|
12,449
|
check_hex
|
corpus-core[P]colibri-stateless/src/util/json_validate.c
|
static const char* check_hex(json_t val, int len, bool isuint, const char* error_prefix) {
if (val.type != JSON_TYPE_STRING) ERROR("%sExpected hex string", error_prefix);
if (val.start[1] != '0' && val.start[2] != 'x') ERROR("%sExpected hex prefixed (0x) string", error_prefix);
int l = 0;
for (int i = 3; i < val.len - 1; i++, l++) {
if (!isxdigit(val.start[i])) ERROR("%sExpected hex string", error_prefix);
}
if (len > 0 && (l % 2 || l / 2 != len)) ERROR("%sExpected hex string with fixed size (%d) but got %d bytes", error_prefix, len, l / 2);
if (isuint && (l == 0 || (val.start[3] == '0' && l > 1)))
ERROR("%sno leading zeros allowed for uint", error_prefix);
if (isuint && l / 2 > 32) ERROR("%sexpected uint with max 32 bytes length, but got %d bytes ", error_prefix, l / 2);
if (len < 0 && l / 2 > (-len)) ERROR("%sexpected uint with max %d bytes length, but got %d bytes ", error_prefix, -len, l / 2);
return NULL;
}
|
O3
|
c
|
check_hex:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
cmpl $0x1, 0x40(%rsp)
jne 0x17b78
movl %esi, %r14d
movl %edi, %ebp
leaq 0x30(%rsp), %rax
movq (%rax), %r15
cmpb $0x30, 0x1(%r15)
je 0x17b03
cmpb $0x78, 0x2(%r15)
jne 0x17b93
movq 0x8(%rax), %r12
leaq -0x1(%r12), %rax
xorl %r8d, %r8d
cmpq $0x4, %rax
jb 0x17b3d
callq 0x5090
movq (%rax), %rax
leal -0x4(%r12), %r8d
addq $-0x4, %r12
xorl %ecx, %ecx
movsbq 0x3(%r15,%rcx), %rdx
testb $0x10, 0x1(%rax,%rdx,2)
je 0x17b78
incq %rcx
cmpq %rcx, %r12
jne 0x17b28
testl %ebp, %ebp
jle 0x17b54
movl %r8d, %ecx
andl $0x1, %ecx
movl %r8d, %eax
shrl %eax
movl %eax, %edx
xorl %ebp, %edx
orl %ecx, %edx
jne 0x17b9c
testb %r14b, %r14b
je 0x17be3
testl %r8d, %r8d
je 0x17b6f
cmpb $0x30, 0x3(%r15)
jne 0x17bbc
cmpl $0x1, %r8d
je 0x17bbc
leaq 0x27ab5(%rip), %rsi # 0x3f62b
jmp 0x17b7f
leaq 0x27a36(%rip), %rsi # 0x3f5b5
xorl %edi, %edi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x12da8
leaq 0x27a31(%rip), %rsi # 0x3f5cb
jmp 0x17b7f
leaq 0x27a4c(%rip), %rsi # 0x3f5ef
xorl %edi, %edi
movq %rbx, %rdx
movl %ebp, %ecx
movl %eax, %r8d
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x12da8
cmpl $0x42, %r8d
jb 0x17be3
shrl %r8d
leaq 0x27a83(%rip), %rsi # 0x3f64f
xorl %edi, %edi
movq %rbx, %rdx
movl %r8d, %ecx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x12da8
testl %ebp, %ebp
jns 0x17c01
shrl %r8d
negl %ebp
cmpl %ebp, %r8d
jbe 0x17c01
leaq 0x27a93(%rip), %rsi # 0x3f68b
xorl %edi, %edi
movq %rbx, %rdx
movl %ebp, %ecx
jmp 0x17bad
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
check_hex:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rdx
cmp [rsp+28h+arg_10], 1
jnz loc_17B78
mov r14d, esi
mov ebp, edi
lea rax, [rsp+28h+arg_0]
mov r15, [rax]
cmp byte ptr [r15+1], 30h ; '0'
jz short loc_17B03
cmp byte ptr [r15+2], 78h ; 'x'
jnz loc_17B93
loc_17B03:
mov r12, [rax+8]
lea rax, [r12-1]
xor r8d, r8d
cmp rax, 4
jb short loc_17B3D
call ___ctype_b_loc
mov rax, [rax]
lea r8d, [r12-4]
add r12, 0FFFFFFFFFFFFFFFCh
xor ecx, ecx
loc_17B28:
movsx rdx, byte ptr [r15+rcx+3]
test byte ptr [rax+rdx*2+1], 10h
jz short loc_17B78
inc rcx
cmp r12, rcx
jnz short loc_17B28
loc_17B3D:
test ebp, ebp
jle short loc_17B54
mov ecx, r8d
and ecx, 1
mov eax, r8d
shr eax, 1
mov edx, eax
xor edx, ebp
or edx, ecx
jnz short loc_17B9C
loc_17B54:
test r14b, r14b
jz loc_17BE3
test r8d, r8d
jz short loc_17B6F
cmp byte ptr [r15+3], 30h ; '0'
jnz short loc_17BBC
cmp r8d, 1
jz short loc_17BBC
loc_17B6F:
lea rsi, aSnoLeadingZero; "%sno leading zeros allowed for uint"
jmp short loc_17B7F
loc_17B78:
lea rsi, aSexpectedHexSt; "%sExpected hex string"
loc_17B7F:
xor edi, edi
mov rdx, rbx
xor eax, eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp bprintf
loc_17B93:
lea rsi, aSexpectedHexPr; "%sExpected hex prefixed (0x) string"
jmp short loc_17B7F
loc_17B9C:
lea rsi, aSexpectedHexSt_0; "%sExpected hex string with fixed size ("...
xor edi, edi
mov rdx, rbx
mov ecx, ebp
mov r8d, eax
loc_17BAD:
xor eax, eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp bprintf
loc_17BBC:
cmp r8d, 42h ; 'B'
jb short loc_17BE3
shr r8d, 1
lea rsi, aSexpectedUintW; "%sexpected uint with max 32 bytes lengt"...
xor edi, edi
mov rdx, rbx
mov ecx, r8d
xor eax, eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp bprintf
loc_17BE3:
test ebp, ebp
jns short loc_17C01
shr r8d, 1
neg ebp
cmp r8d, ebp
jbe short loc_17C01
lea rsi, aSexpectedUintW_0; "%sexpected uint with max %d bytes lengt"...
xor edi, edi
mov rdx, rbx
mov ecx, ebp
jmp short loc_17BAD
loc_17C01:
xor eax, eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long check_hex(
long long a1,
char a2,
long long a3,
long long a4,
long long a5,
long long a6,
_BYTE *a7,
long long a8,
int a9)
{
long long v10; // rax
char *v11; // rsi
char *v13; // rsi
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
if ( a9 != 1 )
{
LABEL_15:
v11 = "%sExpected hex string";
return bprintf(0LL, v11, a3, a4, a5, a6);
}
if ( a7[1] != 48 && a7[2] != 120 )
{
v11 = "%sExpected hex prefixed (0x) string";
return bprintf(0LL, v11, a3, a4, a5, a6);
}
a5 = 0LL;
if ( (unsigned long long)(a8 - 1) >= 4 )
{
v10 = *(_QWORD *)__ctype_b_loc(a1);
a5 = (unsigned int)(a8 - 4);
a4 = 0LL;
while ( (*(_BYTE *)(v10 + 2LL * (char)a7[a4 + 3] + 1) & 0x10) != 0 )
{
if ( a8 - 4 == ++a4 )
goto LABEL_8;
}
goto LABEL_15;
}
LABEL_8:
if ( (int)a1 > 0 )
{
a4 = a5 & 1;
if ( (unsigned int)a4 | (unsigned int)a1 ^ ((unsigned int)a5 >> 1) )
{
v13 = "%sExpected hex string with fixed size (%d) but got %d bytes";
v14 = a3;
v15 = (unsigned int)a1;
v16 = (unsigned int)a5 >> 1;
return bprintf(0LL, v13, v14, v15, v16, a6);
}
}
if ( a2 )
{
if ( !(_DWORD)a5 || a7[3] == 48 && (_DWORD)a5 != 1 )
{
v11 = "%sno leading zeros allowed for uint";
return bprintf(0LL, v11, a3, a4, a5, a6);
}
if ( (unsigned int)a5 >= 0x42 )
return bprintf(
0LL,
"%sexpected uint with max 32 bytes length, but got %d bytes ",
a3,
(unsigned int)a5 >> 1,
(unsigned int)a5 >> 1,
a6);
}
if ( (int)a1 < 0 )
{
v16 = (unsigned int)a5 >> 1;
if ( (unsigned int)v16 > -(int)a1 )
{
v13 = "%sexpected uint with max %d bytes length, but got %d bytes ";
v14 = a3;
v15 = (unsigned int)-(int)a1;
return bprintf(0LL, v13, v14, v15, v16, a6);
}
}
return 0LL;
}
|
check_hex:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDX
CMP dword ptr [RSP + 0x40],0x1
JNZ 0x00117b78
MOV R14D,ESI
MOV EBP,EDI
LEA RAX,[RSP + 0x30]
MOV R15,qword ptr [RAX]
CMP byte ptr [R15 + 0x1],0x30
JZ 0x00117b03
CMP byte ptr [R15 + 0x2],0x78
JNZ 0x00117b93
LAB_00117b03:
MOV R12,qword ptr [RAX + 0x8]
LEA RAX,[R12 + -0x1]
XOR R8D,R8D
CMP RAX,0x4
JC 0x00117b3d
CALL 0x00105090
MOV RAX,qword ptr [RAX]
LEA R8D,[R12 + -0x4]
ADD R12,-0x4
XOR ECX,ECX
LAB_00117b28:
MOVSX RDX,byte ptr [R15 + RCX*0x1 + 0x3]
TEST byte ptr [RAX + RDX*0x2 + 0x1],0x10
JZ 0x00117b78
INC RCX
CMP R12,RCX
JNZ 0x00117b28
LAB_00117b3d:
TEST EBP,EBP
JLE 0x00117b54
MOV ECX,R8D
AND ECX,0x1
MOV EAX,R8D
SHR EAX,0x1
MOV EDX,EAX
XOR EDX,EBP
OR EDX,ECX
JNZ 0x00117b9c
LAB_00117b54:
TEST R14B,R14B
JZ 0x00117be3
TEST R8D,R8D
JZ 0x00117b6f
CMP byte ptr [R15 + 0x3],0x30
JNZ 0x00117bbc
CMP R8D,0x1
JZ 0x00117bbc
LAB_00117b6f:
LEA RSI,[0x13f62b]
JMP 0x00117b7f
LAB_00117b78:
LEA RSI,[0x13f5b5]
LAB_00117b7f:
XOR EDI,EDI
MOV RDX,RBX
XOR EAX,EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00112da8
LAB_00117b93:
LEA RSI,[0x13f5cb]
JMP 0x00117b7f
LAB_00117b9c:
LEA RSI,[0x13f5ef]
XOR EDI,EDI
MOV RDX,RBX
MOV ECX,EBP
MOV R8D,EAX
LAB_00117bad:
XOR EAX,EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00112da8
LAB_00117bbc:
CMP R8D,0x42
JC 0x00117be3
SHR R8D,0x1
LEA RSI,[0x13f64f]
XOR EDI,EDI
MOV RDX,RBX
MOV ECX,R8D
XOR EAX,EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00112da8
LAB_00117be3:
TEST EBP,EBP
JNS 0x00117c01
SHR R8D,0x1
NEG EBP
CMP R8D,EBP
JBE 0x00117c01
LEA RSI,[0x13f68b]
XOR EDI,EDI
MOV RDX,RBX
MOV ECX,EBP
JMP 0x00117bad
LAB_00117c01:
XOR EAX,EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 check_hex(uint param_1,char param_2,int8 param_3)
{
ushort **ppuVar1;
int8 uVar2;
long lVar3;
char *pcVar4;
uint uVar5;
ulong uVar6;
ulong uVar7;
long in_stack_00000008;
long in_stack_00000010;
int in_stack_00000018;
if (in_stack_00000018 != 1) {
LAB_00117b78:
pcVar4 = "%sExpected hex string";
LAB_00117b7f:
uVar2 = bprintf(0,pcVar4,param_3);
return uVar2;
}
if ((*(char *)(in_stack_00000008 + 1) != '0') && (*(char *)(in_stack_00000008 + 2) != 'x')) {
pcVar4 = "%sExpected hex prefixed (0x) string";
goto LAB_00117b7f;
}
uVar6 = 0;
if (3 < in_stack_00000010 - 1U) {
ppuVar1 = __ctype_b_loc();
uVar6 = (ulong)((int)in_stack_00000010 - 4);
lVar3 = 0;
do {
if ((*(byte *)((long)*ppuVar1 + (long)*(char *)(in_stack_00000008 + 3 + lVar3) * 2 + 1) & 0x10
) == 0) goto LAB_00117b78;
lVar3 = lVar3 + 1;
} while (in_stack_00000010 + -4 != lVar3);
}
uVar5 = (uint)uVar6;
if (0 < (int)param_1) {
uVar7 = uVar6 >> 1;
if ((uint)uVar7 != param_1 || (uVar6 & 1) != 0) {
pcVar4 = "%sExpected hex string with fixed size (%d) but got %d bytes";
goto LAB_00117bad;
}
}
if (param_2 != '\0') {
if ((uVar5 == 0) || ((*(char *)(in_stack_00000008 + 3) == '0' && (uVar5 != 1)))) {
pcVar4 = "%sno leading zeros allowed for uint";
goto LAB_00117b7f;
}
if (0x41 < uVar5) {
uVar2 = bprintf(0,"%sexpected uint with max 32 bytes length, but got %d bytes ",param_3,
uVar5 >> 1);
return uVar2;
}
}
if ((int)param_1 < 0) {
uVar7 = (ulong)(uVar5 >> 1);
param_1 = -param_1;
if (param_1 < uVar5 >> 1) {
pcVar4 = "%sexpected uint with max %d bytes length, but got %d bytes ";
LAB_00117bad:
uVar2 = bprintf(0,pcVar4,param_3,param_1,uVar7);
return uVar2;
}
}
return 0;
}
|
|
12,450
|
void nlohmann::json_abi_v3_11_3::detail::from_json<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> 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>::boolean_t&)
|
monkey531[P]llama/common/json.hpp
|
inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)
{
if (JSON_HEDLEY_UNLIKELY(!j.is_boolean()))
{
JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j));
}
b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>();
}
|
O3
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::from_json<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> 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>::boolean_t&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x4, (%rdi)
jne 0x87c22
movb 0x8(%r14), %al
movb %al, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1a450
movq %rax, %rbx
movq %r14, %rdi
callq 0x5f468
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x68206(%rip), %rsi # 0xefe4c
leaq 0x10(%rsp), %rdi
callq 0x87cb8
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x86d76
xorl %ebp, %ebp
leaq 0xa22e7(%rip), %rsi # 0x129f58
leaq -0x2c5da(%rip), %rdx # 0x5b69e
movq %rbx, %rdi
callq 0x1af10
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x87c9e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0x87ca8
jmp 0x87cb0
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1af90
|
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 4
jnz short loc_87C22
mov al, [r14+8]
mov [rsi], al
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_87C22:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeBool; "type must be boolean, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA30_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(char const(&)[30],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_87C9E
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_87C9E:
test bpl, bpl
jnz short loc_87CA8
jmp short loc_87CB0
mov r14, rax
loc_87CA8:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_87CB0:
mov rdi, r14
call __Unwind_Resume
|
unsigned __int8 nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
unsigned __int8 *a1,
unsigned __int8 *a2)
{
unsigned __int8 result; // al
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *a1 != 4 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
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(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[30],char const*>(
v4,
"type must be boolean, but is ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
result = a1[8];
*a2 = result;
return result;
}
|
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x4
JNZ 0x00187c22
MOV AL,byte ptr [R14 + 0x8]
MOV byte ptr [RSI],AL
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00187c22:
MOV EDI,0x20
CALL 0x0011a450
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015f468
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00187c3f:
LEA RSI,[0x1efe4c]
LEA RDI,[RSP + 0x10]
CALL 0x00187cb8
MOV BPL,0x1
LAB_00187c53:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00186d76
XOR EBP,EBP
LEA RSI,[0x229f58]
LEA RDX,[0x15b69e]
MOV RDI,RBX
CALL 0x0011af10
|
/* void
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> 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>::boolean_t&) */
void nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,boolean_t *param_2)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*param_1 == (basic_json)0x4) {
*param_2 = param_1[8];
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)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((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 00187c3f to 00187c4f has its CatchHandler @ 00187ca5 */
concat<std::__cxx11::string,char_const(&)[30],char_const*>
(local_38,"type must be boolean, but is ",&local_40);
/* try { // try from 00187c53 to 00187c7f has its CatchHandler @ 00187c80 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&type_error::typeinfo,exception::~exception);
}
|
|
12,451
|
rtree_insert_req
|
eloqsql/storage/myisam/rt_index.c
|
static int rtree_insert_req(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
uint key_length, my_off_t page, my_off_t *new_page,
int ins_level, int level)
{
uchar *k;
uint nod_flag;
uchar *page_buf;
int res;
DBUG_ENTER("rtree_insert_req");
if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length +
HA_MAX_KEY_BUFF)))
{
my_errno = HA_ERR_OUT_OF_MEM;
DBUG_RETURN(-1); /* purecov: inspected */
}
if (!_mi_fetch_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf, 0))
goto err1;
nod_flag = mi_test_if_nod(page_buf);
DBUG_PRINT("rtree", ("page: %lu level: %d ins_level: %d nod_flag: %u",
(ulong) page, level, ins_level, nod_flag));
if ((ins_level == -1 && nod_flag) || /* key: go down to leaf */
(ins_level > -1 && ins_level > level)) /* branch: go down to ins_level */
{
if ((k = rtree_pick_key(info, keyinfo, key, key_length, page_buf,
nod_flag)) == NULL)
goto err1;
switch ((res = rtree_insert_req(info, keyinfo, key, key_length,
_mi_kpos(nod_flag, k), new_page, ins_level, level + 1)))
{
case 0: /* child was not split */
{
rtree_combine_rect(keyinfo->seg, k, key, k, key_length);
if (_mi_write_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf))
goto err1;
goto ok;
}
case 1: /* child was split */
{
uchar *new_key = page_buf + keyinfo->block_length + nod_flag;
/* set proper MBR for key */
if (rtree_set_key_mbr(info, keyinfo, k, key_length,
_mi_kpos(nod_flag, k)))
goto err1;
/* add new key for new page */
_mi_kpointer(info, new_key - nod_flag, *new_page);
if (rtree_set_key_mbr(info, keyinfo, new_key, key_length, *new_page))
goto err1;
res = rtree_add_key(info, keyinfo, new_key, key_length,
page_buf, new_page);
if (_mi_write_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf))
goto err1;
goto ok;
}
default:
case -1: /* error */
{
goto err1;
}
}
}
else
{
res = rtree_add_key(info, keyinfo, key, key_length, page_buf, new_page);
if (_mi_write_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf))
goto err1;
goto ok;
}
ok:
my_afree((uchar*)page_buf);
DBUG_RETURN(res);
err1:
my_afree((uchar*)page_buf);
DBUG_RETURN(-1); /* purecov: inspected */
}
|
O3
|
c
|
rtree_insert_req:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, -0x50(%rbp)
movq %r8, %r15
movl %ecx, -0x34(%rbp)
movq %rdx, -0x58(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movzwl 0xe(%rsi), %eax
movq %rsp, %r13
addl $0x4c7, %eax # imm = 0x4C7
andl $-0x10, %eax
subq %rax, %r13
movq %r13, %rsp
xorl %ebx, %ebx
movq %rdi, -0x40(%rbp)
movq %rsi, -0x48(%rbp)
movq %r8, %rdx
movl $0x3, %ecx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x84c04
testq %rax, %rax
je 0x8c10d
movl 0x18(%rbp), %esi
movl 0x10(%rbp), %edx
movzbl (%r13), %r14d
testb %r14b, %r14b
jns 0x8bf6f
movq -0x40(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %ebx
cmpl $-0x1, %edx
sete %al
testl %ebx, %ebx
setne %cl
testb %cl, %al
jne 0x8bf81
testl %edx, %edx
sets %al
cmpl %esi, %edx
setle %cl
orb %al, %cl
jne 0x8c0d0
movq %r15, -0x68(%rbp)
movl %ebx, %r12d
movq %r13, %rcx
addq %r12, %r13
addq $0x2, %r13
movzbl 0x1(%rcx), %eax
andl $0x7f, %r14d
shll $0x8, %r14d
orq %rax, %r14
movq %rcx, -0x60(%rbp)
addq %rcx, %r14
cmpq %r14, %r13
jae 0x8c10d
movl -0x34(%rbp), %r15d
xorl %ebx, %ebx
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rdi
movq %r13, %rsi
movq -0x58(%rbp), %rdx
movl -0x34(%rbp), %ecx
leaq -0x80(%rbp), %r8
callq 0x8dd0d
ucomisd 0x562d6(%rip), %xmm0 # 0xe22b0
jne 0x8bfe2
jnp 0x8c10d
movsd -0x80(%rbp), %xmm1
testq %rbx, %rbx
movsd -0x78(%rbp), %xmm3
je 0x8c00a
ucomisd %xmm0, %xmm3
ja 0x8c00a
ucomisd %xmm3, %xmm0
jne 0x8c016
jp 0x8c016
movsd -0x70(%rbp), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x8c016
movapd %xmm0, %xmm3
movsd %xmm1, -0x70(%rbp)
movq %r13, %rbx
movq %r12, %rax
testl %r12d, %r12d
jne 0x8c02b
movq -0x40(%rbp), %rax
movq (%rax), %rax
movl 0x178(%rax), %eax
movsd %xmm3, -0x78(%rbp)
addq %r15, %r13
addq %rax, %r13
cmpq %r14, %r13
jb 0x8bfb7
testq %rbx, %rbx
movq -0x68(%rbp), %r14
je 0x8c10d
movl %r12d, %edi
movq %rbx, %rsi
callq 0x8557e
movl 0x18(%rbp), %ecx
movq %rcx, %r10
incl %r10d
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x58(%rbp), %rdx
movl -0x34(%rbp), %ecx
movq %rax, %r8
movq -0x50(%rbp), %r9
pushq %r10
movl 0x10(%rbp), %eax
pushq %rax
callq 0x8bedc
addq $0x10, %rsp
cmpl $0x1, %eax
je 0x8c136
testl %eax, %eax
movq -0x60(%rbp), %r12
jne 0x8c10d
movq -0x48(%rbp), %r15
movq 0x28(%r15), %rdi
movq %rbx, %rsi
movq -0x58(%rbp), %rdx
movq %rbx, %rcx
movl -0x34(%rbp), %r8d
callq 0x8d30d
movq -0x40(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x3, %ecx
movq %r12, %r8
callq 0x84cb0
testl %eax, %eax
jne 0x8c10d
xorl %ebx, %ebx
jmp 0x8c112
movq -0x40(%rbp), %r12
movq %r12, %rdi
movq -0x48(%rbp), %r14
movq %r14, %rsi
movq -0x58(%rbp), %rdx
movl -0x34(%rbp), %ecx
movq %r13, %r8
movq -0x50(%rbp), %r9
callq 0x8c1e0
movl %eax, %ebx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x3, %ecx
movq %r13, %r8
callq 0x84cb0
testl %eax, %eax
je 0x8c112
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x8c1da
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x48(%rbp), %r15
movzwl 0xe(%r15), %r13d
movl %r12d, %edi
movq %rbx, %rsi
callq 0x8557e
movq -0x40(%rbp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl -0x34(%rbp), %ecx
movq %rax, %r8
callq 0x8c358
testl %eax, %eax
movq -0x60(%rbp), %rax
jne 0x8c10d
addq %rax, %r13
addq %r13, %r12
movq -0x50(%rbp), %r15
movq (%r15), %rdx
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x860e9
movq (%r15), %r8
movq -0x60(%rbp), %r15
movq %rbx, %rdi
movq -0x48(%rbp), %rsi
movq %r12, %rdx
movl -0x34(%rbp), %ecx
callq 0x8c358
testl %eax, %eax
jne 0x8c10d
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %r13
movq %r13, %rsi
movq %r12, %rdx
movl -0x34(%rbp), %ecx
movq %r15, %r8
movq -0x50(%rbp), %r9
callq 0x8c1e0
movl %eax, %ebx
movq -0x40(%rbp), %rdi
movq %r13, %rsi
movq %r14, %rdx
movl $0x3, %ecx
movq %r15, %r8
jmp 0x8c104
callq 0x29270
nop
|
rtree_insert_req:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_50], r9
mov r15, r8
mov [rbp+var_34], ecx
mov [rbp+var_58], rdx
mov rax, fs:28h
mov [rbp+var_30], rax
movzx eax, word ptr [rsi+0Eh]
mov r13, rsp
add eax, 4C7h
and eax, 0FFFFFFF0h
sub r13, rax
mov rsp, r13
xor ebx, ebx
mov [rbp+var_40], rdi
mov [rbp+var_48], rsi
mov rdx, r8
mov ecx, 3
mov r8, r13
xor r9d, r9d
call _mi_fetch_keypage
test rax, rax
jz loc_8C10D
mov esi, [rbp+arg_8]
mov edx, [rbp+arg_0]
movzx r14d, byte ptr [r13+0]
test r14b, r14b
jns short loc_8BF6F
mov rax, [rbp+var_40]
mov rax, [rax]
mov ebx, [rax+17Ch]
cmp edx, 0FFFFFFFFh
setz al
test ebx, ebx
setnz cl
test al, cl
jnz short loc_8BF81
loc_8BF6F:
test edx, edx
sets al
cmp edx, esi
setle cl
or cl, al
jnz loc_8C0D0
loc_8BF81:
mov [rbp+var_68], r15
mov r12d, ebx
mov rcx, r13
add r13, r12
add r13, 2
movzx eax, byte ptr [rcx+1]
and r14d, 7Fh
shl r14d, 8
or r14, rax
mov [rbp+var_60], rcx
add r14, rcx
cmp r13, r14
jnb loc_8C10D
mov r15d, [rbp+var_34]
xor ebx, ebx
loc_8BFB7:
mov rax, [rbp+var_48]
mov rdi, [rax+28h]
mov rsi, r13
mov rdx, [rbp+var_58]
mov ecx, [rbp+var_34]
lea r8, [rbp+var_80]
call rtree_area_increase
ucomisd xmm0, cs:qword_E22B0
jnz short loc_8BFE2
jnp loc_8C10D
loc_8BFE2:
movsd xmm1, [rbp+var_80]
test rbx, rbx
movsd xmm3, [rbp+var_78]
jz short loc_8C00A
ucomisd xmm3, xmm0
ja short loc_8C00A
ucomisd xmm0, xmm3
jnz short loc_8C016
jp short loc_8C016
movsd xmm2, [rbp+var_70]
ucomisd xmm2, xmm1
jbe short loc_8C016
loc_8C00A:
movapd xmm3, xmm0
movsd [rbp+var_70], xmm1
mov rbx, r13
loc_8C016:
mov rax, r12
test r12d, r12d
jnz short loc_8C02B
mov rax, [rbp+var_40]
mov rax, [rax]
mov eax, [rax+178h]
loc_8C02B:
movsd [rbp+var_78], xmm3
add r13, r15
add r13, rax
cmp r13, r14
jb loc_8BFB7
test rbx, rbx
mov r14, [rbp+var_68]
jz loc_8C10D
mov edi, r12d
mov rsi, rbx
call _mi_kpos
mov ecx, [rbp+arg_8]
mov r10, rcx
inc r10d
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_58]
mov ecx, [rbp+var_34]
mov r8, rax
mov r9, [rbp+var_50]
push r10
mov eax, [rbp+arg_0]
push rax
call rtree_insert_req
add rsp, 10h
cmp eax, 1
jz loc_8C136
test eax, eax
mov r12, [rbp+var_60]
jnz short loc_8C10D
mov r15, [rbp+var_48]
mov rdi, [r15+28h]
mov rsi, rbx
mov rdx, [rbp+var_58]
mov rcx, rbx
mov r8d, [rbp+var_34]
call rtree_combine_rect
mov rdi, [rbp+var_40]
mov rsi, r15
mov rdx, r14
mov ecx, 3
mov r8, r12
call _mi_write_keypage
test eax, eax
jnz short loc_8C10D
xor ebx, ebx
jmp short loc_8C112
loc_8C0D0:
mov r12, [rbp+var_40]
mov rdi, r12
mov r14, [rbp+var_48]
mov rsi, r14
mov rdx, [rbp+var_58]
mov ecx, [rbp+var_34]
mov r8, r13
mov r9, [rbp+var_50]
call rtree_add_key
mov ebx, eax
mov rdi, r12
mov rsi, r14
mov rdx, r15
mov ecx, 3
mov r8, r13
loc_8C104:
call _mi_write_keypage
test eax, eax
jz short loc_8C112
loc_8C10D:
mov ebx, 0FFFFFFFFh
loc_8C112:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_8C1DA
mov eax, ebx
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8C136:
mov r15, [rbp+var_48]
movzx r13d, word ptr [r15+0Eh]
mov edi, r12d
mov rsi, rbx
call _mi_kpos
mov rdi, [rbp+var_40]
mov rsi, r15
mov rdx, rbx
mov ecx, [rbp+var_34]
mov r8, rax
call rtree_set_key_mbr
test eax, eax
mov rax, [rbp+var_60]
jnz short loc_8C10D
add r13, rax
add r12, r13
mov r15, [rbp+var_50]
mov rdx, [r15]
mov rbx, [rbp+var_40]
mov rdi, rbx
mov rsi, r13
call _mi_kpointer
mov r8, [r15]
mov r15, [rbp+var_60]
mov rdi, rbx
mov rsi, [rbp+var_48]
mov rdx, r12
mov ecx, [rbp+var_34]
call rtree_set_key_mbr
test eax, eax
jnz loc_8C10D
mov rdi, [rbp+var_40]
mov r13, [rbp+var_48]
mov rsi, r13
mov rdx, r12
mov ecx, [rbp+var_34]
mov r8, r15
mov r9, [rbp+var_50]
call rtree_add_key
mov ebx, eax
mov rdi, [rbp+var_40]
mov rsi, r13
mov rdx, r14
mov ecx, 3
mov r8, r15
jmp loc_8C104
loc_8C1DA:
call ___stack_chk_fail
|
// bad sp value at call has been detected, the output may be wrong!
long long rtree_insert_req(
long long *a1,
long long a2,
long long a3,
unsigned int a4,
long long a5,
unsigned long long *a6,
int a7,
int a8)
{
char *v9; // r13
unsigned int v10; // ebx
char v11; // r14
long long v12; // r12
char *v13; // rcx
unsigned long long v14; // r13
long long v15; // rax
unsigned long long v16; // r14
long long v17; // r15
long long v18; // rbx
double v19; // xmm0_8
double v20; // xmm1_8
double v21; // xmm3_8
long long v22; // rax
unsigned long long v23; // r14
int v24; // eax
int inserted; // eax
char *v26; // r12
long long v27; // r15
unsigned int v28; // ebx
long long *v29; // r12
long long v30; // r14
long long *v31; // rdi
long long v32; // rsi
unsigned long long v33; // rdx
char *v34; // r8
long long v36; // r15
long long v37; // r13
unsigned long long v38; // rax
char *v39; // r13
char *v40; // r12
unsigned long long *v41; // r15
long long *v42; // rbx
unsigned long long v43; // r8
char *v44; // r15
long long v45; // r13
double v46; // [rsp+0h] [rbp-80h] BYREF
double v47; // [rsp+8h] [rbp-78h]
double v48; // [rsp+10h] [rbp-70h]
unsigned long long v49; // [rsp+18h] [rbp-68h]
char *v50; // [rsp+20h] [rbp-60h]
long long v51; // [rsp+28h] [rbp-58h]
unsigned long long *v52; // [rsp+30h] [rbp-50h]
long long v53; // [rsp+38h] [rbp-48h]
long long *v54; // [rsp+40h] [rbp-40h]
unsigned int v55; // [rsp+4Ch] [rbp-34h]
unsigned long long v56; // [rsp+50h] [rbp-30h]
v52 = a6;
v55 = a4;
v51 = a3;
v56 = __readfsqword(0x28u);
v9 = (char *)&v46 - ((*(unsigned __int16 *)(a2 + 14) + 1223) & 0xFFFFFFF0);
v10 = 0;
v54 = a1;
v53 = a2;
if ( !mi_fetch_keypage(a1, a2, a5) )
return (unsigned int)-1;
v11 = *v9;
if ( *v9 < 0 && (v10 = *(_DWORD *)(*v54 + 380), v10 != 0 && a7 == -1) || a7 >= 0 && a7 > a8 )
{
v49 = a5;
v12 = v10;
v13 = v9;
v14 = (unsigned long long)&v9[v10 + 2];
v15 = (unsigned __int8)v13[1];
v50 = v13;
v16 = (unsigned long long)&v13[v15 | ((unsigned __int8)(v11 & 0x7F) << 8)];
if ( v14 < v16 )
{
v17 = v55;
v18 = 0LL;
while ( 1 )
{
v19 = rtree_area_increase(*(_QWORD *)(v53 + 40), v14, v51, v55, &v46);
if ( v19 == -1.0 )
break;
v20 = v46;
v21 = v47;
if ( !v18 || v47 > v19 || v19 == v47 && v48 > v46 )
{
v21 = v19;
v48 = v46;
v18 = v14;
}
v22 = v12;
if ( !(_DWORD)v12 )
v22 = *(unsigned int *)(*v54 + 376);
v47 = v21;
v14 += v22 + v17;
if ( v14 >= v16 )
{
v23 = v49;
if ( !v18 )
return (unsigned int)-1;
v24 = mi_kpos(v12, v18);
inserted = rtree_insert_req((_DWORD)v54, v53, v51, v55, v24, (_DWORD)v52, a7, a8 + 1);
if ( inserted == 1 )
{
v36 = v53;
v37 = *(unsigned __int16 *)(v53 + 14);
v38 = mi_kpos(v12, v18);
if ( !(unsigned int)rtree_set_key_mbr(v54, v36, v18, v55, v38) )
{
v39 = &v50[v37];
v40 = &v39[v12];
v41 = v52;
v42 = v54;
mi_kpointer((long long)v54, v39, *v52);
v43 = *v41;
v44 = v50;
if ( !(unsigned int)rtree_set_key_mbr(v42, v53, v40, v55, v43) )
{
v45 = v53;
v28 = rtree_add_key(v54, v53, v40, v55, v44, v52);
v31 = v54;
v32 = v45;
v33 = v23;
v34 = v44;
goto LABEL_22;
}
}
}
else
{
v26 = v50;
if ( !inserted )
{
v27 = v53;
rtree_combine_rect(*(_QWORD *)(v53 + 40), v18, v51, v18, v55, v19, v20);
if ( !(unsigned int)mi_write_keypage(v54, v27, v23, 3u, v26) )
return 0;
}
}
return (unsigned int)-1;
}
}
}
return (unsigned int)-1;
}
v29 = v54;
v30 = v53;
v28 = rtree_add_key(v54, v53, v51, v55, v9, v52);
v31 = v29;
v32 = v30;
v33 = a5;
v34 = v9;
LABEL_22:
if ( (unsigned int)mi_write_keypage(v31, v32, v33, 3u, v34) )
return (unsigned int)-1;
return v28;
}
|
rtree_insert_req:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x50],R9
MOV R15,R8
MOV dword ptr [RBP + -0x34],ECX
MOV qword ptr [RBP + -0x58],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOVZX EAX,word ptr [RSI + 0xe]
MOV R13,RSP
ADD EAX,0x4c7
AND EAX,0xfffffff0
SUB R13,RAX
MOV RSP,R13
XOR EBX,EBX
MOV qword ptr [RBP + -0x40],RDI
MOV qword ptr [RBP + -0x48],RSI
MOV RDX,R8
MOV ECX,0x3
MOV R8,R13
XOR R9D,R9D
CALL 0x00184c04
TEST RAX,RAX
JZ 0x0018c10d
MOV ESI,dword ptr [RBP + 0x18]
MOV EDX,dword ptr [RBP + 0x10]
MOVZX R14D,byte ptr [R13]
TEST R14B,R14B
JNS 0x0018bf6f
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV EBX,dword ptr [RAX + 0x17c]
CMP EDX,-0x1
SETZ AL
TEST EBX,EBX
SETNZ CL
TEST AL,CL
JNZ 0x0018bf81
LAB_0018bf6f:
TEST EDX,EDX
SETS AL
CMP EDX,ESI
SETLE CL
OR CL,AL
JNZ 0x0018c0d0
LAB_0018bf81:
MOV qword ptr [RBP + -0x68],R15
MOV R12D,EBX
MOV RCX,R13
ADD R13,R12
ADD R13,0x2
MOVZX EAX,byte ptr [RCX + 0x1]
AND R14D,0x7f
SHL R14D,0x8
OR R14,RAX
MOV qword ptr [RBP + -0x60],RCX
ADD R14,RCX
CMP R13,R14
JNC 0x0018c10d
MOV R15D,dword ptr [RBP + -0x34]
XOR EBX,EBX
LAB_0018bfb7:
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,R13
MOV RDX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RBP + -0x34]
LEA R8,[RBP + -0x80]
CALL 0x0018dd0d
UCOMISD XMM0,qword ptr [0x001e22b0]
JNZ 0x0018bfe2
JNP 0x0018c10d
LAB_0018bfe2:
MOVSD XMM1,qword ptr [RBP + -0x80]
TEST RBX,RBX
MOVSD XMM3,qword ptr [RBP + -0x78]
JZ 0x0018c00a
UCOMISD XMM3,XMM0
JA 0x0018c00a
UCOMISD XMM0,XMM3
JNZ 0x0018c016
JP 0x0018c016
MOVSD XMM2,qword ptr [RBP + -0x70]
UCOMISD XMM2,XMM1
JBE 0x0018c016
LAB_0018c00a:
MOVAPD XMM3,XMM0
MOVSD qword ptr [RBP + -0x70],XMM1
MOV RBX,R13
LAB_0018c016:
MOV RAX,R12
TEST R12D,R12D
JNZ 0x0018c02b
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x178]
LAB_0018c02b:
MOVSD qword ptr [RBP + -0x78],XMM3
ADD R13,R15
ADD R13,RAX
CMP R13,R14
JC 0x0018bfb7
TEST RBX,RBX
MOV R14,qword ptr [RBP + -0x68]
JZ 0x0018c10d
MOV EDI,R12D
MOV RSI,RBX
CALL 0x0018557e
MOV ECX,dword ptr [RBP + 0x18]
MOV R10,RCX
INC R10D
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RBP + -0x34]
MOV R8,RAX
MOV R9,qword ptr [RBP + -0x50]
PUSH R10
MOV EAX,dword ptr [RBP + 0x10]
PUSH RAX
CALL 0x0018bedc
ADD RSP,0x10
CMP EAX,0x1
JZ 0x0018c136
TEST EAX,EAX
MOV R12,qword ptr [RBP + -0x60]
JNZ 0x0018c10d
MOV R15,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [R15 + 0x28]
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x58]
MOV RCX,RBX
MOV R8D,dword ptr [RBP + -0x34]
CALL 0x0018d30d
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,R15
MOV RDX,R14
MOV ECX,0x3
MOV R8,R12
CALL 0x00184cb0
TEST EAX,EAX
JNZ 0x0018c10d
XOR EBX,EBX
JMP 0x0018c112
LAB_0018c0d0:
MOV R12,qword ptr [RBP + -0x40]
MOV RDI,R12
MOV R14,qword ptr [RBP + -0x48]
MOV RSI,R14
MOV RDX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RBP + -0x34]
MOV R8,R13
MOV R9,qword ptr [RBP + -0x50]
CALL 0x0018c1e0
MOV EBX,EAX
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
MOV ECX,0x3
MOV R8,R13
LAB_0018c104:
CALL 0x00184cb0
TEST EAX,EAX
JZ 0x0018c112
LAB_0018c10d:
MOV EBX,0xffffffff
LAB_0018c112:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0018c1da
MOV EAX,EBX
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018c136:
MOV R15,qword ptr [RBP + -0x48]
MOVZX R13D,word ptr [R15 + 0xe]
MOV EDI,R12D
MOV RSI,RBX
CALL 0x0018557e
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,R15
MOV RDX,RBX
MOV ECX,dword ptr [RBP + -0x34]
MOV R8,RAX
CALL 0x0018c358
TEST EAX,EAX
MOV RAX,qword ptr [RBP + -0x60]
JNZ 0x0018c10d
ADD R13,RAX
ADD R12,R13
MOV R15,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [R15]
MOV RBX,qword ptr [RBP + -0x40]
MOV RDI,RBX
MOV RSI,R13
CALL 0x001860e9
MOV R8,qword ptr [R15]
MOV R15,qword ptr [RBP + -0x60]
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,R12
MOV ECX,dword ptr [RBP + -0x34]
CALL 0x0018c358
TEST EAX,EAX
JNZ 0x0018c10d
MOV RDI,qword ptr [RBP + -0x40]
MOV R13,qword ptr [RBP + -0x48]
MOV RSI,R13
MOV RDX,R12
MOV ECX,dword ptr [RBP + -0x34]
MOV R8,R15
MOV R9,qword ptr [RBP + -0x50]
CALL 0x0018c1e0
MOV EBX,EAX
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,R13
MOV RDX,R14
MOV ECX,0x3
MOV R8,R15
JMP 0x0018c104
LAB_0018c1da:
CALL 0x00129270
|
int4
rtree_insert_req(long *param_1,long param_2,int8 param_3,uint param_4,int8 param_5,
int8 *param_6,uint param_7,int param_8)
{
byte bVar1;
byte bVar2;
ushort uVar3;
long lVar4;
int8 *puVar5;
uint uVar6;
int iVar7;
int4 uVar8;
long lVar9;
ulong uVar10;
int8 uVar11;
int8 uVar12;
uint uVar13;
byte *pbVar14;
long lVar15;
long *plVar16;
byte *pbVar17;
ulong uVar18;
byte *pbVar19;
ulong uVar20;
long in_FS_OFFSET;
double dVar21;
ulong auStack_a0 [3];
int8 local_88;
double local_80;
double local_78;
int8 local_70;
byte *local_68;
int8 local_60;
int8 *local_58;
long local_50;
long *local_48;
uint local_3c;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar4 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0x4c7 & 0xfffffff0);
pbVar17 = (byte *)((long)&local_88 + lVar4);
uVar13 = 0;
local_60 = param_3;
local_58 = param_6;
local_50 = param_2;
local_48 = param_1;
local_3c = param_4;
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x18bf3a;
lVar9 = _mi_fetch_keypage(param_1,param_2,param_5,3,pbVar17,0);
uVar6 = local_3c;
plVar16 = local_48;
lVar15 = local_50;
puVar5 = local_58;
uVar12 = local_60;
if (lVar9 != 0) {
bVar1 = *pbVar17;
if ((((char)bVar1 < '\0') &&
(uVar13 = *(uint *)(*local_48 + 0x17c), param_7 == 0xffffffff && uVar13 != 0)) ||
(param_8 < (int)param_7 && -1 < (int)param_7)) {
local_70 = param_5;
uVar18 = (ulong)uVar13;
pbVar19 = pbVar17 + uVar18 + 2;
bVar2 = *(byte *)((long)&local_88 + lVar4 + 1);
local_68 = pbVar17;
if (pbVar19 < pbVar17 + ((ulong)((bVar1 & 0x7f) << 8) | (ulong)bVar2)) {
uVar20 = (ulong)local_3c;
pbVar14 = (byte *)0x0;
do {
uVar6 = local_3c;
uVar11 = local_60;
uVar12 = *(int8 *)(local_50 + 0x28);
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x18bfd2;
dVar21 = (double)rtree_area_increase(uVar12,pbVar19,uVar11,uVar6,&local_88);
param_5 = local_70;
if ((dVar21 == DAT_001e22b0) && (!NAN(dVar21) && !NAN(DAT_001e22b0))) goto LAB_0018c10d;
if (((pbVar14 == (byte *)0x0) || (dVar21 < local_80)) ||
(((dVar21 == local_80 && (!NAN(dVar21) && !NAN(local_80))) && (local_88 < local_78))))
{
local_78 = local_88;
pbVar14 = pbVar19;
local_80 = dVar21;
}
uVar10 = uVar18;
if (uVar13 == 0) {
uVar10 = (ulong)*(uint *)(*local_48 + 0x178);
}
pbVar19 = pbVar19 + uVar10 + uVar20;
} while (pbVar19 < pbVar17 + ((ulong)((bVar1 & 0x7f) << 8) | (ulong)bVar2));
if (pbVar14 != (byte *)0x0) {
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x18c057;
uVar11 = _mi_kpos(uVar18,pbVar14);
uVar6 = local_3c;
plVar16 = local_48;
lVar15 = local_50;
puVar5 = local_58;
uVar12 = local_60;
*(ulong *)((long)auStack_a0 + lVar4 + 0x10) = (ulong)(param_8 + 1);
*(ulong *)((long)auStack_a0 + lVar4 + 8) = (ulong)param_7;
*(int8 *)((long)auStack_a0 + lVar4) = 0x18c081;
iVar7 = rtree_insert_req(plVar16,lVar15,uVar12,uVar6,uVar11,puVar5);
uVar6 = local_3c;
lVar15 = local_50;
uVar12 = local_60;
pbVar17 = local_68;
if (iVar7 == 1) {
uVar3 = *(ushort *)(local_50 + 0xe);
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x18c14a;
uVar12 = _mi_kpos(uVar13,pbVar14);
uVar13 = local_3c;
plVar16 = local_48;
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x18c15f;
iVar7 = rtree_set_key_mbr(plVar16,lVar15,pbVar14,uVar13,uVar12);
plVar16 = local_48;
puVar5 = local_58;
if (iVar7 == 0) {
pbVar19 = local_68 + uVar3;
uVar12 = *local_58;
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x18c183;
_mi_kpointer(plVar16,pbVar19,uVar12);
uVar13 = local_3c;
lVar15 = local_50;
pbVar17 = local_68;
uVar12 = *puVar5;
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x18c19c;
iVar7 = rtree_set_key_mbr(plVar16,lVar15,pbVar19 + uVar18,uVar13,uVar12);
uVar13 = local_3c;
plVar16 = local_48;
lVar15 = local_50;
puVar5 = local_58;
if (iVar7 == 0) {
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x18c1c1;
uVar8 = rtree_add_key(plVar16,lVar15,pbVar19 + uVar18,uVar13,pbVar17,puVar5);
plVar16 = local_48;
goto LAB_0018c104;
}
}
}
else if (iVar7 == 0) {
uVar11 = *(int8 *)(local_50 + 0x28);
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x18c0b1;
rtree_combine_rect(uVar11,pbVar14,uVar12,pbVar14,uVar6);
plVar16 = local_48;
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x18c0c8;
iVar7 = _mi_write_keypage(plVar16,lVar15,param_5,3,pbVar17);
if (iVar7 == 0) {
uVar8 = 0;
goto LAB_0018c112;
}
}
}
}
}
else {
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x18c0f1;
uVar8 = rtree_add_key(plVar16,lVar15,uVar12,uVar6,pbVar17,puVar5);
LAB_0018c104:
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x18c109;
iVar7 = _mi_write_keypage(plVar16,lVar15,param_5,3,pbVar17);
if (iVar7 == 0) goto LAB_0018c112;
}
}
LAB_0018c10d:
uVar8 = 0xffffffff;
LAB_0018c112:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar8;
}
/* WARNING: Subroutine does not return */
*(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x18c1df;
__stack_chk_fail();
}
|
|
12,452
|
my_b_cache_read
|
eloqsql/mysys/mf_iocache.c
|
int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
{
size_t length= 0, diff_length, left_length= 0, max_length;
my_off_t pos_in_file;
DBUG_ENTER("_my_b_cache_read");
/* pos_in_file always point on where info->buffer was read */
pos_in_file=info->pos_in_file+ (size_t) (info->read_end - info->buffer);
/*
Whenever a function which operates on IO_CACHE flushes/writes
some part of the IO_CACHE to disk it will set the property
"seek_not_done" to indicate this to other functions operating
on the IO_CACHE.
*/
if (info->seek_not_done)
{
if ((mysql_file_seek(info->file, pos_in_file, MY_SEEK_SET, MYF(0))
!= MY_FILEPOS_ERROR))
{
/* No error, reset seek_not_done flag. */
info->seek_not_done= 0;
if (info->next_file_user)
{
IO_CACHE *c;
for (c= info->next_file_user;
c!= info;
c= c->next_file_user)
{
c->seek_not_done= 1;
}
}
}
else
{
/*
If the seek failed and the error number is ESPIPE, it is because
info->file is a pipe or socket or FIFO. We never should have tried
to seek on that. See Bugs#25807 and #22828 for more info.
*/
DBUG_ASSERT(my_errno != ESPIPE);
info->error= -1;
DBUG_RETURN(1);
}
}
/*
Calculate, how much we are within a IO_SIZE block. Ideally this
should be zero.
*/
diff_length= (size_t) (pos_in_file & (IO_SIZE-1));
/*
If more than a block plus the rest of the current block is wanted,
we do read directly, without filling the buffer.
*/
if (Count >= (size_t) (IO_SIZE+(IO_SIZE-diff_length)))
{ /* Fill first intern buffer */
size_t read_length;
if (info->end_of_file <= pos_in_file)
{
/* End of file. Return, what we did copy from the buffer. */
info->error= (int) left_length;
info->seek_not_done=1;
DBUG_RETURN(1);
}
/*
Crop the wanted count to a multiple of IO_SIZE and subtract,
what we did already read from a block. That way, the read will
end aligned with a block.
*/
length= IO_ROUND_DN(Count) - diff_length;
if ((read_length= mysql_file_read(info->file,Buffer, length, info->myflags))
!= length)
{
/*
If we didn't get, what we wanted, we either return -1 for a read
error, or (it's end of file), how much we got in total.
*/
info->error= (read_length == (size_t) -1 ? -1 :
(int) (read_length+left_length));
info->seek_not_done=1;
DBUG_RETURN(1);
}
Count-=length;
Buffer+=length;
pos_in_file+=length;
left_length+=length;
diff_length=0;
}
/*
At this point, we want less than one and a partial block.
We will read a full cache, minus the number of bytes, we are
within a block already. So we will reach new alignment.
*/
max_length= info->read_length-diff_length;
/* We will not read past end of file. */
if (info->type != READ_FIFO &&
max_length > (info->end_of_file - pos_in_file))
max_length= (size_t) (info->end_of_file - pos_in_file);
/*
If there is nothing left to read,
we either are done, or we failed to fulfill the request.
Otherwise, we read max_length into the cache.
*/
if (!max_length)
{
if (Count)
{
/* We couldn't fulfil the request. Return, how much we got. */
info->error= (int) left_length;
DBUG_RETURN(1);
}
else
{
info->error= 0;
if (length == 0) /* nothing was read */
DBUG_RETURN(0); /* EOF */
length= 0; /* non-zero size read was done */
}
}
else
{
if (info->next_file_user)
{
IO_CACHE *c;
for (c= info->next_file_user;
c!= info;
c= c->next_file_user)
{
c->seek_not_done= 1;
}
}
if ((length= mysql_file_read(info->file,info->buffer, max_length,
info->myflags)) < Count ||
length == (size_t) -1)
{
/*
We got an read error, or less than requested (end of file).
If not a read error, copy, what we got.
*/
if (length != (size_t) -1)
memcpy(Buffer, info->buffer, length);
info->pos_in_file= pos_in_file;
/* For a read error, return -1, otherwise, what we got in total. */
info->error= length == (size_t) -1 ? -1 : (int) (length+left_length);
info->read_pos=info->read_end=info->buffer;
info->seek_not_done=1;
DBUG_RETURN(1);
}
}
/*
Count is the remaining number of bytes requested.
length is the amount of data in the cache.
Read Count bytes from the cache.
*/
info->read_pos=info->buffer+Count;
info->read_end=info->buffer+length;
info->pos_in_file=pos_in_file;
if (Count)
memcpy(Buffer, info->buffer, Count);
DBUG_RETURN(0);
}
|
O3
|
c
|
my_b_cache_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movq 0x18(%rdi), %r14
subq 0x20(%rdi), %r14
addq (%rdi), %r14
cmpl $0x0, 0xe0(%rdi)
je 0x2c4f9
movl 0xd4(%rbx), %r15d
leaq 0x2ce700(%rip), %rax # 0x2fab88
movq (%rax), %rax
leaq -0xa0(%rbp), %rdi
movl %r15d, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x2c743
movl %r15d, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x30e38
cmpq $-0x1, %rax
je 0x2c6a9
movl $0x0, 0xe0(%rbx)
movq 0xd8(%rbx), %rax
testq %rax, %rax
sete %cl
cmpq %rbx, %rax
sete %dl
orb %cl, %dl
jne 0x2c4f9
movl $0x1, 0xe0(%rax)
movq 0xd8(%rax), %rax
cmpq %rbx, %rax
jne 0x2c4e3
movl %r14d, %eax
andl $0xfff, %eax # imm = 0xFFF
movl $0x2000, %ecx # imm = 0x2000
subq %rax, %rcx
cmpq %r13, %rcx
jbe 0x2c626
xorl %ecx, %ecx
movq 0xf0(%rbx), %r15
subq %rax, %r15
cmpl $0x4, 0xb0(%rbx)
je 0x2c535
movq 0x8(%rbx), %rax
subq %r14, %rax
cmpq %rax, %r15
cmovaeq %rax, %r15
testq %r15, %r15
je 0x2c6c2
movq %rcx, -0x48(%rbp)
movq %r13, -0x38(%rbp)
movq %r12, -0x40(%rbp)
movq 0xd8(%rbx), %rax
testq %rax, %rax
sete %cl
cmpq %rbx, %rax
sete %dl
orb %cl, %dl
jne 0x2c577
movl $0x1, 0xe0(%rax)
movq 0xd8(%rax), %rax
cmpq %rbx, %rax
jne 0x2c561
movl 0xd4(%rbx), %r13d
movq 0x20(%rbx), %r12
movq 0xf8(%rbx), %rax
movq %rax, -0x30(%rbp)
leaq 0x2ce5f4(%rip), %rax # 0x2fab88
movq (%rax), %rax
leaq -0xa0(%rbp), %rdi
movl %r13d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x2c76f
movl %r13d, %edi
movq %r12, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %rcx
callq 0x30c38
movq %rax, %r12
movq -0x38(%rbp), %rdx
cmpq %rdx, %r12
setae %al
cmpq $-0x1, %r12
setne %cl
testb %cl, %al
jne 0x2c6cf
cmpq $-0x1, %r12
je 0x2c5f9
movq 0x20(%rbx), %rsi
movq -0x40(%rbp), %rdi
movq %r12, %rdx
callq 0x24290
movq -0x48(%rbp), %rcx
addl %r12d, %ecx
cmpq $-0x1, %r12
movq %r14, (%rbx)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmovnel %ecx, %eax
movl %eax, 0xe4(%rbx)
movq 0x20(%rbx), %rax
movq %rax, 0x18(%rbx)
movq %rax, 0x10(%rbx)
jmp 0x2c6fe
cmpq %r14, 0x8(%rbx)
jbe 0x2c6b5
movq %r13, -0x38(%rbp)
movl %r13d, %r15d
andl $0xfffff000, %r15d # imm = 0xFFFFF000
subq %rax, %r15
movl 0xd4(%rbx), %r13d
movq 0xf8(%rbx), %rax
movq %rax, -0x30(%rbp)
leaq 0x2ce52e(%rip), %rax # 0x2fab88
movq (%rax), %rax
leaq -0xa0(%rbp), %rdi
movl %r13d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x2c7e2
movl %r13d, %edi
movq %r12, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %rcx
callq 0x30c38
cmpq %r15, %rax
movq -0x38(%rbp), %r13
jne 0x2c6f8
movq %r15, %rcx
subq %r15, %r13
addq %r15, %r12
addq %r15, %r14
xorl %eax, %eax
jmp 0x2c514
movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF
jmp 0x2c708
movq $0x1, 0xe0(%rbx)
jmp 0x2c708
testq %r13, %r13
je 0x2c720
movl %ecx, 0xe4(%rbx)
jmp 0x2c708
movq 0x20(%rbx), %rsi
leaq (%rsi,%rdx), %rax
movq %rax, 0x10(%rbx)
addq %rsi, %r12
movq %r12, 0x18(%rbx)
movq %r14, (%rbx)
xorl %r15d, %r15d
testq %rdx, %rdx
je 0x2c70e
movq -0x40(%rbp), %rdi
callq 0x24290
jmp 0x2c70e
movl %eax, 0xe4(%rbx)
movl $0x1, 0xe0(%rbx)
movl $0x1, %r15d
movl %r15d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0xe4(%rbx)
xorl %r15d, %r15d
testq %rcx, %rcx
je 0x2c70e
movq 0x20(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %rax, 0x18(%rbx)
movq %r14, (%rbx)
jmp 0x2c70e
movq %r13, -0x38(%rbp)
movq %r12, %r13
leaq -0x58(%rbp), %r12
movq %rax, %rdi
movl %r15d, %esi
movq %r14, %rdx
movq %r12, %rcx
callq 0x24c32
movq (%r12), %rax
movq %r13, %r12
movq -0x38(%rbp), %r13
jmp 0x2c4b8
movq %rax, %rcx
leaq 0x2ce40f(%rip), %rax # 0x2fab88
movq (%rax), %rax
leaq 0x37ee3(%rip), %rdx # 0x64666
movq %rcx, -0x50(%rbp)
movq %rcx, %rdi
movq %r15, %rsi
movl $0x2eb, %ecx # imm = 0x2EB
callq *0x210(%rax)
movl %r13d, %edi
movq %r12, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %r13
movq %r13, %rcx
callq 0x30c38
movq %rax, %r12
xorl %esi, %esi
testq %rax, %rax
cmovneq %rsi, %r15
cmpq $-0x1, %rax
cmovneq %rax, %rsi
testb $0x6, %r13b
cmovneq %r15, %rsi
leaq 0x2ce3b8(%rip), %rax # 0x2fab88
movq (%rax), %rax
movq -0x50(%rbp), %rdi
callq *0x218(%rax)
jmp 0x2c5ca
movq %rax, %rcx
leaq 0x2ce39c(%rip), %rax # 0x2fab88
movq (%rax), %rax
leaq 0x37e70(%rip), %rdx # 0x64666
movq %rcx, -0x48(%rbp)
movq %rcx, %rdi
movq %r15, %rsi
movl $0x2ab, %ecx # imm = 0x2AB
callq *0x210(%rax)
movl %r13d, %edi
movq %r12, -0x40(%rbp)
movq %r12, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %r12
movq %r12, %rcx
callq 0x30c38
movq %rax, %r13
xorl %esi, %esi
testq %rax, %rax
movl $0x0, %eax
cmoveq %r15, %rax
cmpq $-0x1, %r13
cmovneq %r13, %rsi
testb $0x6, %r12b
cmovneq %rax, %rsi
leaq 0x2ce33c(%rip), %rax # 0x2fab88
movq (%rax), %rax
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %r12
callq *0x218(%rax)
movq %r13, %rax
jmp 0x2c68d
|
_my_b_cache_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r13, rdx
mov r12, rsi
mov rbx, rdi
mov r14, [rdi+18h]
sub r14, [rdi+20h]
add r14, [rdi]
cmp dword ptr [rdi+0E0h], 0
jz short loc_2C4F9
mov r15d, [rbx+0D4h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A0]
mov esi, r15d
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz loc_2C743
mov edi, r15d
mov rsi, r14
xor edx, edx
xor ecx, ecx
call my_seek
loc_2C4B8:
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_2C6A9
mov dword ptr [rbx+0E0h], 0
mov rax, [rbx+0D8h]
test rax, rax
setz cl
cmp rax, rbx
setz dl
or dl, cl
jnz short loc_2C4F9
loc_2C4E3:
mov dword ptr [rax+0E0h], 1
mov rax, [rax+0D8h]
cmp rax, rbx
jnz short loc_2C4E3
loc_2C4F9:
mov eax, r14d
and eax, 0FFFh
mov ecx, 2000h
sub rcx, rax
cmp rcx, r13
jbe loc_2C626
xor ecx, ecx
loc_2C514:
mov r15, [rbx+0F0h]
sub r15, rax
cmp dword ptr [rbx+0B0h], 4
jz short loc_2C535
mov rax, [rbx+8]
sub rax, r14
cmp r15, rax
cmovnb r15, rax
loc_2C535:
test r15, r15
jz loc_2C6C2
mov [rbp+var_48], rcx
mov [rbp+var_38], r13
mov [rbp+var_40], r12
mov rax, [rbx+0D8h]
test rax, rax
setz cl
cmp rax, rbx
setz dl
or dl, cl
jnz short loc_2C577
loc_2C561:
mov dword ptr [rax+0E0h], 1
mov rax, [rax+0D8h]
cmp rax, rbx
jnz short loc_2C561
loc_2C577:
mov r13d, [rbx+0D4h]
mov r12, [rbx+20h]
mov rax, [rbx+0F8h]
mov [rbp+var_30], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A0]
mov esi, r13d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_2C76F
mov edi, r13d
mov rsi, r12
mov rdx, r15
mov rcx, [rbp+var_30]
call my_read
mov r12, rax
loc_2C5CA:
mov rdx, [rbp+var_38]
cmp r12, rdx
setnb al
cmp r12, 0FFFFFFFFFFFFFFFFh
setnz cl
test al, cl
jnz loc_2C6CF
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_2C5F9
mov rsi, [rbx+20h]
mov rdi, [rbp+var_40]
mov rdx, r12
call _memcpy
loc_2C5F9:
mov rcx, [rbp+var_48]
add ecx, r12d
cmp r12, 0FFFFFFFFFFFFFFFFh
mov [rbx], r14
mov eax, 0FFFFFFFFh
cmovnz eax, ecx
mov [rbx+0E4h], eax
mov rax, [rbx+20h]
mov [rbx+18h], rax
mov [rbx+10h], rax
jmp loc_2C6FE
loc_2C626:
cmp [rbx+8], r14
jbe loc_2C6B5
mov [rbp+var_38], r13
mov r15d, r13d
and r15d, 0FFFFF000h
sub r15, rax
mov r13d, [rbx+0D4h]
mov rax, [rbx+0F8h]
mov [rbp+var_30], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_A0]
mov esi, r13d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_2C7E2
mov edi, r13d
mov rsi, r12
mov rdx, r15
mov rcx, [rbp+var_30]
call my_read
loc_2C68D:
cmp rax, r15
mov r13, [rbp+var_38]
jnz short loc_2C6F8
mov rcx, r15
sub r13, r15
add r12, r15
add r14, r15
xor eax, eax
jmp loc_2C514
loc_2C6A9:
mov dword ptr [rbx+0E4h], 0FFFFFFFFh
jmp short loc_2C708
loc_2C6B5:
mov qword ptr [rbx+0E0h], 1
jmp short loc_2C708
loc_2C6C2:
test r13, r13
jz short loc_2C720
mov [rbx+0E4h], ecx
jmp short loc_2C708
loc_2C6CF:
mov rsi, [rbx+20h]
lea rax, [rsi+rdx]
mov [rbx+10h], rax
add r12, rsi
mov [rbx+18h], r12
mov [rbx], r14
xor r15d, r15d
test rdx, rdx
jz short loc_2C70E
mov rdi, [rbp+var_40]
call _memcpy
jmp short loc_2C70E
loc_2C6F8:
mov [rbx+0E4h], eax
loc_2C6FE:
mov dword ptr [rbx+0E0h], 1
loc_2C708:
mov r15d, 1
loc_2C70E:
mov eax, r15d
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2C720:
mov dword ptr [rbx+0E4h], 0
xor r15d, r15d
test rcx, rcx
jz short loc_2C70E
mov rax, [rbx+20h]
mov [rbx+10h], rax
mov [rbx+18h], rax
mov [rbx], r14
jmp short loc_2C70E
loc_2C743:
mov [rbp+var_38], r13
mov r13, r12
lea r12, [rbp+var_58]
mov rdi, rax
mov esi, r15d
mov rdx, r14
mov rcx, r12
call _my_b_cache_read_cold_1
mov rax, [r12]
mov r12, r13
mov r13, [rbp+var_38]
jmp loc_2C4B8
loc_2C76F:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov [rbp+var_50], rcx
mov rdi, rcx
mov rsi, r15
mov ecx, 2EBh
call qword ptr [rax+210h]
mov edi, r13d
mov rsi, r12
mov rdx, r15
mov r13, [rbp+var_30]
mov rcx, r13
call my_read
mov r12, rax
xor esi, esi
test rax, rax
cmovnz r15, rsi
cmp rax, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rax
test r13b, 6
cmovnz rsi, r15
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_50]
call qword ptr [rax+218h]
jmp loc_2C5CA
loc_2C7E2:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov [rbp+var_48], rcx
mov rdi, rcx
mov rsi, r15
mov ecx, 2ABh
call qword ptr [rax+210h]
mov edi, r13d
mov [rbp+var_40], r12
mov rsi, r12
mov rdx, r15
mov r12, [rbp+var_30]
mov rcx, r12
call my_read
mov r13, rax
xor esi, esi
test rax, rax
mov eax, 0
cmovz rax, r15
cmp r13, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, r13
test r12b, 6
cmovnz rsi, rax
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp+var_48]
mov r12, [rbp+var_40]
call qword ptr [rax+218h]
mov rax, r13
jmp loc_2C68D
|
long long my_b_cache_read(long long a1, long long a2, unsigned long long a3)
{
long long v4; // r12
unsigned long long v5; // r14
unsigned int v6; // r15d
long long v7; // rax
long long v8; // rax
long long v9; // rax
unsigned long long v10; // rax
long long v11; // rcx
unsigned long long v12; // r15
long long v13; // rax
unsigned int v14; // r13d
long long v15; // r12
long long v16; // rax
unsigned long long v17; // r12
unsigned long long v18; // rdx
int v19; // ecx
int v20; // eax
long long v21; // rax
unsigned long long v22; // r15
unsigned int v23; // r13d
long long v24; // rax
long long v25; // rax
long long v26; // rsi
unsigned int v27; // r15d
long long v29; // rax
char v30; // r12
long long v31; // r13
long long v32; // rsi
long long v33; // rax
_BYTE v34[72]; // [rsp+0h] [rbp-A0h] BYREF
long long v35; // [rsp+48h] [rbp-58h] BYREF
long long v36; // [rsp+50h] [rbp-50h]
long long v37; // [rsp+58h] [rbp-48h]
long long v38; // [rsp+60h] [rbp-40h]
unsigned long long v39; // [rsp+68h] [rbp-38h]
long long v40; // [rsp+70h] [rbp-30h]
v4 = a2;
v5 = *(_QWORD *)a1 + *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32);
if ( *(_DWORD *)(a1 + 224) )
{
v6 = *(_DWORD *)(a1 + 212);
v7 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v34, v6, 8LL);
if ( v7 )
{
v39 = a3;
my_b_cache_read_cold_1(v7, v6, v5, &v35);
v8 = v35;
a3 = v39;
}
else
{
v8 = my_seek(v6, v5, 0LL, 0LL);
}
if ( v8 == -1 )
{
*(_DWORD *)(a1 + 228) = -1;
return 1;
}
*(_DWORD *)(a1 + 224) = 0;
v9 = *(_QWORD *)(a1 + 216);
if ( v9 != 0 && v9 != a1 )
{
do
{
*(_DWORD *)(v9 + 224) = 1;
v9 = *(_QWORD *)(v9 + 216);
}
while ( v9 != a1 );
}
}
v10 = v5 & 0xFFF;
if ( 0x2000 - v10 <= a3 )
{
if ( *(_QWORD *)(a1 + 8) <= v5 )
{
*(_QWORD *)(a1 + 224) = 1LL;
return 1;
}
v39 = a3;
v22 = ((unsigned int)a3 & 0xFFFFF000) - v10;
v23 = *(_DWORD *)(a1 + 212);
v40 = *(_QWORD *)(a1 + 248);
v24 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v34, v23, 6LL);
if ( v24 )
{
v37 = v24;
(*((void ( **)(long long, unsigned long long, const char *, long long))PSI_server + 66))(
v24,
v22,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
683LL);
v38 = a2;
v30 = v40;
v31 = my_read(v23, a2, v22, v40);
v32 = 0LL;
v33 = 0LL;
if ( !v31 )
v33 = v22;
if ( v31 != -1 )
v32 = v31;
if ( (v30 & 6) != 0 )
v32 = v33;
v4 = v38;
(*((void ( **)(long long, long long))PSI_server + 67))(v37, v32);
v25 = v31;
}
else
{
v25 = my_read(v23, a2, v22, v40);
}
if ( v25 != v22 )
{
*(_DWORD *)(a1 + 228) = v25;
LABEL_35:
*(_DWORD *)(a1 + 224) = 1;
return 1;
}
v11 = v22;
a3 = v39 - v22;
v4 += v22;
v5 += v22;
v10 = 0LL;
}
else
{
v11 = 0LL;
}
v12 = *(_QWORD *)(a1 + 240) - v10;
if ( *(_DWORD *)(a1 + 176) != 4 && v12 >= *(_QWORD *)(a1 + 8) - v5 )
v12 = *(_QWORD *)(a1 + 8) - v5;
if ( !v12 )
{
if ( !a3 )
{
*(_DWORD *)(a1 + 228) = 0;
v27 = 0;
if ( v11 )
{
v29 = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 16) = v29;
*(_QWORD *)(a1 + 24) = v29;
*(_QWORD *)a1 = v5;
}
return v27;
}
*(_DWORD *)(a1 + 228) = v11;
return 1;
}
v37 = v11;
v39 = a3;
v38 = v4;
v13 = *(_QWORD *)(a1 + 216);
if ( v13 != 0 && v13 != a1 )
{
do
{
*(_DWORD *)(v13 + 224) = 1;
v13 = *(_QWORD *)(v13 + 216);
}
while ( v13 != a1 );
}
v14 = *(_DWORD *)(a1 + 212);
v15 = *(_QWORD *)(a1 + 32);
v40 = *(_QWORD *)(a1 + 248);
v16 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v34, v14, 6LL);
if ( v16 )
{
v36 = v16;
(*((void ( **)(long long, unsigned long long, const char *, long long))PSI_server + 66))(
v16,
v12,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
747LL);
v17 = my_read(v14, v15, v12, v40);
(*((void ( **)(long long))PSI_server + 67))(v36);
}
else
{
v17 = my_read(v14, v15, v12, v40);
}
v18 = v39;
if ( v17 == -1LL || v17 < v39 )
{
if ( v17 != -1LL )
memcpy(v38, *(_QWORD *)(a1 + 32));
v19 = v17 + v37;
*(_QWORD *)a1 = v5;
v20 = -1;
if ( v17 != -1LL )
v20 = v19;
*(_DWORD *)(a1 + 228) = v20;
v21 = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 24) = v21;
*(_QWORD *)(a1 + 16) = v21;
goto LABEL_35;
}
v26 = *(_QWORD *)(a1 + 32);
*(_QWORD *)(a1 + 16) = v26 + v39;
*(_QWORD *)(a1 + 24) = v26 + v17;
*(_QWORD *)a1 = v5;
v27 = 0;
if ( v18 )
memcpy(v38, v26);
return v27;
}
|
_my_b_cache_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x18]
SUB R14,qword ptr [RDI + 0x20]
ADD R14,qword ptr [RDI]
CMP dword ptr [RDI + 0xe0],0x0
JZ 0x0012c4f9
MOV R15D,dword ptr [RBX + 0xd4]
LEA RAX,[0x3fab88]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa0]
MOV ESI,R15D
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0012c743
MOV EDI,R15D
MOV RSI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x00130e38
LAB_0012c4b8:
CMP RAX,-0x1
JZ 0x0012c6a9
MOV dword ptr [RBX + 0xe0],0x0
MOV RAX,qword ptr [RBX + 0xd8]
TEST RAX,RAX
SETZ CL
CMP RAX,RBX
SETZ DL
OR DL,CL
JNZ 0x0012c4f9
LAB_0012c4e3:
MOV dword ptr [RAX + 0xe0],0x1
MOV RAX,qword ptr [RAX + 0xd8]
CMP RAX,RBX
JNZ 0x0012c4e3
LAB_0012c4f9:
MOV EAX,R14D
AND EAX,0xfff
MOV ECX,0x2000
SUB RCX,RAX
CMP RCX,R13
JBE 0x0012c626
XOR ECX,ECX
LAB_0012c514:
MOV R15,qword ptr [RBX + 0xf0]
SUB R15,RAX
CMP dword ptr [RBX + 0xb0],0x4
JZ 0x0012c535
MOV RAX,qword ptr [RBX + 0x8]
SUB RAX,R14
CMP R15,RAX
CMOVNC R15,RAX
LAB_0012c535:
TEST R15,R15
JZ 0x0012c6c2
MOV qword ptr [RBP + -0x48],RCX
MOV qword ptr [RBP + -0x38],R13
MOV qword ptr [RBP + -0x40],R12
MOV RAX,qword ptr [RBX + 0xd8]
TEST RAX,RAX
SETZ CL
CMP RAX,RBX
SETZ DL
OR DL,CL
JNZ 0x0012c577
LAB_0012c561:
MOV dword ptr [RAX + 0xe0],0x1
MOV RAX,qword ptr [RAX + 0xd8]
CMP RAX,RBX
JNZ 0x0012c561
LAB_0012c577:
MOV R13D,dword ptr [RBX + 0xd4]
MOV R12,qword ptr [RBX + 0x20]
MOV RAX,qword ptr [RBX + 0xf8]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x3fab88]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa0]
MOV ESI,R13D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0012c76f
MOV EDI,R13D
MOV RSI,R12
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x00130c38
MOV R12,RAX
LAB_0012c5ca:
MOV RDX,qword ptr [RBP + -0x38]
CMP R12,RDX
SETNC AL
CMP R12,-0x1
SETNZ CL
TEST AL,CL
JNZ 0x0012c6cf
CMP R12,-0x1
JZ 0x0012c5f9
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RBP + -0x40]
MOV RDX,R12
CALL 0x00124290
LAB_0012c5f9:
MOV RCX,qword ptr [RBP + -0x48]
ADD ECX,R12D
CMP R12,-0x1
MOV qword ptr [RBX],R14
MOV EAX,0xffffffff
CMOVNZ EAX,ECX
MOV dword ptr [RBX + 0xe4],EAX
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX + 0x10],RAX
JMP 0x0012c6fe
LAB_0012c626:
CMP qword ptr [RBX + 0x8],R14
JBE 0x0012c6b5
MOV qword ptr [RBP + -0x38],R13
MOV R15D,R13D
AND R15D,0xfffff000
SUB R15,RAX
MOV R13D,dword ptr [RBX + 0xd4]
MOV RAX,qword ptr [RBX + 0xf8]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x3fab88]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa0]
MOV ESI,R13D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0012c7e2
MOV EDI,R13D
MOV RSI,R12
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x00130c38
LAB_0012c68d:
CMP RAX,R15
MOV R13,qword ptr [RBP + -0x38]
JNZ 0x0012c6f8
MOV RCX,R15
SUB R13,R15
ADD R12,R15
ADD R14,R15
XOR EAX,EAX
JMP 0x0012c514
LAB_0012c6a9:
MOV dword ptr [RBX + 0xe4],0xffffffff
JMP 0x0012c708
LAB_0012c6b5:
MOV qword ptr [RBX + 0xe0],0x1
JMP 0x0012c708
LAB_0012c6c2:
TEST R13,R13
JZ 0x0012c720
MOV dword ptr [RBX + 0xe4],ECX
JMP 0x0012c708
LAB_0012c6cf:
MOV RSI,qword ptr [RBX + 0x20]
LEA RAX,[RSI + RDX*0x1]
MOV qword ptr [RBX + 0x10],RAX
ADD R12,RSI
MOV qword ptr [RBX + 0x18],R12
MOV qword ptr [RBX],R14
XOR R15D,R15D
TEST RDX,RDX
JZ 0x0012c70e
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00124290
JMP 0x0012c70e
LAB_0012c6f8:
MOV dword ptr [RBX + 0xe4],EAX
LAB_0012c6fe:
MOV dword ptr [RBX + 0xe0],0x1
LAB_0012c708:
MOV R15D,0x1
LAB_0012c70e:
MOV EAX,R15D
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012c720:
MOV dword ptr [RBX + 0xe4],0x0
XOR R15D,R15D
TEST RCX,RCX
JZ 0x0012c70e
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX],R14
JMP 0x0012c70e
LAB_0012c743:
MOV qword ptr [RBP + -0x38],R13
MOV R13,R12
LEA R12,[RBP + -0x58]
MOV RDI,RAX
MOV ESI,R15D
MOV RDX,R14
MOV RCX,R12
CALL 0x00124c32
MOV RAX,qword ptr [R12]
MOV R12,R13
MOV R13,qword ptr [RBP + -0x38]
JMP 0x0012c4b8
LAB_0012c76f:
MOV RCX,RAX
LEA RAX,[0x3fab88]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x164666]
MOV qword ptr [RBP + -0x50],RCX
MOV RDI,RCX
MOV RSI,R15
MOV ECX,0x2eb
CALL qword ptr [RAX + 0x210]
MOV EDI,R13D
MOV RSI,R12
MOV RDX,R15
MOV R13,qword ptr [RBP + -0x30]
MOV RCX,R13
CALL 0x00130c38
MOV R12,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVNZ R15,RSI
CMP RAX,-0x1
CMOVNZ RSI,RAX
TEST R13B,0x6
CMOVNZ RSI,R15
LEA RAX,[0x3fab88]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x50]
CALL qword ptr [RAX + 0x218]
JMP 0x0012c5ca
LAB_0012c7e2:
MOV RCX,RAX
LEA RAX,[0x3fab88]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x164666]
MOV qword ptr [RBP + -0x48],RCX
MOV RDI,RCX
MOV RSI,R15
MOV ECX,0x2ab
CALL qword ptr [RAX + 0x210]
MOV EDI,R13D
MOV qword ptr [RBP + -0x40],R12
MOV RSI,R12
MOV RDX,R15
MOV R12,qword ptr [RBP + -0x30]
MOV RCX,R12
CALL 0x00130c38
MOV R13,RAX
XOR ESI,ESI
TEST RAX,RAX
MOV EAX,0x0
CMOVZ RAX,R15
CMP R13,-0x1
CMOVNZ RSI,R13
TEST R12B,0x6
CMOVNZ RSI,RAX
LEA RAX,[0x3fab88]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x48]
MOV R12,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0x218]
MOV RAX,R13
JMP 0x0012c68d
|
int8 _my_b_cache_read(ulong *param_1,void *param_2,ulong param_3)
{
int4 uVar1;
void *__src;
ulong uVar2;
int iVar3;
long lVar4;
ulong *puVar5;
ulong uVar6;
long lVar7;
long lVar8;
ulong uVar9;
long lVar10;
ulong uVar11;
ulong uVar12;
int1 local_a8 [72];
long local_60;
long local_58;
long local_50;
void *local_48;
ulong local_40;
ulong local_38;
uVar11 = (param_1[3] - param_1[4]) + *param_1;
if ((int)param_1[0x1c] != 0) {
uVar1 = *(int4 *)((long)param_1 + 0xd4);
lVar4 = (**(code **)(PSI_server + 0x158))(local_a8,uVar1,8);
if (lVar4 == 0) {
local_60 = my_seek(uVar1,uVar11,0,0);
}
else {
local_40 = param_3;
_my_b_cache_read_cold_1(lVar4,uVar1,uVar11,&local_60);
param_3 = local_40;
}
if (local_60 == -1) {
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
return 1;
}
*(int4 *)(param_1 + 0x1c) = 0;
puVar5 = (ulong *)param_1[0x1b];
if (puVar5 != param_1 && puVar5 != (ulong *)0x0) {
do {
*(int4 *)(puVar5 + 0x1c) = 1;
puVar5 = (ulong *)puVar5[0x1b];
} while (puVar5 != param_1);
}
}
uVar12 = (ulong)((uint)uVar11 & 0xfff);
if (param_3 < 0x2000 - uVar12) {
lVar4 = 0;
}
else {
if (param_1[1] <= uVar11) {
param_1[0x1c] = 1;
return 1;
}
lVar4 = ((uint)param_3 & 0xfffff000) - uVar12;
uVar1 = *(int4 *)((long)param_1 + 0xd4);
local_38 = param_1[0x1f];
local_40 = param_3;
local_50 = (**(code **)(PSI_server + 0x158))(local_a8,uVar1,6);
if (local_50 == 0) {
lVar7 = my_read(uVar1,param_2,lVar4,local_38);
}
else {
(**(code **)(PSI_server + 0x210))
(local_50,lVar4,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x2ab)
;
uVar12 = local_38;
local_48 = param_2;
lVar7 = my_read(uVar1,param_2,lVar4,local_38);
param_2 = local_48;
lVar8 = 0;
if (lVar7 == 0) {
lVar8 = lVar4;
}
lVar10 = 0;
if (lVar7 != -1) {
lVar10 = lVar7;
}
if ((uVar12 & 6) != 0) {
lVar10 = lVar8;
}
(**(code **)(PSI_server + 0x218))(local_50,lVar10);
}
if (lVar7 != lVar4) {
*(int *)((long)param_1 + 0xe4) = (int)lVar7;
goto LAB_0012c6fe;
}
param_3 = local_40 - lVar4;
param_2 = (void *)((long)param_2 + lVar4);
uVar11 = uVar11 + lVar4;
uVar12 = 0;
}
uVar12 = param_1[0x1e] - uVar12;
if (((int)param_1[0x16] != 4) && (param_1[1] - uVar11 <= uVar12)) {
uVar12 = param_1[1] - uVar11;
}
if (uVar12 == 0) {
if (param_3 != 0) {
*(int *)((long)param_1 + 0xe4) = (int)lVar4;
return 1;
}
*(int4 *)((long)param_1 + 0xe4) = 0;
if (lVar4 != 0) {
param_1[2] = param_1[4];
param_1[3] = param_1[4];
*param_1 = uVar11;
return 0;
}
return 0;
}
puVar5 = (ulong *)param_1[0x1b];
if (puVar5 != param_1 && puVar5 != (ulong *)0x0) {
do {
*(int4 *)(puVar5 + 0x1c) = 1;
puVar5 = (ulong *)puVar5[0x1b];
} while (puVar5 != param_1);
}
uVar1 = *(int4 *)((long)param_1 + 0xd4);
uVar6 = param_1[4];
local_38 = param_1[0x1f];
local_50 = lVar4;
local_48 = param_2;
local_40 = param_3;
lVar4 = (**(code **)(PSI_server + 0x158))(local_a8,uVar1,6);
if (lVar4 == 0) {
uVar6 = my_read(uVar1,uVar6,uVar12,local_38);
}
else {
local_58 = lVar4;
(**(code **)(PSI_server + 0x210))
(lVar4,uVar12,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x2eb);
uVar2 = local_38;
uVar6 = my_read(uVar1,uVar6,uVar12,local_38);
if (uVar6 != 0) {
uVar12 = 0;
}
uVar9 = 0;
if (uVar6 != 0xffffffffffffffff) {
uVar9 = uVar6;
}
if ((uVar2 & 6) != 0) {
uVar9 = uVar12;
}
(**(code **)(PSI_server + 0x218))(local_58,uVar9);
}
if (local_40 <= uVar6 && uVar6 != 0xffffffffffffffff) {
__src = (void *)param_1[4];
param_1[2] = (long)__src + local_40;
param_1[3] = uVar6 + (long)__src;
*param_1 = uVar11;
if (local_40 != 0) {
memcpy(local_48,__src,local_40);
return 0;
}
return 0;
}
if (uVar6 != 0xffffffffffffffff) {
memcpy(local_48,(void *)param_1[4],uVar6);
}
*param_1 = uVar11;
iVar3 = -1;
if (uVar6 != 0xffffffffffffffff) {
iVar3 = (int)local_50 + (int)uVar6;
}
*(int *)((long)param_1 + 0xe4) = iVar3;
param_1[3] = param_1[4];
param_1[2] = param_1[4];
LAB_0012c6fe:
*(int4 *)(param_1 + 0x1c) = 1;
return 1;
}
|
|
12,453
|
nglog::(anonymous namespace)::LogCleaner::GetOverdueLogNames(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
|
ng-log[P]ng-log/src/logging.cc
|
vector<string> LogCleaner::GetOverdueLogNames(
string log_directory,
const std::chrono::system_clock::time_point& current_time,
const string& base_filename, const string& filename_extension) const {
// The names of overdue logs.
vector<string> overdue_log_names;
// Try to get all files within log_directory.
DIR* dir;
struct dirent* ent;
if ((dir = opendir(log_directory.c_str()))) {
while ((ent = readdir(dir))) {
if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) {
continue;
}
string filepath = ent->d_name;
const char* const dir_delim_end =
possible_dir_delim + sizeof(possible_dir_delim);
if (!log_directory.empty() &&
std::find(possible_dir_delim, dir_delim_end,
log_directory[log_directory.size() - 1]) != dir_delim_end) {
filepath = log_directory + filepath;
}
if (IsLogFromCurrentProject(filepath, base_filename,
filename_extension) &&
IsLogLastModifiedOver(filepath, current_time)) {
overdue_log_names.push_back(filepath);
}
}
closedir(dir);
}
return overdue_log_names;
}
|
O0
|
cpp
|
nglog::(anonymous namespace)::LogCleaner::GetOverdueLogNames(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
movq %rdx, -0xb8(%rbp)
movq %rdi, -0xd0(%rbp)
movq %rdi, %rax
movq %rax, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
movb $0x0, -0x31(%rbp)
callq 0x231d0
movq -0xb8(%rbp), %rdi
callq 0xa340
movq %rax, %rdi
callq 0xad50
movq %rax, -0xb0(%rbp)
jmp 0x3858c
movq -0xb0(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x387c5
jmp 0x385a3
movq -0x40(%rbp), %rdi
callq 0xad80
movq %rax, -0xd8(%rbp)
jmp 0x385b5
movq -0xd8(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x387b8
movq -0x48(%rbp), %rdi
addq $0x13, %rdi
leaq 0x38e3c(%rip), %rsi # 0x71415
callq 0xabe0
cmpl $0x0, %eax
je 0x385fc
movq -0x48(%rbp), %rdi
addq $0x13, %rdi
leaq 0x37b9a(%rip), %rsi # 0x7018c
callq 0xabe0
cmpl $0x0, %eax
jne 0x3860f
jmp 0x385a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x387eb
movq -0x48(%rbp), %rax
addq $0x13, %rax
movq %rax, -0xe8(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0xaf60
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0x22510
jmp 0x38647
leaq -0x79(%rbp), %rdi
callq 0xa8b0
movq -0xb8(%rbp), %rdi
leaq 0x3738a(%rip), %rax # 0x6f9e8
addq $0x1, %rax
movq %rax, -0x88(%rbp)
callq 0xae70
testb $0x1, %al
jne 0x38742
movq -0xb8(%rbp), %rdi
callq 0xa5a0
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0xb0c0
movq %rax, -0xf0(%rbp)
jmp 0x3869d
movq -0xf0(%rbp), %rdx
leaq 0x3733d(%rip), %rdi # 0x6f9e8
leaq 0x37337(%rip), %rsi # 0x6f9e9
callq 0x3b4d0
movq %rax, -0xf8(%rbp)
jmp 0x386c0
movq -0xf8(%rbp), %rax
leaq 0x3731a(%rip), %rcx # 0x6f9e8
addq $0x1, %rcx
cmpq %rcx, %rax
je 0x38742
movq -0xb8(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
leaq -0x78(%rbp), %rdx
callq 0x3ccd0
jmp 0x386f0
leaq -0x78(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xaa30
leaq -0xa8(%rbp), %rdi
callq 0xb128
jmp 0x38742
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x79(%rbp), %rdi
callq 0xa8b0
jmp 0x387eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xb128
jmp 0x387eb
movq -0xc0(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x78(%rbp), %rsi
callq 0x38800
movb %al, -0xf9(%rbp)
jmp 0x38762
movb -0xf9(%rbp), %al
testb $0x1, %al
jne 0x3876e
jmp 0x387aa
movq -0xc0(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0x78(%rbp), %rsi
callq 0x38d80
movb %al, -0xfa(%rbp)
jmp 0x3878a
movb -0xfa(%rbp), %al
testb $0x1, %al
jne 0x38796
jmp 0x387aa
movq -0xd0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x2c620
jmp 0x387a8
jmp 0x387aa
leaq -0x78(%rbp), %rdi
callq 0xb128
jmp 0x385a3
movq -0x40(%rbp), %rdi
callq 0xae30
jmp 0x387c3
jmp 0x387c5
movb $0x1, -0x31(%rbp)
testb $0x1, -0x31(%rbp)
jne 0x387db
movq -0xd0(%rbp), %rdi
callq 0x231f0
movq -0xc8(%rbp), %rax
addq $0x100, %rsp # imm = 0x100
popq %rbp
retq
movq -0xd0(%rbp), %rdi
callq 0x231f0
movq -0x50(%rbp), %rdi
callq 0xaf50
|
_ZNK5nglog12_GLOBAL__N_110LogCleaner18GetOverdueLogNamesENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNSt6chrono10time_pointINS8_3_V212system_clockENS8_8durationIlSt5ratioILl1ELl1000000000EEEEEERKS7_SK_:
push rbp
mov rbp, rsp
sub rsp, 100h
mov [rbp+var_B8], rdx
mov [rbp+var_D0], rdi
mov rax, rdi
mov [rbp+var_C8], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_C0], rax
mov [rbp+var_31], 0
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void)
mov rdi, [rbp+var_B8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, rax
call _opendir
mov [rbp+var_B0], rax
jmp short $+2
loc_3858C:
mov rax, [rbp+var_B0]
mov [rbp+var_40], rax
cmp rax, 0
jz loc_387C5
jmp short $+2
loc_385A3:
mov rdi, [rbp+var_40]
call _readdir
mov [rbp+var_D8], rax
jmp short $+2
loc_385B5:
mov rax, [rbp+var_D8]
mov [rbp+var_48], rax
cmp rax, 0
jz loc_387B8
mov rdi, [rbp+var_48]
add rdi, 13h
lea rsi, aSectionNameSIs+50h; "."
call _strcmp
cmp eax, 0
jz short loc_385FC
mov rdi, [rbp+var_48]
add rdi, 13h
lea rsi, asc_7018C; ".."
call _strcmp
cmp eax, 0
jnz short loc_3860F
loc_385FC:
jmp short loc_385A3
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp loc_387EB
loc_3860F:
mov rax, [rbp+var_48]
add rax, 13h
mov [rbp+var_E8], rax
lea rdi, [rbp+var_79]
mov [rbp+var_E0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_E8]
mov rdx, [rbp+var_E0]
lea rdi, [rbp+var_78]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_38647:
lea rdi, [rbp+var_79]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_B8]
lea rax, _ZN5nglog12_GLOBAL__N_118possible_dir_delimE; nglog::`anonymous namespace'::possible_dir_delim
add rax, 1
mov [rbp+var_88], rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_38742
mov rdi, [rbp+var_B8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rbp+var_B8]
mov rsi, rax
dec rsi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov [rbp+var_F0], rax
jmp short $+2
loc_3869D:
mov rdx, [rbp+var_F0]
lea rdi, _ZN5nglog12_GLOBAL__N_118possible_dir_delimE; nglog::`anonymous namespace'::possible_dir_delim
lea rsi, _ZTSN5nglog4base6LoggerE; type descriptor name
call _ZSt4findIPKccET_S2_S2_RKT0_; std::find<char const*,char>(char const*,char const*,char const&)
mov [rbp+var_F8], rax
jmp short $+2
loc_386C0:
mov rax, [rbp+var_F8]
lea rcx, _ZN5nglog12_GLOBAL__N_118possible_dir_delimE; nglog::`anonymous namespace'::possible_dir_delim
add rcx, 1
cmp rax, rcx
jz short loc_38742
mov rsi, [rbp+var_B8]
lea rdi, [rbp+var_A8]
lea rdx, [rbp+var_78]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&)
jmp short $+2
loc_386F0:
lea rdi, [rbp+var_78]
lea rsi, [rbp+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rbp+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_38742
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_79]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_387EB
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_387EB
loc_38742:
mov rdi, [rbp+var_C0]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea rsi, [rbp+var_78]
call _ZNK5nglog12_GLOBAL__N_110LogCleaner23IsLogFromCurrentProjectERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_; nglog::`anonymous namespace'::LogCleaner::IsLogFromCurrentProject(std::string const&,std::string const&,std::string const&)
mov [rbp+var_F9], al
jmp short $+2
loc_38762:
mov al, [rbp+var_F9]
test al, 1
jnz short loc_3876E
jmp short loc_387AA
loc_3876E:
mov rdi, [rbp+var_C0]
mov rdx, [rbp+var_20]
lea rsi, [rbp+var_78]
call _ZNK5nglog12_GLOBAL__N_110LogCleaner21IsLogLastModifiedOverERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNSt6chrono10time_pointINSA_3_V212system_clockENSA_8durationIlSt5ratioILl1ELl1000000000EEEEEE; nglog::`anonymous namespace'::LogCleaner::IsLogLastModifiedOver(std::string const&,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&)
mov [rbp+var_FA], al
jmp short $+2
loc_3878A:
mov al, [rbp+var_FA]
test al, 1
jnz short loc_38796
jmp short loc_387AA
loc_38796:
mov rdi, [rbp+var_D0]
lea rsi, [rbp+var_78]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&)
jmp short $+2
loc_387A8:
jmp short $+2
loc_387AA:
lea rdi, [rbp+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_385A3
loc_387B8:
mov rdi, [rbp+var_40]
call _closedir
jmp short $+2
loc_387C3:
jmp short $+2
loc_387C5:
mov [rbp+var_31], 1
test [rbp+var_31], 1
jnz short loc_387DB
mov rdi, [rbp+var_D0]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_387DB:
mov rax, [rbp+var_C8]
add rsp, 100h
pop rbp
retn
loc_387EB:
mov rdi, [rbp+var_D0]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rbp+var_50]
call __Unwind_Resume
|
long long nglog::`anonymous namespace'::LogCleaner::GetOverdueLogNames(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6)
{
long long v6; // rax
long long v7; // rax
long long v9; // [rsp+10h] [rbp-F0h]
long long v10; // [rsp+18h] [rbp-E8h]
_BYTE v12[32]; // [rsp+58h] [rbp-A8h] BYREF
char *v13; // [rsp+78h] [rbp-88h]
char v14; // [rsp+87h] [rbp-79h] BYREF
_BYTE v15[36]; // [rsp+88h] [rbp-78h] BYREF
long long v16; // [rsp+B8h] [rbp-48h]
long long v17; // [rsp+C0h] [rbp-40h]
char v18; // [rsp+CFh] [rbp-31h]
long long v19; // [rsp+D0h] [rbp-30h]
long long v20; // [rsp+D8h] [rbp-28h]
long long v21; // [rsp+E0h] [rbp-20h]
long long v22; // [rsp+E8h] [rbp-18h]
long long v23; // [rsp+F0h] [rbp-10h]
long long v24; // [rsp+F8h] [rbp-8h]
v24 = a1;
v23 = a2;
v22 = a3;
v21 = a4;
v20 = a5;
v19 = a6;
v18 = 0;
std::vector<std::string>::vector(a1);
v6 = std::string::c_str(a3);
v17 = opendir(v6);
if ( v17 )
{
while ( 1 )
{
v16 = readdir(v17);
if ( !v16 )
break;
if ( (unsigned int)strcmp(v16 + 19, ".") && (unsigned int)strcmp(v16 + 19, "..") )
{
v10 = v16 + 19;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v15, v10, (long long)&v14);
std::allocator<char>::~allocator(&v14);
v13 = (char *)&nglog::`anonymous namespace'::possible_dir_delim + 1;
if ( (std::string::empty(a3) & 1) == 0 )
{
v7 = std::string::size(a3);
v9 = std::string::operator[](a3, v7 - 1);
if ( (_UNKNOWN *)std::find<char const*,char>(
&nglog::`anonymous namespace'::possible_dir_delim,
"N5nglog4base6LoggerE",
v9) != (_UNKNOWN *)((char *)&nglog::`anonymous namespace'::possible_dir_delim + 1) )
{
std::operator+<char>(v12, a3, v15);
std::string::operator=(v15, v12);
std::string::~string(v12);
}
}
if ( (nglog::`anonymous namespace'::LogCleaner::IsLogFromCurrentProject(a2, v15, v20, v19) & 1) != 0
&& (nglog::`anonymous namespace'::LogCleaner::IsLogLastModifiedOver(a2, v15, v21) & 1) != 0 )
{
std::vector<std::string>::push_back(a1, (long long)v15);
}
std::string::~string(v15);
}
}
closedir(v17);
}
return a1;
}
|
GetOverdueLogNames:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x100
MOV qword ptr [RBP + -0xb8],RDX
MOV qword ptr [RBP + -0xd0],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xc8],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xc0],RAX
MOV byte ptr [RBP + -0x31],0x0
CALL 0x001231d0
MOV RDI,qword ptr [RBP + -0xb8]
CALL 0x0010a340
MOV RDI,RAX
LAB_0013857e:
CALL 0x0010ad50
MOV qword ptr [RBP + -0xb0],RAX
JMP 0x0013858c
LAB_0013858c:
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JZ 0x001387c5
JMP 0x001385a3
LAB_001385a3:
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x0010ad80
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x001385b5
LAB_001385b5:
MOV RAX,qword ptr [RBP + -0xd8]
MOV qword ptr [RBP + -0x48],RAX
CMP RAX,0x0
JZ 0x001387b8
MOV RDI,qword ptr [RBP + -0x48]
ADD RDI,0x13
LEA RSI,[0x171415]
CALL 0x0010abe0
CMP EAX,0x0
JZ 0x001385fc
MOV RDI,qword ptr [RBP + -0x48]
ADD RDI,0x13
LEA RSI,[0x17018c]
CALL 0x0010abe0
CMP EAX,0x0
JNZ 0x0013860f
LAB_001385fc:
JMP 0x001385a3
LAB_0013860f:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x13
MOV qword ptr [RBP + -0xe8],RAX
LEA RDI,[RBP + -0x79]
MOV qword ptr [RBP + -0xe0],RDI
CALL 0x0010af60
MOV RSI,qword ptr [RBP + -0xe8]
MOV RDX,qword ptr [RBP + -0xe0]
LAB_0013863c:
LEA RDI,[RBP + -0x78]
CALL 0x00122510
JMP 0x00138647
LAB_00138647:
LEA RDI,[RBP + -0x79]
CALL 0x0010a8b0
MOV RDI,qword ptr [RBP + -0xb8]
LEA RAX,[0x16f9e8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x88],RAX
CALL 0x0010ae70
TEST AL,0x1
JNZ 0x00138742
MOV RDI,qword ptr [RBP + -0xb8]
CALL 0x0010a5a0
MOV RDI,qword ptr [RBP + -0xb8]
MOV RSI,RAX
DEC RSI
LAB_0013868f:
CALL 0x0010b0c0
MOV qword ptr [RBP + -0xf0],RAX
JMP 0x0013869d
LAB_0013869d:
MOV RDX,qword ptr [RBP + -0xf0]
LEA RDI,[0x16f9e8]
LEA RSI,[0x16f9e9]
CALL 0x0013b4d0
MOV qword ptr [RBP + -0xf8],RAX
JMP 0x001386c0
LAB_001386c0:
MOV RAX,qword ptr [RBP + -0xf8]
LEA RCX,[0x16f9e8]
ADD RCX,0x1
CMP RAX,RCX
JZ 0x00138742
MOV RSI,qword ptr [RBP + -0xb8]
LEA RDI,[RBP + -0xa8]
LEA RDX,[RBP + -0x78]
CALL 0x0013ccd0
JMP 0x001386f0
LAB_001386f0:
LEA RDI,[RBP + -0x78]
LEA RSI,[RBP + -0xa8]
CALL 0x0010aa30
LEA RDI,[RBP + -0xa8]
CALL 0x0010b128
JMP 0x00138742
LAB_00138742:
MOV RDI,qword ptr [RBP + -0xc0]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x78]
CALL 0x00138800
MOV byte ptr [RBP + -0xf9],AL
JMP 0x00138762
LAB_00138762:
MOV AL,byte ptr [RBP + -0xf9]
TEST AL,0x1
JNZ 0x0013876e
JMP 0x001387aa
LAB_0013876e:
MOV RDI,qword ptr [RBP + -0xc0]
MOV RDX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x78]
CALL 0x00138d80
MOV byte ptr [RBP + -0xfa],AL
JMP 0x0013878a
LAB_0013878a:
MOV AL,byte ptr [RBP + -0xfa]
TEST AL,0x1
JNZ 0x00138796
JMP 0x001387aa
LAB_00138796:
MOV RDI,qword ptr [RBP + -0xd0]
LEA RSI,[RBP + -0x78]
CALL 0x0012c620
JMP 0x001387a8
LAB_001387a8:
JMP 0x001387aa
LAB_001387aa:
LEA RDI,[RBP + -0x78]
CALL 0x0010b128
JMP 0x001385a3
LAB_001387b8:
MOV RDI,qword ptr [RBP + -0x40]
LAB_001387bc:
CALL 0x0010ae30
LAB_001387c1:
JMP 0x001387c3
LAB_001387c3:
JMP 0x001387c5
LAB_001387c5:
MOV byte ptr [RBP + -0x31],0x1
TEST byte ptr [RBP + -0x31],0x1
JNZ 0x001387db
MOV RDI,qword ptr [RBP + -0xd0]
CALL 0x001231f0
LAB_001387db:
MOV RAX,qword ptr [RBP + -0xc8]
ADD RSP,0x100
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001387cf) */
/* nglog::(anonymous namespace)::LogCleaner::GetOverdueLogNames(std::__cxx11::string,
std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long,
std::ratio<1l, 1000000000l> > > const&, std::__cxx11::string const&, std::__cxx11::string const&)
const */
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *
nglog::(anonymous_namespace)::LogCleaner::GetOverdueLogNames
(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1,
LogCleaner *param_2,string *param_3,time_point *param_4,string *param_5,string *param_6)
{
byte bVar1;
int iVar2;
char *pcVar3;
ulong uVar4;
string local_b0 [32];
char *local_90;
allocator local_81;
string local_80 [48];
dirent *local_50;
DIR *local_48;
int1 local_39;
string *local_38;
string *local_30;
time_point *local_28;
string *local_20;
LogCleaner *local_18;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_10;
local_39 = 0;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(param_1);
pcVar3 = (char *)std::__cxx11::string::c_str();
/* try { // try from 0013857e to 001385ab has its CatchHandler @ 001385fe */
local_48 = opendir(pcVar3);
if (local_48 != (DIR *)0x0) {
while (local_50 = readdir(local_48), local_50 != (dirent *)0x0) {
iVar2 = strcmp(local_50->d_name,".");
if ((iVar2 != 0) && (iVar2 = strcmp(local_50->d_name,".."), iVar2 != 0)) {
pcVar3 = local_50->d_name;
std::allocator<char>::allocator();
/* try { // try from 0013863c to 00138644 has its CatchHandler @ 0013870e */
std::__cxx11::string::string<std::allocator<char>>(local_80,pcVar3,&local_81);
std::allocator<char>::~allocator((allocator<char> *)&local_81);
local_90 = "N5nglog4base6LoggerE";
uVar4 = std::__cxx11::string::empty();
if ((uVar4 & 1) == 0) {
std::__cxx11::string::size();
/* try { // try from 0013868f to 001387a5 has its CatchHandler @ 00138728 */
pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)param_3);
pcVar3 = std::find<char_const*,char>
("/N5nglog4base6LoggerE","N5nglog4base6LoggerE",pcVar3);
if (pcVar3 != "N5nglog4base6LoggerE") {
std::operator+(local_b0,param_3);
std::__cxx11::string::operator=(local_80,local_b0);
std::__cxx11::string::~string(local_b0);
}
}
bVar1 = IsLogFromCurrentProject(param_2,local_80,local_30,local_38);
if (((bVar1 & 1) != 0) &&
(bVar1 = IsLogLastModifiedOver(param_2,local_80,local_28), (bVar1 & 1) != 0)) {
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back
(param_1,local_80);
}
std::__cxx11::string::~string(local_80);
}
}
/* try { // try from 001387bc to 001387c0 has its CatchHandler @ 001385fe */
closedir(local_48);
}
return param_1;
}
|
|
12,454
|
mariadb_convert_string
|
eloqsql/libmariadb/libmariadb/ma_charset.c
|
size_t STDCALL mariadb_convert_string(const char *from __attribute__((unused)),
size_t *from_len __attribute__((unused)),
MARIADB_CHARSET_INFO *from_cs __attribute__((unused)),
char *to __attribute__((unused)),
size_t *to_len __attribute__((unused)),
MARIADB_CHARSET_INFO *to_cs __attribute__((unused)), int *errorcode)
{
#ifndef HAVE_ICONV
*errorcode= ENOTSUP;
return -1;
#else
iconv_t conv= 0;
size_t rc= -1;
size_t save_len= *to_len;
char to_encoding[128], from_encoding[128];
*errorcode= 0;
/* check if conversion is supported */
if (!from_cs || !from_cs->encoding || !from_cs->encoding[0] ||
!to_cs || !to_cs->encoding || !to_cs->encoding[0])
{
*errorcode= EINVAL;
return rc;
}
map_charset_name(to_cs->encoding, 1, to_encoding, sizeof(to_encoding));
map_charset_name(from_cs->encoding, 0, from_encoding, sizeof(from_encoding));
if ((conv= iconv_open(to_encoding, from_encoding)) == (iconv_t)-1)
{
*errorcode= errno;
goto error;
}
if ((rc= iconv(conv, IF_WIN(,IF_SOLARIS(,(char **)))&from, from_len, &to, to_len)) == (size_t)-1)
{
*errorcode= errno;
goto error;
}
rc= save_len - *to_len;
error:
if (conv != (iconv_t)-1)
iconv_close(conv);
return rc;
#endif
}
|
O0
|
c
|
mariadb_convert_string:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq 0x10(%rbp), %rax
movl $0x5f, (%rax)
movq $-0x1, %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mariadb_convert_string:
push rbp
mov rbp, rsp
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+arg_0]
mov dword ptr [rax], 5Fh ; '_'
mov rax, 0FFFFFFFFFFFFFFFFh
pop rbp
retn
|
long long mariadb_convert_string(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
_DWORD *a7)
{
*a7 = 95;
return -1LL;
}
|
mariadb_convert_string:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RAX],0x5f
MOV RAX,-0x1
POP RBP
RET
|
int8 mariadb_convert_string(void)
{
int4 *in_stack_00000008;
*in_stack_00000008 = 0x5f;
return 0xffffffffffffffff;
}
|
|
12,455
|
CLI::BadNameString::BadLongName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
|
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/Error.hpp
|
static BadNameString BadLongName(std::string name) { return BadNameString("Bad long name: " + name); }
|
O3
|
cpp
|
CLI::BadNameString::BadLongName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x1b148(%rip), %rsi # 0x376aa
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x11e48
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1c872
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c595
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1c5be
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rdi
callq 0x7780
|
_ZN3CLI13BadNameString11BadLongNameENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14; __int64
push rbx; int
sub rsp, 28h
mov rdx, rsi
mov rbx, rdi
lea rsi, aBadLongName; "Bad long name: "
lea r14, [rsp+38h+var_30]
mov rdi, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rdi, rbx; int
mov rsi, r14
call _ZN3CLI13BadNameStringC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::BadNameString::BadNameString(std::string)
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1C595
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1C595:
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1C5BE
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1C5BE:
mov rdi, rbx
call __Unwind_Resume
|
long long CLI::BadNameString::BadLongName(long long a1, _QWORD *a2)
{
void *v3; // [rsp+0h] [rbp-38h]
void *v4[2]; // [rsp+8h] [rbp-30h] BYREF
_QWORD v5[2]; // [rsp+18h] [rbp-20h] BYREF
int v6; // [rsp+28h] [rbp-10h]
long long v7; // [rsp+30h] [rbp-8h]
std::operator+<char>((long long)v4, (long long)"Bad long name: ", a2);
CLI::BadNameString::BadNameString(a1, v3, (int)v4[0], (long long)v4[1], v5[0], (void *)v5[1], v6, v7);
if ( v4[0] != v5 )
operator delete(v4[0], v5[0] + 1LL);
return a1;
}
|
BadLongName:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RDX,RSI
MOV RBX,RDI
LEA RSI,[0x1376aa]
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00111e48
LAB_0011c56f:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011c872
LAB_0011c57a:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011c595
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00107430
LAB_0011c595:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* CLI::BadNameString::BadLongName(std::__cxx11::string) */
BadNameString * CLI::BadNameString::BadLongName(BadNameString *param_1)
{
long *local_30 [2];
long local_20 [2];
std::operator+((char *)local_30,(string *)"Bad long name: ");
/* try { // try from 0011c56f to 0011c579 has its CatchHandler @ 0011c5a0 */
BadNameString(param_1,local_30);
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
return param_1;
}
|
|
12,456
|
my_coll_lexem_print_error
|
eloqsql/strings/ctype-uca.c
|
static void my_coll_lexem_print_error(MY_COLL_LEXEM *lexem,
char *errstr, size_t errsize,
const char *txt)
{
char tail[30];
size_t len= lexem->end - lexem->prev;
strmake (tail, lexem->prev, (size_t) MY_MIN(len, sizeof(tail)-1));
errstr[errsize-1]= '\0';
my_snprintf(errstr, errsize - 1,
"%s at '%s'", txt[0] ? txt : "Syntax error", tail);
}
|
O0
|
c
|
my_coll_lexem_print_error:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdx, -0x48(%rbp)
movq %rcx, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x58(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
cmpq $0x1d, -0x58(%rbp)
jae 0x9e4f4
movq -0x58(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x9e4ff
movl $0x1d, %eax
movq %rax, -0x70(%rbp)
jmp 0x9e4ff
movq -0x60(%rbp), %rsi
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rdx
callq 0xc6de0
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movq -0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x48(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x78(%rbp)
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x9e54d
movq -0x50(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x9e55d
leaq 0x30b62(%rip), %rax # 0xcf0b6
movq %rax, -0x88(%rbp)
jmp 0x9e55d
movq -0x78(%rbp), %rsi
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rcx
leaq 0x30b38(%rip), %rdx # 0xcf0ab
xorl %eax, %eax
leaq -0x30(%rbp), %r8
callq 0xc6250
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x9e599
addq $0x90, %rsp
popq %rbp
retq
callq 0x362a0
nop
|
my_coll_lexem_print_error:
push rbp
mov rbp, rsp
sub rsp, 90h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_48], rdx
mov [rbp+var_50], rcx
mov rax, [rbp+var_38]
mov rax, [rax+10h]
mov rcx, [rbp+var_38]
mov rcx, [rcx+18h]
sub rax, rcx
mov [rbp+var_58], rax
lea rax, [rbp+var_30]
mov [rbp+var_68], rax
mov rax, [rbp+var_38]
mov rax, [rax+18h]
mov [rbp+var_60], rax
cmp [rbp+var_58], 1Dh
jnb short loc_9E4F4
mov rax, [rbp+var_58]
mov [rbp+var_70], rax
jmp short loc_9E4FF
loc_9E4F4:
mov eax, 1Dh
mov [rbp+var_70], rax
jmp short $+2
loc_9E4FF:
mov rsi, [rbp+var_60]
mov rdi, [rbp+var_68]
mov rdx, [rbp+var_70]
call strmake
mov rax, [rbp+var_40]
mov rcx, [rbp+var_48]
sub rcx, 1
mov byte ptr [rax+rcx], 0
mov rax, [rbp+var_40]
mov [rbp+var_80], rax
mov rax, [rbp+var_48]
sub rax, 1
mov [rbp+var_78], rax
mov rax, [rbp+var_50]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_9E54D
mov rax, [rbp+var_50]
mov [rbp+var_88], rax
jmp short loc_9E55D
loc_9E54D:
lea rax, aSyntaxError; "Syntax error"
mov [rbp+var_88], rax
jmp short $+2
loc_9E55D:
mov rsi, [rbp+var_78]
mov rdi, [rbp+var_80]
mov rcx, [rbp+var_88]
lea rdx, aSAtS; "%s at '%s'"
xor eax, eax
lea r8, [rbp+var_30]
call my_snprintf
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_9E599
add rsp, 90h
pop rbp
retn
loc_9E599:
call ___stack_chk_fail
|
unsigned long long my_coll_lexem_print_error(long long a1, long long a2, long long a3, _BYTE *a4)
{
int v4; // r9d
int v6; // [rsp+18h] [rbp-78h]
long long v7; // [rsp+30h] [rbp-60h]
unsigned long long v8; // [rsp+38h] [rbp-58h]
_BYTE v11[40]; // [rsp+60h] [rbp-30h] BYREF
unsigned long long v12; // [rsp+88h] [rbp-8h]
v12 = __readfsqword(0x28u);
v8 = *(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 24);
v7 = *(_QWORD *)(a1 + 24);
if ( v8 >= 0x1D )
strmake(v11, v7, 29LL);
else
strmake(v11, v7, v8);
*(_BYTE *)(a2 + a3 - 1) = 0;
v6 = a3 - 1;
if ( *a4 )
my_snprintf(a2, v6, (unsigned int)"%s at '%s'", (_DWORD)a4, (unsigned int)v11, v4);
else
my_snprintf(a2, v6, (unsigned int)"%s at '%s'", (unsigned int)"Syntax error", (unsigned int)v11, v4);
return __readfsqword(0x28u);
}
|
my_coll_lexem_print_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV qword ptr [RBP + -0x48],RDX
MOV qword ptr [RBP + -0x50],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX + 0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x60],RAX
CMP qword ptr [RBP + -0x58],0x1d
JNC 0x0019e4f4
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x70],RAX
JMP 0x0019e4ff
LAB_0019e4f4:
MOV EAX,0x1d
MOV qword ptr [RBP + -0x70],RAX
JMP 0x0019e4ff
LAB_0019e4ff:
MOV RSI,qword ptr [RBP + -0x60]
MOV RDI,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x70]
CALL 0x001c6de0
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x48]
SUB RCX,0x1
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x48]
SUB RAX,0x1
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0019e54d
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x88],RAX
JMP 0x0019e55d
LAB_0019e54d:
LEA RAX,[0x1cf0b6]
MOV qword ptr [RBP + -0x88],RAX
JMP 0x0019e55d
LAB_0019e55d:
MOV RSI,qword ptr [RBP + -0x78]
MOV RDI,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0x88]
LEA RDX,[0x1cf0ab]
XOR EAX,EAX
LEA R8,[RBP + -0x30]
CALL 0x001c6250
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0019e599
ADD RSP,0x90
POP RBP
RET
LAB_0019e599:
CALL 0x001362a0
|
void my_coll_lexem_print_error(long param_1,long param_2,long param_3,char *param_4)
{
long in_FS_OFFSET;
char *local_90;
ulong local_78;
int1 local_38 [40];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_78 = *(long *)(param_1 + 0x10) - *(long *)(param_1 + 0x18);
if (0x1c < local_78) {
local_78 = 0x1d;
}
strmake(local_38,*(int8 *)(param_1 + 0x18),local_78);
*(int1 *)(param_2 + param_3 + -1) = 0;
local_90 = param_4;
if (*param_4 == '\0') {
local_90 = "Syntax error";
}
my_snprintf(param_2,param_3 + -1,"%s at \'%s\'",local_90,local_38);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
|
|
12,457
|
rw_pr_rdlock
|
eloqsql/mysys/thr_rwlock.c
|
int rw_pr_rdlock(rw_pr_lock_t *rwlock)
{
pthread_mutex_lock(&rwlock->lock);
/*
The fact that we were able to acquire 'lock' mutex means
that there are no active writers and we can acquire rd-lock.
Increment active readers counter to prevent requests for
wr-lock from succeeding and unlock mutex.
*/
rwlock->active_readers++;
pthread_mutex_unlock(&rwlock->lock);
return 0;
}
|
O3
|
c
|
rw_pr_rdlock:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2b230
incl 0x58(%rbx)
movq %rbx, %rdi
callq 0x2b1f0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
rw_pr_rdlock:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
call _pthread_mutex_lock
inc dword ptr [rbx+58h]
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
|
long long rw_pr_rdlock(long long a1)
{
pthread_mutex_lock(a1);
++*(_DWORD *)(a1 + 88);
pthread_mutex_unlock(a1);
return 0LL;
}
|
rw_pr_rdlock:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x0012b230
INC dword ptr [RBX + 0x58]
MOV RDI,RBX
CALL 0x0012b1f0
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 rw_pr_rdlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
*(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + 1;
pthread_mutex_unlock(param_1);
return 0;
}
|
|
12,458
|
JS_AddRuntimeFinalizer
|
bluesky950520[P]quickjs/quickjs.c
|
int JS_AddRuntimeFinalizer(JSRuntime *rt, JSRuntimeFinalizer *finalizer,
void *arg)
{
JSRuntimeFinalizerState *fs = js_malloc_rt(rt, sizeof(*fs));
if (!fs)
return -1;
fs->next = rt->finalizers;
fs->finalizer = finalizer;
fs->arg = arg;
rt->finalizers = fs;
return 0;
}
|
O0
|
c
|
JS_AddRuntimeFinalizer:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movl $0x18, %esi
callq 0x21890
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x23767
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x237ac
movq 0x18(%rsp), %rax
movq 0x220(%rax), %rcx
movq (%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movq (%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x220(%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_AddRuntimeFinalizer:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov [rsp+28h+var_20], rdx
mov rdi, [rsp+28h+var_10]
mov esi, 18h
call js_malloc_rt
mov [rsp+28h+var_28], rax
cmp [rsp+28h+var_28], 0
jnz short loc_23767
mov [rsp+28h+var_4], 0FFFFFFFFh
jmp short loc_237AC
loc_23767:
mov rax, [rsp+28h+var_10]
mov rcx, [rax+220h]
mov rax, [rsp+28h+var_28]
mov [rax], rcx
mov rcx, [rsp+28h+var_18]
mov rax, [rsp+28h+var_28]
mov [rax+8], rcx
mov rcx, [rsp+28h+var_20]
mov rax, [rsp+28h+var_28]
mov [rax+10h], rcx
mov rcx, [rsp+28h+var_28]
mov rax, [rsp+28h+var_10]
mov [rax+220h], rcx
mov [rsp+28h+var_4], 0
loc_237AC:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
|
long long JS_AddRuntimeFinalizer(long long a1, long long a2, long long a3)
{
_QWORD *v4; // [rsp+0h] [rbp-28h]
v4 = (_QWORD *)js_malloc_rt(a1, 24LL);
if ( v4 )
{
*v4 = *(_QWORD *)(a1 + 544);
v4[1] = a2;
v4[2] = a3;
*(_QWORD *)(a1 + 544) = v4;
return 0;
}
else
{
return (unsigned int)-1;
}
}
|
JS_AddRuntimeFinalizer:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDX
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x18
CALL 0x00121890
MOV qword ptr [RSP],RAX
CMP qword ptr [RSP],0x0
JNZ 0x00123767
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x001237ac
LAB_00123767:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RAX + 0x220]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x220],RCX
MOV dword ptr [RSP + 0x24],0x0
LAB_001237ac:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 JS_AddRuntimeFinalizer(long param_1,int8 param_2,int8 param_3)
{
int8 *puVar1;
int4 local_4;
puVar1 = (int8 *)js_malloc_rt(param_1,0x18);
if (puVar1 == (int8 *)0x0) {
local_4 = 0xffffffff;
}
else {
*puVar1 = *(int8 *)(param_1 + 0x220);
puVar1[1] = param_2;
puVar1[2] = param_3;
*(int8 **)(param_1 + 0x220) = puVar1;
local_4 = 0;
}
return local_4;
}
|
|
12,459
|
JS_AddRuntimeFinalizer
|
bluesky950520[P]quickjs/quickjs.c
|
int JS_AddRuntimeFinalizer(JSRuntime *rt, JSRuntimeFinalizer *finalizer,
void *arg)
{
JSRuntimeFinalizerState *fs = js_malloc_rt(rt, sizeof(*fs));
if (!fs)
return -1;
fs->next = rt->finalizers;
fs->finalizer = finalizer;
fs->arg = arg;
rt->finalizers = fs;
return 0;
}
|
O2
|
c
|
JS_AddRuntimeFinalizer:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
pushq $0x18
popq %rsi
callq 0x17079
testq %rax, %rax
je 0x17e3d
movq 0x220(%r14), %rcx
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq %rax, 0x220(%r14)
xorl %eax, %eax
jmp 0x17e40
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
|
JS_AddRuntimeFinalizer:
push r15
push r14
push rbx
mov rbx, rdx
mov r15, rsi
mov r14, rdi
push 18h
pop rsi
call js_malloc_rt
test rax, rax
jz short loc_17E3D
mov rcx, [r14+220h]
mov [rax], rcx
mov [rax+8], r15
mov [rax+10h], rbx
mov [r14+220h], rax
xor eax, eax
jmp short loc_17E40
loc_17E3D:
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_17E40:
pop rbx
pop r14
pop r15
retn
|
long long JS_AddRuntimeFinalizer(long long a1, long long a2, long long a3)
{
_QWORD *v4; // rax
v4 = (_QWORD *)js_malloc_rt(a1, 24LL);
if ( !v4 )
return -1LL;
*v4 = *(_QWORD *)(a1 + 544);
v4[1] = a2;
v4[2] = a3;
*(_QWORD *)(a1 + 544) = v4;
return 0LL;
}
|
JS_AddRuntimeFinalizer:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
PUSH 0x18
POP RSI
CALL 0x00117079
TEST RAX,RAX
JZ 0x00117e3d
MOV RCX,qword ptr [R14 + 0x220]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],R15
MOV qword ptr [RAX + 0x10],RBX
MOV qword ptr [R14 + 0x220],RAX
XOR EAX,EAX
JMP 0x00117e40
LAB_00117e3d:
PUSH -0x1
POP RAX
LAB_00117e40:
POP RBX
POP R14
POP R15
RET
|
int8 JS_AddRuntimeFinalizer(long param_1,int8 param_2,int8 param_3)
{
int8 *puVar1;
int8 uVar2;
puVar1 = (int8 *)js_malloc_rt(param_1,0x18);
if (puVar1 == (int8 *)0x0) {
uVar2 = 0xffffffffffffffff;
}
else {
*puVar1 = *(int8 *)(param_1 + 0x220);
puVar1[1] = param_2;
puVar1[2] = param_3;
*(int8 **)(param_1 + 0x220) = puVar1;
uVar2 = 0;
}
return uVar2;
}
|
|
12,460
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
|
monkey531[P]llama/common/json.hpp
|
const_reference operator[](const typename object_t::key_type& key) const
{
// const operator[] only works for objects
if (JSON_HEDLEY_LIKELY(is_object()))
{
auto it = m_data.m_value.object->find(key);
JSON_ASSERT(it != m_data.m_value.object->end());
return it->second;
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
}
|
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>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xabf66
movq 0x8(%r14), %rdi
callq 0xac01e
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0xabfc4
addq $0x20, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1a450
movq %rax, %rbx
movq %r14, %rdi
callq 0x5f468
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x45165(%rip), %rsi # 0xf10ef
leaq 0x10(%rsp), %rdi
callq 0xabcad
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x86d76
xorl %ebp, %ebp
leaq 0x7dfa3(%rip), %rsi # 0x129f58
leaq -0x5091e(%rip), %rdx # 0x5b69e
movq %rbx, %rdi
callq 0x1af10
leaq 0x3ffbe(%rip), %rdi # 0xebf89
leaq 0x3a24a(%rip), %rdx # 0xe621c
leaq 0x45149(%rip), %rcx # 0xf1122
movl $0x53ca, %esi # imm = 0x53CA
xorl %eax, %eax
callq 0x1aea0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xac003
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0xac00d
jmp 0xac015
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1af90
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_ABF66
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::find(std::string const&)
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_ABFC4
add rax, 20h ; ' '
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_ABF66:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_ABFC4:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aItMDataMValueO; "it != m_data.m_value.object->end()"
mov esi, 53CAh
xor eax, eax
call _ggml_abort
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AC003
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AC003:
test bpl, bpl
jnz short loc_AC00D
jmp short loc_AC015
mov r14, rax
loc_AC00D:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_AC015:
mov rdi, r14
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1)
{
void *v1; // rbx
char v2; // bp
long long v3; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
long long v6; // r14
const char *v7; // [rsp+8h] [rbp-40h] BYREF
void *v8[2]; // [rsp+10h] [rbp-38h] BYREF
long long v9; // [rsp+20h] [rbp-28h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(
(long long)v8,
(long long)"cannot use operator[] with a string argument with ",
&v7);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
305,
v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v3 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::find(*(_QWORD *)(a1 + 8));
if ( v3 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v6 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
21450LL,
"GGML_ASSERT(%s) failed",
"it != m_data.m_value.object->end()");
if ( v8[0] != &v9 )
operator delete(v8[0], v9 + 1);
if ( v2 )
__cxa_free_exception(v1);
_Unwind_Resume(v6);
}
return v3 + 32;
}
|
operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001abf66
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x001ac01e
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001abfc4
ADD RAX,0x20
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001abf66:
MOV EDI,0x20
CALL 0x0011a450
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015f468
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001abf83:
LEA RSI,[0x1f10ef]
LEA RDI,[RSP + 0x10]
CALL 0x001abcad
MOV BPL,0x1
LAB_001abf97:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x00186d76
XOR EBP,EBP
LEA RSI,[0x229f58]
LEA RDX,[0x15b69e]
MOV RDI,RBX
CALL 0x0011af10
LAB_001abfc4:
LEA RDI,[0x1ebf89]
LEA RDX,[0x1e621c]
LEA RCX,[0x1f1122]
MOV ESI,0x53ca
XOR EAX,EAX
CALL 0x0011aea0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::operator[](std::__cxx11::string const&) const */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,string *param_1)
{
long lVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001abf83 to 001abf93 has its CatchHandler @ 001ac00a */
detail::concat<std::__cxx11::string,char_const(&)[51],char_const*>
(local_38,"cannot use operator[] with a string argument with ",&local_40);
/* try { // try from 001abf97 to 001abfc3 has its CatchHandler @ 001abfe5 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x131,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
lVar1 = ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::find(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8),param_1);
if (lVar1 != *(long *)(*(long *)(this + 8) + 8)) {
return lVar1 + 0x20;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x53ca,
"GGML_ASSERT(%s) failed","it != m_data.m_value.object->end()");
}
|
|
12,461
|
query_event_uncompress(Format_description_log_event const*, bool, unsigned char const*, unsigned long, unsigned char*, unsigned long, bool*, unsigned char**, unsigned long*)
|
eloqsql/sql/log_event.cc
|
int
query_event_uncompress(const Format_description_log_event *description_event,
bool contain_checksum, const uchar *src, ulong src_len,
uchar* buf, ulong buf_size, bool* is_malloc, uchar **dst,
ulong *newlen)
{
ulong len= uint4korr(src + EVENT_LEN_OFFSET);
const uchar *tmp= src;
const uchar *end= src + len;
uchar *new_dst;
// bad event
if (src_len < len)
return 1;
DBUG_ASSERT((uchar)src[EVENT_TYPE_OFFSET] == QUERY_COMPRESSED_EVENT);
uint8 common_header_len= description_event->common_header_len;
uint8 post_header_len=
description_event->post_header_len[QUERY_COMPRESSED_EVENT-1];
*is_malloc= false;
tmp+= common_header_len;
// bad event
if (end <= tmp)
return 1;
uint db_len= (uint)tmp[Q_DB_LEN_OFFSET];
uint16 status_vars_len= uint2korr(tmp + Q_STATUS_VARS_LEN_OFFSET);
tmp+= post_header_len + status_vars_len + db_len + 1;
// bad event
if (end <= tmp)
return 1;
int32 comp_len= (int32)(len - (tmp - src) -
(contain_checksum ? BINLOG_CHECKSUM_LEN : 0));
uint32 un_len= binlog_get_uncompress_len(tmp);
// bad event
if (comp_len < 0 || un_len == 0)
return 1;
*newlen= (ulong)(tmp - src) + un_len;
if (contain_checksum)
*newlen+= BINLOG_CHECKSUM_LEN;
uint32 alloc_size= (uint32)ALIGN_SIZE(*newlen);
if (alloc_size <= buf_size)
new_dst= buf;
else
{
new_dst= (uchar *) my_malloc(PSI_INSTRUMENT_ME, alloc_size, MYF(MY_WME));
if (!new_dst)
return 1;
*is_malloc= true;
}
/* copy the head*/
memcpy(new_dst, src , tmp - src);
if (binlog_buf_uncompress(tmp, new_dst + (tmp - src), comp_len, &un_len))
{
if (*is_malloc)
{
*is_malloc= false;
my_free(new_dst);
}
return 1;
}
new_dst[EVENT_TYPE_OFFSET]= QUERY_EVENT;
int4store(new_dst + EVENT_LEN_OFFSET, *newlen);
if (contain_checksum)
{
ulong clear_len= *newlen - BINLOG_CHECKSUM_LEN;
int4store(new_dst + clear_len,
my_checksum(0L, (uchar *)new_dst, clear_len));
}
*dst= new_dst;
return 0;
}
|
O3
|
cpp
|
query_event_uncompress(Format_description_log_event const*, bool, unsigned char const*, unsigned long, unsigned char*, unsigned long, bool*, unsigned char**, unsigned long*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x9(%rdx), %eax
movl $0x1, %r14d
cmpq %rcx, %rax
ja 0x476c7
movq %rdx, %r12
movl %esi, %r15d
movq 0x10(%rbp), %rsi
movzbl 0xcd(%rdi), %ecx
movq 0xd0(%rdi), %rdx
movzbl 0xa4(%rdx), %edx
movb $0x0, (%rsi)
cmpl %ecx, %eax
jbe 0x476c7
leaq (%r12,%rax), %rsi
leaq (%r12,%rcx), %rdi
addq %rdi, %rdx
movzbl 0x8(%r12,%rcx), %edi
movzwl 0xb(%r12,%rcx), %ecx
addq %rdx, %rcx
leaq (%rdi,%rcx), %rdx
incq %rdx
cmpq %rdx, %rsi
jbe 0x476c7
movq %r9, %r13
movq %r8, -0x40(%rbp)
movq %rdx, %rbx
subq %r12, %rbx
movl %r15d, %ecx
xorb $0x1, %cl
movzbl %cl, %ecx
leal (%rax,%rcx,4), %r14d
subl %ebx, %r14d
movq %rdx, -0x38(%rbp)
movq %rdx, %rdi
callq 0x476d9
addl $-0x4, %r14d
movl %r14d, -0x2c(%rbp)
movl %eax, -0x30(%rbp)
movl $0x1, %r14d
js 0x476c7
testl %eax, %eax
je 0x476c7
movq 0x20(%rbp), %rdx
movl %eax, %eax
leaq (%rbx,%rax), %rcx
leaq (%rbx,%rax), %rsi
addq $0x4, %rsi
testb %r15b, %r15b
cmoveq %rcx, %rsi
movq %rsi, (%rdx)
addl $0x7, %esi
andl $-0x8, %esi
cmpq %r13, %rsi
movq -0x40(%rbp), %rdi
jbe 0x4764d
movl $0x10, %edx
xorl %edi, %edi
callq 0x84505
testq %rax, %rax
je 0x476c7
movq %rax, %rdi
movq 0x10(%rbp), %rax
movb $0x1, (%rax)
movq %r12, %rsi
movq %rbx, %rdx
movq %rdi, %r12
callq 0x3a0c0
addq %r12, %rbx
leaq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movl -0x2c(%rbp), %edx
callq 0x4773e
testl %eax, %eax
je 0x4768b
movq 0x10(%rbp), %rax
cmpb $0x1, (%rax)
jne 0x476c7
movq %r12, %rdi
movb $0x0, (%rax)
callq 0x84732
jmp 0x476c7
movq 0x18(%rbp), %rbx
movb $0x2, 0x4(%r12)
movq 0x20(%rbp), %rcx
movl (%rcx), %eax
movl %eax, 0x9(%r12)
testb %r15b, %r15b
movq %r12, %rsi
je 0x476c1
movq (%rcx), %r14
leaq -0x4(%r14), %rdx
xorl %edi, %edi
movq %rsi, %r15
callq 0x87438
movq %r15, %rsi
movl %eax, -0x4(%r15,%r14)
movq %rsi, (%rbx)
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_Z22query_event_uncompressPK28Format_description_log_eventbPKhmPhmPbPS4_Pm:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov eax, [rdx+9]
mov r14d, 1
cmp rax, rcx
ja loc_476C7
mov r12, rdx
mov r15d, esi
mov rsi, [rbp+arg_0]
movzx ecx, byte ptr [rdi+0CDh]
mov rdx, [rdi+0D0h]
movzx edx, byte ptr [rdx+0A4h]
mov byte ptr [rsi], 0
cmp eax, ecx
jbe loc_476C7
lea rsi, [r12+rax]
lea rdi, [r12+rcx]
add rdx, rdi
movzx edi, byte ptr [r12+rcx+8]
movzx ecx, word ptr [r12+rcx+0Bh]
add rcx, rdx
lea rdx, [rdi+rcx]
inc rdx
cmp rsi, rdx
jbe loc_476C7
mov r13, r9
mov [rbp+var_40], r8
mov rbx, rdx
sub rbx, r12
mov ecx, r15d
xor cl, 1
movzx ecx, cl
lea r14d, [rax+rcx*4]
sub r14d, ebx
mov [rbp+var_38], rdx
mov rdi, rdx; unsigned __int8 *
call _Z25binlog_get_uncompress_lenPKh; binlog_get_uncompress_len(uchar const*)
add r14d, 0FFFFFFFCh
mov [rbp+var_2C], r14d
mov [rbp+var_30], eax
mov r14d, 1
js loc_476C7
test eax, eax
jz loc_476C7
mov rdx, [rbp+arg_10]
mov eax, eax
lea rcx, [rbx+rax]
lea rsi, [rbx+rax]
add rsi, 4
test r15b, r15b
cmovz rsi, rcx
mov [rdx], rsi
add esi, 7
and esi, 0FFFFFFF8h
cmp rsi, r13
mov rdi, [rbp+var_40]
jbe short loc_4764D
mov edx, 10h
xor edi, edi
call my_malloc
test rax, rax
jz loc_476C7
mov rdi, rax
mov rax, [rbp+arg_0]
mov byte ptr [rax], 1
loc_4764D:
mov rsi, r12
mov rdx, rbx
mov r12, rdi
call _memcpy
add rbx, r12
lea rcx, [rbp+var_30]; unsigned int *
mov rdi, [rbp+var_38]; unsigned __int8 *
mov rsi, rbx; unsigned __int8 *
mov edx, [rbp+var_2C]; unsigned int
call _Z21binlog_buf_uncompressPKhPhjPj; binlog_buf_uncompress(uchar const*,uchar *,uint,uint *)
test eax, eax
jz short loc_4768B
mov rax, [rbp+arg_0]
cmp byte ptr [rax], 1
jnz short loc_476C7
mov rdi, r12
mov byte ptr [rax], 0
call my_free
jmp short loc_476C7
loc_4768B:
mov rbx, [rbp+arg_8]
mov byte ptr [r12+4], 2
mov rcx, [rbp+arg_10]
mov eax, [rcx]
mov [r12+9], eax
test r15b, r15b
mov rsi, r12
jz short loc_476C1
mov r14, [rcx]
lea rdx, [r14-4]
xor edi, edi
mov r15, rsi
call my_checksum
mov rsi, r15
mov [r15+r14-4], eax
loc_476C1:
mov [rbx], rsi
xor r14d, r14d
loc_476C7:
mov eax, r14d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long query_event_uncompress(
const Format_description_log_event *a1,
unsigned __int8 a2,
const unsigned __int8 *a3,
unsigned long long a4,
unsigned __int8 *a5,
unsigned long long a6,
bool *a7,
unsigned __int8 **a8,
unsigned long long *a9)
{
unsigned long long v9; // rax
unsigned int v10; // r14d
long long v13; // rcx
long long v14; // rdx
const unsigned __int8 *v15; // rdx
long long v17; // rbx
int v18; // r14d
unsigned int uncompress_len; // eax
long long v20; // r8
long long v21; // r9
bool v22; // sf
long long v23; // rcx
unsigned long long v24; // rsi
unsigned long long v25; // rsi
unsigned __int8 *v26; // rdi
long long v27; // rax
long long v28; // r14
unsigned __int8 *v31; // [rsp+8h] [rbp-38h]
unsigned int v32; // [rsp+10h] [rbp-30h] BYREF
unsigned int v33; // [rsp+14h] [rbp-2Ch]
v9 = *(unsigned int *)(a3 + 9);
v10 = 1;
if ( v9 <= a4 )
{
v13 = *((unsigned __int8 *)a1 + 205);
v14 = *(unsigned __int8 *)(*((_QWORD *)a1 + 26) + 164LL);
*a7 = 0;
if ( (unsigned int)v9 > (unsigned int)v13 )
{
v15 = &a3[v13 + 1 + v14 + *(unsigned __int16 *)&a3[v13 + 11] + a3[v13 + 8]];
if ( &a3[v9] > v15 )
{
v17 = v15 - a3;
v18 = v9 + 4 * (a2 ^ 1) - ((_DWORD)v15 - (_DWORD)a3);
v31 = (unsigned __int8 *)v15;
uncompress_len = binlog_get_uncompress_len(v15);
v22 = v18 - 4 < 0;
v33 = v18 - 4;
v32 = uncompress_len;
v10 = 1;
if ( !v22 )
{
if ( uncompress_len )
{
v23 = v17 + uncompress_len;
v24 = v23 + 4;
if ( !a2 )
v24 = v17 + uncompress_len;
*a9 = v24;
v25 = ((_DWORD)v24 + 7) & 0xFFFFFFF8;
v26 = a5;
if ( v25 > a6 )
{
v27 = my_malloc(0LL, v25);
if ( !v27 )
return v10;
v26 = (unsigned __int8 *)v27;
*a7 = 1;
}
memcpy(v26, a3, v17, v23, v20, v21);
if ( (unsigned int)binlog_buf_uncompress(v31, &v26[v17], v33, &v32) )
{
if ( *a7 )
{
*a7 = 0;
my_free(v26);
}
}
else
{
v26[4] = 2;
*(_DWORD *)(v26 + 9) = *(_DWORD *)a9;
if ( a2 )
{
v28 = *a9;
*(_DWORD *)&v26[v28 - 4] = my_checksum(0LL, v26, *a9 - 4);
}
*a8 = v26;
return 0;
}
}
}
}
}
}
return v10;
}
|
query_event_uncompress:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EAX,dword ptr [RDX + 0x9]
MOV R14D,0x1
CMP RAX,RCX
JA 0x001476c7
MOV R12,RDX
MOV R15D,ESI
MOV RSI,qword ptr [RBP + 0x10]
MOVZX ECX,byte ptr [RDI + 0xcd]
MOV RDX,qword ptr [RDI + 0xd0]
MOVZX EDX,byte ptr [RDX + 0xa4]
MOV byte ptr [RSI],0x0
CMP EAX,ECX
JBE 0x001476c7
LEA RSI,[R12 + RAX*0x1]
LEA RDI,[R12 + RCX*0x1]
ADD RDX,RDI
MOVZX EDI,byte ptr [R12 + RCX*0x1 + 0x8]
MOVZX ECX,word ptr [R12 + RCX*0x1 + 0xb]
ADD RCX,RDX
LEA RDX,[RDI + RCX*0x1]
INC RDX
CMP RSI,RDX
JBE 0x001476c7
MOV R13,R9
MOV qword ptr [RBP + -0x40],R8
MOV RBX,RDX
SUB RBX,R12
MOV ECX,R15D
XOR CL,0x1
MOVZX ECX,CL
LEA R14D,[RAX + RCX*0x4]
SUB R14D,EBX
MOV qword ptr [RBP + -0x38],RDX
MOV RDI,RDX
CALL 0x001476d9
ADD R14D,-0x4
MOV dword ptr [RBP + -0x2c],R14D
MOV dword ptr [RBP + -0x30],EAX
MOV R14D,0x1
JS 0x001476c7
TEST EAX,EAX
JZ 0x001476c7
MOV RDX,qword ptr [RBP + 0x20]
MOV EAX,EAX
LEA RCX,[RBX + RAX*0x1]
LEA RSI,[RBX + RAX*0x1]
ADD RSI,0x4
TEST R15B,R15B
CMOVZ RSI,RCX
MOV qword ptr [RDX],RSI
ADD ESI,0x7
AND ESI,0xfffffff8
CMP RSI,R13
MOV RDI,qword ptr [RBP + -0x40]
JBE 0x0014764d
MOV EDX,0x10
XOR EDI,EDI
CALL 0x00184505
TEST RAX,RAX
JZ 0x001476c7
MOV RDI,RAX
MOV RAX,qword ptr [RBP + 0x10]
MOV byte ptr [RAX],0x1
LAB_0014764d:
MOV RSI,R12
MOV RDX,RBX
MOV R12,RDI
CALL 0x0013a0c0
ADD RBX,R12
LEA RCX,[RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,RBX
MOV EDX,dword ptr [RBP + -0x2c]
CALL 0x0014773e
TEST EAX,EAX
JZ 0x0014768b
MOV RAX,qword ptr [RBP + 0x10]
CMP byte ptr [RAX],0x1
JNZ 0x001476c7
MOV RDI,R12
MOV byte ptr [RAX],0x0
CALL 0x00184732
JMP 0x001476c7
LAB_0014768b:
MOV RBX,qword ptr [RBP + 0x18]
MOV byte ptr [R12 + 0x4],0x2
MOV RCX,qword ptr [RBP + 0x20]
MOV EAX,dword ptr [RCX]
MOV dword ptr [R12 + 0x9],EAX
TEST R15B,R15B
MOV RSI,R12
JZ 0x001476c1
MOV R14,qword ptr [RCX]
LEA RDX,[R14 + -0x4]
XOR EDI,EDI
MOV R15,RSI
CALL 0x00187438
MOV RSI,R15
MOV dword ptr [R15 + R14*0x1 + -0x4],EAX
LAB_001476c1:
MOV qword ptr [RBX],RSI
XOR R14D,R14D
LAB_001476c7:
MOV EAX,R14D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* query_event_uncompress(Format_description_log_event const*, bool, unsigned char const*, unsigned
long, unsigned char*, unsigned long, bool*, unsigned char**, unsigned long*) */
int8
query_event_uncompress
(Format_description_log_event *param_1,bool param_2,uchar *param_3,ulong param_4,
uchar *param_5,ulong param_6,bool *param_7,uchar **param_8,ulong *param_9)
{
Format_description_log_event FVar1;
byte bVar2;
uint uVar3;
int iVar4;
int4 uVar5;
ulong uVar6;
uchar *puVar7;
size_t __n;
int8 uVar8;
uint local_38;
uint local_34;
uVar3 = *(uint *)(param_3 + 9);
uVar8 = 1;
if (uVar3 <= param_4) {
FVar1 = param_1[0xcd];
uVar6 = (ulong)(byte)FVar1;
bVar2 = *(byte *)(*(long *)(param_1 + 0xd0) + 0xa4);
*param_7 = false;
if (((byte)FVar1 < uVar3) &&
(puVar7 = param_3 + (ulong)param_3[uVar6 + 8] +
(ulong)*(ushort *)(param_3 + uVar6 + 0xb) + bVar2 + uVar6 + 1,
puVar7 < param_3 + uVar3)) {
__n = (long)puVar7 - (long)param_3;
local_38 = binlog_get_uncompress_len(puVar7);
local_34 = ((uVar3 + (uint)!param_2 * 4) - (int)__n) - 4;
uVar8 = 1;
if ((-1 < (int)local_34) && (local_38 != 0)) {
uVar6 = __n + local_38 + 4;
if (!param_2) {
uVar6 = __n + local_38;
}
*param_9 = uVar6;
uVar6 = (ulong)((int)uVar6 + 7U & 0xfffffff8);
if (param_6 < uVar6) {
param_5 = (uchar *)my_malloc(0,uVar6,0x10);
if (param_5 == (uchar *)0x0) {
return 1;
}
*param_7 = true;
}
memcpy(param_5,param_3,__n);
iVar4 = binlog_buf_uncompress(puVar7,param_5 + __n,local_34,&local_38);
if (iVar4 == 0) {
param_5[4] = '\x02';
*(int *)(param_5 + 9) = (int)*param_9;
if (param_2) {
uVar6 = *param_9;
uVar5 = my_checksum(0,param_5,uVar6 - 4);
*(int4 *)(param_5 + (uVar6 - 4)) = uVar5;
}
*param_8 = param_5;
uVar8 = 0;
}
else if (*param_7 == true) {
*param_7 = false;
my_free(param_5);
}
}
}
}
return uVar8;
}
|
|
12,462
|
psi_prlock_wrlock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD
int psi_prlock_wrlock(mysql_prlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait)
(&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line);
int result= rw_pr_wrlock(&that->m_prlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result);
return result;
}
|
O0
|
c
|
psi_prlock_wrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1a7376(%rip), %rax # 0x1ce530
movq (%rax), %rax
movq 0x1b0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x68(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x1, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x27870
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x27210
leaq 0x1a7333(%rip), %rax # 0x1ce530
movq (%rax), %rax
movq 0x1b8(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
psi_prlock_wrlock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+68h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 1
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call rw_pr_wrlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_27210
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1B8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_27210:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_prlock_wrlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[54])(
v6,
*(_QWORD *)(a1 + 104),
1LL,
a2,
a3);
v4 = rw_pr_wrlock(v9);
if ( v5 )
((void ( *)(long long, _QWORD))PSI_server[55])(v5, v4);
return v4;
}
|
psi_prlock_wrlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x2ce530]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x68]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x1
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00127870
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00127210
LEA RAX,[0x2ce530]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1b8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_00127210:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_prlock_wrlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
long local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1b0))
(local_50,*(int8 *)(param_1 + 0x68),1,param_2,param_3);
uVar1 = rw_pr_wrlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1b8))(lVar2,uVar1);
}
return uVar1;
}
|
|
12,463
|
my_casedn_ucs2
|
eloqsql/strings/ctype-ucs2.c
|
static size_t my_casedn_ucs2(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= my_ucs2_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0)
{
my_tolower_ucs2(uni_plane, &wc);
if (res != my_uni_ucs2(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
}
|
O0
|
c
|
my_casedn_ucs2:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0xaf7b2
jmp 0xaf7b4
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x51(%rbp)
jae 0xaf7e4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0xaf5e0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0xaf7ed
jmp 0xaf847
movq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xb4570
movl -0x34(%rbp), %eax
movl %eax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0xaf610
movl %eax, %ecx
movl -0x58(%rbp), %eax
cmpl %ecx, %eax
je 0xaf820
jmp 0xaf847
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x34(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0xaf7b4
movq -0x18(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_casedn_ucs2:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_50], rax
jmp short $+2
loc_AF7B2:
jmp short $+2
loc_AF7B4:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_51], al
jnb short loc_AF7E4
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_ucs2_uni
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_51], al
loc_AF7E4:
mov al, [rbp+var_51]
test al, 1
jnz short loc_AF7ED
jmp short loc_AF847
loc_AF7ED:
mov rdi, [rbp+var_50]
lea rsi, [rbp+var_30]
call my_tolower_ucs2
mov eax, [rbp+var_34]
mov [rbp+var_58], eax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_48]
call my_uni_ucs2
mov ecx, eax
mov eax, [rbp+var_58]
cmp eax, ecx
jz short loc_AF820
jmp short loc_AF847
loc_AF820:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_34]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp loc_AF7B4
loc_AF847:
mov rax, [rbp+var_18]
add rsp, 60h
pop rbp
retn
|
long long my_casedn_ucs2(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6)
{
bool v7; // [rsp+Fh] [rbp-51h]
long long v8; // [rsp+10h] [rbp-50h]
unsigned long long v9; // [rsp+18h] [rbp-48h]
unsigned long long v10; // [rsp+20h] [rbp-40h]
int v11; // [rsp+2Ch] [rbp-34h]
unsigned long long v12[2]; // [rsp+30h] [rbp-30h] BYREF
_BYTE *v13; // [rsp+40h] [rbp-20h]
long long v14; // [rsp+48h] [rbp-18h]
unsigned long long v15; // [rsp+50h] [rbp-10h]
long long v16; // [rsp+58h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v12[1] = a5;
v10 = a3 + a2;
v9 = (unsigned long long)&a4[a5];
v8 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v7 = 0;
if ( v15 < v10 )
{
v11 = my_ucs2_uni(v16, (long long)v12, v15, v10, a5, a6);
v7 = v11 > 0;
}
if ( !v7 )
break;
my_tolower_ucs2(v8, v12);
if ( v11 != (unsigned int)my_uni_ucs2(v16, v12[0], v13, v9) )
break;
v15 += v11;
v13 += v11;
}
return v14;
}
|
my_casedn_ucs2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001af7b2
LAB_001af7b2:
JMP 0x001af7b4
LAB_001af7b4:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x51],AL
JNC 0x001af7e4
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x001af5e0
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x51],AL
LAB_001af7e4:
MOV AL,byte ptr [RBP + -0x51]
TEST AL,0x1
JNZ 0x001af7ed
JMP 0x001af847
LAB_001af7ed:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x30]
CALL 0x001b4570
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x58],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x001af610
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x58]
CMP EAX,ECX
JZ 0x001af820
JMP 0x001af847
LAB_001af820:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001af7b4
LAB_001af847:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x60
POP RBP
RET
|
long my_casedn_ucs2(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
int8 uVar1;
bool bVar2;
int iVar3;
int local_3c;
int8 local_38;
long local_30;
long local_28;
long local_20;
ulong local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (local_18 < param_2 + param_3) {
local_3c = my_ucs2_uni(local_10,&local_38,local_18,param_2 + param_3);
bVar2 = 0 < local_3c;
}
if (!bVar2) break;
my_tolower_ucs2(uVar1,&local_38);
iVar3 = my_uni_ucs2(local_10,local_38,local_28,param_4 + param_5);
if (local_3c != iVar3) {
return local_20;
}
local_18 = local_18 + (long)local_3c;
local_28 = local_28 + local_3c;
}
return local_20;
}
|
|
12,464
|
minja::CommentTemplateToken::CommentTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
llama.cpp/common/minja/minja.hpp
|
CommentTemplateToken(const Location & loc, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Comment, loc, pre, post), text(t) {}
|
O3
|
cpp
|
minja::CommentTemplateToken::CommentTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x82198(%rip), %r12 # 0x161920
addq $0x10, %r12
movq %r12, (%rdi)
movl $0xc, 0x8(%rdi)
movq (%rsi), %rax
movq %rax, 0x10(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x18(%rdi)
testq %rax, %rax
je 0xdf7bf
movq 0x837e7(%rip), %rdi # 0x162f98
cmpb $0x0, (%rdi)
je 0xdf7bb
incl 0x8(%rax)
jmp 0xdf7bf
lock
incl 0x8(%rax)
leaq 0x18(%rbx), %r14
movq 0x10(%rsi), %rax
movq %rax, 0x20(%rbx)
movl %edx, 0x28(%rbx)
movl %ecx, 0x2c(%rbx)
leaq 0x82100(%rip), %rax # 0x1618d8
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x30(%rbx), %rdi
leaq 0x40(%rbx), %rax
movq %rax, 0x30(%rbx)
movq (%r8), %rsi
movq 0x8(%r8), %rdx
addq %rsi, %rdx
callq 0x28252
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
movq %r12, (%rbx)
movq %r14, %rdi
callq 0x70264
movq %r15, %rdi
callq 0x20b00
|
_ZN5minja20CommentTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
lea r12, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add r12, 10h
mov [rdi], r12
mov dword ptr [rdi+8], 0Ch
mov rax, [rsi]
mov [rdi+10h], rax
mov rax, [rsi+8]
mov [rdi+18h], rax
test rax, rax
jz short loc_DF7BF
mov rdi, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rdi], 0
jz short loc_DF7BB
inc dword ptr [rax+8]
jmp short loc_DF7BF
loc_DF7BB:
lock inc dword ptr [rax+8]
loc_DF7BF:
lea r14, [rbx+18h]
mov rax, [rsi+10h]
mov [rbx+20h], rax
mov [rbx+28h], edx
mov [rbx+2Ch], ecx
lea rax, _ZTVN5minja20CommentTemplateTokenE; `vtable for'minja::CommentTemplateToken
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+30h]
lea rax, [rbx+40h]
mov [rbx+30h], rax
mov rsi, [r8]
mov rdx, [r8+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)
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov r15, rax
mov [rbx], r12
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r15
call __Unwind_Resume
|
long long minja::CommentTemplateToken::CommentTemplateToken(
long long a1,
_QWORD *a2,
int a3,
int a4,
long long a5)
{
long long v5; // rax
*(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2;
*(_DWORD *)(a1 + 8) = 12;
*(_QWORD *)(a1 + 16) = *a2;
v5 = a2[1];
*(_QWORD *)(a1 + 24) = v5;
if ( v5 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v5 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
}
*(_QWORD *)(a1 + 32) = a2[2];
*(_DWORD *)(a1 + 40) = a3;
*(_DWORD *)(a1 + 44) = a4;
*(_QWORD *)a1 = &`vtable for'minja::CommentTemplateToken + 2;
*(_QWORD *)(a1 + 48) = a1 + 64;
return std::string::_M_construct<char *>(a1 + 48, *(_BYTE **)a5, *(_QWORD *)a5 + *(_QWORD *)(a5 + 8));
}
|
CommentTemplateToken:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R12,[0x261920]
ADD R12,0x10
MOV qword ptr [RDI],R12
MOV dword ptr [RDI + 0x8],0xc
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x10],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x18],RAX
TEST RAX,RAX
JZ 0x001df7bf
MOV RDI,qword ptr [0x00262f98]
CMP byte ptr [RDI],0x0
JZ 0x001df7bb
INC dword ptr [RAX + 0x8]
JMP 0x001df7bf
LAB_001df7bb:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001df7bf:
LEA R14,[RBX + 0x18]
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x20],RAX
MOV dword ptr [RBX + 0x28],EDX
MOV dword ptr [RBX + 0x2c],ECX
LEA RAX,[0x2618d8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x30]
LEA RAX,[RBX + 0x40]
MOV qword ptr [RBX + 0x30],RAX
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
ADD RDX,RSI
LAB_001df7f5:
CALL 0x00128252
LAB_001df7fa:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::CommentTemplateToken::CommentTemplateToken(minja::Location const&, minja::SpaceHandling,
minja::SpaceHandling, std::__cxx11::string const&) */
void __thiscall
minja::CommentTemplateToken::CommentTemplateToken
(CommentTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4,
long *param_5)
{
long lVar1;
*(int ***)this = &PTR__TemplateToken_00261930;
*(int4 *)(this + 8) = 0xc;
*(int8 *)(this + 0x10) = *param_1;
lVar1 = param_1[1];
*(long *)(this + 0x18) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00262f98 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x20) = param_1[2];
*(int4 *)(this + 0x28) = param_3;
*(int4 *)(this + 0x2c) = param_4;
*(int ***)this = &PTR__CommentTemplateToken_002618e8;
*(CommentTemplateToken **)(this + 0x30) = this + 0x40;
/* try { // try from 001df7f5 to 001df7f9 has its CatchHandler @ 001df806 */
std::__cxx11::string::_M_construct<char*>(this + 0x30,*param_5,param_5[1] + *param_5);
return;
}
|
|
12,465
|
delete_tree_element
|
eloqsql/mysys/tree.c
|
static int delete_tree_element(TREE *tree, TREE_ELEMENT *element,
my_bool abort)
{
int error, first_error= 0;
if (element != &null_element)
{
if ((first_error= delete_tree_element(tree, element->left, abort)))
abort= 1;
if (!abort && tree->free)
{
if ((error= (*tree->free)(ELEMENT_KEY(tree,element), free_free,
tree->custom_arg)))
{
first_error= first_error ? first_error : error;
abort= 1;
}
}
if ((error= delete_tree_element(tree, element->right, abort)))
first_error= first_error ? first_error : error;
if (tree->with_delete)
my_free(element);
}
return first_error;
}
|
O3
|
c
|
delete_tree_element:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x2e1934(%rip), %rax # 0x387c70
cmpq %rax, %rsi
je 0xa6388
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rsi
movsbl %dl, %r12d
movl %r12d, %edx
callq 0xa632a
movl %eax, %r15d
testl %eax, %eax
movzbl %r12b, %eax
movl $0x1, %ecx
cmovel %eax, %ecx
testb %cl, %cl
jne 0xa63b3
movq 0x280(%r14), %rax
testq %rax, %rax
je 0xa638d
movl 0x208(%r14), %edi
testq %rdi, %rdi
je 0xa6391
addq %rbx, %rdi
jmp 0xa6395
xorl %r12d, %r12d
jmp 0xa63e4
xorl %ecx, %ecx
jmp 0xa63b3
movq 0x18(%rbx), %rdi
movq 0x230(%r14), %rdx
movl $0x1, %esi
callq *%rax
testl %eax, %eax
cmovel %r15d, %eax
setne %cl
testl %r15d, %r15d
cmovel %eax, %r15d
movq 0x8(%rbx), %rsi
movsbl %cl, %edx
movq %r14, %rdi
callq 0xa632a
testl %r15d, %r15d
movl %r15d, %r12d
cmovel %eax, %r12d
testl %eax, %eax
cmovel %r15d, %r12d
cmpb $0x0, 0x278(%r14)
je 0xa63e4
movq %rbx, %rdi
callq 0xa0f0a
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
delete_tree_element:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
lea rax, null_element
cmp rsi, rax
jz short loc_A6388
mov rbx, rsi
mov r14, rdi
mov rsi, [rsi]
movsx r12d, dl
mov edx, r12d
call delete_tree_element
mov r15d, eax
test eax, eax
movzx eax, r12b
mov ecx, 1
cmovz ecx, eax
test cl, cl
jnz short loc_A63B3
mov rax, [r14+280h]
test rax, rax
jz short loc_A638D
mov edi, [r14+208h]
test rdi, rdi
jz short loc_A6391
add rdi, rbx
jmp short loc_A6395
loc_A6388:
xor r12d, r12d
jmp short loc_A63E4
loc_A638D:
xor ecx, ecx
jmp short loc_A63B3
loc_A6391:
mov rdi, [rbx+18h]
loc_A6395:
mov rdx, [r14+230h]
mov esi, 1
call rax
test eax, eax
cmovz eax, r15d
setnz cl
test r15d, r15d
cmovz r15d, eax
loc_A63B3:
mov rsi, [rbx+8]
movsx edx, cl
mov rdi, r14
call delete_tree_element
test r15d, r15d
mov r12d, r15d
cmovz r12d, eax
test eax, eax
cmovz r12d, r15d
cmp byte ptr [r14+278h], 0
jz short loc_A63E4
mov rdi, rbx
call my_free
loc_A63E4:
mov eax, r12d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long delete_tree_element(long long a1, _QWORD *a2, bool a3)
{
unsigned int v5; // r15d
bool v6; // cl
long long ( *v7)(char *, long long, _QWORD); // rax
long long v8; // rdi
char *v9; // rdi
unsigned int v10; // r12d
unsigned int v11; // eax
bool v12; // zf
unsigned int v13; // eax
if ( a2 == (_QWORD *)&null_element )
{
return 0;
}
else
{
v5 = delete_tree_element(a1, *a2, a3);
v6 = 1;
if ( !v5 )
v6 = a3;
if ( !v6 )
{
v7 = *(long long ( **)(char *, long long, _QWORD))(a1 + 640);
if ( v7 )
{
v8 = *(unsigned int *)(a1 + 520);
if ( *(_DWORD *)(a1 + 520) )
v9 = (char *)a2 + v8;
else
v9 = (char *)a2[3];
v11 = v7(v9, 1LL, *(_QWORD *)(a1 + 560));
v12 = v11 == 0;
if ( !v11 )
v11 = v5;
v6 = !v12;
if ( !v5 )
v5 = v11;
}
else
{
v6 = 0;
}
}
v13 = delete_tree_element(a1, a2[1], v6);
v10 = v5;
if ( !v5 )
v10 = v13;
if ( !v13 )
v10 = v5;
if ( *(_BYTE *)(a1 + 632) )
my_free((long long)a2);
}
return v10;
}
|
delete_tree_element:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
LEA RAX,[0x487c70]
CMP RSI,RAX
JZ 0x001a6388
MOV RBX,RSI
MOV R14,RDI
MOV RSI,qword ptr [RSI]
MOVSX R12D,DL
MOV EDX,R12D
CALL 0x001a632a
MOV R15D,EAX
TEST EAX,EAX
MOVZX EAX,R12B
MOV ECX,0x1
CMOVZ ECX,EAX
TEST CL,CL
JNZ 0x001a63b3
MOV RAX,qword ptr [R14 + 0x280]
TEST RAX,RAX
JZ 0x001a638d
MOV EDI,dword ptr [R14 + 0x208]
TEST RDI,RDI
JZ 0x001a6391
ADD RDI,RBX
JMP 0x001a6395
LAB_001a6388:
XOR R12D,R12D
JMP 0x001a63e4
LAB_001a638d:
XOR ECX,ECX
JMP 0x001a63b3
LAB_001a6391:
MOV RDI,qword ptr [RBX + 0x18]
LAB_001a6395:
MOV RDX,qword ptr [R14 + 0x230]
MOV ESI,0x1
CALL RAX
TEST EAX,EAX
CMOVZ EAX,R15D
SETNZ CL
TEST R15D,R15D
CMOVZ R15D,EAX
LAB_001a63b3:
MOV RSI,qword ptr [RBX + 0x8]
MOVSX EDX,CL
MOV RDI,R14
CALL 0x001a632a
TEST R15D,R15D
MOV R12D,R15D
CMOVZ R12D,EAX
TEST EAX,EAX
CMOVZ R12D,R15D
CMP byte ptr [R14 + 0x278],0x0
JZ 0x001a63e4
MOV RDI,RBX
CALL 0x001a0f0a
LAB_001a63e4:
MOV EAX,R12D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int delete_tree_element(long param_1,int8 *param_2,char param_3)
{
int iVar1;
int iVar2;
int iVar3;
long lVar4;
char cVar5;
if (param_2 == (int8 *)null_element) {
iVar2 = 0;
}
else {
iVar1 = delete_tree_element(param_1,*param_2,(int)param_3);
cVar5 = '\x01';
if (iVar1 == 0) {
cVar5 = param_3;
}
if (cVar5 == '\0') {
if (*(code **)(param_1 + 0x280) == (code *)0x0) {
cVar5 = '\0';
}
else {
if ((ulong)*(uint *)(param_1 + 0x208) == 0) {
lVar4 = param_2[3];
}
else {
lVar4 = (ulong)*(uint *)(param_1 + 0x208) + (long)param_2;
}
iVar2 = (**(code **)(param_1 + 0x280))(lVar4,1,*(int8 *)(param_1 + 0x230));
cVar5 = iVar2 != 0;
if (!(bool)cVar5) {
iVar2 = iVar1;
}
if (iVar1 == 0) {
iVar1 = iVar2;
}
}
}
iVar3 = delete_tree_element(param_1,param_2[1],(int)cVar5);
iVar2 = iVar1;
if (iVar1 == 0) {
iVar2 = iVar3;
}
if (iVar3 == 0) {
iVar2 = iVar1;
}
if (*(char *)(param_1 + 0x278) != '\0') {
my_free(param_2);
}
}
return iVar2;
}
|
|
12,466
|
quantize_row_q8_0_reference
|
7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c
|
void quantize_row_q8_0_reference(const float * restrict x, block_q8_0 * restrict y, int k) {
assert(k % QK8_0 == 0);
const int nb = k / QK8_0;
for (int i = 0; i < nb; i++) {
float amax = 0.0f; // absolute max
for (int j = 0; j < QK8_0; j++) {
const float v = x[i*QK8_0 + j];
amax = MAX(amax, fabsf(v));
}
const float d = amax / ((1 << 7) - 1);
const float id = d ? 1.0f/d : 0.0f;
y[i].d = GGML_FP32_TO_FP16(d);
for (int j = 0; j < QK8_0; ++j) {
const float x0 = x[i*QK8_0 + j]*id;
y[i].qs[j] = roundf(x0);
}
}
}
|
O1
|
c
|
quantize_row_q8_0_reference:
cmpl $0x20, %edx
jl 0xb6735
shrl $0x5, %edx
leaq 0x2(%rsi), %rax
vbroadcastss 0xec01(%rip), %xmm0 # 0xc5270
xorl %ecx, %ecx
vmovss 0x12933(%rip), %xmm1 # 0xc8fac
vmovss 0x4987(%rip), %xmm2 # 0xbb008
vxorps %xmm3, %xmm3, %xmm3
vbroadcastss 0xebc2(%rip), %ymm4 # 0xc5250
vbroadcastss 0x12919(%rip), %ymm5 # 0xc8fb0
xorl %r8d, %r8d
vxorps %xmm6, %xmm6, %xmm6
vmovss (%rdi,%r8,4), %xmm7
vandps %xmm0, %xmm7, %xmm7
vmaxss %xmm7, %xmm6, %xmm6
incq %r8
cmpq $0x20, %r8
jne 0xb669e
vdivss %xmm1, %xmm6, %xmm6
vcvtps2ph $0x0, %xmm6, %xmm7
movq %rcx, %r8
shlq $0x5, %r8
leaq (%r8,%rcx,2), %r8
vpextrw $0x0, %xmm7, (%rsi,%r8)
vdivss %xmm6, %xmm2, %xmm7
vcmpneqss %xmm3, %xmm6, %xmm6
vandps %xmm7, %xmm6, %xmm6
vbroadcastss %xmm6, %ymm6
xorl %r8d, %r8d
vmulps (%rdi,%r8,4), %ymm6, %ymm7
vandps %ymm4, %ymm7, %ymm8
vorps %ymm5, %ymm8, %ymm8
vaddps %ymm7, %ymm8, %ymm7
vroundps $0xb, %ymm7, %ymm7
vcvttps2dq %ymm7, %ymm7
vextracti128 $0x1, %ymm7, %xmm8
vpackssdw %xmm8, %xmm7, %xmm7
vpacksswb %xmm7, %xmm7, %xmm7
vmovq %xmm7, (%rax,%r8)
addq $0x8, %r8
cmpq $0x20, %r8
jne 0xb66e6
incq %rcx
subq $-0x80, %rdi
addq $0x22, %rax
cmpq %rdx, %rcx
jne 0xb6697
vzeroupper
retq
|
quantize_row_q8_0_reference:
cmp edx, 20h ; ' '
jl loc_B6735
shr edx, 5
lea rax, [rsi+2]
vbroadcastss xmm0, cs:dword_C5270
xor ecx, ecx
vmovss xmm1, cs:dword_C8FAC
vmovss xmm2, cs:dword_BB008
vxorps xmm3, xmm3, xmm3
vbroadcastss ymm4, cs:dword_C5250
vbroadcastss ymm5, cs:dword_C8FB0
loc_B6697:
xor r8d, r8d
vxorps xmm6, xmm6, xmm6
loc_B669E:
vmovss xmm7, dword ptr [rdi+r8*4]
vandps xmm7, xmm7, xmm0
vmaxss xmm6, xmm6, xmm7
inc r8
cmp r8, 20h ; ' '
jnz short loc_B669E
vdivss xmm6, xmm6, xmm1
vcvtps2ph xmm7, xmm6, 0
mov r8, rcx
shl r8, 5
lea r8, [r8+rcx*2]
vpextrw word ptr [rsi+r8], xmm7, 0
vdivss xmm7, xmm2, xmm6
vcmpneqss xmm6, xmm6, xmm3
vandps xmm6, xmm6, xmm7
vbroadcastss ymm6, xmm6
xor r8d, r8d
loc_B66E6:
vmulps ymm7, ymm6, ymmword ptr [rdi+r8*4]
vandps ymm8, ymm7, ymm4
vorps ymm8, ymm8, ymm5
vaddps ymm7, ymm8, ymm7
vroundps ymm7, ymm7, 0Bh
vcvttps2dq ymm7, ymm7
vextracti128 xmm8, ymm7, 1
vpackssdw xmm7, xmm7, xmm8
vpacksswb xmm7, xmm7, xmm7
vmovq qword ptr [rax+r8], xmm7
add r8, 8
cmp r8, 20h ; ' '
jnz short loc_B66E6
inc rcx
sub rdi, 0FFFFFFFFFFFFFF80h
add rax, 22h ; '"'
cmp rcx, rdx
jnz loc_B6697
loc_B6735:
vzeroupper
retn
|
void quantize_row_q8_0_reference(
long long _RDI,
long long _RSI,
int a3,
double a4,
double a5,
double a6,
__m128 _XMM3,
double a8,
double a9,
__m128 _XMM6)
{
long long v10; // rdx
long long v13; // rcx
if ( a3 >= 32 )
{
v10 = (unsigned int)a3 >> 5;
_RAX = _RSI + 2;
__asm { vbroadcastss xmm0, cs:dword_C5270 }
v13 = 0LL;
__asm
{
vmovss xmm1, cs:dword_C8FAC
vmovss xmm2, cs:dword_BB008
vxorps xmm3, xmm3, xmm3
vbroadcastss ymm4, cs:dword_C5250
vbroadcastss ymm5, cs:dword_C8FB0
}
do
{
_R8 = 0LL;
__asm { vxorps xmm6, xmm6, xmm6 }
do
{
__asm
{
vmovss xmm7, dword ptr [rdi+r8*4]
vandps xmm7, xmm7, xmm0
vmaxss xmm6, xmm6, xmm7
}
++_R8;
}
while ( _R8 != 32 );
__asm
{
vdivss xmm6, xmm6, xmm1
vcvtps2ph xmm7, xmm6, 0
}
_R8 = 34 * v13;
__asm
{
vpextrw word ptr [rsi+r8], xmm7, 0
vdivss xmm7, xmm2, xmm6
vcmpneqss xmm6, xmm6, xmm3
vandps xmm6, xmm6, xmm7
vbroadcastss ymm6, xmm6
}
for ( _R8 = 0LL; _R8 != 32; _R8 += 8LL )
{
__asm
{
vmulps ymm7, ymm6, ymmword ptr [rdi+r8*4]
vandps ymm8, ymm7, ymm4
vorps ymm8, ymm8, ymm5
vaddps ymm7, ymm8, ymm7
vroundps ymm7, ymm7, 0Bh
vcvttps2dq ymm7, ymm7
vextracti128 xmm8, ymm7, 1
vpackssdw xmm7, xmm7, xmm8
vpacksswb xmm7, xmm7, xmm7
vmovq qword ptr [rax+r8], xmm7
}
}
++v13;
_RDI += 128LL;
_RAX += 34LL;
}
while ( v13 != v10 );
}
__asm { vzeroupper }
}
| |||
12,467
|
quantize_row_q8_0_reference
|
7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c
|
void quantize_row_q8_0_reference(const float * restrict x, block_q8_0 * restrict y, int k) {
assert(k % QK8_0 == 0);
const int nb = k / QK8_0;
for (int i = 0; i < nb; i++) {
float amax = 0.0f; // absolute max
for (int j = 0; j < QK8_0; j++) {
const float v = x[i*QK8_0 + j];
amax = MAX(amax, fabsf(v));
}
const float d = amax / ((1 << 7) - 1);
const float id = d ? 1.0f/d : 0.0f;
y[i].d = GGML_FP32_TO_FP16(d);
for (int j = 0; j < QK8_0; ++j) {
const float x0 = x[i*QK8_0 + j]*id;
y[i].qs[j] = roundf(x0);
}
}
}
|
O2
|
c
|
quantize_row_q8_0_reference:
movl %edx, %eax
pushq $0x20
popq %rcx
cltd
idivl %ecx
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
leaq 0x2(%rsi), %rdx
vmovss 0x1263f(%rip), %xmm0 # 0xa4d58
vmovss 0x48e7(%rip), %xmm1 # 0x97008
vxorps %xmm2, %xmm2, %xmm2
vbroadcastss 0xe94e(%rip), %xmm3 # 0xa107c
vbroadcastss 0x12625(%rip), %xmm4 # 0xa4d5c
vbroadcastss 0xe94c(%rip), %xmm5 # 0xa108c
cmpq %rax, %rcx
je 0x927c9
vxorps %xmm6, %xmm6, %xmm6
xorl %r8d, %r8d
cmpq $0x20, %r8
je 0x92769
vmovss (%rdi,%r8,4), %xmm7
vandps %xmm5, %xmm7, %xmm7
vmaxss %xmm7, %xmm6, %xmm6
incq %r8
jmp 0x92750
vdivss %xmm0, %xmm6, %xmm7
vdivss %xmm7, %xmm1, %xmm6
vcmpneqss %xmm2, %xmm7, %xmm8
vandps %xmm6, %xmm8, %xmm6
vcvtps2ph $0x0, %xmm7, %xmm7
imulq $0x22, %rcx, %r8
vpextrw $0x0, %xmm7, (%rsi,%r8)
xorl %r8d, %r8d
cmpq $0x20, %r8
je 0x927b9
vmulss (%rdi,%r8,4), %xmm6, %xmm7
vandps %xmm3, %xmm7, %xmm8
vorps %xmm4, %xmm8, %xmm8
vaddss %xmm7, %xmm8, %xmm7
vroundss $0xb, %xmm7, %xmm7, %xmm7
vcvttss2si %xmm7, %r9d
movb %r9b, (%rdx,%r8)
incq %r8
jmp 0x9278e
incq %rcx
subq $-0x80, %rdi
addq $0x22, %rdx
jmp 0x92740
retq
|
quantize_row_q8_0_reference:
mov eax, edx
push 20h ; ' '
pop rcx
cdq
idiv ecx
xor ecx, ecx
test eax, eax
cmovle eax, ecx
lea rdx, [rsi+2]
vmovss xmm0, cs:dword_A4D58
vmovss xmm1, cs:dword_97008
vxorps xmm2, xmm2, xmm2
vbroadcastss xmm3, cs:dword_A107C
vbroadcastss xmm4, cs:dword_A4D5C
vbroadcastss xmm5, cs:dword_A108C
loc_92740:
cmp rcx, rax
jz locret_927C9
vxorps xmm6, xmm6, xmm6
xor r8d, r8d
loc_92750:
cmp r8, 20h ; ' '
jz short loc_92769
vmovss xmm7, dword ptr [rdi+r8*4]
vandps xmm7, xmm7, xmm5
vmaxss xmm6, xmm6, xmm7
inc r8
jmp short loc_92750
loc_92769:
vdivss xmm7, xmm6, xmm0
vdivss xmm6, xmm1, xmm7
vcmpneqss xmm8, xmm7, xmm2
vandps xmm6, xmm8, xmm6
vcvtps2ph xmm7, xmm7, 0
imul r8, rcx, 22h ; '"'
vpextrw word ptr [rsi+r8], xmm7, 0
xor r8d, r8d
loc_9278E:
cmp r8, 20h ; ' '
jz short loc_927B9
vmulss xmm7, xmm6, dword ptr [rdi+r8*4]
vandps xmm8, xmm7, xmm3
vorps xmm8, xmm8, xmm4
vaddss xmm7, xmm8, xmm7
vroundss xmm7, xmm7, xmm7, 0Bh
vcvttss2si r9d, xmm7
mov [rdx+r8], r9b
inc r8
jmp short loc_9278E
loc_927B9:
inc rcx
sub rdi, 0FFFFFFFFFFFFFF80h
add rdx, 22h ; '"'
jmp loc_92740
locret_927C9:
retn
|
long long quantize_row_q8_0_reference(
long long _RDI,
long long _RSI,
int a3,
double a4,
double a5,
__m128 _XMM2,
double a7,
double a8,
double a9,
__m128 _XMM6)
{
long long result; // rax
long long v11; // rcx
long long v12; // rdx
long long i; // r8
result = (unsigned int)(a3 / 32);
v11 = 0LL;
if ( (int)result <= 0 )
result = 0LL;
v12 = _RSI + 2;
__asm
{
vmovss xmm0, cs:dword_A4D58
vmovss xmm1, cs:dword_97008
vxorps xmm2, xmm2, xmm2
vbroadcastss xmm3, cs:dword_A107C
vbroadcastss xmm4, cs:dword_A4D5C
vbroadcastss xmm5, cs:dword_A108C
}
while ( v11 != result )
{
__asm { vxorps xmm6, xmm6, xmm6 }
for ( _R8 = 0LL; _R8 != 32; ++_R8 )
{
__asm
{
vmovss xmm7, dword ptr [rdi+r8*4]
vandps xmm7, xmm7, xmm5
vmaxss xmm6, xmm6, xmm7
}
}
__asm
{
vdivss xmm7, xmm6, xmm0
vdivss xmm6, xmm1, xmm7
vcmpneqss xmm8, xmm7, xmm2
vandps xmm6, xmm8, xmm6
vcvtps2ph xmm7, xmm7, 0
}
_R8 = 34 * v11;
__asm { vpextrw word ptr [rsi+r8], xmm7, 0 }
for ( i = 0LL; i != 32; ++i )
{
__asm
{
vmulss xmm7, xmm6, dword ptr [rdi+r8*4]
vandps xmm8, xmm7, xmm3
vorps xmm8, xmm8, xmm4
vaddss xmm7, xmm8, xmm7
vroundss xmm7, xmm7, xmm7, 0Bh
vcvttss2si r9d, xmm7
}
*(_BYTE *)(v12 + i) = _R9D;
}
++v11;
_RDI += 128LL;
v12 += 34LL;
}
return result;
}
|
quantize_row_q8_0_reference:
MOV EAX,EDX
PUSH 0x20
POP RCX
CDQ
IDIV ECX
XOR ECX,ECX
TEST EAX,EAX
CMOVLE EAX,ECX
LEA RDX,[RSI + 0x2]
VMOVSS XMM0,dword ptr [0x001a4d58]
VMOVSS XMM1,dword ptr [0x00197008]
VXORPS XMM2,XMM2,XMM2
VBROADCASTSS XMM3,dword ptr [0x001a107c]
VBROADCASTSS XMM4,dword ptr [0x001a4d5c]
VBROADCASTSS XMM5,dword ptr [0x001a108c]
LAB_00192740:
CMP RCX,RAX
JZ 0x001927c9
VXORPS XMM6,XMM6,XMM6
XOR R8D,R8D
LAB_00192750:
CMP R8,0x20
JZ 0x00192769
VMOVSS XMM7,dword ptr [RDI + R8*0x4]
VANDPS XMM7,XMM7,XMM5
VMAXSS XMM6,XMM6,XMM7
INC R8
JMP 0x00192750
LAB_00192769:
VDIVSS XMM7,XMM6,XMM0
VDIVSS XMM6,XMM1,XMM7
VCMPNEQSS XMM8,XMM7,XMM2
VANDPS XMM6,XMM8,XMM6
VCVTPS2PH XMM7,XMM7,0x0
IMUL R8,RCX,0x22
VPEXTRW word ptr [RSI + R8*0x1],XMM7,0x0
XOR R8D,R8D
LAB_0019278e:
CMP R8,0x20
JZ 0x001927b9
VMULSS XMM7,XMM6,dword ptr [RDI + R8*0x4]
VANDPS XMM8,XMM7,XMM3
VORPS XMM8,XMM8,XMM4
VADDSS XMM7,XMM8,XMM7
VROUNDSS XMM7,XMM7,XMM7,0xb
VCVTTSS2SI R9D,XMM7
MOV byte ptr [RDX + R8*0x1],R9B
INC R8
JMP 0x0019278e
LAB_001927b9:
INC RCX
SUB RDI,-0x80
ADD RDX,0x22
JMP 0x00192740
LAB_001927c9:
RET
|
void quantize_row_q8_0_reference(long param_1,long param_2,int param_3)
{
float fVar1;
float fVar2;
float fVar3;
ulong uVar4;
ulong uVar5;
long lVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [16];
int1 auVar10 [16];
int1 auVar11 [16];
fVar3 = DAT_001a4d58;
fVar2 = DAT_00197008;
uVar4 = (long)param_3 / 0x20 & 0xffffffff;
uVar5 = 0;
if ((int)((long)param_3 / 0x20) < 1) {
uVar4 = 0;
}
param_2 = param_2 + 2;
auVar7._4_4_ = DAT_001a107c;
auVar7._0_4_ = DAT_001a107c;
auVar7._8_4_ = DAT_001a107c;
auVar7._12_4_ = DAT_001a107c;
auVar8._4_4_ = DAT_001a4d5c;
auVar8._0_4_ = DAT_001a4d5c;
auVar8._8_4_ = DAT_001a4d5c;
auVar8._12_4_ = DAT_001a4d5c;
auVar9._4_4_ = DAT_001a108c;
auVar9._0_4_ = DAT_001a108c;
auVar9._8_4_ = DAT_001a108c;
auVar9._12_4_ = DAT_001a108c;
for (; uVar5 != uVar4; uVar5 = uVar5 + 1) {
auVar10 = ZEXT816(0) << 0x40;
for (lVar6 = 0; lVar6 != 0x20; lVar6 = lVar6 + 1) {
auVar11 = vandps_avx(ZEXT416(*(uint *)(param_1 + lVar6 * 4)),auVar9);
auVar10 = vmaxss_avx(auVar10,auVar11);
}
auVar11._0_4_ = auVar10._0_4_ / fVar3;
auVar11._4_12_ = auVar10._4_12_;
auVar10 = vcmpss_avx(auVar11,ZEXT816(0) << 0x40,4);
auVar10 = vandps_avx(auVar10,ZEXT416((uint)(fVar2 / auVar11._0_4_)));
auVar11 = vcvtps2ph_f16c(auVar11,0);
vpextrw_avx(auVar11,0);
for (lVar6 = 0; lVar6 != 0x20; lVar6 = lVar6 + 1) {
fVar1 = auVar10._0_4_ * *(float *)(param_1 + lVar6 * 4);
auVar11 = vandps_avx(ZEXT416((uint)fVar1),auVar7);
auVar11 = vorps_avx(auVar11,auVar8);
auVar11 = ZEXT416((uint)(auVar11._0_4_ + fVar1));
auVar11 = vroundss_avx(auVar11,auVar11,0xb);
*(char *)(param_2 + lVar6) = (char)(int)auVar11._0_4_;
}
param_1 = param_1 + 0x80;
param_2 = param_2 + 0x22;
}
return;
}
|
|
12,468
|
quantize_row_q8_0_reference
|
7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c
|
void quantize_row_q8_0_reference(const float * restrict x, block_q8_0 * restrict y, int k) {
assert(k % QK8_0 == 0);
const int nb = k / QK8_0;
for (int i = 0; i < nb; i++) {
float amax = 0.0f; // absolute max
for (int j = 0; j < QK8_0; j++) {
const float v = x[i*QK8_0 + j];
amax = MAX(amax, fabsf(v));
}
const float d = amax / ((1 << 7) - 1);
const float id = d ? 1.0f/d : 0.0f;
y[i].d = GGML_FP32_TO_FP16(d);
for (int j = 0; j < QK8_0; ++j) {
const float x0 = x[i*QK8_0 + j]*id;
y[i].qs[j] = roundf(x0);
}
}
}
|
O3
|
c
|
quantize_row_q8_0_reference:
cmpl $0x20, %edx
jl 0xb526d
shrl $0x5, %edx
leaq 0x2(%rsi), %rax
vbroadcastss 0xf0e9(%rip), %xmm0 # 0xc4290
xorl %ecx, %ecx
vmovss 0x12ddb(%rip), %xmm1 # 0xc7f8c
vmovss 0x4e4f(%rip), %xmm2 # 0xba008
vxorps %xmm3, %xmm3, %xmm3
vbroadcastss 0xf0aa(%rip), %ymm4 # 0xc4270
vbroadcastss 0x12dc1(%rip), %ymm5 # 0xc7f90
xorl %r8d, %r8d
vxorps %xmm6, %xmm6, %xmm6
vmovss (%rdi,%r8,4), %xmm7
vandps %xmm0, %xmm7, %xmm7
vmaxss %xmm7, %xmm6, %xmm6
incq %r8
cmpq $0x20, %r8
jne 0xb51d6
vdivss %xmm1, %xmm6, %xmm6
vcvtps2ph $0x0, %xmm6, %xmm7
movq %rcx, %r8
shlq $0x5, %r8
leaq (%r8,%rcx,2), %r8
vpextrw $0x0, %xmm7, (%rsi,%r8)
vdivss %xmm6, %xmm2, %xmm7
vcmpneqss %xmm3, %xmm6, %xmm6
vandps %xmm7, %xmm6, %xmm6
vbroadcastss %xmm6, %ymm6
xorl %r8d, %r8d
vmulps (%rdi,%r8,4), %ymm6, %ymm7
vandps %ymm4, %ymm7, %ymm8
vorps %ymm5, %ymm8, %ymm8
vaddps %ymm7, %ymm8, %ymm7
vroundps $0xb, %ymm7, %ymm7
vcvttps2dq %ymm7, %ymm7
vextracti128 $0x1, %ymm7, %xmm8
vpackssdw %xmm8, %xmm7, %xmm7
vpacksswb %xmm7, %xmm7, %xmm7
vmovq %xmm7, (%rax,%r8)
addq $0x8, %r8
cmpq $0x20, %r8
jne 0xb521e
incq %rcx
subq $-0x80, %rdi
addq $0x22, %rax
cmpq %rdx, %rcx
jne 0xb51cf
vzeroupper
retq
|
quantize_row_q8_0_reference:
cmp edx, 20h ; ' '
jl loc_B526D
shr edx, 5
lea rax, [rsi+2]
vbroadcastss xmm0, cs:dword_C4290
xor ecx, ecx
vmovss xmm1, cs:dword_C7F8C
vmovss xmm2, cs:dword_BA008
vxorps xmm3, xmm3, xmm3
vbroadcastss ymm4, cs:dword_C4270
vbroadcastss ymm5, cs:dword_C7F90
loc_B51CF:
xor r8d, r8d
vxorps xmm6, xmm6, xmm6
loc_B51D6:
vmovss xmm7, dword ptr [rdi+r8*4]
vandps xmm7, xmm7, xmm0
vmaxss xmm6, xmm6, xmm7
inc r8
cmp r8, 20h ; ' '
jnz short loc_B51D6
vdivss xmm6, xmm6, xmm1
vcvtps2ph xmm7, xmm6, 0
mov r8, rcx
shl r8, 5
lea r8, [r8+rcx*2]
vpextrw word ptr [rsi+r8], xmm7, 0
vdivss xmm7, xmm2, xmm6
vcmpneqss xmm6, xmm6, xmm3
vandps xmm6, xmm6, xmm7
vbroadcastss ymm6, xmm6
xor r8d, r8d
loc_B521E:
vmulps ymm7, ymm6, ymmword ptr [rdi+r8*4]
vandps ymm8, ymm7, ymm4
vorps ymm8, ymm8, ymm5
vaddps ymm7, ymm8, ymm7
vroundps ymm7, ymm7, 0Bh
vcvttps2dq ymm7, ymm7
vextracti128 xmm8, ymm7, 1
vpackssdw xmm7, xmm7, xmm8
vpacksswb xmm7, xmm7, xmm7
vmovq qword ptr [rax+r8], xmm7
add r8, 8
cmp r8, 20h ; ' '
jnz short loc_B521E
inc rcx
sub rdi, 0FFFFFFFFFFFFFF80h
add rax, 22h ; '"'
cmp rcx, rdx
jnz loc_B51CF
loc_B526D:
vzeroupper
retn
|
void quantize_row_q8_0_reference(
long long _RDI,
long long _RSI,
int a3,
double a4,
double a5,
double a6,
__m128 _XMM3,
double a8,
double a9,
__m128 _XMM6)
{
long long v10; // rdx
long long v13; // rcx
if ( a3 >= 32 )
{
v10 = (unsigned int)a3 >> 5;
_RAX = _RSI + 2;
__asm { vbroadcastss xmm0, cs:dword_C4290 }
v13 = 0LL;
__asm
{
vmovss xmm1, cs:dword_C7F8C
vmovss xmm2, cs:dword_BA008
vxorps xmm3, xmm3, xmm3
vbroadcastss ymm4, cs:dword_C4270
vbroadcastss ymm5, cs:dword_C7F90
}
do
{
_R8 = 0LL;
__asm { vxorps xmm6, xmm6, xmm6 }
do
{
__asm
{
vmovss xmm7, dword ptr [rdi+r8*4]
vandps xmm7, xmm7, xmm0
vmaxss xmm6, xmm6, xmm7
}
++_R8;
}
while ( _R8 != 32 );
__asm
{
vdivss xmm6, xmm6, xmm1
vcvtps2ph xmm7, xmm6, 0
}
_R8 = 34 * v13;
__asm
{
vpextrw word ptr [rsi+r8], xmm7, 0
vdivss xmm7, xmm2, xmm6
vcmpneqss xmm6, xmm6, xmm3
vandps xmm6, xmm6, xmm7
vbroadcastss ymm6, xmm6
}
for ( _R8 = 0LL; _R8 != 32; _R8 += 8LL )
{
__asm
{
vmulps ymm7, ymm6, ymmword ptr [rdi+r8*4]
vandps ymm8, ymm7, ymm4
vorps ymm8, ymm8, ymm5
vaddps ymm7, ymm8, ymm7
vroundps ymm7, ymm7, 0Bh
vcvttps2dq ymm7, ymm7
vextracti128 xmm8, ymm7, 1
vpackssdw xmm7, xmm7, xmm8
vpacksswb xmm7, xmm7, xmm7
vmovq qword ptr [rax+r8], xmm7
}
}
++v13;
_RDI += 128LL;
_RAX += 34LL;
}
while ( v13 != v10 );
}
__asm { vzeroupper }
}
| |||
12,469
|
UpscalerGGML::load_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
7CodeWizard[P]stablediffusion/upscaler.cpp
|
bool load_from_file(const std::string& esrgan_path) {
#ifdef SD_USE_CUBLAS
LOG_DEBUG("Using CUDA backend");
backend = ggml_backend_cuda_init(0);
#endif
#ifdef SD_USE_METAL
LOG_DEBUG("Using Metal backend");
ggml_metal_log_set_callback(ggml_log_callback_default, nullptr);
backend = ggml_backend_metal_init();
#endif
if (!backend) {
LOG_DEBUG("Using CPU backend");
backend = ggml_backend_cpu_init();
}
LOG_INFO("Upscaler weight type: %s", ggml_type_name(model_data_type));
if (!esrgan_upscaler.load_from_file(esrgan_path, backend)) {
return false;
}
return true;
}
|
O0
|
cpp
|
UpscalerGGML::load_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
jne 0xefeea
xorl %edi, %edi
leaq 0x95948(%rip), %rsi # 0x18580f
movl $0x1d, %edx
leaq 0x8fa3f(%rip), %rcx # 0x17f912
movb $0x0, %al
callq 0xeb5e0
callq 0x167b00
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movl 0x8(%rax), %edi
callq 0x11b090
movq %rax, %r8
movl $0x1, %edi
leaq 0x95909(%rip), %rsi # 0x18580f
movl $0x20, %edx
leaq 0x95950(%rip), %rcx # 0x185862
movb $0x0, %al
callq 0xeb5e0
movq 0x8(%rsp), %rax
movq %rax, %rdi
addq $0x10, %rdi
movq 0x10(%rsp), %rsi
movq (%rax), %rdx
callq 0xf0d60
testb $0x1, %al
jne 0xeff3d
movb $0x0, 0x27(%rsp)
jmp 0xeff42
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax)
|
_ZN12UpscalerGGML14load_from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
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_20], rax
cmp qword ptr [rax], 0
jnz short loc_EFEEA
xor edi, edi
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov edx, 1Dh
lea rcx, aUsingCpuBacken; "Using CPU backend"
mov al, 0
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
call ggml_backend_cpu_init
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rax], rcx
loc_EFEEA:
mov rax, [rsp+28h+var_20]
mov edi, [rax+8]
call ggml_type_name
mov r8, rax
mov edi, 1
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
mov edx, 20h ; ' '
lea rcx, aUpscalerWeight; "Upscaler weight type: %s"
mov al, 0
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
mov rax, [rsp+28h+var_20]
mov rdi, rax
add rdi, 10h
mov rsi, [rsp+28h+var_18]
mov rdx, [rax]
call _ZN6ESRGAN14load_from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12ggml_backend; ESRGAN::load_from_file(std::string const&,ggml_backend *)
test al, 1
jnz short loc_EFF3D
mov [rsp+28h+var_1], 0
jmp short loc_EFF42
loc_EFF3D:
mov [rsp+28h+var_1], 1
loc_EFF42:
mov al, [rsp+28h+var_1]
and al, 1
add rsp, 28h
retn
|
load_from_file:
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 + 0x8],RAX
CMP qword ptr [RAX],0x0
JNZ 0x001efeea
XOR EDI,EDI
LEA RSI,[0x28580f]
MOV EDX,0x1d
LEA RCX,[0x27f912]
MOV AL,0x0
CALL 0x001eb5e0
CALL 0x00267b00
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
LAB_001efeea:
MOV RAX,qword ptr [RSP + 0x8]
MOV EDI,dword ptr [RAX + 0x8]
CALL 0x0021b090
MOV R8,RAX
MOV EDI,0x1
LEA RSI,[0x28580f]
MOV EDX,0x20
LEA RCX,[0x285862]
MOV AL,0x0
CALL 0x001eb5e0
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,RAX
ADD RDI,0x10
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RAX]
CALL 0x001f0d60
TEST AL,0x1
JNZ 0x001eff3d
MOV byte ptr [RSP + 0x27],0x0
JMP 0x001eff42
LAB_001eff3d:
MOV byte ptr [RSP + 0x27],0x1
LAB_001eff42:
MOV AL,byte ptr [RSP + 0x27]
AND AL,0x1
ADD RSP,0x28
RET
|
/* UpscalerGGML::load_from_file(std::__cxx11::string const&) */
bool __thiscall UpscalerGGML::load_from_file(UpscalerGGML *this,string *param_1)
{
int8 uVar1;
ulong uVar2;
if (*(long *)this == 0) {
log_printf(0,
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/upscaler.cpp",
0x1d,"Using CPU backend");
uVar1 = ggml_backend_cpu_init();
*(int8 *)this = uVar1;
}
uVar1 = ggml_type_name(*(int4 *)(this + 8));
log_printf(1,"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/upscaler.cpp",
0x20,"Upscaler weight type: %s",uVar1);
uVar2 = ESRGAN::load_from_file((ESRGAN *)(this + 0x10),param_1,*(ggml_backend **)this);
return (uVar2 & 1) != 0;
}
|
||
12,470
|
UpscalerGGML::load_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
7CodeWizard[P]stablediffusion/upscaler.cpp
|
bool load_from_file(const std::string& esrgan_path) {
#ifdef SD_USE_CUBLAS
LOG_DEBUG("Using CUDA backend");
backend = ggml_backend_cuda_init(0);
#endif
#ifdef SD_USE_METAL
LOG_DEBUG("Using Metal backend");
ggml_metal_log_set_callback(ggml_log_callback_default, nullptr);
backend = ggml_backend_metal_init();
#endif
if (!backend) {
LOG_DEBUG("Using CPU backend");
backend = ggml_backend_cpu_init();
}
LOG_INFO("Upscaler weight type: %s", ggml_type_name(model_data_type));
if (!esrgan_upscaler.load_from_file(esrgan_path, backend)) {
return false;
}
return true;
}
|
O2
|
cpp
|
UpscalerGGML::load_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, (%rdi)
jne 0x5727c
leaq 0x48396(%rip), %rsi # 0x9f5f7
leaq 0x42cae(%rip), %rcx # 0x99f16
pushq $0x1d
popq %rdx
xorl %edi, %edi
xorl %eax, %eax
callq 0x55f59
callq 0x906d1
movq %rax, (%r14)
movl 0x8(%r14), %edi
callq 0x67bf9
leaq 0x4836b(%rip), %rsi # 0x9f5f7
leaq 0x483b7(%rip), %rcx # 0x9f64a
pushq $0x1
popq %rdi
pushq $0x20
popq %rdx
movq %rax, %r8
xorl %eax, %eax
callq 0x55f59
movq (%r14), %rdx
addq $0x10, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x58342
|
_ZN12UpscalerGGML14load_from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
cmp qword ptr [rdi], 0
jnz short loc_5727C
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aUsingCpuBacken; "Using CPU backend"
push 1Dh
pop rdx
xor edi, edi
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
call ggml_backend_cpu_init
mov [r14], rax
loc_5727C:
mov edi, [r14+8]
call ggml_type_name
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aUpscalerWeight; "Upscaler weight type: %s"
push 1
pop rdi
push 20h ; ' '
pop rdx
mov r8, rax
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
mov rdx, [r14]
add r14, 10h
mov rdi, r14; this
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp _ZN6ESRGAN14load_from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12ggml_backend; ESRGAN::load_from_file(std::string const&,ggml_backend *)
|
long long UpscalerGGML::load_from_file(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14,
int a15,
char a16,
int a17,
int a18,
int a19,
int a20,
int a21,
char a22,
int a23,
int a24,
int a25,
char a26,
int a27,
int a28,
int a29,
int a30,
int a31,
char a32)
{
char v32; // al
long long v33; // rax
long long v34; // r9
__m128 v35; // xmm4
__m128 v36; // xmm5
char v38; // [rsp-8h] [rbp-18h]
v38 = v32;
if ( !*(_QWORD *)a1 )
{
log_printf(
0,
(long long)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/upscaler.cpp",
29,
(long long)"Using CPU backend",
a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v32);
*(_QWORD *)a1 = ggml_backend_cpu_init();
}
v33 = ggml_type_name(*(unsigned int *)(a1 + 8));
log_printf(
1u,
(long long)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/upscaler.cpp",
32,
(long long)"Upscaler weight type: %s",
v33,
v34,
a2,
a3,
a4,
a5,
v35,
v36,
a8,
a9,
v38);
return ESRGAN::load_from_file(
(ESRGAN *)(a1 + 16),
a15,
a16,
a17,
a18,
a19,
a20,
a21,
a22,
a23,
a24,
a25,
a26,
a27,
a28,
a29,
a30,
a31,
a32);
}
|
load_from_file:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CMP qword ptr [RDI],0x0
JNZ 0x0015727c
LEA RSI,[0x19f5f7]
LEA RCX,[0x199f16]
PUSH 0x1d
POP RDX
XOR EDI,EDI
XOR EAX,EAX
CALL 0x00155f59
CALL 0x001906d1
MOV qword ptr [R14],RAX
LAB_0015727c:
MOV EDI,dword ptr [R14 + 0x8]
CALL 0x00167bf9
LEA RSI,[0x19f5f7]
LEA RCX,[0x19f64a]
PUSH 0x1
POP RDI
PUSH 0x20
POP RDX
MOV R8,RAX
XOR EAX,EAX
CALL 0x00155f59
MOV RDX,qword ptr [R14]
ADD R14,0x10
MOV RDI,R14
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00158342
|
/* UpscalerGGML::load_from_file(std::__cxx11::string const&) */
void __thiscall UpscalerGGML::load_from_file(UpscalerGGML *this,string *param_1)
{
int8 uVar1;
if (*(long *)this == 0) {
log_printf(0,
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/upscaler.cpp",
0x1d,"Using CPU backend");
uVar1 = ggml_backend_cpu_init();
*(int8 *)this = uVar1;
}
uVar1 = ggml_type_name(*(int4 *)(this + 8));
log_printf(1,"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/upscaler.cpp",
0x20,"Upscaler weight type: %s",uVar1);
ESRGAN::load_from_file((ESRGAN *)(this + 0x10),param_1,*(ggml_backend **)this);
return;
}
|
|
12,471
|
UpscalerGGML::load_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
7CodeWizard[P]stablediffusion/upscaler.cpp
|
bool load_from_file(const std::string& esrgan_path) {
#ifdef SD_USE_CUBLAS
LOG_DEBUG("Using CUDA backend");
backend = ggml_backend_cuda_init(0);
#endif
#ifdef SD_USE_METAL
LOG_DEBUG("Using Metal backend");
ggml_metal_log_set_callback(ggml_log_callback_default, nullptr);
backend = ggml_backend_metal_init();
#endif
if (!backend) {
LOG_DEBUG("Using CPU backend");
backend = ggml_backend_cpu_init();
}
LOG_INFO("Upscaler weight type: %s", ggml_type_name(model_data_type));
if (!esrgan_upscaler.load_from_file(esrgan_path, backend)) {
return false;
}
return true;
}
|
O3
|
cpp
|
UpscalerGGML::load_from_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, (%rdi)
jne 0x7a950
leaq 0x47da4(%rip), %rsi # 0xc26d7
leaq 0x426bc(%rip), %rcx # 0xbcff6
xorl %edi, %edi
movl $0x1d, %edx
xorl %eax, %eax
callq 0x7947e
callq 0xb31ab
movq %rax, (%r14)
movl 0x8(%r14), %edi
callq 0x8cf60
leaq 0x47d77(%rip), %rsi # 0xc26d7
leaq 0x47dc3(%rip), %rcx # 0xc272a
movl $0x1, %edi
movl $0x20, %edx
movq %rax, %r8
xorl %eax, %eax
callq 0x7947e
movq (%r14), %rdx
addq $0x10, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7bc4c
|
_ZN12UpscalerGGML14load_from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
cmp qword ptr [rdi], 0
jnz short loc_7A950
lea rsi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aUsingCpuBacken; "Using CPU backend"
xor edi, edi
mov edx, 1Dh
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
call ggml_backend_cpu_init
mov [r14], rax
loc_7A950:
mov edi, [r14+8]
call ggml_type_name
lea rsi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aUpscalerWeight; "Upscaler weight type: %s"
mov edi, 1
mov edx, 20h ; ' '
mov r8, rax
xor eax, eax
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
mov rdx, [r14]
add r14, 10h
mov rdi, r14; int
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp _ZN6ESRGAN14load_from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12ggml_backend; ESRGAN::load_from_file(std::string const&,ggml_backend *)
|
long long UpscalerGGML::load_from_file(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14,
int a15,
long long a16,
int a17,
char a18,
int a19,
int a20,
char a21,
int a22,
int a23,
char a24,
int a25,
int a26,
int a27,
int a28,
int a29,
char a30)
{
char v30; // al
long long v31; // rax
long long v32; // r9
__m128 v33; // xmm4
__m128 v34; // xmm5
char v36; // [rsp-8h] [rbp-18h]
v36 = v30;
if ( !*(_QWORD *)a1 )
{
log_printf(
0,
(long long)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/upscaler.cpp",
29,
(long long)"Using CPU backend",
a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v30);
*(_QWORD *)a1 = ggml_backend_cpu_init();
}
v31 = ggml_type_name(*(unsigned int *)(a1 + 8));
log_printf(
1u,
(long long)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/upscaler.cpp",
32,
(long long)"Upscaler weight type: %s",
v31,
v32,
a2,
a3,
a4,
a5,
v33,
v34,
a8,
a9,
v36);
return ESRGAN::load_from_file(
(int)a1 + 16,
a15,
a16,
a17,
a18,
a19,
a20,
a21,
a22,
a23,
a24,
a25,
a26,
a27,
a28,
a29,
a30);
}
| |||
12,472
|
do_lt
|
fabiosvm[P]rak/src/vm.c
|
static void do_lt(RakVM *vm, RakChunk *chunk, uint32_t *ip, RakValue *slots, RakError *err)
{
rak_vm_lt(vm, err);
if (!rak_is_ok(err)) return;
dispatch(vm, chunk, ip + 1, slots, err);
}
|
O2
|
c
|
do_lt:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x8(%rdi), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %rsi
movq (%rax), %rdx
movq 0x8(%rax), %rcx
callq 0x6bea
movb (%rbx), %cl
cmpb $0x1, %cl
jne 0x7944
xorl %edx, %edx
testl %eax, %eax
setns %dl
shlq $0x20, %rdx
incq %rdx
shrl $0x1f, %eax
pushq $0x1
popq %rsi
movq %r13, %rdi
movq %rax, %rcx
callq 0x8075
movq %r13, %rdi
callq 0x6dd8
movb (%rbx), %cl
testb $0x1, %cl
je 0x7975
movzbl 0x4(%r15), %eax
addq $0x4, %r15
leaq 0x7397(%rip), %r9 # 0xecf0
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmpq *(%r9,%rax,8)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
do_lt:
push r15
push r14
push r13
push r12
push rbx
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+8]
mov rdi, [rax-10h]
mov rsi, [rax-8]
mov rdx, [rax]
mov rcx, [rax+8]
call rak_value_compare
mov cl, [rbx]
cmp cl, 1
jnz short loc_7944
xor edx, edx
test eax, eax
setns dl
shl rdx, 20h
inc rdx
shr eax, 1Fh
push 1
pop rsi
mov rdi, r13
mov rcx, rax
call rak_vm_set
mov rdi, r13
call rak_vm_pop
mov cl, [rbx]
loc_7944:
test cl, 1
jz short loc_7975
movzx eax, byte ptr [r15+4]
add r15, 4
lea r9, dispatchTable
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, r14
mov r8, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp ds:(dispatchTable - 0ECF0h)[r9+rax*8]
loc_7975:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
long long do_lt(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
char *a13,
long long a14)
{
long long result; // rax
char v17; // cl
result = rak_value_compare(
*(_QWORD *)(*(_QWORD *)(a1 + 8) - 16LL),
*(_QWORD *)(*(_QWORD *)(a1 + 8) - 8LL),
**(_QWORD **)(a1 + 8),
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL),
(long long)a13,
a14,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11);
v17 = *a13;
if ( *a13 == 1 )
{
rak_vm_set(a1, 1LL, ((unsigned long long)((int)result >= 0) << 32) + 1, (unsigned int)result >> 31);
result = rak_vm_pop(a1);
v17 = *a13;
}
if ( (v17 & 1) != 0 )
((void ( __noreturn *)(long long, long long, long long))*(&dispatchTable + *(unsigned __int8 *)(a3 + 4)))(
a1,
a2,
a3 + 4);
return result;
}
|
do_lt:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RAX + -0x10]
MOV RSI,qword ptr [RAX + -0x8]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
CALL 0x00106bea
MOV CL,byte ptr [RBX]
CMP CL,0x1
JNZ 0x00107944
XOR EDX,EDX
TEST EAX,EAX
SETNS DL
SHL RDX,0x20
INC RDX
SHR EAX,0x1f
PUSH 0x1
POP RSI
MOV RDI,R13
MOV RCX,RAX
CALL 0x00108075
MOV RDI,R13
CALL 0x00106dd8
MOV CL,byte ptr [RBX]
LAB_00107944:
TEST CL,0x1
JZ 0x00107975
MOVZX EAX,byte ptr [R15 + 0x4]
ADD R15,0x4
LEA R9,[0x10ecf0]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
MOV R8,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP qword ptr [R9 + RAX*0x8]
LAB_00107975:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
void do_lt(long param_1,int8 param_2,long param_3,int8 param_4,byte *param_5)
{
int8 *puVar1;
uint uVar2;
byte bVar3;
puVar1 = *(int8 **)(param_1 + 8);
uVar2 = rak_value_compare(puVar1[-2],puVar1[-1],*puVar1,puVar1[1]);
bVar3 = *param_5;
if (bVar3 == 1) {
rak_vm_set(param_1,1,((ulong)(-1 < (int)uVar2) << 0x20) + 1,uVar2 >> 0x1f);
rak_vm_pop(param_1);
bVar3 = *param_5;
}
if ((bVar3 & 1) != 0) {
/* WARNING: Could not recover jumptable at 0x00107971. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(dispatchTable + (ulong)*(byte *)(param_3 + 4) * 8))
(param_1,param_2,param_3 + 4,param_4,param_5);
return;
}
return;
}
|
|
12,473
|
testing::internal::UnitTestImpl::FilterTests(testing::internal::UnitTestImpl::ReactionToSharding)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) {
const int32_t total_shards = shard_tests == HONOR_SHARDING_PROTOCOL
? Int32FromEnvOrDie(kTestTotalShards, -1)
: -1;
const int32_t shard_index = shard_tests == HONOR_SHARDING_PROTOCOL
? Int32FromEnvOrDie(kTestShardIndex, -1)
: -1;
const PositiveAndNegativeUnitTestFilter gtest_flag_filter(
GTEST_FLAG_GET(filter));
const UnitTestFilter disable_test_filter(kDisableTestFilter);
// num_runnable_tests are the number of tests that will
// run across all shards (i.e., match filter and are not disabled).
// num_selected_tests are the number of tests to be run on
// this shard.
int num_runnable_tests = 0;
int num_selected_tests = 0;
for (auto* test_suite : test_suites_) {
const std::string& test_suite_name = test_suite->name_;
test_suite->set_should_run(false);
for (TestInfo* test_info : test_suite->test_info_list()) {
const std::string& test_name = test_info->name_;
// A test is disabled if test suite name or test name matches
// kDisableTestFilter.
const bool is_disabled =
disable_test_filter.MatchesName(test_suite_name) ||
disable_test_filter.MatchesName(test_name);
test_info->is_disabled_ = is_disabled;
const bool matches_filter =
gtest_flag_filter.MatchesTest(test_suite_name, test_name);
test_info->matches_filter_ = matches_filter;
const bool is_runnable =
(GTEST_FLAG_GET(also_run_disabled_tests) || !is_disabled) &&
matches_filter;
const bool is_in_another_shard =
shard_tests != IGNORE_SHARDING_PROTOCOL &&
!ShouldRunTestOnShard(total_shards, shard_index, num_runnable_tests);
test_info->is_in_another_shard_ = is_in_another_shard;
const bool is_selected = is_runnable && !is_in_another_shard;
num_runnable_tests += is_runnable;
num_selected_tests += is_selected;
test_info->should_run_ = is_selected;
test_suite->set_should_run(test_suite->should_run() || is_selected);
}
}
return num_selected_tests;
}
|
O0
|
cpp
|
testing::internal::UnitTestImpl::FilterTests(testing::internal::UnitTestImpl::ReactionToSharding):
subq $0x1d8, %rsp # imm = 0x1D8
movq %rdi, 0x1d0(%rsp)
movl %esi, 0x1cc(%rsp)
movq 0x1d0(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpl $0x0, 0x1cc(%rsp)
jne 0xdb054
leaq 0x3660c(%rip), %rdi # 0x111650
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0xc8c90
movl %eax, 0x2c(%rsp)
jmp 0xdb05f
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, 0x2c(%rsp)
jmp 0xdb05f
movl 0x2c(%rsp), %eax
movl %eax, 0x1c8(%rsp)
cmpl $0x0, 0x1cc(%rsp)
jne 0xdb08b
leaq 0x365f5(%rip), %rdi # 0x111670
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0xc8c90
movl %eax, 0x28(%rsp)
jmp 0xdb096
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, 0x28(%rsp)
jmp 0xdb096
movl 0x28(%rsp), %eax
movl %eax, 0x1c4(%rsp)
leaq 0x9dad0(%rip), %rsi # 0x178b78
leaq 0x120(%rsp), %rdi
callq 0xbef30
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x14c90
movq 0x20(%rsp), %rdx
leaq 0x365fd(%rip), %rsi # 0x1116d0
leaq 0xb0(%rsp), %rdi
callq 0x1a6a0
jmp 0xdb0e2
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0xbeac0
jmp 0xdb0f9
leaq 0xb0(%rsp), %rdi
callq 0x1aac0
leaq 0xaf(%rsp), %rdi
callq 0x14750
movq 0x30(%rsp), %rax
movl $0x0, 0x98(%rsp)
movl $0x0, 0x94(%rsp)
addq $0xb8, %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
callq 0xeaf30
movq %rax, 0x80(%rsp)
movq 0x88(%rsp), %rdi
callq 0xeb650
movq %rax, 0x78(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xeb680
xorb $-0x1, %al
testb $0x1, %al
jne 0xdb180
jmp 0xdb470
leaq 0x80(%rsp), %rdi
callq 0xeb6c0
movq (%rax), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rdi
xorl %esi, %esi
callq 0xeb6d0
jmp 0xdb1b1
movq 0x70(%rsp), %rdi
callq 0xeb6f0
movq %rax, 0x18(%rsp)
jmp 0xdb1c2
movq 0x18(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
callq 0xe8ae0
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
callq 0xe8b10
movq %rax, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xeb700
xorb $-0x1, %al
testb $0x1, %al
jne 0xdb204
jmp 0xdb45c
leaq 0x58(%rsp), %rdi
callq 0xeb740
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x40(%rsp)
movq 0x68(%rsp), %rsi
leaq 0xd0(%rsp), %rdi
callq 0xbedc0
movb %al, 0x17(%rsp)
jmp 0xdb23c
movb 0x17(%rsp), %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0x16(%rsp)
jne 0xdb26f
jmp 0xdb24d
movq 0x40(%rsp), %rsi
leaq 0xd0(%rsp), %rdi
callq 0xbedc0
movb %al, 0x15(%rsp)
jmp 0xdb265
movb 0x15(%rsp), %al
movb %al, 0x16(%rsp)
jmp 0xdb26f
movb 0x16(%rsp), %al
andb $0x1, %al
movb %al, 0x3f(%rsp)
movb 0x3f(%rsp), %cl
movq 0x48(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x81(%rax)
movq 0x68(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x120(%rsp), %rdi
callq 0xbf2f0
movb %al, 0x14(%rsp)
jmp 0xdb2a8
movb 0x14(%rsp), %al
andb $0x1, %al
movb %al, 0x3e(%rsp)
movb 0x3e(%rsp), %cl
movq 0x48(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x82(%rax)
leaq 0x9d888(%rip), %rax # 0x178b53
testb $0x1, (%rax)
jne 0xdb2dd
xorl %eax, %eax
testb $0x1, 0x3f(%rsp)
movb %al, 0x13(%rsp)
jne 0xdb2e5
movb 0x3e(%rsp), %al
movb %al, 0x13(%rsp)
movb 0x13(%rsp), %al
andb $0x1, %al
movb %al, 0x3d(%rsp)
xorl %eax, %eax
cmpl $0x1, 0x1cc(%rsp)
movb %al, 0x12(%rsp)
je 0xdb31f
movl 0x1c8(%rsp), %edi
movl 0x1c4(%rsp), %esi
movl 0x98(%rsp), %edx
callq 0xdbcb0
xorb $-0x1, %al
movb %al, 0x12(%rsp)
movb 0x12(%rsp), %al
andb $0x1, %al
movb %al, 0x3c(%rsp)
movb 0x3c(%rsp), %cl
movq 0x48(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x83(%rax)
xorl %eax, %eax
testb $0x1, 0x3d(%rsp)
movb %al, 0x11(%rsp)
je 0xdb352
movb 0x3c(%rsp), %al
xorb $-0x1, %al
movb %al, 0x11(%rsp)
movb 0x11(%rsp), %al
andb $0x1, %al
movb %al, 0x3b(%rsp)
movzbl 0x3d(%rsp), %ecx
andl $0x1, %ecx
movl 0x98(%rsp), %eax
addl %ecx, %eax
movl %eax, 0x98(%rsp)
movzbl 0x3b(%rsp), %ecx
andl $0x1, %ecx
movl 0x94(%rsp), %eax
addl %ecx, %eax
movl %eax, 0x94(%rsp)
movb 0x3b(%rsp), %cl
movq 0x48(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x80(%rax)
movq 0x70(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xe90c0
movb %al, 0x10(%rsp)
jmp 0xdb3b3
movb 0x10(%rsp), %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0x7(%rsp)
jne 0xdb3cc
jmp 0xdb3c4
movb 0x3b(%rsp), %al
movb %al, 0x7(%rsp)
movq 0x8(%rsp), %rdi
movb 0x7(%rsp), %al
movzbl %al, %esi
andl $0x1, %esi
callq 0xeb6d0
jmp 0xdb3e2
jmp 0xdb3e4
leaq 0x58(%rsp), %rdi
callq 0xeb750
jmp 0xdb1ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0xdb42a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x1aac0
leaq 0xaf(%rsp), %rdi
callq 0x14750
jmp 0xdb49f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0xbee70
jmp 0xdb49f
jmp 0xdb45e
leaq 0x80(%rsp), %rdi
callq 0xeb770
jmp 0xdb163
movl 0x94(%rsp), %eax
movl %eax, (%rsp)
leaq 0xd0(%rsp), %rdi
callq 0xbee70
leaq 0x120(%rsp), %rdi
callq 0xbf3c0
movl (%rsp), %eax
addq $0x1d8, %rsp # imm = 0x1D8
retq
leaq 0x120(%rsp), %rdi
callq 0xbf3c0
movq 0xa0(%rsp), %rdi
callq 0x14c80
nopl (%rax)
|
_ZN7testing8internal12UnitTestImpl11FilterTestsENS1_18ReactionToShardingE:
sub rsp, 1D8h
mov qword ptr [rsp+1D8h+var_8], rdi
mov dword ptr [rsp+1D8h+var_10+4], esi
mov rax, qword ptr [rsp+1D8h+var_8]
mov qword ptr [rsp+1D8h+var_1A8], rax; int
cmp dword ptr [rsp+1D8h+var_10+4], 0
jnz short loc_DB054
lea rdi, _ZN7testingL16kTestTotalShardsE; "GTEST_TOTAL_SHARDS"
mov esi, 0FFFFFFFFh; char *
call _ZN7testing8internal17Int32FromEnvOrDieEPKci; testing::internal::Int32FromEnvOrDie(char const*,int)
mov dword ptr [rsp+1D8h+var_1AC], eax
jmp short loc_DB05F
loc_DB054:
mov eax, 0FFFFFFFFh
mov dword ptr [rsp+1D8h+var_1AC], eax
jmp short $+2
loc_DB05F:
mov eax, dword ptr [rsp+1D8h+var_1AC]
mov dword ptr [rsp+1D8h+var_10], eax; char
cmp dword ptr [rsp+1D8h+var_10+4], 0
jnz short loc_DB08B
lea rdi, _ZN7testingL15kTestShardIndexE; "GTEST_SHARD_INDEX"
mov esi, 0FFFFFFFFh; char *
call _ZN7testing8internal17Int32FromEnvOrDieEPKci; testing::internal::Int32FromEnvOrDie(char const*,int)
mov [rsp+1D8h+var_1B0], eax; int
jmp short loc_DB096
loc_DB08B:
mov eax, 0FFFFFFFFh
mov [rsp+1D8h+var_1B0], eax
jmp short $+2
loc_DB096:
mov eax, [rsp+1D8h+var_1B0]
mov [rsp+1D8h+var_14], eax
lea rsi, _ZN7testing18FLAGS_gtest_filterB5cxx11E; int
lea rdi, [rsp+1D8h+var_B8]; int
call _ZN7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter(std::string const&)
lea rdi, [rsp+1D8h+var_129]
mov qword ptr [rsp+1D8h+var_1B8], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+1D8h+var_1B8]
lea rsi, _ZN7testingL18kDisableTestFilterE; "DISABLED_*:*/DISABLED_*"
lea rdi, [rsp+1D8h+var_129+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_DB0E2:
lea rdi, [rsp+1D8h+var_108]; int
lea rsi, [rsp+1D8h+var_129+1]; int
call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter(std::string const&)
jmp short $+2
loc_DB0F9:
lea rdi, [rsp+1D8h+var_129+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+1D8h+var_129]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, qword ptr [rsp+1D8h+var_1A8]
mov [rsp+1D8h+var_140], 0
mov [rsp+1D8h+var_144], 0
add rax, 0B8h
mov [rsp+1D8h+var_150], rax
mov rdi, [rsp+1D8h+var_150]
call _ZNSt6vectorIPN7testing9TestSuiteESaIS2_EE5beginEv; std::vector<testing::TestSuite *>::begin(void)
mov [rsp+1D8h+var_158], rax
mov rdi, [rsp+1D8h+var_150]
call _ZNSt6vectorIPN7testing9TestSuiteESaIS2_EE3endEv; std::vector<testing::TestSuite *>::end(void)
mov [rsp+1D8h+var_160], rax
loc_DB163:
lea rdi, [rsp+1D8h+var_158]
lea rsi, [rsp+1D8h+var_160]
call _ZN9__gnu_cxxeqIPPN7testing9TestSuiteESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_DB180
jmp loc_DB470
loc_DB180:
lea rdi, [rsp+1D8h+var_158]
call _ZNK9__gnu_cxx17__normal_iteratorIPPN7testing9TestSuiteESt6vectorIS3_SaIS3_EEEdeEv; __gnu_cxx::__normal_iterator<testing::TestSuite **,std::vector<testing::TestSuite *>>::operator*(void)
mov rax, [rax]
mov [rsp+1D8h+var_168], rax
mov rax, [rsp+1D8h+var_168]
add rax, 8
mov [rsp+1D8h+var_170], rax
mov rdi, [rsp+1D8h+var_168]; this
xor esi, esi; bool
call _ZN7testing9TestSuite14set_should_runEb; testing::TestSuite::set_should_run(bool)
jmp short $+2
loc_DB1B1:
mov rdi, [rsp+1D8h+var_168]; this
call _ZN7testing9TestSuite14test_info_listEv; testing::TestSuite::test_info_list(void)
mov [rsp+1D8h+var_1C0], rax
jmp short $+2
loc_DB1C2:
mov rax, [rsp+1D8h+var_1C0]
mov [rsp+1D8h+var_178], rax
mov rdi, [rsp+1D8h+var_178]
call _ZNSt6vectorIPN7testing8TestInfoESaIS2_EE5beginEv; std::vector<testing::TestInfo *>::begin(void)
mov [rsp+1D8h+var_180], rax
mov rdi, [rsp+1D8h+var_178]
call _ZNSt6vectorIPN7testing8TestInfoESaIS2_EE3endEv; std::vector<testing::TestInfo *>::end(void)
mov [rsp+1D8h+var_188], rax
loc_DB1EA:
lea rdi, [rsp+1D8h+var_180]
lea rsi, [rsp+1D8h+var_188]
call _ZN9__gnu_cxxeqIPPN7testing8TestInfoESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_DB204
jmp loc_DB45C
loc_DB204:
lea rdi, [rsp+1D8h+var_180]
call _ZNK9__gnu_cxx17__normal_iteratorIPPN7testing8TestInfoESt6vectorIS3_SaIS3_EEEdeEv; __gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>::operator*(void)
mov rax, [rax]
mov [rsp+1D8h+var_190], rax
mov rax, [rsp+1D8h+var_190]
add rax, 20h ; ' '
mov [rsp+1D8h+var_198], rax
mov rsi, [rsp+1D8h+var_170]
lea rdi, [rsp+1D8h+var_108]
call _ZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)
mov [rsp+1D8h+var_1C1], al
jmp short $+2
loc_DB23C:
mov cl, [rsp+1D8h+var_1C1]
mov al, 1
test cl, 1
mov [rsp+1D8h+var_1C2], al
jnz short loc_DB26F
jmp short $+2
loc_DB24D:
mov rsi, [rsp+1D8h+var_198]
lea rdi, [rsp+1D8h+var_108]
call _ZNK7testing8internal12_GLOBAL__N_114UnitTestFilter11MatchesNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName(std::string const&)
mov [rsp+1D8h+var_1C3], al
jmp short $+2
loc_DB265:
mov al, [rsp+1D8h+var_1C3]
mov [rsp+1D8h+var_1C2], al
jmp short $+2
loc_DB26F:
mov al, [rsp+1D8h+var_1C2]
and al, 1
mov [rsp+1D8h+var_199], al
mov cl, [rsp+1D8h+var_199]
mov rax, [rsp+1D8h+var_190]
and cl, 1
mov [rax+81h], cl
mov rsi, [rsp+1D8h+var_170]
mov rdx, [rsp+1D8h+var_198]
lea rdi, [rsp+1D8h+var_B8]
call _ZNK7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilter11MatchesTestERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_; testing::internal::`anonymous namespace'::PositiveAndNegativeUnitTestFilter::MatchesTest(std::string const&,std::string const&)
mov [rsp+1D8h+var_1C4], al
jmp short $+2
loc_DB2A8:
mov al, [rsp+1D8h+var_1C4]
and al, 1
mov [rsp+1D8h+var_19A], al
mov cl, [rsp+1D8h+var_19A]
mov rax, [rsp+1D8h+var_190]
and cl, 1; int
mov [rax+82h], cl
lea rax, _ZN7testing35FLAGS_gtest_also_run_disabled_testsE; testing::FLAGS_gtest_also_run_disabled_tests
test byte ptr [rax], 1
jnz short loc_DB2DD
xor eax, eax
test [rsp+1D8h+var_199], 1
mov [rsp+1D8h+var_1C5], al
jnz short loc_DB2E5
loc_DB2DD:
mov al, [rsp+1D8h+var_19A]
mov [rsp+1D8h+var_1C5], al
loc_DB2E5:
mov al, [rsp+1D8h+var_1C5]
and al, 1
mov [rsp+1D8h+var_19B], al
xor eax, eax
cmp dword ptr [rsp+1D8h+var_10+4], 1
mov [rsp+1D8h+var_1C6], al
jz short loc_DB31F
mov edi, dword ptr [rsp+1D8h+var_10]; this
mov esi, [rsp+1D8h+var_14]; int
mov edx, [rsp+1D8h+var_140]; int
call _ZN7testing8internal20ShouldRunTestOnShardEiii; testing::internal::ShouldRunTestOnShard(int,int,int)
xor al, 0FFh
mov [rsp+1D8h+var_1C6], al
loc_DB31F:
mov al, [rsp+1D8h+var_1C6]
and al, 1
mov [rsp+1D8h+var_19C], al
mov cl, [rsp+1D8h+var_19C]
mov rax, [rsp+1D8h+var_190]
and cl, 1
mov [rax+83h], cl
xor eax, eax
test [rsp+1D8h+var_19B], 1
mov [rsp+1D8h+var_1C7], al
jz short loc_DB352
mov al, [rsp+1D8h+var_19C]
xor al, 0FFh
mov [rsp+1D8h+var_1C7], al
loc_DB352:
mov al, [rsp+1D8h+var_1C7]
and al, 1
mov [rsp+1D8h+var_19D], al
movzx ecx, [rsp+1D8h+var_19B]
and ecx, 1
mov eax, [rsp+1D8h+var_140]
add eax, ecx
mov [rsp+1D8h+var_140], eax
movzx ecx, [rsp+1D8h+var_19D]
and ecx, 1
mov eax, [rsp+1D8h+var_144]
add eax, ecx
mov [rsp+1D8h+var_144], eax
mov cl, [rsp+1D8h+var_19D]
mov rax, [rsp+1D8h+var_190]
and cl, 1
mov [rax+80h], cl
mov rdi, [rsp+1D8h+var_168]; this
mov [rsp+1D8h+var_1D0], rdi
call _ZNK7testing9TestSuite10should_runEv; testing::TestSuite::should_run(void)
mov [rsp+1D8h+var_1C8], al
jmp short $+2
loc_DB3B3:
mov cl, [rsp+1D8h+var_1C8]
mov al, 1
test cl, 1
mov [rsp+1D8h+var_1D1], al
jnz short loc_DB3CC
jmp short $+2
loc_DB3C4:
mov al, [rsp+1D8h+var_19D]
mov [rsp+1D8h+var_1D1], al
loc_DB3CC:
mov rdi, [rsp+1D8h+var_1D0]; this
mov al, [rsp+1D8h+var_1D1]
movzx esi, al
and esi, 1; bool
call _ZN7testing9TestSuite14set_should_runEb; testing::TestSuite::set_should_run(bool)
jmp short $+2
loc_DB3E2:
jmp short $+2
loc_DB3E4:
lea rdi, [rsp+1D8h+var_180]
call _ZN9__gnu_cxx17__normal_iteratorIPPN7testing8TestInfoESt6vectorIS3_SaIS3_EEEppEv; __gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>::operator++(void)
jmp loc_DB1EA
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
jmp short loc_DB42A
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
lea rdi, [rsp+arg_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_DB42A:
lea rdi, [rsp+arg_A7]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_DB49F
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
lea rdi, [rsp+arg_C8]; this
call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterD2Ev; testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter()
jmp short loc_DB49F
loc_DB45C:
jmp short $+2
loc_DB45E:
lea rdi, [rsp+1D8h+var_158]
call _ZN9__gnu_cxx17__normal_iteratorIPPN7testing9TestSuiteESt6vectorIS3_SaIS3_EEEppEv; __gnu_cxx::__normal_iterator<testing::TestSuite **,std::vector<testing::TestSuite *>>::operator++(void)
jmp loc_DB163
loc_DB470:
mov eax, [rsp+1D8h+var_144]
mov [rsp+1D8h+var_1D8], eax
lea rdi, [rsp+1D8h+var_108]; this
call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterD2Ev; testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter()
lea rdi, [rsp+1D8h+var_B8]; this
call _ZN7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilterD2Ev; testing::internal::`anonymous namespace'::PositiveAndNegativeUnitTestFilter::~PositiveAndNegativeUnitTestFilter()
mov eax, [rsp+1D8h+var_1D8]
add rsp, 1D8h
retn
loc_DB49F:
lea rdi, [rsp+arg_118]; this
call _ZN7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilterD2Ev; testing::internal::`anonymous namespace'::PositiveAndNegativeUnitTestFilter::~PositiveAndNegativeUnitTestFilter()
mov rdi, [rsp+arg_98]
call __Unwind_Resume
|
long long testing::internal::UnitTestImpl::FilterTests(long long a1, int a2)
{
long long v2; // rdx
int v3; // ecx
unsigned int v5; // [rsp+0h] [rbp-1D8h]
char v6; // [rsp+7h] [rbp-1D1h]
testing::TestSuite *v7; // [rsp+8h] [rbp-1D0h]
char v8; // [rsp+11h] [rbp-1C7h]
char v9; // [rsp+12h] [rbp-1C6h]
char v10; // [rsp+13h] [rbp-1C5h]
char v11; // [rsp+16h] [rbp-1C2h]
int v12; // [rsp+28h] [rbp-1B0h]
int v13; // [rsp+2Ch] [rbp-1ACh]
char v14; // [rsp+3Eh] [rbp-19Ah]
long long v15; // [rsp+40h] [rbp-198h]
_BYTE *v16; // [rsp+48h] [rbp-190h]
long long v17; // [rsp+50h] [rbp-188h] BYREF
long long v18; // [rsp+58h] [rbp-180h] BYREF
long long v19; // [rsp+60h] [rbp-178h]
long long v20; // [rsp+68h] [rbp-170h]
testing::TestSuite *v21; // [rsp+70h] [rbp-168h]
long long v22; // [rsp+78h] [rbp-160h] BYREF
_QWORD v23[2]; // [rsp+80h] [rbp-158h] BYREF
unsigned int v24; // [rsp+94h] [rbp-144h]
int v25; // [rsp+98h] [rbp-140h]
char v26; // [rsp+AFh] [rbp-129h] BYREF
char v27[32]; // [rsp+B0h] [rbp-128h] BYREF
int v28[20]; // [rsp+D0h] [rbp-108h] BYREF
int v29[41]; // [rsp+120h] [rbp-B8h] BYREF
int v30; // [rsp+1C4h] [rbp-14h]
unsigned int v31; // [rsp+1C8h] [rbp-10h]
int v32; // [rsp+1CCh] [rbp-Ch]
int v33[2]; // [rsp+1D0h] [rbp-8h]
*(_QWORD *)v33 = a1;
v32 = a2;
if ( a2 )
v13 = -1;
else
v13 = testing::internal::Int32FromEnvOrDie((testing::internal *)"GTEST_TOTAL_SHARDS", (const char *)0xFFFFFFFFLL);
v31 = v13;
if ( v32 )
v12 = -1;
else
v12 = testing::internal::Int32FromEnvOrDie((testing::internal *)"GTEST_SHARD_INDEX", (const char *)0xFFFFFFFFLL);
v30 = v12;
testing::internal::`anonymous namespace'::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter(
(long long)v29,
(long long)&testing::FLAGS_gtest_filter[abi:cxx11]);
std::allocator<char>::allocator(&v26, &testing::FLAGS_gtest_filter[abi:cxx11], v2);
std::string::basic_string<std::allocator<char>>((long long)v27, (long long)"DISABLED_*:*/DISABLED_*", (long long)&v26);
testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter((long long)v28, (long long)v27);
std::string::~string(v27);
std::allocator<char>::~allocator(&v26, v27);
v25 = 0;
v24 = 0;
v23[1] = a1 + 184;
v23[0] = std::vector<testing::TestSuite *>::begin(a1 + 184);
v22 = std::vector<testing::TestSuite *>::end(a1 + 184);
while ( (__gnu_cxx::operator==<testing::TestSuite **,std::vector<testing::TestSuite *>>(v23, &v22) & 1) == 0 )
{
v21 = *(testing::TestSuite **)__gnu_cxx::__normal_iterator<testing::TestSuite **,std::vector<testing::TestSuite *>>::operator*(v23);
v20 = (long long)v21 + 8;
testing::TestSuite::set_should_run(v21, 0);
v19 = testing::TestSuite::test_info_list(v21);
v18 = std::vector<testing::TestInfo *>::begin(v19);
v17 = std::vector<testing::TestInfo *>::end(v19);
while ( (__gnu_cxx::operator==<testing::TestInfo **,std::vector<testing::TestInfo *>>(&v18, &v17) & 1) == 0 )
{
v16 = *(_BYTE **)__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>::operator*(&v18);
v15 = (long long)(v16 + 32);
v11 = 1;
if ( (testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName((long long)v28, v20) & 1) == 0 )
v11 = testing::internal::`anonymous namespace'::UnitTestFilter::MatchesName((long long)v28, v15);
v16[129] = v11 & 1;
v14 = testing::internal::`anonymous namespace'::PositiveAndNegativeUnitTestFilter::MatchesTest(
(long long)v29,
v20,
v15) & 1;
LOBYTE(v3) = v14;
v16[130] = v14;
if ( (testing::FLAGS_gtest_also_run_disabled_tests & 1) != 0 || (v10 = 0, (v11 & 1) == 0) )
v10 = v14;
v9 = 0;
if ( v32 != 1 )
v9 = ~(unsigned __int8)testing::internal::ShouldRunTestOnShard((testing::internal *)v31, v30, v25, v3);
v16[131] = v9 & 1;
v8 = 0;
if ( (v10 & 1) != 0 )
v8 = ~(v9 & 1);
v25 += v10 & 1;
v24 += v8 & 1;
v16[128] = v8 & 1;
v7 = v21;
v6 = 1;
if ( (testing::TestSuite::should_run(v21) & 1) == 0 )
v6 = v8 & 1;
testing::TestSuite::set_should_run(v7, v6 & 1);
__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>::operator++(&v18);
}
__gnu_cxx::__normal_iterator<testing::TestSuite **,std::vector<testing::TestSuite *>>::operator++(v23);
}
v5 = v24;
testing::internal::`anonymous namespace'::UnitTestFilter::~UnitTestFilter((testing::internal::_anonymous_namespace_::UnitTestFilter *)v28);
testing::internal::`anonymous namespace'::PositiveAndNegativeUnitTestFilter::~PositiveAndNegativeUnitTestFilter((testing::internal::_anonymous_namespace_::PositiveAndNegativeUnitTestFilter *)v29);
return v5;
}
|
FilterTests:
SUB RSP,0x1d8
MOV qword ptr [RSP + 0x1d0],RDI
MOV dword ptr [RSP + 0x1cc],ESI
MOV RAX,qword ptr [RSP + 0x1d0]
MOV qword ptr [RSP + 0x30],RAX
CMP dword ptr [RSP + 0x1cc],0x0
JNZ 0x001db054
LEA RDI,[0x211650]
MOV ESI,0xffffffff
CALL 0x001c8c90
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x001db05f
LAB_001db054:
MOV EAX,0xffffffff
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x001db05f
LAB_001db05f:
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x1c8],EAX
CMP dword ptr [RSP + 0x1cc],0x0
JNZ 0x001db08b
LEA RDI,[0x211670]
MOV ESI,0xffffffff
CALL 0x001c8c90
MOV dword ptr [RSP + 0x28],EAX
JMP 0x001db096
LAB_001db08b:
MOV EAX,0xffffffff
MOV dword ptr [RSP + 0x28],EAX
JMP 0x001db096
LAB_001db096:
MOV EAX,dword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x1c4],EAX
LEA RSI,[0x278b78]
LEA RDI,[RSP + 0x120]
CALL 0x001bef30
LEA RDI,[RSP + 0xaf]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x00114c90
MOV RDX,qword ptr [RSP + 0x20]
LAB_001db0cc:
LEA RSI,[0x2116d0]
LEA RDI,[RSP + 0xb0]
CALL 0x0011a6a0
JMP 0x001db0e2
LAB_001db0e2:
LEA RDI,[RSP + 0xd0]
LEA RSI,[RSP + 0xb0]
CALL 0x001beac0
JMP 0x001db0f9
LAB_001db0f9:
LEA RDI,[RSP + 0xb0]
CALL 0x0011aac0
LEA RDI,[RSP + 0xaf]
CALL 0x00114750
MOV RAX,qword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x98],0x0
MOV dword ptr [RSP + 0x94],0x0
ADD RAX,0xb8
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x001eaf30
MOV qword ptr [RSP + 0x80],RAX
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x001eb650
MOV qword ptr [RSP + 0x78],RAX
LAB_001db163:
LEA RDI,[RSP + 0x80]
LEA RSI,[RSP + 0x78]
CALL 0x001eb680
XOR AL,0xff
TEST AL,0x1
JNZ 0x001db180
JMP 0x001db470
LAB_001db180:
LEA RDI,[RSP + 0x80]
CALL 0x001eb6c0
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x70]
ADD RAX,0x8
MOV qword ptr [RSP + 0x68],RAX
MOV RDI,qword ptr [RSP + 0x70]
LAB_001db1a8:
XOR ESI,ESI
CALL 0x001eb6d0
JMP 0x001db1b1
LAB_001db1b1:
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x001eb6f0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001db1c2
LAB_001db1c2:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x001e8ae0
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x001e8b10
MOV qword ptr [RSP + 0x50],RAX
LAB_001db1ea:
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x50]
CALL 0x001eb700
XOR AL,0xff
TEST AL,0x1
JNZ 0x001db204
JMP 0x001db45c
LAB_001db204:
LEA RDI,[RSP + 0x58]
CALL 0x001eb740
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x48]
ADD RAX,0x20
MOV qword ptr [RSP + 0x40],RAX
MOV RSI,qword ptr [RSP + 0x68]
LEA RDI,[RSP + 0xd0]
CALL 0x001bedc0
MOV byte ptr [RSP + 0x17],AL
JMP 0x001db23c
LAB_001db23c:
MOV CL,byte ptr [RSP + 0x17]
MOV AL,0x1
TEST CL,0x1
MOV byte ptr [RSP + 0x16],AL
JNZ 0x001db26f
JMP 0x001db24d
LAB_001db24d:
MOV RSI,qword ptr [RSP + 0x40]
LEA RDI,[RSP + 0xd0]
CALL 0x001bedc0
MOV byte ptr [RSP + 0x15],AL
JMP 0x001db265
LAB_001db265:
MOV AL,byte ptr [RSP + 0x15]
MOV byte ptr [RSP + 0x16],AL
JMP 0x001db26f
LAB_001db26f:
MOV AL,byte ptr [RSP + 0x16]
AND AL,0x1
MOV byte ptr [RSP + 0x3f],AL
MOV CL,byte ptr [RSP + 0x3f]
MOV RAX,qword ptr [RSP + 0x48]
AND CL,0x1
MOV byte ptr [RAX + 0x81],CL
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x40]
LEA RDI,[RSP + 0x120]
CALL 0x001bf2f0
MOV byte ptr [RSP + 0x14],AL
JMP 0x001db2a8
LAB_001db2a8:
MOV AL,byte ptr [RSP + 0x14]
AND AL,0x1
MOV byte ptr [RSP + 0x3e],AL
MOV CL,byte ptr [RSP + 0x3e]
MOV RAX,qword ptr [RSP + 0x48]
AND CL,0x1
MOV byte ptr [RAX + 0x82],CL
LEA RAX,[0x278b53]
TEST byte ptr [RAX],0x1
JNZ 0x001db2dd
XOR EAX,EAX
TEST byte ptr [RSP + 0x3f],0x1
MOV byte ptr [RSP + 0x13],AL
JNZ 0x001db2e5
LAB_001db2dd:
MOV AL,byte ptr [RSP + 0x3e]
MOV byte ptr [RSP + 0x13],AL
LAB_001db2e5:
MOV AL,byte ptr [RSP + 0x13]
AND AL,0x1
MOV byte ptr [RSP + 0x3d],AL
XOR EAX,EAX
CMP dword ptr [RSP + 0x1cc],0x1
MOV byte ptr [RSP + 0x12],AL
JZ 0x001db31f
MOV EDI,dword ptr [RSP + 0x1c8]
MOV ESI,dword ptr [RSP + 0x1c4]
MOV EDX,dword ptr [RSP + 0x98]
CALL 0x001dbcb0
XOR AL,0xff
MOV byte ptr [RSP + 0x12],AL
LAB_001db31f:
MOV AL,byte ptr [RSP + 0x12]
AND AL,0x1
MOV byte ptr [RSP + 0x3c],AL
MOV CL,byte ptr [RSP + 0x3c]
MOV RAX,qword ptr [RSP + 0x48]
AND CL,0x1
MOV byte ptr [RAX + 0x83],CL
XOR EAX,EAX
TEST byte ptr [RSP + 0x3d],0x1
MOV byte ptr [RSP + 0x11],AL
JZ 0x001db352
MOV AL,byte ptr [RSP + 0x3c]
XOR AL,0xff
MOV byte ptr [RSP + 0x11],AL
LAB_001db352:
MOV AL,byte ptr [RSP + 0x11]
AND AL,0x1
MOV byte ptr [RSP + 0x3b],AL
MOVZX ECX,byte ptr [RSP + 0x3d]
AND ECX,0x1
MOV EAX,dword ptr [RSP + 0x98]
ADD EAX,ECX
MOV dword ptr [RSP + 0x98],EAX
MOVZX ECX,byte ptr [RSP + 0x3b]
AND ECX,0x1
MOV EAX,dword ptr [RSP + 0x94]
ADD EAX,ECX
MOV dword ptr [RSP + 0x94],EAX
MOV CL,byte ptr [RSP + 0x3b]
MOV RAX,qword ptr [RSP + 0x48]
AND CL,0x1
MOV byte ptr [RAX + 0x80],CL
MOV RDI,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001e90c0
MOV byte ptr [RSP + 0x10],AL
JMP 0x001db3b3
LAB_001db3b3:
MOV CL,byte ptr [RSP + 0x10]
MOV AL,0x1
TEST CL,0x1
MOV byte ptr [RSP + 0x7],AL
JNZ 0x001db3cc
JMP 0x001db3c4
LAB_001db3c4:
MOV AL,byte ptr [RSP + 0x3b]
MOV byte ptr [RSP + 0x7],AL
LAB_001db3cc:
MOV RDI,qword ptr [RSP + 0x8]
MOV AL,byte ptr [RSP + 0x7]
MOVZX ESI,AL
AND ESI,0x1
CALL 0x001eb6d0
LAB_001db3e0:
JMP 0x001db3e2
LAB_001db3e2:
JMP 0x001db3e4
LAB_001db3e4:
LEA RDI,[RSP + 0x58]
CALL 0x001eb750
JMP 0x001db1ea
LAB_001db45c:
JMP 0x001db45e
LAB_001db45e:
LEA RDI,[RSP + 0x80]
CALL 0x001eb770
JMP 0x001db163
LAB_001db470:
MOV EAX,dword ptr [RSP + 0x94]
MOV dword ptr [RSP],EAX
LEA RDI,[RSP + 0xd0]
CALL 0x001bee70
LEA RDI,[RSP + 0x120]
CALL 0x001bf3c0
MOV EAX,dword ptr [RSP]
ADD RSP,0x1d8
RET
|
/* testing::internal::UnitTestImpl::FilterTests(testing::internal::UnitTestImpl::ReactionToSharding)
*/
int __thiscall testing::internal::UnitTestImpl::FilterTests(UnitTestImpl *this,int param_2)
{
long lVar1;
TestSuite *this_00;
int iVar2;
byte bVar3;
bool bVar4;
int8 *puVar5;
long *plVar6;
bool local_1d1;
byte local_1c7;
byte local_1c6;
byte local_1c5;
byte local_1c2;
int local_1b0;
int local_1ac;
int8 local_188;
int8 local_180;
vector<testing::TestInfo*,std::allocator<testing::TestInfo*>> *local_178;
TestSuite *local_170;
TestSuite *local_168;
int8 local_160;
int8 local_158;
vector<testing::TestSuite*,std::allocator<testing::TestSuite*>> *local_150;
int local_144;
int local_140;
allocator local_129;
string local_128 [32];
UnitTestFilter local_108 [80];
PositiveAndNegativeUnitTestFilter local_b8 [164];
int local_14;
int local_10;
int local_c;
UnitTestImpl *local_8;
local_c = param_2;
local_8 = this;
if (param_2 == 0) {
local_1ac = Int32FromEnvOrDie("GTEST_TOTAL_SHARDS",-1);
}
else {
local_1ac = -1;
}
local_10 = local_1ac;
if (local_c == 0) {
local_1b0 = Int32FromEnvOrDie("GTEST_SHARD_INDEX",-1);
}
else {
local_1b0 = -1;
}
local_14 = local_1b0;
(anonymous_namespace)::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter
(local_b8,(string *)FLAGS_gtest_filter_abi_cxx11_);
std::allocator<char>::allocator();
/* try { // try from 001db0cc to 001db0df has its CatchHandler @ 001db3f3 */
std::__cxx11::string::string<std::allocator<char>>(local_128,"DISABLED_*:*/DISABLED_*",&local_129)
;
/* try { // try from 001db0e2 to 001db0f6 has its CatchHandler @ 001db409 */
(anonymous_namespace)::UnitTestFilter::UnitTestFilter(local_108,local_128);
std::__cxx11::string::~string(local_128);
std::allocator<char>::~allocator((allocator<char> *)&local_129);
local_140 = 0;
local_144 = 0;
local_150 = (vector<testing::TestSuite*,std::allocator<testing::TestSuite*>> *)(this + 0xb8);
local_158 = std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>::begin(local_150)
;
local_160 = std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>::end(local_150);
while( true ) {
bVar3 = _ZN9__gnu_cxxeqIPPN7testing9TestSuiteESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_158);
iVar2 = local_144;
if (((bVar3 ^ 0xff) & 1) == 0) break;
puVar5 = (int8 *)
__gnu_cxx::
__normal_iterator<testing::TestSuite**,std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>>
::operator*((__normal_iterator<testing::TestSuite**,std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>>
*)&local_158);
local_168 = (TestSuite *)*puVar5;
local_170 = local_168 + 8;
/* try { // try from 001db1a8 to 001db3df has its CatchHandler @ 001db439 */
TestSuite::set_should_run(local_168,false);
local_178 = (vector<testing::TestInfo*,std::allocator<testing::TestInfo*>> *)
TestSuite::test_info_list(local_168);
local_180 = std::vector<testing::TestInfo*,std::allocator<testing::TestInfo*>>::begin(local_178)
;
local_188 = std::vector<testing::TestInfo*,std::allocator<testing::TestInfo*>>::end(local_178);
while( true ) {
bVar3 = _ZN9__gnu_cxxeqIPPN7testing8TestInfoESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_180,&local_188);
if (((bVar3 ^ 0xff) & 1) == 0) break;
plVar6 = (long *)__gnu_cxx::
__normal_iterator<testing::TestInfo**,std::vector<testing::TestInfo*,std::allocator<testing::TestInfo*>>>
::operator*((__normal_iterator<testing::TestInfo**,std::vector<testing::TestInfo*,std::allocator<testing::TestInfo*>>>
*)&local_180);
lVar1 = *plVar6;
bVar3 = (anonymous_namespace)::UnitTestFilter::MatchesName(local_108,(string *)local_170);
local_1c2 = 1;
if ((bVar3 & 1) == 0) {
local_1c2 = (anonymous_namespace)::UnitTestFilter::MatchesName
(local_108,(string *)(lVar1 + 0x20));
}
*(byte *)(lVar1 + 0x81) = local_1c2 & 1;
bVar3 = (anonymous_namespace)::PositiveAndNegativeUnitTestFilter::MatchesTest
(local_b8,(string *)local_170,(string *)(lVar1 + 0x20));
*(byte *)(lVar1 + 0x82) = bVar3 & 1;
if (((FLAGS_gtest_also_run_disabled_tests & 1) != 0) || (local_1c5 = 0, (local_1c2 & 1) == 0))
{
local_1c5 = bVar3 & 1;
}
local_1c6 = 0;
if (local_c != 1) {
local_1c6 = ShouldRunTestOnShard(local_10,local_14,local_140);
local_1c6 = local_1c6 ^ 0xff;
}
this_00 = local_168;
*(byte *)(lVar1 + 0x83) = local_1c6 & 1;
local_1c7 = 0;
if (local_1c5 != 0) {
local_1c7 = local_1c6 & 1 ^ 0xff;
}
bVar4 = (bool)(local_1c7 & 1);
local_140 = local_140 + (uint)local_1c5;
local_144 = local_144 + (uint)bVar4;
*(bool *)(lVar1 + 0x80) = bVar4;
bVar3 = TestSuite::should_run(local_168);
local_1d1 = true;
if ((bVar3 & 1) == 0) {
local_1d1 = bVar4;
}
TestSuite::set_should_run(this_00,local_1d1);
__gnu_cxx::
__normal_iterator<testing::TestInfo**,std::vector<testing::TestInfo*,std::allocator<testing::TestInfo*>>>
::operator++((__normal_iterator<testing::TestInfo**,std::vector<testing::TestInfo*,std::allocator<testing::TestInfo*>>>
*)&local_180);
}
__gnu_cxx::
__normal_iterator<testing::TestSuite**,std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>>
::operator++((__normal_iterator<testing::TestSuite**,std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>>
*)&local_158);
}
(anonymous_namespace)::UnitTestFilter::~UnitTestFilter(local_108);
(anonymous_namespace)::PositiveAndNegativeUnitTestFilter::~PositiveAndNegativeUnitTestFilter
(local_b8);
return iVar2;
}
|
|
12,474
|
run_plugin_auth
|
eloqsql/libmariadb/plugins/auth/my_auth.c
|
int run_plugin_auth(MYSQL *mysql, char *data, uint data_len,
const char *data_plugin, const char *db)
{
const char *auth_plugin_name= NULL;
auth_plugin_t *auth_plugin;
MCPVIO_EXT mpvio;
ulong pkt_length;
int res;
/* determine the default/initial plugin to use */
if (mysql->server_capabilities & CLIENT_PLUGIN_AUTH)
{
if (mysql->options.extension && mysql->options.extension->default_auth)
auth_plugin_name= mysql->options.extension->default_auth;
else if (data_plugin)
auth_plugin_name= data_plugin;
}
if (!auth_plugin_name)
{
if (mysql->server_capabilities & CLIENT_PROTOCOL_41)
auth_plugin_name= native_password_plugin_name;
else
auth_plugin_name= "mysql_old_password";
}
if (!(auth_plugin= (auth_plugin_t*) mysql_client_find_plugin(mysql,
auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN)))
auth_plugin= &dummy_fallback_client_plugin;
mysql->net.last_errno= 0; /* just in case */
if (data_plugin && strcmp(data_plugin, auth_plugin_name))
{
/* data was prepared for a different plugin, so we don't
send any data */
data= 0;
data_len= 0;
}
mpvio.mysql_change_user= data_plugin == 0;
mpvio.cached_server_reply.pkt= (uchar*)data;
mpvio.cached_server_reply.pkt_len= data_len;
mpvio.read_packet= client_mpvio_read_packet;
mpvio.write_packet= client_mpvio_write_packet;
mpvio.info= client_mpvio_info;
mpvio.mysql= mysql;
mpvio.packets_read= mpvio.packets_written= 0;
mpvio.db= db;
retry:
mpvio.plugin= auth_plugin;
if (auth_plugin_name &&
mysql->options.extension &&
mysql->options.extension->restricted_auth)
{
if (!strstr(mysql->options.extension->restricted_auth, auth_plugin_name))
{
my_set_error(mysql, CR_PLUGIN_NOT_ALLOWED, SQLSTATE_UNKNOWN, 0, data_plugin);
return 1;
}
}
mysql->net.read_pos[0]= 0;
res= auth_plugin->authenticate_user((struct st_plugin_vio *)&mpvio, mysql);
if ((res == CR_ERROR && !mysql->net.buff) ||
(res > CR_OK && mysql->net.read_pos[0] != 254))
{
/*
the plugin returned an error. write it down in mysql,
unless the error code is CR_ERROR and mysql->net.last_errno
is already set (the plugin has done it)
*/
if (res > CR_ERROR)
my_set_error(mysql, res, SQLSTATE_UNKNOWN, 0);
else
if (!mysql->net.last_errno) {
my_set_error(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0);
}
return 1;
}
/* read the OK packet (or use the cached value in mysql->net.read_pos */
if (res == CR_OK)
pkt_length= ma_net_safe_read(mysql);
else /* res == CR_OK_HANDSHAKE_COMPLETE or an error */
pkt_length= mpvio.last_read_packet_len;
if (pkt_length == packet_error)
{
if (mysql->net.last_errno == CR_SERVER_LOST)
my_set_error(mysql, CR_SERVER_LOST, SQLSTATE_UNKNOWN,
ER(CR_SERVER_LOST_EXTENDED),
"reading authorization packet",
errno);
return 1;
}
if (mysql->net.read_pos[0] == 254)
{
/* The server asked to use a different authentication plugin */
if (pkt_length == 1)
{
/* old "use short scramble" packet */
auth_plugin_name= old_password_plugin_name;
mpvio.cached_server_reply.pkt= (uchar*)mysql->scramble_buff;
mpvio.cached_server_reply.pkt_len= SCRAMBLE_LENGTH + 1;
}
else
{
/* new "use different plugin" packet */
uint len;
auth_plugin_name= (char*)mysql->net.read_pos + 1;
len= (uint)strlen(auth_plugin_name); /* safe as ma_net_read always appends \0 */
mpvio.cached_server_reply.pkt_len= pkt_length - len - 2;
mpvio.cached_server_reply.pkt= mysql->net.read_pos + len + 2;
}
if (!(auth_plugin= (auth_plugin_t *) mysql_client_find_plugin(mysql,
auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN)))
auth_plugin= &dummy_fallback_client_plugin;
goto retry;
}
/*
net->read_pos[0] should always be 0 here if the server implements
the protocol correctly
*/
if (mysql->net.read_pos[0] == 0)
return ma_read_ok_packet(mysql, mysql->net.read_pos + 1, pkt_length);
return 1;
}
|
O0
|
c
|
run_plugin_auth:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x370(%rax), %rax
andq $0x80000, %rax # imm = 0x80000
cmpq $0x0, %rax
je 0x3fa85
movq -0x10(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x3fa72
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0x3fa72
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x3fa83
cmpq $0x0, -0x28(%rbp)
je 0x3fa81
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x3fa83
jmp 0x3fa85
cmpq $0x0, -0x38(%rbp)
jne 0x3fabd
movq -0x10(%rbp), %rax
movq 0x370(%rax), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
je 0x3fab0
leaq 0xc153(%rip), %rax # 0x4bbfd
movq %rax, -0x38(%rbp)
jmp 0x3fabb
leaq 0xc133(%rip), %rax # 0x4bbea
movq %rax, -0x38(%rbp)
jmp 0x3fabd
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x2, %edx
callq 0x36390
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x3fae4
leaq 0x1f3c8(%rip), %rax # 0x5eea8
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x90(%rax)
cmpq $0x0, -0x28(%rbp)
je 0x3fb1a
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x135f0
cmpl $0x0, %eax
je 0x3fb1a
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpq $0x0, -0x28(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x58(%rbp)
leaq 0x331(%rip), %rax # 0x3fe70
movq %rax, -0x90(%rbp)
leaq 0x463(%rip), %rax # 0x3ffb0
movq %rax, -0x88(%rbp)
leaq 0x5a5(%rip), %rax # 0x40100
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x3fc00
movq -0x10(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x3fc00
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x150(%rax)
je 0x3fc00
movq -0x10(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x150(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x13100
cmpq $0x0, %rax
jne 0x3fbfe
movq -0x10(%rbp), %rdi
leaq 0x20305(%rip), %rax # 0x5fee0
movq (%rax), %rdx
movq -0x28(%rbp), %r8
movl $0x1392, %esi # imm = 0x1392
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x16150
movl $0x1, -0x4(%rbp)
jmp 0x3fe5e
jmp 0x3fc00
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movb $0x0, (%rax)
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x10(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq *%rax
movl %eax, -0x9c(%rbp)
cmpl $0x0, -0x9c(%rbp)
jne 0x3fc3a
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3fc55
cmpl $-0x1, -0x9c(%rbp)
jle 0x3fcb8
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
je 0x3fcb8
cmpl $0x0, -0x9c(%rbp)
jle 0x3fc7f
movq -0x10(%rbp), %rdi
movl -0x9c(%rbp), %esi
leaq 0x20271(%rip), %rax # 0x5fee0
movq (%rax), %rdx
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x16150
jmp 0x3fcac
movq -0x10(%rbp), %rax
cmpl $0x0, 0x90(%rax)
jne 0x3fcaa
movq -0x10(%rbp), %rdi
leaq 0x20249(%rip), %rax # 0x5fee0
movq (%rax), %rdx
movl $0x7d0, %esi # imm = 0x7D0
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x16150
jmp 0x3fcac
movl $0x1, -0x4(%rbp)
jmp 0x3fe5e
cmpl $-0x1, -0x9c(%rbp)
jne 0x3fcd3
movq -0x10(%rbp), %rdi
callq 0x15e40
movq %rax, -0x98(%rbp)
jmp 0x3fcde
movslq -0x44(%rbp), %rax
movq %rax, -0x98(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, -0x98(%rbp)
jne 0x3fd69
movq -0x10(%rbp), %rax
cmpl $0x7dd, 0x90(%rax) # imm = 0x7DD
jne 0x3fd5d
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq 0x201d2(%rip), %rax # 0x5fee0
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
leaq 0x201d1(%rip), %rax # 0x5fef0
movq 0x1b8(%rax), %rax
movq %rax, -0xa8(%rbp)
callq 0x13050
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rdx
movq -0xa8(%rbp), %rcx
movl (%rax), %r9d
movl $0x7dd, %esi # imm = 0x7DD
leaq 0xc406(%rip), %r8 # 0x4c15c
movb $0x0, %al
callq 0x16150
movl $0x1, -0x4(%rbp)
jmp 0x3fe5e
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jne 0x3fe26
cmpq $0x1, -0x98(%rbp)
jne 0x3fdab
leaq 0xbe5a(%rip), %rax # 0x4bbea
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq $0x48e, %rax # imm = 0x48E
movq %rax, -0x60(%rbp)
movl $0x15, -0x58(%rbp)
jmp 0x3fdfa
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x131a0
movl %eax, -0xa0(%rbp)
movq -0x98(%rbp), %rax
movl -0xa0(%rbp), %ecx
subq %rcx, %rax
subq $0x2, %rax
movl %eax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0xa0(%rbp), %ecx
addq %rcx, %rax
addq $0x2, %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl $0x2, %edx
callq 0x36390
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x3fe21
leaq 0x1f08b(%rip), %rax # 0x5eea8
movq %rax, -0x40(%rbp)
jmp 0x3fb7d
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x3fe57
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
addq $0x1, %rsi
movq -0x98(%rbp), %rdx
callq 0x1e870
movl %eax, -0x4(%rbp)
jmp 0x3fe5e
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
run_plugin_auth:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], 0
mov rax, [rbp+var_10]
mov rax, [rax+370h]
and rax, 80000h
cmp rax, 0
jz short loc_3FA85
mov rax, [rbp+var_10]
cmp qword ptr [rax+480h], 0
jz short loc_3FA72
mov rax, [rbp+var_10]
mov rax, [rax+480h]
cmp qword ptr [rax+8], 0
jz short loc_3FA72
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rax, [rax+8]
mov [rbp+var_38], rax
jmp short loc_3FA83
loc_3FA72:
cmp [rbp+var_28], 0
jz short loc_3FA81
mov rax, [rbp+var_28]
mov [rbp+var_38], rax
loc_3FA81:
jmp short $+2
loc_3FA83:
jmp short $+2
loc_3FA85:
cmp [rbp+var_38], 0
jnz short loc_3FABD
mov rax, [rbp+var_10]
mov rax, [rax+370h]
and rax, 200h
cmp rax, 0
jz short loc_3FAB0
lea rax, aMysqlNativePas; "mysql_native_password"
mov [rbp+var_38], rax
jmp short loc_3FABB
loc_3FAB0:
lea rax, aMysqlOldPasswo; "mysql_old_password"
mov [rbp+var_38], rax
loc_3FABB:
jmp short $+2
loc_3FABD:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov edx, 2
call mysql_client_find_plugin
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_3FAE4
lea rax, dummy_fallback_client_plugin
mov [rbp+var_40], rax
loc_3FAE4:
mov rax, [rbp+var_10]
mov dword ptr [rax+90h], 0
cmp [rbp+var_28], 0
jz short loc_3FB1A
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_38]
call _strcmp
cmp eax, 0
jz short loc_3FB1A
mov [rbp+var_18], 0
mov [rbp+var_1C], 0
loc_3FB1A:
cmp [rbp+var_28], 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_48], al
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov eax, [rbp+var_1C]
mov [rbp+var_58], eax
lea rax, client_mpvio_read_packet
mov [rbp+var_90], rax
lea rax, client_mpvio_write_packet
mov [rbp+var_88], rax
lea rax, client_mpvio_info
mov [rbp+var_80], rax
mov rax, [rbp+var_10]
mov [rbp+var_78], rax
mov [rbp+var_4C], 0
mov [rbp+var_50], 0
mov rax, [rbp+var_30]
mov [rbp+var_68], rax
loc_3FB7D:
mov rax, [rbp+var_40]
mov [rbp+var_70], rax
cmp [rbp+var_38], 0
jz short loc_3FC00
mov rax, [rbp+var_10]
cmp qword ptr [rax+480h], 0
jz short loc_3FC00
mov rax, [rbp+var_10]
mov rax, [rax+480h]
cmp qword ptr [rax+150h], 0
jz short loc_3FC00
mov rax, [rbp+var_10]
mov rax, [rax+480h]
mov rdi, [rax+150h]
mov rsi, [rbp+var_38]
call _strstr
cmp rax, 0
jnz short loc_3FBFE
mov rdi, [rbp+var_10]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov r8, [rbp+var_28]
mov esi, 1392h
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
mov [rbp+var_4], 1
jmp loc_3FE5E
loc_3FBFE:
jmp short $+2
loc_3FC00:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov byte ptr [rax], 0
mov rax, [rbp+var_40]
mov rax, [rax+58h]
mov rsi, [rbp+var_10]
lea rdi, [rbp+var_90]
call rax
mov [rbp+var_9C], eax
cmp [rbp+var_9C], 0
jnz short loc_3FC3A
mov rax, [rbp+var_10]
cmp qword ptr [rax+8], 0
jz short loc_3FC55
loc_3FC3A:
cmp [rbp+var_9C], 0FFFFFFFFh
jle short loc_3FCB8
mov rax, [rbp+var_10]
mov rax, [rax+20h]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jz short loc_3FCB8
loc_3FC55:
cmp [rbp+var_9C], 0
jle short loc_3FC7F
mov rdi, [rbp+var_10]
mov esi, [rbp+var_9C]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
jmp short loc_3FCAC
loc_3FC7F:
mov rax, [rbp+var_10]
cmp dword ptr [rax+90h], 0
jnz short loc_3FCAA
mov rdi, [rbp+var_10]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7D0h
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
loc_3FCAA:
jmp short $+2
loc_3FCAC:
mov [rbp+var_4], 1
jmp loc_3FE5E
loc_3FCB8:
cmp [rbp+var_9C], 0FFFFFFFFh
jnz short loc_3FCD3
mov rdi, [rbp+var_10]
call ma_net_safe_read
mov [rbp+var_98], rax
jmp short loc_3FCDE
loc_3FCD3:
movsxd rax, [rbp+var_44]
mov [rbp+var_98], rax
loc_3FCDE:
mov eax, 0FFFFFFFFh
cmp [rbp+var_98], rax
jnz short loc_3FD69
mov rax, [rbp+var_10]
cmp dword ptr [rax+90h], 7DDh
jnz short loc_3FD5D
mov rax, [rbp+var_10]
mov [rbp+var_B8], rax
lea rax, SQLSTATE_UNKNOWN
mov rax, [rax]
mov [rbp+var_B0], rax
lea rax, client_errors
mov rax, [rax+1B8h]
mov [rbp+var_A8], rax
call ___errno_location
mov rdi, [rbp+var_B8]
mov rdx, [rbp+var_B0]
mov rcx, [rbp+var_A8]
mov r9d, [rax]
mov esi, 7DDh
lea r8, aReadingAuthori; "reading authorization packet"
mov al, 0
call my_set_error
loc_3FD5D:
mov [rbp+var_4], 1
jmp loc_3FE5E
loc_3FD69:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jnz loc_3FE26
cmp [rbp+var_98], 1
jnz short loc_3FDAB
lea rax, aMysqlOldPasswo; "mysql_old_password"
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
add rax, 48Eh
mov [rbp+var_60], rax
mov [rbp+var_58], 15h
jmp short loc_3FDFA
loc_3FDAB:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
add rax, 1
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
call _strlen
mov [rbp+var_A0], eax
mov rax, [rbp+var_98]
mov ecx, [rbp+var_A0]
sub rax, rcx
sub rax, 2
mov [rbp+var_58], eax
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov ecx, [rbp+var_A0]
add rax, rcx
add rax, 2
mov [rbp+var_60], rax
loc_3FDFA:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov edx, 2
call mysql_client_find_plugin
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_3FE21
lea rax, dummy_fallback_client_plugin
mov [rbp+var_40], rax
loc_3FE21:
jmp loc_3FB7D
loc_3FE26:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
movzx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_3FE57
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax+20h]
add rsi, 1
mov rdx, [rbp+var_98]
call ma_read_ok_packet
mov [rbp+var_4], eax
jmp short loc_3FE5E
loc_3FE57:
mov [rbp+var_4], 1
loc_3FE5E:
mov eax, [rbp+var_4]
add rsp, 0C0h
pop rbp
retn
|
long long run_plugin_auth(long long a1, long long a2, int a3, const char *a4, long long a5)
{
long long v5; // rsi
long long v6; // rdx
long long v7; // rcx
int v8; // r8d
int v9; // r9d
unsigned int *v10; // rax
long long v12; // [rsp+8h] [rbp-B8h]
char *v13; // [rsp+10h] [rbp-B0h]
char *v14; // [rsp+18h] [rbp-A8h]
unsigned int v15; // [rsp+20h] [rbp-A0h]
signed int v16; // [rsp+24h] [rbp-9Ch]
long long v17; // [rsp+28h] [rbp-98h]
_QWORD v18[6]; // [rsp+30h] [rbp-90h] BYREF
long long v19; // [rsp+60h] [rbp-60h]
int v20; // [rsp+68h] [rbp-58h]
int v21; // [rsp+70h] [rbp-50h]
int v22; // [rsp+74h] [rbp-4Ch]
bool v23; // [rsp+78h] [rbp-48h]
int v24; // [rsp+7Ch] [rbp-44h]
void (**plugin)(void); // [rsp+80h] [rbp-40h]
const char *v26; // [rsp+88h] [rbp-38h]
long long v27; // [rsp+90h] [rbp-30h]
const char *v28; // [rsp+98h] [rbp-28h]
int v29; // [rsp+A4h] [rbp-1Ch]
long long v30; // [rsp+A8h] [rbp-18h]
long long v31; // [rsp+B0h] [rbp-10h]
v31 = a1;
v30 = a2;
v29 = a3;
v28 = a4;
v27 = a5;
v26 = 0LL;
if ( (*(_QWORD *)(a1 + 880) & 0x80000LL) != 0 )
{
if ( *(_QWORD *)(v31 + 1152) && *(_QWORD *)(*(_QWORD *)(v31 + 1152) + 8LL) )
{
v26 = *(const char **)(*(_QWORD *)(v31 + 1152) + 8LL);
}
else if ( v28 )
{
v26 = v28;
}
}
if ( !v26 )
{
if ( (*(_QWORD *)(v31 + 880) & 0x200LL) != 0 )
v26 = "mysql_native_password";
else
v26 = "mysql_old_password";
}
plugin = mysql_client_find_plugin(v31, v26, 2u);
if ( !plugin )
plugin = (void (**)(void))&dummy_fallback_client_plugin;
*(_DWORD *)(v31 + 144) = 0;
if ( v28 && (unsigned int)strcmp(v28, v26) )
{
v30 = 0LL;
v29 = 0;
}
v23 = v28 == 0LL;
v19 = v30;
v20 = v29;
v18[0] = client_mpvio_read_packet;
v18[1] = client_mpvio_write_packet;
v18[2] = client_mpvio_info;
v18[3] = v31;
v22 = 0;
v21 = 0;
v18[5] = v27;
while ( 1 )
{
v18[4] = plugin;
if ( v26
&& *(_QWORD *)(v31 + 1152)
&& *(_QWORD *)(*(_QWORD *)(v31 + 1152) + 336LL)
&& !strstr(*(_QWORD *)(*(_QWORD *)(v31 + 1152) + 336LL), v26) )
{
my_set_error(v31, 0x1392u, (long long)SQLSTATE_UNKNOWN, 0LL, v28);
return 1;
}
**(_BYTE **)(v31 + 32) = 0;
v5 = v31;
v16 = ((long long ( *)(_QWORD *, long long))plugin[11])(v18, v31);
if ( !v16 && !*(_QWORD *)(v31 + 8) || v16 > -1 && **(unsigned __int8 **)(v31 + 32) != 254 )
{
if ( v16 <= 0 )
{
if ( !*(_DWORD *)(v31 + 144) )
my_set_error(v31, 0x7D0u, (long long)SQLSTATE_UNKNOWN, 0LL);
}
else
{
my_set_error(v31, v16, (long long)SQLSTATE_UNKNOWN, 0LL);
}
return 1;
}
v17 = v16 == -1 ? ma_net_safe_read(v31, v5, v6, v7, v8, v9) : v24;
if ( v17 == 0xFFFFFFFFLL )
break;
if ( **(unsigned __int8 **)(v31 + 32) != 254 )
{
if ( **(_BYTE **)(v31 + 32) )
return 1;
else
return (unsigned int)ma_read_ok_packet(v31, (unsigned __int8 *)(*(_QWORD *)(v31 + 32) + 1LL), v17);
}
if ( v17 == 1 )
{
v26 = "mysql_old_password";
v19 = v31 + 1166;
v20 = 21;
}
else
{
v26 = (const char *)(*(_QWORD *)(v31 + 32) + 1LL);
v15 = strlen(v26);
v20 = v17 - v15 - 2;
v19 = v15 + *(_QWORD *)(v31 + 32) + 2LL;
}
plugin = mysql_client_find_plugin(v31, v26, 2u);
if ( !plugin )
plugin = (void (**)(void))&dummy_fallback_client_plugin;
}
if ( *(_DWORD *)(v31 + 144) == 2013 )
{
v12 = v31;
v13 = SQLSTATE_UNKNOWN;
v14 = client_errors[55];
v10 = (unsigned int *)__errno_location();
my_set_error(v12, 0x7DDu, (long long)v13, (long long)v14, "reading authorization packet", *v10);
}
return 1;
}
|
run_plugin_auth:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x370]
AND RAX,0x80000
CMP RAX,0x0
JZ 0x0013fa85
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0013fa72
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0013fa72
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0013fa83
LAB_0013fa72:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0013fa81
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
LAB_0013fa81:
JMP 0x0013fa83
LAB_0013fa83:
JMP 0x0013fa85
LAB_0013fa85:
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0013fabd
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x370]
AND RAX,0x200
CMP RAX,0x0
JZ 0x0013fab0
LEA RAX,[0x14bbfd]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0013fabb
LAB_0013fab0:
LEA RAX,[0x14bbea]
MOV qword ptr [RBP + -0x38],RAX
LAB_0013fabb:
JMP 0x0013fabd
LAB_0013fabd:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,0x2
CALL 0x00136390
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JNZ 0x0013fae4
LEA RAX,[0x15eea8]
MOV qword ptr [RBP + -0x40],RAX
LAB_0013fae4:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x90],0x0
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0013fb1a
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001135f0
CMP EAX,0x0
JZ 0x0013fb1a
MOV qword ptr [RBP + -0x18],0x0
MOV dword ptr [RBP + -0x1c],0x0
LAB_0013fb1a:
CMP qword ptr [RBP + -0x28],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x48],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x58],EAX
LEA RAX,[0x13fe70]
MOV qword ptr [RBP + -0x90],RAX
LEA RAX,[0x13ffb0]
MOV qword ptr [RBP + -0x88],RAX
LEA RAX,[0x140100]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x78],RAX
MOV dword ptr [RBP + -0x4c],0x0
MOV dword ptr [RBP + -0x50],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x68],RAX
LAB_0013fb7d:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x70],RAX
CMP qword ptr [RBP + -0x38],0x0
JZ 0x0013fc00
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0013fc00
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x150],0x0
JZ 0x0013fc00
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDI,qword ptr [RAX + 0x150]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x00113100
CMP RAX,0x0
JNZ 0x0013fbfe
MOV RDI,qword ptr [RBP + -0x10]
LEA RAX,[0x15fee0]
MOV RDX,qword ptr [RAX]
MOV R8,qword ptr [RBP + -0x28]
MOV ESI,0x1392
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x00116150
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013fe5e
LAB_0013fbfe:
JMP 0x0013fc00
LAB_0013fc00:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x58]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x90]
CALL RAX
MOV dword ptr [RBP + -0x9c],EAX
CMP dword ptr [RBP + -0x9c],0x0
JNZ 0x0013fc3a
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0013fc55
LAB_0013fc3a:
CMP dword ptr [RBP + -0x9c],-0x1
JLE 0x0013fcb8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JZ 0x0013fcb8
LAB_0013fc55:
CMP dword ptr [RBP + -0x9c],0x0
JLE 0x0013fc7f
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x9c]
LEA RAX,[0x15fee0]
MOV RDX,qword ptr [RAX]
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x00116150
JMP 0x0013fcac
LAB_0013fc7f:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x90],0x0
JNZ 0x0013fcaa
MOV RDI,qword ptr [RBP + -0x10]
LEA RAX,[0x15fee0]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7d0
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x00116150
LAB_0013fcaa:
JMP 0x0013fcac
LAB_0013fcac:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013fe5e
LAB_0013fcb8:
CMP dword ptr [RBP + -0x9c],-0x1
JNZ 0x0013fcd3
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00115e40
MOV qword ptr [RBP + -0x98],RAX
JMP 0x0013fcde
LAB_0013fcd3:
MOVSXD RAX,dword ptr [RBP + -0x44]
MOV qword ptr [RBP + -0x98],RAX
LAB_0013fcde:
MOV EAX,0xffffffff
CMP qword ptr [RBP + -0x98],RAX
JNZ 0x0013fd69
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x90],0x7dd
JNZ 0x0013fd5d
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xb8],RAX
LEA RAX,[0x15fee0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xb0],RAX
LEA RAX,[0x15fef0]
MOV RAX,qword ptr [RAX + 0x1b8]
MOV qword ptr [RBP + -0xa8],RAX
CALL 0x00113050
MOV RDI,qword ptr [RBP + -0xb8]
MOV RDX,qword ptr [RBP + -0xb0]
MOV RCX,qword ptr [RBP + -0xa8]
MOV R9D,dword ptr [RAX]
MOV ESI,0x7dd
LEA R8,[0x14c15c]
MOV AL,0x0
CALL 0x00116150
LAB_0013fd5d:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013fe5e
LAB_0013fd69:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JNZ 0x0013fe26
CMP qword ptr [RBP + -0x98],0x1
JNZ 0x0013fdab
LEA RAX,[0x14bbea]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x48e
MOV qword ptr [RBP + -0x60],RAX
MOV dword ptr [RBP + -0x58],0x15
JMP 0x0013fdfa
LAB_0013fdab:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001131a0
MOV dword ptr [RBP + -0xa0],EAX
MOV RAX,qword ptr [RBP + -0x98]
MOV ECX,dword ptr [RBP + -0xa0]
SUB RAX,RCX
SUB RAX,0x2
MOV dword ptr [RBP + -0x58],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV ECX,dword ptr [RBP + -0xa0]
ADD RAX,RCX
ADD RAX,0x2
MOV qword ptr [RBP + -0x60],RAX
LAB_0013fdfa:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,0x2
CALL 0x00136390
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JNZ 0x0013fe21
LEA RAX,[0x15eea8]
MOV qword ptr [RBP + -0x40],RAX
LAB_0013fe21:
JMP 0x0013fb7d
LAB_0013fe26:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x0013fe57
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x20]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x98]
CALL 0x0011e870
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013fe5e
LAB_0013fe57:
MOV dword ptr [RBP + -0x4],0x1
LAB_0013fe5e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xc0
POP RBP
RET
|
int4 run_plugin_auth(long param_1,long param_2,int param_3,char *param_4,int8 param_5)
{
int *puVar1;
int *puVar2;
long lVar3;
int iVar4;
char *pcVar5;
int *piVar6;
size_t sVar7;
long local_a0;
code *local_98;
code *local_90;
code *local_88;
long local_80;
int1 *local_78;
int8 local_70;
long local_68;
int local_60;
int4 local_58;
int4 local_54;
int1 local_50;
int local_4c;
int1 *local_48;
char *local_40;
int8 local_38;
char *local_30;
int local_24;
long local_20;
long local_18;
int4 local_c;
local_40 = (char *)0x0;
if ((*(ulong *)(param_1 + 0x370) & 0x80000) != 0) {
if ((*(long *)(param_1 + 0x480) == 0) || (*(long *)(*(long *)(param_1 + 0x480) + 8) == 0)) {
if (param_4 != (char *)0x0) {
local_40 = param_4;
}
}
else {
local_40 = *(char **)(*(long *)(param_1 + 0x480) + 8);
}
}
if (local_40 == (char *)0x0) {
if ((*(ulong *)(param_1 + 0x370) & 0x200) == 0) {
local_40 = "mysql_old_password";
}
else {
local_40 = "mysql_native_password";
}
}
local_38 = param_5;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
local_48 = (int1 *)mysql_client_find_plugin(param_1,local_40,2);
if (local_48 == (int1 *)0x0) {
local_48 = dummy_fallback_client_plugin;
}
*(int4 *)(local_18 + 0x90) = 0;
if ((local_30 != (char *)0x0) && (iVar4 = strcmp(local_30,local_40), iVar4 != 0)) {
local_20 = 0;
local_24 = 0;
}
local_50 = local_30 == (char *)0x0;
local_68 = local_20;
local_60 = local_24;
local_98 = client_mpvio_read_packet;
local_90 = client_mpvio_write_packet;
local_88 = client_mpvio_info;
local_80 = local_18;
local_54 = 0;
local_58 = 0;
local_70 = local_38;
while( true ) {
local_78 = local_48;
if ((((local_40 != (char *)0x0) && (*(long *)(local_18 + 0x480) != 0)) &&
(*(long *)(*(long *)(local_18 + 0x480) + 0x150) != 0)) &&
(pcVar5 = strstr(*(char **)(*(long *)(local_18 + 0x480) + 0x150),local_40),
pcVar5 == (char *)0x0)) {
my_set_error(local_18,0x1392,SQLSTATE_UNKNOWN,0,local_30);
return 1;
}
**(int1 **)(local_18 + 0x20) = 0;
iVar4 = (**(code **)(local_48 + 0x58))(&local_98,local_18);
if (((iVar4 == 0) && (*(long *)(local_18 + 8) == 0)) ||
((-1 < iVar4 && (**(char **)(local_18 + 0x20) != -2)))) {
if (iVar4 < 1) {
if (*(int *)(local_18 + 0x90) == 0) {
my_set_error(local_18,2000,SQLSTATE_UNKNOWN,0);
}
}
else {
my_set_error(local_18,iVar4,SQLSTATE_UNKNOWN,0);
}
return 1;
}
if (iVar4 == -1) {
local_a0 = ma_net_safe_read(local_18);
}
else {
local_a0 = (long)local_4c;
}
lVar3 = local_18;
puVar2 = PTR_s_Lost_connection_to_server_at___s_001600a8;
puVar1 = SQLSTATE_UNKNOWN;
if (local_a0 == 0xffffffff) break;
if (**(char **)(local_18 + 0x20) != -2) {
if (**(char **)(local_18 + 0x20) == '\0') {
local_c = ma_read_ok_packet(local_18,*(long *)(local_18 + 0x20) + 1,local_a0);
}
else {
local_c = 1;
}
return local_c;
}
if (local_a0 == 1) {
local_40 = "mysql_old_password";
local_68 = local_18 + 0x48e;
local_60 = 0x15;
}
else {
local_40 = (char *)(*(long *)(local_18 + 0x20) + 1);
sVar7 = strlen(local_40);
local_60 = ((int)local_a0 - (int)sVar7) + -2;
local_68 = *(long *)(local_18 + 0x20) + (sVar7 & 0xffffffff) + 2;
}
local_48 = (int1 *)mysql_client_find_plugin(local_18,local_40,2);
if (local_48 == (int1 *)0x0) {
local_48 = dummy_fallback_client_plugin;
}
}
if (*(int *)(local_18 + 0x90) == 0x7dd) {
piVar6 = __errno_location();
my_set_error(lVar3,0x7dd,puVar1,puVar2,"reading authorization packet",*piVar6);
}
return 1;
}
|
|
12,475
|
my_multi_malloc_large
|
eloqsql/mysys/mulalloc.c
|
void *my_multi_malloc_large(PSI_memory_key key, myf myFlags, ...)
{
va_list args;
char **ptr,*start,*res;
ulonglong tot_length,length;
DBUG_ENTER("my_multi_malloc");
va_start(args,myFlags);
tot_length=0;
while ((ptr=va_arg(args, char **)))
{
length=va_arg(args,ulonglong);
tot_length+=ALIGN_SIZE(length);
}
va_end(args);
if (!(start=(char *) my_malloc(key, (size_t) tot_length, myFlags)))
DBUG_RETURN(0); /* purecov: inspected */
va_start(args,myFlags);
res=start;
while ((ptr=va_arg(args, char **)))
{
*ptr=res;
length=va_arg(args,ulonglong);
res+=ALIGN_SIZE(length);
}
va_end(args);
DBUG_RETURN((void*) start);
}
|
O3
|
c
|
my_multi_malloc_large:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %r10
movq %rsi, %rdx
leaq -0xe0(%rbp), %rbx
movq %r10, 0x10(%rbx)
movq %rcx, 0x18(%rbx)
movq %r8, 0x20(%rbx)
movq %r9, 0x28(%rbx)
testb %al, %al
je 0x5748d
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %rbx, -0x20(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movabsq $0x3000000010, %r14 # imm = 0x3000000010
movq %r14, -0x30(%rbp)
movl $0x10, %eax
xorl %esi, %esi
cmpl $0x28, %eax
ja 0x574c3
movq %rcx, %r8
movl %eax, %ecx
addq %rbx, %rcx
addl $0x8, %eax
movl %eax, -0x30(%rbp)
jmp 0x574cb
leaq 0x8(%rcx), %r8
movq %r8, -0x28(%rbp)
cmpq $0x0, (%rcx)
je 0x574ff
cmpl $0x28, %eax
ja 0x574e7
movq %r8, %rcx
movl %eax, %r8d
addq %rbx, %r8
addl $0x8, %eax
movl %eax, -0x30(%rbp)
jmp 0x574ef
leaq 0x8(%r8), %rcx
movq %rcx, -0x28(%rbp)
movq (%r8), %r8
addq $0x7, %r8
andq $-0x8, %r8
addq %r8, %rsi
jmp 0x574ae
callq 0x5be8d
testq %rax, %rax
je 0x5757f
movq %rbx, -0x20(%rbp)
leaq 0x10(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq %r14, -0x30(%rbp)
movl $0x10, %edx
movq %rax, %rcx
cmpl $0x28, %edx
ja 0x57534
movl %edx, %esi
addq -0x20(%rbp), %rsi
addl $0x8, %edx
movl %edx, -0x30(%rbp)
jmp 0x57540
movq -0x28(%rbp), %rsi
leaq 0x8(%rsi), %rdx
movq %rdx, -0x28(%rbp)
movq (%rsi), %rdx
testq %rdx, %rdx
je 0x5757f
movq %rcx, (%rdx)
movl -0x30(%rbp), %edx
cmpq $0x28, %rdx
ja 0x57563
movq %rdx, %rsi
addq -0x20(%rbp), %rsi
addl $0x8, %edx
movl %edx, -0x30(%rbp)
jmp 0x5756f
movq -0x28(%rbp), %rsi
leaq 0x8(%rsi), %rdi
movq %rdi, -0x28(%rbp)
movq (%rsi), %rsi
addq $0x7, %rsi
andq $-0x8, %rsi
addq %rsi, %rcx
jmp 0x57521
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
|
my_multi_malloc_large:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 0D0h
mov r10, rdx
mov rdx, rsi
lea rbx, [rbp+var_E0]
mov [rbx+10h], r10
mov [rbx+18h], rcx
mov [rbx+20h], r8
mov [rbx+28h], r9
test al, al
jz short loc_5748D
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_5748D:
mov [rbp+var_20], rbx
lea rcx, [rbp+arg_0]
mov [rbp+var_28], rcx
mov r14, 3000000010h
mov [rbp+var_30], r14
mov eax, 10h
xor esi, esi
loc_574AE:
cmp eax, 28h ; '('
ja short loc_574C3
mov r8, rcx
mov ecx, eax
add rcx, rbx
add eax, 8
mov dword ptr [rbp+var_30], eax
jmp short loc_574CB
loc_574C3:
lea r8, [rcx+8]
mov [rbp+var_28], r8
loc_574CB:
cmp qword ptr [rcx], 0
jz short loc_574FF
cmp eax, 28h ; '('
ja short loc_574E7
mov rcx, r8
mov r8d, eax
add r8, rbx
add eax, 8
mov dword ptr [rbp+var_30], eax
jmp short loc_574EF
loc_574E7:
lea rcx, [r8+8]
mov [rbp+var_28], rcx
loc_574EF:
mov r8, [r8]
add r8, 7
and r8, 0FFFFFFFFFFFFFFF8h
add rsi, r8
jmp short loc_574AE
loc_574FF:
call my_malloc
test rax, rax
jz short loc_5757F
mov [rbp+var_20], rbx
lea rcx, [rbp+arg_0]
mov [rbp+var_28], rcx
mov [rbp+var_30], r14
mov edx, 10h
mov rcx, rax
loc_57521:
cmp edx, 28h ; '('
ja short loc_57534
mov esi, edx
add rsi, [rbp+var_20]
add edx, 8
mov dword ptr [rbp+var_30], edx
jmp short loc_57540
loc_57534:
mov rsi, [rbp+var_28]
lea rdx, [rsi+8]
mov [rbp+var_28], rdx
loc_57540:
mov rdx, [rsi]
test rdx, rdx
jz short loc_5757F
mov [rdx], rcx
mov edx, dword ptr [rbp+var_30]
cmp rdx, 28h ; '('
ja short loc_57563
mov rsi, rdx
add rsi, [rbp+var_20]
add edx, 8
mov dword ptr [rbp+var_30], edx
jmp short loc_5756F
loc_57563:
mov rsi, [rbp+var_28]
lea rdi, [rsi+8]
mov [rbp+var_28], rdi
loc_5756F:
mov rsi, [rsi]
add rsi, 7
and rsi, 0FFFFFFFFFFFFFFF8h
add rcx, rsi
jmp short loc_57521
loc_5757F:
add rsp, 0D0h
pop rbx
pop r14
pop rbp
retn
|
long long my_multi_malloc_large(
long long a1,
_DWORD a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char *v15; // rcx
unsigned int v16; // eax
long long i; // rsi
char *v18; // r8
long long result; // rax
unsigned int v20; // edx
long long j; // rcx
char *v22; // rsi
char *v23; // rsi
_BYTE v24[16]; // [rsp+0h] [rbp-E0h] BYREF
long long v25; // [rsp+10h] [rbp-D0h]
long long v26; // [rsp+18h] [rbp-C8h]
long long v27; // [rsp+20h] [rbp-C0h]
long long v28; // [rsp+28h] [rbp-B8h]
__m128 v29; // [rsp+30h] [rbp-B0h]
__m128 v30; // [rsp+40h] [rbp-A0h]
__m128 v31; // [rsp+50h] [rbp-90h]
__m128 v32; // [rsp+60h] [rbp-80h]
__m128 v33; // [rsp+70h] [rbp-70h]
__m128 v34; // [rsp+80h] [rbp-60h]
__m128 v35; // [rsp+90h] [rbp-50h]
__m128 v36; // [rsp+A0h] [rbp-40h]
long long v37; // [rsp+B0h] [rbp-30h]
char *v38; // [rsp+B8h] [rbp-28h]
_BYTE *v39; // [rsp+C0h] [rbp-20h]
v29 = a7;
v30 = a8;
v31 = a9;
v32 = a10;
v33 = a11;
v34 = a12;
v35 = a13;
v36 = a14;
v25 = a3;
v26 = a4;
v27 = a5;
v28 = a6;
v39 = v24;
v15 = &a15;
v38 = &a15;
v37 = 0x3000000010LL;
v16 = 16;
for ( i = 0LL; ; i += (*(_QWORD *)v18 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( v16 > 0x28 )
{
v18 = v15 + 8;
v38 = v15 + 8;
}
else
{
v18 = v15;
v15 = &v24[v16];
v16 += 8;
LODWORD(v37) = v16;
}
if ( !*(_QWORD *)v15 )
break;
if ( v16 > 0x28 )
{
v15 = v18 + 8;
v38 = v18 + 8;
}
else
{
v15 = v18;
v18 = &v24[v16];
v16 += 8;
LODWORD(v37) = v16;
}
}
result = my_malloc(a1, i);
if ( result )
{
v39 = v24;
v38 = &a15;
v37 = 0x3000000010LL;
v20 = 16;
for ( j = result; ; j += (*(_QWORD *)v23 + 7LL) & 0xFFFFFFFFFFFFFFF8LL )
{
if ( v20 > 0x28 )
{
v22 = v38;
v38 += 8;
}
else
{
v22 = &v39[v20];
LODWORD(v37) = v20 + 8;
}
if ( !*(_QWORD *)v22 )
break;
**(_QWORD **)v22 = j;
v20 = v37;
if ( (unsigned int)v37 > 0x28uLL )
{
v23 = v38;
v38 += 8;
}
else
{
v23 = &v39[(unsigned int)v37];
v20 = v37 + 8;
LODWORD(v37) = v37 + 8;
}
}
}
return result;
}
|
my_multi_malloc_large:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0xd0
MOV R10,RDX
MOV RDX,RSI
LEA RBX,[RBP + -0xe0]
MOV qword ptr [RBX + 0x10],R10
MOV qword ptr [RBX + 0x18],RCX
MOV qword ptr [RBX + 0x20],R8
MOV qword ptr [RBX + 0x28],R9
TEST AL,AL
JZ 0x0015748d
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_0015748d:
MOV qword ptr [RBP + -0x20],RBX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RCX
MOV R14,0x3000000010
MOV qword ptr [RBP + -0x30],R14
MOV EAX,0x10
XOR ESI,ESI
LAB_001574ae:
CMP EAX,0x28
JA 0x001574c3
MOV R8,RCX
MOV ECX,EAX
ADD RCX,RBX
ADD EAX,0x8
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001574cb
LAB_001574c3:
LEA R8,[RCX + 0x8]
MOV qword ptr [RBP + -0x28],R8
LAB_001574cb:
CMP qword ptr [RCX],0x0
JZ 0x001574ff
CMP EAX,0x28
JA 0x001574e7
MOV RCX,R8
MOV R8D,EAX
ADD R8,RBX
ADD EAX,0x8
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001574ef
LAB_001574e7:
LEA RCX,[R8 + 0x8]
MOV qword ptr [RBP + -0x28],RCX
LAB_001574ef:
MOV R8,qword ptr [R8]
ADD R8,0x7
AND R8,-0x8
ADD RSI,R8
JMP 0x001574ae
LAB_001574ff:
CALL 0x0015be8d
TEST RAX,RAX
JZ 0x0015757f
MOV qword ptr [RBP + -0x20],RBX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R14
MOV EDX,0x10
MOV RCX,RAX
LAB_00157521:
CMP EDX,0x28
JA 0x00157534
MOV ESI,EDX
ADD RSI,qword ptr [RBP + -0x20]
ADD EDX,0x8
MOV dword ptr [RBP + -0x30],EDX
JMP 0x00157540
LAB_00157534:
MOV RSI,qword ptr [RBP + -0x28]
LEA RDX,[RSI + 0x8]
MOV qword ptr [RBP + -0x28],RDX
LAB_00157540:
MOV RDX,qword ptr [RSI]
TEST RDX,RDX
JZ 0x0015757f
MOV qword ptr [RDX],RCX
MOV EDX,dword ptr [RBP + -0x30]
CMP RDX,0x28
JA 0x00157563
MOV RSI,RDX
ADD RSI,qword ptr [RBP + -0x20]
ADD EDX,0x8
MOV dword ptr [RBP + -0x30],EDX
JMP 0x0015756f
LAB_00157563:
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RSI + 0x8]
MOV qword ptr [RBP + -0x28],RDI
LAB_0015756f:
MOV RSI,qword ptr [RSI]
ADD RSI,0x7
AND RSI,-0x8
ADD RCX,RSI
JMP 0x00157521
LAB_0015757f:
ADD RSP,0xd0
POP RBX
POP R14
POP RBP
RET
|
void my_multi_malloc_large
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
uint uVar1;
long *plVar2;
ulong uVar3;
long lVar4;
long *plVar5;
long *plVar6;
long local_e8 [4];
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
uint local_38;
int4 uStack_34;
long *local_30;
long *local_28;
local_e8[2] = param_11;
local_e8[3] = param_12;
local_c8 = param_13;
local_c0 = param_14;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_28 = local_e8;
plVar5 = (long *)&stack0x00000008;
local_30 = plVar5;
local_38 = 0x10;
uStack_34 = 0x30;
uVar1 = 0x10;
lVar4 = 0;
while( true ) {
if (uVar1 < 0x29) {
uVar3 = (ulong)uVar1;
uVar1 = uVar1 + 8;
local_38 = uVar1;
plVar2 = (long *)((long)local_e8 + uVar3);
plVar6 = plVar5;
}
else {
plVar6 = plVar5 + 1;
local_30 = plVar6;
plVar2 = plVar5;
}
if (*plVar2 == 0) break;
if (uVar1 < 0x29) {
uVar3 = (ulong)uVar1;
uVar1 = uVar1 + 8;
local_38 = uVar1;
plVar5 = plVar6;
plVar6 = (long *)((long)local_e8 + uVar3);
}
else {
plVar5 = plVar6 + 1;
local_30 = plVar5;
}
lVar4 = lVar4 + (*plVar6 + 7U & 0xfffffffffffffff8);
}
lVar4 = my_malloc(param_9,lVar4,param_10);
if (lVar4 != 0) {
local_30 = (long *)&stack0x00000008;
uVar1 = 0x10;
uVar3 = 0x10;
while( true ) {
if ((uint)uVar3 < 0x29) {
uVar1 = (uint)uVar3 + 8;
plVar5 = (long *)((long)local_e8 + uVar3);
}
else {
plVar5 = local_30;
local_30 = local_30 + 1;
}
if ((long *)*plVar5 == (long *)0x0) break;
*(long *)*plVar5 = lVar4;
uVar3 = (ulong)uVar1;
if (uVar3 < 0x29) {
plVar5 = (long *)((long)local_e8 + uVar3);
uVar1 = uVar1 + 8;
uVar3 = (ulong)uVar1;
}
else {
plVar5 = local_30;
local_30 = local_30 + 1;
}
lVar4 = lVar4 + (*plVar5 + 7U & 0xfffffffffffffff8);
}
}
return;
}
|
|
12,476
|
coro::detail::when_all_task<void> coro::detail::make_when_all_task<coro::task<void>, void>(coro::task<void>) (.resume)
|
AlayaLite/build_O3/_deps/libcoro-src/include/coro/when_all.hpp
|
static auto make_when_all_task(awaitable a) -> when_all_task<return_type>
{
if constexpr (std::is_void_v<return_type>)
{
co_await static_cast<awaitable&&>(a);
co_return;
}
else
{
co_yield co_await static_cast<awaitable&&>(a);
}
}
|
O3
|
cpp
|
coro::detail::when_all_task<void> coro::detail::make_when_all_task<coro::task<void>, void>(coro::task<void>) (.resume):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x30(%rdi)
je 0x2759
movq 0x20(%rbx), %rdi
leaq 0x10(%rbx), %r14
addq $0x10, %rdi
callq 0x2e18
movq $0x0, (%rbx)
movb $0x2, 0x30(%rbx)
movq 0x10(%rbx), %rax
lock
decq (%rax)
jne 0x2751
movq 0x8(%rax), %rdi
callq *(%rdi)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x28(%rbx), %rdi
movq %rdi, 0x20(%rbx)
cmpq $0x0, (%rdi)
je 0x2729
movb $0x1, 0x30(%rbx)
movq %rbx, 0x10(%rdi)
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *(%rdi)
movq %rax, %rdi
callq 0x2c53
movq %rax, %rdi
callq 0x2070
movq %r14, %rdi
callq 0x2dc0
callq 0x2170
jmp 0x2736
movq $0x0, (%rbx)
movb $0x2, 0x30(%rbx)
movq %rax, %rdi
callq 0x21a0
|
_ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__resume:
push r14
push rbx
push rax
mov rbx, rdi
cmp byte ptr [rdi+30h], 0
jz short loc_2759
mov rdi, [rbx+20h]
loc_2729:
lea r14, [rbx+10h]
add rdi, 10h
call _ZN4coro6detail7promiseIvE6resultEv; coro::detail::promise<void>::result(void)
loc_2736:
mov qword ptr [rbx], 0
mov byte ptr [rbx+30h], 2
mov rax, [rbx+10h]
lock dec qword ptr [rax]
jnz short loc_2751
mov rdi, [rax+8]
call qword ptr [rdi]
loc_2751:
add rsp, 8
pop rbx
pop r14
retn
loc_2759:
mov rdi, [rbx+28h]
mov [rbx+20h], rdi
cmp qword ptr [rdi], 0
jz short loc_2729
mov byte ptr [rbx+30h], 1
mov [rdi+10h], rbx
mov rdi, [rbx+20h]
add rsp, 8
pop rbx
pop r14
jmp qword ptr [rdi]
mov rdi, rax
call __clang_call_terminate
mov rdi, rax; void *
call ___cxa_begin_catch
mov rdi, r14
call _ZN4coro6detail21when_all_task_promiseIvE19unhandled_exceptionEv; coro::detail::when_all_task_promise<void>::unhandled_exception(void)
call ___cxa_end_catch
jmp short loc_2736
mov qword ptr [rbx], 0
mov byte ptr [rbx+30h], 2
mov rdi, rax
call __Unwind_Resume
|
long long ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__resume(
long long a1)
{
_QWORD *v2; // rdi
long long result; // rax
if ( *(_BYTE *)(a1 + 48) )
{
v2 = *(_QWORD **)(a1 + 32);
}
else
{
v2 = *(_QWORD **)(a1 + 40);
*(_QWORD *)(a1 + 32) = v2;
if ( *v2 )
{
*(_BYTE *)(a1 + 48) = 1;
v2[2] = a1;
return (**(long long (***)(void))(a1 + 32))();
}
}
coro::detail::promise<void>::result(v2 + 2);
*(_QWORD *)a1 = 0LL;
*(_BYTE *)(a1 + 48) = 2;
result = *(_QWORD *)(a1 + 16);
if ( !_InterlockedDecrement64((volatile signed long long *)result) )
return (**(long long ( ***)(_QWORD))(result + 8))(*(_QWORD *)(result + 8));
return result;
}
|
_ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET_.resume:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP byte ptr [RDI + 0x30],0x0
JZ 0x00102759
MOV RDI,qword ptr [RBX + 0x20]
LAB_00102729:
LEA R14,[RBX + 0x10]
ADD RDI,0x10
LAB_00102731:
CALL 0x00102e18
LAB_00102736:
MOV qword ptr [RBX],0x0
MOV byte ptr [RBX + 0x30],0x2
MOV RAX,qword ptr [RBX + 0x10]
DEC.LOCK qword ptr [RAX]
JNZ 0x00102751
MOV RDI,qword ptr [RAX + 0x8]
LAB_0010274f:
CALL qword ptr [RDI]
LAB_00102751:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00102759:
MOV RDI,qword ptr [RBX + 0x28]
MOV qword ptr [RBX + 0x20],RDI
CMP qword ptr [RDI],0x0
JZ 0x00102729
MOV byte ptr [RBX + 0x30],0x1
MOV qword ptr [RDI + 0x10],RBX
MOV RDI,qword ptr [RBX + 0x20]
ADD RSP,0x8
POP RBX
POP R14
JMP qword ptr [RDI]
|
void _ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__resume
(int8 *param_1)
{
long *plVar1;
if (*(char *)(param_1 + 6) == '\0') {
plVar1 = (long *)param_1[5];
param_1[4] = plVar1;
if (*plVar1 != 0) {
*(int1 *)(param_1 + 6) = 1;
plVar1[2] = (long)param_1;
/* WARNING: Could not recover jumptable at 0x0010277a. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)param_1[4])();
return;
}
}
else {
plVar1 = (long *)param_1[4];
}
/* try { // try from 00102731 to 00102735 has its CatchHandler @ 00102784 */
coro::detail::promise<void>::result((promise<void> *)(plVar1 + 2));
*param_1 = 0;
*(int1 *)(param_1 + 6) = 2;
plVar1 = (long *)param_1[2];
LOCK();
*plVar1 = *plVar1 + -1;
UNLOCK();
if (*plVar1 == 0) {
/* try { // try from 0010274f to 00102750 has its CatchHandler @ 0010277c */
(**(code **)plVar1[1])();
}
return;
}
|
|
12,477
|
R3D_SetBloomMode
|
r3d/src/r3d_environment.c
|
void R3D_SetBloomMode(R3D_Bloom mode)
{
R3D.env.bloomMode = mode;
if (mode != R3D_BLOOM_DISABLED) {
if (R3D.framebuffer.pingPongBloom.id == 0) {
r3d_framebuffer_load_pingpong_bloom(
R3D.state.resolution.width,
R3D.state.resolution.height
);
}
if (R3D.shader.screen.bloom.id == 0) {
r3d_shader_load_screen_bloom();
}
}
}
|
O3
|
c
|
R3D_SetBloomMode:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xf2b94(%rip), %rbx # 0x1b0370
movl %edi, 0x14e8(%rbx)
testl %edi, %edi
je 0xbd806
cmpl $0x0, 0x40(%rbx)
jne 0xbd7fd
movl 0x1700(%rbx), %edi
movl 0x1704(%rbx), %esi
callq 0xbfb25
cmpl $0x0, 0x139c(%rbx)
je 0xbd80d
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xc32a6
|
R3D_SetBloomMode:
push rbp
mov rbp, rsp
push rbx
push rax
lea rbx, R3D
mov [rbx+14E8h], edi
test edi, edi
jz short loc_BD806
cmp dword ptr [rbx+40h], 0
jnz short loc_BD7FD
mov edi, [rbx+1700h]
mov esi, [rbx+1704h]
call r3d_framebuffer_load_pingpong_bloom
loc_BD7FD:
cmp dword ptr [rbx+139Ch], 0
jz short loc_BD80D
loc_BD806:
add rsp, 8
pop rbx
pop rbp
retn
loc_BD80D:
add rsp, 8
pop rbx
pop rbp
jmp r3d_shader_load_screen_bloom
|
long long R3D_SetBloomMode(int a1)
{
long long result; // rax
*((_DWORD *)&R3D + 1338) = a1;
if ( a1 )
{
if ( !*((_DWORD *)&R3D + 16) )
result = r3d_framebuffer_load_pingpong_bloom(*((unsigned int *)&R3D + 1472), *((unsigned int *)&R3D + 1473));
if ( !*((_DWORD *)&R3D + 1255) )
return r3d_shader_load_screen_bloom();
}
return result;
}
|
R3D_SetBloomMode:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
LEA RBX,[0x2b0370]
MOV dword ptr [RBX + 0x14e8],EDI
TEST EDI,EDI
JZ 0x001bd806
CMP dword ptr [RBX + 0x40],0x0
JNZ 0x001bd7fd
MOV EDI,dword ptr [RBX + 0x1700]
MOV ESI,dword ptr [RBX + 0x1704]
CALL 0x001bfb25
LAB_001bd7fd:
CMP dword ptr [RBX + 0x139c],0x0
JZ 0x001bd80d
LAB_001bd806:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_001bd80d:
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001c32a6
|
void R3D_SetBloomMode(int param_1)
{
DAT_002b1858 = param_1;
if (param_1 != 0) {
if (DAT_002b03b0 == 0) {
r3d_framebuffer_load_pingpong_bloom(DAT_002b1a70,DAT_002b1a74);
}
if (DAT_002b170c == 0) {
r3d_shader_load_screen_bloom();
return;
}
}
return;
}
|
|
12,478
|
LefDefParser::lefwNonDefaultRuleHardspacing()
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwNonDefaultRuleHardspacing()
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (lefwState != LEFW_NONDEFAULTRULE_START &&
lefwState != LEFW_NONDEFAULTRULE)
return LEFW_BAD_ORDER;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) " HARDSPACING ;\n");
else
fprintf(lefwFile, " HARDSPACING ;\n");
return LEFW_OK;
}
|
O0
|
cpp
|
LefDefParser::lefwNonDefaultRuleHardspacing():
pushq %rax
leaq 0x18f48(%rip), %rax # 0x32e00
cmpq $0x0, (%rax)
jne 0x19ec8
movl $0x1, 0x4(%rsp)
jmp 0x19f43
leaq 0x19185(%rip), %rax # 0x33054
cmpl $0x0, (%rax)
jne 0x19ede
movl $0x2, 0x4(%rsp)
jmp 0x19f43
leaq 0x1916b(%rip), %rax # 0x33050
cmpl $0xb, (%rax)
je 0x19f00
leaq 0x1915f(%rip), %rax # 0x33050
cmpl $0x3b, (%rax)
je 0x19f00
movl $0x2, 0x4(%rsp)
jmp 0x19f43
cmpl $0x0, 0x191e5(%rip) # 0x330ec
je 0x19f23
leaq 0x18ef0(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x111e5(%rip), %rsi # 0x2b0ff
movb $0x0, %al
callq 0x289b0
jmp 0x19f3b
leaq 0x18ed6(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x111cb(%rip), %rsi # 0x2b0ff
movb $0x0, %al
callq 0x1100
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
popq %rcx
retq
nopl (%rax)
|
_ZN12LefDefParser29lefwNonDefaultRuleHardspacingEv:
push rax
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_19EC8
mov [rsp+8+var_4], 1
jmp short loc_19F43
loc_19EC8:
lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
cmp dword ptr [rax], 0
jnz short loc_19EDE
mov [rsp+8+var_4], 2
jmp short loc_19F43
loc_19EDE:
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 0Bh
jz short loc_19F00
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 3Bh ; ';'
jz short loc_19F00
mov [rsp+8+var_4], 2
jmp short loc_19F43
loc_19F00:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz short loc_19F23
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, aHardspacing; " HARDSPACING ;\n"
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_19F3B
loc_19F23:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, aHardspacing; " HARDSPACING ;\n"
mov al, 0
call _fprintf
loc_19F3B:
mov [rsp+8+var_4], 0
loc_19F43:
mov eax, [rsp+8+var_4]
pop rcx
retn
|
long long LefDefParser::lefwNonDefaultRuleHardspacing(
LefDefParser *this,
long long a2,
int a3,
int a4,
int a5,
int a6)
{
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwDidInit )
{
if ( LefDefParser::lefwState == 11 || LefDefParser::lefwState == 59 )
{
if ( LefDefParser::lefwWriteEncrypt )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" HARDSPACING ;\n", a3, a4, a5, a6);
else
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " HARDSPACING ;\n");
return 0;
}
else
{
return 2;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
|
lefwNonDefaultRuleHardspacing:
PUSH RAX
LEA RAX,[0x132e00]
CMP qword ptr [RAX],0x0
JNZ 0x00119ec8
MOV dword ptr [RSP + 0x4],0x1
JMP 0x00119f43
LAB_00119ec8:
LEA RAX,[0x133054]
CMP dword ptr [RAX],0x0
JNZ 0x00119ede
MOV dword ptr [RSP + 0x4],0x2
JMP 0x00119f43
LAB_00119ede:
LEA RAX,[0x133050]
CMP dword ptr [RAX],0xb
JZ 0x00119f00
LEA RAX,[0x133050]
CMP dword ptr [RAX],0x3b
JZ 0x00119f00
MOV dword ptr [RSP + 0x4],0x2
JMP 0x00119f43
LAB_00119f00:
CMP dword ptr [0x001330ec],0x0
JZ 0x00119f23
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x12b0ff]
MOV AL,0x0
CALL 0x001289b0
JMP 0x00119f3b
LAB_00119f23:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x12b0ff]
MOV AL,0x0
CALL 0x00101100
LAB_00119f3b:
MOV dword ptr [RSP + 0x4],0x0
LAB_00119f43:
MOV EAX,dword ptr [RSP + 0x4]
POP RCX
RET
|
/* LefDefParser::lefwNonDefaultRuleHardspacing() */
int4 LefDefParser::lefwNonDefaultRuleHardspacing(void)
{
int4 local_4;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if (lefwDidInit == 0) {
local_4 = 2;
}
else if ((lefwState == 0xb) || (lefwState == 0x3b)) {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile," HARDSPACING ;\n");
}
else {
encPrint(lefwFile," HARDSPACING ;\n");
}
local_4 = 0;
}
else {
local_4 = 2;
}
return local_4;
}
|
|
12,479
|
LefDefParser::lefwNonDefaultRuleHardspacing()
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
|
int
lefwNonDefaultRuleHardspacing()
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (lefwState != LEFW_NONDEFAULTRULE_START &&
lefwState != LEFW_NONDEFAULTRULE)
return LEFW_BAD_ORDER;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) " HARDSPACING ;\n");
else
fprintf(lefwFile, " HARDSPACING ;\n");
return LEFW_OK;
}
|
O3
|
cpp
|
LefDefParser::lefwNonDefaultRuleHardspacing():
pushq %rbx
leaq 0x1515c(%rip), %rax # 0x24e00
movq (%rax), %rcx
testq %rcx, %rcx
je 0xfcee
leaq 0x153a1(%rip), %rax # 0x25054
movl $0x2, %ebx
cmpl $0x0, (%rax)
je 0xfd0d
leaq 0x1538c(%rip), %rax # 0x25050
movl (%rax), %eax
cmpl $0x3b, %eax
je 0xfcd0
cmpl $0xb, %eax
jne 0xfd0d
cmpb $0x1, 0x15415(%rip) # 0x250ec
jne 0xfcf5
leaq 0xb6db(%rip), %rsi # 0x1b3bb
xorl %ebx, %ebx
movq %rcx, %rdi
xorl %eax, %eax
callq 0x18c35
jmp 0xfd0d
movl $0x1, %ebx
jmp 0xfd0d
leaq 0xb6bf(%rip), %rdi # 0x1b3bb
movl $0x11, %esi
movl $0x1, %edx
callq 0x1110
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
retq
|
_ZN12LefDefParser29lefwNonDefaultRuleHardspacingEv:
push rbx
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rcx, [rax]
test rcx, rcx
jz short loc_FCEE
lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
mov ebx, 2
cmp dword ptr [rax], 0
jz short loc_FD0D
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov eax, [rax]
cmp eax, 3Bh ; ';'
jz short loc_FCD0
cmp eax, 0Bh
jnz short loc_FD0D
loc_FCD0:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_FCF5
lea rsi, aHardspacing; " HARDSPACING ;\n"
xor ebx, ebx
mov rdi, rcx
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_FD0D
loc_FCEE:
mov ebx, 1
jmp short loc_FD0D
loc_FCF5:
lea rdi, aHardspacing; " HARDSPACING ;\n"
mov esi, 11h
mov edx, 1
call _fwrite
xor ebx, ebx
loc_FD0D:
mov eax, ebx
pop rbx
retn
|
long long LefDefParser::lefwNonDefaultRuleHardspacing(
LefDefParser *this,
long long a2,
int a3,
long long a4,
int a5,
int a6)
{
unsigned int v6; // ebx
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
v6 = 2;
if ( LefDefParser::lefwDidInit && (LefDefParser::lefwState == 59 || LefDefParser::lefwState == 11) )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
{
v6 = 0;
LefDefParser::encPrint(
LefDefParser::lefwFile,
(unsigned int)" HARDSPACING ;\n",
a3,
LefDefParser::lefwFile,
a5,
a6);
}
else
{
fwrite(" HARDSPACING ;\n", 17LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile);
return 0;
}
}
}
else
{
return 1;
}
return v6;
}
|
lefwNonDefaultRuleHardspacing:
PUSH RBX
LEA RAX,[0x124e00]
MOV RCX,qword ptr [RAX]
TEST RCX,RCX
JZ 0x0010fcee
LEA RAX,[0x125054]
MOV EBX,0x2
CMP dword ptr [RAX],0x0
JZ 0x0010fd0d
LEA RAX,[0x125050]
MOV EAX,dword ptr [RAX]
CMP EAX,0x3b
JZ 0x0010fcd0
CMP EAX,0xb
JNZ 0x0010fd0d
LAB_0010fcd0:
CMP byte ptr [0x001250ec],0x1
JNZ 0x0010fcf5
LEA RSI,[0x11b3bb]
XOR EBX,EBX
MOV RDI,RCX
XOR EAX,EAX
CALL 0x00118c35
JMP 0x0010fd0d
LAB_0010fcee:
MOV EBX,0x1
JMP 0x0010fd0d
LAB_0010fcf5:
LEA RDI,[0x11b3bb]
MOV ESI,0x11
MOV EDX,0x1
CALL 0x00101110
XOR EBX,EBX
LAB_0010fd0d:
MOV EAX,EBX
POP RBX
RET
|
/* LefDefParser::lefwNonDefaultRuleHardspacing() */
int8 LefDefParser::lefwNonDefaultRuleHardspacing(void)
{
int8 uVar1;
if (lefwFile == (_IO_FILE *)0x0) {
uVar1 = 1;
}
else {
uVar1 = 2;
if ((lefwDidInit != 0) && ((lefwState == 0x3b || (lefwState == 0xb)))) {
if (lefwWriteEncrypt == '\x01') {
uVar1 = 0;
encPrint(lefwFile," HARDSPACING ;\n");
}
else {
fwrite(" HARDSPACING ;\n",0x11,1,lefwFile);
uVar1 = 0;
}
}
}
return uVar1;
}
|
|
12,480
|
my_coll_rule_shift_at_level
|
eloqsql/strings/ctype-uca.c
|
static void
my_coll_rule_shift_at_level(MY_COLL_RULE *r, int level)
{
switch (level)
{
case 4: /* Quaternary difference */
r->diff[3]++;
break;
case 3: /* Tertiary difference */
r->diff[2]++;
r->diff[3]= 0;
break;
case 2: /* Secondary difference */
r->diff[1]++;
r->diff[2]= r->diff[3]= 0;
break;
case 1: /* Primary difference */
r->diff[0]++;
r->diff[1]= r->diff[2]= r->diff[3]= 0;
break;
case 0:
/* Do nothing for '=': use the previous offsets for all levels */
break;
default:
DBUG_ASSERT(0);
}
}
|
O0
|
c
|
my_coll_rule_shift_at_level:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x4, %rax
ja 0x58fdd
movq -0x18(%rbp), %rax
leaq 0xf3829(%rip), %rcx # 0x14c750
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movl 0x8c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8c(%rax)
jmp 0x58fe3
movq -0x8(%rbp), %rax
movl 0x88(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
jmp 0x58fe3
movq -0x8(%rbp), %rax
movl 0x84(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x84(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
jmp 0x58fe3
movq -0x8(%rbp), %rax
movl 0x80(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x80(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x84(%rax)
jmp 0x58fe3
jmp 0x58fe3
jmp 0x58fdf
jmp 0x58fe1
jmp 0x58fe3
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_coll_rule_shift_at_level:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov eax, [rbp+var_C]
mov [rbp+var_18], rax
sub rax, 4; switch 5 cases
ja def_58F2E; jumptable 0000000000058F2E default case
mov rax, [rbp+var_18]
lea rcx, jpt_58F2E
movsxd rax, ds:(jpt_58F2E - 14C750h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_58F30:
mov rax, [rbp+var_8]; jumptable 0000000000058F2E case 4
mov ecx, [rax+8Ch]
add ecx, 1
mov [rax+8Ch], ecx
jmp loc_58FE3
loc_58F48:
mov rax, [rbp+var_8]; jumptable 0000000000058F2E case 3
mov ecx, [rax+88h]
add ecx, 1
mov [rax+88h], ecx
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
jmp short loc_58FE3
loc_58F6B:
mov rax, [rbp+var_8]; jumptable 0000000000058F2E case 2
mov ecx, [rax+84h]
add ecx, 1
mov [rax+84h], ecx
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
jmp short loc_58FE3
loc_58F9C:
mov rax, [rbp+var_8]; jumptable 0000000000058F2E case 1
mov ecx, [rax+80h]
add ecx, 1
mov [rax+80h], ecx
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+84h], 0
jmp short loc_58FE3
loc_58FDB:
jmp short loc_58FE3; jumptable 0000000000058F2E case 0
def_58F2E:
jmp short $+2; jumptable 0000000000058F2E default case
loc_58FDF:
jmp short $+2
loc_58FE1:
jmp short $+2
loc_58FE3:
pop rbp
retn
|
unsigned long long my_coll_rule_shift_at_level(_DWORD *a1, unsigned int a2)
{
unsigned long long result; // rax
result = a2;
switch ( a2 )
{
case 1u:
++a1[32];
a1[35] = 0;
a1[34] = 0;
result = (unsigned long long)a1;
a1[33] = 0;
break;
case 2u:
++a1[33];
a1[35] = 0;
result = (unsigned long long)a1;
a1[34] = 0;
break;
case 3u:
++a1[34];
result = (unsigned long long)a1;
a1[35] = 0;
break;
case 4u:
result = (unsigned long long)a1;
++a1[35];
break;
default:
return result;
}
return result;
}
|
my_coll_rule_shift_at_level:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV EAX,dword ptr [RBP + -0xc]
MOV qword ptr [RBP + -0x18],RAX
SUB RAX,0x4
JA 0x00158fdd
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x24c750]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_4:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x8c]
ADD ECX,0x1
MOV dword ptr [RAX + 0x8c],ECX
JMP 0x00158fe3
caseD_3:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x88]
ADD ECX,0x1
MOV dword ptr [RAX + 0x88],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
JMP 0x00158fe3
caseD_2:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x84]
ADD ECX,0x1
MOV dword ptr [RAX + 0x84],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
JMP 0x00158fe3
caseD_1:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x80]
ADD ECX,0x1
MOV dword ptr [RAX + 0x80],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x84],0x0
JMP 0x00158fe3
caseD_0:
JMP 0x00158fe3
LAB_00158fdd:
JMP 0x00158fdf
LAB_00158fdf:
JMP 0x00158fe1
LAB_00158fe1:
JMP 0x00158fe3
default:
POP RBP
RET
|
void my_coll_rule_shift_at_level(long param_1,int4 param_2)
{
switch(param_2) {
case 0:
break;
case 1:
*(int *)(param_1 + 0x80) = *(int *)(param_1 + 0x80) + 1;
*(int4 *)(param_1 + 0x8c) = 0;
*(int4 *)(param_1 + 0x88) = 0;
*(int4 *)(param_1 + 0x84) = 0;
break;
case 2:
*(int *)(param_1 + 0x84) = *(int *)(param_1 + 0x84) + 1;
*(int4 *)(param_1 + 0x8c) = 0;
*(int4 *)(param_1 + 0x88) = 0;
break;
case 3:
*(int *)(param_1 + 0x88) = *(int *)(param_1 + 0x88) + 1;
*(int4 *)(param_1 + 0x8c) = 0;
break;
case 4:
*(int *)(param_1 + 0x8c) = *(int *)(param_1 + 0x8c) + 1;
}
return;
}
|
|
12,481
|
ma_mempack_get_block_info
|
eloqsql/storage/maria/ma_packrec.c
|
static uchar *
_ma_mempack_get_block_info(MARIA_HA *maria,
MARIA_BIT_BUFF *bit_buff,
MARIA_BLOCK_INFO *info,
uchar **rec_buff_p,
size_t *rec_buff_size_p,
uchar *header)
{
MARIA_SHARE *share= maria->s;
myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
header+= read_pack_length((uint) share->pack.version, header,
&info->rec_len);
if (share->base.blobs)
{
header+= read_pack_length((uint) share->pack.version, header,
&info->blob_len);
/* _ma_alloc_rec_buff sets my_errno on error */
if (_ma_alloc_buffer(rec_buff_p, rec_buff_size_p,
info->blob_len + share->base.extra_rec_buff_size, flag))
return 0; /* not enough memory */
bit_buff->blob_pos= *rec_buff_p;
bit_buff->blob_end= *rec_buff_p + info->blob_len;
}
return header;
}
|
O3
|
c
|
ma_mempack_get_block_info:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movzbl (%r9), %eax
cmpq $0xfd, %rax
ja 0x3bec6
movl $0x1, %ecx
jmp 0x3befe
cmpl $0xfe, %eax
jne 0x3bed8
movzwl 0x1(%rbx), %eax
movl $0x3, %ecx
jmp 0x3befe
cmpb $0x1, 0x59c(%rdi)
jne 0x3bef6
movzwl 0x1(%rbx), %ecx
movzbl 0x3(%rbx), %eax
shll $0x10, %eax
orq %rcx, %rax
movl $0x4, %ecx
jmp 0x3befe
movl 0x1(%rbx), %eax
movl $0x5, %ecx
movb 0x7d9(%rdi), %dl
movq %rax, 0x18(%r15)
addq %rcx, %rbx
cmpl $0x0, 0x3f0(%rdi)
je 0x3bfa7
xorl %ecx, %ecx
testb %dl, %dl
setne %cl
shll $0x10, %ecx
orq $0x10, %rcx
movzbl (%rbx), %eax
cmpq $0xfd, %rax
ja 0x3bf39
movl $0x1, %r13d
jmp 0x3bf74
cmpl $0xfe, %eax
jne 0x3bf4c
movzwl 0x1(%rbx), %eax
movl $0x3, %r13d
jmp 0x3bf74
cmpb $0x1, 0x59c(%rdi)
jne 0x3bf6b
movzwl 0x1(%rbx), %edx
movzbl 0x3(%rbx), %eax
shll $0x10, %eax
orq %rdx, %rax
movl $0x4, %r13d
jmp 0x3bf74
movl 0x1(%rbx), %eax
movl $0x5, %r13d
movq %rax, 0x30(%r15)
movl 0x424(%rdi), %edx
addq %rax, %rdx
movq %r12, %rdi
movq %r8, %rsi
callq 0x54d8f
testb %al, %al
je 0x3bf94
xorl %ebx, %ebx
jmp 0x3bfa7
addq %r13, %rbx
movq (%r12), %rax
movq %rax, 0x18(%r14)
addq 0x30(%r15), %rax
movq %rax, 0x20(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
|
_ma_mempack_get_block_info:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r9
mov r12, rcx
mov r15, rdx
mov r14, rsi
movzx eax, byte ptr [r9]
cmp rax, 0FDh
ja short loc_3BEC6
mov ecx, 1
jmp short loc_3BEFE
loc_3BEC6:
cmp eax, 0FEh
jnz short loc_3BED8
movzx eax, word ptr [rbx+1]
mov ecx, 3
jmp short loc_3BEFE
loc_3BED8:
cmp byte ptr [rdi+59Ch], 1
jnz short loc_3BEF6
movzx ecx, word ptr [rbx+1]
movzx eax, byte ptr [rbx+3]
shl eax, 10h
or rax, rcx
mov ecx, 4
jmp short loc_3BEFE
loc_3BEF6:
mov eax, [rbx+1]
mov ecx, 5
loc_3BEFE:
mov dl, [rdi+7D9h]
mov [r15+18h], rax
add rbx, rcx
cmp dword ptr [rdi+3F0h], 0
jz loc_3BFA7
xor ecx, ecx
test dl, dl
setnz cl
shl ecx, 10h
or rcx, 10h
movzx eax, byte ptr [rbx]
cmp rax, 0FDh
ja short loc_3BF39
mov r13d, 1
jmp short loc_3BF74
loc_3BF39:
cmp eax, 0FEh
jnz short loc_3BF4C
movzx eax, word ptr [rbx+1]
mov r13d, 3
jmp short loc_3BF74
loc_3BF4C:
cmp byte ptr [rdi+59Ch], 1
jnz short loc_3BF6B
movzx edx, word ptr [rbx+1]
movzx eax, byte ptr [rbx+3]
shl eax, 10h
or rax, rdx
mov r13d, 4
jmp short loc_3BF74
loc_3BF6B:
mov eax, [rbx+1]
mov r13d, 5
loc_3BF74:
mov [r15+30h], rax
mov edx, [rdi+424h]
add rdx, rax
mov rdi, r12
mov rsi, r8
call _ma_alloc_buffer
test al, al
jz short loc_3BF94
xor ebx, ebx
jmp short loc_3BFA7
loc_3BF94:
add rbx, r13
mov rax, [r12]
mov [r14+18h], rax
add rax, [r15+30h]
mov [r14+20h], rax
loc_3BFA7:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
unsigned __int8 * ma_mempack_get_block_info(
long long a1,
long long a2,
long long a3,
long long *a4,
long long a5,
unsigned __int8 *a6)
{
unsigned long long v8; // rax
long long v9; // rcx
char v10; // dl
unsigned __int8 *v11; // rbx
unsigned long long v12; // rax
long long v13; // r13
long long v14; // rax
v8 = *a6;
if ( v8 > 0xFD )
{
if ( (_DWORD)v8 == 254 )
{
v8 = *(unsigned __int16 *)(a6 + 1);
v9 = 3LL;
}
else if ( *(_BYTE *)(a1 + 1436) == 1 )
{
v8 = *(unsigned __int16 *)(a6 + 1) | (unsigned long long)(a6[3] << 16);
v9 = 4LL;
}
else
{
v8 = *(unsigned int *)(a6 + 1);
v9 = 5LL;
}
}
else
{
v9 = 1LL;
}
v10 = *(_BYTE *)(a1 + 2009);
*(_QWORD *)(a3 + 24) = v8;
v11 = &a6[v9];
if ( *(_DWORD *)(a1 + 1008) )
{
v12 = *v11;
if ( v12 > 0xFD )
{
if ( (_DWORD)v12 == 254 )
{
v12 = *(unsigned __int16 *)(v11 + 1);
v13 = 3LL;
}
else if ( *(_BYTE *)(a1 + 1436) == 1 )
{
v12 = *(unsigned __int16 *)(v11 + 1) | (unsigned long long)(v11[3] << 16);
v13 = 4LL;
}
else
{
v12 = *(unsigned int *)(v11 + 1);
v13 = 5LL;
}
}
else
{
v13 = 1LL;
}
*(_QWORD *)(a3 + 48) = v12;
if ( (unsigned __int8)ma_alloc_buffer(
a4,
a5,
v12 + *(unsigned int *)(a1 + 1060),
((unsigned __int8)(v10 != 0) << 16) | 0x10LL) )
{
return 0LL;
}
else
{
v11 += v13;
v14 = *a4;
*(_QWORD *)(a2 + 24) = *a4;
*(_QWORD *)(a2 + 32) = *(_QWORD *)(a3 + 48) + v14;
}
}
return v11;
}
|
_ma_mempack_get_block_info:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R9
MOV R12,RCX
MOV R15,RDX
MOV R14,RSI
MOVZX EAX,byte ptr [R9]
CMP RAX,0xfd
JA 0x0013bec6
MOV ECX,0x1
JMP 0x0013befe
LAB_0013bec6:
CMP EAX,0xfe
JNZ 0x0013bed8
MOVZX EAX,word ptr [RBX + 0x1]
MOV ECX,0x3
JMP 0x0013befe
LAB_0013bed8:
CMP byte ptr [RDI + 0x59c],0x1
JNZ 0x0013bef6
MOVZX ECX,word ptr [RBX + 0x1]
MOVZX EAX,byte ptr [RBX + 0x3]
SHL EAX,0x10
OR RAX,RCX
MOV ECX,0x4
JMP 0x0013befe
LAB_0013bef6:
MOV EAX,dword ptr [RBX + 0x1]
MOV ECX,0x5
LAB_0013befe:
MOV DL,byte ptr [RDI + 0x7d9]
MOV qword ptr [R15 + 0x18],RAX
ADD RBX,RCX
CMP dword ptr [RDI + 0x3f0],0x0
JZ 0x0013bfa7
XOR ECX,ECX
TEST DL,DL
SETNZ CL
SHL ECX,0x10
OR RCX,0x10
MOVZX EAX,byte ptr [RBX]
CMP RAX,0xfd
JA 0x0013bf39
MOV R13D,0x1
JMP 0x0013bf74
LAB_0013bf39:
CMP EAX,0xfe
JNZ 0x0013bf4c
MOVZX EAX,word ptr [RBX + 0x1]
MOV R13D,0x3
JMP 0x0013bf74
LAB_0013bf4c:
CMP byte ptr [RDI + 0x59c],0x1
JNZ 0x0013bf6b
MOVZX EDX,word ptr [RBX + 0x1]
MOVZX EAX,byte ptr [RBX + 0x3]
SHL EAX,0x10
OR RAX,RDX
MOV R13D,0x4
JMP 0x0013bf74
LAB_0013bf6b:
MOV EAX,dword ptr [RBX + 0x1]
MOV R13D,0x5
LAB_0013bf74:
MOV qword ptr [R15 + 0x30],RAX
MOV EDX,dword ptr [RDI + 0x424]
ADD RDX,RAX
MOV RDI,R12
MOV RSI,R8
CALL 0x00154d8f
TEST AL,AL
JZ 0x0013bf94
XOR EBX,EBX
JMP 0x0013bfa7
LAB_0013bf94:
ADD RBX,R13
MOV RAX,qword ptr [R12]
MOV qword ptr [R14 + 0x18],RAX
ADD RAX,qword ptr [R15 + 0x30]
MOV qword ptr [R14 + 0x20],RAX
LAB_0013bfa7:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
byte * _ma_mempack_get_block_info
(long param_1,long param_2,long param_3,long *param_4,int8 param_5,
byte *param_6)
{
char cVar1;
ulong uVar2;
long lVar3;
uVar2 = (ulong)*param_6;
if (uVar2 < 0xfe) {
lVar3 = 1;
}
else if (*param_6 == 0xfe) {
uVar2 = (ulong)*(ushort *)(param_6 + 1);
lVar3 = 3;
}
else if (*(char *)(param_1 + 0x59c) == '\x01') {
uVar2 = (ulong)*(uint3 *)(param_6 + 1);
lVar3 = 4;
}
else {
uVar2 = (ulong)*(uint *)(param_6 + 1);
lVar3 = 5;
}
cVar1 = *(char *)(param_1 + 0x7d9);
*(ulong *)(param_3 + 0x18) = uVar2;
param_6 = param_6 + lVar3;
if (*(int *)(param_1 + 0x3f0) != 0) {
uVar2 = (ulong)*param_6;
if (uVar2 < 0xfe) {
lVar3 = 1;
}
else if (*param_6 == 0xfe) {
uVar2 = (ulong)*(ushort *)(param_6 + 1);
lVar3 = 3;
}
else if (*(char *)(param_1 + 0x59c) == '\x01') {
uVar2 = (ulong)*(uint3 *)(param_6 + 1);
lVar3 = 4;
}
else {
uVar2 = (ulong)*(uint *)(param_6 + 1);
lVar3 = 5;
}
*(ulong *)(param_3 + 0x30) = uVar2;
cVar1 = _ma_alloc_buffer(param_4,param_5,*(uint *)(param_1 + 0x424) + uVar2,
(ulong)(cVar1 != '\0') << 0x10 | 0x10);
if (cVar1 == '\0') {
param_6 = param_6 + lVar3;
lVar3 = *param_4;
*(long *)(param_2 + 0x18) = lVar3;
*(long *)(param_2 + 0x20) = lVar3 + *(long *)(param_3 + 0x30);
}
else {
param_6 = (byte *)0x0;
}
}
return param_6;
}
|
|
12,482
|
ma_invalidate_stmts
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
void ma_invalidate_stmts(MYSQL *mysql, const char *function_name)
{
if (mysql->stmts)
{
LIST *li_stmt= mysql->stmts;
for (; li_stmt; li_stmt= li_stmt->next)
{
MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data;
stmt->mysql= NULL;
SET_CLIENT_STMT_ERROR(stmt, CR_STMT_CLOSED, SQLSTATE_UNKNOWN, function_name);
}
mysql->stmts= NULL;
}
}
|
O3
|
c
|
ma_invalidate_stmts:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x4c8(%rdi), %r12
testq %r12, %r12
je 0x8ae92
movq %rsi, %r14
movq %rdi, -0x30(%rbp)
leaq 0x3187aa(%rip), %rax # 0x3a35c0
movq (%rax), %r15
leaq 0x3187b0(%rip), %r13 # 0x3a35d0
movq 0x10(%r12), %rbx
movq $0x0, 0x38(%rbx)
movl $0x808, 0x108(%rbx) # imm = 0x808
leaq 0x30d(%rbx), %rdi
movl $0x5, %edx
movq %r15, %rsi
callq 0x39130
movb $0x0, 0x312(%rbx)
movq %r14, %rsi
testq %r14, %r14
jne 0x8ae61
movq 0x1c0(%r13), %rsi
leaq 0x10c(%rbx), %rdi
movl $0x200, %edx # imm = 0x200
callq 0x39130
movb $0x0, 0x30b(%rbx)
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x8ae20
movq -0x30(%rbp), %rax
movq $0x0, 0x4c8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ma_invalidate_stmts:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, [rdi+4C8h]
test r12, r12
jz loc_8AE92
mov r14, rsi
mov [rbp+var_30], rdi
lea rax, SQLSTATE_UNKNOWN
mov r15, [rax]
lea r13, client_errors
loc_8AE20:
mov rbx, [r12+10h]
mov qword ptr [rbx+38h], 0
mov dword ptr [rbx+108h], 808h
lea rdi, [rbx+30Dh]
mov edx, 5
mov rsi, r15
call _strncpy
mov byte ptr [rbx+312h], 0
mov rsi, r14
test r14, r14
jnz short loc_8AE61
mov rsi, [r13+1C0h]
loc_8AE61:
lea rdi, [rbx+10Ch]
mov edx, 200h
call _strncpy
mov byte ptr [rbx+30Bh], 0
mov r12, [r12+8]
test r12, r12
jnz short loc_8AE20
mov rax, [rbp+var_30]
mov qword ptr [rax+4C8h], 0
loc_8AE92:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ma_invalidate_stmts(long long a1, char *a2)
{
long long v2; // r12
char *v4; // r15
long long v5; // rbx
char *v6; // rsi
long long result; // rax
v2 = *(_QWORD *)(a1 + 1224);
if ( v2 )
{
v4 = SQLSTATE_UNKNOWN;
do
{
v5 = *(_QWORD *)(v2 + 16);
*(_QWORD *)(v5 + 56) = 0LL;
*(_DWORD *)(v5 + 264) = 2056;
strncpy(v5 + 781, v4, 5LL);
*(_BYTE *)(v5 + 786) = 0;
v6 = a2;
if ( !a2 )
v6 = client_errors[56];
strncpy(v5 + 268, v6, 512LL);
*(_BYTE *)(v5 + 779) = 0;
v2 = *(_QWORD *)(v2 + 8);
}
while ( v2 );
result = a1;
*(_QWORD *)(a1 + 1224) = 0LL;
}
return result;
}
|
ma_invalidate_stmts:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,qword ptr [RDI + 0x4c8]
TEST R12,R12
JZ 0x0018ae92
MOV R14,RSI
MOV qword ptr [RBP + -0x30],RDI
LEA RAX,[0x4a35c0]
MOV R15,qword ptr [RAX]
LEA R13,[0x4a35d0]
LAB_0018ae20:
MOV RBX,qword ptr [R12 + 0x10]
MOV qword ptr [RBX + 0x38],0x0
MOV dword ptr [RBX + 0x108],0x808
LEA RDI,[RBX + 0x30d]
MOV EDX,0x5
MOV RSI,R15
CALL 0x00139130
MOV byte ptr [RBX + 0x312],0x0
MOV RSI,R14
TEST R14,R14
JNZ 0x0018ae61
MOV RSI,qword ptr [R13 + 0x1c0]
LAB_0018ae61:
LEA RDI,[RBX + 0x10c]
MOV EDX,0x200
CALL 0x00139130
MOV byte ptr [RBX + 0x30b],0x0
MOV R12,qword ptr [R12 + 0x8]
TEST R12,R12
JNZ 0x0018ae20
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x4c8],0x0
LAB_0018ae92:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ma_invalidate_stmts(long param_1,char *param_2)
{
long lVar1;
int *__src;
char *__src_00;
long lVar2;
__src = SQLSTATE_UNKNOWN;
lVar2 = *(long *)(param_1 + 0x4c8);
if (lVar2 != 0) {
do {
lVar1 = *(long *)(lVar2 + 0x10);
*(int8 *)(lVar1 + 0x38) = 0;
*(int4 *)(lVar1 + 0x108) = 0x808;
strncpy((char *)(lVar1 + 0x30d),__src,5);
*(int1 *)(lVar1 + 0x312) = 0;
__src_00 = param_2;
if (param_2 == (char *)0x0) {
__src_00 = PTR_s_Server_closed_statement_due_to_a_004a3790;
}
strncpy((char *)(lVar1 + 0x10c),__src_00,0x200);
*(int1 *)(lVar1 + 0x30b) = 0;
lVar2 = *(long *)(lVar2 + 8);
} while (lVar2 != 0);
*(int8 *)(param_1 + 0x4c8) = 0;
}
return;
}
|
|
12,483
|
my_free
|
eloqsql/mysys/my_malloc.c
|
void my_free(void *ptr)
{
my_memory_header *mh;
size_t old_size;
my_bool old_flags;
DBUG_ENTER("my_free");
DBUG_PRINT("my",("ptr: %p", ptr));
if (ptr == NULL)
DBUG_VOID_RETURN;
mh= USER_TO_HEADER(ptr);
old_size= mh->m_size & ~1;
old_flags= mh->m_size & 1;
PSI_CALL_memory_free(mh->m_key, old_size, mh->m_owner);
update_malloc_size(- (longlong) old_size - HEADER_SIZE, old_flags);
#ifndef SAFEMALLOC
/*
Trash memory if not safemalloc. We don't have to do this if safemalloc
is used as safemalloc will also do trashing
*/
TRASH_FREE(ptr, old_size);
#endif
sf_free(mh);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
my_free:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x2eb2e
cmpq $0x0, -0x8(%rbp)
jne 0x2eb39
jmp 0x2eb37
jmp 0x2ebb3
movq -0x8(%rbp), %rax
addq $-0x18, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
andq $-0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
andq $0x1, %rax
movb %al, -0x19(%rbp)
leaq 0x1a725d(%rip), %rax # 0x1d5dc8
movq (%rax), %rax
movq 0x3f8(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x10(%rcx), %edi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq (%rcx), %rdx
callq *%rax
movq 0x1a6d00(%rip), %rax # 0x1d5890
xorl %ecx, %ecx
movl %ecx, %edi
subq -0x18(%rbp), %rdi
subq $0x18, %rdi
movsbl -0x19(%rbp), %esi
callq *%rax
jmp 0x2eba4
jmp 0x2eba6
jmp 0x2eba8
movq -0x10(%rbp), %rdi
callq 0x24370
jmp 0x2ebb3
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
my_free:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
jmp short $+2
loc_2EB2E:
cmp [rbp+var_8], 0
jnz short loc_2EB39
jmp short $+2
loc_2EB37:
jmp short loc_2EBB3
loc_2EB39:
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFFE8h
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
and rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
and rax, 1
mov [rbp+var_19], al
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+3F8h]
mov rcx, [rbp+var_10]
mov edi, [rcx+10h]
mov rsi, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rdx, [rcx]
call rax
mov rax, cs:update_malloc_size
xor ecx, ecx
mov edi, ecx
sub rdi, [rbp+var_18]
sub rdi, 18h
movsx esi, [rbp+var_19]
call rax ; dummy
jmp short $+2
loc_2EBA4:
jmp short $+2
loc_2EBA6:
jmp short $+2
loc_2EBA8:
mov rdi, [rbp+var_10]
call _free
jmp short $+2
loc_2EBB3:
add rsp, 20h
pop rbp
retn
|
long long my_free(long long a1)
{
long long result; // rax
char v2; // [rsp+7h] [rbp-19h]
unsigned long long v3; // [rsp+8h] [rbp-18h]
if ( a1 )
{
v3 = *(_QWORD *)(a1 - 24 + 8) & 0xFFFFFFFFFFFFFFFELL;
v2 = *(_BYTE *)(a1 - 24 + 8) & 1;
(*((void ( **)(_QWORD, unsigned long long, _QWORD))PSI_server[0] + 127))(
*(unsigned int *)(a1 - 24 + 16),
v3,
*(_QWORD *)(a1 - 24));
update_malloc_size(-(long long)v3 - 24, v2);
return free(a1 - 24);
}
return result;
}
|
my_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0012eb2e
LAB_0012eb2e:
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x0012eb39
JMP 0x0012eb37
LAB_0012eb37:
JMP 0x0012ebb3
LAB_0012eb39:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,-0x18
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
AND RAX,-0x2
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
AND RAX,0x1
MOV byte ptr [RBP + -0x19],AL
LEA RAX,[0x2d5dc8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3f8]
MOV RCX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RCX + 0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX]
CALL RAX
MOV RAX,qword ptr [0x002d5890]
XOR ECX,ECX
MOV EDI,ECX
SUB RDI,qword ptr [RBP + -0x18]
SUB RDI,0x18
MOVSX ESI,byte ptr [RBP + -0x19]
CALL RAX
JMP 0x0012eba4
LAB_0012eba4:
JMP 0x0012eba6
LAB_0012eba6:
JMP 0x0012eba8
LAB_0012eba8:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00124370
JMP 0x0012ebb3
LAB_0012ebb3:
ADD RSP,0x20
POP RBP
RET
|
void my_free(long param_1)
{
int8 uVar1;
ulong uVar2;
if (param_1 != 0) {
uVar2 = *(ulong *)(param_1 + -0x10) & 0xfffffffffffffffe;
uVar1 = *(int8 *)(param_1 + -0x10);
(**(code **)(PSI_server + 0x3f8))
(*(int4 *)(param_1 + -8),uVar2,*(int8 *)(param_1 + -0x18));
(*(code *)update_malloc_size)(-0x18 - uVar2,(byte)uVar1 & 1);
free((int8 *)(param_1 + -0x18));
}
return;
}
|
|
12,484
|
ssz_is_dynamic
|
corpus-core[P]colibri-stateless/src/util/ssz.c
|
bool ssz_is_dynamic(const ssz_def_t* def) {
if (def->type == SSZ_TYPE_CONTAINER) {
for (int i = 0; i < def->def.container.len; i++) {
if (ssz_is_dynamic(def->def.container.elements + i))
return true;
}
}
return def->type == SSZ_TYPE_LIST || def->type == SSZ_TYPE_BIT_LIST || def->type == SSZ_TYPE_UNION;
}
|
O0
|
c
|
ssz_is_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jne 0x1a1cc
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0x1a1ca
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x14(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x1a170
testb $0x1, %al
jne 0x1a1b7
jmp 0x1a1bd
movb $0x1, -0x1(%rbp)
jmp 0x1a200
jmp 0x1a1bf
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1a18d
jmp 0x1a1cc
movq -0x10(%rbp), %rcx
movb $0x1, %al
cmpl $0x4, 0x8(%rcx)
movb %al, -0x15(%rbp)
je 0x1a1f8
movq -0x10(%rbp), %rcx
movb $0x1, %al
cmpl $0x6, 0x8(%rcx)
movb %al, -0x15(%rbp)
je 0x1a1f8
movq -0x10(%rbp), %rax
cmpl $0x7, 0x8(%rax)
sete %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
ssz_is_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp dword ptr [rax+8], 2
jnz short loc_1A1CC
mov [rbp+var_14], 0
loc_1A18D:
mov eax, [rbp+var_14]
mov rcx, [rbp+var_10]
cmp eax, [rcx+18h]
jnb short loc_1A1CA
mov rax, [rbp+var_10]
mov rdi, [rax+10h]
movsxd rax, [rbp+var_14]
shl rax, 5
add rdi, rax
call ssz_is_dynamic
test al, 1
jnz short loc_1A1B7
jmp short loc_1A1BD
loc_1A1B7:
mov [rbp+var_1], 1
jmp short loc_1A200
loc_1A1BD:
jmp short $+2
loc_1A1BF:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_1A18D
loc_1A1CA:
jmp short $+2
loc_1A1CC:
mov rcx, [rbp+var_10]
mov al, 1
cmp dword ptr [rcx+8], 4
mov [rbp+var_15], al
jz short loc_1A1F8
mov rcx, [rbp+var_10]
mov al, 1
cmp dword ptr [rcx+8], 6
mov [rbp+var_15], al
jz short loc_1A1F8
mov rax, [rbp+var_10]
cmp dword ptr [rax+8], 7
setz al
mov [rbp+var_15], al
loc_1A1F8:
mov al, [rbp+var_15]
and al, 1
mov [rbp+var_1], al
loc_1A200:
mov al, [rbp+var_1]
and al, 1
add rsp, 20h
pop rbp
retn
|
char ssz_is_dynamic(long long a1)
{
bool v2; // [rsp+Bh] [rbp-15h]
unsigned int i; // [rsp+Ch] [rbp-14h]
if ( *(_DWORD *)(a1 + 8) == 2 )
{
for ( i = 0; i < *(_DWORD *)(a1 + 24); ++i )
{
if ( (ssz_is_dynamic(32LL * (int)i + *(_QWORD *)(a1 + 16)) & 1) != 0 )
return 1;
}
}
v2 = 1;
if ( *(_DWORD *)(a1 + 8) != 4 )
{
v2 = 1;
if ( *(_DWORD *)(a1 + 8) != 6 )
return *(_DWORD *)(a1 + 8) == 7;
}
return v2;
}
|
ssz_is_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x8],0x2
JNZ 0x0011a1cc
MOV dword ptr [RBP + -0x14],0x0
LAB_0011a18d:
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x18]
JNC 0x0011a1ca
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x10]
MOVSXD RAX,dword ptr [RBP + -0x14]
SHL RAX,0x5
ADD RDI,RAX
CALL 0x0011a170
TEST AL,0x1
JNZ 0x0011a1b7
JMP 0x0011a1bd
LAB_0011a1b7:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0011a200
LAB_0011a1bd:
JMP 0x0011a1bf
LAB_0011a1bf:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0011a18d
LAB_0011a1ca:
JMP 0x0011a1cc
LAB_0011a1cc:
MOV RCX,qword ptr [RBP + -0x10]
MOV AL,0x1
CMP dword ptr [RCX + 0x8],0x4
MOV byte ptr [RBP + -0x15],AL
JZ 0x0011a1f8
MOV RCX,qword ptr [RBP + -0x10]
MOV AL,0x1
CMP dword ptr [RCX + 0x8],0x6
MOV byte ptr [RBP + -0x15],AL
JZ 0x0011a1f8
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x8],0x7
SETZ AL
MOV byte ptr [RBP + -0x15],AL
LAB_0011a1f8:
MOV AL,byte ptr [RBP + -0x15]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_0011a200:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x20
POP RBP
RET
|
bool ssz_is_dynamic(long param_1)
{
ulong uVar1;
bool local_1d;
uint local_1c;
if (*(int *)(param_1 + 8) == 2) {
for (local_1c = 0; local_1c < *(uint *)(param_1 + 0x18); local_1c = local_1c + 1) {
uVar1 = ssz_is_dynamic(*(long *)(param_1 + 0x10) + (long)(int)local_1c * 0x20);
if ((uVar1 & 1) != 0) {
return true;
}
}
}
local_1d = true;
if ((*(int *)(param_1 + 8) != 4) && (local_1d = true, *(int *)(param_1 + 8) != 6)) {
local_1d = *(int *)(param_1 + 8) == 7;
}
return local_1d;
}
|
|
12,485
|
ssz_is_dynamic
|
corpus-core[P]colibri-stateless/src/util/ssz.c
|
bool ssz_is_dynamic(const ssz_def_t* def) {
if (def->type == SSZ_TYPE_CONTAINER) {
for (int i = 0; i < def->def.container.len; i++) {
if (ssz_is_dynamic(def->def.container.elements + i))
return true;
}
}
return def->type == SSZ_TYPE_LIST || def->type == SSZ_TYPE_BIT_LIST || def->type == SSZ_TYPE_UNION;
}
|
O1
|
c
|
ssz_is_dynamic:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x8(%rdi), %r14d
movb $0x1, %bl
leal -0x6(%r14), %eax
cmpl $0x2, %eax
jb 0x1367c
cmpl $0x4, %r14d
je 0x1367c
cmpl $0x2, %r14d
jne 0x1367a
movl 0x18(%rdi), %r12d
testq %r12, %r12
setne %bpl
je 0x1366b
movq 0x10(%rdi), %r15
movq %r15, %rdi
callq 0x135f8
testb %al, %al
jne 0x13666
addq $0x20, %r15
leaq -0x1(%r12), %rbp
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x1366b
movq %r15, %rdi
callq 0x135f8
addq $0x20, %r15
incq %r13
testb %al, %al
je 0x13647
cmpq %r12, %r13
setb %bpl
testb %bpl, %bpl
jne 0x1367c
cmpl $0x8, %r14d
jae 0x1367a
movb $-0x30, %bl
movl %r14d, %ecx
shrb %cl, %bl
jmp 0x1367c
xorl %ebx, %ebx
andb $0x1, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ssz_is_dynamic:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14d, [rdi+8]
mov bl, 1
lea eax, [r14-6]
cmp eax, 2
jb short loc_1367C
cmp r14d, 4
jz short loc_1367C
cmp r14d, 2
jnz short loc_1367A
mov r12d, [rdi+18h]
test r12, r12
setnz bpl
jz short loc_1366B
mov r15, [rdi+10h]
mov rdi, r15
call ssz_is_dynamic
test al, al
jnz short loc_13666
add r15, 20h ; ' '
lea rbp, [r12-1]
xor r13d, r13d
loc_13647:
cmp rbp, r13
jz short loc_1366B
mov rdi, r15
call ssz_is_dynamic
add r15, 20h ; ' '
inc r13
test al, al
jz short loc_13647
cmp r13, r12
setb bpl
loc_13666:
test bpl, bpl
jnz short loc_1367C
loc_1366B:
cmp r14d, 8
jnb short loc_1367A
mov bl, 0D0h
mov ecx, r14d
shr bl, cl
jmp short loc_1367C
loc_1367A:
xor ebx, ebx
loc_1367C:
and bl, 1
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long ssz_is_dynamic(long long a1)
{
unsigned int v1; // ebx
int v2; // r14d
unsigned long long v3; // r12
bool v4; // bp
long long v5; // r15
long long v6; // r15
unsigned long long v7; // r13
char is_dynamic; // al
v2 = *(_DWORD *)(a1 + 8);
LOBYTE(v1) = 1;
if ( (unsigned int)(v2 - 6) >= 2 && v2 != 4 )
{
if ( v2 != 2 )
{
v1 = 0;
goto LABEL_13;
}
v3 = *(unsigned int *)(a1 + 24);
v4 = v3 != 0;
if ( !*(_DWORD *)(a1 + 24) )
goto LABEL_11;
v5 = *(_QWORD *)(a1 + 16);
if ( !(unsigned __int8)ssz_is_dynamic(v5) )
{
v6 = v5 + 32;
v7 = 0LL;
while ( v3 - 1 != v7 )
{
is_dynamic = ssz_is_dynamic(v6);
v6 += 32LL;
++v7;
if ( is_dynamic )
{
v4 = v7 < v3;
goto LABEL_10;
}
}
goto LABEL_11;
}
LABEL_10:
if ( !v4 )
LABEL_11:
LOBYTE(v1) = 52;
}
LABEL_13:
LOBYTE(v1) = v1 & 1;
return v1;
}
|
ssz_is_dynamic:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14D,dword ptr [RDI + 0x8]
MOV BL,0x1
LEA EAX,[R14 + -0x6]
CMP EAX,0x2
JC 0x0011367c
CMP R14D,0x4
JZ 0x0011367c
CMP R14D,0x2
JNZ 0x0011367a
MOV R12D,dword ptr [RDI + 0x18]
TEST R12,R12
SETNZ BPL
JZ 0x0011366b
MOV R15,qword ptr [RDI + 0x10]
MOV RDI,R15
CALL 0x001135f8
TEST AL,AL
JNZ 0x00113666
ADD R15,0x20
LEA RBP,[R12 + -0x1]
XOR R13D,R13D
LAB_00113647:
CMP RBP,R13
JZ 0x0011366b
MOV RDI,R15
CALL 0x001135f8
ADD R15,0x20
INC R13
TEST AL,AL
JZ 0x00113647
CMP R13,R12
SETC BPL
LAB_00113666:
TEST BPL,BPL
JNZ 0x0011367c
LAB_0011366b:
CMP R14D,0x8
JNC 0x0011367a
MOV BL,0xd0
MOV ECX,R14D
SHR BL,CL
JMP 0x0011367c
LAB_0011367a:
XOR EBX,EBX
LAB_0011367c:
AND BL,0x1
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong ssz_is_dynamic(long param_1)
{
int iVar1;
char cVar2;
int8 unaff_RBX;
ulong uVar3;
ulong uVar5;
ulong uVar6;
long lVar7;
bool bVar8;
int7 uVar4;
iVar1 = *(int *)(param_1 + 8);
uVar4 = (int7)((ulong)unaff_RBX >> 8);
uVar3 = CONCAT71(uVar4,1);
if ((1 < iVar1 - 6U) && (iVar1 != 4)) {
if (iVar1 == 2) {
uVar5 = (ulong)*(uint *)(param_1 + 0x18);
bVar8 = uVar5 != 0;
if (bVar8) {
lVar7 = *(long *)(param_1 + 0x10);
cVar2 = ssz_is_dynamic(lVar7);
if (cVar2 == '\0') {
uVar6 = 0;
do {
lVar7 = lVar7 + 0x20;
if (uVar5 - 1 == uVar6) goto code_r0x00113671;
cVar2 = ssz_is_dynamic(lVar7);
uVar6 = uVar6 + 1;
} while (cVar2 == '\0');
bVar8 = uVar6 < uVar5;
}
if (bVar8) goto LAB_0011367c;
}
code_r0x00113671:
uVar3 = CONCAT71(uVar4,0x34);
}
else {
uVar3 = 0;
}
}
LAB_0011367c:
return uVar3 & 0xffffff01;
}
|
|
12,486
|
mi_find_half_pos
|
eloqsql/storage/myisam/mi_write.c
|
uchar *_mi_find_half_pos(uint nod_flag, MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint *return_key_length,
uchar **after_key)
{
uint keys,length,key_ref_length;
uchar *end,*lastpos;
DBUG_ENTER("_mi_find_half_pos");
key_ref_length=2+nod_flag;
length=mi_getint(page)-key_ref_length;
page+=key_ref_length;
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |
HA_BINARY_PACK_KEY)))
{
key_ref_length=keyinfo->keylength+nod_flag;
keys=length/(key_ref_length*2);
*return_key_length=keyinfo->keylength;
end=page+keys*key_ref_length;
*after_key=end+key_ref_length;
memcpy(key,end,key_ref_length);
DBUG_RETURN(end);
}
end=page+length/2-key_ref_length; /* This is aprox. half */
*key='\0';
do
{
lastpos=page;
if (!(length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key)))
DBUG_RETURN(0);
} while (page < end);
*return_key_length=length;
*after_key=page;
DBUG_PRINT("exit",("returns: %p page: %p half: %p",
lastpos, page, end));
DBUG_RETURN(lastpos);
}
|
O3
|
c
|
mi_find_half_pos:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rsi, %r11
movl %edi, %r10d
leal 0x2(%r10), %esi
movzbl 0x1(%rdx), %edx
movzbl (%r12), %eax
andl $0x7f, %eax
shll $0x8, %eax
orl %edx, %eax
subl %esi, %eax
addq %rsi, %r12
movq %r12, -0x30(%rbp)
testb $0x2e, 0xa(%r11)
je 0x89612
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
shrl %eax
addq %r12, %rax
subq %rsi, %rax
movq %rax, -0x48(%rbp)
movb $0x0, (%rcx)
movq %r12, %r14
movq %r11, %rdi
movq %r10, %rbx
movl %r10d, %esi
leaq -0x30(%rbp), %rdx
movq %rcx, %r15
movq %r11, %r13
callq *0x48(%r11)
testl %eax, %eax
je 0x89646
movq -0x30(%rbp), %r12
cmpq -0x48(%rbp), %r12
movq %r15, %rcx
movq %rbx, %r10
movq %r13, %r11
jb 0x895d2
movq -0x38(%rbp), %rcx
movl %eax, (%rcx)
movq -0x40(%rbp), %rax
movq %r12, (%rax)
jmp 0x89649
movzwl 0x12(%r11), %edi
addl %edi, %r10d
leal (%r10,%r10), %esi
xorl %edx, %edx
divl %esi
movl %edi, (%r8)
imull %r10d, %eax
addq %rax, %r12
leaq (%r12,%r10), %rax
movq %rax, (%r9)
movq %rcx, %rdi
movq %r12, %rsi
movq %r10, %rdx
callq 0x29080
movq %r12, %r14
jmp 0x89649
xorl %r14d, %r14d
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_mi_find_half_pos:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, rdx
mov r11, rsi
mov r10d, edi
lea esi, [r10+2]
movzx edx, byte ptr [rdx+1]
movzx eax, byte ptr [r12]
and eax, 7Fh
shl eax, 8
or eax, edx
sub eax, esi
add r12, rsi
mov [rbp+var_30], r12
test byte ptr [r11+0Ah], 2Eh
jz short loc_89612
mov [rbp+var_38], r8
mov [rbp+var_40], r9
shr eax, 1
add rax, r12
sub rax, rsi
mov [rbp+var_48], rax
mov byte ptr [rcx], 0
loc_895D2:
mov r14, r12
mov rdi, r11
mov rbx, r10
mov esi, r10d
lea rdx, [rbp+var_30]
mov r15, rcx
mov r13, r11
call qword ptr [r11+48h]
test eax, eax
jz short loc_89646
mov r12, [rbp+var_30]
cmp r12, [rbp+var_48]
mov rcx, r15
mov r10, rbx
mov r11, r13
jb short loc_895D2
mov rcx, [rbp+var_38]
mov [rcx], eax
mov rax, [rbp+var_40]
mov [rax], r12
jmp short loc_89649
loc_89612:
movzx edi, word ptr [r11+12h]
add r10d, edi
lea esi, [r10+r10]
xor edx, edx
div esi
mov [r8], edi
imul eax, r10d
add r12, rax
lea rax, [r12+r10]
mov [r9], rax
mov rdi, rcx
mov rsi, r12
mov rdx, r10
call _memcpy
mov r14, r12
jmp short loc_89649
loc_89646:
xor r14d, r14d
loc_89649:
mov rax, r14
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_BYTE * mi_find_half_pos(unsigned int a1, long long a2, _BYTE *a3, _BYTE *a4, _DWORD *a5, _QWORD *a6)
{
long long v7; // r10
long long v8; // rsi
unsigned int v9; // eax
_BYTE *v10; // r12
_BYTE *v11; // r14
long long v12; // rbx
_BYTE *v13; // r15
long long v14; // r13
int v15; // eax
int v16; // edi
long long v17; // r10
_BYTE *v18; // r12
_BYTE *v20; // [rsp+8h] [rbp-48h]
_BYTE *v23; // [rsp+20h] [rbp-30h] BYREF
v7 = a1;
v8 = a1 + 2;
v9 = ((unsigned __int8)a3[1] | ((*a3 & 0x7F) << 8)) - v8;
v10 = &a3[v8];
v23 = &a3[v8];
if ( (*(_BYTE *)(a2 + 10) & 0x2E) != 0 )
{
v20 = &a3[v9 >> 1];
*a4 = 0;
while ( 1 )
{
v11 = v10;
v12 = v7;
v13 = a4;
v14 = a2;
v15 = (*(long long ( **)(long long, _QWORD, _BYTE **))(a2 + 72))(a2, (unsigned int)v7, &v23);
if ( !v15 )
break;
v10 = v23;
a4 = v13;
v7 = v12;
a2 = v14;
if ( v23 >= v20 )
{
*a5 = v15;
*a6 = v10;
return v11;
}
}
return 0LL;
}
else
{
v16 = *(unsigned __int16 *)(a2 + 18);
v17 = (unsigned int)(v16 + v7);
*a5 = v16;
v18 = &v10[(unsigned int)v17 * (v9 / (2 * (int)v17))];
*a6 = &v18[v17];
memcpy(a4, v18, v17);
return v18;
}
}
|
_mi_find_half_pos:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,RDX
MOV R11,RSI
MOV R10D,EDI
LEA ESI,[R10 + 0x2]
MOVZX EDX,byte ptr [RDX + 0x1]
MOVZX EAX,byte ptr [R12]
AND EAX,0x7f
SHL EAX,0x8
OR EAX,EDX
SUB EAX,ESI
ADD R12,RSI
MOV qword ptr [RBP + -0x30],R12
TEST byte ptr [R11 + 0xa],0x2e
JZ 0x00189612
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x40],R9
SHR EAX,0x1
ADD RAX,R12
SUB RAX,RSI
MOV qword ptr [RBP + -0x48],RAX
MOV byte ptr [RCX],0x0
LAB_001895d2:
MOV R14,R12
MOV RDI,R11
MOV RBX,R10
MOV ESI,R10D
LEA RDX,[RBP + -0x30]
MOV R15,RCX
MOV R13,R11
CALL qword ptr [R11 + 0x48]
TEST EAX,EAX
JZ 0x00189646
MOV R12,qword ptr [RBP + -0x30]
CMP R12,qword ptr [RBP + -0x48]
MOV RCX,R15
MOV R10,RBX
MOV R11,R13
JC 0x001895d2
MOV RCX,qword ptr [RBP + -0x38]
MOV dword ptr [RCX],EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],R12
JMP 0x00189649
LAB_00189612:
MOVZX EDI,word ptr [R11 + 0x12]
ADD R10D,EDI
LEA ESI,[R10 + R10*0x1]
XOR EDX,EDX
DIV ESI
MOV dword ptr [R8],EDI
IMUL EAX,R10D
ADD R12,RAX
LEA RAX,[R12 + R10*0x1]
MOV qword ptr [R9],RAX
MOV RDI,RCX
MOV RSI,R12
MOV RDX,R10
CALL 0x00129080
MOV R14,R12
JMP 0x00189649
LAB_00189646:
XOR R14D,R14D
LAB_00189649:
MOV RAX,R14
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
byte * _mi_find_half_pos(int param_1,long param_2,byte *param_3,int1 *param_4,uint *param_5,
long *param_6)
{
uint uVar1;
byte *pbVar2;
uint uVar3;
byte *__src;
byte *local_38;
uVar3 = param_1 + 2;
uVar1 = ((*param_3 & 0x7f) << 8 | (uint)param_3[1]) - uVar3;
local_38 = param_3 + uVar3;
if ((*(byte *)(param_2 + 10) & 0x2e) == 0) {
uVar3 = param_1 + (uint)*(ushort *)(param_2 + 0x12);
*param_5 = (uint)*(ushort *)(param_2 + 0x12);
__src = local_38 + (uVar1 / (uVar3 * 2)) * uVar3;
*param_6 = (long)(__src + uVar3);
memcpy(param_4,__src,(ulong)uVar3);
}
else {
pbVar2 = local_38 + ((ulong)(uVar1 >> 1) - (ulong)uVar3);
*param_4 = 0;
do {
__src = local_38;
uVar1 = (**(code **)(param_2 + 0x48))(param_2,param_1,&local_38,param_4);
if (uVar1 == 0) {
return (byte *)0x0;
}
} while (local_38 < pbVar2);
*param_5 = uVar1;
*param_6 = (long)local_38;
}
return __src;
}
|
|
12,487
|
moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::ExplicitProducer(moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>*)
|
AlayaLite/build_O0/_deps/concurrentqueue-src/concurrentqueue.h
|
explicit ExplicitProducer(ConcurrentQueue* parent_) :
ProducerBase(parent_, true),
blockIndex(nullptr),
pr_blockIndexSlotsUsed(0),
pr_blockIndexSize(EXPLICIT_INITIAL_INDEX_SIZE >> 1),
pr_blockIndexFront(0),
pr_blockIndexEntries(nullptr),
pr_blockIndexRaw(nullptr)
{
size_t poolBasedIndexSize = details::ceil_to_pow_2(parent_->initialBlockPoolSize) >> 1;
if (poolBasedIndexSize > pr_blockIndexSize) {
pr_blockIndexSize = poolBasedIndexSize;
}
new_block_index(0); // This creates an index with double the number of current entries, i.e. EXPLICIT_INITIAL_INDEX_SIZE
}
|
O0
|
c
|
moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::ExplicitProducer(moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>*):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x28(%rsp), %rsi
movl $0x1, %edx
callq 0x6bdb0
movq (%rsp), %rdi
leaq 0x1609ff(%rip), %rax # 0x1cc6f0
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x58, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6be60
movq (%rsp), %rax
movq $0x0, 0x60(%rax)
movq $0x10, 0x68(%rax)
movq $0x0, 0x70(%rax)
movq $0x0, 0x78(%rax)
movq $0x0, 0x80(%rax)
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x67600
movq %rax, 0x8(%rsp)
jmp 0x6bd49
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
shrq %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x68(%rcx), %rax
jbe 0x6bd8d
movq (%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x68(%rax)
jmp 0x6bd8d
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
callq 0x6c750
jmp 0x6bda1
movq (%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6be90
jmp 0x6bd9c
addq $0x38, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x15dd0
nopl (%rax,%rax)
|
_ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducerC2EPS5_:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov rdi, [rsp+38h+var_8]
mov [rsp+38h+var_38], rdi
mov rsi, [rsp+38h+var_10]
mov edx, 1
call _ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE12ProducerBaseC2EPS5_b; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::ProducerBase(moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>*,bool)
mov rdi, [rsp+38h+var_38]
lea rax, _ZTVN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducerE; `vtable for'moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer
add rax, 10h
mov [rdi], rax
add rdi, 58h ; 'X'
xor eax, eax
mov esi, eax
call _ZNSt6atomicIPN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer16BlockIndexHeaderEEC2ES9_; std::atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::BlockIndexHeader *>::atomic(moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::BlockIndexHeader *)
mov rax, [rsp+38h+var_38]
mov qword ptr [rax+60h], 0
mov qword ptr [rax+68h], 10h
mov qword ptr [rax+70h], 0
mov qword ptr [rax+78h], 0
mov qword ptr [rax+80h], 0
mov rax, [rsp+38h+var_10]
mov rdi, [rax+20h]
call _ZN10moodycamel7detailsL13ceil_to_pow_2ImEET_S2_; moodycamel::details::ceil_to_pow_2<ulong>(ulong)
mov [rsp+38h+var_30], rax
jmp short $+2
loc_6BD49:
mov rcx, [rsp+38h+var_38]
mov rax, [rsp+38h+var_30]
shr rax, 1
mov [rsp+38h+var_18], rax
mov rax, [rsp+38h+var_18]
cmp rax, [rcx+68h]
jbe short loc_6BD8D
mov rax, [rsp+38h+var_38]
mov rcx, [rsp+38h+var_18]
mov [rax+68h], rcx
jmp short loc_6BD8D
mov rdi, [rsp+0]
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
call _ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE12ProducerBaseD2Ev; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::~ProducerBase()
jmp short loc_6BDA1
loc_6BD8D:
mov rdi, [rsp+38h+var_38]
xor eax, eax
mov esi, eax
call _ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer15new_block_indexEm; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::new_block_index(ulong)
jmp short $+2
loc_6BD9C:
add rsp, 38h
retn
loc_6BDA1:
mov rdi, [rsp+arg_10]
call __Unwind_Resume
|
long long moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::ExplicitProducer(
_QWORD *a1,
long long a2)
{
unsigned long long v3; // [rsp+20h] [rbp-18h]
moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase::ProducerBase(
a1,
a2,
1LL);
*a1 = &`vtable for'moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer
+ 2;
std::atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::BlockIndexHeader *>::atomic(
a1 + 11,
0LL);
a1[12] = 0LL;
a1[13] = 16LL;
a1[14] = 0LL;
a1[15] = 0LL;
a1[16] = 0LL;
v3 = moodycamel::details::ceil_to_pow_2<unsigned long>(*(_QWORD *)(a2 + 32)) >> 1;
if ( v3 > a1[13] )
a1[13] = v3;
return moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::new_block_index(
a1,
0LL);
}
|
ExplicitProducer:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV RDI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP],RDI
MOV RSI,qword ptr [RSP + 0x28]
MOV EDX,0x1
CALL 0x0016bdb0
MOV RDI,qword ptr [RSP]
LEA RAX,[0x2cc6f0]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
ADD RDI,0x58
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0016be60
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x60],0x0
MOV qword ptr [RAX + 0x68],0x10
MOV qword ptr [RAX + 0x70],0x0
MOV qword ptr [RAX + 0x78],0x0
MOV qword ptr [RAX + 0x80],0x0
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x20]
LAB_0016bd3d:
CALL 0x00167600
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0016bd49
LAB_0016bd49:
MOV RCX,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x8]
SHR RAX,0x1
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,qword ptr [RCX + 0x68]
JBE 0x0016bd8d
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x68],RCX
JMP 0x0016bd8d
LAB_0016bd8d:
MOV RDI,qword ptr [RSP]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0016be90
LAB_0016bd9a:
JMP 0x0016bd9c
LAB_0016bd9c:
ADD RSP,0x38
RET
|
/* moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,
moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::ExplicitProducer(moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,
moodycamel::ConcurrentQueueDefaultTraits>*) */
void __thiscall
moodycamel::
ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::
ExplicitProducer::ExplicitProducer(ExplicitProducer *this,ConcurrentQueue *param_1)
{
ulong uVar1;
ProducerBase::ProducerBase((ProducerBase *)this,param_1,true);
*(int ***)this = &PTR__ExplicitProducer_002cc700;
std::
atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::BlockIndexHeader*>
::atomic((atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::BlockIndexHeader*>
*)(this + 0x58),(BlockIndexHeader *)0x0);
*(int8 *)(this + 0x60) = 0;
*(int8 *)(this + 0x68) = 0x10;
*(int8 *)(this + 0x70) = 0;
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
/* try { // try from 0016bd3d to 0016bd99 has its CatchHandler @ 0016bd74 */
uVar1 = details::ceil_to_pow_2<unsigned_long>(*(ulong *)(param_1 + 0x20));
if (*(ulong *)(this + 0x68) < uVar1 >> 1) {
*(ulong *)(this + 0x68) = uVar1 >> 1;
}
new_block_index(this,0);
return;
}
|
|
12,488
|
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&)
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
std::string _generate_union_rule(const std::string & name, const std::vector<json> & alt_schemas) {
std::vector<std::string> rules;
for (size_t i = 0; i < alt_schemas.size(); i++) {
rules.push_back(visit(alt_schemas[i], name + (name.empty() ? "alternative-" : "-") + std::to_string(i)));
}
return string_join(rules, " | ");
}
|
O2
|
cpp
|
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %r14
movq %rdx, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
xorl %r13d, %r13d
xorl %ebp, %ebp
movq (%r14), %rbx
movq 0x8(%r14), %rax
subq %rbx, %rax
sarq $0x4, %rax
cmpq %rax, %rbp
jae 0x91075
movq 0x18(%rsp), %rsi
cmpq $0x0, 0x8(%rsi)
leaq 0x1e929(%rip), %rdx # 0xaf909
leaq 0x2780c(%rip), %rax # 0xb87f3
cmoveq %rax, %rdx
leaq 0x58(%rsp), %rdi
callq 0x39013
leaq 0x78(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x42699
leaq 0x98(%rsp), %r15
movq %r15, %rdi
leaq 0x58(%rsp), %rsi
movq %r12, %rdx
callq 0x3a083
addq %r13, %rbx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x8f114
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x3b876
movq %r12, %rdi
callq 0x241f8
movq %r15, %rdi
callq 0x241f8
leaq 0x78(%rsp), %rdi
callq 0x241f8
leaq 0x58(%rsp), %rdi
callq 0x241f8
incq %rbp
addq $0x10, %r13
jmp 0x90fb8
leaq 0x2792e(%rip), %rsi # 0xb89aa
leaq 0x38(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x27c44
leaq 0x20(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x54736
leaq 0x38(%rsp), %rdi
callq 0x241f8
leaq 0x20(%rsp), %rdi
callq 0x27c80
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x91112
jmp 0x91119
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x241f8
jmp 0x910ec
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x241f8
jmp 0x91103
movq %rax, %rbx
jmp 0x9110d
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x241f8
leaq 0x58(%rsp), %rdi
callq 0x241f8
jmp 0x9111c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x27c80
movq %rbx, %rdi
callq 0x23fb0
|
_ZN15SchemaConverter20_generate_union_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapES8_S5_blmdSaNSA_14adl_serializerES8_IhSaIhEEvEESaISG_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r14, rcx
mov [rsp+0E8h+var_D0], rdx
mov [rsp+0E8h+var_D8], rsi
mov [rsp+0E8h+var_E0], rdi
xorps xmm0, xmm0
lea rax, [rsp+0E8h+var_C8]
movaps xmmword ptr [rax], xmm0
and qword ptr [rax+10h], 0
xor r13d, r13d
xor ebp, ebp
loc_90FB8:
mov rbx, [r14]
mov rax, [r14+8]
sub rax, rbx
sar rax, 4
cmp rbp, rax
jnb loc_91075
mov rsi, [rsp+0E8h+var_D0]
cmp qword ptr [rsi+8], 0
lea rdx, asc_AF908+1; "-"
lea rax, aAlternative; "alternative-"
cmovz rdx, rax
lea rdi, [rsp+0E8h+var_90]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
lea r12, [rsp+0E8h+var_70]
mov rdi, r12; this
mov rsi, rbp; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea r15, [rsp+0E8h+var_50]
mov rdi, r15
lea rsi, [rsp+0E8h+var_90]
mov rdx, r12
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
add rbx, r13
lea r12, [rsp+0E8h+var_B0]
mov rdi, r12
mov rsi, [rsp+0E8h+var_D8]
mov rdx, rbx
mov rcx, r15
call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,std::string const&)
lea rdi, [rsp+0E8h+var_C8]
mov rsi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
inc rbp
add r13, 10h
jmp loc_90FB8
loc_91075:
lea rsi, asc_B89A9+1; " | "
lea rdi, [rsp+0E8h+var_B0]
lea rdx, [rsp+0E8h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, [rsp+0E8h+var_C8]
lea rdx, [rsp+0E8h+var_B0]
mov rbx, [rsp+0E8h+var_E0]
mov rdi, rbx
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rdi, [rsp+0E8h+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_C8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, rbx
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_30]
jmp short loc_91112
jmp short loc_91119
mov rbx, rax
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_910EC
mov rbx, rax
loc_910EC:
lea rdi, [rsp+arg_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_91103
mov rbx, rax
jmp short loc_9110D
mov rbx, rax
loc_91103:
lea rdi, [rsp+arg_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_9110D:
lea rdi, [rsp+arg_50]; void *
loc_91112:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_9111C
loc_91119:
mov rbx, rax
loc_9111C:
lea rdi, [rsp+arg_18]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, rbx
call __Unwind_Resume
|
long long SchemaConverter::_generate_union_rule(long long a1, long long a2, long long a3, long long *a4)
{
long long v5; // r13
unsigned long long i; // rbp
long long v7; // rbx
char *v8; // rdx
__int128 v11; // [rsp+20h] [rbp-C8h] BYREF
long long v12; // [rsp+30h] [rbp-B8h]
_QWORD v13[4]; // [rsp+38h] [rbp-B0h] BYREF
_QWORD v14[4]; // [rsp+58h] [rbp-90h] BYREF
_QWORD v15[4]; // [rsp+78h] [rbp-70h] BYREF
_BYTE v16[80]; // [rsp+98h] [rbp-50h] BYREF
v11 = 0LL;
v12 = 0LL;
v5 = 0LL;
for ( i = 0LL; ; ++i )
{
v7 = *a4;
if ( i >= (a4[1] - *a4) >> 4 )
break;
v8 = "-";
if ( !*(_QWORD *)(a3 + 8) )
v8 = "alternative-";
std::operator+<char>((long long)v14, a3, (long long)v8);
std::to_string((std::__cxx11 *)v15, i);
std::operator+<char>((long long)v16, v14, v15);
SchemaConverter::visit(v13, a2, (unsigned __int8 *)(v5 + v7), (long long)v16, (__m128d)0LL);
std::vector<std::string>::emplace_back<std::string>((long long)&v11, (long long)v13);
std::string::~string(v13);
std::string::~string(v16);
std::string::~string(v15);
std::string::~string(v14);
v5 += 16LL;
}
std::string::basic_string<std::allocator<char>>(v13, (long long)" | ");
string_join(a1, (long long *)&v11, (long long)v13);
std::string::~string(v13);
std::vector<std::string>::~vector((long long)&v11);
return a1;
}
|
_generate_union_rule:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R14,RCX
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDI
XORPS XMM0,XMM0
LEA RAX,[RSP + 0x20]
MOVAPS xmmword ptr [RAX],XMM0
AND qword ptr [RAX + 0x10],0x0
XOR R13D,R13D
XOR EBP,EBP
LAB_00190fb8:
MOV RBX,qword ptr [R14]
MOV RAX,qword ptr [R14 + 0x8]
SUB RAX,RBX
SAR RAX,0x4
CMP RBP,RAX
JNC 0x00191075
MOV RSI,qword ptr [RSP + 0x18]
CMP qword ptr [RSI + 0x8],0x0
LEA RDX,[0x1af909]
LEA RAX,[0x1b87f3]
CMOVZ RDX,RAX
LAB_00190feb:
LEA RDI,[RSP + 0x58]
CALL 0x00139013
LAB_00190ff5:
LEA R12,[RSP + 0x78]
MOV RDI,R12
MOV RSI,RBP
CALL 0x00142699
LAB_00191005:
LEA R15,[RSP + 0x98]
MOV RDI,R15
LEA RSI,[RSP + 0x58]
MOV RDX,R12
CALL 0x0013a083
LAB_0019101d:
ADD RBX,R13
LEA R12,[RSP + 0x38]
MOV RDI,R12
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RBX
MOV RCX,R15
CALL 0x0018f114
LAB_00191038:
LEA RDI,[RSP + 0x20]
MOV RSI,R12
CALL 0x0013b876
MOV RDI,R12
CALL 0x001241f8
MOV RDI,R15
CALL 0x001241f8
LEA RDI,[RSP + 0x78]
CALL 0x001241f8
LEA RDI,[RSP + 0x58]
CALL 0x001241f8
INC RBP
ADD R13,0x10
JMP 0x00190fb8
LAB_00191075:
LEA RSI,[0x1b89aa]
LEA RDI,[RSP + 0x38]
LEA RDX,[RSP + 0x98]
CALL 0x00127c44
LAB_0019108e:
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0x38]
MOV RBX,qword ptr [RSP + 0x8]
MOV RDI,RBX
CALL 0x00154736
LAB_001910a5:
LEA RDI,[RSP + 0x38]
CALL 0x001241f8
LEA RDI,[RSP + 0x20]
CALL 0x00127c80
MOV RAX,RBX
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::_generate_union_rule(std::__cxx11::string const&,
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > const&) */
string * SchemaConverter::_generate_union_rule(string *param_1,vector *param_2)
{
long *in_RCX;
char *in_RDX;
ulong uVar1;
int8 local_c8;
int8 uStack_c0;
int8 local_b8;
string local_b0 [32];
string local_90 [32];
__cxx11 local_70 [32];
string local_50 [32];
local_c8 = 0;
uStack_c0 = 0;
local_b8 = 0;
for (uVar1 = 0; uVar1 < (ulong)(in_RCX[1] - *in_RCX >> 4); uVar1 = uVar1 + 1) {
/* try { // try from 00190feb to 00190ff4 has its CatchHandler @ 00191119 */
std::operator+(local_90,in_RDX);
/* try { // try from 00190ff5 to 00191004 has its CatchHandler @ 001910fb */
std::__cxx11::to_string(local_70,uVar1);
/* try { // try from 00191005 to 0019101c has its CatchHandler @ 00191100 */
std::operator+(local_50,local_90);
/* try { // try from 0019101d to 00191037 has its CatchHandler @ 001910e9 */
visit(local_b0,(string *)param_2);
/* try { // try from 00191038 to 00191044 has its CatchHandler @ 001910da */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8,
local_b0);
std::__cxx11::string::~string(local_b0);
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string((string *)local_70);
std::__cxx11::string::~string(local_90);
}
/* try { // try from 00191075 to 0019108d has its CatchHandler @ 001910d8 */
std::__cxx11::string::string<std::allocator<char>>(local_b0," | ",(allocator *)local_50);
/* try { // try from 0019108e to 001910a4 has its CatchHandler @ 001910ce */
string_join((vector *)param_1,(string *)&local_c8);
std::__cxx11::string::~string(local_b0);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8);
return param_1;
}
|
|
12,489
|
CustomAllocTest_ReallocNull_Test::TestBody()
|
seiftnesse[P]memoryallocator/tests/test_allocator.cpp
|
TEST_F(CustomAllocTest, ReallocNull) {
const size_t size = 1024;
// realloc with null should act like malloc
void *ptr = _realloc(nullptr, size);
ASSERT_NE(ptr, nullptr);
// Fill memory
fillMemory(ptr, size, 0xDE);
EXPECT_TRUE(verifyPattern(ptr, size, 0xDE));
_free(ptr);
}
|
O1
|
cpp
|
CustomAllocTest_ReallocNull_Test::TestBody():
pushq %rbx
movq %rdi, %rbx
callq 0x242c6
movl $0x10, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x94c0
nop
|
_ZN32CustomAllocTest_ReallocNull_TestD0Ev:
push rbx
mov rbx, rdi
call _ZN7testing4TestD2Ev; testing::Test::~Test()
mov esi, 10h; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
|
void CustomAllocTest_ReallocNull_Test::~CustomAllocTest_ReallocNull_Test(
CustomAllocTest_ReallocNull_Test *this)
{
testing::Test::~Test(this);
operator delete(this, 0x10uLL);
}
|
~CustomAllocTest_ReallocNull_Test:
PUSH RBX
MOV RBX,RDI
CALL 0x001242c6
MOV ESI,0x10
MOV RDI,RBX
POP RBX
JMP 0x001094c0
|
/* CustomAllocTest_ReallocNull_Test::~CustomAllocTest_ReallocNull_Test() */
void __thiscall
CustomAllocTest_ReallocNull_Test::~CustomAllocTest_ReallocNull_Test
(CustomAllocTest_ReallocNull_Test *this)
{
testing::Test::~Test((Test *)this);
operator_delete(this,0x10);
return;
}
|
|
12,490
|
combine_filename
|
corpus-core[P]colibri-stateless/src/util/plugin.c
|
static char* combine_filename(char* name) {
const char* base_path = getenv("C4_STATES_DIR");
if (base_path != NULL) {
size_t length = strlen(base_path) + strlen(name) + 2;
char* full_path = safe_malloc(length);
if (full_path == NULL) return NULL;
snprintf(full_path, length, "%s/%s", base_path, name);
return full_path;
}
else
return strdup(name);
}
|
O0
|
c
|
combine_filename:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x348b9(%rip), %rdi # 0x5454c
callq 0x5200
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1fd11
movq -0x18(%rbp), %rdi
callq 0x5130
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5130
movq %rax, %rcx
movq -0x30(%rbp), %rax
addq %rcx, %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x185a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1fce9
movq $0x0, -0x8(%rbp)
jmp 0x1fd1e
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %r8
leaq 0x3485a(%rip), %rdx # 0x5455a
movb $0x0, %al
callq 0x5180
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1fd1e
movq -0x10(%rbp), %rdi
callq 0x5030
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
combine_filename:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
lea rdi, aC4StatesDir; "C4_STATES_DIR"
call _getenv
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_1FD11
mov rdi, [rbp+var_18]
call _strlen
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
call _strlen
mov rcx, rax
mov rax, [rbp+var_30]
add rax, rcx
add rax, 2
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
call safe_malloc
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_1FCE9
mov [rbp+var_8], 0
jmp short loc_1FD1E
loc_1FCE9:
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_10]
lea rdx, aSS_0; "%s/%s"
mov al, 0
call _snprintf
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_1FD1E
loc_1FD11:
mov rdi, [rbp+var_10]
call _strdup
mov [rbp+var_8], rax
loc_1FD1E:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
long long combine_filename(const char *a1)
{
long long v2; // [rsp+0h] [rbp-30h]
long long v3; // [rsp+8h] [rbp-28h]
long long v4; // [rsp+10h] [rbp-20h]
const char *v5; // [rsp+18h] [rbp-18h]
v5 = (const char *)getenv("C4_STATES_DIR");
if ( !v5 )
return strdup(a1);
v2 = strlen(v5);
v4 = strlen(a1) + v2 + 2;
v3 = safe_malloc(v4);
if ( !v3 )
return 0LL;
snprintf(v3, v4, "%s/%s", v5, a1);
return v3;
}
|
combine_filename:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
LEA RDI,[0x15454c]
CALL 0x00105200
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0011fd11
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00105130
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00105130
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,RCX
ADD RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001185a0
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x0011fce9
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0011fd1e
LAB_0011fce9:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x10]
LEA RDX,[0x15455a]
MOV AL,0x0
CALL 0x00105180
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0011fd1e
LAB_0011fd11:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00105030
MOV qword ptr [RBP + -0x8],RAX
LAB_0011fd1e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
char * combine_filename(char *param_1)
{
char *__s;
size_t sVar1;
size_t sVar2;
char *local_10;
__s = getenv("C4_STATES_DIR");
if (__s == (char *)0x0) {
local_10 = strdup(param_1);
}
else {
sVar1 = strlen(__s);
sVar2 = strlen(param_1);
sVar1 = sVar1 + sVar2 + 2;
local_10 = (char *)safe_malloc(sVar1);
if (local_10 == (char *)0x0) {
local_10 = (char *)0x0;
}
else {
snprintf(local_10,sVar1,"%s/%s",__s,param_1);
}
}
return local_10;
}
|
|
12,491
|
combine_filename
|
corpus-core[P]colibri-stateless/src/util/plugin.c
|
static char* combine_filename(char* name) {
const char* base_path = getenv("C4_STATES_DIR");
if (base_path != NULL) {
size_t length = strlen(base_path) + strlen(name) + 2;
char* full_path = safe_malloc(length);
if (full_path == NULL) return NULL;
snprintf(full_path, length, "%s/%s", base_path, name);
return full_path;
}
else
return strdup(name);
}
|
O1
|
c
|
combine_filename:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x284a1(%rip), %rdi # 0x3f49c
callq 0x5230
testq %rax, %rax
je 0x1704f
movq %rax, %r14
movq %rax, %rdi
callq 0x5140
movq %rax, %r15
movq %rbx, %rdi
callq 0x5140
leaq (%r15,%rax), %r12
addq $0x2, %r12
movq %r12, %rdi
callq 0x12838
testq %rax, %rax
je 0x17062
movq %rax, %r15
leaq 0x28470(%rip), %rdx # 0x3f4aa
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x51a0
jmp 0x17065
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5030
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
combine_filename:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
lea rdi, aC4StatesDir; "C4_STATES_DIR"
call _getenv
test rax, rax
jz short loc_1704F
mov r14, rax
mov rdi, rax
call _strlen
mov r15, rax
mov rdi, rbx
call _strlen
lea r12, [r15+rax]
add r12, 2
mov rdi, r12
call safe_malloc
test rax, rax
jz short loc_17062
mov r15, rax
lea rdx, aSS_0; "%s/%s"
mov rdi, rax
mov rsi, r12
mov rcx, r14
mov r8, rbx
xor eax, eax
call _snprintf
jmp short loc_17065
loc_1704F:
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _strdup
loc_17062:
xor r15d, r15d
loc_17065:
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
long long combine_filename(const char *a1)
{
long long v1; // rax
const char *v2; // r14
long long v3; // r15
long long v4; // r12
long long v5; // rax
long long v6; // r15
v1 = getenv("C4_STATES_DIR");
if ( !v1 )
return strdup(a1);
v2 = (const char *)v1;
v3 = strlen(v1);
v4 = v3 + strlen(a1) + 2;
v5 = safe_malloc(v4);
if ( !v5 )
return 0LL;
v6 = v5;
snprintf(v5, v4, "%s/%s", v2, a1);
return v6;
}
|
combine_filename:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RDI,[0x13f49c]
CALL 0x00105230
TEST RAX,RAX
JZ 0x0011704f
MOV R14,RAX
MOV RDI,RAX
CALL 0x00105140
MOV R15,RAX
MOV RDI,RBX
CALL 0x00105140
LEA R12,[R15 + RAX*0x1]
ADD R12,0x2
MOV RDI,R12
CALL 0x00112838
TEST RAX,RAX
JZ 0x00117062
MOV R15,RAX
LEA RDX,[0x13f4aa]
MOV RDI,RAX
MOV RSI,R12
MOV RCX,R14
MOV R8,RBX
XOR EAX,EAX
CALL 0x001051a0
JMP 0x00117065
LAB_0011704f:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00105030
LAB_00117062:
XOR R15D,R15D
LAB_00117065:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
char * combine_filename(char *param_1)
{
char *pcVar1;
size_t sVar2;
size_t sVar3;
char *__s;
pcVar1 = getenv("C4_STATES_DIR");
if (pcVar1 != (char *)0x0) {
sVar2 = strlen(pcVar1);
sVar3 = strlen(param_1);
sVar2 = sVar2 + sVar3 + 2;
__s = (char *)safe_malloc(sVar2);
if (__s == (char *)0x0) {
__s = (char *)0x0;
}
else {
snprintf(__s,sVar2,"%s/%s",pcVar1,param_1);
}
return __s;
}
pcVar1 = strdup(param_1);
return pcVar1;
}
|
|
12,492
|
glfwSetVideoModeX11
|
untodesu[P]riteg/build_O3/_deps/glfw-src/src/x11_monitor.c
|
void _glfwSetVideoModeX11(_GLFWmonitor* monitor, const GLFWvidmode* desired)
{
if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
{
XRRScreenResources* sr;
XRRCrtcInfo* ci;
XRROutputInfo* oi;
GLFWvidmode current;
const GLFWvidmode* best;
RRMode native = None;
int i;
best = _glfwChooseVideoMode(monitor, desired);
_glfwPlatformGetVideoMode(monitor, ¤t);
if (_glfwCompareVideoModes(¤t, best) == 0)
return;
sr = XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
oi = XRRGetOutputInfo(_glfw.x11.display, sr, monitor->x11.output);
for (i = 0; i < oi->nmode; i++)
{
const XRRModeInfo* mi = getModeInfo(sr, oi->modes[i]);
if (!modeIsGood(mi))
continue;
const GLFWvidmode mode = vidmodeFromModeInfo(mi, ci);
if (_glfwCompareVideoModes(best, &mode) == 0)
{
native = mi->id;
break;
}
}
if (native)
{
if (monitor->x11.oldMode == None)
monitor->x11.oldMode = ci->mode;
XRRSetCrtcConfig(_glfw.x11.display,
sr, monitor->x11.crtc,
CurrentTime,
ci->x, ci->y,
native,
ci->rotation,
ci->outputs,
ci->noutput);
}
XRRFreeOutputInfo(oi);
XRRFreeCrtcInfo(ci);
XRRFreeScreenResources(sr);
}
}
|
O3
|
c
|
glfwSetVideoModeX11:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0x87b19(%rip), %r15 # 0xa8638
cmpl $0x0, 0x20570(%r15)
je 0x20cbd
cmpl $0x0, 0x20594(%r15)
jne 0x20cbd
movq %rdi, %r13
callq 0x1bc2c
movq %rax, %r12
leaq 0x30(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x20ccc
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1bdbc
testl %eax, %eax
je 0x20cbd
movq 0x1fec0(%r15), %rdi
movq 0x1fed0(%r15), %rsi
callq *0x205e8(%r15)
movq %rax, %r14
movq 0x1fec0(%r15), %rdi
movq 0x90(%r13), %rdx
movq %rax, %rsi
callq *0x205d0(%r15)
movq %rax, 0x8(%rsp)
movq 0x1fec0(%r15), %rdi
movq %r13, 0x10(%rsp)
movq 0x88(%r13), %rdx
movq %r14, %rsi
callq *0x205d8(%r15)
movq %rax, %r13
movl 0x50(%rax), %eax
testl %eax, %eax
jle 0x20c99
xorl %r15d, %r15d
leaq 0x18(%rsp), %rbp
movslq 0x30(%r14), %rcx
testq %rcx, %rcx
jle 0x20bf4
movq 0x58(%r13), %rdx
movq (%rdx,%r15,8), %rdx
movq 0x38(%r14), %rbx
cmpq %rdx, (%rbx)
je 0x20bf6
addq $0x50, %rbx
decq %rcx
jne 0x20be6
xorl %ebx, %ebx
testb $0x10, 0x48(%rbx)
jne 0x20c22
movq 0x8(%rsp), %rax
movl 0x20(%rax), %edx
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x20de7
movq %r12, %rdi
movq %rbp, %rsi
callq 0x1bdbc
testl %eax, %eax
je 0x20c2f
movl 0x50(%r13), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x20bd1
jmp 0x20c99
movq (%rbx), %rax
testq %rax, %rax
je 0x20c99
movq 0x10(%rsp), %rdx
cmpq $0x0, 0x98(%rdx)
jne 0x20c56
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x98(%rdx)
leaq 0x879db(%rip), %rbx # 0xa8638
movq 0x1fec0(%rbx), %rdi
movq 0x90(%rdx), %rdx
movq 0x8(%rsp), %r15
movl 0x8(%r15), %r8d
movl 0xc(%r15), %r9d
movzwl 0x20(%r15), %r10d
movl 0x24(%r15), %r11d
movq %r14, %rsi
xorl %ecx, %ecx
pushq %r11
pushq 0x28(%r15)
pushq %r10
pushq %rax
callq *0x20608(%rbx)
addq $0x20, %rsp
movq %r13, %rdi
leaq 0x87995(%rip), %rbx # 0xa8638
callq *0x205b0(%rbx)
movq 0x8(%rsp), %rdi
callq *0x205a0(%rbx)
movq %r14, %rdi
callq *0x205b8(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_glfwSetVideoModeX11:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
lea r15, _glfw
cmp dword ptr [r15+20570h], 0
jz loc_20CBD
cmp dword ptr [r15+20594h], 0
jnz loc_20CBD
mov r13, rdi
call _glfwChooseVideoMode
mov r12, rax
lea rbx, [rsp+78h+var_48]
mov rdi, r13
mov rsi, rbx
call _glfwPlatformGetVideoMode
mov rdi, rbx
mov rsi, r12
call _glfwCompareVideoModes
test eax, eax
jz loc_20CBD
mov rdi, [r15+1FEC0h]
mov rsi, [r15+1FED0h]
call qword ptr ds:loc_205E8[r15]
mov r14, rax
mov rdi, [r15+1FEC0h]
mov rdx, [r13+90h]
mov rsi, rax
call qword ptr [r15+205D0h]
mov [rsp+78h+var_70], rax
mov rdi, [r15+1FEC0h]
mov [rsp+78h+var_68], r13
mov rdx, [r13+88h]
mov rsi, r14
call qword ptr [r15+205D8h]
mov r13, rax
mov eax, [rax+50h]
test eax, eax
jle loc_20C99
xor r15d, r15d
lea rbp, [rsp+78h+var_60]
loc_20BD1:
movsxd rcx, dword ptr [r14+30h]
test rcx, rcx
jle short loc_20BF4
mov rdx, [r13+58h]
mov rdx, [rdx+r15*8]
mov rbx, [r14+38h]
loc_20BE6:
cmp [rbx], rdx
jz short loc_20BF6
add rbx, 50h ; 'P'
dec rcx
jnz short loc_20BE6
loc_20BF4:
xor ebx, ebx
loc_20BF6:
test byte ptr [rbx+48h], 10h
jnz short loc_20C22
mov rax, [rsp+78h+var_70]
mov edx, [rax+20h]
mov rdi, rbp
mov rsi, rbx
call vidmodeFromModeInfo
mov rdi, r12
mov rsi, rbp
call _glfwCompareVideoModes
test eax, eax
jz short loc_20C2F
mov eax, [r13+50h]
loc_20C22:
inc r15
movsxd rcx, eax
cmp r15, rcx
jl short loc_20BD1
jmp short loc_20C99
loc_20C2F:
mov rax, [rbx]
test rax, rax
jz short loc_20C99
mov rdx, [rsp+78h+var_68]
cmp qword ptr [rdx+98h], 0
jnz short loc_20C56
mov rcx, [rsp+78h+var_70]
mov rcx, [rcx+18h]
mov [rdx+98h], rcx
loc_20C56:
lea rbx, _glfw
mov rdi, [rbx+1FEC0h]
mov rdx, [rdx+90h]
mov r15, [rsp+78h+var_70]
mov r8d, [r15+8]
mov r9d, [r15+0Ch]
movzx r10d, word ptr [r15+20h]
mov r11d, [r15+24h]
mov rsi, r14
xor ecx, ecx
push r11
push qword ptr [r15+28h]
push r10
push rax
call qword ptr [rbx+20608h]
add rsp, 20h
loc_20C99:
mov rdi, r13
lea rbx, _glfw
call qword ptr [rbx+205B0h]
mov rdi, [rsp+78h+var_70]
call qword ptr [rbx+205A0h]
mov rdi, r14
call qword ptr ds:loc_205B8[rbx]
loc_20CBD:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
void glfwSetVideoModeX11(_QWORD *a1, int *a2)
{
_DWORD *v2; // r12
long long v3; // r14
long long v4; // r13
int v5; // eax
long long v6; // r15
long long v7; // rcx
long long *v8; // rbx
long long v9; // rax
long long v10; // [rsp+8h] [rbp-70h]
_BYTE v11[24]; // [rsp+18h] [rbp-60h] BYREF
_BYTE v12[72]; // [rsp+30h] [rbp-48h] BYREF
if ( !glfw[33116] )
return;
if ( glfw[33125] )
return;
v2 = glfwChooseVideoMode((long long)a1, a2);
glfwPlatformGetVideoMode(a1, v12);
if ( !(unsigned int)glfwCompareVideoModes(v12, v2) )
return;
v3 = (*(long long ( **)(_QWORD, _QWORD))((char *)&loc_205E8 + (_QWORD)glfw))(
*(_QWORD *)&glfw[32688],
*(_QWORD *)&glfw[32692]);
v10 = (*(long long ( **)(_QWORD, long long, _QWORD))&glfw[33140])(*(_QWORD *)&glfw[32688], v3, a1[18]);
v4 = (*(long long ( **)(_QWORD, long long, _QWORD))&glfw[33142])(*(_QWORD *)&glfw[32688], v3, a1[17]);
v5 = *(_DWORD *)(v4 + 80);
if ( v5 <= 0 )
goto LABEL_20;
v6 = 0LL;
while ( 1 )
{
v7 = *(int *)(v3 + 48);
if ( v7 <= 0 )
{
LABEL_10:
v8 = 0LL;
}
else
{
v8 = *(long long **)(v3 + 56);
while ( *v8 != *(_QWORD *)(*(_QWORD *)(v4 + 88) + 8 * v6) )
{
v8 += 10;
if ( !--v7 )
goto LABEL_10;
}
}
if ( (v8[9] & 0x10) != 0 )
goto LABEL_14;
vidmodeFromModeInfo(v11, v8, *(unsigned int *)(v10 + 32));
if ( !(unsigned int)glfwCompareVideoModes(v2, v11) )
break;
v5 = *(_DWORD *)(v4 + 80);
LABEL_14:
if ( ++v6 >= v5 )
goto LABEL_20;
}
v9 = *v8;
if ( *v8 )
{
if ( !a1[19] )
a1[19] = *(_QWORD *)(v10 + 24);
(*(void ( **)(_QWORD, long long, _QWORD, _QWORD, _QWORD, _QWORD, long long, _QWORD, _QWORD, _QWORD))&glfw[33154])(
*(_QWORD *)&glfw[32688],
v3,
a1[18],
0LL,
*(unsigned int *)(v10 + 8),
*(unsigned int *)(v10 + 12),
v9,
*(unsigned __int16 *)(v10 + 32),
*(_QWORD *)(v10 + 40),
*(unsigned int *)(v10 + 36));
}
LABEL_20:
(*(void ( **)(long long))&glfw[33132])(v4);
(*(void ( **)(long long))&glfw[33128])(v10);
(*(void ( **)(long long))((char *)&loc_205B8 + (_QWORD)glfw))(v3);
}
|
_glfwSetVideoModeX11:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
LEA R15,[0x1a8638]
CMP dword ptr [R15 + 0x20570],0x0
JZ 0x00120cbd
CMP dword ptr [R15 + 0x20594],0x0
JNZ 0x00120cbd
MOV R13,RDI
CALL 0x0011bc2c
MOV R12,RAX
LEA RBX,[RSP + 0x30]
MOV RDI,R13
MOV RSI,RBX
CALL 0x00120ccc
MOV RDI,RBX
MOV RSI,R12
CALL 0x0011bdbc
TEST EAX,EAX
JZ 0x00120cbd
MOV RDI,qword ptr [R15 + 0x1fec0]
MOV RSI,qword ptr [R15 + 0x1fed0]
CALL qword ptr [R15 + 0x205e8]
MOV R14,RAX
MOV RDI,qword ptr [R15 + 0x1fec0]
MOV RDX,qword ptr [R13 + 0x90]
MOV RSI,RAX
CALL qword ptr [R15 + 0x205d0]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [R15 + 0x1fec0]
MOV qword ptr [RSP + 0x10],R13
MOV RDX,qword ptr [R13 + 0x88]
MOV RSI,R14
CALL qword ptr [R15 + 0x205d8]
MOV R13,RAX
MOV EAX,dword ptr [RAX + 0x50]
TEST EAX,EAX
JLE 0x00120c99
XOR R15D,R15D
LEA RBP,[RSP + 0x18]
LAB_00120bd1:
MOVSXD RCX,dword ptr [R14 + 0x30]
TEST RCX,RCX
JLE 0x00120bf4
MOV RDX,qword ptr [R13 + 0x58]
MOV RDX,qword ptr [RDX + R15*0x8]
MOV RBX,qword ptr [R14 + 0x38]
LAB_00120be6:
CMP qword ptr [RBX],RDX
JZ 0x00120bf6
ADD RBX,0x50
DEC RCX
JNZ 0x00120be6
LAB_00120bf4:
XOR EBX,EBX
LAB_00120bf6:
TEST byte ptr [RBX + 0x48],0x10
JNZ 0x00120c22
MOV RAX,qword ptr [RSP + 0x8]
MOV EDX,dword ptr [RAX + 0x20]
MOV RDI,RBP
MOV RSI,RBX
CALL 0x00120de7
MOV RDI,R12
MOV RSI,RBP
CALL 0x0011bdbc
TEST EAX,EAX
JZ 0x00120c2f
MOV EAX,dword ptr [R13 + 0x50]
LAB_00120c22:
INC R15
MOVSXD RCX,EAX
CMP R15,RCX
JL 0x00120bd1
JMP 0x00120c99
LAB_00120c2f:
MOV RAX,qword ptr [RBX]
TEST RAX,RAX
JZ 0x00120c99
MOV RDX,qword ptr [RSP + 0x10]
CMP qword ptr [RDX + 0x98],0x0
JNZ 0x00120c56
MOV RCX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RCX + 0x18]
MOV qword ptr [RDX + 0x98],RCX
LAB_00120c56:
LEA RBX,[0x1a8638]
MOV RDI,qword ptr [RBX + 0x1fec0]
MOV RDX,qword ptr [RDX + 0x90]
MOV R15,qword ptr [RSP + 0x8]
MOV R8D,dword ptr [R15 + 0x8]
MOV R9D,dword ptr [R15 + 0xc]
MOVZX R10D,word ptr [R15 + 0x20]
MOV R11D,dword ptr [R15 + 0x24]
MOV RSI,R14
XOR ECX,ECX
PUSH R11
PUSH qword ptr [R15 + 0x28]
PUSH R10
PUSH RAX
CALL qword ptr [RBX + 0x20608]
ADD RSP,0x20
LAB_00120c99:
MOV RDI,R13
LEA RBX,[0x1a8638]
CALL qword ptr [RBX + 0x205b0]
MOV RDI,qword ptr [RSP + 0x8]
CALL qword ptr [RBX + 0x205a0]
MOV RDI,R14
CALL qword ptr [RBX + 0x205b8]
LAB_00120cbd:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void _glfwSetVideoModeX11(long param_1)
{
int iVar1;
int8 uVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long *plVar7;
long lVar8;
int1 local_60 [24];
int1 local_48 [24];
if ((DAT_001c8ba8 != 0) && (DAT_001c8bcc == 0)) {
uVar2 = _glfwChooseVideoMode();
_glfwPlatformGetVideoMode(param_1,local_48);
iVar1 = _glfwCompareVideoModes(local_48,uVar2);
if (iVar1 != 0) {
lVar3 = (*DAT_001c8c20)(DAT_001c84f8,DAT_001c8508);
lVar4 = (*DAT_001c8c08)(DAT_001c84f8,lVar3,*(int8 *)(param_1 + 0x90));
lVar5 = (*DAT_001c8c10)(DAT_001c84f8,lVar3,*(int8 *)(param_1 + 0x88));
iVar1 = *(int *)(lVar5 + 0x50);
if (0 < iVar1) {
lVar8 = 0;
do {
lVar6 = (long)*(int *)(lVar3 + 0x30);
if (0 < lVar6) {
plVar7 = *(long **)(lVar3 + 0x38);
do {
if (*plVar7 == *(long *)(*(long *)(lVar5 + 0x58) + lVar8 * 8)) goto LAB_00120bf6;
plVar7 = plVar7 + 10;
lVar6 = lVar6 + -1;
} while (lVar6 != 0);
}
plVar7 = (long *)0x0;
LAB_00120bf6:
if ((*(byte *)(plVar7 + 9) & 0x10) == 0) {
vidmodeFromModeInfo(local_60,plVar7,*(int4 *)(lVar4 + 0x20));
iVar1 = _glfwCompareVideoModes(uVar2,local_60);
if (iVar1 == 0) {
lVar8 = *plVar7;
if (lVar8 != 0) {
if (*(long *)(param_1 + 0x98) == 0) {
*(int8 *)(param_1 + 0x98) = *(int8 *)(lVar4 + 0x18);
}
(*DAT_001c8c40)(DAT_001c84f8,lVar3,*(int8 *)(param_1 + 0x90),0,
*(int4 *)(lVar4 + 8),*(int4 *)(lVar4 + 0xc),lVar8,
*(int2 *)(lVar4 + 0x20),*(int8 *)(lVar4 + 0x28),
*(int4 *)(lVar4 + 0x24));
}
break;
}
iVar1 = *(int *)(lVar5 + 0x50);
}
lVar8 = lVar8 + 1;
} while (lVar8 < iVar1);
}
(*DAT_001c8be8)(lVar5);
(*DAT_001c8bd8)(lVar4);
(*DAT_001c8bf0)(lVar3);
}
}
return;
}
|
|
12,493
|
MemoryManager::setByteNoCache(unsigned int, unsigned char)
|
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp
|
bool MemoryManager::setByteNoCache(uint32_t addr, uint8_t val) {
if (!this->isAddrExist(addr)) {
dbgprintf("Byte write to invalid addr 0x%x!\n", addr);
return false;
}
this->memory[addr] = val;
return true;
}
|
O2
|
cpp
|
MemoryManager::setByteNoCache(unsigned int, unsigned char):
pushq %rbx
movl %esi, %ebx
cmpl $-0x1, %esi
je 0x3834
movq (%rdi), %rax
movl %ebx, %ecx
movb %dl, (%rax,%rcx)
jmp 0x3845
leaq 0x18bc(%rip), %rdi # 0x50f7
pushq $-0x1
popq %rsi
xorl %eax, %eax
callq 0x35f4
cmpl $-0x1, %ebx
setne %al
popq %rbx
retq
nop
|
_ZN13MemoryManager14setByteNoCacheEjh:
push rbx
mov ebx, esi
cmp esi, 0FFFFFFFFh
jz short loc_3834
mov rax, [rdi]
mov ecx, ebx
mov [rax+rcx], dl
jmp short loc_3845
loc_3834:
lea rdi, aByteWriteToInv; "Byte write to invalid addr 0x%x!\n"
push 0FFFFFFFFFFFFFFFFh
pop rsi
xor eax, eax
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
loc_3845:
cmp ebx, 0FFFFFFFFh
setnz al
pop rbx
retn
|
bool MemoryManager::setByteNoCache(
MemoryManager *this,
unsigned int a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v15; // [rsp+0h] [rbp-8h]
if ( a2 == -1 )
dbgprintf("Byte write to invalid addr 0x%x!\n", -1LL, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v15);
else
*(_BYTE *)(*(_QWORD *)this + a2) = a3;
return a2 != -1;
}
|
setByteNoCache:
PUSH RBX
MOV EBX,ESI
CMP ESI,-0x1
JZ 0x00103834
MOV RAX,qword ptr [RDI]
MOV ECX,EBX
MOV byte ptr [RAX + RCX*0x1],DL
JMP 0x00103845
LAB_00103834:
LEA RDI,[0x1050f7]
PUSH -0x1
POP RSI
XOR EAX,EAX
CALL 0x001035f4
LAB_00103845:
CMP EBX,-0x1
SETNZ AL
POP RBX
RET
|
/* MemoryManager::setByteNoCache(unsigned int, unsigned char) */
bool __thiscall MemoryManager::setByteNoCache(MemoryManager *this,uint param_1,uchar param_2)
{
if (param_1 == 0xffffffff) {
dbgprintf("Byte write to invalid addr 0x%x!\n",0xffffffffffffffff);
}
else {
*(uchar *)(*(long *)this + (ulong)param_1) = param_2;
}
return param_1 != 0xffffffff;
}
|
|
12,494
|
nglog::tools::(anonymous namespace)::DemangleInplace(char*, unsigned long)
|
ng-log[P]ng-log/src/symbolize.cc
|
ATTRIBUTE_NOINLINE
void DemangleInplace(char* out, size_t out_size) {
char demangled[256]; // Big enough for sane demangled symbols.
if (Demangle(out, demangled, sizeof(demangled))) {
// Demangling succeeded. Copy to out if the space allows.
size_t len = strlen(demangled);
if (len + 1 <= out_size) { // +1 for '\0'.
NGLOG_SAFE_ASSERT(len < sizeof(demangled));
memmove(out, demangled, len + 1);
}
}
}
|
O0
|
cpp
|
nglog::tools::(anonymous namespace)::DemangleInplace(char*, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp # imm = 0x120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x110(%rbp), %rsi
movl $0x100, %edx # imm = 0x100
callq 0xc2e0
testb $0x1, %al
jne 0x4a04e
jmp 0x4a0a3
leaq -0x110(%rbp), %rdi
callq 0x92f0
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
addq $0x1, %rax
cmpq -0x10(%rbp), %rax
ja 0x4a0a1
cmpq $0x100, -0x118(%rbp) # imm = 0x100
jae 0x4a081
jmp 0x4a086
callq 0x93b0
movq -0x8(%rbp), %rdi
leaq -0x110(%rbp), %rsi
movq -0x118(%rbp), %rdx
addq $0x1, %rdx
callq 0x9c00
jmp 0x4a0a3
addq $0x120, %rsp # imm = 0x120
popq %rbp
retq
nopl (%rax)
|
_ZN5nglog5tools12_GLOBAL__N_115DemangleInplaceEPcm:
push rbp
mov rbp, rsp
sub rsp, 120h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; this
lea rsi, [rbp+var_110]; char *
mov edx, offset qword_100; char *
call _ZN5nglog5tools8DemangleEPKcPcm; nglog::tools::Demangle(char const*,char *,ulong)
test al, 1
jnz short loc_4A04E
jmp short loc_4A0A3
loc_4A04E:
lea rdi, [rbp+var_110]
call _strlen
mov [rbp+var_118], rax
mov rax, [rbp+var_118]
add rax, 1
cmp rax, [rbp+var_10]
ja short loc_4A0A1
cmp [rbp+var_118], 100h
jnb short loc_4A081
jmp short loc_4A086
loc_4A081:
call _abort
loc_4A086:
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_110]
mov rdx, [rbp+var_118]
add rdx, 1
call _memmove
loc_4A0A1:
jmp short $+2
loc_4A0A3:
add rsp, 120h
pop rbp
retn
|
char nglog::tools::`anonymous namespace'::DemangleInplace(
nglog::tools::_anonymous_namespace_ *this,
char *a2)
{
char result; // al
unsigned long long v3; // [rsp+8h] [rbp-118h]
char v4[256]; // [rsp+10h] [rbp-110h] BYREF
char *v5; // [rsp+110h] [rbp-10h]
nglog::tools *v6; // [rsp+118h] [rbp-8h]
v6 = this;
v5 = a2;
result = nglog::tools::Demangle(this, v4, (char *)qword_100);
if ( (result & 1) != 0 )
{
v3 = strlen(v4);
result = v3 + 1;
if ( v3 + 1 <= (unsigned long long)v5 )
{
if ( v3 >= 0x100 )
abort(v4, v4);
return memmove(v6, v4, v3 + 1);
}
}
return result;
}
|
DemangleInplace:
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]
LEA RSI,[RBP + -0x110]
MOV EDX,0x100
CALL 0x0010c2e0
TEST AL,0x1
JNZ 0x0014a04e
JMP 0x0014a0a3
LAB_0014a04e:
LEA RDI,[RBP + -0x110]
CALL 0x001092f0
MOV qword ptr [RBP + -0x118],RAX
MOV RAX,qword ptr [RBP + -0x118]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x10]
JA 0x0014a0a1
CMP qword ptr [RBP + -0x118],0x100
JNC 0x0014a081
JMP 0x0014a086
LAB_0014a081:
CALL 0x001093b0
LAB_0014a086:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x110]
MOV RDX,qword ptr [RBP + -0x118]
ADD RDX,0x1
CALL 0x00109c00
LAB_0014a0a1:
JMP 0x0014a0a3
LAB_0014a0a3:
ADD RSP,0x120
POP RBP
RET
|
/* nglog::tools::(anonymous namespace)::DemangleInplace(char*, unsigned long) */
void nglog::tools::(anonymous_namespace)::DemangleInplace(char *param_1,ulong param_2)
{
ulong uVar1;
size_t sVar2;
char local_118 [256];
ulong local_18;
char *local_10;
local_18 = param_2;
local_10 = param_1;
uVar1 = Demangle(param_1,local_118,0x100);
if (((uVar1 & 1) != 0) && (sVar2 = strlen(local_118), sVar2 + 1 <= local_18)) {
if (0xff < sVar2) {
/* WARNING: Subroutine does not return */
abort();
}
memmove(local_10,local_118,sVar2 + 1);
}
return;
}
|
|
12,495
|
my_hash_sort_ucs2_nopad_bin
|
eloqsql/strings/ctype-ucs2.c
|
static void
my_hash_sort_ucs2_nopad_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
const uchar *end= key + len;
register ulong m1= *nr1, m2= *nr2;
for ( ; key < end ; key++)
{
MY_HASH_ADD(m1, m2, (uint)*key);
}
*nr1= m1;
*nr2= m2;
}
|
O3
|
c
|
my_hash_sort_ucs2_nopad_bin:
movq (%rcx), %rax
movq (%r8), %rdi
testq %rdx, %rdx
jle 0xcf2ed
pushq %rbp
movq %rsp, %rbp
addq %rsi, %rdx
movl %eax, %r9d
andl $0x3f, %r9d
addq %rdi, %r9
movzbl (%rsi), %r10d
imulq %r9, %r10
movq %rax, %r9
shlq $0x8, %r9
addq %r10, %r9
xorq %r9, %rax
addq $0x3, %rdi
incq %rsi
cmpq %rdx, %rsi
jb 0xcf2c1
popq %rbp
movq %rax, (%rcx)
movq %rdi, (%r8)
retq
|
my_hash_sort_ucs2_nopad_bin:
mov rax, [rcx]
mov rdi, [r8]
test rdx, rdx
jle short loc_CF2ED
push rbp
mov rbp, rsp
add rdx, rsi
loc_CF2C1:
mov r9d, eax
and r9d, 3Fh
add r9, rdi
movzx r10d, byte ptr [rsi]
imul r10, r9
mov r9, rax
shl r9, 8
add r9, r10
xor rax, r9
add rdi, 3
inc rsi
cmp rsi, rdx
jb short loc_CF2C1
pop rbp
loc_CF2ED:
mov [rcx], rax
mov [r8], rdi
retn
|
long long my_hash_sort_ucs2_nopad_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5)
{
long long result; // rax
long long v6; // rdi
unsigned __int8 *v7; // rdx
result = *a4;
v6 = *a5;
if ( a3 > 0 )
{
v7 = &a2[a3];
do
{
result ^= (v6 + (result & 0x3F)) * *a2 + (result << 8);
v6 += 3LL;
++a2;
}
while ( a2 < v7 );
}
*a4 = result;
*a5 = v6;
return result;
}
|
my_hash_sort_ucs2_nopad_bin:
MOV RAX,qword ptr [RCX]
MOV RDI,qword ptr [R8]
TEST RDX,RDX
JLE 0x001cf2ed
PUSH RBP
MOV RBP,RSP
ADD RDX,RSI
LAB_001cf2c1:
MOV R9D,EAX
AND R9D,0x3f
ADD R9,RDI
MOVZX R10D,byte ptr [RSI]
IMUL R10,R9
MOV R9,RAX
SHL R9,0x8
ADD R9,R10
XOR RAX,R9
ADD RDI,0x3
INC RSI
CMP RSI,RDX
JC 0x001cf2c1
POP RBP
LAB_001cf2ed:
MOV qword ptr [RCX],RAX
MOV qword ptr [R8],RDI
RET
|
void my_hash_sort_ucs2_nopad_bin
(int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
ulong uVar1;
byte *pbVar2;
long lVar3;
uVar1 = *param_4;
lVar3 = *param_5;
if (0 < param_3) {
pbVar2 = param_2 + param_3;
do {
uVar1 = uVar1 ^ uVar1 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar1 & 0x3f) + lVar3);
lVar3 = lVar3 + 3;
param_2 = param_2 + 1;
} while (param_2 < pbVar2);
}
*param_4 = uVar1;
*param_5 = lVar3;
return;
}
|
|
12,496
|
my_strnncollsp_simple
|
eloqsql/strings/ctype-simple.c
|
int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
const uchar *b, size_t b_length)
{
const uchar *map= cs->sort_order, *end;
size_t length;
int res;
end= a + (length= MY_MIN(a_length, b_length));
while (a < end)
{
if (map[*a++] != map[*b++])
return ((int) map[a[-1]] - (int) map[b[-1]]);
}
res= 0;
if (a_length != b_length)
{
int swap= 1;
/*
Check the next not space character of the longer key. If it's < ' ',
then it's smaller than the other key.
*/
if (a_length < b_length)
{
/* put shorter key in s */
a_length= b_length;
a= b;
swap= -1; /* swap sign of result */
res= -res;
}
for (end= a + a_length-length; a < end ; a++)
{
if (map[*a] != map[' '])
return (map[*a] < map[' ']) ? -swap : swap;
}
}
return res;
}
|
O0
|
c
|
my_strnncollsp_simple:
pushq %rbp
movq %rsp, %rbp
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 0x58(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x11daf0
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x11daf8
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rcx, -0x48(%rbp)
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x11db79
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x28(%rbp)
movzbl (%rdx), %edx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x11db77
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rdx
movzbl -0x1(%rdx), %edx
movzbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x11dc43
jmp 0x11db0b
movl $0x0, -0x4c(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x11dc3d
movl $0x1, -0x50(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x11dbbe
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0xffffffff, -0x50(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
subl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
xorl %ecx, %ecx
subq -0x48(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x11dc3b
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movzbl 0x20(%rcx), %ecx
cmpl %ecx, %eax
je 0x11dc2b
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movzbl 0x20(%rcx), %ecx
cmpl %ecx, %eax
jge 0x11dc1d
xorl %eax, %eax
subl -0x50(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x11dc23
movl -0x50(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x11dc43
jmp 0x11dc2d
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x11dbd3
jmp 0x11dc3d
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
my_strnncollsp_simple:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnb short loc_11DAF0
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
jmp short loc_11DAF8
loc_11DAF0:
mov rax, [rbp+var_30]
mov [rbp+var_60], rax
loc_11DAF8:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_60]
mov [rbp+var_48], rcx
add rax, rcx
mov [rbp+var_40], rax
loc_11DB0B:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_40]
jnb short loc_11DB79
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
mov rdx, rcx
add rdx, 1
mov [rbp+var_18], rdx
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_38]
mov rdx, [rbp+var_28]
mov rsi, rdx
add rsi, 1
mov [rbp+var_28], rsi
movzx edx, byte ptr [rdx]
movzx ecx, byte ptr [rcx+rdx]
cmp eax, ecx
jz short loc_11DB77
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx-1]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_38]
mov rdx, [rbp+var_28]
movzx edx, byte ptr [rdx-1]
movzx ecx, byte ptr [rcx+rdx]
sub eax, ecx
mov [rbp+var_4], eax
jmp loc_11DC43
loc_11DB77:
jmp short loc_11DB0B
loc_11DB79:
mov [rbp+var_4C], 0
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jz loc_11DC3D
mov [rbp+var_50], 1
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnb short loc_11DBBE
mov rax, [rbp+var_30]
mov [rbp+var_20], rax
mov rax, [rbp+var_28]
mov [rbp+var_18], rax
mov [rbp+var_50], 0FFFFFFFFh
xor eax, eax
sub eax, [rbp+var_4C]
mov [rbp+var_4C], eax
loc_11DBBE:
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
xor ecx, ecx
sub rcx, [rbp+var_48]
add rax, rcx
mov [rbp+var_40], rax
loc_11DBD3:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_40]
jnb short loc_11DC3B
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_38]
movzx ecx, byte ptr [rcx+20h]
cmp eax, ecx
jz short loc_11DC2B
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_38]
movzx ecx, byte ptr [rcx+20h]
cmp eax, ecx
jge short loc_11DC1D
xor eax, eax
sub eax, [rbp+var_50]
mov [rbp+var_64], eax
jmp short loc_11DC23
loc_11DC1D:
mov eax, [rbp+var_50]
mov [rbp+var_64], eax
loc_11DC23:
mov eax, [rbp+var_64]
mov [rbp+var_4], eax
jmp short loc_11DC43
loc_11DC2B:
jmp short $+2
loc_11DC2D:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_11DBD3
loc_11DC3B:
jmp short $+2
loc_11DC3D:
mov eax, [rbp+var_4C]
mov [rbp+var_4], eax
loc_11DC43:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_strnncollsp_simple(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5)
{
unsigned __int8 *v5; // rcx
unsigned __int8 *v6; // rdx
unsigned long long v9; // [rsp+4h] [rbp-60h]
unsigned int v10; // [rsp+14h] [rbp-50h]
unsigned __int8 *v11; // [rsp+24h] [rbp-40h]
long long v12; // [rsp+2Ch] [rbp-38h]
unsigned long long v14; // [rsp+44h] [rbp-20h]
unsigned __int8 *v15; // [rsp+4Ch] [rbp-18h]
v15 = a2;
v14 = a3;
v12 = *(_QWORD *)(a1 + 88);
if ( a3 >= a5 )
v9 = a5;
else
v9 = a3;
while ( v15 < &a2[v9] )
{
v5 = v15++;
v6 = a4++;
if ( *(unsigned __int8 *)(v12 + *v5) != *(unsigned __int8 *)(v12 + *v6) )
return (unsigned int)(*(unsigned __int8 *)(v12 + *(v15 - 1)) - *(unsigned __int8 *)(v12 + *(a4 - 1)));
}
if ( v14 != a5 )
{
v10 = 1;
if ( v14 < a5 )
{
v14 = a5;
v15 = a4;
v10 = -1;
}
v11 = &v15[v14 - v9];
while ( v15 < v11 )
{
if ( *(unsigned __int8 *)(v12 + *v15) != *(unsigned __int8 *)(v12 + 32) )
{
if ( *(unsigned __int8 *)(v12 + *v15) >= (int)*(unsigned __int8 *)(v12 + 32) )
return v10;
else
return -v10;
}
++v15;
}
}
return 0;
}
| |||
12,497
|
my_strnncollsp_simple
|
eloqsql/strings/ctype-simple.c
|
int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
const uchar *b, size_t b_length)
{
const uchar *map= cs->sort_order, *end;
size_t length;
int res;
end= a + (length= MY_MIN(a_length, b_length));
while (a < end)
{
if (map[*a++] != map[*b++])
return ((int) map[a[-1]] - (int) map[b[-1]]);
}
res= 0;
if (a_length != b_length)
{
int swap= 1;
/*
Check the next not space character of the longer key. If it's < ' ',
then it's smaller than the other key.
*/
if (a_length < b_length)
{
/* put shorter key in s */
a_length= b_length;
a= b;
swap= -1; /* swap sign of result */
res= -res;
}
for (end= a + a_length-length; a < end ; a++)
{
if (map[*a] != map[' '])
return (map[*a] < map[' ']) ? -swap : swap;
}
}
return res;
}
|
O3
|
c
|
my_strnncollsp_simple:
pushq %rbp
movq %rsp, %rbp
movq 0x58(%rdi), %rdi
cmpq %r8, %rdx
movq %r8, %r9
cmovbq %rdx, %r9
leaq (%rsi,%r9), %r10
cmpq %r10, %rsi
jae 0xb7cbd
movzbl (%rsi), %eax
incq %rsi
movzbl (%rdi,%rax), %eax
movzbl (%rcx), %r11d
incq %rcx
movzbl (%rdi,%r11), %r11d
cmpb %r11b, %al
je 0xb7c98
subl %r11d, %eax
jmp 0xb7d13
cmpq %r8, %rdx
jne 0xb7cc6
xorl %eax, %eax
jmp 0xb7d13
xorl %eax, %eax
cmpq %r8, %rdx
cmovaq %rdx, %r8
cmovbq %rcx, %rsi
movl $0x0, %ecx
sbbl %ecx, %ecx
leaq (%rsi,%r8), %rdx
subq %r9, %rdx
cmpq %rdx, %rsi
jae 0xb7d13
orl $0x1, %ecx
movb 0x20(%rdi), %dl
subq %r9, %r8
xorl %eax, %eax
movzbl (%rsi,%rax), %r9d
movb (%rdi,%r9), %r9b
cmpb %dl, %r9b
jne 0xb7d09
incq %rax
cmpq %rax, %r8
jne 0xb7cf1
jmp 0xb7cc2
movl %ecx, %eax
negl %eax
cmpb %dl, %r9b
cmovael %ecx, %eax
popq %rbp
retq
|
my_strnncollsp_simple:
push rbp
mov rbp, rsp
mov rdi, [rdi+58h]
cmp rdx, r8
mov r9, r8
cmovb r9, rdx
lea r10, [rsi+r9]
loc_B7C98:
cmp rsi, r10
jnb short loc_B7CBD
movzx eax, byte ptr [rsi]
inc rsi
movzx eax, byte ptr [rdi+rax]
movzx r11d, byte ptr [rcx]
inc rcx
movzx r11d, byte ptr [rdi+r11]
cmp al, r11b
jz short loc_B7C98
sub eax, r11d
jmp short loc_B7D13
loc_B7CBD:
cmp rdx, r8
jnz short loc_B7CC6
loc_B7CC2:
xor eax, eax
jmp short loc_B7D13
loc_B7CC6:
xor eax, eax
cmp rdx, r8
cmova r8, rdx
cmovb rsi, rcx
mov ecx, 0
sbb ecx, ecx
lea rdx, [rsi+r8]
sub rdx, r9
cmp rsi, rdx
jnb short loc_B7D13
or ecx, 1
mov dl, [rdi+20h]
sub r8, r9
xor eax, eax
loc_B7CF1:
movzx r9d, byte ptr [rsi+rax]
mov r9b, [rdi+r9]
cmp r9b, dl
jnz short loc_B7D09
inc rax
cmp r8, rax
jnz short loc_B7CF1
jmp short loc_B7CC2
loc_B7D09:
mov eax, ecx
neg eax
cmp r9b, dl
cmovnb eax, ecx
loc_B7D13:
pop rbp
retn
|
long long my_strnncollsp_simple(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5)
{
long long v5; // rdi
unsigned long long v6; // r9
unsigned __int8 *v7; // r10
long long v8; // rax
int v9; // eax
long long v10; // r11
int v11; // r11d
long long result; // rax
bool v13; // cf
unsigned int v14; // ecx
unsigned __int8 v15; // dl
unsigned long long v16; // r8
long long v17; // rax
unsigned __int8 v18; // r9
v5 = *(_QWORD *)(a1 + 88);
v6 = a5;
if ( a3 < a5 )
v6 = a3;
v7 = &a2[v6];
while ( a2 < v7 )
{
v8 = *a2++;
v9 = *(unsigned __int8 *)(v5 + v8);
v10 = *a4++;
v11 = *(unsigned __int8 *)(v5 + v10);
if ( (_BYTE)v9 != (_BYTE)v11 )
return (unsigned int)(v9 - v11);
}
if ( a3 == a5 )
return 0LL;
result = 0LL;
v13 = a3 < a5;
if ( a3 > a5 )
a5 = a3;
if ( v13 )
a2 = a4;
if ( a2 < &a2[a5 - v6] )
{
v14 = v13 ? -1 : 1;
v15 = *(_BYTE *)(v5 + 32);
v16 = a5 - v6;
v17 = 0LL;
while ( 1 )
{
v18 = *(_BYTE *)(v5 + a2[v17]);
if ( v18 != v15 )
break;
if ( v16 == ++v17 )
return 0LL;
}
result = -v14;
if ( v18 >= v15 )
return v14;
}
return result;
}
|
my_strnncollsp_simple:
PUSH RBP
MOV RBP,RSP
MOV RDI,qword ptr [RDI + 0x58]
CMP RDX,R8
MOV R9,R8
CMOVC R9,RDX
LEA R10,[RSI + R9*0x1]
LAB_001b7c98:
CMP RSI,R10
JNC 0x001b7cbd
MOVZX EAX,byte ptr [RSI]
INC RSI
MOVZX EAX,byte ptr [RDI + RAX*0x1]
MOVZX R11D,byte ptr [RCX]
INC RCX
MOVZX R11D,byte ptr [RDI + R11*0x1]
CMP AL,R11B
JZ 0x001b7c98
SUB EAX,R11D
JMP 0x001b7d13
LAB_001b7cbd:
CMP RDX,R8
JNZ 0x001b7cc6
LAB_001b7cc2:
XOR EAX,EAX
JMP 0x001b7d13
LAB_001b7cc6:
XOR EAX,EAX
CMP RDX,R8
CMOVA R8,RDX
CMOVC RSI,RCX
MOV ECX,0x0
SBB ECX,ECX
LEA RDX,[RSI + R8*0x1]
SUB RDX,R9
CMP RSI,RDX
JNC 0x001b7d13
OR ECX,0x1
MOV DL,byte ptr [RDI + 0x20]
SUB R8,R9
XOR EAX,EAX
LAB_001b7cf1:
MOVZX R9D,byte ptr [RSI + RAX*0x1]
MOV R9B,byte ptr [RDI + R9*0x1]
CMP R9B,DL
JNZ 0x001b7d09
INC RAX
CMP R8,RAX
JNZ 0x001b7cf1
JMP 0x001b7cc2
LAB_001b7d09:
MOV EAX,ECX
NEG EAX
CMP R9B,DL
CMOVNC EAX,ECX
LAB_001b7d13:
POP RBP
RET
|
uint my_strnncollsp_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5)
{
byte *pbVar1;
byte bVar2;
byte bVar3;
long lVar4;
long lVar5;
uint uVar6;
ulong uVar7;
ulong uVar8;
lVar4 = *(long *)(param_1 + 0x58);
uVar8 = param_5;
if (param_3 < param_5) {
uVar8 = param_3;
}
pbVar1 = param_2 + uVar8;
while (param_2 < pbVar1) {
bVar2 = *param_2;
param_2 = param_2 + 1;
bVar3 = *param_4;
param_4 = param_4 + 1;
if (*(byte *)(lVar4 + (ulong)bVar2) != *(byte *)(lVar4 + (ulong)bVar3)) {
return (uint)*(byte *)(lVar4 + (ulong)bVar2) - (uint)*(byte *)(lVar4 + (ulong)bVar3);
}
}
if (param_3 != param_5) {
uVar7 = param_5;
if (param_5 < param_3) {
uVar7 = param_3;
}
if (param_3 < param_5) {
param_2 = param_4;
}
if (param_2 + (uVar7 - uVar8) <= param_2) {
return 0;
}
uVar6 = -(uint)(param_3 < param_5) | 1;
lVar5 = 0;
do {
if (*(byte *)(lVar4 + (ulong)param_2[lVar5]) != *(byte *)(lVar4 + 0x20)) {
if (*(byte *)(lVar4 + (ulong)param_2[lVar5]) < *(byte *)(lVar4 + 0x20)) {
return -uVar6;
}
return uVar6;
}
lVar5 = lVar5 + 1;
} while (uVar7 - uVar8 != lVar5);
}
return 0;
}
|
|
12,498
|
main.cold.6
|
monkey531[P]llama/tests/test-grammar-integration.cpp
|
static void test_failure_left_recursion() {
fprintf(stderr, "⚫ Testing left recursion detection:\n");
// Test simple left recursion detection
const std::string simple_str = R"""(root ::= "a" | root "a")""";
assert(test_build_grammar_fails(simple_str));
// Test more complicated left recursion detection
const std::string medium_str = R"""(
root ::= asdf
asdf ::= "a" | asdf "a"
)""";
assert(test_build_grammar_fails(medium_str));
// Test even more complicated left recursion detection
const std::string hard_str = R"""(
root ::= asdf
asdf ::= "a" | foo "b"
foo ::= "c" | asdf "d" | "e")""";
assert(test_build_grammar_fails(hard_str));
// Test yet even more complicated left recursion detection
const std::string hardest_str = R"""(
root ::= asdf
asdf ::= "a" | foo "b"
foo ::= "c" | empty asdf "d" | "e"
empty ::= "blah" | )""";
assert(test_build_grammar_fails(hardest_str));
fprintf(stderr, " ✅︎ Passed\n");
}
|
O3
|
cpp
|
main.cold.6:
testb $0x1, %dil
je 0x1a024
retq
pushq %rax
leaq 0x9aa3d(%rip), %rdi # 0xb4a69
leaq 0x98c1a(%rip), %rsi # 0xb2c4d
leaq 0x9aa54(%rip), %rcx # 0xb4a8e
movl $0x2c0, %edx # imm = 0x2C0
callq 0x19480
|
main_cold_6:
test dil, 1
jz short loc_1A024
retn
loc_1A024:
push rax
lea rdi, aTestBuildGramm; "test_build_grammar_fails(simple_str)"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidTestFailur_0; "void test_failure_left_recursion()"
mov edx, 2C0h
call ___assert_fail
|
void main_cold_6(char a1)
{
if ( (a1 & 1) == 0 )
__assert_fail(
"test_build_grammar_fails(simple_str)",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-grammar-integration.cpp",
704LL,
"void test_failure_left_recursion()");
}
|
main.cold.6:
TEST DIL,0x1
JZ 0x0011a024
RET
LAB_0011a024:
PUSH RAX
LEA RDI,[0x1b4a69]
LEA RSI,[0x1b2c4d]
LEA RCX,[0x1b4a8e]
MOV EDX,0x2c0
CALL 0x00119480
|
void main_cold_6(ulong param_1)
{
if ((param_1 & 1) != 0) {
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("test_build_grammar_fails(simple_str)",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-grammar-integration.cpp"
,0x2c0,"void test_failure_left_recursion()");
}
|
|
12,499
|
my_like_range_win1250ch
|
eloqsql/strings/ctype-win1250ch.c
|
static my_bool
my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
size_t res_length,
char *min_str, char *max_str,
size_t *min_length, size_t *max_length)
{
int only_min_found= 1;
const char *end = ptr + ptr_length;
char *min_org = min_str;
char *min_end = min_str + res_length;
/* return 1; */
for (; ptr != end && min_str != min_end ; ptr++)
{
if (*ptr == escape && ptr+1 != end)
ptr++; /* Skip escape */
else if (*ptr == w_one || *ptr == w_many) /* '_' or '%' in SQL */
break;
*min_str= like_range_prefix_min_win1250ch[(uint) (uchar) (*ptr)];
if (*min_str != min_sort_char)
only_min_found= 0;
min_str++;
*max_str++= like_range_prefix_max_win1250ch[(uint) (uchar) (*ptr)];
}
if (cs->state & MY_CS_BINSORT)
*min_length= (size_t) (min_str - min_org);
else
{
/* 'a\0\0... is the smallest possible string */
*min_length= res_length;
}
/* a\ff\ff... is the biggest possible string */
*max_length= res_length;
while (min_str != min_end)
{
*min_str++ = min_sort_char;
*max_str++ = max_sort_char;
}
return (only_min_found);
}
|
O3
|
c
|
my_like_range_win1250ch:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r9d, -0x2c(%rbp)
movl %r8d, -0x30(%rbp)
movq %rdi, -0x38(%rbp)
movq 0x20(%rbp), %r10
movq 0x18(%rbp), %r13
movq 0x10(%rbp), %r8
leaq (%r8,%r13), %r11
testq %rdx, %rdx
sete %al
testq %r8, %r8
sete %dil
orb %al, %dil
movb $0x1, %al
jne 0x52d02
addq %rsi, %rdx
leaq -0x1(%r8), %rbx
movb $0x1, %al
leaq 0x284c15(%rip), %r12 # 0x2d78a0
leaq 0x284d0e(%rip), %rdi # 0x2d79a0
movb (%rsi), %r14b
cmpb %cl, %r14b
setne %r9b
leaq 0x1(%rsi), %r15
cmpq %rdx, %r15
sete %r8b
orb %r9b, %r8b
cmpb $0x1, %r8b
jne 0x52cbf
cmpb -0x30(%rbp), %r14b
je 0x52d02
movq %rsi, %r15
cmpb -0x2c(%rbp), %r14b
je 0x52d02
movzbl (%r15), %esi
cmpq $0x20, %rsi
movb (%rsi,%r12), %sil
movb %sil, (%r13)
movzbl %al, %eax
movl $0x0, %esi
cmovnel %esi, %eax
incq %r13
movzbl (%r15), %esi
movb (%rsi,%rdi), %sil
movb %sil, (%r10)
incq %r10
movq %r15, %rsi
incq %rsi
cmpq %rdx, %rsi
je 0x52d02
leaq -0x1(%rbx), %r8
testq %rbx, %rbx
movq %r8, %rbx
jne 0x52c92
movq %r13, %rcx
subq 0x18(%rbp), %rcx
movq -0x38(%rbp), %rdx
testb $0x10, 0xc(%rdx)
movq 0x10(%rbp), %rsi
cmoveq %rsi, %rcx
movq 0x28(%rbp), %rdx
movq %rcx, (%rdx)
movq 0x30(%rbp), %rcx
movq %rsi, (%rcx)
cmpq %r11, %r13
je 0x52d3d
movb $0x20, (%r13)
incq %r13
movb $-0x1, (%r10)
incq %r10
jmp 0x52d27
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_like_range_win1250ch:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov [rbp+var_2C], r9d
mov [rbp+var_30], r8d
mov [rbp+var_38], rdi
mov r10, [rbp+arg_10]
mov r13, [rbp+arg_8]
mov r8, [rbp+arg_0]
lea r11, [r8+r13]
test rdx, rdx
setz al
test r8, r8
setz dil
or dil, al
mov al, 1
jnz loc_52D02
add rdx, rsi
lea rbx, [r8-1]
mov al, 1
lea r12, like_range_prefix_min_win1250ch
lea rdi, like_range_prefix_max_win1250ch
loc_52C92:
mov r14b, [rsi]
cmp r14b, cl
setnz r9b
lea r15, [rsi+1]
cmp r15, rdx
setz r8b
or r8b, r9b
cmp r8b, 1
jnz short loc_52CBF
cmp r14b, byte ptr [rbp+var_30]
jz short loc_52D02
mov r15, rsi
cmp r14b, byte ptr [rbp+var_2C]
jz short loc_52D02
loc_52CBF:
movzx esi, byte ptr [r15]
cmp rsi, 20h ; ' '
mov sil, [rsi+r12]
mov [r13+0], sil
movzx eax, al
mov esi, 0
cmovnz eax, esi
inc r13
movzx esi, byte ptr [r15]
mov sil, [rsi+rdi]
mov [r10], sil
inc r10
mov rsi, r15
inc rsi
cmp rsi, rdx
jz short loc_52D02
lea r8, [rbx-1]
test rbx, rbx
mov rbx, r8
jnz short loc_52C92
loc_52D02:
mov rcx, r13
sub rcx, [rbp+arg_8]
mov rdx, [rbp+var_38]
test byte ptr [rdx+0Ch], 10h
mov rsi, [rbp+arg_0]
cmovz rcx, rsi
mov rdx, [rbp+arg_18]
mov [rdx], rcx
mov rcx, [rbp+arg_20]
mov [rcx], rsi
loc_52D27:
cmp r13, r11
jz short loc_52D3D
mov byte ptr [r13+0], 20h ; ' '
inc r13
mov byte ptr [r10], 0FFh
inc r10
jmp short loc_52D27
loc_52D3D:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char my_like_range_win1250ch(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 a4,
char a5,
char a6,
long long a7,
long long a8,
_BYTE *a9,
long long *a10,
_QWORD *a11)
{
_BYTE *v12; // r13
char result; // al
unsigned __int8 *v14; // rdx
long long v15; // rbx
unsigned __int8 v16; // r14
unsigned __int8 *v17; // r15
long long v18; // rsi
long long v20; // rcx
v12 = (_BYTE *)a8;
result = 1;
if ( a3 != 0 && a7 != 0 )
{
v14 = &a2[a3];
v15 = a7 - 1;
result = 1;
do
{
v16 = *a2;
v17 = a2 + 1;
if ( *a2 != a4 || a2 + 1 == v14 )
{
if ( v16 == a5 )
break;
v17 = a2;
if ( v16 == a6 )
break;
}
v18 = *v17;
*v12 = like_range_prefix_min_win1250ch[v18];
if ( v18 != 32 )
result = 0;
++v12;
*a9++ = like_range_prefix_max_win1250ch[*v17];
a2 = v17 + 1;
if ( v17 + 1 == v14 )
break;
}
while ( v15-- != 0 );
}
v20 = (long long)&v12[-a8];
if ( (*(_BYTE *)(a1 + 12) & 0x10) == 0 )
v20 = a7;
*a10 = v20;
*a11 = a7;
while ( v12 != (_BYTE *)(a7 + a8) )
{
*v12++ = 32;
*a9++ = -1;
}
return result;
}
|
my_like_range_win1250ch:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV dword ptr [RBP + -0x2c],R9D
MOV dword ptr [RBP + -0x30],R8D
MOV qword ptr [RBP + -0x38],RDI
MOV R10,qword ptr [RBP + 0x20]
MOV R13,qword ptr [RBP + 0x18]
MOV R8,qword ptr [RBP + 0x10]
LEA R11,[R8 + R13*0x1]
TEST RDX,RDX
SETZ AL
TEST R8,R8
SETZ DIL
OR DIL,AL
MOV AL,0x1
JNZ 0x00152d02
ADD RDX,RSI
LEA RBX,[R8 + -0x1]
MOV AL,0x1
LEA R12,[0x3d78a0]
LEA RDI,[0x3d79a0]
LAB_00152c92:
MOV R14B,byte ptr [RSI]
CMP R14B,CL
SETNZ R9B
LEA R15,[RSI + 0x1]
CMP R15,RDX
SETZ R8B
OR R8B,R9B
CMP R8B,0x1
JNZ 0x00152cbf
CMP R14B,byte ptr [RBP + -0x30]
JZ 0x00152d02
MOV R15,RSI
CMP R14B,byte ptr [RBP + -0x2c]
JZ 0x00152d02
LAB_00152cbf:
MOVZX ESI,byte ptr [R15]
CMP RSI,0x20
MOV SIL,byte ptr [RSI + R12*0x1]
MOV byte ptr [R13],SIL
MOVZX EAX,AL
MOV ESI,0x0
CMOVNZ EAX,ESI
INC R13
MOVZX ESI,byte ptr [R15]
MOV SIL,byte ptr [RSI + RDI*0x1]
MOV byte ptr [R10],SIL
INC R10
MOV RSI,R15
INC RSI
CMP RSI,RDX
JZ 0x00152d02
LEA R8,[RBX + -0x1]
TEST RBX,RBX
MOV RBX,R8
JNZ 0x00152c92
LAB_00152d02:
MOV RCX,R13
SUB RCX,qword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + -0x38]
TEST byte ptr [RDX + 0xc],0x10
MOV RSI,qword ptr [RBP + 0x10]
CMOVZ RCX,RSI
MOV RDX,qword ptr [RBP + 0x28]
MOV qword ptr [RDX],RCX
MOV RCX,qword ptr [RBP + 0x30]
MOV qword ptr [RCX],RSI
LAB_00152d27:
CMP R13,R11
JZ 0x00152d3d
MOV byte ptr [R13],0x20
INC R13
MOV byte ptr [R10],0xff
INC R10
JMP 0x00152d27
LAB_00152d3d:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
my_like_range_win1250ch
(long param_1,byte *param_2,long param_3,byte param_4,byte param_5,byte param_6,
long param_7,int1 *param_8,int1 *param_9,long *param_10,long *param_11)
{
byte bVar1;
int8 uVar2;
byte *pbVar3;
long lVar4;
int1 *puVar5;
byte *pbVar6;
uVar2 = 1;
puVar5 = param_8;
if (param_7 != 0 && param_3 != 0) {
pbVar3 = param_2 + param_3;
uVar2 = 1;
lVar4 = param_7;
while( true ) {
lVar4 = lVar4 + -1;
bVar1 = *param_2;
pbVar6 = param_2 + 1;
if ((param_2 + 1 == pbVar3 || bVar1 != param_4) &&
((bVar1 == param_5 || (pbVar6 = param_2, bVar1 == param_6)))) break;
bVar1 = *pbVar6;
*puVar5 = like_range_prefix_min_win1250ch[bVar1];
if ((ulong)bVar1 != 0x20) {
uVar2 = 0;
}
puVar5 = puVar5 + 1;
*param_9 = like_range_prefix_max_win1250ch[*pbVar6];
param_9 = param_9 + 1;
param_2 = pbVar6 + 1;
if ((param_2 == pbVar3) || (lVar4 == 0)) break;
}
}
lVar4 = (long)puVar5 - (long)param_8;
if ((*(byte *)(param_1 + 0xc) & 0x10) == 0) {
lVar4 = param_7;
}
*param_10 = lVar4;
*param_11 = param_7;
for (; puVar5 != param_8 + param_7; puVar5 = puVar5 + 1) {
*puVar5 = 0x20;
*param_9 = 0xff;
param_9 = param_9 + 1;
}
return uVar2;
}
|
Subsets and Splits
C++ Functions Using STL
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++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.