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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
14,500
|
my_vfprintf
|
eloqsql/strings/my_vsnprintf.c
|
int my_vfprintf(FILE *stream, const char* format, va_list args)
{
char cvtbuf[1024];
int alloc= 0;
char *p= cvtbuf;
size_t cur_len= sizeof(cvtbuf), actual;
int ret;
/*
We do not know how much buffer we need.
So start with a reasonably-sized stack-allocated buffer, and increase
it exponentially until it is big enough.
*/
for (;;)
{
size_t new_len;
actual= my_vsnprintf(p, cur_len, format, args);
if (actual < cur_len - 1)
break;
/*
Not enough space (or just enough with nothing to spare - but we cannot
distinguish this case from the return value). Allocate a bigger buffer
and try again.
*/
if (alloc)
my_free(p);
else
alloc= 1;
new_len= cur_len*2;
if (new_len < cur_len)
return 0; /* Overflow */
cur_len= new_len;
p= my_malloc(PSI_INSTRUMENT_ME, cur_len, MYF(MY_FAE));
if (!p)
return 0;
}
ret= (int) actual;
if (fputs(p, stream) < 0)
ret= -1;
if (alloc)
my_free(p);
return ret;
}
|
O3
|
c
|
my_vfprintf:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp # imm = 0x418
movq %rdx, -0x440(%rbp)
movq %rsi, %r12
movq %rdi, -0x438(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movb $0x1, %bl
movl $0x400, %r13d # imm = 0x400
leaq -0x430(%rbp), %r14
leaq 0x2d61d0(%rip), %rdi # 0x3adfd0
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq -0x440(%rbp), %r8
callq 0xd6b50
movq %rax, %r15
leaq -0x1(%r13), %rax
cmpq %rax, %r15
jb 0xd7e51
testb $0x1, %bl
jne 0xd7e2e
movq %r14, %rdi
callq 0xa0f0a
testq %r13, %r13
js 0xd7e7e
addq %r13, %r13
xorl %ebx, %ebx
movl $0x8, %edx
xorl %edi, %edi
movq %r13, %rsi
callq 0xa0cdd
movq %rax, %r14
testq %rax, %rax
jne 0xd7df9
jmp 0xd7e80
movq %r14, %rdi
movq -0x438(%rbp), %rsi
callq 0x292e0
testl %eax, %eax
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
cmovnsl %r15d, %r12d
testb $0x1, %bl
jne 0xd7e79
movq %r14, %rdi
callq 0xa0f0a
movl %r12d, %ebx
jmp 0xd7e80
xorl %ebx, %ebx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xd7ea3
movl %ebx, %eax
addq $0x418, %rsp # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
|
my_vfprintf:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 418h
mov [rbp+var_440], rdx
mov r12, rsi
mov [rbp+var_438], rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov bl, 1
mov r13d, 400h
lea r14, [rbp+var_430]
loc_D7DF9:
lea rdi, my_charset_latin1
mov rsi, r14
mov rdx, r13
mov rcx, r12
mov r8, [rbp+var_440]
call my_vsnprintf_ex
mov r15, rax
lea rax, [r13-1]
cmp r15, rax
jb short loc_D7E51
test bl, 1
jnz short loc_D7E2E
mov rdi, r14
call my_free
loc_D7E2E:
test r13, r13
js short loc_D7E7E
add r13, r13
xor ebx, ebx
mov edx, 8
xor edi, edi
mov rsi, r13
call my_malloc
mov r14, rax
test rax, rax
jnz short loc_D7DF9
jmp short loc_D7E80
loc_D7E51:
mov rdi, r14
mov rsi, [rbp+var_438]
call _fputs
test eax, eax
mov r12d, 0FFFFFFFFh
cmovns r12d, r15d
test bl, 1
jnz short loc_D7E79
mov rdi, r14
call my_free
loc_D7E79:
mov ebx, r12d
jmp short loc_D7E80
loc_D7E7E:
xor ebx, ebx
loc_D7E80:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_D7EA3
mov eax, ebx
add rsp, 418h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D7EA3:
call ___stack_chk_fail
|
long long my_vfprintf(long long a1, unsigned __int8 *a2, unsigned int *a3)
{
unsigned int v3; // ebx
long long v4; // r13
char *v5; // r14
unsigned long long v6; // r15
unsigned int v7; // r12d
char v10; // [rsp+10h] [rbp-430h] BYREF
unsigned long long v11; // [rsp+410h] [rbp-30h]
v11 = __readfsqword(0x28u);
LOBYTE(v3) = 1;
v4 = 1024LL;
v5 = &v10;
while ( 1 )
{
v6 = my_vsnprintf_ex((long long)my_charset_latin1, (unsigned long long)v5, v4, a2, a3);
if ( v6 < v4 - 1 )
break;
if ( (v3 & 1) == 0 )
my_free((long long)v5);
if ( v4 < 0 )
return 0;
v4 *= 2LL;
v3 = 0;
v5 = (char *)my_malloc(0, (const char *)v4, 8);
if ( !v5 )
return v3;
}
v7 = -1;
if ( (int)fputs(v5, a1) >= 0 )
v7 = v6;
if ( (v3 & 1) == 0 )
my_free((long long)v5);
return v7;
}
|
my_vfprintf:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x418
MOV qword ptr [RBP + -0x440],RDX
MOV R12,RSI
MOV qword ptr [RBP + -0x438],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV BL,0x1
MOV R13D,0x400
LEA R14,[RBP + -0x430]
LAB_001d7df9:
LEA RDI,[0x4adfd0]
MOV RSI,R14
MOV RDX,R13
MOV RCX,R12
MOV R8,qword ptr [RBP + -0x440]
CALL 0x001d6b50
MOV R15,RAX
LEA RAX,[R13 + -0x1]
CMP R15,RAX
JC 0x001d7e51
TEST BL,0x1
JNZ 0x001d7e2e
MOV RDI,R14
CALL 0x001a0f0a
LAB_001d7e2e:
TEST R13,R13
JS 0x001d7e7e
ADD R13,R13
XOR EBX,EBX
MOV EDX,0x8
XOR EDI,EDI
MOV RSI,R13
CALL 0x001a0cdd
MOV R14,RAX
TEST RAX,RAX
JNZ 0x001d7df9
JMP 0x001d7e80
LAB_001d7e51:
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x438]
CALL 0x001292e0
TEST EAX,EAX
MOV R12D,0xffffffff
CMOVNS R12D,R15D
TEST BL,0x1
JNZ 0x001d7e79
MOV RDI,R14
CALL 0x001a0f0a
LAB_001d7e79:
MOV EBX,R12D
JMP 0x001d7e80
LAB_001d7e7e:
XOR EBX,EBX
LAB_001d7e80:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001d7ea3
MOV EAX,EBX
ADD RSP,0x418
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d7ea3:
CALL 0x00129270
|
ulong my_vfprintf(FILE *param_1,int8 param_2,int8 param_3)
{
int iVar1;
ulong uVar2;
char *__s;
ulong uVar3;
ulong uVar4;
long lVar5;
long in_FS_OFFSET;
char local_438 [1024];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar5 = 0x400;
__s = local_438;
uVar3 = 1;
do {
uVar2 = my_vsnprintf_ex(&my_charset_latin1,__s,lVar5,param_2,param_3);
if (uVar2 < lVar5 - 1U) {
iVar1 = fputs(__s,param_1);
uVar4 = 0xffffffff;
if (-1 < iVar1) {
uVar4 = uVar2 & 0xffffffff;
}
if (uVar3 == 0) {
my_free(__s);
}
break;
}
if ((char)uVar3 == '\0') {
my_free(__s);
}
if (lVar5 < 0) {
uVar4 = 0;
break;
}
lVar5 = lVar5 * 2;
uVar4 = 0;
__s = (char *)my_malloc(0,lVar5,8);
uVar3 = uVar4;
} while (__s != (char *)0x0);
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar4;
}
|
|
14,501
|
del
|
eloqsql/storage/myisam/mi_delete.c
|
static int del(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key,
uchar *anc_buff, my_off_t leaf_page, uchar *leaf_buff,
uchar *keypos, /* Pos to where deleted key was */
my_off_t next_block,
uchar *ret_key) /* key before keypos in anc_buff */
{
int ret_value,length;
uint a_length,nod_flag,tmp;
my_off_t next_page;
uchar keybuff[HA_MAX_KEY_BUFF],*endpos,*next_buff,*key_start, *prev_key;
MYISAM_SHARE *share=info->s;
MI_KEY_PARAM s_temp;
DBUG_ENTER("del");
DBUG_PRINT("enter",("leaf_page: %lld keypos: %p", leaf_page,
keypos));
DBUG_DUMP("leaf_buff",(uchar*) leaf_buff,mi_getint(leaf_buff));
endpos=leaf_buff+mi_getint(leaf_buff);
if (!(key_start=_mi_get_last_key(info,keyinfo,leaf_buff,keybuff,endpos,
&tmp)))
DBUG_RETURN(-1);
if ((nod_flag=mi_test_if_nod(leaf_buff)))
{
next_page= _mi_kpos(nod_flag,endpos);
if (!(next_buff= (uchar*) my_alloca((uint) keyinfo->block_length+
HA_MAX_KEY_BUFF*2)))
DBUG_RETURN(-1);
if (!_mi_fetch_keypage(info,keyinfo,next_page,DFLT_INIT_HITS,next_buff,0))
ret_value= -1;
else
{
DBUG_DUMP("next_page",(uchar*) next_buff,mi_getint(next_buff));
if ((ret_value=del(info,keyinfo,key,anc_buff,next_page,next_buff,
keypos,next_block,ret_key)) >0)
{
endpos=leaf_buff+mi_getint(leaf_buff);
if (ret_value == 1)
{
ret_value=underflow(info,keyinfo,leaf_buff,next_page,
next_buff,endpos);
if (ret_value == 0 && mi_getint(leaf_buff) > keyinfo->block_length)
{
ret_value=_mi_split_page(info,keyinfo,key,leaf_buff,ret_key,0) | 2;
}
}
else
{
DBUG_PRINT("test",("Inserting of key when deleting"));
if (!_mi_get_last_key(info,keyinfo,leaf_buff,keybuff,endpos,
&tmp))
goto err;
ret_value=_mi_insert(info,keyinfo,key,leaf_buff,endpos,keybuff,
(uchar*) 0,(uchar*) 0,(my_off_t) 0,0);
}
}
if (_mi_write_keypage(info,keyinfo,leaf_page,DFLT_INIT_HITS,leaf_buff))
goto err;
}
my_afree((uchar*) next_buff);
DBUG_RETURN(ret_value);
}
/* Remove last key from leaf page */
mi_putint(leaf_buff,key_start-leaf_buff,nod_flag);
if (_mi_write_keypage(info,keyinfo,leaf_page,DFLT_INIT_HITS,leaf_buff))
goto err;
/* Place last key in ancestor page on deleted key position */
a_length=mi_getint(anc_buff);
endpos=anc_buff+a_length;
if (keypos != anc_buff+2+share->base.key_reflength &&
!_mi_get_last_key(info,keyinfo,anc_buff,ret_key,keypos,&tmp))
goto err;
prev_key=(keypos == anc_buff+2+share->base.key_reflength ?
0 : ret_key);
length=(*keyinfo->pack_key)(keyinfo,share->base.key_reflength,
keypos == endpos ? (uchar*) 0 : keypos,
prev_key, prev_key,
keybuff,&s_temp);
if (length > 0)
bmove_upp((uchar*) endpos+length,(uchar*) endpos,(uint) (endpos-keypos));
else
bmove(keypos,keypos-length, (int) (endpos-keypos)+length);
(*keyinfo->store_key)(keyinfo,keypos,&s_temp);
/* Save pointer to next leaf */
if (!(*keyinfo->get_key)(keyinfo,share->base.key_reflength,&keypos,ret_key))
goto err;
_mi_kpointer(info,keypos - share->base.key_reflength,next_block);
mi_putint(anc_buff,a_length+length,share->base.key_reflength);
DBUG_RETURN( mi_getint(leaf_buff) <=
(info->quick_mode ? MI_MIN_KEYBLOCK_LENGTH :
(uint) keyinfo->underflow_block_length));
err:
DBUG_RETURN(-1);
}
|
O3
|
c
|
del:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x538, %rsp # imm = 0x538
movq %r9, %r14
movq %r8, -0x518(%rbp)
movq %rcx, -0x510(%rbp)
movq %rdx, -0x520(%rbp)
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rbp), %rax
movq %rax, -0x500(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq %rax, -0x4f8(%rbp)
movzbl 0x1(%r9), %eax
movzbl (%r9), %r12d
andl $0x7f, %r12d
shll $0x8, %r12d
orq %rax, %r12
addq %r9, %r12
leaq -0x4f0(%rbp), %rcx
leaq -0x504(%rbp), %r9
movq %r14, %rdx
movq %r12, %r8
callq 0x859a2
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x75842
cmpb $0x0, (%r14)
js 0x75867
subl %r14d, %eax
rolw $0x8, %ax
movw %ax, (%r14)
movq %r15, %rdi
movq %rbx, %rsi
movq -0x518(%rbp), %rdx
movl $0x3, %ecx
movq %r14, %r8
callq 0x83be4
testl %eax, %eax
je 0x75984
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x75bce
movl %r13d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %rcx
movl 0x17c(%rcx), %edi
testl %edi, %edi
je 0x7580f
movq %r12, %rsi
callq 0x844b2
movq %rax, %rdx
movzwl 0xe(%rbx), %eax
movq %rsp, %r12
addl $0x97f, %eax # imm = 0x97F
andl $-0x10, %eax
subq %rax, %r12
movq %r12, %rsp
movq %r15, %rdi
movq %rbx, %rsi
movq %rdx, -0x4f8(%rbp)
movl $0x3, %ecx
movq %r12, %r8
xorl %r9d, %r9d
callq 0x83b38
testq %rax, %rax
je 0x75842
subq $0x8, %rsp
movq %r15, %rdi
movq %rbx, %rsi
movq -0x520(%rbp), %rdx
movq -0x510(%rbp), %rcx
movq -0x4f8(%rbp), %r8
movq %r12, %r9
pushq 0x20(%rbp)
pushq 0x18(%rbp)
pushq -0x500(%rbp)
callq 0x7577a
addq $0x20, %rsp
movl %eax, %r13d
testl %eax, %eax
jle 0x75ba7
movzbl 0x1(%r14), %eax
movzbl (%r14), %r10d
andl $0x7f, %r10d
shll $0x8, %r10d
orq %rax, %r10
addq %r14, %r10
cmpl $0x1, %r13d
jne 0x75b3a
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq -0x4f8(%rbp), %rcx
movq %r12, %r8
movq %r10, %r9
callq 0x75bd3
testl %eax, %eax
jne 0x75ba4
movzbl 0x1(%r14), %eax
movzbl (%r14), %ecx
andl $0x7f, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movzwl 0xe(%rbx), %eax
xorl %r13d, %r13d
cmpl %eax, %ecx
jbe 0x75ba7
movq %r15, %rdi
movq %rbx, %rsi
movq -0x520(%rbp), %rdx
movq %r14, %rcx
movq 0x20(%rbp), %r8
xorl %r9d, %r9d
callq 0x89072
movl %eax, %r13d
orl $0x2, %r13d
jmp 0x75ba7
movq -0x510(%rbp), %rcx
movzbl 0x1(%rcx), %r12d
movzbl (%rcx), %edi
movq -0x4f8(%rbp), %rax
movl 0x17c(%rax), %esi
leaq (%rcx,%rsi), %rax
addq $0x2, %rax
movq -0x500(%rbp), %r8
cmpq %r8, %rax
je 0x759f7
movq %rdi, %r13
leaq -0x504(%rbp), %r9
movq %r15, %rdi
movq %rbx, %rsi
movq %rcx, %rdx
movq 0x20(%rbp), %rcx
callq 0x859a2
testq %rax, %rax
je 0x7583c
movq -0x4f8(%rbp), %rax
movl 0x17c(%rax), %esi
movq -0x510(%rbp), %rcx
movq -0x500(%rbp), %r8
movq %r13, %rdi
andl $0x7f, %edi
shll $0x8, %edi
orl %r12d, %edi
leaq 0x2(%rcx), %rax
addq %rsi, %rax
xorl %edx, %edx
cmpq %r8, %rax
movq %rcx, %rax
movq 0x20(%rbp), %rcx
cmoveq %rdx, %rcx
movq %rdi, -0x518(%rbp)
leaq (%rax,%rdi), %r12
cmpq %r8, %r12
cmovneq %r8, %rdx
subq $0x8, %rsp
leaq -0x560(%rbp), %rax
leaq -0x4f0(%rbp), %r9
movq %rbx, %rdi
movq %rcx, %r8
pushq %rax
callq *0x50(%rbx)
addq $0x10, %rsp
movl %eax, %r13d
testl %eax, %eax
jle 0x75a69
movl %r13d, %edi
addq %r12, %rdi
movl %r12d, %edx
subl -0x500(%rbp), %edx
movq %r12, %rsi
callq 0xaac70
jmp 0x75a87
movslq %r13d, %rax
movq -0x500(%rbp), %rdi
movq %rdi, %rsi
subq %rax, %rsi
subl %edi, %r12d
addl %r13d, %r12d
movslq %r12d, %rdx
callq 0x29110
leaq -0x560(%rbp), %rdx
movq %rbx, %rdi
movq -0x500(%rbp), %rsi
callq *0x58(%rbx)
movq -0x4f8(%rbp), %rax
movl 0x17c(%rax), %esi
leaq 0x10(%rbp), %rdx
movq %rbx, %rdi
movq 0x20(%rbp), %rcx
callq *0x48(%rbx)
testl %eax, %eax
je 0x7583c
movq 0x10(%rbp), %rsi
movq -0x4f8(%rbp), %r12
movl 0x17c(%r12), %eax
subq %rax, %rsi
movq %r15, %rdi
movq 0x18(%rbp), %rdx
callq 0x8501d
xorl %eax, %eax
cmpl $0x0, 0x17c(%r12)
setne %al
shll $0xf, %eax
addl -0x518(%rbp), %r13d
addl %r13d, %eax
movq -0x510(%rbp), %rcx
movb %r13b, 0x1(%rcx)
movb %ah, (%rcx)
movzbl 0x1(%r14), %ecx
movzbl (%r14), %eax
andl $0x7f, %eax
shll $0x8, %eax
orl %ecx, %eax
movl $0x32, %ecx
cmpb $0x0, 0x33b(%r15)
jne 0x75b2c
movzwl 0x10(%rbx), %ecx
xorl %r13d, %r13d
cmpl %ecx, %eax
setbe %r13b
jmp 0x75842
leaq -0x4f0(%rbp), %rcx
leaq -0x504(%rbp), %r9
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r10, %r12
movq %r10, %r8
callq 0x859a2
testq %rax, %rax
je 0x7583c
subq $0x20, %rsp
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movl $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
leaq -0x4f0(%rbp), %r9
movq %r15, %rdi
movq %rbx, %rsi
movq -0x520(%rbp), %rdx
movq %r14, %rcx
movq %r12, %r8
callq 0x8872b
addq $0x20, %rsp
movl %eax, %r13d
movq %r15, %rdi
movq %rbx, %rsi
movq -0x518(%rbp), %rdx
movl $0x3, %ecx
movq %r14, %r8
callq 0x83be4
testl %eax, %eax
jne 0x7583c
jmp 0x75842
callq 0x29250
|
del_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 538h
mov r14, r9
mov [rbp+var_518], r8
mov [rbp+var_510], rcx
mov [rbp+var_520], rdx
mov rbx, rsi
mov r15, rdi
mov rax, [rbp+arg_0]
mov [rbp+var_500], rax
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov [rbp+var_4F8], rax
movzx eax, byte ptr [r9+1]
movzx r12d, byte ptr [r9]
and r12d, 7Fh
shl r12d, 8
or r12, rax
add r12, r9
lea rcx, [rbp+var_4F0]
lea r9, [rbp+var_504]
mov rdx, r14
mov r8, r12
call _mi_get_last_key
mov r13d, 0FFFFFFFFh
test rax, rax
jz short loc_75842
cmp byte ptr [r14], 0
js short loc_75867
loc_7580F:
sub eax, r14d
rol ax, 8
mov [r14], ax
mov rdi, r15
mov rsi, rbx
mov rdx, [rbp+var_518]
mov ecx, 3
mov r8, r14
call _mi_write_keypage
test eax, eax
jz loc_75984
loc_7583C:
mov r13d, 0FFFFFFFFh
loc_75842:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_75BCE
mov eax, r13d
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_75867:
mov rcx, [r15]
mov edi, [rcx+17Ch]
test edi, edi
jz short loc_7580F
mov rsi, r12
call _mi_kpos
mov rdx, rax
movzx eax, word ptr [rbx+0Eh]
mov r12, rsp
add eax, 97Fh
and eax, 0FFFFFFF0h
sub r12, rax
mov rsp, r12
mov rdi, r15
mov rsi, rbx
mov [rbp+var_4F8], rdx
mov ecx, 3
mov r8, r12
xor r9d, r9d
call _mi_fetch_keypage
test rax, rax
jz short loc_75842
sub rsp, 8
mov rdi, r15
mov rsi, rbx
mov rdx, [rbp+var_520]
mov rcx, [rbp+var_510]
mov r8, [rbp+var_4F8]
mov r9, r12
push [rbp+arg_10]
push [rbp+arg_8]
push [rbp+var_500]
call del_0
add rsp, 20h
mov r13d, eax
test eax, eax
jle loc_75BA7
movzx eax, byte ptr [r14+1]
movzx r10d, byte ptr [r14]
and r10d, 7Fh
shl r10d, 8
or r10, rax
add r10, r14
cmp r13d, 1
jnz loc_75B3A
mov rdi, r15
mov rsi, rbx
mov rdx, r14
mov rcx, [rbp+var_4F8]
mov r8, r12
mov r9, r10
call underflow_0
test eax, eax
jnz loc_75BA4
movzx eax, byte ptr [r14+1]
movzx ecx, byte ptr [r14]
and ecx, 7Fh
shl ecx, 8
or ecx, eax
movzx eax, word ptr [rbx+0Eh]
xor r13d, r13d
cmp ecx, eax
jbe loc_75BA7
mov rdi, r15
mov rsi, rbx
mov rdx, [rbp+var_520]
mov rcx, r14
mov r8, [rbp+arg_10]
xor r9d, r9d
call _mi_split_page
mov r13d, eax
or r13d, 2
jmp loc_75BA7
loc_75984:
mov rcx, [rbp+var_510]
movzx r12d, byte ptr [rcx+1]
movzx edi, byte ptr [rcx]
mov rax, [rbp+var_4F8]
mov esi, [rax+17Ch]
lea rax, [rcx+rsi]
add rax, 2
mov r8, [rbp+var_500]
cmp rax, r8
jz short loc_759F7
mov r13, rdi
lea r9, [rbp+var_504]
mov rdi, r15
mov rsi, rbx
mov rdx, rcx
mov rcx, [rbp+arg_10]
call _mi_get_last_key
test rax, rax
jz loc_7583C
mov rax, [rbp+var_4F8]
mov esi, [rax+17Ch]
mov rcx, [rbp+var_510]
mov r8, [rbp+var_500]
mov rdi, r13
loc_759F7:
and edi, 7Fh
shl edi, 8
or edi, r12d
lea rax, [rcx+2]
add rax, rsi
xor edx, edx
cmp rax, r8
mov rax, rcx
mov rcx, [rbp+arg_10]
cmovz rcx, rdx
mov [rbp+var_518], rdi
lea r12, [rax+rdi]
cmp r12, r8
cmovnz rdx, r8
sub rsp, 8
lea rax, [rbp+var_560]
lea r9, [rbp+var_4F0]
mov rdi, rbx
mov r8, rcx
push rax
call qword ptr [rbx+50h]
add rsp, 10h
mov r13d, eax
test eax, eax
jle short loc_75A69
mov edi, r13d
add rdi, r12
mov edx, r12d
sub edx, dword ptr [rbp+var_500]
mov rsi, r12
call bmove_upp
jmp short loc_75A87
loc_75A69:
movsxd rax, r13d
mov rdi, [rbp+var_500]
mov rsi, rdi
sub rsi, rax
sub r12d, edi
add r12d, r13d
movsxd rdx, r12d
call _memmove
loc_75A87:
lea rdx, [rbp+var_560]
mov rdi, rbx
mov rsi, [rbp+var_500]
call qword ptr [rbx+58h]
mov rax, [rbp+var_4F8]
mov esi, [rax+17Ch]
lea rdx, [rbp+arg_0]
mov rdi, rbx
mov rcx, [rbp+arg_10]
call qword ptr [rbx+48h]
test eax, eax
jz loc_7583C
mov rsi, [rbp+arg_0]
mov r12, [rbp+var_4F8]
mov eax, [r12+17Ch]
sub rsi, rax
mov rdi, r15
mov rdx, [rbp+arg_8]
call _mi_kpointer
xor eax, eax
cmp dword ptr [r12+17Ch], 0
setnz al
shl eax, 0Fh
add r13d, dword ptr [rbp+var_518]
add eax, r13d
mov rcx, [rbp+var_510]
mov [rcx+1], r13b
mov [rcx], ah
movzx ecx, byte ptr [r14+1]
movzx eax, byte ptr [r14]
and eax, 7Fh
shl eax, 8
or eax, ecx
mov ecx, 32h ; '2'
cmp byte ptr [r15+33Bh], 0
jnz short loc_75B2C
movzx ecx, word ptr [rbx+10h]
loc_75B2C:
xor r13d, r13d
cmp eax, ecx
setbe r13b
jmp loc_75842
loc_75B3A:
lea rcx, [rbp+var_4F0]
lea r9, [rbp+var_504]
mov rdi, r15
mov rsi, rbx
mov rdx, r14
mov r12, r10
mov r8, r10
call _mi_get_last_key
test rax, rax
jz loc_7583C
sub rsp, 20h
xorps xmm0, xmm0
movups [rsp+580h+var_580], xmm0
mov [rsp+580h+var_568], 0
mov [rsp+580h+var_570], 0
lea r9, [rbp+var_4F0]
mov rdi, r15
mov rsi, rbx
mov rdx, [rbp+var_520]
mov rcx, r14
mov r8, r12
call _mi_insert
add rsp, 20h
loc_75BA4:
mov r13d, eax
loc_75BA7:
mov rdi, r15
mov rsi, rbx
mov rdx, [rbp+var_518]
mov ecx, 3
mov r8, r14
call _mi_write_keypage
test eax, eax
jnz loc_7583C
jmp loc_75842
loc_75BCE:
call ___stack_chk_fail
|
long long del_0(
_BYTE *a1,
long long a2,
long long a3,
_BYTE *a4,
long long a5,
char *a6,
_BYTE *a7,
long long a8,
long long a9)
{
char *v12; // r12
long long last_key; // rax
unsigned int v14; // r13d
long long v16; // rdi
long long v17; // rax
_BYTE *v18; // r12
long long v19; // rax
unsigned int v20; // eax
_BYTE *v21; // rcx
int v22; // r12d
char v23; // di
long long v24; // rsi
long long v25; // r8
char v26; // r13
long long v27; // rdi
long long v28; // rdx
bool v29; // zf
_BYTE *v30; // rax
long long v31; // rcx
_BYTE *v32; // r12
int v33; // eax
__int16 v34; // r13
long long v35; // r12
bool v36; // al
__int16 v37; // r13
_BYTE *v38; // rcx
unsigned int v39; // ecx
int v40; // r12d
_BYTE v41[64]; // [rsp+20h] [rbp-560h] BYREF
long long v42; // [rsp+60h] [rbp-520h]
long long v43; // [rsp+68h] [rbp-518h]
_BYTE *v44; // [rsp+70h] [rbp-510h]
_BYTE v45[4]; // [rsp+7Ch] [rbp-504h] BYREF
_BYTE *v46; // [rsp+80h] [rbp-500h]
long long v47; // [rsp+88h] [rbp-4F8h]
_BYTE v48[1216]; // [rsp+90h] [rbp-4F0h] BYREF
unsigned long long v49; // [rsp+550h] [rbp-30h]
v43 = a5;
v44 = a4;
v42 = a3;
v46 = a7;
v49 = __readfsqword(0x28u);
v47 = *(_QWORD *)a1;
v12 = &a6[(unsigned __int8)a6[1] | (unsigned long long)((unsigned __int8)(*a6 & 0x7F) << 8)];
last_key = mi_get_last_key(a1, a2, a6, v48, v12, v45);
v14 = -1;
if ( last_key )
{
if ( *a6 < 0 )
{
v16 = *(unsigned int *)(*(_QWORD *)a1 + 380LL);
if ( (_DWORD)v16 )
{
v17 = mi_kpos(v16, v12);
v18 = &v41[-((*(unsigned __int16 *)(a2 + 14) + 2431) & 0xFFFFFFF0)];
v47 = v17;
if ( !mi_fetch_keypage(a1, a2, v17, 3LL, v18, 0LL) )
return v14;
v14 = del_0((_DWORD)a1, a2, v42, (_DWORD)v44, v47, (_DWORD)v18, (long long)v46, a8, a9);
if ( (int)v14 <= 0 )
goto LABEL_30;
v19 = (unsigned __int8)a6[1];
if ( v14 == 1 )
{
v20 = underflow_0(a1, a2, a6, v47, v18, &a6[v19 | ((unsigned __int8)(*a6 & 0x7F) << 8)]);
if ( !v20 )
{
v14 = 0;
if ( ((unsigned __int8)a6[1] | ((unsigned __int8)(*a6 & 0x7F) << 8)) > (unsigned int)*(unsigned __int16 *)(a2 + 14) )
v14 = mi_split_page(a1, a2, v42, a6, a9, 0LL) | 2;
LABEL_30:
if ( !(unsigned int)mi_write_keypage(a1, a2, v43, 3LL, a6) )
return v14;
return (unsigned int)-1;
}
LABEL_29:
v14 = v20;
goto LABEL_30;
}
v40 = (_DWORD)a6 + (v19 | ((*a6 & 0x7F) << 8));
if ( mi_get_last_key(a1, a2, a6, v48, &a6[v19 | ((unsigned __int8)(*a6 & 0x7F) << 8)], v45) )
{
v20 = mi_insert((_DWORD)a1, a2, v42, (_DWORD)a6, v40, (unsigned int)v48, 0LL, 0LL, 0LL, 0);
goto LABEL_29;
}
return (unsigned int)-1;
}
}
*(_WORD *)a6 = __ROL2__(last_key - (_WORD)a6, 8);
if ( (unsigned int)mi_write_keypage(a1, a2, v43, 3LL, a6) )
return (unsigned int)-1;
v21 = v44;
v22 = (unsigned __int8)v44[1];
v23 = *v44;
v24 = *(unsigned int *)(v47 + 380);
v25 = (long long)v46;
if ( &v44[v24 + 2] != v46 )
{
v26 = *v44;
if ( !mi_get_last_key(a1, a2, v44, a9, v46, v45) )
return (unsigned int)-1;
v24 = *(unsigned int *)(v47 + 380);
v21 = v44;
v25 = (long long)v46;
v23 = v26;
}
v27 = v22 | ((unsigned __int8)(v23 & 0x7F) << 8);
v28 = 0LL;
v29 = &v21[v24 + 2] == (_BYTE *)v25;
v30 = v21;
v31 = a9;
if ( v29 )
v31 = 0LL;
v43 = v27;
v32 = &v30[v27];
if ( &v30[v27] != (_BYTE *)v25 )
v28 = v25;
v33 = (*(long long ( **)(long long, long long, long long, long long, long long, _BYTE *, _BYTE *))(a2 + 80))(
a2,
v24,
v28,
v31,
v31,
v48,
v41);
v34 = v33;
if ( v33 <= 0 )
memmove(v46, &v46[-v33], v33 + (int)v32 - (int)v46);
else
bmove_upp(&v32[v33], v32, (unsigned int)((_DWORD)v32 - (_DWORD)v46));
(*(void ( **)(long long, _BYTE *, _BYTE *))(a2 + 88))(a2, v46, v41);
if ( !(*(unsigned int ( **)(long long, _QWORD, _BYTE **, long long))(a2 + 72))(
a2,
*(unsigned int *)(v47 + 380),
&a7,
a9) )
return (unsigned int)-1;
v35 = v47;
mi_kpointer(a1, &a7[-*(unsigned int *)(v47 + 380)], a8);
v36 = *(_DWORD *)(v35 + 380) != 0;
v37 = v43 + v34;
v38 = v44;
v44[1] = v37;
*v38 = (unsigned __int16)(v37 + (v36 << 15)) >> 8;
v39 = 50;
if ( !a1[827] )
v39 = *(unsigned __int16 *)(a2 + 16);
return ((unsigned __int8)a6[1] | ((unsigned __int8)(*a6 & 0x7F) << 8)) <= v39;
}
return v14;
}
|
del:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x538
MOV R14,R9
MOV qword ptr [RBP + -0x518],R8
MOV qword ptr [RBP + -0x510],RCX
MOV qword ptr [RBP + -0x520],RDX
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x500],RAX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RBP + -0x4f8],RAX
MOVZX EAX,byte ptr [R9 + 0x1]
MOVZX R12D,byte ptr [R9]
AND R12D,0x7f
SHL R12D,0x8
OR R12,RAX
ADD R12,R9
LEA RCX,[RBP + -0x4f0]
LEA R9,[RBP + -0x504]
MOV RDX,R14
MOV R8,R12
CALL 0x001859a2
MOV R13D,0xffffffff
TEST RAX,RAX
JZ 0x00175842
CMP byte ptr [R14],0x0
JS 0x00175867
LAB_0017580f:
SUB EAX,R14D
ROL AX,0x8
MOV word ptr [R14],AX
MOV RDI,R15
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x518]
MOV ECX,0x3
MOV R8,R14
CALL 0x00183be4
TEST EAX,EAX
JZ 0x00175984
LAB_0017583c:
MOV R13D,0xffffffff
LAB_00175842:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00175bce
MOV EAX,R13D
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00175867:
MOV RCX,qword ptr [R15]
MOV EDI,dword ptr [RCX + 0x17c]
TEST EDI,EDI
JZ 0x0017580f
MOV RSI,R12
CALL 0x001844b2
MOV RDX,RAX
MOVZX EAX,word ptr [RBX + 0xe]
MOV R12,RSP
ADD EAX,0x97f
AND EAX,0xfffffff0
SUB R12,RAX
MOV RSP,R12
MOV RDI,R15
MOV RSI,RBX
MOV qword ptr [RBP + -0x4f8],RDX
MOV ECX,0x3
MOV R8,R12
XOR R9D,R9D
CALL 0x00183b38
TEST RAX,RAX
JZ 0x00175842
SUB RSP,0x8
MOV RDI,R15
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x520]
MOV RCX,qword ptr [RBP + -0x510]
MOV R8,qword ptr [RBP + -0x4f8]
MOV R9,R12
PUSH qword ptr [RBP + 0x20]
PUSH qword ptr [RBP + 0x18]
PUSH qword ptr [RBP + -0x500]
CALL 0x0017577a
ADD RSP,0x20
MOV R13D,EAX
TEST EAX,EAX
JLE 0x00175ba7
MOVZX EAX,byte ptr [R14 + 0x1]
MOVZX R10D,byte ptr [R14]
AND R10D,0x7f
SHL R10D,0x8
OR R10,RAX
ADD R10,R14
CMP R13D,0x1
JNZ 0x00175b3a
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
MOV RCX,qword ptr [RBP + -0x4f8]
MOV R8,R12
MOV R9,R10
CALL 0x00175bd3
TEST EAX,EAX
JNZ 0x00175ba4
MOVZX EAX,byte ptr [R14 + 0x1]
MOVZX ECX,byte ptr [R14]
AND ECX,0x7f
SHL ECX,0x8
OR ECX,EAX
MOVZX EAX,word ptr [RBX + 0xe]
XOR R13D,R13D
CMP ECX,EAX
JBE 0x00175ba7
MOV RDI,R15
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x520]
MOV RCX,R14
MOV R8,qword ptr [RBP + 0x20]
XOR R9D,R9D
CALL 0x00189072
MOV R13D,EAX
OR R13D,0x2
JMP 0x00175ba7
LAB_00175984:
MOV RCX,qword ptr [RBP + -0x510]
MOVZX R12D,byte ptr [RCX + 0x1]
MOVZX EDI,byte ptr [RCX]
MOV RAX,qword ptr [RBP + -0x4f8]
MOV ESI,dword ptr [RAX + 0x17c]
LEA RAX,[RCX + RSI*0x1]
ADD RAX,0x2
MOV R8,qword ptr [RBP + -0x500]
CMP RAX,R8
JZ 0x001759f7
MOV R13,RDI
LEA R9,[RBP + -0x504]
MOV RDI,R15
MOV RSI,RBX
MOV RDX,RCX
MOV RCX,qword ptr [RBP + 0x20]
CALL 0x001859a2
TEST RAX,RAX
JZ 0x0017583c
MOV RAX,qword ptr [RBP + -0x4f8]
MOV ESI,dword ptr [RAX + 0x17c]
MOV RCX,qword ptr [RBP + -0x510]
MOV R8,qword ptr [RBP + -0x500]
MOV RDI,R13
LAB_001759f7:
AND EDI,0x7f
SHL EDI,0x8
OR EDI,R12D
LEA RAX,[RCX + 0x2]
ADD RAX,RSI
XOR EDX,EDX
CMP RAX,R8
MOV RAX,RCX
MOV RCX,qword ptr [RBP + 0x20]
CMOVZ RCX,RDX
MOV qword ptr [RBP + -0x518],RDI
LEA R12,[RAX + RDI*0x1]
CMP R12,R8
CMOVNZ RDX,R8
SUB RSP,0x8
LEA RAX,[RBP + -0x560]
LEA R9,[RBP + -0x4f0]
MOV RDI,RBX
MOV R8,RCX
PUSH RAX
CALL qword ptr [RBX + 0x50]
ADD RSP,0x10
MOV R13D,EAX
TEST EAX,EAX
JLE 0x00175a69
MOV EDI,R13D
ADD RDI,R12
MOV EDX,R12D
SUB EDX,dword ptr [RBP + -0x500]
MOV RSI,R12
CALL 0x001aac70
JMP 0x00175a87
LAB_00175a69:
MOVSXD RAX,R13D
MOV RDI,qword ptr [RBP + -0x500]
MOV RSI,RDI
SUB RSI,RAX
SUB R12D,EDI
ADD R12D,R13D
MOVSXD RDX,R12D
CALL 0x00129110
LAB_00175a87:
LEA RDX,[RBP + -0x560]
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x500]
CALL qword ptr [RBX + 0x58]
MOV RAX,qword ptr [RBP + -0x4f8]
MOV ESI,dword ptr [RAX + 0x17c]
LEA RDX,[RBP + 0x10]
MOV RDI,RBX
MOV RCX,qword ptr [RBP + 0x20]
CALL qword ptr [RBX + 0x48]
TEST EAX,EAX
JZ 0x0017583c
MOV RSI,qword ptr [RBP + 0x10]
MOV R12,qword ptr [RBP + -0x4f8]
MOV EAX,dword ptr [R12 + 0x17c]
SUB RSI,RAX
MOV RDI,R15
MOV RDX,qword ptr [RBP + 0x18]
CALL 0x0018501d
XOR EAX,EAX
CMP dword ptr [R12 + 0x17c],0x0
SETNZ AL
SHL EAX,0xf
ADD R13D,dword ptr [RBP + -0x518]
ADD EAX,R13D
MOV RCX,qword ptr [RBP + -0x510]
MOV byte ptr [RCX + 0x1],R13B
MOV byte ptr [RCX],AH
MOVZX ECX,byte ptr [R14 + 0x1]
MOVZX EAX,byte ptr [R14]
AND EAX,0x7f
SHL EAX,0x8
OR EAX,ECX
MOV ECX,0x32
CMP byte ptr [R15 + 0x33b],0x0
JNZ 0x00175b2c
MOVZX ECX,word ptr [RBX + 0x10]
LAB_00175b2c:
XOR R13D,R13D
CMP EAX,ECX
SETBE R13B
JMP 0x00175842
LAB_00175b3a:
LEA RCX,[RBP + -0x4f0]
LEA R9,[RBP + -0x504]
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
MOV R12,R10
MOV R8,R10
CALL 0x001859a2
TEST RAX,RAX
JZ 0x0017583c
SUB RSP,0x20
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x10],0x0
LEA R9,[RBP + -0x4f0]
MOV RDI,R15
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x520]
MOV RCX,R14
MOV R8,R12
CALL 0x0018872b
ADD RSP,0x20
LAB_00175ba4:
MOV R13D,EAX
LAB_00175ba7:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x518]
MOV ECX,0x3
MOV R8,R14
CALL 0x00183be4
TEST EAX,EAX
JNZ 0x0017583c
JMP 0x00175842
LAB_00175bce:
CALL 0x00129250
|
uint del(long *param_1,long param_2,int8 param_3,byte *param_4,ulong param_5,ushort *param_6,
byte *param_7,int8 param_8,byte *param_9)
{
byte *pbVar1;
byte bVar2;
byte bVar3;
int8 uVar4;
ushort uVar5;
int iVar6;
uint uVar7;
long lVar8;
long lVar9;
long lVar10;
byte *pbVar11;
int1 *puVar12;
ulong uVar13;
byte *pbVar14;
long in_FS_OFFSET;
int1 *apuStack_590 [4];
int8 uStack_570;
int1 local_568 [64];
int8 local_528;
ulong local_520;
byte *local_518;
int1 local_50c [4];
byte *local_508;
long local_500;
int1 local_4f8 [1216];
long local_38;
local_508 = param_7;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_500 = *param_1;
pbVar14 = (byte *)(((ulong)(((byte)*param_6 & 0x7f) << 8) | (ulong)*(byte *)((long)param_6 + 1)) +
(long)param_6);
uStack_570 = 0x1757fe;
local_528 = param_3;
local_520 = param_5;
local_518 = param_4;
lVar8 = _mi_get_last_key(param_1,param_2,param_6,local_4f8,pbVar14,local_50c);
uVar7 = 0xffffffff;
puVar12 = local_568;
if (lVar8 == 0) goto LAB_00175842;
if (((char)(byte)*param_6 < '\0') && (*(int *)(*param_1 + 0x17c) != 0)) {
uStack_570 = 0x17587c;
lVar9 = _mi_kpos(*(int *)(*param_1 + 0x17c),pbVar14);
lVar8 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0x97f & 0xfffffff0);
puVar12 = local_568 + lVar8;
local_500 = lVar9;
*(int8 *)(local_568 + lVar8 + -8) = 0x1758b1;
lVar10 = _mi_fetch_keypage(param_1,param_2,lVar9,3,puVar12,0);
lVar9 = local_500;
pbVar14 = local_518;
uVar4 = local_528;
if (lVar10 == 0) goto LAB_00175842;
*(byte **)((long)apuStack_590 + lVar8 + 0x18) = param_9;
*(int8 *)((long)apuStack_590 + lVar8 + 0x10) = param_8;
*(byte **)((long)apuStack_590 + lVar8 + 8) = local_508;
*(int8 *)((long)apuStack_590 + lVar8) = 0x1758e9;
uVar7 = del(param_1,param_2,uVar4,pbVar14,lVar9,puVar12);
lVar9 = local_500;
if (0 < (int)uVar7) {
pbVar14 = (byte *)(((ulong)(((byte)*param_6 & 0x7f) << 8) |
(ulong)*(byte *)((long)param_6 + 1)) + (long)param_6);
if (uVar7 == 1) {
*(int8 *)(local_568 + lVar8 + -8) = 0x175934;
uVar7 = underflow(param_1,param_2,param_6,lVar9,puVar12,pbVar14);
uVar4 = local_528;
if ((uVar7 == 0) &&
(uVar7 = 0,
(uint)*(ushort *)(param_2 + 0xe) <
(((byte)*param_6 & 0x7f) << 8 | (uint)*(byte *)((long)param_6 + 1)))) {
*(int8 *)(local_568 + lVar8 + -8) = 0x175978;
uVar7 = _mi_split_page(param_1,param_2,uVar4,param_6,param_9,0);
uVar7 = uVar7 | 2;
}
}
else {
*(int8 *)(local_568 + lVar8 + -8) = 0x175b5c;
lVar9 = _mi_get_last_key(param_1,param_2,param_6,local_4f8,pbVar14,local_50c);
if (lVar9 == 0) goto LAB_0017583c;
*(int8 *)((long)apuStack_590 + lVar8 + 8) = 0;
*(int8 *)((long)apuStack_590 + lVar8 + 0x10) = 0;
*(int4 *)(local_568 + lVar8 + -8) = 0;
*(int8 *)((long)apuStack_590 + lVar8 + 0x18) = 0;
uVar4 = local_528;
*(int8 *)((long)apuStack_590 + lVar8) = 0x175ba0;
uVar7 = _mi_insert(param_1,param_2,uVar4,param_6,pbVar14,local_4f8);
}
}
uVar13 = local_520;
*(int8 *)(local_568 + lVar8 + -8) = 0x175bc1;
iVar6 = _mi_write_keypage(param_1,param_2,uVar13,3,param_6);
if (iVar6 == 0) goto LAB_00175842;
}
else {
uVar5 = (short)lVar8 - (short)param_6;
*param_6 = uVar5 * 0x100 | uVar5 >> 8;
uStack_570 = 0x175834;
iVar6 = _mi_write_keypage(param_1,param_2,local_520,3,param_6);
puVar12 = local_568;
if (iVar6 == 0) {
bVar2 = local_518[1];
bVar3 = *local_518;
uVar13 = (ulong)*(uint *)(local_500 + 0x17c);
if (local_518 + uVar13 + 2 != local_508) {
uStack_570 = 0x1759d0;
lVar8 = _mi_get_last_key(param_1,param_2,local_518,param_9,local_508,local_50c);
puVar12 = local_568;
if (lVar8 == 0) goto LAB_0017583c;
uVar13 = (ulong)*(uint *)(local_500 + 0x17c);
}
local_520 = (ulong)((bVar3 & 0x7f) << 8 | (uint)bVar2);
pbVar14 = param_9;
if (local_518 + uVar13 + 2 == local_508) {
pbVar14 = (byte *)0x0;
}
pbVar1 = local_518 + local_520;
pbVar11 = (byte *)0x0;
if (pbVar1 != local_508) {
pbVar11 = local_508;
}
apuStack_590[3] = local_568;
apuStack_590[2] = (int1 *)0x175a45;
uVar7 = (**(code **)(param_2 + 0x50))(param_2,uVar13,pbVar11,pbVar14,pbVar14,local_4f8);
if ((int)uVar7 < 1) {
uStack_570 = 0x175a87;
memmove(local_508,local_508 + -(long)(int)uVar7,
(long)(int)(((int)pbVar1 - (int)local_508) + uVar7));
}
else {
uStack_570 = 0x175a67;
bmove_upp(pbVar1 + uVar7,pbVar1,(int)pbVar1 - (int)local_508);
}
uStack_570 = 0x175a9b;
(**(code **)(param_2 + 0x58))(param_2,local_508,local_568);
uStack_570 = 0x175ab6;
iVar6 = (**(code **)(param_2 + 0x48))
(param_2,*(int4 *)(local_500 + 0x17c),¶m_7,param_9);
lVar8 = local_500;
puVar12 = local_568;
if (iVar6 != 0) {
uStack_570 = 0x175ae0;
_mi_kpointer(param_1,(long)param_7 - (ulong)*(uint *)(local_500 + 0x17c),param_8);
iVar6 = *(int *)(lVar8 + 0x17c);
local_518[1] = (byte)(uVar7 + (int)local_520);
*local_518 = (byte)((uint)(iVar6 != 0) * 0x8000 + uVar7 + (int)local_520 >> 8);
uVar7 = 0x32;
if (*(char *)((long)param_1 + 0x33b) == '\0') {
uVar7 = (uint)*(ushort *)(param_2 + 0x10);
}
uVar7 = (uint)((((byte)*param_6 & 0x7f) << 8 | (uint)*(byte *)((long)param_6 + 1)) <= uVar7)
;
puVar12 = local_568;
goto LAB_00175842;
}
}
}
LAB_0017583c:
uVar7 = 0xffffffff;
LAB_00175842:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)(puVar12 + -8) = underflow;
__stack_chk_fail();
}
return uVar7;
}
|
|
14,502
|
findPeaks::operator&=(std::vector<bool, std::allocator<bool>>&, std::vector<bool, std::allocator<bool>> const&)
|
giladroyz[P]FindPeaks/src/cpp/find_peaks.cpp
|
void operator&=(std::vector<bool> &a, const std::vector<bool> &b) {
for (size_t i = 0; i < a.size(); i++)
a[i] = a[i] & b[i];
}
|
O2
|
cpp
|
findPeaks::operator&=(std::vector<bool, std::allocator<bool>>&, std::vector<bool, std::allocator<bool>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x10(%r14), %rax
movl 0x18(%r14), %ecx
subq (%r14), %rax
leaq (%rcx,%rax,8), %rax
cmpq %rax, %r15
jae 0x22d7
movq %r14, %rdi
movq %r15, %rsi
callq 0x31ba
movq %rdx, %r12
andq (%rax), %r12
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32ba
movl %eax, %ebp
movq %r14, %rdi
movq %r15, %rsi
callq 0x31ba
testb %bpl, %bpl
je 0x22c9
testq %r12, %r12
je 0x22c9
orq (%rax), %rdx
jmp 0x22cf
notq %rdx
andq (%rax), %rdx
movq %rdx, (%rax)
incq %r15
jmp 0x227d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_ZN9findPeaksaNERSt6vectorIbSaIbEERKS2_:
push rbp
push r15
push r14
push r12
push rbx
mov rbx, rsi
mov r14, rdi
xor r15d, r15d
loc_227D:
mov rax, [r14+10h]
mov ecx, [r14+18h]
sub rax, [r14]
lea rax, [rcx+rax*8]
cmp r15, rax
jnb short loc_22D7
mov rdi, r14
mov rsi, r15
call _ZNSt6vectorIbSaIbEEixEm; std::vector<bool>::operator[](ulong)
mov r12, rdx
and r12, [rax]
mov rdi, rbx
mov rsi, r15
call _ZNKSt6vectorIbSaIbEEixEm; std::vector<bool>::operator[](ulong)
mov ebp, eax
mov rdi, r14
mov rsi, r15
call _ZNSt6vectorIbSaIbEEixEm; std::vector<bool>::operator[](ulong)
test bpl, bpl
jz short loc_22C9
test r12, r12
jz short loc_22C9
or rdx, [rax]
jmp short loc_22CF
loc_22C9:
not rdx
and rdx, [rax]
loc_22CF:
mov [rax], rdx
inc r15
jmp short loc_227D
loc_22D7:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
unsigned long long findPeaks::operator&=(long long a1, long long a2)
{
unsigned long long i; // r15
unsigned long long result; // rax
_QWORD *v4; // rax
long long v5; // rdx
long long v6; // r12
char v7; // bp
long long *v8; // rax
long long v9; // rdx
long long v10; // rdx
for ( i = 0LL; ; ++i )
{
result = *(unsigned int *)(a1 + 24) + 8LL * (*(_QWORD *)(a1 + 16) - *(_QWORD *)a1);
if ( i >= result )
break;
v4 = (_QWORD *)std::vector<bool>::operator[](a1, i);
v6 = *v4 & v5;
v7 = std::vector<bool>::operator[](a2, i);
v8 = (long long *)std::vector<bool>::operator[](a1, i);
if ( v7 && v6 )
v10 = *v8 | v9;
else
v10 = *v8 & ~v9;
*v8 = v10;
}
return result;
}
|
operator&=:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
XOR R15D,R15D
LAB_0010227d:
MOV RAX,qword ptr [R14 + 0x10]
MOV ECX,dword ptr [R14 + 0x18]
SUB RAX,qword ptr [R14]
LEA RAX,[RCX + RAX*0x8]
CMP R15,RAX
JNC 0x001022d7
MOV RDI,R14
MOV RSI,R15
CALL 0x001031ba
MOV R12,RDX
AND R12,qword ptr [RAX]
MOV RDI,RBX
MOV RSI,R15
CALL 0x001032ba
MOV EBP,EAX
MOV RDI,R14
MOV RSI,R15
CALL 0x001031ba
TEST BPL,BPL
JZ 0x001022c9
TEST R12,R12
JZ 0x001022c9
OR RDX,qword ptr [RAX]
JMP 0x001022cf
LAB_001022c9:
NOT RDX
AND RDX,qword ptr [RAX]
LAB_001022cf:
MOV qword ptr [RAX],RDX
INC R15
JMP 0x0010227d
LAB_001022d7:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* findPeaks::TEMPNAMEPLACEHOLDERVALUE(std::vector<bool, std::allocator<bool> >&, std::vector<bool,
std::allocator<bool> > const&) */
void findPeaks::operator&=(vector *param_1,vector *param_2)
{
char cVar1;
ulong *puVar2;
ulong uVar3;
ulong uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
for (uVar4 = 0;
uVar4 < (ulong)*(uint *)(param_1 + 0x18) + (*(long *)(param_1 + 0x10) - *(long *)param_1) * 8;
uVar4 = uVar4 + 1) {
auVar5 = std::vector<bool,std::allocator<bool>>::operator[]
((vector<bool,std::allocator<bool>> *)param_1,uVar4);
uVar3 = *auVar5._0_8_;
cVar1 = std::vector<bool,std::allocator<bool>>::operator[]
((vector<bool,std::allocator<bool>> *)param_2,uVar4);
auVar6 = std::vector<bool,std::allocator<bool>>::operator[]
((vector<bool,std::allocator<bool>> *)param_1,uVar4);
puVar2 = auVar6._0_8_;
if ((cVar1 == '\0') || ((auVar5._8_8_ & uVar3) == 0)) {
uVar3 = ~auVar6._8_8_ & *puVar2;
}
else {
uVar3 = auVar6._8_8_ | *puVar2;
}
*puVar2 = uVar3;
}
return;
}
|
|
14,503
|
translog_fill_overhead_table
|
eloqsql/storage/maria/ma_loghandler.c
|
void translog_fill_overhead_table()
{
uint i;
for (i= 0; i < TRANSLOG_FLAGS_NUM; i++)
{
page_overhead[i]= 7;
if (i & TRANSLOG_PAGE_CRC)
page_overhead[i]+= CRC_SIZE;
if (i & TRANSLOG_SECTOR_PROTECTION)
page_overhead[i]+= TRANSLOG_PAGE_SIZE /
DISK_DRIVE_SECTOR_SIZE;
}
}
|
O3
|
c
|
translog_fill_overhead_table:
pushq %rbp
movq %rsp, %rbp
movaps 0x8fe55(%rip), %xmm0 # 0xd90a0
movaps %xmm0, 0xbb645e(%rip) # 0xbff6b0
movaps %xmm0, 0xbb6467(%rip) # 0xbff6c0
popq %rbp
retq
|
translog_fill_overhead_table:
push rbp
mov rbp, rsp
movaps xmm0, cs:xmmword_D90A0
movaps cs:page_overhead, xmm0
movaps cs:xmmword_BFF6C0, xmm0
pop rbp
retn
|
void translog_fill_overhead_table()
{
page_overhead = xmmword_D90A0;
xmmword_BFF6C0 = xmmword_D90A0;
}
|
translog_fill_overhead_table:
PUSH RBP
MOV RBP,RSP
MOVAPS XMM0,xmmword ptr [0x001d90a0]
MOVAPS xmmword ptr [0x00cff6b0],XMM0
MOVAPS xmmword ptr [0x00cff6c0],XMM0
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void translog_fill_overhead_table(void)
{
page_overhead._0_8_ = _DAT_001d90a0;
page_overhead._8_8_ = _UNK_001d90a8;
page_overhead._16_8_ = _DAT_001d90a0;
page_overhead._24_8_ = _UNK_001d90a8;
return;
}
|
|
14,504
|
strmake_root
|
eloqsql/mysys/my_alloc.c
|
char *strmake_root(MEM_ROOT *root, const char *str, size_t len)
{
char *pos;
if ((pos=alloc_root(root,len+1)))
{
if (len)
memcpy(pos,str,len);
pos[len]=0;
}
return pos;
}
|
O0
|
c
|
strmake_root:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
callq 0xdaf00
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xdb803
cmpq $0x0, -0x18(%rbp)
je 0xdb7f7
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3a0b0
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
strmake_root:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
add rsi, 1
call alloc_root
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_DB803
cmp [rbp+var_18], 0
jz short loc_DB7F7
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _memcpy
loc_DB7F7:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
mov byte ptr [rax+rcx], 0
loc_DB803:
mov rax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
|
char * strmake_root(_QWORD **a1, long long a2, long long a3)
{
char *v4; // [rsp+0h] [rbp-20h]
v4 = alloc_root(a1, a3 + 1);
if ( v4 )
{
if ( a3 )
memcpy(v4, a2, a3);
v4[a3] = 0;
}
return v4;
}
|
strmake_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x1
CALL 0x001daf00
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x001db803
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001db7f7
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0013a0b0
LAB_001db7f7:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_001db803:
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
void * strmake_root(int8 param_1,void *param_2,size_t param_3)
{
void *__dest;
__dest = (void *)alloc_root(param_1,param_3 + 1);
if (__dest != (void *)0x0) {
if (param_3 != 0) {
memcpy(__dest,param_2,param_3);
}
*(int1 *)((long)__dest + param_3) = 0;
}
return __dest;
}
|
|
14,505
|
strmake_root
|
eloqsql/mysys/my_alloc.c
|
char *strmake_root(MEM_ROOT *root, const char *str, size_t len)
{
char *pos;
if ((pos=alloc_root(root,len+1)))
{
if (len)
memcpy(pos,str,len);
pos[len]=0;
}
return pos;
}
|
O3
|
c
|
strmake_root:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x1(%rdx), %rsi
callq 0xa8de7
movq %rax, %r15
testq %rax, %rax
je 0xa91e2
testq %rbx, %rbx
je 0xa91dd
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x390a0
movb $0x0, (%r15,%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
strmake_root:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
lea rsi, [rdx+1]
call alloc_root
mov r15, rax
test rax, rax
jz short loc_A91E2
test rbx, rbx
jz short loc_A91DD
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call _memcpy
loc_A91DD:
mov byte ptr [r15+rbx], 0
loc_A91E2:
mov rax, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
char * strmake_root(long long a1, long long a2, long long a3)
{
char *v4; // rax
char *v5; // r15
v4 = alloc_root(a1, a3 + 1);
v5 = v4;
if ( v4 )
{
if ( a3 )
memcpy(v4, a2, a3);
v5[a3] = 0;
}
return v5;
}
|
strmake_root:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
LEA RSI,[RDX + 0x1]
CALL 0x001a8de7
MOV R15,RAX
TEST RAX,RAX
JZ 0x001a91e2
TEST RBX,RBX
JZ 0x001a91dd
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x001390a0
LAB_001a91dd:
MOV byte ptr [R15 + RBX*0x1],0x0
LAB_001a91e2:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void * strmake_root(int8 param_1,void *param_2,size_t param_3)
{
void *__dest;
__dest = (void *)alloc_root(param_1,param_3 + 1);
if (__dest != (void *)0x0) {
if (param_3 != 0) {
memcpy(__dest,param_2,param_3);
}
*(int1 *)((long)__dest + param_3) = 0;
}
return __dest;
}
|
|
14,506
|
ma_service_thread_control_end
|
eloqsql/storage/maria/ma_servicethread.c
|
void ma_service_thread_control_end(MA_SERVICE_THREAD_CONTROL *control)
{
DBUG_ENTER("ma_service_thread_control_end");
DBUG_PRINT("init", ("control %p", control));
DBUG_ASSERT(control->inited);
mysql_mutex_lock(control->LOCK_control);
if (!control->killed)
{
DBUG_PRINT("info",("killing Maria background thread"));
control->killed= TRUE; /* kill it */
mysql_cond_broadcast(control->COND_control);
mysql_mutex_unlock(control->LOCK_control);
DBUG_PRINT("info", ("waiting for Maria background thread to die"));
pthread_join(control->thread, NULL);
}
else
mysql_mutex_unlock(control->LOCK_control);
mysql_mutex_destroy(control->LOCK_control);
mysql_cond_destroy(control->COND_control);
control->inited= FALSE;
DBUG_VOID_RETURN;
}
|
O3
|
c
|
ma_service_thread_control_end:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
cmpq $0x0, 0x40(%rdi)
jne 0x50594
callq 0x29220
cmpb $0x0, 0x8(%rbx)
je 0x5050c
movq 0x10(%rbx), %r14
movq 0x40(%r14), %rdi
testq %rdi, %rdi
jne 0x505c1
movq %r14, %rdi
callq 0x291e0
jmp 0x5054c
movb $0x1, 0x8(%rbx)
movq 0x18(%rbx), %r14
movq 0x30(%r14), %rdi
testq %rdi, %rdi
jne 0x505d6
movq %r14, %rdi
callq 0x296f0
movq 0x10(%rbx), %r14
movq 0x40(%r14), %rdi
testq %rdi, %rdi
jne 0x505eb
movq %r14, %rdi
callq 0x291e0
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x292a0
movq 0x10(%rbx), %r14
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x5056e
leaq 0x335ab0(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%r14)
movq %r14, %rdi
callq 0x290c0
movq 0x18(%rbx), %r14
movq 0x30(%r14), %rdi
testq %rdi, %rdi
jne 0x505aa
movq %r14, %rdi
callq 0x29280
movb $0x0, 0x9(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x8a08c(%rip), %rsi # 0xda627
movl $0x3e, %edx
callq 0x2eb8f
jmp 0x504eb
leaq 0x335a5f(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x68(%rax)
movq $0x0, 0x30(%r14)
jmp 0x50583
leaq 0x335a48(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x50502
leaq 0x335a33(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x178(%rax)
jmp 0x50521
leaq 0x335a1e(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x5053a
|
ma_service_thread_control_end:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov rdi, [rdi+10h]
cmp qword ptr [rdi+40h], 0
jnz loc_50594
call _pthread_mutex_lock
loc_504EB:
cmp byte ptr [rbx+8], 0
jz short loc_5050C
mov r14, [rbx+10h]
mov rdi, [r14+40h]
test rdi, rdi
jnz loc_505C1
loc_50502:
mov rdi, r14
call _pthread_mutex_unlock
jmp short loc_5054C
loc_5050C:
mov byte ptr [rbx+8], 1
mov r14, [rbx+18h]
mov rdi, [r14+30h]
test rdi, rdi
jnz loc_505D6
loc_50521:
mov rdi, r14
call _pthread_cond_broadcast
mov r14, [rbx+10h]
mov rdi, [r14+40h]
test rdi, rdi
jnz loc_505EB
loc_5053A:
mov rdi, r14
call _pthread_mutex_unlock
mov rdi, [rbx]
xor esi, esi
call _pthread_join
loc_5054C:
mov r14, [rbx+10h]
mov rdi, [r14+40h]
test rdi, rdi
jz short loc_5056E
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [r14+40h], 0
loc_5056E:
mov rdi, r14
call _pthread_mutex_destroy
mov r14, [rbx+18h]
mov rdi, [r14+30h]
test rdi, rdi
jnz short loc_505AA
loc_50583:
mov rdi, r14
call _pthread_cond_destroy
mov byte ptr [rbx+9], 0
pop rbx
pop r14
pop rbp
retn
loc_50594:
lea rsi, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3Eh ; '>'
call psi_mutex_lock
jmp loc_504EB
loc_505AA:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+68h]
mov qword ptr [r14+30h], 0
jmp short loc_50583
loc_505C1:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_50502
loc_505D6:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+178h]
jmp loc_50521
loc_505EB:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_5053A
|
long long ma_service_thread_control_end(long long a1)
{
long long v2; // rdi
long long v3; // r14
long long v4; // r14
long long v5; // r14
long long v6; // r14
long long v7; // r14
long long result; // rax
v2 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v2 + 64) )
psi_mutex_lock(v2, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c", 0x3Eu);
else
pthread_mutex_lock(v2);
if ( *(_BYTE *)(a1 + 8) )
{
v3 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v3 + 64) )
PSI_server[44]();
pthread_mutex_unlock(v3);
}
else
{
*(_BYTE *)(a1 + 8) = 1;
v4 = *(_QWORD *)(a1 + 24);
if ( *(_QWORD *)(v4 + 48) )
PSI_server[47]();
pthread_cond_broadcast(v4);
v5 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v5 + 64) )
PSI_server[44]();
pthread_mutex_unlock(v5);
pthread_join(*(_QWORD *)a1, 0LL);
}
v6 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v6 + 64) )
{
PSI_server[9]();
*(_QWORD *)(v6 + 64) = 0LL;
}
pthread_mutex_destroy(v6);
v7 = *(_QWORD *)(a1 + 24);
if ( *(_QWORD *)(v7 + 48) )
{
PSI_server[13]();
*(_QWORD *)(v7 + 48) = 0LL;
}
result = pthread_cond_destroy(v7);
*(_BYTE *)(a1 + 9) = 0;
return result;
}
|
ma_service_thread_control_end:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
CMP qword ptr [RDI + 0x40],0x0
JNZ 0x00150594
CALL 0x00129220
LAB_001504eb:
CMP byte ptr [RBX + 0x8],0x0
JZ 0x0015050c
MOV R14,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [R14 + 0x40]
TEST RDI,RDI
JNZ 0x001505c1
LAB_00150502:
MOV RDI,R14
CALL 0x001291e0
JMP 0x0015054c
LAB_0015050c:
MOV byte ptr [RBX + 0x8],0x1
MOV R14,qword ptr [RBX + 0x18]
MOV RDI,qword ptr [R14 + 0x30]
TEST RDI,RDI
JNZ 0x001505d6
LAB_00150521:
MOV RDI,R14
CALL 0x001296f0
MOV R14,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [R14 + 0x40]
TEST RDI,RDI
JNZ 0x001505eb
LAB_0015053a:
MOV RDI,R14
CALL 0x001291e0
MOV RDI,qword ptr [RBX]
XOR ESI,ESI
CALL 0x001292a0
LAB_0015054c:
MOV R14,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [R14 + 0x40]
TEST RDI,RDI
JZ 0x0015056e
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [R14 + 0x40],0x0
LAB_0015056e:
MOV RDI,R14
CALL 0x001290c0
MOV R14,qword ptr [RBX + 0x18]
MOV RDI,qword ptr [R14 + 0x30]
TEST RDI,RDI
JNZ 0x001505aa
LAB_00150583:
MOV RDI,R14
CALL 0x00129280
MOV byte ptr [RBX + 0x9],0x0
POP RBX
POP R14
POP RBP
RET
LAB_00150594:
LEA RSI,[0x1da627]
MOV EDX,0x3e
CALL 0x0012eb8f
JMP 0x001504eb
LAB_001505aa:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x68]
MOV qword ptr [R14 + 0x30],0x0
JMP 0x00150583
LAB_001505c1:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00150502
LAB_001505d6:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x178]
JMP 0x00150521
LAB_001505eb:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0015053a
|
void ma_service_thread_control_end(pthread_t *param_1)
{
pthread_mutex_t *ppVar1;
pthread_cond_t *ppVar2;
ppVar1 = (pthread_mutex_t *)param_1[2];
if (*(long *)((long)ppVar1 + 0x40) == 0) {
pthread_mutex_lock(ppVar1);
}
else {
psi_mutex_lock(ppVar1,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c",0x3e)
;
}
if ((char)param_1[1] == '\0') {
*(int1 *)(param_1 + 1) = 1;
ppVar2 = (pthread_cond_t *)param_1[3];
if (ppVar2[1].__align != 0) {
(**(code **)(PSI_server + 0x178))();
}
pthread_cond_broadcast(ppVar2);
ppVar1 = (pthread_mutex_t *)param_1[2];
if (*(long *)((long)ppVar1 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar1);
pthread_join(*param_1,(void **)0x0);
}
else {
ppVar1 = (pthread_mutex_t *)param_1[2];
if (*(long *)((long)ppVar1 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar1);
}
ppVar1 = (pthread_mutex_t *)param_1[2];
if (*(long *)((long)ppVar1 + 0x40) != 0) {
(**(code **)(PSI_server + 0x48))();
*(int8 *)((long)ppVar1 + 0x40) = 0;
}
pthread_mutex_destroy(ppVar1);
ppVar2 = (pthread_cond_t *)param_1[3];
if (ppVar2[1].__align != 0) {
(**(code **)(PSI_server + 0x68))();
ppVar2[1].__align = 0;
}
pthread_cond_destroy(ppVar2);
*(int1 *)((long)param_1 + 9) = 0;
return;
}
|
|
14,507
|
json_parse_ident
|
bluesky950520[P]quickjs/quickjs.c
|
static JSAtom json_parse_ident(JSParseState *s, const uint8_t **pp, int c)
{
const uint8_t *p;
char ident_buf[128], *buf;
size_t ident_size, ident_pos;
JSAtom atom;
p = *pp;
buf = ident_buf;
ident_size = sizeof(ident_buf);
ident_pos = 0;
for(;;) {
buf[ident_pos++] = c;
c = *p;
if (c >= 128 ||
!((lre_id_continue_table_ascii[c >> 5] >> (c & 31)) & 1))
break;
p++;
if (unlikely(ident_pos >= ident_size - UTF8_CHAR_LEN_MAX)) {
if (ident_realloc(s->ctx, &buf, &ident_size, ident_buf)) {
atom = JS_ATOM_NULL;
goto done;
}
}
}
/* buf contains pure ASCII */
atom = JS_NewAtomLen(s->ctx, buf, ident_pos);
done:
if (unlikely(buf != ident_buf))
js_free(s->ctx, buf);
*pp = p;
return atom;
}
|
O0
|
c
|
json_parse_ident:
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movl %edx, 0xb4(%rsp)
movq 0xb8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0x80, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movl 0xb4(%rsp), %eax
movb %al, %dl
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rsp)
movb %dl, (%rax,%rcx)
movq 0xa8(%rsp), %rax
movzbl (%rax), %eax
movl %eax, 0xb4(%rsp)
cmpl $0x80, 0xb4(%rsp)
jge 0x86909
movl 0xb4(%rsp), %eax
sarl $0x5, %eax
movslq %eax, %rcx
leaq 0x8bf4e(%rip), %rax # 0x112840
movl (%rax,%rcx,4), %eax
movl 0xb4(%rsp), %ecx
andl $0x1f, %ecx
shrl %cl, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x8690b
jmp 0x86979
movq 0xa8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xa8(%rsp)
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
subq $0x4, %rcx
cmpq %rcx, %rax
setae %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x86974
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
leaq 0x20(%rsp), %rcx
leaq 0x18(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x86df0
cmpl $0x0, %eax
je 0x86972
movl $0x0, 0x4(%rsp)
jmp 0x86997
jmp 0x86974
jmp 0x8689d
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x28020
movl %eax, 0x4(%rsp)
movq 0x18(%rsp), %rax
leaq 0x20(%rsp), %rcx
cmpq %rcx, %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x869cd
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x21db0
movq 0xa8(%rsp), %rcx
movq 0xb8(%rsp), %rax
movq %rcx, (%rax)
movl 0x4(%rsp), %eax
addq $0xc8, %rsp
retq
nopl (%rax)
|
json_parse_ident:
sub rsp, 0C8h
mov [rsp+0C8h+var_8], rdi
mov [rsp+0C8h+var_10], rsi
mov [rsp+0C8h+var_14], edx
mov rax, [rsp+0C8h+var_10]
mov rax, [rax]
mov [rsp+0C8h+var_20], rax
lea rax, [rsp+0C8h+var_A8]
mov [rsp+0C8h+var_B0], rax
mov [rsp+0C8h+var_B8], 80h
mov [rsp+0C8h+var_C0], 0
loc_8689D:
mov eax, [rsp+0C8h+var_14]
mov dl, al
mov rax, [rsp+0C8h+var_B0]
mov rcx, [rsp+0C8h+var_C0]
mov rsi, rcx
add rsi, 1
mov [rsp+0C8h+var_C0], rsi
mov [rax+rcx], dl
mov rax, [rsp+0C8h+var_20]
movzx eax, byte ptr [rax]
mov [rsp+0C8h+var_14], eax
cmp [rsp+0C8h+var_14], 80h
jge short loc_86909
mov eax, [rsp+0C8h+var_14]
sar eax, 5
movsxd rcx, eax
lea rax, lre_id_continue_table_ascii
mov eax, [rax+rcx*4]
mov ecx, [rsp+0C8h+var_14]
and ecx, 1Fh
shr eax, cl
and eax, 1
cmp eax, 0
jnz short loc_8690B
loc_86909:
jmp short loc_86979
loc_8690B:
mov rax, [rsp+0C8h+var_20]
add rax, 1
mov [rsp+0C8h+var_20], rax
mov rax, [rsp+0C8h+var_C0]
mov rcx, [rsp+0C8h+var_B8]
sub rcx, 4
cmp rax, rcx
setnb al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_86974
mov rax, [rsp+0C8h+var_8]
mov rdi, [rax]
lea rcx, [rsp+0C8h+var_A8]
lea rsi, [rsp+0C8h+var_B0]
lea rdx, [rsp+0C8h+var_B8]
call ident_realloc
cmp eax, 0
jz short loc_86972
mov [rsp+0C8h+var_C4], 0
jmp short loc_86997
loc_86972:
jmp short $+2
loc_86974:
jmp loc_8689D
loc_86979:
mov rax, [rsp+0C8h+var_8]
mov rdi, [rax]
mov rsi, [rsp+0C8h+var_B0]
mov rdx, [rsp+0C8h+var_C0]
call JS_NewAtomLen
mov [rsp+0C8h+var_C4], eax
loc_86997:
mov rax, [rsp+0C8h+var_B0]
lea rcx, [rsp+0C8h+var_A8]
cmp rax, rcx
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_869CD
mov rax, [rsp+0C8h+var_8]
mov rdi, [rax]
mov rsi, [rsp+0C8h+var_B0]
call js_free
loc_869CD:
mov rcx, [rsp+0C8h+var_20]
mov rax, [rsp+0C8h+var_10]
mov [rax], rcx
mov eax, [rsp+0C8h+var_C4]
add rsp, 0C8h
retn
|
long long json_parse_ident(long long *a1, unsigned __int8 **a2, int a3)
{
unsigned long long v3; // rcx
unsigned int v5; // [rsp+4h] [rbp-C4h]
unsigned long long v6; // [rsp+8h] [rbp-C0h]
long long v7; // [rsp+10h] [rbp-B8h] BYREF
unsigned __int8 *v8; // [rsp+18h] [rbp-B0h] BYREF
_BYTE v9[136]; // [rsp+20h] [rbp-A8h] BYREF
unsigned __int8 *v10; // [rsp+A8h] [rbp-20h]
int v11; // [rsp+B4h] [rbp-14h]
_QWORD *v12; // [rsp+B8h] [rbp-10h]
long long *v13; // [rsp+C0h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = *a2;
v8 = v9;
v7 = 128LL;
v6 = 0LL;
do
{
v3 = v6++;
v8[v3] = v11;
v11 = *v10;
if ( v11 >= 128 || ((lre_id_continue_table_ascii[v11 >> 5] >> (v11 & 0x1F)) & 1) == 0 )
{
v5 = JS_NewAtomLen(*v13, v8, v6);
goto LABEL_9;
}
++v10;
}
while ( v6 < v7 - 4 || !(unsigned int)ident_realloc(*v13, &v8, &v7, v9) );
v5 = 0;
LABEL_9:
if ( v8 != v9 )
js_free(*v13, (long long)v8);
*v12 = v10;
return v5;
}
|
json_parse_ident:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xc0],RDI
MOV qword ptr [RSP + 0xb8],RSI
MOV dword ptr [RSP + 0xb4],EDX
MOV RAX,qword ptr [RSP + 0xb8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0xa8],RAX
LEA RAX,[RSP + 0x20]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x10],0x80
MOV qword ptr [RSP + 0x8],0x0
LAB_0018689d:
MOV EAX,dword ptr [RSP + 0xb4]
MOV DL,AL
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x8]
MOV RSI,RCX
ADD RSI,0x1
MOV qword ptr [RSP + 0x8],RSI
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RSP + 0xa8]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RSP + 0xb4],EAX
CMP dword ptr [RSP + 0xb4],0x80
JGE 0x00186909
MOV EAX,dword ptr [RSP + 0xb4]
SAR EAX,0x5
MOVSXD RCX,EAX
LEA RAX,[0x212840]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV ECX,dword ptr [RSP + 0xb4]
AND ECX,0x1f
SHR EAX,CL
AND EAX,0x1
CMP EAX,0x0
JNZ 0x0018690b
LAB_00186909:
JMP 0x00186979
LAB_0018690b:
MOV RAX,qword ptr [RSP + 0xa8]
ADD RAX,0x1
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x10]
SUB RCX,0x4
CMP RAX,RCX
SETNC AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00186974
MOV RAX,qword ptr [RSP + 0xc0]
MOV RDI,qword ptr [RAX]
LEA RCX,[RSP + 0x20]
LEA RSI,[RSP + 0x18]
LEA RDX,[RSP + 0x10]
CALL 0x00186df0
CMP EAX,0x0
JZ 0x00186972
MOV dword ptr [RSP + 0x4],0x0
JMP 0x00186997
LAB_00186972:
JMP 0x00186974
LAB_00186974:
JMP 0x0018689d
LAB_00186979:
MOV RAX,qword ptr [RSP + 0xc0]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x00128020
MOV dword ptr [RSP + 0x4],EAX
LAB_00186997:
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[RSP + 0x20]
CMP RAX,RCX
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001869cd
MOV RAX,qword ptr [RSP + 0xc0]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00121db0
LAB_001869cd:
MOV RCX,qword ptr [RSP + 0xa8]
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RSP + 0x4]
ADD RSP,0xc8
RET
|
int4 json_parse_ident(int8 *param_1,int8 *param_2,uint param_3)
{
int iVar1;
ulong uVar2;
int4 local_c4;
ulong local_c0;
long local_b8;
int1 *local_b0;
int1 local_a8 [136];
byte *local_20;
uint local_14;
int8 *local_10;
int8 *local_8;
local_20 = (byte *)*param_2;
local_b0 = local_a8;
local_b8 = 0x80;
local_c0 = 0;
local_14 = param_3;
local_10 = param_2;
local_8 = param_1;
do {
uVar2 = local_c0 + 1;
local_b0[local_c0] = (char)local_14;
local_14 = (uint)*local_20;
if ((0x7f < local_14) ||
((*(uint *)(lre_id_continue_table_ascii + (long)((int)local_14 >> 5) * 4) >>
(*local_20 & 0x1f) & 1) == 0)) {
local_c4 = JS_NewAtomLen(*local_8,local_b0,uVar2);
goto LAB_00186997;
}
local_20 = local_20 + 1;
local_c0 = uVar2;
} while ((uVar2 < local_b8 - 4U) ||
(iVar1 = ident_realloc(*local_8,&local_b0,&local_b8,local_a8), iVar1 == 0));
local_c4 = 0;
LAB_00186997:
if (local_b0 != local_a8) {
js_free(*local_8,local_b0);
}
*local_10 = local_20;
return local_c4;
}
|
|
14,508
|
minja::Context::~Context()
|
monkey531[P]llama/common/minja.hpp
|
virtual ~Context() {}
|
O3
|
cpp
|
minja::Context::~Context():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8ec10(%rip), %rax # 0x130130
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x70(%rdi), %rdi
testq %rdi, %rdi
je 0xa1535
callq 0x267a6
leaq 0x58(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5d708
movq %r14, %rdi
callq 0x62bf6
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0xa1559
callq 0x267a6
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0xa1567
callq 0x267a6
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0xa1575
callq 0x267a6
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xa15aa
movq 0x8f9f3(%rip), %rax # 0x130f78
cmpb $0x0, (%rax)
je 0xa1595
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa159f
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa15aa
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xa15e6
movq 0x8f9be(%rip), %rax # 0x130f78
cmpb $0x0, (%rax)
je 0xa15ca
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa15d4
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa15e6
movq (%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
_ZN5minja7ContextD2Ev:
push r14
push rbx
push rax
mov rbx, rdi
lea rax, _ZTVN5minja7ContextE; `vtable for'minja::Context
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+70h]
test rdi, rdi
jz short loc_A1535
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A1535:
lea r14, [rbx+58h]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbx+50h]
test rdi, rdi
jz short loc_A1559
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A1559:
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_A1567
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A1567:
mov rdi, [rbx+30h]
test rdi, rdi
jz short loc_A1575
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A1575:
mov rdi, [rbx+20h]
test rdi, rdi
jz short loc_A15AA
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A1595
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A159F
loc_A1595:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A159F:
cmp eax, 1
jnz short loc_A15AA
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A15AA:
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_A15E6
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A15CA
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A15D4
loc_A15CA:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A15D4:
cmp eax, 1
jnz short loc_A15E6
mov rax, [rdi]
add rsp, 8
pop rbx
pop r14
jmp qword ptr [rax+18h]
loc_A15E6:
add rsp, 8
pop rbx
pop r14
retn
|
void minja::Context::~Context(minja::Context *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
volatile signed __int32 *v4; // rdi
volatile signed __int32 *v5; // rdi
volatile signed __int32 *v6; // rdi
signed __int32 v7; // eax
volatile signed __int32 *v8; // rdi
signed __int32 v9; // eax
*(_QWORD *)this = &`vtable for'minja::Context + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 14);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 88);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((char *)this + 88);
v3 = (volatile signed __int32 *)*((_QWORD *)this + 10);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
v4 = (volatile signed __int32 *)*((_QWORD *)this + 8);
if ( v4 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4);
v5 = (volatile signed __int32 *)*((_QWORD *)this + 6);
if ( v5 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v5);
v6 = (volatile signed __int32 *)*((_QWORD *)this + 4);
if ( v6 )
{
if ( _libc_single_threaded )
{
v7 = *((_DWORD *)v6 + 3);
*((_DWORD *)v6 + 3) = v7 - 1;
}
else
{
v7 = _InterlockedExchangeAdd(v6 + 3, 0xFFFFFFFF);
}
if ( v7 == 1 )
(*(void ( **)(volatile signed __int32 *, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL);
}
v8 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v8 )
{
if ( _libc_single_threaded )
{
v9 = *((_DWORD *)v8 + 3);
*((_DWORD *)v8 + 3) = v9 - 1;
}
else
{
v9 = _InterlockedExchangeAdd(v8 + 3, 0xFFFFFFFF);
}
if ( v9 == 1 )
(*(void ( **)(volatile signed __int32 *, _QWORD))(*(_QWORD *)v8 + 24LL))(v8, 0LL);
}
}
|
~Context:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[0x230130]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x70]
TEST RDI,RDI
JZ 0x001a1535
CALL 0x001267a6
LAB_001a1535:
LEA R14,[RBX + 0x58]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015d708
MOV RDI,R14
CALL 0x00162bf6
MOV RDI,qword ptr [RBX + 0x50]
TEST RDI,RDI
JZ 0x001a1559
CALL 0x001267a6
LAB_001a1559:
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x001a1567
CALL 0x001267a6
LAB_001a1567:
MOV RDI,qword ptr [RBX + 0x30]
TEST RDI,RDI
JZ 0x001a1575
CALL 0x001267a6
LAB_001a1575:
MOV RDI,qword ptr [RBX + 0x20]
TEST RDI,RDI
JZ 0x001a15aa
MOV RAX,qword ptr [0x00230f78]
CMP byte ptr [RAX],0x0
JZ 0x001a1595
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a159f
LAB_001a1595:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a159f:
CMP EAX,0x1
JNZ 0x001a15aa
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a15aa:
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x001a15e6
MOV RAX,qword ptr [0x00230f78]
CMP byte ptr [RAX],0x0
JZ 0x001a15ca
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a15d4
LAB_001a15ca:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a15d4:
CMP EAX,0x1
JNZ 0x001a15e6
MOV RAX,qword ptr [RDI]
ADD RSP,0x8
POP RBX
POP R14
JMP qword ptr [RAX + 0x18]
LAB_001a15e6:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::Context::~Context() */
void __thiscall minja::Context::~Context(Context *this)
{
int *piVar1;
long *plVar2;
int iVar3;
*(int ***)this = &PTR__Context_00230140;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x70) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x70));
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)(this + 0x58),0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)(this + 0x58));
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x50) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x50));
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x40) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x40));
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x30) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x30));
}
plVar2 = *(long **)(this + 0x20);
if (plVar2 != (long *)0x0) {
if (*PTR___libc_single_threaded_00230f78 == '\0') {
LOCK();
piVar1 = (int *)((long)plVar2 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)plVar2 + 0xc);
*(int *)((long)plVar2 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*plVar2 + 0x18))();
}
}
plVar2 = *(long **)(this + 0x10);
if (plVar2 != (long *)0x0) {
if (*PTR___libc_single_threaded_00230f78 == '\0') {
LOCK();
piVar1 = (int *)((long)plVar2 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)plVar2 + 0xc);
*(int *)((long)plVar2 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
/* WARNING: Could not recover jumptable at 0x001a15e3. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*plVar2 + 0x18))();
return;
}
}
return;
}
|
|
14,509
|
bf_add_epsilon
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_add_epsilon(bf_t *r, const bf_t *a, slimb_t e, int e_sign,
limb_t prec, int flags)
{
bf_t T_s, *T = &T_s;
int ret;
/* small argument case: result = 1 + epsilon * sign(x) */
bf_init(a->ctx, T);
bf_set_ui(T, 1);
T->sign = e_sign;
T->expn += e;
ret = bf_add(r, r, T, prec, flags);
bf_delete(T);
return ret;
}
|
O3
|
c
|
bf_add_epsilon:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movq %r8, %r14
movl %ecx, %ebp
movq %rdx, %r15
movq %rdi, %r12
movq %rsp, %r13
movq %rsi, (%r13)
movl $0x0, 0x8(%r13)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r13)
movl $0x1, %esi
movq %r13, %rdi
callq 0x868c8
movl %ebp, 0x8(%r13)
addq %r15, 0x10(%r13)
leaq -0x306c(%rip), %r9 # 0x89a97
movq %r12, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movl %ebx, %r8d
callq 0x899fd
movl %eax, %ebx
movq (%r13), %rax
testq %rax, %rax
je 0x8cb34
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x8cb34
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
bf_add_epsilon:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, r9d
mov r14, r8
mov ebp, ecx
mov r15, rdx
mov r12, rdi
mov r13, rsp
mov [r13+0], rsi
mov dword ptr [r13+8], 0
mov rax, 8000000000000000h
mov [r13+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [r13+18h], xmm0
mov esi, 1
mov rdi, r13
call bf_set_ui
mov [r13+8], ebp
add [r13+10h], r15
lea r9, __bf_add
mov rdi, r12
mov rsi, r12
mov rdx, r13
mov rcx, r14
mov r8d, ebx
call bf_op2
mov ebx, eax
mov rax, [r13+0]
test rax, rax
jz short loc_8CB34
mov rsi, [rsp+58h+var_38]
test rsi, rsi
jz short loc_8CB34
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8CB34:
mov eax, ebx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long bf_add_epsilon(__int128 *a1, long long a2, long long a3, int a4, long long a5, unsigned int a6)
{
unsigned int v10; // ebx
__int128 v12; // [rsp+0h] [rbp-58h] BYREF
unsigned long long v13; // [rsp+10h] [rbp-48h]
__int128 v14; // [rsp+18h] [rbp-40h]
*(_QWORD *)&v12 = a2;
DWORD2(v12) = 0;
v13 = 0x8000000000000000LL;
v14 = 0LL;
bf_set_ui((_QWORD **)&v12, 1uLL);
DWORD2(v12) = a4;
v13 += a3;
v10 = bf_op2(a1, a1, &v12, a5, a6, (long long ( *)(__int128 *))_bf_add);
if ( (_QWORD)v12 && *((_QWORD *)&v14 + 1) )
(*(void ( **)(_QWORD, _QWORD, _QWORD))(v12 + 8))(*(_QWORD *)v12, *((_QWORD *)&v14 + 1), 0LL);
return v10;
}
|
bf_add_epsilon:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,R9D
MOV R14,R8
MOV EBP,ECX
MOV R15,RDX
MOV R12,RDI
MOV R13,RSP
MOV qword ptr [R13],RSI
MOV dword ptr [R13 + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [R13 + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x18],XMM0
MOV ESI,0x1
MOV RDI,R13
CALL 0x001868c8
MOV dword ptr [R13 + 0x8],EBP
ADD qword ptr [R13 + 0x10],R15
LEA R9,[0x189a97]
MOV RDI,R12
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
MOV R8D,EBX
CALL 0x001899fd
MOV EBX,EAX
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x0018cb34
MOV RSI,qword ptr [RSP + 0x20]
TEST RSI,RSI
JZ 0x0018cb34
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018cb34:
MOV EAX,EBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
bf_add_epsilon(int8 param_1,int8 *param_2,long param_3,int4 param_4,
int8 param_5,int4 param_6)
{
int4 uVar1;
int8 *local_58;
int4 local_50;
long local_48;
int8 local_40;
long lStack_38;
local_50 = 0;
local_48 = -0x8000000000000000;
local_40 = 0;
lStack_38 = 0;
local_58 = param_2;
bf_set_ui(&local_58,1);
local_48 = local_48 + param_3;
local_50 = param_4;
uVar1 = bf_op2(param_1,param_1,&local_58,param_5,param_6,__bf_add);
if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) {
(*(code *)local_58[1])(*local_58,lStack_38,0);
}
return uVar1;
}
|
|
14,510
|
create_logfile_by_number_no_cache
|
eloqsql/storage/maria/ma_loghandler.c
|
static File create_logfile_by_number_no_cache(uint32 file_no)
{
File file;
char path[FN_REFLEN];
DBUG_ENTER("create_logfile_by_number_no_cache");
if (translog_status != TRANSLOG_OK)
DBUG_RETURN(-1);
/* TODO: add O_DIRECT to open flags (when buffer is aligned) */
if ((file= mysql_file_create(key_file_translog,
translog_filename_by_fileno(file_no, path),
0, O_BINARY | O_RDWR | O_CLOEXEC, MYF(MY_WME))) < 0)
{
DBUG_PRINT("error", ("Error %d during creating file '%s'", errno, path));
translog_stop_writing();
DBUG_RETURN(-1);
}
if (sync_log_dir >= TRANSLOG_SYNC_DIR_NEWFILE &&
sync_dir(log_descriptor.directory_fd, MYF(MY_WME | MY_IGNORE_BADFD)))
{
DBUG_PRINT("error", ("Error %d during syncing directory '%s'",
errno, log_descriptor.directory));
mysql_file_close(file, MYF(0));
translog_stop_writing();
DBUG_RETURN(-1);
}
DBUG_PRINT("info", ("File: '%s' handler: %d", path, file));
DBUG_RETURN(file);
}
|
O3
|
c
|
create_logfile_by_number_no_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp # imm = 0x268
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
cmpl $0x1, 0x3b625b(%rip) # 0x3fbf50
jne 0x45e09
leaq 0x3b61a2(%rip), %rax # 0x3fbea4
movl (%rax), %r14d
leaq -0x230(%rbp), %r15
movq %r15, %rsi
callq 0x43d75
leaq 0x33f2f5(%rip), %r13 # 0x385010
movq (%r13), %rax
leaq -0x288(%rbp), %rdi
leaq -0x238(%rbp), %r12
movl %r14d, %esi
xorl %edx, %edx
movq %r15, %rcx
movq %r12, %r8
callq *0x148(%rax)
movq %rax, (%r12)
testq %rax, %rax
jne 0x45e2c
leaq -0x230(%rbp), %rdi
movl $0x10, %ecx
xorl %esi, %esi
movl $0x80002, %edx # imm = 0x80002
callq 0x9d808
movl %eax, %r14d
testl %r14d, %r14d
js 0x45ddf
cmpq $0x0, 0x33d42d(%rip) # 0x3831a0
je 0x45e06
movl 0x3b76d0(%rip), %r15d # 0x3fd450
movq (%r13), %rax
leaq -0x288(%rbp), %rdi
movl %r15d, %esi
movl $0x10, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x45e54
movl $0x30, %esi
movl %r15d, %edi
callq 0xa0d68
testl %eax, %eax
je 0x45e06
movq (%r13), %rax
leaq -0x288(%rbp), %rdi
movl %r14d, %esi
movl $0x4, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x45e6b
movl %r14d, %edi
xorl %esi, %esi
callq 0x9fe49
xorl %eax, %eax
cmpl $0x3, 0x3b6168(%rip) # 0x3fbf50
setne %al
addl %eax, %eax
movl %eax, 0x3b615d(%rip) # 0x3fbf50
movb $0x1, 0xbb8236(%rip) # 0xbfe030
movl $0x0, 0x3b7368(%rip) # 0x3fd16c
jmp 0x45e09
movl %r14d, %ebx
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x45e7b
movl %ebx, %eax
addq $0x268, %rsp # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x230(%rbp), %rsi
leaq -0x238(%rbp), %rdx
leaq -0x23c(%rbp), %r14
movq %rax, %rdi
movq %r14, %rcx
callq 0x2c5db
movl (%r14), %r14d
jmp 0x45d66
movq %rax, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x2c639
movl (%r12), %eax
jmp 0x45daf
movq %rax, %rdi
movl %r14d, %esi
callq 0x2c692
jmp 0x45ddf
callq 0x29260
|
create_logfile_by_number_no_cache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 268h
mov rax, fs:28h
mov [rbp+var_30], rax
mov ebx, 0FFFFFFFFh
cmp cs:translog_status, 1
jnz loc_45E09
lea rax, key_file_translog
mov r14d, [rax]
lea r15, [rbp+var_230]
mov rsi, r15
call translog_filename_by_fileno
lea r13, PSI_server
mov rax, [r13+0]
lea rdi, [rbp+var_288]
lea r12, [rbp+var_238]
mov esi, r14d
xor edx, edx
mov rcx, r15
mov r8, r12
call qword ptr [rax+148h]
mov [r12], rax
test rax, rax
jnz loc_45E2C
lea rdi, [rbp+var_230]
mov ecx, 10h
xor esi, esi
mov edx, offset loc_80002
call my_create
mov r14d, eax
loc_45D66:
test r14d, r14d
js short loc_45DDF
cmp cs:sync_log_dir, 0
jz loc_45E06
mov r15d, cs:dword_3FD450
mov rax, [r13+0]
lea rdi, [rbp+var_288]
mov esi, r15d
mov edx, 10h
call qword ptr [rax+158h]
test rax, rax
jnz loc_45E54
mov esi, 30h ; '0'
mov edi, r15d
call my_sync
loc_45DAF:
test eax, eax
jz short loc_45E06
mov rax, [r13+0]
lea rdi, [rbp+var_288]
mov esi, r14d
mov edx, 4
call qword ptr [rax+158h]
test rax, rax
jnz loc_45E6B
mov edi, r14d
xor esi, esi
call my_close
loc_45DDF:
xor eax, eax
cmp cs:translog_status, 3
setnz al
add eax, eax
mov cs:translog_status, eax
mov byte ptr cs:word_BFE030, 1
mov cs:dword_3FD16C, 0
jmp short loc_45E09
loc_45E06:
mov ebx, r14d
loc_45E09:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_45E7B
mov eax, ebx
add rsp, 268h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_45E2C:
lea rsi, [rbp+var_230]
lea rdx, [rbp+var_238]
lea r14, [rbp+var_23C]
mov rdi, rax
mov rcx, r14
call create_logfile_by_number_no_cache_cold_1
mov r14d, [r14]
jmp loc_45D66
loc_45E54:
mov rdi, rax
mov esi, r15d
mov rdx, r12
call create_logfile_by_number_no_cache_cold_2
mov eax, [r12]
jmp loc_45DAF
loc_45E6B:
mov rdi, rax
mov esi, r14d
call create_logfile_by_number_no_cache_cold_3
jmp loc_45DDF
loc_45E7B:
call ___stack_chk_fail
|
long long create_logfile_by_number_no_cache(
unsigned int a1,
long long a2,
long long a3,
long long a4,
int a5,
int a6)
{
unsigned int v6; // ebx
unsigned int v7; // r14d
long long v8; // rax
unsigned int v9; // r14d
unsigned int v10; // r15d
long long v11; // rax
int v12; // eax
long long v13; // rax
_BYTE v15[76]; // [rsp+8h] [rbp-288h] BYREF
unsigned int v16; // [rsp+54h] [rbp-23Ch] BYREF
long long v17; // [rsp+58h] [rbp-238h] BYREF
_BYTE v18[512]; // [rsp+60h] [rbp-230h] BYREF
unsigned long long v19; // [rsp+260h] [rbp-30h]
v19 = __readfsqword(0x28u);
v6 = -1;
if ( translog_status == 1 )
{
v7 = key_file_translog;
translog_filename_by_fileno(a1, (long long)v18, a3, a4, a5, a6);
v8 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, _BYTE *, long long *))PSI_server[41])(v15, v7, 0LL, v18, &v17);
v17 = v8;
if ( v8 )
{
create_logfile_by_number_no_cache_cold_1(v8, (long long)v18, &v17, &v16);
v9 = v16;
}
else
{
v9 = my_create(v18, 0LL, &loc_80002, 16LL);
}
if ( (v9 & 0x80000000) == 0 )
{
if ( !sync_log_dir )
return v9;
v10 = dword_3FD450;
v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v15, (unsigned int)dword_3FD450, 16LL);
if ( v11 )
{
create_logfile_by_number_no_cache_cold_2(v11, v10, &v17);
v12 = v17;
}
else
{
v12 = my_sync(v10, 48LL);
}
if ( !v12 )
return v9;
v13 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v15, v9, 4LL);
if ( v13 )
create_logfile_by_number_no_cache_cold_3(v13, v9);
else
my_close(v9, 0LL);
}
translog_status = 2 * (translog_status != 3);
LOBYTE(word_BFE030) = 1;
dword_3FD16C = 0;
}
return v6;
}
|
create_logfile_by_number_no_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x268
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV EBX,0xffffffff
CMP dword ptr [0x004fbf50],0x1
JNZ 0x00145e09
LEA RAX,[0x4fbea4]
MOV R14D,dword ptr [RAX]
LEA R15,[RBP + -0x230]
MOV RSI,R15
CALL 0x00143d75
LEA R13,[0x485010]
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x288]
LEA R12,[RBP + -0x238]
MOV ESI,R14D
XOR EDX,EDX
MOV RCX,R15
MOV R8,R12
CALL qword ptr [RAX + 0x148]
MOV qword ptr [R12],RAX
TEST RAX,RAX
JNZ 0x00145e2c
LEA RDI,[RBP + -0x230]
MOV ECX,0x10
XOR ESI,ESI
MOV EDX,0x80002
CALL 0x0019d808
MOV R14D,EAX
LAB_00145d66:
TEST R14D,R14D
JS 0x00145ddf
CMP qword ptr [0x004831a0],0x0
JZ 0x00145e06
MOV R15D,dword ptr [0x004fd450]
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x288]
MOV ESI,R15D
MOV EDX,0x10
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00145e54
MOV ESI,0x30
MOV EDI,R15D
CALL 0x001a0d68
LAB_00145daf:
TEST EAX,EAX
JZ 0x00145e06
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x288]
MOV ESI,R14D
MOV EDX,0x4
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00145e6b
MOV EDI,R14D
XOR ESI,ESI
CALL 0x0019fe49
LAB_00145ddf:
XOR EAX,EAX
CMP dword ptr [0x004fbf50],0x3
SETNZ AL
ADD EAX,EAX
MOV dword ptr [0x004fbf50],EAX
MOV byte ptr [0x00cfe030],0x1
MOV dword ptr [0x004fd16c],0x0
JMP 0x00145e09
LAB_00145e06:
MOV EBX,R14D
LAB_00145e09:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00145e7b
MOV EAX,EBX
ADD RSP,0x268
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00145e2c:
LEA RSI,[RBP + -0x230]
LEA RDX,[RBP + -0x238]
LEA R14,[RBP + -0x23c]
MOV RDI,RAX
MOV RCX,R14
CALL 0x0012c5db
MOV R14D,dword ptr [R14]
JMP 0x00145d66
LAB_00145e54:
MOV RDI,RAX
MOV ESI,R15D
MOV RDX,R12
CALL 0x0012c639
MOV EAX,dword ptr [R12]
JMP 0x00145daf
LAB_00145e6b:
MOV RDI,RAX
MOV ESI,R14D
CALL 0x0012c692
JMP 0x00145ddf
LAB_00145e7b:
CALL 0x00129260
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int create_logfile_by_number_no_cache(int8 param_1)
{
int4 uVar1;
int iVar2;
int iVar3;
long lVar4;
long in_FS_OFFSET;
int1 local_290 [76];
int local_244;
long local_240;
int1 local_238 [512];
long local_38;
uVar1 = key_file_translog;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
iVar2 = -1;
if (translog_status != 1) goto LAB_00145e09;
translog_filename_by_fileno(param_1,local_238);
local_240 = (**(code **)(PSI_server + 0x148))(local_290,uVar1,0,local_238,&local_240);
if (local_240 == 0) {
iVar2 = my_create(local_238,0,0x80002,0x10);
}
else {
create_logfile_by_number_no_cache_cold_1(local_240,local_238,&local_240,&local_244);
iVar2 = local_244;
}
uVar1 = DAT_004fd450;
if (-1 < iVar2) {
if (sync_log_dir == 0) goto LAB_00145e09;
lVar4 = (**(code **)(PSI_server + 0x158))(local_290,DAT_004fd450,0x10);
if (lVar4 == 0) {
iVar3 = my_sync(uVar1,0x30);
}
else {
create_logfile_by_number_no_cache_cold_2(lVar4,uVar1,&local_240);
iVar3 = (int)local_240;
}
if (iVar3 == 0) goto LAB_00145e09;
lVar4 = (**(code **)(PSI_server + 0x158))(local_290,iVar2,4);
if (lVar4 == 0) {
my_close(iVar2,0);
}
else {
create_logfile_by_number_no_cache_cold_3(lVar4,iVar2);
}
}
translog_status = (uint)(translog_status != 3) * 2;
DAT_00cfe030 = 1;
_DAT_004fd16c = 0;
iVar2 = -1;
LAB_00145e09:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return iVar2;
}
|
|
14,511
|
ggml_backend_cpu_aarch64_buffer_type()
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
|
ggml_backend_buffer_type_t ggml_backend_cpu_aarch64_buffer_type(void) {
static struct ggml_backend_buffer_type ggml_backend_cpu_buffer_type_aarch64 = {
/* .iface = */ {
/* .get_name = */ ggml_backend_cpu_aarch64_buffer_type_get_name,
/* .alloc_buffer = */ ggml_backend_cpu_aarch64_buffer_type_alloc_buffer,
/* .get_alignment = */ ggml_backend_cpu_aarch64_buffer_type_get_alignment,
/* .get_max_size = */ nullptr, // defaults to SIZE_MAX
/* .get_alloc_size = */ nullptr, // defaults to ggml_nbytes
/* .is_host = */ nullptr,
},
/* .device = */ ggml_backend_reg_dev_get(ggml_backend_cpu_reg(), 0),
/* .context = */ new ggml::cpu::aarch64::extra_buffer_type(),
};
return &ggml_backend_cpu_buffer_type_aarch64;
}
|
O1
|
cpp
|
ggml_backend_cpu_aarch64_buffer_type():
pushq %rbx
movb 0x47d0d(%rip), %al # 0x60bf0
testb %al, %al
je 0x18ef0
leaq 0x47cc2(%rip), %rax # 0x60bb0
popq %rbx
retq
leaq 0x47cf9(%rip), %rdi # 0x60bf0
callq 0xb070
testl %eax, %eax
je 0x18ee7
leaq 0x97(%rip), %rax # 0x18f9e
movq %rax, 0x47ca2(%rip) # 0x60bb0
leaq 0x91(%rip), %rax # 0x18fa6
movq %rax, 0x47c9c(%rip) # 0x60bb8
leaq 0xd1(%rip), %rax # 0x18ff4
movq %rax, 0x47c96(%rip) # 0x60bc0
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, 0x47c92(%rip) # 0x60bc8
movq $0x0, 0x47c97(%rip) # 0x60bd8
callq 0xa2e0
movq %rax, %rdi
xorl %esi, %esi
callq 0xaf80
movq %rax, 0x47c89(%rip) # 0x60be0
movl $0x8, %edi
callq 0xa8d0
movq 0x43008(%rip), %rcx # 0x5bf70
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, 0x47c72(%rip) # 0x60be8
leaq 0x47c73(%rip), %rdi # 0x60bf0
callq 0xa530
jmp 0x18ee7
movq %rax, %rbx
leaq 0x47c5f(%rip), %rdi # 0x60bf0
callq 0xa520
movq %rbx, %rdi
callq 0xaff0
|
_Z36ggml_backend_cpu_aarch64_buffer_typev:
push rbx
mov al, cs:_ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; `guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
test al, al
jz short loc_18EF0
loc_18EE7:
lea rax, _ZZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
pop rbx
retn
loc_18EF0:
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_acquire
test eax, eax
jz short loc_18EE7
lea rax, _ZL45ggml_backend_cpu_aarch64_buffer_type_get_nameP24ggml_backend_buffer_type; ggml_backend_cpu_aarch64_buffer_type_get_name(ggml_backend_buffer_type *)
mov cs:_ZZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64, rax; ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
lea rax, _ZL49ggml_backend_cpu_aarch64_buffer_type_alloc_bufferP24ggml_backend_buffer_typem; ggml_backend_cpu_aarch64_buffer_type_alloc_buffer(ggml_backend_buffer_type *,ulong)
mov cs:qword_60BB8, rax
lea rax, _ZL50ggml_backend_cpu_aarch64_buffer_type_get_alignmentP24ggml_backend_buffer_type; ggml_backend_cpu_aarch64_buffer_type_get_alignment(ggml_backend_buffer_type *)
mov cs:qword_60BC0, rax
vxorps xmm0, xmm0, xmm0
vmovups cs:xmmword_60BC8, xmm0
mov cs:qword_60BD8, 0
call _ggml_backend_cpu_reg
mov rdi, rax
xor esi, esi
call _ggml_backend_reg_dev_get
mov cs:qword_60BE0, rax
mov edi, 8; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, cs:_ZTVN4ggml3cpu7aarch6417extra_buffer_typeE_ptr
add rcx, 10h
mov [rax], rcx
mov cs:qword_60BE8, rax
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_release
jmp loc_18EE7
mov rbx, rax
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_abort
mov rdi, rbx
call __Unwind_Resume
|
long long * ggml_backend_cpu_aarch64_buffer_type(__m128 _XMM0)
{
void *v3; // rax
_QWORD *v4; // rax
if ( !(_BYTE)`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
&& __cxa_guard_acquire(&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64) )
{
ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64 = (long long)ggml_backend_cpu_aarch64_buffer_type_get_name;
qword_60BB8 = (long long)ggml_backend_cpu_aarch64_buffer_type_alloc_buffer;
qword_60BC0 = (long long)ggml_backend_cpu_aarch64_buffer_type_get_alignment;
__asm
{
vxorps xmm0, xmm0, xmm0
vmovups cs:xmmword_60BC8, xmm0
}
qword_60BD8 = 0LL;
v3 = ggml_backend_cpu_reg((long long)&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64);
qword_60BE0 = ggml_backend_reg_dev_get(v3, 0LL, *(double *)&_XMM0);
v4 = (_QWORD *)operator new(8uLL);
*v4 = &`vtable for'ggml::cpu::aarch64::extra_buffer_type + 2;
qword_60BE8 = (long long)v4;
__cxa_guard_release(&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64);
}
return &ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64;
}
|
ggml_backend_cpu_aarch64_buffer_type:
PUSH RBX
MOV AL,byte ptr [0x00160bf0]
TEST AL,AL
JZ 0x00118ef0
LAB_00118ee7:
LEA RAX,[0x160bb0]
POP RBX
RET
LAB_00118ef0:
LEA RDI,[0x160bf0]
CALL 0x0010b070
TEST EAX,EAX
JZ 0x00118ee7
LEA RAX,[0x118f9e]
MOV qword ptr [0x00160bb0],RAX
LEA RAX,[0x118fa6]
MOV qword ptr [0x00160bb8],RAX
LEA RAX,[0x118ff4]
MOV qword ptr [0x00160bc0],RAX
VXORPS XMM0,XMM0,XMM0
VMOVUPS xmmword ptr [0x00160bc8],XMM0
MOV qword ptr [0x00160bd8],0x0
LAB_00118f41:
CALL 0x0010a2e0
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0010af80
MOV qword ptr [0x00160be0],RAX
MOV EDI,0x8
CALL 0x0010a8d0
LAB_00118f61:
MOV RCX,qword ptr [0x0015bf70]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV qword ptr [0x00160be8],RAX
LEA RDI,[0x160bf0]
CALL 0x0010a530
JMP 0x00118ee7
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* ggml_backend_cpu_aarch64_buffer_type() */
int1 * ggml_backend_cpu_aarch64_buffer_type(void)
{
int iVar1;
int8 uVar2;
if (ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64 == '\0') {
iVar1 = __cxa_guard_acquire(&ggml_backend_cpu_aarch64_buffer_type()::
ggml_backend_cpu_buffer_type_aarch64);
if (iVar1 != 0) {
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._0_8_ =
ggml_backend_cpu_aarch64_buffer_type_get_name;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._8_8_ =
ggml_backend_cpu_aarch64_buffer_type_alloc_buffer;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._16_8_ =
ggml_backend_cpu_aarch64_buffer_type_get_alignment;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._24_8_ = 0;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._32_8_ = 0;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._40_8_ = 0;
/* try { // try from 00118f41 to 00118f60 has its CatchHandler @ 00118f87 */
uVar2 = ggml_backend_cpu_reg();
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._48_8_ =
ggml_backend_reg_dev_get(uVar2,0);
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._56_8_ =
operator_new(8);
*(int **)
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._56_8_ =
PTR_vtable_0015bf70 + 0x10;
__cxa_guard_release(&ggml_backend_cpu_aarch64_buffer_type()::
ggml_backend_cpu_buffer_type_aarch64);
}
}
return ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64;
}
|
|
14,512
|
ggml_backend_cpu_aarch64_buffer_type()
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
|
ggml_backend_buffer_type_t ggml_backend_cpu_aarch64_buffer_type(void) {
static struct ggml_backend_buffer_type ggml_backend_cpu_buffer_type_aarch64 = {
/* .iface = */ {
/* .get_name = */ ggml_backend_cpu_aarch64_buffer_type_get_name,
/* .alloc_buffer = */ ggml_backend_cpu_aarch64_buffer_type_alloc_buffer,
/* .get_alignment = */ ggml_backend_cpu_aarch64_buffer_type_get_alignment,
/* .get_max_size = */ nullptr, // defaults to SIZE_MAX
/* .get_alloc_size = */ nullptr, // defaults to ggml_nbytes
/* .is_host = */ nullptr,
},
/* .device = */ ggml_backend_reg_dev_get(ggml_backend_cpu_reg(), 0),
/* .context = */ new ggml::cpu::aarch64::extra_buffer_type(),
};
return &ggml_backend_cpu_buffer_type_aarch64;
}
|
O2
|
cpp
|
ggml_backend_cpu_aarch64_buffer_type():
pushq %rbx
movb 0x4360c(%rip), %al # 0x5bc90
testb %al, %al
je 0x18691
leaq 0x435c1(%rip), %rax # 0x5bc50
popq %rbx
retq
leaq 0x435f8(%rip), %rdi # 0x5bc90
callq 0xc180
testl %eax, %eax
je 0x18688
leaq 0x92(%rip), %rax # 0x1873a
movq %rax, 0x435a1(%rip) # 0x5bc50
leaq 0x8c(%rip), %rax # 0x18742
movq %rax, 0x4359b(%rip) # 0x5bc58
leaq 0xc8(%rip), %rax # 0x1878c
movq %rax, 0x43595(%rip) # 0x5bc60
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, 0x43591(%rip) # 0x5bc68
andq $0x0, 0x43599(%rip) # 0x5bc78
callq 0xb310
movq %rax, %rdi
xorl %esi, %esi
callq 0xc080
movq %rax, 0x4358b(%rip) # 0x5bc80
pushq $0x8
popq %rdi
callq 0xb970
movq 0x3e86c(%rip), %rcx # 0x56f70
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, 0x43576(%rip) # 0x5bc88
leaq 0x43577(%rip), %rdi # 0x5bc90
callq 0xb5b0
jmp 0x18688
movq %rax, %rbx
leaq 0x43563(%rip), %rdi # 0x5bc90
callq 0xb5a0
movq %rbx, %rdi
callq 0xc100
|
_Z36ggml_backend_cpu_aarch64_buffer_typev:
push rbx
mov al, cs:_ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; `guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
test al, al
jz short loc_18691
loc_18688:
lea rax, _ZZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
pop rbx
retn
loc_18691:
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_acquire
test eax, eax
jz short loc_18688
lea rax, _ZL45ggml_backend_cpu_aarch64_buffer_type_get_nameP24ggml_backend_buffer_type; ggml_backend_cpu_aarch64_buffer_type_get_name(ggml_backend_buffer_type *)
mov cs:_ZZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64, rax; ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
lea rax, _ZL49ggml_backend_cpu_aarch64_buffer_type_alloc_bufferP24ggml_backend_buffer_typem; ggml_backend_cpu_aarch64_buffer_type_alloc_buffer(ggml_backend_buffer_type *,ulong)
mov cs:qword_5BC58, rax
lea rax, _ZL50ggml_backend_cpu_aarch64_buffer_type_get_alignmentP24ggml_backend_buffer_type; ggml_backend_cpu_aarch64_buffer_type_get_alignment(ggml_backend_buffer_type *)
mov cs:qword_5BC60, rax
vxorps xmm0, xmm0, xmm0
vmovups cs:xmmword_5BC68, xmm0
and cs:qword_5BC78, 0
call _ggml_backend_cpu_reg
mov rdi, rax
xor esi, esi
call _ggml_backend_reg_dev_get
mov cs:qword_5BC80, rax
push 8
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, cs:_ZTVN4ggml3cpu7aarch6417extra_buffer_typeE_ptr
add rcx, 10h
mov [rax], rcx
mov cs:qword_5BC88, rax
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_release
jmp loc_18688
mov rbx, rax
lea rdi, _ZGVZ36ggml_backend_cpu_aarch64_buffer_typevE36ggml_backend_cpu_buffer_type_aarch64; __guard *
call ___cxa_guard_abort
mov rdi, rbx
call __Unwind_Resume
|
long long * ggml_backend_cpu_aarch64_buffer_type(__m128 _XMM0)
{
void *v3; // rax
_QWORD *v4; // rax
if ( !(_BYTE)`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64
&& __cxa_guard_acquire(&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64) )
{
ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64 = (long long)ggml_backend_cpu_aarch64_buffer_type_get_name;
qword_5BC58 = (long long)ggml_backend_cpu_aarch64_buffer_type_alloc_buffer;
qword_5BC60 = (long long)ggml_backend_cpu_aarch64_buffer_type_get_alignment;
__asm
{
vxorps xmm0, xmm0, xmm0
vmovups cs:xmmword_5BC68, xmm0
}
qword_5BC78 = 0LL;
v3 = ggml_backend_cpu_reg((long long)&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64);
qword_5BC80 = ggml_backend_reg_dev_get(v3, 0LL, *(double *)&_XMM0);
v4 = (_QWORD *)operator new(8uLL);
*v4 = &`vtable for'ggml::cpu::aarch64::extra_buffer_type + 2;
qword_5BC88 = (long long)v4;
__cxa_guard_release(&`guard variable for'ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64);
}
return &ggml_backend_cpu_aarch64_buffer_type(void)::ggml_backend_cpu_buffer_type_aarch64;
}
|
ggml_backend_cpu_aarch64_buffer_type:
PUSH RBX
MOV AL,byte ptr [0x0015bc90]
TEST AL,AL
JZ 0x00118691
LAB_00118688:
LEA RAX,[0x15bc50]
POP RBX
RET
LAB_00118691:
LEA RDI,[0x15bc90]
CALL 0x0010c180
TEST EAX,EAX
JZ 0x00118688
LEA RAX,[0x11873a]
MOV qword ptr [0x0015bc50],RAX
LEA RAX,[0x118742]
MOV qword ptr [0x0015bc58],RAX
LEA RAX,[0x11878c]
MOV qword ptr [0x0015bc60],RAX
VXORPS XMM0,XMM0,XMM0
VMOVUPS xmmword ptr [0x0015bc68],XMM0
AND qword ptr [0x0015bc78],0x0
LAB_001186df:
CALL 0x0010b310
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0010c080
MOV qword ptr [0x0015bc80],RAX
PUSH 0x8
POP RDI
CALL 0x0010b970
LAB_001186fd:
MOV RCX,qword ptr [0x00156f70]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV qword ptr [0x0015bc88],RAX
LEA RDI,[0x15bc90]
CALL 0x0010b5b0
JMP 0x00118688
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* ggml_backend_cpu_aarch64_buffer_type() */
int1 * ggml_backend_cpu_aarch64_buffer_type(void)
{
int iVar1;
int8 uVar2;
if (ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64 == '\0') {
iVar1 = __cxa_guard_acquire(&ggml_backend_cpu_aarch64_buffer_type()::
ggml_backend_cpu_buffer_type_aarch64);
if (iVar1 != 0) {
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._0_8_ =
ggml_backend_cpu_aarch64_buffer_type_get_name;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._8_8_ =
ggml_backend_cpu_aarch64_buffer_type_alloc_buffer;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._16_8_ =
ggml_backend_cpu_aarch64_buffer_type_get_alignment;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._24_8_ = 0;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._32_8_ = 0;
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._40_8_ = 0;
/* try { // try from 001186df to 001186fc has its CatchHandler @ 00118723 */
uVar2 = ggml_backend_cpu_reg();
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._48_8_ =
ggml_backend_reg_dev_get(uVar2,0);
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._56_8_ =
operator_new(8);
*(int **)
ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64._56_8_ =
PTR_vtable_00156f70 + 0x10;
__cxa_guard_release(&ggml_backend_cpu_aarch64_buffer_type()::
ggml_backend_cpu_buffer_type_aarch64);
}
}
return ggml_backend_cpu_aarch64_buffer_type()::ggml_backend_cpu_buffer_type_aarch64;
}
|
|
14,513
|
ftxui::TerminalInputParser::Timeout(int)
|
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/terminal_input_parser.cpp
|
void TerminalInputParser::Timeout(int time) {
timeout_ += time;
const int timeout_threshold = 50;
if (timeout_ < timeout_threshold) {
return;
}
timeout_ = 0;
if (!pending_.empty()) {
Send(SPECIAL);
}
}
|
O1
|
cpp
|
ftxui::TerminalInputParser::Timeout(int):
addl 0xc(%rdi), %esi
movl %esi, 0xc(%rdi)
cmpl $0x32, %esi
jl 0x32e93
movl $0x0, 0xc(%rdi)
cmpq $0x0, 0x18(%rdi)
je 0x32e93
subq $0x38, %rsp
movl $0x3, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x32e94
addq $0x38, %rsp
retq
|
_ZN5ftxui19TerminalInputParser7TimeoutEi:
add esi, [rdi+0Ch]; int
mov [rdi+0Ch], esi
cmp esi, 32h ; '2'
jl short locret_32E93
mov dword ptr [rdi+0Ch], 0
cmp qword ptr [rdi+18h], 0
jz short locret_32E93
sub rsp, 38h
mov [rsp+38h+var_18], 3; int
mov rax, qword ptr [rsp+38h+var_8]
mov qword ptr [rsp+38h+var_28], rax; int
movups xmm0, xmmword ptr [rsp+38h+var_18]
movups xmmword ptr [rsp+38h+var_38], xmm0; int
call _ZN5ftxui19TerminalInputParser4SendENS0_6OutputE; ftxui::TerminalInputParser::Send(ftxui::TerminalInputParser::Output)
add rsp, 38h
locret_32E93:
retn
|
long long ftxui::TerminalInputParser::Timeout(ftxui::TerminalInputParser *this, int a2, long long a3)
{
long long v3; // rsi
long long result; // rax
v3 = (unsigned int)(*((_DWORD *)this + 3) + a2);
*((_DWORD *)this + 3) = v3;
if ( (int)v3 >= 50 )
{
*((_DWORD *)this + 3) = 0;
if ( *((_QWORD *)this + 3) )
return ftxui::TerminalInputParser::Send(this, v3, a3);
}
return result;
}
|
Timeout:
ADD ESI,dword ptr [RDI + 0xc]
MOV dword ptr [RDI + 0xc],ESI
CMP ESI,0x32
JL 0x00132e93
MOV dword ptr [RDI + 0xc],0x0
CMP qword ptr [RDI + 0x18],0x0
JZ 0x00132e93
SUB RSP,0x38
MOV dword ptr [RSP + 0x20],0x3
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x00132e94
ADD RSP,0x38
LAB_00132e93:
RET
|
/* ftxui::TerminalInputParser::Timeout(int) */
void __thiscall ftxui::TerminalInputParser::Timeout(TerminalInputParser *this,int param_1)
{
int iVar1;
iVar1 = *(int *)(this + 0xc);
*(int *)(this + 0xc) = param_1 + iVar1;
if ((0x31 < param_1 + iVar1) && (*(int4 *)(this + 0xc) = 0, *(long *)(this + 0x18) != 0)) {
Send();
}
return;
}
|
|
14,514
|
my_rw_unlock
|
eloqsql/mysys/thr_rwlock.c
|
int my_rw_unlock(my_rw_lock_t *rwp)
{
DBUG_PRINT("rw_unlock",
("state: %d waiters: %d", rwp->state, rwp->waiters));
pthread_mutex_lock(&rwp->lock);
DBUG_ASSERT(rwp->state != 0);
if (rwp->state == -1) /* writer releasing */
{
my_rw_lock_assert_write_owner(rwp);
rwp->state= 0; /* mark as available */
#ifdef SAFE_MUTEX
rwp->write_thread= 0;
#endif
if ( rwp->waiters ) /* writers queued */
pthread_cond_signal( &rwp->writers );
else
pthread_cond_broadcast( &rwp->readers );
}
else
{
if ( --rwp->state == 0 && /* no more readers */
rwp->waiters)
pthread_cond_signal( &rwp->writers );
}
pthread_mutex_unlock( &rwp->lock );
return(0);
}
|
O0
|
c
|
my_rw_unlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x29fee
movq -0x8(%rbp), %rdi
callq 0x24400
jmp 0x29ff9
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x88(%rax)
jne 0x2a03f
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
je 0x2a030
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x24030
jmp 0x2a03d
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0x240f0
jmp 0x2a073
movq -0x8(%rbp), %rcx
movl 0x88(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x88(%rcx)
cmpl $0x0, %eax
jne 0x2a071
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
je 0x2a071
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x24030
jmp 0x2a073
movq -0x8(%rbp), %rdi
callq 0x241e0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_rw_unlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_29FEE:
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
jmp short $+2
loc_29FF9:
mov rax, [rbp+var_8]
cmp dword ptr [rax+88h], 0FFFFFFFFh
jnz short loc_2A03F
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
cmp dword ptr [rax+8Ch], 0
jz short loc_2A030
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_cond_signal
jmp short loc_2A03D
loc_2A030:
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
call _pthread_cond_broadcast
loc_2A03D:
jmp short loc_2A073
loc_2A03F:
mov rcx, [rbp+var_8]
mov eax, [rcx+88h]
add eax, 0FFFFFFFFh
mov [rcx+88h], eax
cmp eax, 0
jnz short loc_2A071
mov rax, [rbp+var_8]
cmp dword ptr [rax+8Ch], 0
jz short loc_2A071
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_cond_signal
loc_2A071:
jmp short $+2
loc_2A073:
mov rdi, [rbp+var_8]
call _pthread_mutex_unlock
xor eax, eax
add rsp, 10h
pop rbp
retn
|
long long my_rw_unlock(long long a1)
{
int v1; // eax
pthread_mutex_lock(a1);
if ( *(_DWORD *)(a1 + 136) == -1 )
{
*(_DWORD *)(a1 + 136) = 0;
if ( !*(_DWORD *)(a1 + 140) )
{
pthread_cond_broadcast(a1 + 40);
goto LABEL_7;
}
LABEL_6:
pthread_cond_signal(a1 + 88);
goto LABEL_7;
}
v1 = *(_DWORD *)(a1 + 136) - 1;
*(_DWORD *)(a1 + 136) = v1;
if ( !v1 && *(_DWORD *)(a1 + 140) )
goto LABEL_6;
LABEL_7:
pthread_mutex_unlock(a1);
return 0LL;
}
|
my_rw_unlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x00129fee
LAB_00129fee:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124400
JMP 0x00129ff9
LAB_00129ff9:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x88],-0x1
JNZ 0x0012a03f
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x8c],0x0
JZ 0x0012a030
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x00124030
JMP 0x0012a03d
LAB_0012a030:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
CALL 0x001240f0
LAB_0012a03d:
JMP 0x0012a073
LAB_0012a03f:
MOV RCX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RCX + 0x88]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x88],EAX
CMP EAX,0x0
JNZ 0x0012a071
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x8c],0x0
JZ 0x0012a071
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x00124030
LAB_0012a071:
JMP 0x0012a073
LAB_0012a073:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001241e0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_unlock(pthread_mutex_t *param_1)
{
int iVar1;
pthread_mutex_lock(param_1);
if (*(int *)((long)param_1 + 0x88) == -1) {
*(int4 *)((long)param_1 + 0x88) = 0;
if (*(int *)((long)param_1 + 0x8c) == 0) {
pthread_cond_broadcast((pthread_cond_t *)(param_1 + 1));
}
else {
pthread_cond_signal((pthread_cond_t *)((long)param_1 + 0x58));
}
}
else {
iVar1 = *(int *)((long)param_1 + 0x88) + -1;
*(int *)((long)param_1 + 0x88) = iVar1;
if ((iVar1 == 0) && (*(int *)((long)param_1 + 0x8c) != 0)) {
pthread_cond_signal((pthread_cond_t *)((long)param_1 + 0x58));
}
}
pthread_mutex_unlock(param_1);
return 0;
}
|
|
14,515
|
js_promise_then_finally_func
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_promise_then_finally_func(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv,
int magic, JSValue *func_data)
{
JSValue ctor = func_data[0];
JSValue onFinally = func_data[1];
JSValue res, promise, ret, then_func;
res = JS_Call(ctx, onFinally, JS_UNDEFINED, 0, NULL);
if (JS_IsException(res))
return res;
promise = js_promise_resolve(ctx, ctor, 1, &res, 0);
JS_FreeValue(ctx, res);
if (JS_IsException(promise))
return promise;
if (magic == 0) {
then_func = JS_NewCFunctionData(ctx, js_promise_finally_value_thunk, 0,
0, 1, argv);
} else {
then_func = JS_NewCFunctionData(ctx, js_promise_finally_thrower, 0,
0, 1, argv);
}
if (JS_IsException(then_func)) {
JS_FreeValue(ctx, promise);
return then_func;
}
ret = JS_InvokeFree(ctx, promise, JS_ATOM_then, 1, &then_func);
JS_FreeValue(ctx, then_func);
return ret;
}
|
O2
|
c
|
js_promise_then_finally_func:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, %rbp
movq %rdi, %rbx
movq 0x70(%rsp), %rax
movq (%rax), %r13
movq 0x8(%rax), %r12
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
andq $0x0, (%rsp)
pushq $0x3
popq %r8
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x21eb6
movq %rdx, %r15
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
cmpl $0x6, %r15d
jne 0x47a5b
movq %rax, %r14
jmp 0x47b27
movq %rbp, 0x10(%rsp)
leaq 0x28(%rsp), %rbp
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbp, %r8
xorl %r9d, %r9d
callq 0x476a1
movq %rax, %r14
movq %rdx, %r15
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %rbx, %rdi
callq 0x1801e
cmpl $0x6, %r15d
je 0x47b27
cmpl $0x0, 0xc(%rsp)
leaq 0x97(%rip), %rax # 0x47b3c
leaq 0xa4(%rip), %rsi # 0x47b50
cmoveq %rax, %rsi
pushq $0x1
popq %r8
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq 0x10(%rsp), %r9
callq 0x1b3ba
movq %rdx, %r13
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
cmpl $0x6, %r13d
jne 0x47af1
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1801e
movq %r12, %r14
movq %r13, %r15
jmp 0x47b27
pushq $0x1
popq %r8
leaq 0x18(%rsp), %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl $0x80, %ecx
movq %r12, %r9
callq 0x47b70
movq %rax, %r14
movq %rdx, %r15
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbx, %rdi
callq 0x1801e
movq %r14, %rax
movq %r15, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_promise_then_finally_func:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rsp+68h+var_5C], r9d
mov rbp, r8
mov rbx, rdi
mov rax, [rsp+68h+arg_0]
mov r13, [rax]
mov r12, [rax+8]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
and [rsp+68h+var_68], 0
push 3
pop r8
xor ecx, ecx
xor r9d, r9d
call JS_Call
mov r15, rdx
mov [rsp+68h+var_40], rax
mov [rsp+68h+var_38], rdx
cmp r15d, 6
jnz short loc_47A5B
mov r14, rax
jmp loc_47B27
loc_47A5B:
mov [rsp+68h+var_58], rbp
lea rbp, [rsp+68h+var_40]
mov rdi, rbx
mov rsi, r13
mov rdx, r12
mov r8, rbp
xor r9d, r9d
call js_promise_resolve
mov r14, rax
mov r15, rdx
mov rsi, [rbp+0]
mov rdx, [rbp+8]
mov rdi, rbx
call JS_FreeValue
cmp r15d, 6
jz loc_47B27
cmp [rsp+68h+var_5C], 0
lea rax, js_promise_finally_value_thunk
lea rsi, js_promise_finally_thrower
cmovz rsi, rax
push 1
pop r8
mov rdi, rbx
xor edx, edx
xor ecx, ecx
mov r9, [rsp+68h+var_58]
call JS_NewCFunctionData
mov r13, rdx
mov [rsp+68h+var_50], rax
mov [rsp+68h+var_48], rdx
cmp r13d, 6
jnz short loc_47AF1
mov r12, rax
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_FreeValue
mov r14, r12
mov r15, r13
jmp short loc_47B27
loc_47AF1:
push 1
pop r8
lea r12, [rsp+68h+var_50]
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov ecx, 80h
mov r9, r12
call JS_InvokeFree
mov r14, rax
mov r15, rdx
mov rsi, [r12]
mov rdx, [r12+8]
mov rdi, rbx
call JS_FreeValue
loc_47B27:
mov rax, r14
mov rdx, r15
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_DWORD * js_promise_then_finally_func(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
int a14,
long long a15)
{
_DWORD *v16; // r13
unsigned long long v17; // r12
long long v18; // rax
long long v19; // rcx
__m128 v20; // xmm4
__m128 v21; // xmm5
long long v22; // rdx
_DWORD *v23; // r14
long long v24; // rdx
long long v25; // r15
long long ( *v26)(int, int, int, int, int, int, long long); // rsi
unsigned long long v27; // rax
long long v28; // rdx
unsigned long long v29; // r12
unsigned long long v32; // [rsp+18h] [rbp-50h] BYREF
long long v33; // [rsp+20h] [rbp-48h]
long long v34; // [rsp+28h] [rbp-40h] BYREF
long long v35; // [rsp+30h] [rbp-38h]
v16 = *(_DWORD **)a15;
v17 = *(_QWORD *)(a15 + 8);
v18 = JS_Call(a1, *(_QWORD *)(a15 + 16), *(_QWORD *)(a15 + 24), 0, 3, 0, 0LL);
v34 = v18;
v35 = v22;
if ( (_DWORD)v22 == 6 )
return (_DWORD *)v18;
v23 = js_promise_resolve(a1, v16, v17, v19, &v34, 0LL, a2, a3, a4, a5, v20, v21, a8, a9);
v25 = v24;
JS_FreeValue(a1, v34, v35);
if ( (_DWORD)v25 != 6 )
{
v26 = js_promise_finally_thrower;
if ( !a14 )
v26 = js_promise_finally_value_thunk;
v27 = JS_NewCFunctionData(a1, (long long)v26, 0, 0, 1u, a13);
v32 = v27;
v33 = v28;
if ( (_DWORD)v28 == 6 )
{
v29 = v27;
JS_FreeValue(a1, (long long)v23, v25);
return (_DWORD *)v29;
}
else
{
v23 = (_DWORD *)JS_InvokeFree(a1, v23, v25, 128LL, 1LL, &v32);
JS_FreeValue(a1, v32, v33);
}
}
return v23;
}
|
js_promise_then_finally_func:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV dword ptr [RSP + 0xc],R9D
MOV RBP,R8
MOV RBX,RDI
MOV RAX,qword ptr [RSP + 0x70]
MOV R13,qword ptr [RAX]
MOV R12,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
AND qword ptr [RSP],0x0
PUSH 0x3
POP R8
XOR ECX,ECX
XOR R9D,R9D
CALL 0x00121eb6
MOV R15,RDX
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
CMP R15D,0x6
JNZ 0x00147a5b
MOV R14,RAX
JMP 0x00147b27
LAB_00147a5b:
MOV qword ptr [RSP + 0x10],RBP
LEA RBP,[RSP + 0x28]
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
MOV R8,RBP
XOR R9D,R9D
CALL 0x001476a1
MOV R14,RAX
MOV R15,RDX
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
MOV RDI,RBX
CALL 0x0011801e
CMP R15D,0x6
JZ 0x00147b27
CMP dword ptr [RSP + 0xc],0x0
LEA RAX,[0x147b3c]
LEA RSI,[0x147b50]
CMOVZ RSI,RAX
PUSH 0x1
POP R8
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
MOV R9,qword ptr [RSP + 0x10]
CALL 0x0011b3ba
MOV R13,RDX
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
CMP R13D,0x6
JNZ 0x00147af1
MOV R12,RAX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0011801e
MOV R14,R12
MOV R15,R13
JMP 0x00147b27
LAB_00147af1:
PUSH 0x1
POP R8
LEA R12,[RSP + 0x18]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV ECX,0x80
MOV R9,R12
CALL 0x00147b70
MOV R14,RAX
MOV R15,RDX
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
MOV RDI,RBX
CALL 0x0011801e
LAB_00147b27:
MOV RAX,R14
MOV RDX,R15
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_promise_then_finally_func(int8 param_1)
{
int8 uVar1;
int8 uVar2;
code *pcVar3;
int8 in_R8;
int in_R9D;
int1 auVar4 [16];
int1 auVar5 [16];
int8 *in_stack_00000008;
int1 local_50 [16];
int1 local_40 [16];
uVar1 = *in_stack_00000008;
uVar2 = in_stack_00000008[1];
local_40 = JS_Call(param_1,in_stack_00000008[2],in_stack_00000008[3],0,3,0,0);
auVar4 = local_40;
if (local_40._8_4_ != 6) {
auVar4 = js_promise_resolve(param_1,uVar1,uVar2);
JS_FreeValue(param_1,local_40._0_8_,local_40._8_8_);
if (auVar4._8_4_ != 6) {
pcVar3 = js_promise_finally_thrower;
if (in_R9D == 0) {
pcVar3 = js_promise_finally_value_thunk;
}
auVar5 = JS_NewCFunctionData(param_1,pcVar3,0,0,1,in_R8);
local_50 = auVar5;
if (auVar5._8_4_ == 6) {
JS_FreeValue(param_1,auVar4._0_8_,auVar4._8_8_);
auVar4 = auVar5;
}
else {
auVar4 = JS_InvokeFree(param_1,auVar4._0_8_,auVar4._8_8_,0x80,1,local_50);
JS_FreeValue(param_1,local_50._0_8_,local_50._8_8_);
}
}
}
return auVar4;
}
|
|
14,516
|
ma_skip_pack_key
|
eloqsql/storage/maria/ma_search.c
|
uchar *_ma_skip_pack_key(MARIA_KEY *key, uint page_flag,
uint nod_flag, uchar *page)
{
reg1 HA_KEYSEG *keyseg;
for (keyseg= key->keyinfo->seg ; keyseg->type ; keyseg++)
{
if (keyseg->flag & HA_PACK_KEY)
{
/* key with length, packed to previous key */
uint packed= *page & 128, length;
if (keyseg->length >= 127)
{
length= mi_uint2korr(page) & 32767;
page+= 2;
}
else
length= *page++ & 127;
if (packed)
{
if (length == 0) /* Same key */
continue;
get_key_length(length,page);
page+= length;
continue;
}
if ((keyseg->flag & HA_NULL_PART) && length)
{
/*
Keys that can have null use length+1 as the length for date as the
number 0 is reserved for keys that have a NULL value
*/
length--;
}
page+= length;
}
else
{
if (keyseg->flag & HA_NULL_PART)
if (!*page++)
continue;
if (keyseg->flag & (HA_SPACE_PACK | HA_BLOB_PART | HA_VAR_LENGTH_PART))
{
uint length;
get_key_length(length,page);
page+=length;
}
else
page+= keyseg->length;
}
}
page+= keyseg->length;
if ((page_flag & KEYPAGE_FLAG_HAS_TRANSID) && key_has_transid(page-1))
page+= transid_packed_length(page);
return page + nod_flag;
}
|
O3
|
c
|
ma_skip_pack_key:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movq 0xc0(%rax), %rax
cmpb $0x0, 0x18(%rax)
je 0x5877d
movzwl 0x12(%rax), %edi
testb $0x2, %dil
jne 0x586ed
testb $0x10, %dil
je 0x586e1
cmpb $0x0, (%rcx)
leaq 0x1(%rcx), %rcx
je 0x5876a
testb $0x29, %dil
jne 0x5873f
movzwl 0x14(%rax), %edi
jmp 0x58767
movzbl (%rcx), %r9d
cmpw $0x7f, 0x14(%rax)
jb 0x58711
movzbl 0x1(%rcx), %r10d
movl %r9d, %r8d
andl $0x7f, %r8d
shll $0x8, %r8d
orl %r10d, %r8d
addq $0x2, %rcx
jmp 0x5871b
incq %rcx
movl %r9d, %r8d
andl $0x7f, %r8d
testb %r9b, %r9b
js 0x5873a
shrb $0x4, %dil
testl %r8d, %r8d
setne %r9b
andb %dil, %r9b
movzbl %r9b, %edi
subl %edi, %r8d
addq %r8, %rcx
jmp 0x5876a
testl %r8d, %r8d
je 0x5876a
movzbl (%rcx), %edi
cmpq $0xff, %rdi
je 0x58753
movl $0x1, %r8d
jmp 0x58764
movzwl 0x1(%rcx), %edi
rolw $0x8, %di
movzwl %di, %edi
movl $0x3, %r8d
addq %r8, %rcx
addq %rdi, %rcx
leaq 0x20(%rax), %rdi
cmpb $0x0, 0x38(%rax)
movq %rdi, %rax
jne 0x586c4
jmp 0x58780
movq %rax, %rdi
movzwl 0x14(%rdi), %edi
addq %rcx, %rdi
testb $0x2, %sil
je 0x587ad
testb $0x1, -0x1(%rdi)
je 0x587ad
movzbl (%rdi), %eax
leal -0xf8(%rax), %ecx
cmpl $0xf3, %eax
movl $0x1, %eax
cmovaeq %rcx, %rax
addq %rax, %rdi
movl %edx, %eax
addq %rdi, %rax
popq %rbp
retq
|
_ma_skip_pack_key:
push rbp
mov rbp, rsp
mov rax, [rdi+8]
mov rax, [rax+0C0h]
cmp byte ptr [rax+18h], 0
jz loc_5877D
loc_586C4:
movzx edi, word ptr [rax+12h]
test dil, 2
jnz short loc_586ED
test dil, 10h
jz short loc_586E1
cmp byte ptr [rcx], 0
lea rcx, [rcx+1]
jz loc_5876A
loc_586E1:
test dil, 29h
jnz short loc_5873F
movzx edi, word ptr [rax+14h]
jmp short loc_58767
loc_586ED:
movzx r9d, byte ptr [rcx]
cmp word ptr [rax+14h], 7Fh
jb short loc_58711
movzx r10d, byte ptr [rcx+1]
mov r8d, r9d
and r8d, 7Fh
shl r8d, 8
or r8d, r10d
add rcx, 2
jmp short loc_5871B
loc_58711:
inc rcx
mov r8d, r9d
and r8d, 7Fh
loc_5871B:
test r9b, r9b
js short loc_5873A
shr dil, 4
test r8d, r8d
setnz r9b
and r9b, dil
movzx edi, r9b
sub r8d, edi
add rcx, r8
jmp short loc_5876A
loc_5873A:
test r8d, r8d
jz short loc_5876A
loc_5873F:
movzx edi, byte ptr [rcx]
cmp rdi, 0FFh
jz short loc_58753
mov r8d, 1
jmp short loc_58764
loc_58753:
movzx edi, word ptr [rcx+1]
rol di, 8
movzx edi, di
mov r8d, 3
loc_58764:
add rcx, r8
loc_58767:
add rcx, rdi
loc_5876A:
lea rdi, [rax+20h]
cmp byte ptr [rax+38h], 0
mov rax, rdi
jnz loc_586C4
jmp short loc_58780
loc_5877D:
mov rdi, rax
loc_58780:
movzx edi, word ptr [rdi+14h]
add rdi, rcx
test sil, 2
jz short loc_587AD
test byte ptr [rdi-1], 1
jz short loc_587AD
movzx eax, byte ptr [rdi]
lea ecx, [rax-0F8h]
cmp eax, 0F3h
mov eax, 1
cmovnb rax, rcx
add rdi, rax
loc_587AD:
mov eax, edx
add rax, rdi
pop rbp
retn
|
unsigned __int8 * ma_skip_pack_key(long long a1, char a2, int a3, unsigned __int8 *a4)
{
long long v4; // rax
__int16 v5; // di
bool v6; // zf
long long v7; // rdi
char v8; // r9
int v9; // r8d
long long v10; // r8
long long v11; // rdi
unsigned __int8 *v12; // rdi
unsigned int v13; // eax
long long v14; // rcx
bool v15; // cf
long long v16; // rax
v4 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 192LL);
if ( *(_BYTE *)(v4 + 24) )
{
while ( 1 )
{
v5 = *(_WORD *)(v4 + 18);
if ( (v5 & 2) == 0 )
break;
v8 = *a4;
if ( *(_WORD *)(v4 + 20) < 0x7Fu )
{
++a4;
v9 = v8 & 0x7F;
}
else
{
v9 = a4[1] | ((v8 & 0x7F) << 8);
a4 += 2;
}
if ( v8 < 0 )
{
if ( v9 )
goto LABEL_13;
}
else
{
a4 += v9 - (unsigned int)(((unsigned __int8)v5 >> 4) & (v9 != 0));
}
LABEL_18:
v11 = v4 + 32;
v6 = *(_BYTE *)(v4 + 56) == 0;
v4 += 32LL;
if ( v6 )
goto LABEL_21;
}
if ( (v5 & 0x10) != 0 )
{
v6 = *a4++ == 0;
if ( v6 )
goto LABEL_18;
}
if ( (v5 & 0x29) != 0 )
{
LABEL_13:
v7 = *a4;
if ( v7 == 255 )
{
v7 = (unsigned __int16)__ROL2__(*(_WORD *)(a4 + 1), 8);
v10 = 3LL;
}
else
{
v10 = 1LL;
}
a4 += v10;
}
else
{
v7 = *(unsigned __int16 *)(v4 + 20);
}
a4 += v7;
goto LABEL_18;
}
v11 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 192LL);
LABEL_21:
v12 = &a4[*(unsigned __int16 *)(v11 + 20)];
if ( (a2 & 2) != 0 && (*(v12 - 1) & 1) != 0 )
{
v13 = *v12;
v14 = v13 - 248;
v15 = v13 < 0xF3;
v16 = 1LL;
if ( !v15 )
v16 = v14;
v12 += v16;
}
return &v12[a3];
}
|
_ma_skip_pack_key:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RAX + 0xc0]
CMP byte ptr [RAX + 0x18],0x0
JZ 0x0015877d
LAB_001586c4:
MOVZX EDI,word ptr [RAX + 0x12]
TEST DIL,0x2
JNZ 0x001586ed
TEST DIL,0x10
JZ 0x001586e1
CMP byte ptr [RCX],0x0
LEA RCX,[RCX + 0x1]
JZ 0x0015876a
LAB_001586e1:
TEST DIL,0x29
JNZ 0x0015873f
MOVZX EDI,word ptr [RAX + 0x14]
JMP 0x00158767
LAB_001586ed:
MOVZX R9D,byte ptr [RCX]
CMP word ptr [RAX + 0x14],0x7f
JC 0x00158711
MOVZX R10D,byte ptr [RCX + 0x1]
MOV R8D,R9D
AND R8D,0x7f
SHL R8D,0x8
OR R8D,R10D
ADD RCX,0x2
JMP 0x0015871b
LAB_00158711:
INC RCX
MOV R8D,R9D
AND R8D,0x7f
LAB_0015871b:
TEST R9B,R9B
JS 0x0015873a
SHR DIL,0x4
TEST R8D,R8D
SETNZ R9B
AND R9B,DIL
MOVZX EDI,R9B
SUB R8D,EDI
ADD RCX,R8
JMP 0x0015876a
LAB_0015873a:
TEST R8D,R8D
JZ 0x0015876a
LAB_0015873f:
MOVZX EDI,byte ptr [RCX]
CMP RDI,0xff
JZ 0x00158753
MOV R8D,0x1
JMP 0x00158764
LAB_00158753:
MOVZX EDI,word ptr [RCX + 0x1]
ROL DI,0x8
MOVZX EDI,DI
MOV R8D,0x3
LAB_00158764:
ADD RCX,R8
LAB_00158767:
ADD RCX,RDI
LAB_0015876a:
LEA RDI,[RAX + 0x20]
CMP byte ptr [RAX + 0x38],0x0
MOV RAX,RDI
JNZ 0x001586c4
JMP 0x00158780
LAB_0015877d:
MOV RDI,RAX
LAB_00158780:
MOVZX EDI,word ptr [RDI + 0x14]
ADD RDI,RCX
TEST SIL,0x2
JZ 0x001587ad
TEST byte ptr [RDI + -0x1],0x1
JZ 0x001587ad
MOVZX EAX,byte ptr [RDI]
LEA ECX,[RAX + -0xf8]
CMP EAX,0xf3
MOV EAX,0x1
CMOVNC RAX,RCX
ADD RDI,RAX
LAB_001587ad:
MOV EAX,EDX
ADD RAX,RDI
POP RBP
RET
|
byte * _ma_skip_pack_key(long param_1,byte param_2,uint param_3,byte *param_4)
{
char cVar1;
byte bVar2;
ushort uVar3;
long lVar4;
ulong uVar5;
uint uVar6;
long lVar7;
lVar4 = *(long *)(*(long *)(param_1 + 8) + 0xc0);
cVar1 = *(char *)(lVar4 + 0x18);
do {
if (cVar1 == '\0') {
param_4 = param_4 + *(ushort *)(lVar4 + 0x14);
if (((param_2 & 2) != 0) && ((param_4[-1] & 1) != 0)) {
uVar5 = 1;
if (0xf2 < *param_4) {
uVar5 = (ulong)(*param_4 - 0xf8);
}
param_4 = param_4 + uVar5;
}
return param_4 + param_3;
}
uVar3 = *(ushort *)(lVar4 + 0x12);
if ((uVar3 & 2) == 0) {
if (((uVar3 & 0x10) == 0) || (bVar2 = *param_4, param_4 = param_4 + 1, bVar2 != 0)) {
if ((uVar3 & 0x29) == 0) {
uVar5 = (ulong)*(ushort *)(lVar4 + 0x14);
}
else {
LAB_0015873f:
uVar5 = (ulong)*param_4;
if (uVar5 == 0xff) {
uVar5 = (ulong)(ushort)(*(ushort *)(param_4 + 1) << 8 | *(ushort *)(param_4 + 1) >> 8);
lVar7 = 3;
}
else {
lVar7 = 1;
}
param_4 = param_4 + lVar7;
}
param_4 = param_4 + uVar5;
}
}
else {
bVar2 = *param_4;
if (*(ushort *)(lVar4 + 0x14) < 0x7f) {
param_4 = param_4 + 1;
uVar6 = bVar2 & 0x7f;
}
else {
uVar6 = (bVar2 & 0x7f) << 8 | (uint)param_4[1];
param_4 = param_4 + 2;
}
if ((char)bVar2 < '\0') {
if (uVar6 != 0) goto LAB_0015873f;
}
else {
param_4 = param_4 + (uVar6 - (uVar6 != 0 & (byte)uVar3 >> 4));
}
}
cVar1 = *(char *)(lVar4 + 0x38);
lVar4 = lVar4 + 0x20;
} while( true );
}
|
|
14,517
|
allocate_full_pages
|
eloqsql/storage/maria/ma_bitmap.c
|
static ulong allocate_full_pages(MARIA_FILE_BITMAP *bitmap,
ulong pages_needed,
MARIA_BITMAP_BLOCK *block, my_bool full_page)
{
uchar *data, *data_end, *page_end;
uchar *best_data= 0;
uint min_size;
uint best_area_size, UNINIT_VAR(best_prefix_area_size);
uint page, size;
ulonglong UNINIT_VAR(best_prefix_bits);
DBUG_ENTER("allocate_full_pages");
DBUG_PRINT("enter", ("pages_needed: %lu", pages_needed));
min_size= pages_needed;
if (!full_page && min_size > BLOB_SEGMENT_MIN_SIZE)
min_size= BLOB_SEGMENT_MIN_SIZE;
best_area_size= ~(uint) 0;
data= bitmap->map + (bitmap->full_head_size/6)*6;
data_end= bitmap->map + bitmap->used_size;
page_end= bitmap->map + bitmap->total_size;
for (; data < page_end; data+= 6)
{
ulonglong bits= uint6korr(data); /* 6 bytes = 6*8/3= 16 patterns */
uchar *data_start;
ulonglong prefix_bits= 0;
uint area_size, prefix_area_size, suffix_area_size;
/* Find area with at least 16 free pages */
if (bits)
continue;
data_start= data;
/* Find size of area */
for (data+=6 ; data < data_end ; data+= 6)
{
if ((bits= uint6korr(data)))
break;
}
/*
Check if we are end of bitmap. In this case we know that
the rest of the bitmap is usable
*/
if (data >= data_end)
data= page_end;
area_size= (uint) (data - data_start) / 6 * 16;
if (area_size >= best_area_size)
continue;
prefix_area_size= suffix_area_size= 0;
if (!bits)
{
/*
End of page; All the rest of the bits on page are part of area
This is needed because bitmap->used_size only covers the set bits
in the bitmap.
*/
area_size+= (uint) (page_end - data) / 6 * 16;
if (area_size >= best_area_size)
break;
data= page_end;
}
else
{
/* Add bits at end of page */
for (; !(bits & 7); bits >>= 3)
suffix_area_size++;
area_size+= suffix_area_size;
}
if (data_start != bitmap->map)
{
/* Add bits before page */
bits= prefix_bits= uint6korr(data_start - 6);
DBUG_ASSERT(bits != 0);
/* 111 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 */
if (!(bits & 07000000000000000LL))
{
data_start-= 6;
do
{
prefix_area_size++;
bits<<= 3;
} while (!(bits & 07000000000000000LL));
area_size+= prefix_area_size;
/* Calculate offset to page from data_start */
prefix_area_size= 16 - prefix_area_size;
}
}
if (area_size >= min_size && area_size <= best_area_size)
{
best_data= data_start;
best_area_size= area_size;
best_prefix_bits= prefix_bits;
best_prefix_area_size= prefix_area_size;
/* Prefer to put data in biggest possible area */
if (area_size <= pages_needed)
min_size= area_size;
else
min_size= pages_needed;
}
}
if (!best_data)
DBUG_RETURN(0); /* No room on page */
/*
Now allocate MY_MIN(pages_needed, area_size), starting from
best_start + best_prefix_area_size
*/
if (best_area_size > pages_needed)
best_area_size= pages_needed;
/* For each 6 bytes we have 6*8/3= 16 patterns */
page= ((uint) (best_data - bitmap->map) * 8) / 3 + best_prefix_area_size;
block->page= bitmap->page + 1 + page;
block->page_count= best_area_size;
block->empty_space= 0;
block->sub_blocks= 0;
block->org_bitmap_value= 0;
block->used= 0;
DBUG_ASSERT(page + best_area_size < bitmap->pages_covered);
DBUG_PRINT("info", ("page: %lu page_count: %u",
(ulong) block->page, block->page_count));
if (best_prefix_area_size)
{
ulonglong tmp;
/* Convert offset back to bits */
best_prefix_area_size= 16 - best_prefix_area_size;
if (best_area_size < best_prefix_area_size)
{
tmp= (1LL << best_area_size*3) - 1;
best_area_size= best_prefix_area_size; /* for easy end test */
}
else
tmp= (1LL << best_prefix_area_size*3) - 1;
tmp<<= (16 - best_prefix_area_size) * 3;
DBUG_ASSERT((best_prefix_bits & tmp) == 0);
best_prefix_bits|= tmp;
int6store(best_data, best_prefix_bits);
if (!(best_area_size-= best_prefix_area_size))
goto end;
best_data+= 6;
}
best_area_size*= 3; /* Bits to set */
size= best_area_size/8; /* Bytes to set */
bfill(best_data, size, 255);
best_data+= size;
if ((best_area_size-= size * 8))
{
/* fill last uchar */
*best_data|= (uchar) ((1 << best_area_size) -1);
best_data++;
}
if (data_end < best_data)
{
bitmap->used_size= (uint) (best_data - bitmap->map);
DBUG_ASSERT(bitmap->used_size <= bitmap->total_size);
}
end:
bitmap->changed= 1;
DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap););
DBUG_RETURN(block->page_count);
}
|
O3
|
c
|
allocate_full_pages:
movl 0x28(%rdi), %eax
movl $0xaaaaaaab, %r8d # imm = 0xAAAAAAAB
imulq %r8, %rax
shrq $0x22, %rax
addl %eax, %eax
leal (%rax,%rax,2), %r9d
movl 0x128(%rdi), %eax
cmpl %eax, %r9d
jae 0x55707
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, -0x38(%rbp)
movq 0x8(%rdi), %r8
movq %rdi, -0x30(%rbp)
movl 0x24(%rdi), %ebx
addq %r8, %rbx
addq %r8, %rax
movl %r9d, %r12d
addq %r8, %r12
testb %cl, %cl
movl $0x80, %ecx
cmovnel %esi, %ecx
cmpq $0x81, %rsi
cmovbl %esi, %ecx
movl $0xffffffff, %r10d # imm = 0xFFFFFFFF
movq $0x0, -0x48(%rbp)
movabsq $0x1c0000000000, %r11 # imm = 0x1C0000000000
movq %rdx, -0x40(%rbp)
movl (%r12), %edi
movzwl 0x4(%r12), %r9d
orq %rdi, %r9
je 0x555ec
movq %r12, %r13
addq $0x6, %r13
movq %r13, %r12
cmpq %rax, %r13
jb 0x555c9
jmp 0x5570a
leaq 0x6(%r12), %r9
xorl %r13d, %r13d
leaq (%r9,%r13), %rdi
cmpq %rbx, %rdi
jae 0x55658
movl (%r9,%r13), %r15d
movzwl 0x4(%r9,%r13), %edi
shlq $0x20, %rdi
addq $0x6, %r13
orq %r15, %rdi
je 0x555f4
movl %r13d, %r14d
movl $0xaaaaaaab, %edx # imm = 0xAAAAAAAB
imulq %rdx, %r14
shrq $0x20, %r14
shll $0x2, %r14d
andl $-0x10, %r14d
addq %r12, %r13
cmpl %r10d, %r14d
jae 0x555db
xorl %r9d, %r9d
testb $0x7, %r15b
jne 0x55653
xorl %r9d, %r9d
movq %rdi, %r15
incl %r9d
shrq $0x3, %r15
testb $0x38, %dil
movq %r15, %rdi
je 0x55643
addl %r14d, %r9d
jmp 0x5567b
movl %eax, %r9d
subl %r12d, %r9d
movl $0xaaaaaaab, %edx # imm = 0xAAAAAAAB
imulq %rdx, %r9
shrq $0x20, %r9
shll $0x2, %r9d
andl $-0x10, %r9d
movq %rax, %r13
cmpl %r10d, %r9d
jae 0x556c3
xorl %edi, %edi
cmpq %r8, %r12
je 0x556cb
movl -0x6(%r12), %r15d
movzwl -0x2(%r12), %r14d
movq %r14, %rdx
shlq $0x20, %rdx
orq %r15, %rdx
cmpq $0x1fff, %r14 # imm = 0x1FFF
ja 0x556d0
addq $-0x6, %r12
xorl %edi, %edi
movq %rdx, %r15
leaq (,%r15,8), %r14
decl %edi
testq %r11, %r15
movq %r14, %r15
je 0x556a9
subl %edi, %r9d
addl $0x10, %edi
jmp 0x556d0
movq %rax, %r13
jmp 0x555db
movq %r8, %r12
xorl %edx, %edx
cmpl %ecx, %r9d
setb %r14b
cmpl %r10d, %r9d
seta %r15b
orb %r14b, %r15b
jne 0x555db
movl %r9d, %ecx
cmpq %rsi, %rcx
movl %r9d, %ecx
cmoval %esi, %ecx
movl %r9d, %r10d
movq %rdi, -0x40(%rbp)
movq %r12, -0x48(%rbp)
movq %rdx, -0x50(%rbp)
jmp 0x555db
xorl %eax, %eax
retq
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x55803
movl %r10d, %eax
cmpq %rsi, %rax
cmovbel %r10d, %esi
movl %edi, %eax
subl %r8d, %eax
shll $0x3, %eax
movl $0xaaaaaaab, %ecx # imm = 0xAAAAAAAB
imulq %rax, %rcx
shrq $0x21, %rcx
movq -0x40(%rbp), %r10
addl %r10d, %ecx
movq -0x30(%rbp), %r8
movq 0x10(%r8), %rax
addq %rcx, %rax
incq %rax
movq -0x38(%rbp), %r9
movq %rax, (%r9)
movl %esi, 0x8(%r9)
movq $0x0, 0xc(%r9)
movw $0x0, 0x14(%r9)
testl %r10d, %r10d
je 0x557ab
movl $0x10, %eax
subl %r10d, %eax
cmpl %eax, %esi
movl %eax, %ecx
cmovbl %esi, %ecx
leal (%rcx,%rcx,2), %ecx
movq $-0x1, %rdx
shlq %cl, %rdx
notq %rdx
leal (%r10,%r10,2), %ecx
shlq %cl, %rdx
orq -0x50(%rbp), %rdx
movl %edx, (%rdi)
shrq $0x20, %rdx
xorl %ecx, %ecx
movw %dx, 0x4(%rdi)
subl %eax, %esi
cmovbl %ecx, %esi
jbe 0x557f8
addq $0x6, %rdi
leal (%rsi,%rsi,2), %r12d
movl %r12d, %r13d
shrl $0x3, %r13d
movl $0xff, %esi
movq %r13, %rdx
movq %rdi, %r14
callq 0x292b0
movq %r14, %rdx
addq %r13, %rdx
andl $0x7, %r12d
je 0x557e3
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %r12d, %ecx
shll %cl, %eax
notb %al
orb %al, (%rdx)
incq %rdx
movq -0x38(%rbp), %r9
movq -0x30(%rbp), %r8
cmpq %rdx, %rbx
jae 0x557f8
subl 0x8(%r8), %edx
movl %edx, 0x24(%r8)
movb $0x1, 0x20(%r8)
movl 0x8(%r9), %eax
jmp 0x55805
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
allocate_full_pages:
mov eax, [rdi+28h]
mov r8d, 0AAAAAAABh
imul rax, r8
shr rax, 22h
add eax, eax
lea r9d, [rax+rax*2]
mov eax, [rdi+128h]
cmp r9d, eax
jnb loc_55707
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp-38h], rdx
mov r8, [rdi+8]
mov [rbp-30h], rdi
mov ebx, [rdi+24h]
add rbx, r8
add rax, r8
mov r12d, r9d
add r12, r8
test cl, cl
mov ecx, 80h
cmovnz ecx, esi
cmp rsi, 81h
cmovb ecx, esi
mov r10d, 0FFFFFFFFh
mov qword ptr [rbp-48h], 0
mov r11, 1C0000000000h
mov [rbp-40h], rdx
loc_555C9:
mov edi, [r12]
movzx r9d, word ptr [r12+4]
or r9, rdi
jz short loc_555EC
mov r13, r12
loc_555DB:
add r13, 6
mov r12, r13
cmp r13, rax
jb short loc_555C9
jmp loc_5570A
loc_555EC:
lea r9, [r12+6]
xor r13d, r13d
loc_555F4:
lea rdi, [r9+r13]
cmp rdi, rbx
jnb short loc_55658
mov r15d, [r9+r13]
movzx edi, word ptr [r9+r13+4]
shl rdi, 20h
add r13, 6
or rdi, r15
jz short loc_555F4
mov r14d, r13d
mov edx, 0AAAAAAABh
imul r14, rdx
shr r14, 20h
shl r14d, 2
and r14d, 0FFFFFFF0h
add r13, r12
cmp r14d, r10d
jnb short loc_555DB
xor r9d, r9d
test r15b, 7
jnz short loc_55653
xor r9d, r9d
mov r15, rdi
loc_55643:
inc r9d
shr r15, 3
test dil, 38h
mov rdi, r15
jz short loc_55643
loc_55653:
add r9d, r14d
jmp short loc_5567B
loc_55658:
mov r9d, eax
sub r9d, r12d
mov edx, 0AAAAAAABh
imul r9, rdx
shr r9, 20h
shl r9d, 2
and r9d, 0FFFFFFF0h
mov r13, rax
cmp r9d, r10d
jnb short loc_556C3
loc_5567B:
xor edi, edi
cmp r12, r8
jz short loc_556CB
mov r15d, [r12-6]
movzx r14d, word ptr [r12-2]
mov rdx, r14
shl rdx, 20h
or rdx, r15
cmp r14, 1FFFh
ja short loc_556D0
add r12, 0FFFFFFFFFFFFFFFAh
xor edi, edi
mov r15, rdx
loc_556A9:
lea r14, ds:0[r15*8]
dec edi
test r15, r11
mov r15, r14
jz short loc_556A9
sub r9d, edi
add edi, 10h
jmp short loc_556D0
loc_556C3:
mov r13, rax
jmp loc_555DB
loc_556CB:
mov r12, r8
xor edx, edx
loc_556D0:
cmp r9d, ecx
setb r14b
cmp r9d, r10d
setnbe r15b
or r15b, r14b
jnz loc_555DB
mov ecx, r9d
cmp rcx, rsi
mov ecx, r9d
cmova ecx, esi
mov r10d, r9d
mov [rbp-40h], rdi
mov [rbp-48h], r12
mov [rbp-50h], rdx
jmp loc_555DB
loc_55707:
xor eax, eax
retn
loc_5570A:
mov rdi, [rbp-48h]
test rdi, rdi
jz loc_55803
mov eax, r10d
cmp rax, rsi
cmovbe esi, r10d
mov eax, edi
sub eax, r8d
shl eax, 3
mov ecx, 0AAAAAAABh
imul rcx, rax
shr rcx, 21h
mov r10, [rbp-40h]
add ecx, r10d
mov r8, [rbp-30h]
mov rax, [r8+10h]
add rax, rcx
inc rax
mov r9, [rbp-38h]
mov [r9], rax
mov [r9+8], esi
mov qword ptr [r9+0Ch], 0
mov word ptr [r9+14h], 0
test r10d, r10d
jz short loc_557AB
mov eax, 10h
sub eax, r10d
cmp esi, eax
mov ecx, eax
cmovb ecx, esi
lea ecx, [rcx+rcx*2]
mov rdx, 0FFFFFFFFFFFFFFFFh
shl rdx, cl
not rdx
lea ecx, [r10+r10*2]
shl rdx, cl
or rdx, [rbp-50h]
mov [rdi], edx
shr rdx, 20h
xor ecx, ecx
mov [rdi+4], dx
sub esi, eax
cmovb esi, ecx
jbe short loc_557F8
add rdi, 6
loc_557AB:
lea r12d, [rsi+rsi*2]
mov r13d, r12d
shr r13d, 3
mov esi, 0FFh
mov rdx, r13
mov r14, rdi
call _memset
mov rdx, r14
add rdx, r13
and r12d, 7
jz short loc_557E3
mov eax, 0FFFFFFFFh
mov ecx, r12d
shl eax, cl
not al
or [rdx], al
inc rdx
loc_557E3:
mov r9, [rbp-38h]
mov r8, [rbp-30h]
cmp rbx, rdx
jnb short loc_557F8
sub edx, [r8+8]
mov [r8+24h], edx
loc_557F8:
mov byte ptr [r8+20h], 1
mov eax, [r9+8]
jmp short loc_55805
loc_55803:
xor eax, eax
loc_55805:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long allocate_full_pages(long long a1, unsigned long long a2, long long a3, char a4)
{
unsigned int v4; // r9d
long long v5; // rax
unsigned int *v6; // r8
unsigned long long v7; // rbx
unsigned long long v8; // rax
unsigned int *v9; // r12
bool v10; // zf
unsigned int v11; // ecx
unsigned int v12; // r10d
char *v13; // r13
char *v14; // r9
long long v15; // r13
long long v16; // r15
unsigned long long v17; // rdi
unsigned long long v18; // rdi
unsigned int v19; // r14d
int v20; // r9d
unsigned long long v21; // r15
unsigned int v22; // r9d
int v23; // edi
unsigned long long v24; // rdx
int v25; // edi
unsigned long long v26; // r15
unsigned int *v28; // rdi
long long v29; // rcx
long long v30; // r8
long long v31; // r9
unsigned int v32; // eax
char v33; // cl
long long v34; // rdx
bool v35; // cf
bool v36; // cc
long long v37; // r13
char *v38; // rdx
unsigned long long v39; // [rsp-58h] [rbp-58h]
unsigned int *v40; // [rsp-50h] [rbp-50h]
int v41; // [rsp-48h] [rbp-48h]
v4 = 6 * (*(_DWORD *)(a1 + 40) / 6u);
v5 = *(unsigned int *)(a1 + 296);
if ( v4 >= (unsigned int)v5 )
return 0LL;
v6 = *(unsigned int **)(a1 + 8);
v7 = (unsigned long long)v6 + *(unsigned int *)(a1 + 36);
v8 = (unsigned long long)v6 + v5;
v9 = (unsigned int *)((char *)v6 + v4);
v10 = a4 == 0;
v11 = 128;
if ( !v10 )
v11 = a2;
if ( a2 < 0x81 )
v11 = a2;
v12 = -1;
v40 = 0LL;
v41 = a3;
do
{
if ( *v9 | (unsigned long long)*((unsigned __int16 *)v9 + 2) )
{
v13 = (char *)v9;
}
else
{
v14 = (char *)v9 + 6;
v15 = 0LL;
while ( (unsigned long long)&v14[v15] < v7 )
{
v16 = *(unsigned int *)&v14[v15];
v17 = (unsigned long long)*(unsigned __int16 *)&v14[v15 + 4] << 32;
v15 += 6LL;
v18 = v16 | v17;
if ( v18 )
{
v19 = (4 * ((2863311531u * (unsigned long long)(unsigned int)v15) >> 32)) & 0xFFFFFFF0;
v13 = (char *)v9 + v15;
if ( v19 >= v12 )
goto LABEL_9;
v20 = 0;
if ( (v16 & 7) == 0 )
{
v20 = 0;
v21 = v18;
do
{
++v20;
v21 >>= 3;
v10 = (v18 & 0x38) == 0;
LOBYTE(v18) = v21;
}
while ( v10 );
}
v22 = v19 + v20;
goto LABEL_20;
}
}
v22 = (4 * ((2863311531u * (unsigned long long)(unsigned int)(v8 - (_DWORD)v9)) >> 32)) & 0xFFFFFFF0;
v13 = (char *)v8;
if ( v22 >= v12 )
{
v13 = (char *)v8;
goto LABEL_9;
}
LABEL_20:
v23 = 0;
if ( v9 == v6 )
{
v9 = v6;
v24 = 0LL;
}
else
{
v24 = *(unsigned int *)((char *)v9 - 6) | ((unsigned long long)*((unsigned __int16 *)v9 - 1) << 32);
if ( *((unsigned __int16 *)v9 - 1) <= 0x1FFFuLL )
{
v9 = (unsigned int *)((char *)v9 - 6);
v25 = 0;
v26 = v24;
do
{
--v25;
v10 = (v26 & 0x1C0000000000LL) == 0;
v26 *= 8LL;
}
while ( v10 );
v22 -= v25;
v23 = v25 + 16;
}
}
if ( v22 >= v11 && v22 <= v12 )
{
v11 = v22;
if ( v22 > a2 )
v11 = a2;
v12 = v22;
v41 = v23;
v40 = v9;
v39 = v24;
}
}
LABEL_9:
v9 = (unsigned int *)(v13 + 6);
}
while ( (unsigned long long)(v13 + 6) < v8 );
v28 = v40;
if ( v40 )
{
if ( v12 <= a2 )
LODWORD(a2) = v12;
v29 = v41 + 8 * ((int)v40 - (int)v6) / 3u;
v30 = a1;
v31 = a3;
*(_QWORD *)a3 = v29 + *(_QWORD *)(a1 + 16) + 1;
*(_DWORD *)(a3 + 8) = a2;
*(_QWORD *)(a3 + 12) = 0LL;
*(_WORD *)(a3 + 20) = 0;
if ( v41 )
{
v32 = 16 - v41;
v33 = 16 - v41;
if ( (unsigned int)a2 < 16 - v41 )
v33 = a2;
v34 = v39 | (~(-1LL << (3 * v33)) << (3 * (unsigned __int8)v41));
*v40 = v34;
*((_WORD *)v40 + 2) = WORD2(v34);
v35 = (unsigned int)a2 < v32;
LODWORD(a2) = a2 - v32;
v36 = v35 || (_DWORD)a2 == 0;
if ( v35 )
LODWORD(a2) = 0;
if ( v36 )
goto LABEL_46;
v28 = (unsigned int *)((char *)v40 + 6);
}
v37 = (unsigned int)(3 * a2) >> 3;
memset(v28, 255LL, v37);
v38 = (char *)v28 + v37;
if ( ((3 * (_BYTE)a2) & 7) != 0 )
*v38++ |= ~(unsigned __int8)(-1 << ((3 * a2) & 7));
v31 = a3;
v30 = a1;
if ( v7 < (unsigned long long)v38 )
*(_DWORD *)(a1 + 36) = (_DWORD)v38 - *(_DWORD *)(a1 + 8);
LABEL_46:
*(_BYTE *)(v30 + 32) = 1;
return *(unsigned int *)(v31 + 8);
}
return 0LL;
}
|
allocate_full_pages:
MOV EAX,dword ptr [RDI + 0x28]
MOV R8D,0xaaaaaaab
IMUL RAX,R8
SHR RAX,0x22
ADD EAX,EAX
LEA R9D,[RAX + RAX*0x2]
MOV EAX,dword ptr [RDI + 0x128]
CMP R9D,EAX
JNC 0x00155707
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x38],RDX
MOV R8,qword ptr [RDI + 0x8]
MOV qword ptr [RBP + -0x30],RDI
MOV EBX,dword ptr [RDI + 0x24]
ADD RBX,R8
ADD RAX,R8
MOV R12D,R9D
ADD R12,R8
TEST CL,CL
MOV ECX,0x80
CMOVNZ ECX,ESI
CMP RSI,0x81
CMOVC ECX,ESI
MOV R10D,0xffffffff
MOV qword ptr [RBP + -0x48],0x0
MOV R11,0x1c0000000000
MOV qword ptr [RBP + -0x40],RDX
LAB_001555c9:
MOV EDI,dword ptr [R12]
MOVZX R9D,word ptr [R12 + 0x4]
OR R9,RDI
JZ 0x001555ec
MOV R13,R12
LAB_001555db:
ADD R13,0x6
MOV R12,R13
CMP R13,RAX
JC 0x001555c9
JMP 0x0015570a
LAB_001555ec:
LEA R9,[R12 + 0x6]
XOR R13D,R13D
LAB_001555f4:
LEA RDI,[R9 + R13*0x1]
CMP RDI,RBX
JNC 0x00155658
MOV R15D,dword ptr [R9 + R13*0x1]
MOVZX EDI,word ptr [R9 + R13*0x1 + 0x4]
SHL RDI,0x20
ADD R13,0x6
OR RDI,R15
JZ 0x001555f4
MOV R14D,R13D
MOV EDX,0xaaaaaaab
IMUL R14,RDX
SHR R14,0x20
SHL R14D,0x2
AND R14D,0xfffffff0
ADD R13,R12
CMP R14D,R10D
JNC 0x001555db
XOR R9D,R9D
TEST R15B,0x7
JNZ 0x00155653
XOR R9D,R9D
MOV R15,RDI
LAB_00155643:
INC R9D
SHR R15,0x3
TEST DIL,0x38
MOV RDI,R15
JZ 0x00155643
LAB_00155653:
ADD R9D,R14D
JMP 0x0015567b
LAB_00155658:
MOV R9D,EAX
SUB R9D,R12D
MOV EDX,0xaaaaaaab
IMUL R9,RDX
SHR R9,0x20
SHL R9D,0x2
AND R9D,0xfffffff0
MOV R13,RAX
CMP R9D,R10D
JNC 0x001556c3
LAB_0015567b:
XOR EDI,EDI
CMP R12,R8
JZ 0x001556cb
MOV R15D,dword ptr [R12 + -0x6]
MOVZX R14D,word ptr [R12 + -0x2]
MOV RDX,R14
SHL RDX,0x20
OR RDX,R15
CMP R14,0x1fff
JA 0x001556d0
ADD R12,-0x6
XOR EDI,EDI
MOV R15,RDX
LAB_001556a9:
LEA R14,[R15*0x8]
DEC EDI
TEST R15,R11
MOV R15,R14
JZ 0x001556a9
SUB R9D,EDI
ADD EDI,0x10
JMP 0x001556d0
LAB_001556c3:
MOV R13,RAX
JMP 0x001555db
LAB_001556cb:
MOV R12,R8
XOR EDX,EDX
LAB_001556d0:
CMP R9D,ECX
SETC R14B
CMP R9D,R10D
SETA R15B
OR R15B,R14B
JNZ 0x001555db
MOV ECX,R9D
CMP RCX,RSI
MOV ECX,R9D
CMOVA ECX,ESI
MOV R10D,R9D
MOV qword ptr [RBP + -0x40],RDI
MOV qword ptr [RBP + -0x48],R12
MOV qword ptr [RBP + -0x50],RDX
JMP 0x001555db
LAB_00155707:
XOR EAX,EAX
RET
LAB_0015570a:
MOV RDI,qword ptr [RBP + -0x48]
TEST RDI,RDI
JZ 0x00155803
MOV EAX,R10D
CMP RAX,RSI
CMOVBE ESI,R10D
MOV EAX,EDI
SUB EAX,R8D
SHL EAX,0x3
MOV ECX,0xaaaaaaab
IMUL RCX,RAX
SHR RCX,0x21
MOV R10,qword ptr [RBP + -0x40]
ADD ECX,R10D
MOV R8,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [R8 + 0x10]
ADD RAX,RCX
INC RAX
MOV R9,qword ptr [RBP + -0x38]
MOV qword ptr [R9],RAX
MOV dword ptr [R9 + 0x8],ESI
MOV qword ptr [R9 + 0xc],0x0
MOV word ptr [R9 + 0x14],0x0
TEST R10D,R10D
JZ 0x001557ab
MOV EAX,0x10
SUB EAX,R10D
CMP ESI,EAX
MOV ECX,EAX
CMOVC ECX,ESI
LEA ECX,[RCX + RCX*0x2]
MOV RDX,-0x1
SHL RDX,CL
NOT RDX
LEA ECX,[R10 + R10*0x2]
SHL RDX,CL
OR RDX,qword ptr [RBP + -0x50]
MOV dword ptr [RDI],EDX
SHR RDX,0x20
XOR ECX,ECX
MOV word ptr [RDI + 0x4],DX
SUB ESI,EAX
CMOVC ESI,ECX
JBE 0x001557f8
ADD RDI,0x6
LAB_001557ab:
LEA R12D,[RSI + RSI*0x2]
MOV R13D,R12D
SHR R13D,0x3
MOV ESI,0xff
MOV RDX,R13
MOV R14,RDI
CALL 0x001292b0
MOV RDX,R14
ADD RDX,R13
AND R12D,0x7
JZ 0x001557e3
MOV EAX,0xffffffff
MOV ECX,R12D
SHL EAX,CL
NOT AL
OR byte ptr [RDX],AL
INC RDX
LAB_001557e3:
MOV R9,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x30]
CMP RBX,RDX
JNC 0x001557f8
SUB EDX,dword ptr [R8 + 0x8]
MOV dword ptr [R8 + 0x24],EDX
LAB_001557f8:
MOV byte ptr [R8 + 0x20],0x1
MOV EAX,dword ptr [R9 + 0x8]
JMP 0x00155805
LAB_00155803:
XOR EAX,EAX
LAB_00155805:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 allocate_full_pages(long param_1,ulong param_2,long *param_3,char param_4)
{
int *piVar1;
ulong uVar2;
long lVar3;
uint uVar4;
int *piVar5;
ulong uVar6;
byte *pbVar7;
byte *pbVar8;
int iVar9;
ulong uVar10;
long *plVar11;
int iVar12;
ulong uVar13;
uint uVar14;
int *piVar15;
int *piVar16;
ulong uVar17;
uint uVar18;
bool bVar19;
ulong local_58;
int *local_50;
long *local_48;
uVar14 = (*(uint *)(param_1 + 0x28) / 6) * 6;
if (*(uint *)(param_1 + 0x128) <= uVar14) {
return 0;
}
piVar1 = *(int **)(param_1 + 8);
pbVar8 = (byte *)((ulong)*(uint *)(param_1 + 0x24) + (long)piVar1);
piVar5 = (int *)((ulong)*(uint *)(param_1 + 0x128) + (long)piVar1);
piVar15 = (int *)((ulong)uVar14 + (long)piVar1);
uVar6 = 0x80;
if (param_4 != '\0') {
uVar6 = param_2 & 0xffffffff;
}
if (param_2 < 0x81) {
uVar6 = param_2 & 0xffffffff;
}
uVar13 = 0xffffffff;
local_50 = (int *)0x0;
local_48 = param_3;
do {
piVar16 = piVar15;
if ((short)piVar15[1] == 0 && *piVar15 == 0) {
uVar17 = 0;
do {
uVar14 = (uint)uVar13;
if (pbVar8 <= (byte *)((long)piVar15 + uVar17 + 6)) {
uVar18 = ((uint)((ulong)(uint)((int)piVar5 - (int)piVar15) * 0xaaaaaaab >> 0x20) &
0x3ffffffc) << 2;
piVar16 = piVar5;
if (uVar18 < uVar14) goto LAB_0015567b;
goto LAB_001555db;
}
uVar4 = *(uint *)((long)piVar15 + uVar17 + 6);
lVar3 = uVar17 + 10;
uVar17 = uVar17 + 6;
uVar10 = (ulong)CONCAT24(*(int2 *)((long)piVar15 + lVar3),uVar4);
} while (uVar10 == 0);
uVar18 = ((uint)((uVar17 & 0xffffffff) * 0xaaaaaaab >> 0x20) & 0x3ffffffc) * 4;
piVar16 = (int *)(uVar17 + (long)piVar15);
if (uVar18 < uVar14) {
iVar12 = 0;
if ((uVar4 & 7) == 0) {
iVar12 = 0;
do {
iVar12 = iVar12 + 1;
uVar17 = uVar10 & 0x38;
uVar10 = uVar10 >> 3;
} while (uVar17 == 0);
}
uVar18 = iVar12 + uVar18;
LAB_0015567b:
plVar11 = (long *)0x0;
if (piVar15 == piVar1) {
uVar17 = 0;
piVar15 = piVar1;
}
else {
uVar17 = (ulong)*(uint6 *)((long)piVar15 + -6);
if (*(ushort *)((long)piVar15 + -2) < 0x2000) {
uVar10 = uVar17;
iVar12 = 0;
do {
iVar9 = iVar12;
iVar12 = iVar9 + -1;
uVar2 = uVar10 & 0x1c0000000000;
uVar10 = uVar10 * 8;
} while (uVar2 == 0);
uVar18 = uVar18 - iVar12;
plVar11 = (long *)(ulong)(iVar9 + 0xf);
piVar15 = (int *)((long)piVar15 + -6);
}
}
if (uVar18 <= uVar14 && (uint)uVar6 <= uVar18) {
uVar6 = (ulong)uVar18;
if (param_2 < uVar18) {
uVar6 = param_2 & 0xffffffff;
}
uVar13 = (ulong)uVar18;
local_58 = uVar17;
local_50 = piVar15;
local_48 = plVar11;
}
}
}
LAB_001555db:
piVar15 = (int *)((long)piVar16 + 6);
} while (piVar15 < piVar5);
if (local_50 == (int *)0x0) {
return 0;
}
uVar14 = (uint)param_2;
if (uVar13 <= param_2) {
uVar14 = (uint)uVar13;
}
iVar12 = (int)local_48;
*param_3 = *(long *)(param_1 + 0x10) +
(ulong)((uint)(((int)local_50 - (int)piVar1) * 8) / 3 + iVar12) + 1;
*(uint *)(param_3 + 1) = uVar14;
*(int8 *)((long)param_3 + 0xc) = 0;
*(int2 *)((long)param_3 + 0x14) = 0;
if (iVar12 != 0) {
uVar4 = 0x10 - iVar12;
uVar18 = uVar4;
if (uVar14 < uVar4) {
uVar18 = uVar14;
}
uVar6 = ~(-1L << ((char)uVar18 * '\x03' & 0x3fU)) << ((char)local_48 * '\x03' & 0x3fU) |
local_58;
*local_50 = (int)uVar6;
*(short *)(local_50 + 1) = (short)(uVar6 >> 0x20);
bVar19 = uVar14 < uVar4;
uVar4 = uVar14 - uVar4;
uVar14 = uVar4;
if (bVar19) {
uVar14 = 0;
}
if (bVar19 || uVar4 == 0) goto LAB_001557f8;
local_50 = (int *)((long)local_50 + 6);
}
uVar6 = (ulong)(uVar14 * 3 >> 3);
memset(local_50,0xff,uVar6);
pbVar7 = (byte *)((long)local_50 + uVar6);
uVar14 = uVar14 * 3 & 7;
if (uVar14 != 0) {
*pbVar7 = *pbVar7 | ~(byte)(-1 << (sbyte)uVar14);
pbVar7 = pbVar7 + 1;
}
if (pbVar8 < pbVar7) {
*(int *)(param_1 + 0x24) = (int)pbVar7 - *(int *)(param_1 + 8);
}
LAB_001557f8:
*(int1 *)(param_1 + 0x20) = 1;
return (int)param_3[1];
}
|
|
14,518
|
my_numcells_cp932
|
eloqsql/strings/ctype-cp932.c
|
static
size_t my_numcells_cp932(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen= 0;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b >= 0xA1 && *b <= 0xDF)
{
clen++;
b++;
}
else if (*b > 0x7F)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
}
|
O3
|
c
|
my_numcells_cp932:
cmpq %rdx, %rsi
jae 0x2fb63
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0x1, %ecx
movb (%rsi), %dil
leal 0x5f(%rdi), %r8d
shrb $0x7, %dil
movzbl %dil, %edi
incq %rdi
cmpb $0x3f, %r8b
cmovbq %rcx, %rdi
addq %rdi, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0x2fb3c
popq %rbp
retq
xorl %eax, %eax
retq
|
my_numcells_cp932:
cmp rsi, rdx
jnb short loc_2FB63
push rbp
mov rbp, rsp
xor eax, eax
mov ecx, 1
loc_2FB3C:
mov dil, [rsi]
lea r8d, [rdi+5Fh]
shr dil, 7
movzx edi, dil
inc rdi
cmp r8b, 3Fh ; '?'
cmovb rdi, rcx
add rax, rdi
add rsi, rdi
cmp rsi, rdx
jb short loc_2FB3C
pop rbp
retn
loc_2FB63:
xor eax, eax
retn
|
long long my_numcells_cp932(long long a1, _BYTE *a2, unsigned long long a3)
{
long long result; // rax
long long v4; // rdi
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = (*a2 >> 7) + 1LL;
if ( (unsigned __int8)(*a2 + 95) < 0x3Fu )
v4 = 1LL;
result += v4;
a2 += v4;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
|
my_numcells_cp932:
CMP RSI,RDX
JNC 0x0012fb63
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
MOV ECX,0x1
LAB_0012fb3c:
MOV DIL,byte ptr [RSI]
LEA R8D,[RDI + 0x5f]
SHR DIL,0x7
MOVZX EDI,DIL
INC RDI
CMP R8B,0x3f
CMOVC RDI,RCX
ADD RAX,RDI
ADD RSI,RDI
CMP RSI,RDX
JC 0x0012fb3c
POP RBP
RET
LAB_0012fb63:
XOR EAX,EAX
RET
|
long my_numcells_cp932(int8 param_1,byte *param_2,byte *param_3)
{
long lVar1;
long lVar2;
if (param_2 < param_3) {
lVar1 = 0;
do {
lVar2 = (ulong)(*param_2 >> 7) + 1;
if ((byte)(*param_2 + 0x5f) < 0x3f) {
lVar2 = 1;
}
lVar1 = lVar1 + lVar2;
param_2 = param_2 + lVar2;
} while (param_2 < param_3);
return lVar1;
}
return 0;
}
|
|
14,519
|
minja::MacroTemplateToken::~MacroTemplateToken()
|
monkey531[P]llama/common/minja.hpp
|
MacroTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p)
: TemplateToken(Type::Macro, location, pre, post), name(std::move(n)), params(std::move(p)) {}
|
O3
|
cpp
|
minja::MacroTemplateToken::~MacroTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x9168f(%rip), %rax # 0x12cdd8
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x40, %rdi
callq 0x8744c
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x9b767
callq 0x70324
leaq 0x90b7a(%rip), %rax # 0x12c2e8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x9b784
popq %rbx
jmp 0x70324
popq %rbx
retq
|
_ZN5minja18MacroTemplateTokenD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja18MacroTemplateTokenE; `vtable for'minja::MacroTemplateToken
add rax, 10h
mov [rdi], rax
add rdi, 40h ; '@'
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EED2Ev; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::~vector()
mov rdi, [rbx+38h]
test rdi, rdi
jz short loc_9B767
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9B767:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_9B784
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9B784:
pop rbx
retn
|
void minja::MacroTemplateToken::~MacroTemplateToken(minja::MacroTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::MacroTemplateToken + 2;
std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::~vector((_QWORD *)this + 8);
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateToken + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 3);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
|
~MacroTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22cdd8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
ADD RDI,0x40
CALL 0x0018744c
MOV RDI,qword ptr [RBX + 0x38]
TEST RDI,RDI
JZ 0x0019b767
CALL 0x00170324
LAB_0019b767:
LEA RAX,[0x22c2e8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0019b784
POP RBX
JMP 0x00170324
LAB_0019b784:
POP RBX
RET
|
/* minja::MacroTemplateToken::~MacroTemplateToken() */
void __thiscall minja::MacroTemplateToken::~MacroTemplateToken(MacroTemplateToken *this)
{
*(int ***)this = &PTR__MacroTemplateToken_0022cde8;
std::
vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>
::~vector((vector<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::__cxx11::string,std::shared_ptr<minja::Expression>>>>
*)(this + 0x40));
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
*(int ***)this = &PTR__TemplateToken_0022c2f8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18));
return;
}
return;
}
|
|
14,520
|
check_rules
|
eloqsql/strings/ctype-uca.c
|
static int
check_rules(MY_CHARSET_LOADER *loader,
const MY_COLL_RULES *rules,
const MY_UCA_WEIGHT_LEVEL *dst, const MY_UCA_WEIGHT_LEVEL *src)
{
const MY_COLL_RULE *r, *rlast;
for (r= rules->rule, rlast= rules->rule + rules->nrules; r < rlast; r++)
{
if (r->curr[0] > dst->maxchar)
{
my_snprintf(loader->error, sizeof(loader->error),
"Shift character out of range: u%04X", (uint) r->curr[0]);
return TRUE;
}
else if (r->base[0] > src->maxchar)
{
my_snprintf(loader->error, sizeof(loader->error),
"Reset character out of range: u%04X", (uint) r->base[0]);
return TRUE;
}
}
return FALSE;
}
|
O0
|
c
|
check_rules:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
imulq $0xa0, 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x4fcc8
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x4fc78
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
movl %eax, %ecx
movl $0x80, %esi
leaq 0x2bf63(%rip), %rdx # 0x7bbcb
movb $0x0, %al
callq 0x76430
movl $0x1, -0x4(%rbp)
jmp 0x4fccf
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0x4fcb1
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movl $0x80, %esi
leaq 0x2bf4e(%rip), %rdx # 0x7bbef
movb $0x0, %al
callq 0x76430
movl $0x1, -0x4(%rbp)
jmp 0x4fccf
jmp 0x4fcb3
jmp 0x4fcb5
movq -0x30(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x30(%rbp)
jmp 0x4fc2f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
check_rules:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov rcx, [rbp+var_18]
imul rcx, [rcx+10h], 0A0h
add rax, rcx
mov [rbp+var_38], rax
loc_4FC2F:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_4FCC8
mov rax, [rbp+var_30]
mov rax, [rax+50h]
mov rcx, [rbp+var_20]
cmp rax, [rcx]
jbe short loc_4FC78
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rax, [rax+50h]
mov ecx, eax
mov esi, 80h
lea rdx, aShiftCharacter; "Shift character out of range: u%04X"
mov al, 0
call my_snprintf
mov [rbp+var_4], 1
jmp short loc_4FCCF
loc_4FC78:
mov rax, [rbp+var_30]
mov rax, [rax]
mov rcx, [rbp+var_28]
cmp rax, [rcx]
jbe short loc_4FCB1
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, eax
mov esi, 80h
lea rdx, aResetCharacter; "Reset character out of range: u%04X"
mov al, 0
call my_snprintf
mov [rbp+var_4], 1
jmp short loc_4FCCF
loc_4FCB1:
jmp short $+2
loc_4FCB3:
jmp short $+2
loc_4FCB5:
mov rax, [rbp+var_30]
add rax, 0A0h
mov [rbp+var_30], rax
jmp loc_4FC2F
loc_4FCC8:
mov [rbp+var_4], 0
loc_4FCCF:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long check_rules(int a1, long long a2, _QWORD *a3, _QWORD *a4, int a5, int a6)
{
_QWORD *i; // [rsp+10h] [rbp-30h]
for ( i = *(_QWORD **)(a2 + 32); (unsigned long long)i < 160LL * *(_QWORD *)(a2 + 16) + *(_QWORD *)(a2 + 32); i += 20 )
{
if ( i[10] > *a3 )
{
my_snprintf(a1, 128, (unsigned int)"Shift character out of range: u%04X", i[10], a5, a6);
return 1;
}
if ( *i > *a4 )
{
my_snprintf(a1, 128, (unsigned int)"Reset character out of range: u%04X", *i, a5, a6);
return 1;
}
}
return 0;
}
|
check_rules:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
IMUL RCX,qword ptr [RCX + 0x10],0xa0
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_0014fc2f:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0014fcc8
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
MOV RCX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX]
JBE 0x0014fc78
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
MOV ECX,EAX
MOV ESI,0x80
LEA RDX,[0x17bbcb]
MOV AL,0x0
CALL 0x00176430
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014fccf
LAB_0014fc78:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX]
JBE 0x0014fcb1
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV ESI,0x80
LEA RDX,[0x17bbef]
MOV AL,0x0
CALL 0x00176430
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014fccf
LAB_0014fcb1:
JMP 0x0014fcb3
LAB_0014fcb3:
JMP 0x0014fcb5
LAB_0014fcb5:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0xa0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0014fc2f
LAB_0014fcc8:
MOV dword ptr [RBP + -0x4],0x0
LAB_0014fccf:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 check_rules(int8 param_1,long param_2,ulong *param_3,ulong *param_4)
{
ulong *local_38;
local_38 = *(ulong **)(param_2 + 0x20);
while( true ) {
if ((ulong *)(*(long *)(param_2 + 0x20) + *(long *)(param_2 + 0x10) * 0xa0) <= local_38) {
return 0;
}
if (*param_3 < local_38[10]) break;
if (*param_4 < *local_38) {
my_snprintf(param_1,0x80,"Reset character out of range: u%04X",*local_38 & 0xffffffff);
return 1;
}
local_38 = local_38 + 0x14;
}
my_snprintf(param_1,0x80,"Shift character out of range: u%04X",local_38[10] & 0xffffffff);
return 1;
}
|
|
14,521
|
process_str_arg
|
eloqsql/strings/my_vsnprintf.c
|
static char *process_str_arg(CHARSET_INFO *cs, char *to, const char *end,
longlong length_arg, size_t width, char *par,
uint print_type, my_bool nice_cut)
{
int well_formed_error;
uint dots= 0;
size_t plen, left_len= (size_t) (end - to) + 1, slen=0;
my_bool left_fill= 1;
size_t length;
/*
The sign of the length argument specific the string should be right
or left adjusted
*/
if (length_arg < 0)
{
length= (size_t) -length_arg;
left_fill= 0;
}
else
length= (size_t) length_arg;
if (!par)
par = (char*) "(null)";
if (nice_cut)
{
plen= slen= strnlen(par, width + 1);
if (plen > width)
plen= width;
if (left_len <= plen)
{
plen = left_len - 1;
length= plen;
}
if ((slen > plen))
{
if (plen < 3)
{
dots= (uint) plen;
plen= 0;
}
else
{
dots= 3;
plen-= 3;
}
}
}
else
{
plen= slen= strnlen(par, width);
dots= 0;
if (left_len <= plen)
{
plen = left_len - 1;
length= plen;
}
}
plen= my_well_formed_length(cs, par, par + plen, width, &well_formed_error);
if (print_type & ESCAPED_ARG)
{
const char *org_to= to;
to= backtick_string(cs, to, end, par, plen + dots, '`', MY_TEST(dots));
plen= (size_t) (to - org_to);
dots= 0;
}
else
{
if (left_fill)
{
if (plen + dots < length)
to= strfill(to, length - plen - dots, ' ');
}
to= strnmov(to,par,plen);
if (dots)
to= strfill(to, dots, '.');
}
if (!left_fill && plen + dots < length)
to= strfill(to, length - plen - dots, ' ');
return to;
}
|
O0
|
c
|
process_str_arg:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb 0x18(%rbp), %al
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movb $0x1, -0x51(%rbp)
cmpq $0x0, -0x20(%rbp)
jge 0x75cf3
xorl %eax, %eax
subq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movb $0x0, -0x51(%rbp)
jmp 0x75cfb
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x75d0d
leaq 0x60b3(%rip), %rax # 0x7bdbc
movq %rax, -0x30(%rbp)
cmpb $0x0, 0x18(%rbp)
je 0x75d99
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x1, %rsi
callq 0x244b0
movq %rax, -0x50(%rbp)
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x75d42
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x75d60
movq -0x48(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x40(%rbp), %rax
jbe 0x75d97
cmpq $0x3, -0x40(%rbp)
jae 0x75d82
movq -0x40(%rbp), %rax
movl %eax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
jmp 0x75d95
movl $0x3, -0x38(%rbp)
movq -0x40(%rbp), %rax
subq $0x3, %rax
movq %rax, -0x40(%rbp)
jmp 0x75d97
jmp 0x75dd5
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x244b0
movq %rax, -0x50(%rbp)
movq %rax, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x75dd3
movq -0x48(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x75dd5
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x30(%rbp), %rdx
addq -0x40(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x34(%rbp), %r8
callq 0x767f0
movq %rax, -0x40(%rbp)
movl 0x10(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x75e64
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %r8
movl -0x38(%rbp), %eax
addq %rax, %r8
movl -0x38(%rbp), %r10d
xorl %eax, %eax
movl $0x1, %r9d
cmpl $0x0, %r10d
cmovnel %r9d, %eax
movl $0x60, %r9d
movsbl %al, %eax
movl %eax, (%rsp)
callq 0x76850
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x68(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
jmp 0x75ed0
cmpb $0x0, -0x51(%rbp)
je 0x75e9c
movq -0x40(%rbp), %rax
movl -0x38(%rbp), %ecx
addq %rcx, %rax
cmpq -0x60(%rbp), %rax
jae 0x75e9a
movq -0x10(%rbp), %rdi
movq -0x60(%rbp), %rsi
subq -0x40(%rbp), %rsi
movl -0x38(%rbp), %eax
subq %rax, %rsi
movl $0x20, %edx
callq 0x76f10
movq %rax, -0x10(%rbp)
jmp 0x75e9c
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x76fd0
movq %rax, -0x10(%rbp)
cmpl $0x0, -0x38(%rbp)
je 0x75ece
movq -0x10(%rbp), %rdi
movl -0x38(%rbp), %eax
movl %eax, %esi
movl $0x2e, %edx
callq 0x76f10
movq %rax, -0x10(%rbp)
jmp 0x75ed0
cmpb $0x0, -0x51(%rbp)
jne 0x75f06
movq -0x40(%rbp), %rax
movl -0x38(%rbp), %ecx
addq %rcx, %rax
cmpq -0x60(%rbp), %rax
jae 0x75f06
movq -0x10(%rbp), %rdi
movq -0x60(%rbp), %rsi
subq -0x40(%rbp), %rsi
movl -0x38(%rbp), %eax
subq %rax, %rsi
movl $0x20, %edx
callq 0x76f10
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
|
process_str_arg:
push rbp
mov rbp, rsp
sub rsp, 70h
mov al, [rbp+arg_8]
mov eax, [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 [rbp+var_38], 0
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
add rax, 1
mov [rbp+var_48], rax
mov [rbp+var_50], 0
mov [rbp+var_51], 1
cmp [rbp+var_20], 0
jge short loc_75CF3
xor eax, eax
sub rax, [rbp+var_20]
mov [rbp+var_60], rax
mov [rbp+var_51], 0
jmp short loc_75CFB
loc_75CF3:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
loc_75CFB:
cmp [rbp+var_30], 0
jnz short loc_75D0D
lea rax, aNull; "(null)"
mov [rbp+var_30], rax
loc_75D0D:
cmp [rbp+arg_8], 0
jz loc_75D99
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_28]
add rsi, 1
call _strnlen
mov [rbp+var_50], rax
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
cmp rax, [rbp+var_28]
jbe short loc_75D42
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
loc_75D42:
mov rax, [rbp+var_48]
cmp rax, [rbp+var_40]
ja short loc_75D60
mov rax, [rbp+var_48]
sub rax, 1
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
loc_75D60:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_40]
jbe short loc_75D97
cmp [rbp+var_40], 3
jnb short loc_75D82
mov rax, [rbp+var_40]
mov [rbp+var_38], eax
mov [rbp+var_40], 0
jmp short loc_75D95
loc_75D82:
mov [rbp+var_38], 3
mov rax, [rbp+var_40]
sub rax, 3
mov [rbp+var_40], rax
loc_75D95:
jmp short $+2
loc_75D97:
jmp short loc_75DD5
loc_75D99:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_28]
call _strnlen
mov [rbp+var_50], rax
mov [rbp+var_40], rax
mov [rbp+var_38], 0
mov rax, [rbp+var_48]
cmp rax, [rbp+var_40]
ja short loc_75DD3
mov rax, [rbp+var_48]
sub rax, 1
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
loc_75DD3:
jmp short $+2
loc_75DD5:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_30]
add rdx, [rbp+var_40]
mov rcx, [rbp+var_28]
lea r8, [rbp+var_34]
call my_well_formed_length_0
mov [rbp+var_40], rax
mov eax, [rbp+arg_0]
and eax, 8
cmp eax, 0
jz short loc_75E64
mov rax, [rbp+var_10]
mov [rbp+var_68], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_30]
mov r8, [rbp+var_40]
mov eax, [rbp+var_38]
add r8, rax
mov r10d, [rbp+var_38]
xor eax, eax
mov r9d, 1
cmp r10d, 0
cmovnz eax, r9d
mov r9d, 60h ; '`'
movsx eax, al
mov [rsp+70h+var_70], eax
call backtick_string
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rcx, [rbp+var_68]
sub rax, rcx
mov [rbp+var_40], rax
mov [rbp+var_38], 0
jmp short loc_75ED0
loc_75E64:
cmp [rbp+var_51], 0
jz short loc_75E9C
mov rax, [rbp+var_40]
mov ecx, [rbp+var_38]
add rax, rcx
cmp rax, [rbp+var_60]
jnb short loc_75E9A
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_60]
sub rsi, [rbp+var_40]
mov eax, [rbp+var_38]
sub rsi, rax
mov edx, 20h ; ' '
call strfill
mov [rbp+var_10], rax
loc_75E9A:
jmp short $+2
loc_75E9C:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_40]
call strnmov
mov [rbp+var_10], rax
cmp [rbp+var_38], 0
jz short loc_75ECE
mov rdi, [rbp+var_10]
mov eax, [rbp+var_38]
mov esi, eax
mov edx, 2Eh ; '.'
call strfill
mov [rbp+var_10], rax
loc_75ECE:
jmp short $+2
loc_75ED0:
cmp [rbp+var_51], 0
jnz short loc_75F06
mov rax, [rbp+var_40]
mov ecx, [rbp+var_38]
add rax, rcx
cmp rax, [rbp+var_60]
jnb short loc_75F06
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_60]
sub rsi, [rbp+var_40]
mov eax, [rbp+var_38]
sub rsi, rax
mov edx, 20h ; ' '
call strfill
mov [rbp+var_10], rax
loc_75F06:
mov rax, [rbp+var_10]
add rsp, 70h
pop rbp
retn
|
long long process_str_arg(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned long long a5,
const char *a6,
char a7,
char a8)
{
long long v9; // [rsp+8h] [rbp-68h]
unsigned long long v10; // [rsp+10h] [rbp-60h]
char v11; // [rsp+1Fh] [rbp-51h]
unsigned long long v12; // [rsp+20h] [rbp-50h]
unsigned long long v13; // [rsp+28h] [rbp-48h]
unsigned long long v14; // [rsp+30h] [rbp-40h]
long long v15; // [rsp+30h] [rbp-40h]
unsigned int v16; // [rsp+38h] [rbp-38h]
char v17[4]; // [rsp+3Ch] [rbp-34h] BYREF
const char *v18; // [rsp+40h] [rbp-30h]
unsigned long long v19; // [rsp+48h] [rbp-28h]
long long v20; // [rsp+50h] [rbp-20h]
long long v21; // [rsp+58h] [rbp-18h]
long long v22; // [rsp+60h] [rbp-10h]
long long v23; // [rsp+68h] [rbp-8h]
v23 = a1;
v22 = a2;
v21 = a3;
v20 = a4;
v19 = a5;
v18 = a6;
v16 = 0;
v13 = a3 - a2 + 1;
v11 = 1;
if ( a4 >= 0 )
{
v10 = v20;
}
else
{
v10 = -v20;
v11 = 0;
}
if ( !v18 )
v18 = "(null)";
if ( a8 )
{
v12 = strnlen(v18, v19 + 1);
v14 = v12;
if ( v12 > v19 )
v14 = v19;
if ( v13 <= v14 )
{
v14 = v13 - 1;
v10 = v13 - 1;
}
if ( v12 > v14 )
{
if ( v14 >= 3 )
{
v16 = 3;
v14 -= 3LL;
}
else
{
v16 = v14;
v14 = 0LL;
}
}
}
else
{
v14 = strnlen(v18, v19);
v16 = 0;
if ( v13 <= v14 )
{
v14 = v13 - 1;
v10 = v13 - 1;
}
}
v15 = my_well_formed_length_0(v23, v18, &v18[v14], v19, v17);
if ( (a7 & 8) != 0 )
{
v9 = v22;
v22 = backtick_string(v23, v22, v21, (_DWORD)v18, v16 + (unsigned int)v15, 96, v16 != 0);
v15 = v22 - v9;
v16 = 0;
}
else
{
if ( v11 && (unsigned long long)v16 + v15 < v10 )
v22 = strfill(v22, v10 - v15 - v16, 32LL);
v22 = strnmov(v22, v18, v15);
if ( v16 )
v22 = strfill(v22, v16, 46LL);
}
if ( !v11 && (unsigned long long)v16 + v15 < v10 )
return strfill(v22, v10 - v15 - v16, 32LL);
return v22;
}
|
process_str_arg:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV AL,byte ptr [RBP + 0x18]
MOV EAX,dword 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 dword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV qword ptr [RBP + -0x50],0x0
MOV byte ptr [RBP + -0x51],0x1
CMP qword ptr [RBP + -0x20],0x0
JGE 0x00175cf3
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV byte ptr [RBP + -0x51],0x0
JMP 0x00175cfb
LAB_00175cf3:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
LAB_00175cfb:
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00175d0d
LEA RAX,[0x17bdbc]
MOV qword ptr [RBP + -0x30],RAX
LAB_00175d0d:
CMP byte ptr [RBP + 0x18],0x0
JZ 0x00175d99
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x1
CALL 0x001244b0
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00175d42
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
LAB_00175d42:
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x00175d60
MOV RAX,qword ptr [RBP + -0x48]
SUB RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x60],RAX
LAB_00175d60:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x40]
JBE 0x00175d97
CMP qword ptr [RBP + -0x40],0x3
JNC 0x00175d82
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x38],EAX
MOV qword ptr [RBP + -0x40],0x0
JMP 0x00175d95
LAB_00175d82:
MOV dword ptr [RBP + -0x38],0x3
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
LAB_00175d95:
JMP 0x00175d97
LAB_00175d97:
JMP 0x00175dd5
LAB_00175d99:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001244b0
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x00175dd3
MOV RAX,qword ptr [RBP + -0x48]
SUB RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x60],RAX
LAB_00175dd3:
JMP 0x00175dd5
LAB_00175dd5:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x30]
ADD RDX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
LEA R8,[RBP + -0x34]
CALL 0x001767f0
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00175e64
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
MOV R8,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x38]
ADD R8,RAX
MOV R10D,dword ptr [RBP + -0x38]
XOR EAX,EAX
MOV R9D,0x1
CMP R10D,0x0
CMOVNZ EAX,R9D
MOV R9D,0x60
MOVSX EAX,AL
MOV dword ptr [RSP],EAX
CALL 0x00176850
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x68]
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x38],0x0
JMP 0x00175ed0
LAB_00175e64:
CMP byte ptr [RBP + -0x51],0x0
JZ 0x00175e9c
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x38]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x60]
JNC 0x00175e9a
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x60]
SUB RSI,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x38]
SUB RSI,RAX
MOV EDX,0x20
CALL 0x00176f10
MOV qword ptr [RBP + -0x10],RAX
LAB_00175e9a:
JMP 0x00175e9c
LAB_00175e9c:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x00176fd0
MOV qword ptr [RBP + -0x10],RAX
CMP dword ptr [RBP + -0x38],0x0
JZ 0x00175ece
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x38]
MOV ESI,EAX
MOV EDX,0x2e
CALL 0x00176f10
MOV qword ptr [RBP + -0x10],RAX
LAB_00175ece:
JMP 0x00175ed0
LAB_00175ed0:
CMP byte ptr [RBP + -0x51],0x0
JNZ 0x00175f06
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x38]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x60]
JNC 0x00175f06
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x60]
SUB RSI,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x38]
SUB RSI,RAX
MOV EDX,0x20
CALL 0x00176f10
MOV qword ptr [RBP + -0x10],RAX
LAB_00175f06:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x70
POP RBP
RET
|
long process_str_arg(int8 param_1,long param_2,long param_3,size_t param_4,size_t param_5,
char *param_6,uint param_7,char param_8)
{
long lVar1;
size_t sVar2;
size_t sVar3;
bool bVar4;
size_t local_68;
size_t local_48;
uint local_40;
int1 local_3c [4];
char *local_38;
ulong local_30;
size_t local_28;
long local_20;
long local_18;
int8 local_10;
local_40 = 0;
sVar2 = param_3 - param_2;
bVar4 = -1 < (long)param_4;
local_68 = param_4;
if (!bVar4) {
local_68 = -param_4;
}
local_38 = param_6;
if (param_6 == (char *)0x0) {
local_38 = "(null)";
}
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if (param_8 == '\0') {
local_48 = strnlen(local_38,param_5);
local_40 = 0;
if (sVar2 + 1 <= local_48) {
local_68 = sVar2;
local_48 = sVar2;
}
}
else {
sVar3 = strnlen(local_38,param_5 + 1);
local_48 = sVar3;
if (local_30 < sVar3) {
local_48 = local_30;
}
if (sVar2 + 1 <= local_48) {
local_68 = sVar2;
local_48 = sVar2;
}
if (local_48 < sVar3) {
if (local_48 < 3) {
local_40 = (uint)local_48;
local_48 = 0;
}
else {
local_40 = 3;
local_48 = local_48 - 3;
}
}
}
local_48 = my_well_formed_length(local_10,local_38,local_38 + local_48,local_30,local_3c);
lVar1 = local_18;
if ((param_7 & 8) == 0) {
if ((bVar4) && (local_48 + local_40 < local_68)) {
local_18 = strfill(local_18,(local_68 - local_48) - (ulong)local_40,0x20);
}
local_18 = strnmov(local_18,local_38,local_48);
if (local_40 != 0) {
local_18 = strfill(local_18,local_40,0x2e);
}
}
else {
local_18 = backtick_string(local_10,local_18,local_20,local_38,local_48 + local_40,0x60,
local_40 != 0);
local_48 = local_18 - lVar1;
local_40 = 0;
}
if ((!bVar4) && (local_48 + local_40 < local_68)) {
local_18 = strfill(local_18,(local_68 - local_48) - (ulong)local_40,0x20);
}
return local_18;
}
|
|
14,522
|
cr_add_interval
|
bluesky950520[P]quickjs/libunicode.h
|
static inline int cr_add_interval(CharRange *cr, uint32_t c1, uint32_t c2)
{
if ((cr->len + 2) > cr->size) {
if (cr_realloc(cr, cr->len + 2))
return -1;
}
cr->points[cr->len++] = c1;
cr->points[cr->len++] = c2;
return 0;
}
|
O2
|
c
|
cr_add_interval:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl (%rdi), %eax
leal 0x2(%rax), %esi
cmpl 0x4(%rdi), %esi
jle 0x800c2
movq %r14, %rdi
callq 0x7f42c
testl %eax, %eax
je 0x800bf
pushq $-0x1
popq %rax
jmp 0x800df
movl (%r14), %eax
movq 0x8(%r14), %rcx
leal 0x1(%rax), %edx
movl %edx, (%r14)
cltq
movl %ebp, (%rcx,%rax,4)
movslq (%r14), %rax
leal 0x1(%rax), %edx
movl %edx, (%r14)
movl %ebx, (%rcx,%rax,4)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
|
cr_add_interval:
push rbp
push r14
push rbx
mov ebx, edx
mov ebp, esi
mov r14, rdi
mov eax, [rdi]
lea esi, [rax+2]
cmp esi, [rdi+4]
jle short loc_800C2
mov rdi, r14
call cr_realloc
test eax, eax
jz short loc_800BF
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp short loc_800DF
loc_800BF:
mov eax, [r14]
loc_800C2:
mov rcx, [r14+8]
lea edx, [rax+1]
mov [r14], edx
cdqe
mov [rcx+rax*4], ebp
movsxd rax, dword ptr [r14]
lea edx, [rax+1]
mov [r14], edx
mov [rcx+rax*4], ebx
xor eax, eax
loc_800DF:
pop rbx
pop r14
pop rbp
retn
|
long long cr_add_interval(int *a1, int a2, int a3)
{
int v5; // eax
int v6; // esi
long long v8; // rcx
long long v9; // rax
v5 = *a1;
v6 = *a1 + 2;
if ( v6 > a1[1] )
{
if ( (unsigned int)cr_realloc((long long)a1, v6) )
return -1LL;
v5 = *a1;
}
v8 = *((_QWORD *)a1 + 1);
*a1 = v5 + 1;
*(_DWORD *)(v8 + 4LL * v5) = a2;
v9 = *a1;
*a1 = v9 + 1;
*(_DWORD *)(v8 + 4 * v9) = a3;
return 0LL;
}
|
cr_add_interval:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBX,EDX
MOV EBP,ESI
MOV R14,RDI
MOV EAX,dword ptr [RDI]
LEA ESI,[RAX + 0x2]
CMP ESI,dword ptr [RDI + 0x4]
JLE 0x001800c2
MOV RDI,R14
CALL 0x0017f42c
TEST EAX,EAX
JZ 0x001800bf
PUSH -0x1
POP RAX
JMP 0x001800df
LAB_001800bf:
MOV EAX,dword ptr [R14]
LAB_001800c2:
MOV RCX,qword ptr [R14 + 0x8]
LEA EDX,[RAX + 0x1]
MOV dword ptr [R14],EDX
CDQE
MOV dword ptr [RCX + RAX*0x4],EBP
MOVSXD RAX,dword ptr [R14]
LEA EDX,[RAX + 0x1]
MOV dword ptr [R14],EDX
MOV dword ptr [RCX + RAX*0x4],EBX
XOR EAX,EAX
LAB_001800df:
POP RBX
POP R14
POP RBP
RET
|
int8 cr_add_interval(int *param_1,int4 param_2,int4 param_3)
{
long lVar1;
int iVar2;
iVar2 = *param_1;
if (param_1[1] < iVar2 + 2) {
iVar2 = cr_realloc(param_1);
if (iVar2 != 0) {
return 0xffffffffffffffff;
}
iVar2 = *param_1;
}
lVar1 = *(long *)(param_1 + 2);
*param_1 = iVar2 + 1;
*(int4 *)(lVar1 + (long)iVar2 * 4) = param_2;
iVar2 = *param_1;
*param_1 = iVar2 + 1;
*(int4 *)(lVar1 + (long)iVar2 * 4) = param_3;
return 0;
}
|
|
14,523
|
ps_fetch_int32
|
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
|
static
void ps_fetch_int32(MYSQL_BIND *r_param, const MYSQL_FIELD * const field,
unsigned char **row)
{
switch (r_param->buffer_type) {
/* case MYSQL_TYPE_TINY:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 1);
break;
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_SHORT:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 2);
break; */
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_LONG:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 4);
break;
default:
{
int32 sval= sint4korr(*row);
longlong lval= field->flags & UNSIGNED_FLAG ? (longlong)(uint32) sval : (longlong)sval;
convert_from_long(r_param, field, lval, field->flags & UNSIGNED_FLAG);
(*row) += 4;
}
break;
}
}
|
O3
|
c
|
ps_fetch_int32:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl 0x60(%rdi), %eax
cmpl $0x9, %eax
je 0x28b01
cmpl $0x3, %eax
jne 0x28b14
movq %rbx, %rdx
movl $0x4, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x27ee4
movq (%rbx), %rax
movslq (%rax), %rax
movl 0x64(%rsi), %ecx
andl $0x20, %ecx
movl %eax, %edx
cmoveq %rax, %rdx
callq 0x295bf
addq $0x4, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
ps_fetch_int32:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
mov eax, [rdi+60h]
cmp eax, 9
jz short loc_28B01
cmp eax, 3
jnz short loc_28B14
loc_28B01:
mov rdx, rbx
mov ecx, 4
add rsp, 8
pop rbx
pop rbp
jmp ps_fetch_from_1_to_8_bytes
loc_28B14:
mov rax, [rbx]
movsxd rax, dword ptr [rax]
mov ecx, [rsi+64h]
and ecx, 20h
mov edx, eax
cmovz rdx, rax
call convert_from_long
add qword ptr [rbx], 4
add rsp, 8
pop rbx
pop rbp
retn
|
long long ps_fetch_int32(long long a1, long long a2, _BYTE **a3)
{
int v4; // eax
long long result; // rax
long long v6; // rdx
v4 = *(_DWORD *)(a1 + 96);
if ( v4 == 9 || v4 == 3 )
return ps_fetch_from_1_to_8_bytes(a1, a2, a3, 4u);
v6 = *(unsigned int *)*a3;
if ( (*(_DWORD *)(a2 + 100) & 0x20) == 0 )
v6 = *(int *)*a3;
result = convert_from_long(a1, a2, v6, *(_DWORD *)(a2 + 100) & 0x20);
*a3 += 4;
return result;
}
|
ps_fetch_int32:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV EAX,dword ptr [RDI + 0x60]
CMP EAX,0x9
JZ 0x00128b01
CMP EAX,0x3
JNZ 0x00128b14
LAB_00128b01:
MOV RDX,RBX
MOV ECX,0x4
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00127ee4
LAB_00128b14:
MOV RAX,qword ptr [RBX]
MOVSXD RAX,dword ptr [RAX]
MOV ECX,dword ptr [RSI + 0x64]
AND ECX,0x20
MOV EDX,EAX
CMOVZ RDX,RAX
CALL 0x001295bf
ADD qword ptr [RBX],0x4
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void ps_fetch_int32(long param_1,long param_2,long *param_3)
{
ulong uVar1;
if ((*(int *)(param_1 + 0x60) != 9) && (*(int *)(param_1 + 0x60) != 3)) {
uVar1 = (ulong)*(uint *)*param_3;
if ((*(uint *)(param_2 + 100) & 0x20) == 0) {
uVar1 = (long)(int)*(uint *)*param_3;
}
convert_from_long(param_1,param_2,uVar1);
*param_3 = *param_3 + 4;
return;
}
ps_fetch_from_1_to_8_bytes(param_1,param_2,param_3,4);
return;
}
|
|
14,524
|
blst_sk_inverse
|
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/exports.c
|
void blst_sk_inverse(pow256 ret, const pow256 a)
{
const union {
long one;
char little;
} is_endian = { 1 };
if (((size_t)a|(size_t)ret)%sizeof(limb_t) == 0 && is_endian.little) {
limb_t *out = (limb_t *)ret;
mul_mont_sparse_256(out, (const limb_t *)a, BLS12_381_rRR,
BLS12_381_r, r0);
reciprocal_fr(out, out);
from_mont_256(out, out, BLS12_381_r, r0);
} else {
vec256 out;
limbs_from_le_bytes(out, a, 32);
mul_mont_sparse_256(out, out, BLS12_381_rRR, BLS12_381_r, r0);
reciprocal_fr(out, out);
from_mont_256(out, out, BLS12_381_r, r0);
le_bytes_from_limbs(ret, out, 32);
vec_zero(out, sizeof(out));
}
}
|
O2
|
c
|
blst_sk_inverse:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movabsq $-0x100000001, %r14 # imm = 0xFFFFFFFEFFFFFFFF
movl %esi, %eax
orl %ebx, %eax
testb $0x7, %al
je 0x5aa12
leaq -0x50(%rbp), %r15
pushq $0x20
popq %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x5a738
leaq 0x255aa(%rip), %rdx # 0x7ff60
leaq 0x25093(%rip), %r13 # 0x7fa50
movq %r15, %rdi
movq %r15, %rsi
movq %r13, %rcx
movq %r14, %r8
callq 0x6a2c0
movq %r15, %rdi
movq %r15, %rsi
callq 0x58481
movq %r15, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x6a6e0
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x5a7d0
movq %r15, %rdi
movq %r12, %rsi
callq 0x50ea6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25547(%rip), %rdx # 0x7ff60
leaq 0x25030(%rip), %r15 # 0x7fa50
movq %rbx, %rdi
movq %r15, %rcx
movq %r14, %r8
callq 0x6a2c0
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x58481
movq %rbx, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6a6e0
|
blst_sk_inverse:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov r14, 0FFFFFFFEFFFFFFFFh
mov eax, esi
or eax, ebx
test al, 7
jz short loc_5AA12
lea r15, [rbp+var_50]
push 20h ; ' '
pop r12
mov rdi, r15
mov rdx, r12
call limbs_from_le_bytes
lea rdx, BLS12_381_rRR
lea r13, BLS12_381_r
mov rdi, r15
mov rsi, r15
mov rcx, r13
mov r8, r14
call mul_mont_sparse_256
mov rdi, r15
mov rsi, r15
call reciprocal_fr
mov rdi, r15
mov rsi, r15
mov rdx, r13
mov rcx, r14
call from_mont_256
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call le_bytes_from_limbs
mov rdi, r15
mov rsi, r12
call vec_zero
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5AA12:
lea rdx, BLS12_381_rRR
lea r15, BLS12_381_r
mov rdi, rbx
mov rcx, r15
mov r8, r14
call mul_mont_sparse_256
mov rdi, rbx
mov rsi, rbx
call reciprocal_fr
mov rdi, rbx
mov rsi, rbx
mov rdx, r15
mov rcx, r14
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp from_mont_256
|
long long blst_sk_inverse(long long a1, long long a2)
{
_BYTE v3[80]; // [rsp+0h] [rbp-50h] BYREF
if ( (((unsigned __int8)a1 | (unsigned __int8)a2) & 7) != 0 )
{
limbs_from_le_bytes((long long)v3, a2, 32LL);
mul_mont_sparse_256(v3, v3, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
reciprocal_fr((long long)v3, (long long)v3);
from_mont_256(v3, v3, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
le_bytes_from_limbs(a1, (long long)v3, 0x20uLL);
return vec_zero((long long)v3, 0x20uLL);
}
else
{
mul_mont_sparse_256(a1, a2, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
reciprocal_fr(a1, a1);
return from_mont_256(a1, a1, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
}
}
|
blst_sk_inverse:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV R14,-0x100000001
MOV EAX,ESI
OR EAX,EBX
TEST AL,0x7
JZ 0x0015aa12
LEA R15,[RBP + -0x50]
PUSH 0x20
POP R12
MOV RDI,R15
MOV RDX,R12
CALL 0x0015a738
LEA RDX,[0x17ff60]
LEA R13,[0x17fa50]
MOV RDI,R15
MOV RSI,R15
MOV RCX,R13
MOV R8,R14
CALL 0x0016a2c0
MOV RDI,R15
MOV RSI,R15
CALL 0x00158481
MOV RDI,R15
MOV RSI,R15
MOV RDX,R13
MOV RCX,R14
CALL 0x0016a6e0
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0015a7d0
MOV RDI,R15
MOV RSI,R12
CALL 0x00150ea6
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015aa12:
LEA RDX,[0x17ff60]
LEA R15,[0x17fa50]
MOV RDI,RBX
MOV RCX,R15
MOV R8,R14
CALL 0x0016a2c0
MOV RDI,RBX
MOV RSI,RBX
CALL 0x00158481
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R14
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0016a6e0
|
void blst_sk_inverse(int8 param_1,int8 param_2)
{
int1 local_58 [40];
if ((((uint)param_2 | (uint)param_1) & 7) != 0) {
limbs_from_le_bytes(local_58,param_2,0x20);
mul_mont_sparse_256(local_58,local_58,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff);
reciprocal_fr(local_58,local_58);
from_mont_256(local_58,local_58,BLS12_381_r,0xfffffffeffffffff);
le_bytes_from_limbs(param_1,local_58,0x20);
vec_zero(local_58,0x20);
return;
}
mul_mont_sparse_256(param_1,param_2,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff);
reciprocal_fr(param_1,param_1);
from_mont_256(param_1,param_1,BLS12_381_r,0xfffffffeffffffff);
return;
}
|
|
14,525
|
dequantize_row_iq2_xxs
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
|
void dequantize_row_iq2_xxs(const block_iq2_xxs * restrict x, float * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
uint32_t aux32[2];
const uint8_t * aux8 = (const uint8_t *)aux32;
for (int i = 0; i < nb; i++) {
const float d = GGML_FP16_TO_FP32(x[i].d);
for (int ib32 = 0; ib32 < QK_K/32; ++ib32) {
memcpy(aux32, x[i].qs + 4*ib32, 2*sizeof(uint32_t));
const float db = d * (0.5f + (aux32[1] >> 28)) * 0.25f;
for (int l = 0; l < 4; ++l) {
const uint8_t * grid = (const uint8_t *)(iq2xxs_grid + aux8[l]);
const uint8_t signs = ksigns_iq2xs[(aux32[1] >> 7*l) & 127];
for (int j = 0; j < 8; ++j) {
y[j] = db * grid[j] * (signs & kmask_iq2xs[j] ? -1.f : 1.f);
}
y += 8;
}
}
}
}
|
O1
|
c
|
dequantize_row_iq2_xxs:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testb %dl, %dl
jne 0x3415f
sarq $0x8, %rdx
testq %rdx, %rdx
jle 0x34150
xorl %eax, %eax
movss 0x17ff9(%rip), %xmm0 # 0x4c064
movss 0x1cd81(%rip), %xmm1 # 0x50df4
leaq 0x1cee6(%rip), %r9 # 0x50f60
leaq 0x1d6df(%rip), %r10 # 0x51760
leaq 0x1cddc(%rip), %r11 # 0x50e64
movaps 0x1cce1(%rip), %xmm2 # 0x50d70
movq %rax, %rcx
shlq $0x6, %rcx
leaq (%rcx,%rax,2), %rcx
leaq (%rdi,%rcx), %rbx
movzwl (%rdi,%rcx), %ecx
movq 0x39eff(%rip), %r8 # 0x6dfa8
movss (%r8,%rcx,4), %xmm3
xorl %r14d, %r14d
movq 0x2(%rbx,%r14,8), %rcx
movq %rcx, (%rsp)
movl 0x4(%rsp), %ebp
movl %ebp, %ecx
shrl $0x1c, %ecx
xorps %xmm4, %xmm4
cvtsi2ss %ecx, %xmm4
addss %xmm0, %xmm4
mulss %xmm3, %xmm4
mulss %xmm1, %xmm4
xorl %r15d, %r15d
movzbl (%rsp,%r15), %r12d
leal (,%r15,8), %ecx
subl %r15d, %ecx
movl %ebp, %r13d
shrl %cl, %r13d
leaq (%r9,%r12,8), %rcx
andl $0x7f, %r13d
movb (%r13,%r10), %r12b
xorl %r13d, %r13d
movzbl (%rcx,%r13), %r8d
xorps %xmm5, %xmm5
cvtsi2ss %r8d, %xmm5
mulss %xmm4, %xmm5
testb %r12b, (%r13,%r11)
je 0x3411b
xorps %xmm2, %xmm5
movss %xmm5, (%rsi,%r13,4)
incq %r13
cmpq $0x8, %r13
jne 0x34100
addq $0x20, %rsi
incq %r15
cmpq $0x4, %r15
jne 0x340da
incq %r14
cmpq $0x8, %r14
jne 0x340b2
incq %rax
cmpq %rdx, %rax
jne 0x3408f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x27a86(%rip), %rdi # 0x5bbec
leaq 0x27697(%rip), %rsi # 0x5b804
leaq 0x27eee(%rip), %rcx # 0x5c062
movl $0x896, %edx # imm = 0x896
callq 0x17b00
|
dequantize_row_iq2_xxs:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test dl, dl
jnz loc_3415F
sar rdx, 8
test rdx, rdx
jle loc_34150
xor eax, eax
movss xmm0, cs:dword_4C064
movss xmm1, cs:dword_50DF4
lea r9, iq2xxs_grid
lea r10, ksigns_iq2xs
lea r11, kmask_iq2xs
movaps xmm2, cs:xmmword_50D70
loc_3408F:
mov rcx, rax
shl rcx, 6
lea rcx, [rcx+rax*2]
lea rbx, [rdi+rcx]
movzx ecx, word ptr [rdi+rcx]
mov r8, cs:ggml_table_f32_f16_ptr
movss xmm3, dword ptr [r8+rcx*4]
xor r14d, r14d
loc_340B2:
mov rcx, [rbx+r14*8+2]
mov [rsp+38h+var_38], rcx
mov ebp, dword ptr [rsp+38h+var_38+4]
mov ecx, ebp
shr ecx, 1Ch
xorps xmm4, xmm4
cvtsi2ss xmm4, ecx
addss xmm4, xmm0
mulss xmm4, xmm3
mulss xmm4, xmm1
xor r15d, r15d
loc_340DA:
movzx r12d, byte ptr [rsp+r15+38h+var_38]
lea ecx, ds:0[r15*8]
sub ecx, r15d
mov r13d, ebp
shr r13d, cl
lea rcx, [r9+r12*8]
and r13d, 7Fh
mov r12b, [r13+r10+0]
xor r13d, r13d
loc_34100:
movzx r8d, byte ptr [rcx+r13]
xorps xmm5, xmm5
cvtsi2ss xmm5, r8d
mulss xmm5, xmm4
test [r13+r11+0], r12b
jz short loc_3411B
xorps xmm5, xmm2
loc_3411B:
movss dword ptr [rsi+r13*4], xmm5
inc r13
cmp r13, 8
jnz short loc_34100
add rsi, 20h ; ' '
inc r15
cmp r15, 4
jnz short loc_340DA
inc r14
cmp r14, 8
jnz loc_340B2
inc rax
cmp rax, rdx
jnz loc_3408F
loc_34150:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3415F:
lea rdi, aKQkK0; "k % QK_K == 0"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidDequantize_11; "void dequantize_row_iq2_xxs(const block"...
mov edx, 896h
call ___assert_fail
|
long long dequantize_row_iq2_xxs(long long a1, long long a2, long long a3)
{
long long result; // rax
long long v4; // rdx
unsigned __int16 *v5; // rbx
float v6; // xmm3_4
long long i; // r14
unsigned int v8; // ebp
float v9; // xmm4_4
long long j; // r15
char *v11; // rcx
unsigned __int8 v12; // r12
long long k; // r13
float v14; // xmm5_4
_QWORD v15[7]; // [rsp+0h] [rbp-38h]
v15[0] = result;
if ( (_BYTE)a3 )
__assert_fail(
"k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2198LL,
"void dequantize_row_iq2_xxs(const block_iq2_xxs *restrict, float *restrict, int64_t)");
v4 = a3 >> 8;
if ( v4 > 0 )
{
for ( result = 0LL; result != v4; ++result )
{
v5 = (unsigned __int16 *)(a1 + 66 * result);
v6 = ggml_table_f32_f16[*v5];
for ( i = 0LL; i != 8; ++i )
{
v15[0] = *(_QWORD *)&v5[4 * i + 1];
v8 = HIDWORD(v15[0]);
v9 = (float)((float)((float)(HIDWORD(v15[0]) >> 28) + 0.5) * v6) * 0.25;
for ( j = 0LL; j != 4; ++j )
{
v11 = (char *)&iq2xxs_grid + 8 * *((unsigned __int8 *)v15 + j);
v12 = ksigns_iq2xs[(v8 >> (7 * j)) & 0x7F];
for ( k = 0LL; k != 8; ++k )
{
v14 = (float)(unsigned __int8)v11[k] * v9;
if ( (v12 & kmask_iq2xs[k]) != 0 )
v14 = -v14;
*(float *)(a2 + 4 * k) = v14;
}
a2 += 32LL;
}
}
}
}
return result;
}
|
dequantize_row_iq2_xxs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST DL,DL
JNZ 0x0013415f
SAR RDX,0x8
TEST RDX,RDX
JLE 0x00134150
XOR EAX,EAX
MOVSS XMM0,dword ptr [0x0014c064]
MOVSS XMM1,dword ptr [0x00150df4]
LEA R9,[0x150f60]
LEA R10,[0x151760]
LEA R11,[0x150e64]
MOVAPS XMM2,xmmword ptr [0x00150d70]
LAB_0013408f:
MOV RCX,RAX
SHL RCX,0x6
LEA RCX,[RCX + RAX*0x2]
LEA RBX,[RDI + RCX*0x1]
MOVZX ECX,word ptr [RDI + RCX*0x1]
MOV R8,qword ptr [0x0016dfa8]
MOVSS XMM3,dword ptr [R8 + RCX*0x4]
XOR R14D,R14D
LAB_001340b2:
MOV RCX,qword ptr [RBX + R14*0x8 + 0x2]
MOV qword ptr [RSP],RCX
MOV EBP,dword ptr [RSP + 0x4]
MOV ECX,EBP
SHR ECX,0x1c
XORPS XMM4,XMM4
CVTSI2SS XMM4,ECX
ADDSS XMM4,XMM0
MULSS XMM4,XMM3
MULSS XMM4,XMM1
XOR R15D,R15D
LAB_001340da:
MOVZX R12D,byte ptr [RSP + R15*0x1]
LEA ECX,[R15*0x8]
SUB ECX,R15D
MOV R13D,EBP
SHR R13D,CL
LEA RCX,[R9 + R12*0x8]
AND R13D,0x7f
MOV R12B,byte ptr [R13 + R10*0x1]
XOR R13D,R13D
LAB_00134100:
MOVZX R8D,byte ptr [RCX + R13*0x1]
XORPS XMM5,XMM5
CVTSI2SS XMM5,R8D
MULSS XMM5,XMM4
TEST byte ptr [R13 + R11*0x1],R12B
JZ 0x0013411b
XORPS XMM5,XMM2
LAB_0013411b:
MOVSS dword ptr [RSI + R13*0x4],XMM5
INC R13
CMP R13,0x8
JNZ 0x00134100
ADD RSI,0x20
INC R15
CMP R15,0x4
JNZ 0x001340da
INC R14
CMP R14,0x8
JNZ 0x001340b2
INC RAX
CMP RAX,RDX
JNZ 0x0013408f
LAB_00134150:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013415f:
LEA RDI,[0x15bbec]
LEA RSI,[0x15b804]
LEA RCX,[0x15c062]
MOV EDX,0x896
CALL 0x00117b00
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void dequantize_row_iq2_xxs(long param_1,long param_2,long param_3)
{
float fVar1;
byte bVar2;
byte bVar3;
float fVar4;
uint uVar5;
float fVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
float fVar11;
int8 local_38;
fVar6 = DAT_00150df4;
uVar5 = _DAT_00150d70;
fVar4 = DAT_0014c064;
if ((char)param_3 == '\0') {
if (0 < param_3 >> 8) {
lVar7 = 0;
do {
fVar1 = *(float *)(PTR_ggml_table_f32_f16_0016dfa8 +
(ulong)*(ushort *)(param_1 + lVar7 * 0x42) * 4);
lVar9 = 0;
do {
local_38 = *(int8 *)(param_1 + lVar7 * 0x42 + 2 + lVar9 * 8);
local_38._4_4_ = (uint)((ulong)local_38 >> 0x20);
lVar10 = 0;
do {
bVar3 = *(byte *)((long)&local_38 + lVar10);
bVar2 = ksigns_iq2xs[local_38._4_4_ >> ((char)lVar10 * '\a' & 0x1fU) & 0x7f];
lVar8 = 0;
do {
fVar11 = (float)(byte)iq2xxs_grid[lVar8 + (ulong)bVar3 * 8] *
((float)(local_38._4_4_ >> 0x1c) + fVar4) * fVar1 * fVar6;
if (((&kmask_iq2xs)[lVar8] & bVar2) != 0) {
fVar11 = (float)((uint)fVar11 ^ uVar5);
}
*(float *)(param_2 + lVar8 * 4) = fVar11;
lVar8 = lVar8 + 1;
} while (lVar8 != 8);
param_2 = param_2 + 0x20;
lVar10 = lVar10 + 1;
} while (lVar10 != 4);
lVar9 = lVar9 + 1;
} while (lVar9 != 8);
lVar7 = lVar7 + 1;
} while (lVar7 != param_3 >> 8);
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x896,
"void dequantize_row_iq2_xxs(const block_iq2_xxs *restrict, float *restrict, int64_t)"
);
}
|
|
14,526
|
dequantize_row_iq2_xxs
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
|
void dequantize_row_iq2_xxs(const block_iq2_xxs * restrict x, float * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
uint32_t aux32[2];
const uint8_t * aux8 = (const uint8_t *)aux32;
for (int i = 0; i < nb; i++) {
const float d = GGML_FP16_TO_FP32(x[i].d);
for (int ib32 = 0; ib32 < QK_K/32; ++ib32) {
memcpy(aux32, x[i].qs + 4*ib32, 2*sizeof(uint32_t));
const float db = d * (0.5f + (aux32[1] >> 28)) * 0.25f;
for (int l = 0; l < 4; ++l) {
const uint8_t * grid = (const uint8_t *)(iq2xxs_grid + aux8[l]);
const uint8_t signs = ksigns_iq2xs[(aux32[1] >> 7*l) & 127];
for (int j = 0; j < 8; ++j) {
y[j] = db * grid[j] * (signs & kmask_iq2xs[j] ? -1.f : 1.f);
}
y += 8;
}
}
}
}
|
O2
|
c
|
dequantize_row_iq2_xxs:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testb %dl, %dl
jne 0x37790
sarq $0x8, %rdx
xorl %eax, %eax
testq %rdx, %rdx
cmovleq %rax, %rdx
movss 0x169ca(%rip), %xmm0 # 0x4e06c
movss 0x1b9ca(%rip), %xmm1 # 0x53074
leaq 0x1bb0f(%rip), %r9 # 0x531c0
leaq 0x1c308(%rip), %r10 # 0x539c0
leaq 0x1ba21(%rip), %r11 # 0x530e0
movaps 0x1b7da(%rip), %xmm2 # 0x52ea0
cmpq %rdx, %rax
je 0x37781
imulq $0x42, %rax, %rcx
leaq (%rdi,%rcx), %rbx
movzwl (%rdi,%rcx), %ecx
movq 0x3b8c6(%rip), %r8 # 0x72fa8
movss (%r8,%rcx,4), %xmm3
xorl %r14d, %r14d
cmpq $0x8, %r14
je 0x37779
movq 0x2(%rbx,%r14,8), %rcx
movq %rcx, (%rsp)
movq %rcx, %r15
shrq $0x20, %r15
shrq $0x3c, %rcx
cvtsi2ss %ecx, %xmm4
addss %xmm0, %xmm4
mulss %xmm3, %xmm4
mulss %xmm1, %xmm4
xorl %r12d, %r12d
cmpq $0x4, %r12
je 0x37771
movzbl (%rsp,%r12), %r13d
imull $0x7, %r12d, %ecx
movl %r15d, %ebp
shrl %cl, %ebp
leaq (%r9,%r13,8), %rcx
andl $0x7f, %ebp
movb (%rbp,%r10), %bpl
xorl %r13d, %r13d
cmpq $0x8, %r13
je 0x37768
movzbl (%rcx,%r13), %r8d
cvtsi2ss %r8d, %xmm5
mulss %xmm4, %xmm5
testb %bpl, (%r13,%r11)
je 0x3775d
xorps %xmm2, %xmm5
movss %xmm5, (%rsi,%r13,4)
incq %r13
jmp 0x3773f
addq $0x20, %rsi
incq %r12
jmp 0x3771c
incq %r14
jmp 0x376eb
incq %rax
jmp 0x376c6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x266b5(%rip), %rdi # 0x5de4c
leaq 0x262c6(%rip), %rsi # 0x5da64
leaq 0x26b1d(%rip), %rcx # 0x5e2c2
movl $0x896, %edx # imm = 0x896
callq 0x1dfb0
|
dequantize_row_iq2_xxs:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test dl, dl
jnz loc_37790
sar rdx, 8
xor eax, eax
test rdx, rdx
cmovle rdx, rax
movss xmm0, cs:dword_4E06C
movss xmm1, cs:dword_53074
lea r9, iq2xxs_grid
lea r10, ksigns_iq2xs
lea r11, kmask_iq2xs
movaps xmm2, cs:xmmword_52EA0
loc_376C6:
cmp rax, rdx
jz loc_37781
imul rcx, rax, 42h ; 'B'
lea rbx, [rdi+rcx]
movzx ecx, word ptr [rdi+rcx]
mov r8, cs:ggml_table_f32_f16_ptr
movss xmm3, dword ptr [r8+rcx*4]
xor r14d, r14d
loc_376EB:
cmp r14, 8
jz loc_37779
mov rcx, [rbx+r14*8+2]
mov [rsp+38h+var_38], rcx
mov r15, rcx
shr r15, 20h
shr rcx, 3Ch
cvtsi2ss xmm4, ecx
addss xmm4, xmm0
mulss xmm4, xmm3
mulss xmm4, xmm1
xor r12d, r12d
loc_3771C:
cmp r12, 4
jz short loc_37771
movzx r13d, byte ptr [rsp+r12+38h+var_38]
imul ecx, r12d, 7
mov ebp, r15d
shr ebp, cl
lea rcx, [r9+r13*8]
and ebp, 7Fh
mov bpl, [rbp+r10+0]
xor r13d, r13d
loc_3773F:
cmp r13, 8
jz short loc_37768
movzx r8d, byte ptr [rcx+r13]
cvtsi2ss xmm5, r8d
mulss xmm5, xmm4
test [r13+r11+0], bpl
jz short loc_3775D
xorps xmm5, xmm2
loc_3775D:
movss dword ptr [rsi+r13*4], xmm5
inc r13
jmp short loc_3773F
loc_37768:
add rsi, 20h ; ' '
inc r12
jmp short loc_3771C
loc_37771:
inc r14
jmp loc_376EB
loc_37779:
inc rax
jmp loc_376C6
loc_37781:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_37790:
lea rdi, aKQkK0; "k % QK_K == 0"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidDequantize_11; "void dequantize_row_iq2_xxs(const block"...
mov edx, 896h
call ___assert_fail
|
long long dequantize_row_iq2_xxs(
long long a1,
long long a2,
long long a3,
double a4,
double a5,
double a6,
double a7,
double a8,
__m128 a9)
{
long long v9; // rax
long long v10; // rdx
long long result; // rax
unsigned __int16 *v12; // rbx
float v13; // xmm3_4
long long i; // r14
long long v15; // r15
float v16; // xmm4_4
long long j; // r12
char *v18; // rcx
unsigned __int8 v19; // bp
long long k; // r13
_QWORD v21[7]; // [rsp+0h] [rbp-38h]
v21[0] = v9;
if ( (_BYTE)a3 )
__assert_fail(
"k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2198LL,
"void dequantize_row_iq2_xxs(const block_iq2_xxs *restrict, float *restrict, int64_t)");
v10 = a3 >> 8;
result = 0LL;
if ( v10 <= 0 )
v10 = 0LL;
while ( result != v10 )
{
v12 = (unsigned __int16 *)(a1 + 66 * result);
v13 = ggml_table_f32_f16[*v12];
for ( i = 0LL; i != 8; ++i )
{
v21[0] = *(_QWORD *)&v12[4 * i + 1];
v15 = HIDWORD(v21[0]);
v16 = (float)((float)((float)(v21[0] >> 60) + 0.5) * v13) * 0.25;
for ( j = 0LL; j != 4; ++j )
{
v18 = (char *)&iq2xxs_grid + 8 * *((unsigned __int8 *)v21 + j);
v19 = ksigns_iq2xs[((unsigned int)v15 >> (7 * j)) & 0x7F];
for ( k = 0LL; k != 8; ++k )
{
a9.m128_f32[0] = (float)(unsigned __int8)v18[k] * v16;
if ( (v19 & kmask_iq2xs[k]) != 0 )
a9 = _mm_xor_ps(a9, (__m128)xmmword_52EA0);
*(_DWORD *)(a2 + 4 * k) = a9.m128_i32[0];
}
a2 += 32LL;
}
}
++result;
}
return result;
}
|
dequantize_row_iq2_xxs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST DL,DL
JNZ 0x00137790
SAR RDX,0x8
XOR EAX,EAX
TEST RDX,RDX
CMOVLE RDX,RAX
MOVSS XMM0,dword ptr [0x0014e06c]
MOVSS XMM1,dword ptr [0x00153074]
LEA R9,[0x1531c0]
LEA R10,[0x1539c0]
LEA R11,[0x1530e0]
MOVAPS XMM2,xmmword ptr [0x00152ea0]
LAB_001376c6:
CMP RAX,RDX
JZ 0x00137781
IMUL RCX,RAX,0x42
LEA RBX,[RDI + RCX*0x1]
MOVZX ECX,word ptr [RDI + RCX*0x1]
MOV R8,qword ptr [0x00172fa8]
MOVSS XMM3,dword ptr [R8 + RCX*0x4]
XOR R14D,R14D
LAB_001376eb:
CMP R14,0x8
JZ 0x00137779
MOV RCX,qword ptr [RBX + R14*0x8 + 0x2]
MOV qword ptr [RSP],RCX
MOV R15,RCX
SHR R15,0x20
SHR RCX,0x3c
CVTSI2SS XMM4,ECX
ADDSS XMM4,XMM0
MULSS XMM4,XMM3
MULSS XMM4,XMM1
XOR R12D,R12D
LAB_0013771c:
CMP R12,0x4
JZ 0x00137771
MOVZX R13D,byte ptr [RSP + R12*0x1]
IMUL ECX,R12D,0x7
MOV EBP,R15D
SHR EBP,CL
LEA RCX,[R9 + R13*0x8]
AND EBP,0x7f
MOV BPL,byte ptr [RBP + R10*0x1]
XOR R13D,R13D
LAB_0013773f:
CMP R13,0x8
JZ 0x00137768
MOVZX R8D,byte ptr [RCX + R13*0x1]
CVTSI2SS XMM5,R8D
MULSS XMM5,XMM4
TEST byte ptr [R13 + R11*0x1],BPL
JZ 0x0013775d
XORPS XMM5,XMM2
LAB_0013775d:
MOVSS dword ptr [RSI + R13*0x4],XMM5
INC R13
JMP 0x0013773f
LAB_00137768:
ADD RSI,0x20
INC R12
JMP 0x0013771c
LAB_00137771:
INC R14
JMP 0x001376eb
LAB_00137779:
INC RAX
JMP 0x001376c6
LAB_00137781:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00137790:
LEA RDI,[0x15de4c]
LEA RSI,[0x15da64]
LEA RCX,[0x15e2c2]
MOV EDX,0x896
CALL 0x0011dfb0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void dequantize_row_iq2_xxs(long param_1,long param_2,long param_3)
{
float fVar1;
byte bVar2;
byte bVar3;
uint uVar4;
float fVar5;
uint uVar6;
float fVar7;
long lVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
float fVar13;
int8 local_38;
fVar7 = DAT_00153074;
uVar6 = _DAT_00152ea0;
fVar5 = DAT_0014e06c;
if ((char)param_3 != '\0') {
/* WARNING: Subroutine does not return */
__assert_fail("k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x896,
"void dequantize_row_iq2_xxs(const block_iq2_xxs *restrict, float *restrict, int64_t)"
);
}
lVar8 = 0;
lVar9 = param_3 >> 8;
if (param_3 >> 8 < 1) {
lVar9 = lVar8;
}
for (; lVar8 != lVar9; lVar8 = lVar8 + 1) {
fVar1 = *(float *)(PTR_ggml_table_f32_f16_00172fa8 +
(ulong)*(ushort *)(param_1 + lVar8 * 0x42) * 4);
for (lVar12 = 0; lVar12 != 8; lVar12 = lVar12 + 1) {
local_38 = *(int8 *)(param_1 + lVar8 * 0x42 + 2 + lVar12 * 8);
uVar4 = (uint)((ulong)local_38 >> 0x20);
for (lVar10 = 0; lVar10 != 4; lVar10 = lVar10 + 1) {
bVar3 = *(byte *)((long)&local_38 + lVar10);
bVar2 = ksigns_iq2xs[uVar4 >> ((char)lVar10 * '\a' & 0x1fU) & 0x7f];
for (lVar11 = 0; lVar11 != 8; lVar11 = lVar11 + 1) {
fVar13 = (float)(byte)iq2xxs_grid[lVar11 + (ulong)bVar3 * 8] *
((float)(uVar4 >> 0x1c) + fVar5) * fVar1 * fVar7;
if (((&kmask_iq2xs)[lVar11] & bVar2) != 0) {
fVar13 = (float)((uint)fVar13 ^ uVar6);
}
*(float *)(param_2 + lVar11 * 4) = fVar13;
}
param_2 = param_2 + 0x20;
}
}
}
return;
}
|
|
14,527
|
dequantize_row_iq2_xxs
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
|
void dequantize_row_iq2_xxs(const block_iq2_xxs * restrict x, float * restrict y, int64_t k) {
assert(k % QK_K == 0);
const int64_t nb = k / QK_K;
uint32_t aux32[2];
const uint8_t * aux8 = (const uint8_t *)aux32;
for (int i = 0; i < nb; i++) {
const float d = GGML_FP16_TO_FP32(x[i].d);
for (int ib32 = 0; ib32 < QK_K/32; ++ib32) {
memcpy(aux32, x[i].qs + 4*ib32, 2*sizeof(uint32_t));
const float db = d * (0.5f + (aux32[1] >> 28)) * 0.25f;
for (int l = 0; l < 4; ++l) {
const uint8_t * grid = (const uint8_t *)(iq2xxs_grid + aux8[l]);
const uint8_t signs = ksigns_iq2xs[(aux32[1] >> 7*l) & 127];
for (int j = 0; j < 8; ++j) {
y[j] = db * grid[j] * (signs & kmask_iq2xs[j] ? -1.f : 1.f);
}
y += 8;
}
}
}
}
|
O3
|
c
|
dequantize_row_iq2_xxs:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testb %dl, %dl
jne 0x332ca
sarq $0x8, %rdx
testq %rdx, %rdx
jle 0x332bb
xorl %eax, %eax
movq 0x3ae17(%rip), %r8 # 0x6dfa8
movss 0x18f63(%rip), %xmm0 # 0x4c0fc
movss 0x1e15f(%rip), %xmm1 # 0x51300
leaq 0x1e2a8(%rip), %r9 # 0x51450
leaq 0x1eaa1(%rip), %r10 # 0x51c50
pxor %xmm2, %xmm2
leaq 0x1e1b2(%rip), %r11 # 0x5136c
movaps 0x18ebf(%rip), %xmm3 # 0x4c080
movq %rax, %rcx
shlq $0x6, %rcx
leaq (%rcx,%rax,2), %rcx
leaq (%rdi,%rcx), %rbx
movzwl (%rdi,%rcx), %ecx
movss (%r8,%rcx,4), %xmm4
xorl %r14d, %r14d
movq 0x2(%rbx,%r14,8), %rcx
movq %rcx, (%rsp)
movq %rcx, %r15
shrq $0x20, %r15
shrq $0x3c, %rcx
xorps %xmm5, %xmm5
cvtsi2ss %ecx, %xmm5
addss %xmm0, %xmm5
mulss %xmm4, %xmm5
mulss %xmm1, %xmm5
shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0]
xorl %r12d, %r12d
leal (,%r12,8), %ecx
subl %r12d, %ecx
movl %r15d, %r13d
shrl %cl, %r13d
movzbl (%rsp,%r12), %ecx
leaq (%r9,%rcx,8), %rcx
andl $0x7f, %r13d
movzbl (%r13,%r10), %ebp
movd %ebp, %xmm6
punpcklbw %xmm6, %xmm6 # xmm6 = xmm6[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm6, %xmm6 # xmm6 = xmm6[0,0,0,0,4,5,6,7]
xorl %r13d, %r13d
movd (%rcx,%r13), %xmm7
punpcklbw %xmm2, %xmm7 # xmm7 = xmm7[0],xmm2[0],xmm7[1],xmm2[1],xmm7[2],xmm2[2],xmm7[3],xmm2[3],xmm7[4],xmm2[4],xmm7[5],xmm2[5],xmm7[6],xmm2[6],xmm7[7],xmm2[7]
punpcklwd %xmm2, %xmm7 # xmm7 = xmm7[0],xmm2[0],xmm7[1],xmm2[1],xmm7[2],xmm2[2],xmm7[3],xmm2[3]
cvtdq2ps %xmm7, %xmm7
mulps %xmm5, %xmm7
movd (%r13,%r11), %xmm8
pand %xmm6, %xmm8
punpcklbw %xmm8, %xmm8 # xmm8 = xmm8[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
punpcklwd %xmm8, %xmm8 # xmm8 = xmm8[0,0,1,1,2,2,3,3]
pcmpeqb %xmm2, %xmm8
movaps %xmm7, %xmm9
xorps %xmm3, %xmm9
andps %xmm8, %xmm7
andnps %xmm9, %xmm8
orps %xmm7, %xmm8
movups %xmm8, (%rsi,%r13,4)
addq $0x4, %r13
cmpq $0x8, %r13
jne 0x3323f
addq $0x20, %rsi
incq %r12
cmpq $0x4, %r12
jne 0x3320b
incq %r14
cmpq $0x8, %r14
jne 0x331dd
incq %rax
cmpq %rdx, %rax
jne 0x331c1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28e0b(%rip), %rdi # 0x5c0dc
leaq 0x28a1c(%rip), %rsi # 0x5bcf4
leaq 0x29273(%rip), %rcx # 0x5c552
movl $0x896, %edx # imm = 0x896
callq 0x16b00
|
dequantize_row_iq2_xxs:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test dl, dl
jnz loc_332CA
sar rdx, 8
test rdx, rdx
jle loc_332BB
xor eax, eax
mov r8, cs:ggml_table_f32_f16_ptr
movss xmm0, cs:dword_4C0FC
movss xmm1, cs:dword_51300
lea r9, iq2xxs_grid
lea r10, ksigns_iq2xs
pxor xmm2, xmm2
lea r11, kmask_iq2xs
movaps xmm3, cs:xmmword_4C080
loc_331C1:
mov rcx, rax
shl rcx, 6
lea rcx, [rcx+rax*2]
lea rbx, [rdi+rcx]
movzx ecx, word ptr [rdi+rcx]
movss xmm4, dword ptr [r8+rcx*4]
xor r14d, r14d
loc_331DD:
mov rcx, [rbx+r14*8+2]
mov [rsp+38h+var_38], rcx
mov r15, rcx
shr r15, 20h
shr rcx, 3Ch
xorps xmm5, xmm5
cvtsi2ss xmm5, ecx
addss xmm5, xmm0
mulss xmm5, xmm4
mulss xmm5, xmm1
shufps xmm5, xmm5, 0
xor r12d, r12d
loc_3320B:
lea ecx, ds:0[r12*8]
sub ecx, r12d
mov r13d, r15d
shr r13d, cl
movzx ecx, byte ptr [rsp+r12+38h+var_38]
lea rcx, [r9+rcx*8]
and r13d, 7Fh
movzx ebp, byte ptr [r13+r10+0]
movd xmm6, ebp
punpcklbw xmm6, xmm6
pshuflw xmm6, xmm6, 0
xor r13d, r13d
loc_3323F:
movd xmm7, dword ptr [rcx+r13]
punpcklbw xmm7, xmm2
punpcklwd xmm7, xmm2
cvtdq2ps xmm7, xmm7
mulps xmm7, xmm5
movd xmm8, dword ptr [r13+r11+0]
pand xmm8, xmm6
punpcklbw xmm8, xmm8
punpcklwd xmm8, xmm8
pcmpeqb xmm8, xmm2
movaps xmm9, xmm7
xorps xmm9, xmm3
andps xmm7, xmm8
andnps xmm8, xmm9
orps xmm8, xmm7
movups xmmword ptr [rsi+r13*4], xmm8
add r13, 4
cmp r13, 8
jnz short loc_3323F
add rsi, 20h ; ' '
inc r12
cmp r12, 4
jnz loc_3320B
inc r14
cmp r14, 8
jnz loc_331DD
inc rax
cmp rax, rdx
jnz loc_331C1
loc_332BB:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_332CA:
lea rdi, aKQkK0; "k % QK_K == 0"
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidDequantize_11; "void dequantize_row_iq2_xxs(const block"...
mov edx, 896h
call ___assert_fail
|
long long dequantize_row_iq2_xxs(long long a1, long long a2, long long a3)
{
long long result; // rax
long long v4; // rdx
unsigned __int16 *v5; // rbx
float v6; // xmm4_4
long long i; // r14
long long v8; // r15
__m128 v9; // xmm5
__m128 v10; // xmm5
long long j; // r12
char *v12; // rcx
__m128i v13; // xmm6
__m128i v14; // xmm6
long long k; // r13
__m128 v16; // xmm7
__m128i v17; // xmm8
__m128i v18; // xmm8
__m128 v19; // xmm8
_QWORD v20[7]; // [rsp+0h] [rbp-38h]
v20[0] = result;
if ( (_BYTE)a3 )
__assert_fail(
"k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
2198LL,
"void dequantize_row_iq2_xxs(const block_iq2_xxs *restrict, float *restrict, int64_t)");
v4 = a3 >> 8;
if ( v4 > 0 )
{
for ( result = 0LL; result != v4; ++result )
{
v5 = (unsigned __int16 *)(a1 + 66 * result);
v6 = ggml_table_f32_f16[*v5];
for ( i = 0LL; i != 8; ++i )
{
v20[0] = *(_QWORD *)&v5[4 * i + 1];
v8 = HIDWORD(v20[0]);
v9 = 0LL;
v9.m128_f32[0] = (float)((float)((float)(v20[0] >> 60) + 0.5) * v6) * 0.25;
v10 = _mm_shuffle_ps(v9, v9, 0);
for ( j = 0LL; j != 4; ++j )
{
v12 = (char *)&iq2xxs_grid + 8 * *((unsigned __int8 *)v20 + j);
v13 = _mm_cvtsi32_si128(ksigns_iq2xs[((unsigned int)v8 >> (7 * j)) & 0x7F]);
v14 = _mm_shufflelo_epi16(_mm_unpacklo_epi8(v13, v13), 0);
for ( k = 0LL; k != 8; k += 4LL )
{
v16 = _mm_mul_ps(
_mm_cvtepi32_ps(
_mm_unpacklo_epi16(
_mm_unpacklo_epi8(_mm_cvtsi32_si128(*(_DWORD *)&v12[k]), (__m128i)0LL),
(__m128i)0LL)),
v10);
v17 = _mm_and_si128(_mm_cvtsi32_si128(*(_DWORD *)((char *)&kmask_iq2xs + k)), v14);
v18 = _mm_unpacklo_epi8(v17, v17);
v19 = (__m128)_mm_cmpeq_epi8(_mm_unpacklo_epi16(v18, v18), (__m128i)0LL);
*(__m128 *)(a2 + 4 * k) = _mm_or_ps(
_mm_andnot_ps(v19, _mm_xor_ps(v16, (__m128)xmmword_4C080)),
_mm_and_ps(v16, v19));
}
a2 += 32LL;
}
}
}
}
return result;
}
|
dequantize_row_iq2_xxs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST DL,DL
JNZ 0x001332ca
SAR RDX,0x8
TEST RDX,RDX
JLE 0x001332bb
XOR EAX,EAX
MOV R8,qword ptr [0x0016dfa8]
MOVSS XMM0,dword ptr [0x0014c0fc]
MOVSS XMM1,dword ptr [0x00151300]
LEA R9,[0x151450]
LEA R10,[0x151c50]
PXOR XMM2,XMM2
LEA R11,[0x15136c]
MOVAPS XMM3,xmmword ptr [0x0014c080]
LAB_001331c1:
MOV RCX,RAX
SHL RCX,0x6
LEA RCX,[RCX + RAX*0x2]
LEA RBX,[RDI + RCX*0x1]
MOVZX ECX,word ptr [RDI + RCX*0x1]
MOVSS XMM4,dword ptr [R8 + RCX*0x4]
XOR R14D,R14D
LAB_001331dd:
MOV RCX,qword ptr [RBX + R14*0x8 + 0x2]
MOV qword ptr [RSP],RCX
MOV R15,RCX
SHR R15,0x20
SHR RCX,0x3c
XORPS XMM5,XMM5
CVTSI2SS XMM5,ECX
ADDSS XMM5,XMM0
MULSS XMM5,XMM4
MULSS XMM5,XMM1
SHUFPS XMM5,XMM5,0x0
XOR R12D,R12D
LAB_0013320b:
LEA ECX,[R12*0x8]
SUB ECX,R12D
MOV R13D,R15D
SHR R13D,CL
MOVZX ECX,byte ptr [RSP + R12*0x1]
LEA RCX,[R9 + RCX*0x8]
AND R13D,0x7f
MOVZX EBP,byte ptr [R13 + R10*0x1]
MOVD XMM6,EBP
PUNPCKLBW XMM6,XMM6
PSHUFLW XMM6,XMM6,0x0
XOR R13D,R13D
LAB_0013323f:
MOVD XMM7,dword ptr [RCX + R13*0x1]
PUNPCKLBW XMM7,XMM2
PUNPCKLWD XMM7,XMM2
CVTDQ2PS XMM7,XMM7
MULPS XMM7,XMM5
MOVD XMM8,dword ptr [R13 + R11*0x1]
PAND XMM8,XMM6
PUNPCKLBW XMM8,XMM8
PUNPCKLWD XMM8,XMM8
PCMPEQB XMM8,XMM2
MOVAPS XMM9,XMM7
XORPS XMM9,XMM3
ANDPS XMM7,XMM8
ANDNPS XMM8,XMM9
ORPS XMM8,XMM7
MOVUPS xmmword ptr [RSI + R13*0x4],XMM8
ADD R13,0x4
CMP R13,0x8
JNZ 0x0013323f
ADD RSI,0x20
INC R12
CMP R12,0x4
JNZ 0x0013320b
INC R14
CMP R14,0x8
JNZ 0x001331dd
INC RAX
CMP RAX,RDX
JNZ 0x001331c1
LAB_001332bb:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001332ca:
LEA RDI,[0x15c0dc]
LEA RSI,[0x15bcf4]
LEA RCX,[0x15c552]
MOV EDX,0x896
CALL 0x00116b00
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void dequantize_row_iq2_xxs(long param_1,long param_2,long param_3)
{
uint *puVar1;
float fVar2;
byte bVar3;
int4 uVar4;
uint uVar5;
int1 auVar6 [13];
int1 auVar7 [13];
int1 auVar8 [13];
ulong uVar9;
int1 auVar10 [13];
uint uVar11;
uint uVar12;
uint uVar13;
uint uVar14;
float fVar15;
float fVar16;
int *puVar17;
long lVar18;
long lVar19;
long lVar20;
long lVar21;
float fVar22;
int1 auVar23 [16];
float fVar24;
float fVar25;
float fVar26;
float fVar27;
char cVar28;
char cVar34;
uint uVar29;
char cVar32;
char cVar33;
uint uVar35;
int1 auVar31 [16];
int8 local_38;
int1 auVar30 [12];
puVar17 = PTR_ggml_table_f32_f16_0016dfa8;
fVar16 = DAT_00151300;
fVar15 = DAT_0014c0fc;
uVar14 = _UNK_0014c08c;
uVar13 = _UNK_0014c088;
uVar12 = _UNK_0014c084;
uVar11 = _DAT_0014c080;
if ((char)param_3 == '\0') {
if (0 < param_3 >> 8) {
lVar18 = 0;
do {
fVar2 = *(float *)(puVar17 + (ulong)*(ushort *)(param_1 + lVar18 * 0x42) * 4);
lVar21 = 0;
do {
local_38 = *(int8 *)(param_1 + lVar18 * 0x42 + 2 + lVar21 * 8);
uVar5 = (uint)((ulong)local_38 >> 0x20);
fVar22 = ((float)(uVar5 >> 0x1c) + fVar15) * fVar2 * fVar16;
lVar19 = 0;
do {
bVar3 = *(byte *)((long)&local_38 + lVar19);
auVar23 = ZEXT216(CONCAT11(ksigns_iq2xs[uVar5 >> ((char)lVar19 * '\a' & 0x1fU) & 0x7f],
ksigns_iq2xs[uVar5 >> ((char)lVar19 * '\a' & 0x1fU) & 0x7f]))
;
auVar23 = pshuflw(auVar23,auVar23,0);
lVar20 = 0;
do {
uVar4 = *(int4 *)(iq2xxs_grid + lVar20 + (ulong)bVar3 * 8);
uVar9 = (ulong)(ushort)uVar4 & 0xffffffffffff00ff;
auVar6._8_4_ = 0;
auVar6._0_8_ = uVar9;
auVar6[0xc] = (char)((uint)uVar4 >> 0x18);
auVar7[8] = (char)((uint)uVar4 >> 0x10);
auVar7._0_8_ = uVar9;
auVar7[9] = 0;
auVar7._10_3_ = auVar6._10_3_;
auVar10._5_8_ = 0;
auVar10._0_5_ = auVar7._8_5_;
auVar8[4] = (char)((uint)uVar4 >> 8);
auVar8._0_4_ = (int)uVar9;
auVar8[5] = 0;
auVar8._6_7_ = SUB137(auVar10 << 0x40,6);
fVar24 = (float)(int)uVar9 * fVar22;
fVar25 = (float)auVar8._4_4_ * fVar22;
fVar26 = (float)auVar7._8_4_ * fVar22;
fVar27 = (float)(uint3)(auVar6._10_3_ >> 0x10) * fVar22;
auVar31 = ZEXT416(*(uint *)((long)&kmask_iq2xs + lVar20)) & auVar23;
cVar34 = auVar31[3];
cVar33 = auVar31[2];
cVar32 = auVar31[1];
cVar28 = auVar31[0];
uVar29 = CONCAT13(-(cVar28 == '\0'),
CONCAT12(-(cVar28 == '\0'),
CONCAT11(-(cVar28 == '\0'),-(cVar28 == '\0'))));
auVar30._0_8_ =
CONCAT17(-(cVar32 == '\0'),
CONCAT16(-(cVar32 == '\0'),
CONCAT15(-(cVar32 == '\0'),CONCAT14(-(cVar32 == '\0'),uVar29)))
);
auVar30[8] = -(cVar33 == '\0');
auVar30[9] = -(cVar33 == '\0');
auVar30[10] = -(cVar33 == '\0');
auVar30[0xb] = -(cVar33 == '\0');
auVar31[0xc] = -(cVar34 == '\0');
auVar31._0_12_ = auVar30;
auVar31[0xd] = -(cVar34 == '\0');
auVar31[0xe] = -(cVar34 == '\0');
auVar31[0xf] = -(cVar34 == '\0');
uVar35 = (uint)((ulong)auVar30._0_8_ >> 0x20);
puVar1 = (uint *)(param_2 + lVar20 * 4);
*puVar1 = ~uVar29 & ((uint)fVar24 ^ uVar11) | (uint)fVar24 & uVar29;
puVar1[1] = ~uVar35 & ((uint)fVar25 ^ uVar12) | (uint)fVar25 & uVar35;
puVar1[2] = ~auVar30._8_4_ & ((uint)fVar26 ^ uVar13) | (uint)fVar26 & auVar30._8_4_;
puVar1[3] = ~auVar31._12_4_ & ((uint)fVar27 ^ uVar14) | (uint)fVar27 & auVar31._12_4_;
lVar20 = lVar20 + 4;
} while (lVar20 != 8);
param_2 = param_2 + 0x20;
lVar19 = lVar19 + 1;
} while (lVar19 != 4);
lVar21 = lVar21 + 1;
} while (lVar21 != 8);
lVar18 = lVar18 + 1;
} while (lVar18 != param_3 >> 8);
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("k % QK_K == 0",
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x896,
"void dequantize_row_iq2_xxs(const block_iq2_xxs *restrict, float *restrict, int64_t)"
);
}
|
|
14,528
|
my_getcputime
|
eloqsql/mysys/my_getsystime.c
|
ulonglong my_getcputime()
{
#ifdef CLOCK_THREAD_CPUTIME_ID
struct timespec tp;
if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#elif defined(__NR_clock_gettime)
struct timespec tp;
if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#endif /* CLOCK_THREAD_CPUTIME_ID */
return 0;
}
|
O3
|
c
|
my_getcputime:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0x10(%rbp), %rsi
movl $0x3, %edi
callq 0x24270
testl %eax, %eax
je 0x318dc
xorl %eax, %eax
jmp 0x31903
imulq $0x989680, -0x10(%rbp), %rcx # imm = 0x989680
movq -0x8(%rbp), %rax
shrq $0x2, %rax
movabsq $0x28f5c28f5c28f5c3, %rdx # imm = 0x28F5C28F5C28F5C3
mulq %rdx
movq %rdx, %rax
shrq $0x2, %rax
addq %rcx, %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
my_getcputime:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rsi, [rbp+var_10]
mov edi, 3
call _clock_gettime
test eax, eax
jz short loc_318DC
xor eax, eax
jmp short loc_31903
loc_318DC:
imul rcx, [rbp+var_10], 989680h
mov rax, [rbp+var_8]
shr rax, 2
mov rdx, 28F5C28F5C28F5C3h
mul rdx
mov rax, rdx
shr rax, 2
add rax, rcx
loc_31903:
add rsp, 10h
pop rbp
retn
|
unsigned long long my_getcputime()
{
long long v1; // [rsp+0h] [rbp-10h] BYREF
unsigned long long v2; // [rsp+8h] [rbp-8h]
if ( (unsigned int)clock_gettime(3LL, &v1) )
return 0LL;
else
return 10000000 * v1 + v2 / 0x64;
}
|
my_getcputime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RSI,[RBP + -0x10]
MOV EDI,0x3
CALL 0x00124270
TEST EAX,EAX
JZ 0x001318dc
XOR EAX,EAX
JMP 0x00131903
LAB_001318dc:
IMUL RCX,qword ptr [RBP + -0x10],0x989680
MOV RAX,qword ptr [RBP + -0x8]
SHR RAX,0x2
MOV RDX,0x28f5c28f5c28f5c3
MUL RDX
MOV RAX,RDX
SHR RAX,0x2
ADD RAX,RCX
LAB_00131903:
ADD RSP,0x10
POP RBP
RET
|
long my_getcputime(void)
{
int iVar1;
long lVar2;
timespec local_18;
iVar1 = clock_gettime(3,&local_18);
if (iVar1 == 0) {
lVar2 = (ulong)local_18.tv_nsec / 100 + local_18.tv_sec * 10000000;
}
else {
lVar2 = 0;
}
return lVar2;
}
|
|
14,529
|
ma_bitmap_get_page_bits
|
eloqsql/storage/maria/ma_bitmap.c
|
static uint bitmap_get_page_bits(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page)
{
pgcache_page_no_t bitmap_page;
uint offset_page, offset, tmp;
uchar *data;
DBUG_ENTER("_ma_bitmap_get_page_bits");
bitmap_page= page - page % bitmap->pages_covered;
if (bitmap_page != bitmap->page &&
_ma_change_bitmap_page(info, bitmap, bitmap_page))
DBUG_RETURN(~ (uint) 0);
/* Find page number from start of bitmap */
offset_page= (uint) (page - bitmap->page - 1);
/*
Mark place used by reading/writing 2 bytes at a time to handle
bitmaps in overlapping bytes
*/
offset_page*= 3;
offset= offset_page & 7;
data= bitmap->map + offset_page / 8;
tmp= uint2korr(data);
DBUG_RETURN((tmp >> offset) & 7);
}
|
O3
|
c
|
ma_bitmap_get_page_bits:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
leaq 0x88(%rsi), %rbx
cmpq $0x0, 0xc8(%rsi)
jne 0x41473
movq %rbx, %rdi
callq 0x29220
movq %r15, %rax
xorl %edx, %edx
divq 0x138(%r14)
movq %rdx, %rax
movq %r15, %rdx
subq %rax, %rdx
cmpq 0x10(%r14), %rdx
je 0x41432
movq %r12, %rdi
movq %r14, %rsi
callq 0x41065
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testb %al, %al
jne 0x41453
movq 0x10(%r14), %rdx
notl %edx
addl %edx, %r15d
leal (%r15,%r15,2), %ecx
movq 0x8(%r14), %rax
movl %ecx, %edx
shrl $0x3, %edx
movzwl (%rax,%rdx), %r12d
andb $0x7, %cl
shrl %cl, %r12d
andl $0x7, %r12d
movq 0xc8(%r14), %rdi
testq %rdi, %rdi
jne 0x4148c
movq %rbx, %rdi
callq 0x291e0
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9839a(%rip), %rsi # 0xd9814
movq %rbx, %rdi
movl $0x97b, %edx # imm = 0x97B
callq 0x2eb8f
jmp 0x413fe
leaq 0x344b7d(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x4145f
|
_ma_bitmap_get_page_bits:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r15, rdx
mov r14, rsi
mov r12, rdi
lea rbx, [rsi+88h]
cmp qword ptr [rsi+0C8h], 0
jnz short loc_41473
mov rdi, rbx
call _pthread_mutex_lock
loc_413FE:
mov rax, r15
xor edx, edx
div qword ptr [r14+138h]
mov rax, rdx
mov rdx, r15
sub rdx, rax
cmp rdx, [r14+10h]
jz short loc_41432
mov rdi, r12
mov rsi, r14
call _ma_change_bitmap_page
mov r12d, 0FFFFFFFFh
test al, al
jnz short loc_41453
mov rdx, [r14+10h]
loc_41432:
not edx
add r15d, edx
lea ecx, [r15+r15*2]
mov rax, [r14+8]
mov edx, ecx
shr edx, 3
movzx r12d, word ptr [rax+rdx]
and cl, 7
shr r12d, cl
and r12d, 7
loc_41453:
mov rdi, [r14+0C8h]
test rdi, rdi
jnz short loc_4148C
loc_4145F:
mov rdi, rbx
call _pthread_mutex_unlock
mov eax, r12d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_41473:
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 97Bh
call psi_mutex_lock
jmp loc_413FE
loc_4148C:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_4145F
|
long long ma_bitmap_get_page_bits(long long *a1, _QWORD *a2, unsigned long long a3)
{
long long v4; // rbx
long long v5; // rcx
long long v6; // r8
unsigned long long v7; // rdx
unsigned int v8; // r12d
v4 = (long long)(a2 + 17);
if ( a2[25] )
psi_mutex_lock(v4, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x97Bu);
else
pthread_mutex_lock(a2 + 17);
v7 = a3 - a3 % a2[39];
if ( v7 != a2[2] )
{
v8 = -1;
if ( (unsigned __int8)ma_change_bitmap_page(a1, (long long)a2, v7, v5, v6) )
goto LABEL_7;
v7 = a2[2];
}
v8 = (*(unsigned __int16 *)(a2[1] + ((unsigned int)(3 * (~(_DWORD)v7 + a3)) >> 3)) >> ((3 * (~(_BYTE)v7 + a3)) & 7)) & 7;
LABEL_7:
if ( a2[25] )
PSI_server[44]();
pthread_mutex_unlock(v4);
return v8;
}
|
_ma_bitmap_get_page_bits:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,RDX
MOV R14,RSI
MOV R12,RDI
LEA RBX,[RSI + 0x88]
CMP qword ptr [RSI + 0xc8],0x0
JNZ 0x00141473
MOV RDI,RBX
CALL 0x00129220
LAB_001413fe:
MOV RAX,R15
XOR EDX,EDX
DIV qword ptr [R14 + 0x138]
MOV RAX,RDX
MOV RDX,R15
SUB RDX,RAX
CMP RDX,qword ptr [R14 + 0x10]
JZ 0x00141432
MOV RDI,R12
MOV RSI,R14
CALL 0x00141065
MOV R12D,0xffffffff
TEST AL,AL
JNZ 0x00141453
MOV RDX,qword ptr [R14 + 0x10]
LAB_00141432:
NOT EDX
ADD R15D,EDX
LEA ECX,[R15 + R15*0x2]
MOV RAX,qword ptr [R14 + 0x8]
MOV EDX,ECX
SHR EDX,0x3
MOVZX R12D,word ptr [RAX + RDX*0x1]
AND CL,0x7
SHR R12D,CL
AND R12D,0x7
LAB_00141453:
MOV RDI,qword ptr [R14 + 0xc8]
TEST RDI,RDI
JNZ 0x0014148c
LAB_0014145f:
MOV RDI,RBX
CALL 0x001291e0
MOV EAX,R12D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00141473:
LEA RSI,[0x1d9814]
MOV RDI,RBX
MOV EDX,0x97b
CALL 0x0012eb8f
JMP 0x001413fe
LAB_0014148c:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0014145f
|
uint _ma_bitmap_get_page_bits(int8 param_1,long param_2,ulong param_3)
{
pthread_mutex_t *__mutex;
char cVar1;
long lVar2;
uint uVar3;
__mutex = (pthread_mutex_t *)(param_2 + 0x88);
if (*(long *)(param_2 + 200) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c",
0x97b);
}
lVar2 = param_3 - param_3 % *(ulong *)(param_2 + 0x138);
if (lVar2 != *(long *)(param_2 + 0x10)) {
cVar1 = _ma_change_bitmap_page(param_1,param_2);
uVar3 = 0xffffffff;
if (cVar1 != '\0') goto LAB_00141453;
lVar2 = *(long *)(param_2 + 0x10);
}
uVar3 = ((int)param_3 + ~(uint)lVar2) * 3;
uVar3 = *(ushort *)(*(long *)(param_2 + 8) + (ulong)(uVar3 >> 3)) >> ((byte)uVar3 & 7) & 7;
LAB_00141453:
if (*(long *)(param_2 + 200) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return uVar3;
}
|
|
14,530
|
ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()>)
|
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/renderer.cpp
|
Component Renderer(std::function<Element()> render) {
class Impl : public ComponentBase {
public:
explicit Impl(std::function<Element()> render)
: render_(std::move(render)) {}
Element Render() override { return render_(); }
std::function<Element()> render_;
};
return Make<Impl>(std::move(render));
}
|
O1
|
cpp
|
ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()>):
pushq %rbx
movq %rdi, %rbx
leaq 0x2be47(%rip), %rax # 0x592a0
movq %rax, (%rdi)
movq 0x38(%rdi), %rax
testq %rax, %rax
je 0x2d473
leaq 0x28(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x272d8
movl $0x48, %esi
movq %rbx, %rdi
popq %rbx
jmp 0xb400
movq %rax, %rdi
callq 0x106a9
nop
|
_ZZN5ftxui8RendererESt8functionIFSt10shared_ptrINS_4NodeEEvEEEN4ImplD0Ev:
push rbx
mov rbx, rdi
lea rax, off_592A0
mov [rdi], rax
mov rax, [rdi+38h]
test rax, rax
jz short loc_2D473
lea rdi, [rbx+28h]
mov rsi, rdi
mov edx, 3
call rax
loc_2D473:
mov rdi, rbx; this
call _ZN5ftxui13ComponentBaseD2Ev; ftxui::ComponentBase::~ComponentBase()
mov esi, 48h ; 'H'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
mov rdi, rax
call __clang_call_terminate
|
void ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(void)>)::Impl::~Impl(
ftxui::ComponentBase *this)
{
void ( *v1)(char *, char *, long long); // rax
*(_QWORD *)this = off_592A0;
v1 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 7);
if ( v1 )
v1((char *)this + 40, (char *)this + 40, 3LL);
ftxui::ComponentBase::~ComponentBase(this);
operator delete(this, 0x48uLL);
}
|
~Impl:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1592a0]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RDI + 0x38]
TEST RAX,RAX
JZ 0x0012d473
LEA RDI,[RBX + 0x28]
LAB_0012d469:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0012d473:
MOV RDI,RBX
CALL 0x001272d8
MOV ESI,0x48
MOV RDI,RBX
POP RBX
JMP 0x0010b400
|
/* ~Impl() */
void __thiscall
ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node>()>)::Impl::~Impl(Impl *this)
{
*(int ***)this = &PTR__Impl_001592a0;
if (*(code **)(this + 0x38) != (code *)0x0) {
/* try { // try from 0012d469 to 0012d472 has its CatchHandler @ 0012d489 */
(**(code **)(this + 0x38))(this + 0x28,this + 0x28,3);
}
ComponentBase::~ComponentBase((ComponentBase *)this);
operator_delete(this,0x48);
return;
}
|
|
14,531
|
js_add_slow
|
bluesky950520[P]quickjs/quickjs.c
|
int js_add_slow(JSContext *ctx, JSValue *sp)
{
JSValue op1, op2;
uint32_t tag1, tag2;
op1 = sp[-2];
op2 = sp[-1];
tag1 = JS_VALUE_GET_NORM_TAG(op1);
tag2 = JS_VALUE_GET_NORM_TAG(op2);
/* fast path for float64 */
if (tag1 == JS_TAG_FLOAT64 && tag2 == JS_TAG_FLOAT64) {
double d1, d2;
d1 = JS_VALUE_GET_FLOAT64(op1);
d2 = JS_VALUE_GET_FLOAT64(op2);
sp[-2] = js_float64(d1 + d2);
return 0;
}
if (tag1 == JS_TAG_OBJECT || tag2 == JS_TAG_OBJECT) {
op1 = JS_ToPrimitiveFree(ctx, op1, HINT_NONE);
if (JS_IsException(op1)) {
JS_FreeValue(ctx, op2);
goto exception;
}
op2 = JS_ToPrimitiveFree(ctx, op2, HINT_NONE);
if (JS_IsException(op2)) {
JS_FreeValue(ctx, op1);
goto exception;
}
tag1 = JS_VALUE_GET_NORM_TAG(op1);
tag2 = JS_VALUE_GET_NORM_TAG(op2);
}
if (tag1 == JS_TAG_STRING || tag2 == JS_TAG_STRING) {
sp[-2] = JS_ConcatString(ctx, op1, op2);
if (JS_IsException(sp[-2]))
goto exception;
return 0;
}
op1 = JS_ToNumericFree(ctx, op1);
if (JS_IsException(op1)) {
JS_FreeValue(ctx, op2);
goto exception;
}
op2 = JS_ToNumericFree(ctx, op2);
if (JS_IsException(op2)) {
JS_FreeValue(ctx, op1);
goto exception;
}
tag1 = JS_VALUE_GET_NORM_TAG(op1);
tag2 = JS_VALUE_GET_NORM_TAG(op2);
if (tag1 == JS_TAG_INT && tag2 == JS_TAG_INT) {
int32_t v1, v2;
int64_t v;
v1 = JS_VALUE_GET_INT(op1);
v2 = JS_VALUE_GET_INT(op2);
v = (int64_t)v1 + (int64_t)v2;
sp[-2] = js_int64(v);
} else if (tag1 == JS_TAG_BIG_INT || tag2 == JS_TAG_BIG_INT) {
if (js_binary_arith_bigint(ctx, OP_add, sp - 2, op1, op2))
goto exception;
} else {
double d1, d2;
/* float64 result */
if (JS_ToFloat64Free(ctx, &d1, op1)) {
JS_FreeValue(ctx, op2);
goto exception;
}
if (JS_ToFloat64Free(ctx, &d2, op2))
goto exception;
sp[-2] = js_float64(d1 + d2);
}
return 0;
exception:
sp[-2] = JS_UNDEFINED;
sp[-1] = JS_UNDEFINED;
return -1;
}
|
O0
|
c
|
js_add_slow:
subq $0x148, %rsp # imm = 0x148
movq %rdi, 0x138(%rsp)
movq %rsi, 0x130(%rsp)
movq 0x130(%rsp), %rax
movq -0x20(%rax), %rcx
movq %rcx, 0x120(%rsp)
movq -0x18(%rax), %rax
movq %rax, 0x128(%rsp)
movq 0x130(%rsp), %rax
movq -0x10(%rax), %rcx
movq %rcx, 0x110(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x118(%rsp)
movq 0x128(%rsp), %rax
movl %eax, 0x10c(%rsp)
movq 0x118(%rsp), %rax
movl %eax, 0x108(%rsp)
cmpl $0x7, 0x10c(%rsp)
jne 0x70909
cmpl $0x7, 0x108(%rsp)
jne 0x70909
movsd 0x120(%rsp), %xmm0
movsd %xmm0, 0x100(%rsp)
movsd 0x110(%rsp), %xmm0
movsd %xmm0, 0xf8(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0x30(%rsp)
movsd 0x100(%rsp), %xmm0
addsd 0xf8(%rsp), %xmm0
callq 0x53950
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0xe8(%rsp)
movq %rdx, 0xf0(%rsp)
movq 0xe8(%rsp), %rcx
movq %rcx, -0x20(%rax)
movq 0xf0(%rsp), %rcx
movq %rcx, -0x18(%rax)
movl $0x0, 0x144(%rsp)
jmp 0x70e62
cmpl $-0x1, 0x10c(%rsp)
je 0x70921
cmpl $-0x1, 0x108(%rsp)
jne 0x70a5b
movq 0x138(%rsp), %rdi
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
movl $0x2, %ecx
callq 0x68100
movq %rax, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x120(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0x120(%rsp), %rdi
movq 0x128(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x709af
movq 0x138(%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
callq 0x29f80
jmp 0x70e01
movq 0x138(%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
movl $0x2, %ecx
callq 0x68100
movq %rax, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x118(%rsp)
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x70a3d
movq 0x138(%rsp), %rdi
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
callq 0x29f80
jmp 0x70e01
movq 0x128(%rsp), %rax
movl %eax, 0x10c(%rsp)
movq 0x118(%rsp), %rax
movl %eax, 0x108(%rsp)
cmpl $-0x7, 0x10c(%rsp)
je 0x70a73
cmpl $-0x7, 0x108(%rsp)
jne 0x70b0c
movq 0x130(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x138(%rsp), %rdi
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
movq 0x110(%rsp), %rcx
movq 0x118(%rsp), %r8
callq 0x70e80
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0xb8(%rsp)
movq %rdx, 0xc0(%rsp)
movq 0xb8(%rsp), %rcx
movq %rcx, -0x20(%rax)
movq 0xc0(%rsp), %rcx
movq %rcx, -0x18(%rax)
movq 0x130(%rsp), %rax
movq -0x20(%rax), %rdi
movq -0x18(%rax), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x70afc
jmp 0x70e01
movl $0x0, 0x144(%rsp)
jmp 0x70e62
movq 0x138(%rsp), %rdi
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
callq 0x76d20
movq %rax, 0xa8(%rsp)
movq %rdx, 0xb0(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x120(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0x120(%rsp), %rdi
movq 0x128(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x70b95
movq 0x138(%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
callq 0x29f80
jmp 0x70e01
movq 0x138(%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
callq 0x76d20
movq %rax, 0x98(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x118(%rsp)
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x70c1e
movq 0x138(%rsp), %rdi
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
callq 0x29f80
jmp 0x70e01
movq 0x128(%rsp), %rax
movl %eax, 0x10c(%rsp)
movq 0x118(%rsp), %rax
movl %eax, 0x108(%rsp)
cmpl $0x0, 0x10c(%rsp)
jne 0x70cd8
cmpl $0x0, 0x108(%rsp)
jne 0x70cd8
movl 0x120(%rsp), %eax
movl %eax, 0x94(%rsp)
movl 0x110(%rsp), %eax
movl %eax, 0x90(%rsp)
movslq 0x94(%rsp), %rax
movslq 0x90(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x88(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x88(%rsp), %rdi
callq 0x3d770
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq 0x78(%rsp), %rcx
movq %rcx, -0x20(%rax)
movq 0x80(%rsp), %rcx
movq %rcx, -0x18(%rax)
jmp 0x70df4
cmpl $-0x9, 0x10c(%rsp)
je 0x70cec
cmpl $-0x9, 0x108(%rsp)
jne 0x70d41
movq 0x138(%rsp), %rdi
movq 0x130(%rsp), %rdx
addq $-0x20, %rdx
movq 0x120(%rsp), %rcx
movq 0x128(%rsp), %r8
movl $0x9d, %esi
leaq 0x110(%rsp), %rax
movq (%rax), %r9
movq %r9, (%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x76d70
cmpl $0x0, %eax
je 0x70d3c
jmp 0x70e01
jmp 0x70df2
movq 0x138(%rsp), %rdi
movq 0x120(%rsp), %rdx
movq 0x128(%rsp), %rcx
leaq 0x70(%rsp), %rsi
callq 0x3e8e0
cmpl $0x0, %eax
je 0x70d87
movq 0x138(%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
callq 0x29f80
jmp 0x70e01
movq 0x138(%rsp), %rdi
movq 0x110(%rsp), %rdx
movq 0x118(%rsp), %rcx
leaq 0x68(%rsp), %rsi
callq 0x3e8e0
cmpl $0x0, %eax
je 0x70db0
jmp 0x70e01
movq 0x130(%rsp), %rax
movq %rax, 0x18(%rsp)
movsd 0x70(%rsp), %xmm0
addsd 0x68(%rsp), %xmm0
callq 0x53950
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %rcx
movq %rcx, -0x20(%rax)
movq 0x60(%rsp), %rcx
movq %rcx, -0x18(%rax)
jmp 0x70df4
movl $0x0, 0x144(%rsp)
jmp 0x70e62
movq 0x130(%rsp), %rax
movl $0x0, 0x48(%rsp)
movq $0x3, 0x50(%rsp)
movq 0x48(%rsp), %rcx
movq %rcx, -0x20(%rax)
movq 0x50(%rsp), %rcx
movq %rcx, -0x18(%rax)
movq 0x130(%rsp), %rax
movl $0x0, 0x38(%rsp)
movq $0x3, 0x40(%rsp)
movq 0x38(%rsp), %rcx
movq %rcx, -0x10(%rax)
movq 0x40(%rsp), %rcx
movq %rcx, -0x8(%rax)
movl $0xffffffff, 0x144(%rsp) # imm = 0xFFFFFFFF
movl 0x144(%rsp), %eax
addq $0x148, %rsp # imm = 0x148
retq
nopw %cs:(%rax,%rax)
|
js_add_slow:
sub rsp, 148h
mov [rsp+148h+var_10], rdi
mov [rsp+148h+var_18], rsi
mov rax, [rsp+148h+var_18]
mov rcx, [rax-20h]
mov [rsp+148h+var_28], rcx
mov rax, [rax-18h]
mov [rsp+148h+var_20], rax
mov rax, [rsp+148h+var_18]
mov rcx, [rax-10h]
mov [rsp+148h+var_38], rcx
mov rax, [rax-8]
mov [rsp+148h+var_30], rax
mov rax, [rsp+148h+var_20]
mov [rsp+148h+var_3C], eax
mov rax, [rsp+148h+var_30]
mov [rsp+148h+var_40], eax
cmp [rsp+148h+var_3C], 7
jnz loc_70909
cmp [rsp+148h+var_40], 7
jnz loc_70909
movsd xmm0, [rsp+148h+var_28]
movsd [rsp+148h+var_48], xmm0
movsd xmm0, [rsp+148h+var_38]
movsd [rsp+148h+var_50], xmm0
mov rax, [rsp+148h+var_18]
mov [rsp+148h+var_118], rax
movsd xmm0, [rsp+148h+var_48]
addsd xmm0, [rsp+148h+var_50]
call js_float64
mov rcx, rax
mov rax, [rsp+148h+var_118]
mov [rsp+148h+var_60], rcx
mov [rsp+148h+var_58], rdx
mov rcx, [rsp+148h+var_60]
mov [rax-20h], rcx
mov rcx, [rsp+148h+var_58]
mov [rax-18h], rcx
mov [rsp+148h+var_4], 0
jmp loc_70E62
loc_70909:
cmp [rsp+148h+var_3C], 0FFFFFFFFh
jz short loc_70921
cmp [rsp+148h+var_40], 0FFFFFFFFh
jnz loc_70A5B
loc_70921:
mov rdi, [rsp+148h+var_10]
mov rsi, [rsp+148h+var_28]
mov rdx, [rsp+148h+var_20]
mov ecx, 2
call JS_ToPrimitiveFree
mov [rsp+148h+var_70], rax
mov [rsp+148h+var_68], rdx
mov rax, [rsp+148h+var_70]
mov [rsp+148h+var_28], rax
mov rax, [rsp+148h+var_68]
mov [rsp+148h+var_20], rax
mov rdi, [rsp+148h+var_28]
mov rsi, [rsp+148h+var_20]
call JS_IsException_1
cmp eax, 0
jz short loc_709AF
mov rdi, [rsp+148h+var_10]
mov rsi, [rsp+148h+var_38]
mov rdx, [rsp+148h+var_30]
call JS_FreeValue
jmp loc_70E01
loc_709AF:
mov rdi, [rsp+148h+var_10]
mov rsi, [rsp+148h+var_38]
mov rdx, [rsp+148h+var_30]
mov ecx, 2
call JS_ToPrimitiveFree
mov [rsp+148h+var_80], rax
mov [rsp+148h+var_78], rdx
mov rax, [rsp+148h+var_80]
mov [rsp+148h+var_38], rax
mov rax, [rsp+148h+var_78]
mov [rsp+148h+var_30], rax
mov rdi, [rsp+148h+var_38]
mov rsi, [rsp+148h+var_30]
call JS_IsException_1
cmp eax, 0
jz short loc_70A3D
mov rdi, [rsp+148h+var_10]
mov rsi, [rsp+148h+var_28]
mov rdx, [rsp+148h+var_20]
call JS_FreeValue
jmp loc_70E01
loc_70A3D:
mov rax, [rsp+148h+var_20]
mov [rsp+148h+var_3C], eax
mov rax, [rsp+148h+var_30]
mov [rsp+148h+var_40], eax
loc_70A5B:
cmp [rsp+148h+var_3C], 0FFFFFFF9h
jz short loc_70A73
cmp [rsp+148h+var_40], 0FFFFFFF9h
jnz loc_70B0C
loc_70A73:
mov rax, [rsp+148h+var_18]
mov [rsp+148h+var_120], rax
mov rdi, [rsp+148h+var_10]
mov rsi, [rsp+148h+var_28]
mov rdx, [rsp+148h+var_20]
mov rcx, [rsp+148h+var_38]
mov r8, [rsp+148h+var_30]
call JS_ConcatString
mov rcx, rax
mov rax, [rsp+148h+var_120]
mov [rsp+148h+var_90], rcx
mov [rsp+148h+var_88], rdx
mov rcx, [rsp+148h+var_90]
mov [rax-20h], rcx
mov rcx, [rsp+148h+var_88]
mov [rax-18h], rcx
mov rax, [rsp+148h+var_18]
mov rdi, [rax-20h]
mov rsi, [rax-18h]
call JS_IsException_1
cmp eax, 0
jz short loc_70AFC
jmp loc_70E01
loc_70AFC:
mov [rsp+148h+var_4], 0
jmp loc_70E62
loc_70B0C:
mov rdi, [rsp+148h+var_10]
mov rsi, [rsp+148h+var_28]
mov rdx, [rsp+148h+var_20]
call JS_ToNumericFree
mov [rsp+148h+var_A0], rax
mov [rsp+148h+var_98], rdx
mov rax, [rsp+148h+var_A0]
mov [rsp+148h+var_28], rax
mov rax, [rsp+148h+var_98]
mov [rsp+148h+var_20], rax
mov rdi, [rsp+148h+var_28]
mov rsi, [rsp+148h+var_20]
call JS_IsException_1
cmp eax, 0
jz short loc_70B95
mov rdi, [rsp+148h+var_10]
mov rsi, [rsp+148h+var_38]
mov rdx, [rsp+148h+var_30]
call JS_FreeValue
jmp loc_70E01
loc_70B95:
mov rdi, [rsp+148h+var_10]
mov rsi, [rsp+148h+var_38]
mov rdx, [rsp+148h+var_30]
call JS_ToNumericFree
mov [rsp+148h+var_B0], rax
mov [rsp+148h+var_A8], rdx
mov rax, [rsp+148h+var_B0]
mov [rsp+148h+var_38], rax
mov rax, [rsp+148h+var_A8]
mov [rsp+148h+var_30], rax
mov rdi, [rsp+148h+var_38]
mov rsi, [rsp+148h+var_30]
call JS_IsException_1
cmp eax, 0
jz short loc_70C1E
mov rdi, [rsp+148h+var_10]
mov rsi, [rsp+148h+var_28]
mov rdx, [rsp+148h+var_20]
call JS_FreeValue
jmp loc_70E01
loc_70C1E:
mov rax, [rsp+148h+var_20]
mov [rsp+148h+var_3C], eax
mov rax, [rsp+148h+var_30]
mov [rsp+148h+var_40], eax
cmp [rsp+148h+var_3C], 0
jnz loc_70CD8
cmp [rsp+148h+var_40], 0
jnz loc_70CD8
mov eax, dword ptr [rsp+148h+var_28]
mov [rsp+148h+var_B4], eax
mov eax, dword ptr [rsp+148h+var_38]
mov [rsp+148h+var_B8], eax
movsxd rax, [rsp+148h+var_B4]
movsxd rcx, [rsp+148h+var_B8]
add rax, rcx
mov [rsp+148h+var_C0], rax
mov rax, [rsp+148h+var_18]
mov [rsp+148h+var_128], rax
mov rdi, [rsp+148h+var_C0]
call js_int64
mov rcx, rax
mov rax, [rsp+148h+var_128]
mov [rsp+148h+var_D0], rcx
mov [rsp+148h+var_C8], rdx
mov rcx, [rsp+148h+var_D0]
mov [rax-20h], rcx
mov rcx, [rsp+148h+var_C8]
mov [rax-18h], rcx
jmp loc_70DF4
loc_70CD8:
cmp [rsp+148h+var_3C], 0FFFFFFF7h
jz short loc_70CEC
cmp [rsp+148h+var_40], 0FFFFFFF7h
jnz short loc_70D41
loc_70CEC:
mov rdi, [rsp+148h+var_10]
mov rdx, [rsp+148h+var_18]
add rdx, 0FFFFFFFFFFFFFFE0h
mov rcx, [rsp+148h+var_28]
mov r8, [rsp+148h+var_20]
mov esi, 9Dh
lea rax, [rsp+148h+var_38]
mov r9, [rax]
mov [rsp+148h+var_148], r9
mov rax, [rax+8]
mov [rsp+148h+var_140], rax
call js_binary_arith_bigint
cmp eax, 0
jz short loc_70D3C
jmp loc_70E01
loc_70D3C:
jmp loc_70DF2
loc_70D41:
mov rdi, [rsp+148h+var_10]
mov rdx, [rsp+148h+var_28]
mov rcx, [rsp+148h+var_20]
lea rsi, [rsp+148h+var_D8]
call JS_ToFloat64Free
cmp eax, 0
jz short loc_70D87
mov rdi, [rsp+148h+var_10]
mov rsi, [rsp+148h+var_38]
mov rdx, [rsp+148h+var_30]
call JS_FreeValue
jmp short loc_70E01
loc_70D87:
mov rdi, [rsp+148h+var_10]
mov rdx, [rsp+148h+var_38]
mov rcx, [rsp+148h+var_30]
lea rsi, [rsp+148h+var_E0]
call JS_ToFloat64Free
cmp eax, 0
jz short loc_70DB0
jmp short loc_70E01
loc_70DB0:
mov rax, [rsp+148h+var_18]
mov [rsp+148h+var_130], rax
movsd xmm0, [rsp+148h+var_D8]
addsd xmm0, [rsp+148h+var_E0]
call js_float64
mov rcx, rax
mov rax, [rsp+148h+var_130]
mov [rsp+148h+var_F0], rcx
mov [rsp+148h+var_E8], rdx
mov rcx, [rsp+148h+var_F0]
mov [rax-20h], rcx
mov rcx, [rsp+148h+var_E8]
mov [rax-18h], rcx
loc_70DF2:
jmp short $+2
loc_70DF4:
mov [rsp+148h+var_4], 0
jmp short loc_70E62
loc_70E01:
mov rax, [rsp+148h+var_18]
mov dword ptr [rsp+148h+var_100], 0
mov [rsp+148h+var_F8], 3
mov rcx, [rsp+148h+var_100]
mov [rax-20h], rcx
mov rcx, [rsp+148h+var_F8]
mov [rax-18h], rcx
mov rax, [rsp+148h+var_18]
mov dword ptr [rsp+148h+var_110], 0
mov [rsp+148h+var_108], 3
mov rcx, [rsp+148h+var_110]
mov [rax-10h], rcx
mov rcx, [rsp+148h+var_108]
mov [rax-8], rcx
mov [rsp+148h+var_4], 0FFFFFFFFh
loc_70E62:
mov eax, [rsp+148h+var_4]
add rsp, 148h
retn
|
long long js_add_slow(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
long long v14; // rax
long long v15; // rdx
long long v16; // rdx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
long long v22; // rdx
long long v23; // rdx
long long v24; // rdx
long long v25; // rax
long long v26; // rdx
long long v27; // rdx
long long v28; // rax
long long v29; // rax
long long v31; // [rsp+18h] [rbp-130h]
long long v32; // [rsp+20h] [rbp-128h]
long long v33; // [rsp+28h] [rbp-120h]
long long v34; // [rsp+30h] [rbp-118h]
long long v35; // [rsp+38h] [rbp-110h]
long long v36; // [rsp+48h] [rbp-100h]
double v37; // [rsp+68h] [rbp-E0h] BYREF
double v38; // [rsp+70h] [rbp-D8h] BYREF
long long v39; // [rsp+80h] [rbp-C8h]
long long v40; // [rsp+88h] [rbp-C0h]
int v41; // [rsp+90h] [rbp-B8h]
int v42; // [rsp+94h] [rbp-B4h]
long long v43; // [rsp+98h] [rbp-B0h]
long long v44; // [rsp+A0h] [rbp-A8h]
long long v45; // [rsp+A8h] [rbp-A0h]
long long v46; // [rsp+B0h] [rbp-98h]
long long v47; // [rsp+B8h] [rbp-90h]
long long v48; // [rsp+C0h] [rbp-88h]
long long v49; // [rsp+C8h] [rbp-80h]
long long v50; // [rsp+D0h] [rbp-78h]
long long v51; // [rsp+D8h] [rbp-70h]
long long v52; // [rsp+E0h] [rbp-68h]
long long v53; // [rsp+F0h] [rbp-58h]
long long v54; // [rsp+F8h] [rbp-50h]
long long v55; // [rsp+100h] [rbp-48h]
int v56; // [rsp+108h] [rbp-40h]
int v57; // [rsp+10Ch] [rbp-3Ch]
long long v58; // [rsp+110h] [rbp-38h]
long long v59; // [rsp+118h] [rbp-30h]
long long v60; // [rsp+120h] [rbp-28h]
long long v61; // [rsp+128h] [rbp-20h]
long long v62; // [rsp+130h] [rbp-18h]
long long v63; // [rsp+138h] [rbp-10h]
v63 = a1;
v62 = a2;
v60 = *(long long *)(a2 - 32);
v61 = *(_QWORD *)(a2 - 24);
v58 = *(long long *)(a2 - 16);
v59 = *(_QWORD *)(a2 - 8);
v57 = v61;
v56 = v59;
if ( __PAIR64__(v61, v59) != 0x700000007LL )
{
if ( v57 == -1 || v56 == -1 )
{
v51 = JS_ToPrimitiveFree(v63, v60, v61, 2LL, a13, a14, a3, a4, a5, a6, a7, a8, a9, a10);
v52 = v16;
v60 = v51;
v61 = v16;
if ( JS_IsException_1(v51, v16) )
goto LABEL_6;
v49 = JS_ToPrimitiveFree(v63, v58, v59, 2LL, v17, v18, a3, a4, a5, a6, v19, v20, a9, a10);
v50 = v21;
v58 = v49;
v59 = v21;
if ( JS_IsException_1(v49, v21) )
goto LABEL_8;
v57 = v61;
v56 = v59;
}
if ( v57 == -7 || v56 == -7 )
{
v33 = v62;
v47 = JS_ConcatString(v63, v60, v61, v58, v59);
v48 = v22;
*(_QWORD *)(v62 - 32) = v47;
*(_QWORD *)(v33 - 24) = v48;
if ( !JS_IsException_1(*(_QWORD *)(v62 - 32), *(_QWORD *)(v62 - 24)) )
return 0;
LABEL_28:
v28 = v62;
LODWORD(v36) = 0;
*(_QWORD *)(v62 - 32) = v36;
*(_QWORD *)(v28 - 24) = 3LL;
v29 = v62;
LODWORD(v35) = 0;
*(_QWORD *)(v62 - 16) = v35;
*(_QWORD *)(v29 - 8) = 3LL;
return (unsigned int)-1;
}
v45 = JS_ToNumericFree(v63, v60, v61);
v46 = v23;
v60 = v45;
v61 = v23;
if ( JS_IsException_1(v45, v23) )
{
LABEL_6:
JS_FreeValue(v63, v58, v59);
goto LABEL_28;
}
v43 = JS_ToNumericFree(v63, v58, v59);
v44 = v24;
v58 = v43;
v59 = v24;
if ( !JS_IsException_1(v43, v24) )
{
v57 = v61;
v56 = v59;
if ( (_DWORD)v61 || v56 )
{
if ( v57 == -9 || v56 == -9 )
{
if ( (unsigned int)js_binary_arith_bigint(v63, 157, (int)v62 - 32, v60, v61, v58, v58, v59) )
goto LABEL_28;
}
else
{
if ( (unsigned int)JS_ToFloat64Free(v63, &v38, v60, v61) )
{
JS_FreeValue(v63, v58, v59);
goto LABEL_28;
}
if ( (unsigned int)JS_ToFloat64Free(v63, &v37, v58, v59) )
goto LABEL_28;
v31 = v62;
*(_QWORD *)(v31 - 32) = js_float64(v38 + v37);
*(_QWORD *)(v31 - 24) = v27;
}
}
else
{
v42 = v60;
v41 = v58;
v40 = (int)v58 + (long long)(int)v60;
v32 = v62;
v25 = js_int64(v40);
v39 = v26;
*(_QWORD *)(v62 - 32) = v25;
*(_QWORD *)(v32 - 24) = v39;
}
return 0;
}
LABEL_8:
JS_FreeValue(v63, v60, v61);
goto LABEL_28;
}
v55 = v60;
v54 = v58;
v34 = v62;
v14 = js_float64(*(double *)&v60 + *(double *)&v58);
v53 = v15;
*(_QWORD *)(v62 - 32) = v14;
*(_QWORD *)(v34 - 24) = v53;
return 0;
}
|
js_add_slow:
SUB RSP,0x148
MOV qword ptr [RSP + 0x138],RDI
MOV qword ptr [RSP + 0x130],RSI
MOV RAX,qword ptr [RSP + 0x130]
MOV RCX,qword ptr [RAX + -0x20]
MOV qword ptr [RSP + 0x120],RCX
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RSP + 0x128],RAX
MOV RAX,qword ptr [RSP + 0x130]
MOV RCX,qword ptr [RAX + -0x10]
MOV qword ptr [RSP + 0x110],RCX
MOV RAX,qword ptr [RAX + -0x8]
MOV qword ptr [RSP + 0x118],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV dword ptr [RSP + 0x10c],EAX
MOV RAX,qword ptr [RSP + 0x118]
MOV dword ptr [RSP + 0x108],EAX
CMP dword ptr [RSP + 0x10c],0x7
JNZ 0x00170909
CMP dword ptr [RSP + 0x108],0x7
JNZ 0x00170909
MOVSD XMM0,qword ptr [RSP + 0x120]
MOVSD qword ptr [RSP + 0x100],XMM0
MOVSD XMM0,qword ptr [RSP + 0x110]
MOVSD qword ptr [RSP + 0xf8],XMM0
MOV RAX,qword ptr [RSP + 0x130]
MOV qword ptr [RSP + 0x30],RAX
MOVSD XMM0,qword ptr [RSP + 0x100]
ADDSD XMM0,qword ptr [RSP + 0xf8]
CALL 0x00153950
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0xe8],RCX
MOV qword ptr [RSP + 0xf0],RDX
MOV RCX,qword ptr [RSP + 0xe8]
MOV qword ptr [RAX + -0x20],RCX
MOV RCX,qword ptr [RSP + 0xf0]
MOV qword ptr [RAX + -0x18],RCX
MOV dword ptr [RSP + 0x144],0x0
JMP 0x00170e62
LAB_00170909:
CMP dword ptr [RSP + 0x10c],-0x1
JZ 0x00170921
CMP dword ptr [RSP + 0x108],-0x1
JNZ 0x00170a5b
LAB_00170921:
MOV RDI,qword ptr [RSP + 0x138]
MOV RSI,qword ptr [RSP + 0x120]
MOV RDX,qword ptr [RSP + 0x128]
MOV ECX,0x2
CALL 0x00168100
MOV qword ptr [RSP + 0xd8],RAX
MOV qword ptr [RSP + 0xe0],RDX
MOV RAX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0x120],RAX
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x128],RAX
MOV RDI,qword ptr [RSP + 0x120]
MOV RSI,qword ptr [RSP + 0x128]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x001709af
MOV RDI,qword ptr [RSP + 0x138]
MOV RSI,qword ptr [RSP + 0x110]
MOV RDX,qword ptr [RSP + 0x118]
CALL 0x00129f80
JMP 0x00170e01
LAB_001709af:
MOV RDI,qword ptr [RSP + 0x138]
MOV RSI,qword ptr [RSP + 0x110]
MOV RDX,qword ptr [RSP + 0x118]
MOV ECX,0x2
CALL 0x00168100
MOV qword ptr [RSP + 0xc8],RAX
MOV qword ptr [RSP + 0xd0],RDX
MOV RAX,qword ptr [RSP + 0xc8]
MOV qword ptr [RSP + 0x110],RAX
MOV RAX,qword ptr [RSP + 0xd0]
MOV qword ptr [RSP + 0x118],RAX
MOV RDI,qword ptr [RSP + 0x110]
MOV RSI,qword ptr [RSP + 0x118]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x00170a3d
MOV RDI,qword ptr [RSP + 0x138]
MOV RSI,qword ptr [RSP + 0x120]
MOV RDX,qword ptr [RSP + 0x128]
CALL 0x00129f80
JMP 0x00170e01
LAB_00170a3d:
MOV RAX,qword ptr [RSP + 0x128]
MOV dword ptr [RSP + 0x10c],EAX
MOV RAX,qword ptr [RSP + 0x118]
MOV dword ptr [RSP + 0x108],EAX
LAB_00170a5b:
CMP dword ptr [RSP + 0x10c],-0x7
JZ 0x00170a73
CMP dword ptr [RSP + 0x108],-0x7
JNZ 0x00170b0c
LAB_00170a73:
MOV RAX,qword ptr [RSP + 0x130]
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x138]
MOV RSI,qword ptr [RSP + 0x120]
MOV RDX,qword ptr [RSP + 0x128]
MOV RCX,qword ptr [RSP + 0x110]
MOV R8,qword ptr [RSP + 0x118]
CALL 0x00170e80
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0xb8],RCX
MOV qword ptr [RSP + 0xc0],RDX
MOV RCX,qword ptr [RSP + 0xb8]
MOV qword ptr [RAX + -0x20],RCX
MOV RCX,qword ptr [RSP + 0xc0]
MOV qword ptr [RAX + -0x18],RCX
MOV RAX,qword ptr [RSP + 0x130]
MOV RDI,qword ptr [RAX + -0x20]
MOV RSI,qword ptr [RAX + -0x18]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x00170afc
JMP 0x00170e01
LAB_00170afc:
MOV dword ptr [RSP + 0x144],0x0
JMP 0x00170e62
LAB_00170b0c:
MOV RDI,qword ptr [RSP + 0x138]
MOV RSI,qword ptr [RSP + 0x120]
MOV RDX,qword ptr [RSP + 0x128]
CALL 0x00176d20
MOV qword ptr [RSP + 0xa8],RAX
MOV qword ptr [RSP + 0xb0],RDX
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x120],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x128],RAX
MOV RDI,qword ptr [RSP + 0x120]
MOV RSI,qword ptr [RSP + 0x128]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x00170b95
MOV RDI,qword ptr [RSP + 0x138]
MOV RSI,qword ptr [RSP + 0x110]
MOV RDX,qword ptr [RSP + 0x118]
CALL 0x00129f80
JMP 0x00170e01
LAB_00170b95:
MOV RDI,qword ptr [RSP + 0x138]
MOV RSI,qword ptr [RSP + 0x110]
MOV RDX,qword ptr [RSP + 0x118]
CALL 0x00176d20
MOV qword ptr [RSP + 0x98],RAX
MOV qword ptr [RSP + 0xa0],RDX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x110],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x118],RAX
MOV RDI,qword ptr [RSP + 0x110]
MOV RSI,qword ptr [RSP + 0x118]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x00170c1e
MOV RDI,qword ptr [RSP + 0x138]
MOV RSI,qword ptr [RSP + 0x120]
MOV RDX,qword ptr [RSP + 0x128]
CALL 0x00129f80
JMP 0x00170e01
LAB_00170c1e:
MOV RAX,qword ptr [RSP + 0x128]
MOV dword ptr [RSP + 0x10c],EAX
MOV RAX,qword ptr [RSP + 0x118]
MOV dword ptr [RSP + 0x108],EAX
CMP dword ptr [RSP + 0x10c],0x0
JNZ 0x00170cd8
CMP dword ptr [RSP + 0x108],0x0
JNZ 0x00170cd8
MOV EAX,dword ptr [RSP + 0x120]
MOV dword ptr [RSP + 0x94],EAX
MOV EAX,dword ptr [RSP + 0x110]
MOV dword ptr [RSP + 0x90],EAX
MOVSXD RAX,dword ptr [RSP + 0x94]
MOVSXD RCX,dword ptr [RSP + 0x90]
ADD RAX,RCX
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x130]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x0013d770
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x78],RCX
MOV qword ptr [RSP + 0x80],RDX
MOV RCX,qword ptr [RSP + 0x78]
MOV qword ptr [RAX + -0x20],RCX
MOV RCX,qword ptr [RSP + 0x80]
MOV qword ptr [RAX + -0x18],RCX
JMP 0x00170df4
LAB_00170cd8:
CMP dword ptr [RSP + 0x10c],-0x9
JZ 0x00170cec
CMP dword ptr [RSP + 0x108],-0x9
JNZ 0x00170d41
LAB_00170cec:
MOV RDI,qword ptr [RSP + 0x138]
MOV RDX,qword ptr [RSP + 0x130]
ADD RDX,-0x20
MOV RCX,qword ptr [RSP + 0x120]
MOV R8,qword ptr [RSP + 0x128]
MOV ESI,0x9d
LEA RAX,[RSP + 0x110]
MOV R9,qword ptr [RAX]
MOV qword ptr [RSP],R9
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00176d70
CMP EAX,0x0
JZ 0x00170d3c
JMP 0x00170e01
LAB_00170d3c:
JMP 0x00170df2
LAB_00170d41:
MOV RDI,qword ptr [RSP + 0x138]
MOV RDX,qword ptr [RSP + 0x120]
MOV RCX,qword ptr [RSP + 0x128]
LEA RSI,[RSP + 0x70]
CALL 0x0013e8e0
CMP EAX,0x0
JZ 0x00170d87
MOV RDI,qword ptr [RSP + 0x138]
MOV RSI,qword ptr [RSP + 0x110]
MOV RDX,qword ptr [RSP + 0x118]
CALL 0x00129f80
JMP 0x00170e01
LAB_00170d87:
MOV RDI,qword ptr [RSP + 0x138]
MOV RDX,qword ptr [RSP + 0x110]
MOV RCX,qword ptr [RSP + 0x118]
LEA RSI,[RSP + 0x68]
CALL 0x0013e8e0
CMP EAX,0x0
JZ 0x00170db0
JMP 0x00170e01
LAB_00170db0:
MOV RAX,qword ptr [RSP + 0x130]
MOV qword ptr [RSP + 0x18],RAX
MOVSD XMM0,qword ptr [RSP + 0x70]
ADDSD XMM0,qword ptr [RSP + 0x68]
CALL 0x00153950
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x58],RCX
MOV qword ptr [RSP + 0x60],RDX
MOV RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX + -0x20],RCX
MOV RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RAX + -0x18],RCX
LAB_00170df2:
JMP 0x00170df4
LAB_00170df4:
MOV dword ptr [RSP + 0x144],0x0
JMP 0x00170e62
LAB_00170e01:
MOV RAX,qword ptr [RSP + 0x130]
MOV dword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x3
MOV RCX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX + -0x20],RCX
MOV RCX,qword ptr [RSP + 0x50]
MOV qword ptr [RAX + -0x18],RCX
MOV RAX,qword ptr [RSP + 0x130]
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x3
MOV RCX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX + -0x10],RCX
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX + -0x8],RCX
MOV dword ptr [RSP + 0x144],0xffffffff
LAB_00170e62:
MOV EAX,dword ptr [RSP + 0x144]
ADD RSP,0x148
RET
|
int4 js_add_slow(int8 param_1,long param_2)
{
int1 auVar1 [16];
long lVar2;
int iVar3;
int1 auVar4 [16];
uint uStack_10c;
uint uStack_fc;
double local_e0;
double local_d8 [3];
long local_c0;
int local_b8;
int local_b4;
int1 local_b0 [16];
int1 local_a0 [16];
int1 local_90 [16];
int1 local_80 [16];
int1 local_70 [16];
double local_50;
double local_48;
int local_40;
int local_3c;
int1 local_38 [16];
int1 local_28 [16];
long local_18;
int8 local_10;
local_48 = *(double *)*(int1 (*) [16])(param_2 + -0x20);
local_28._8_8_ = *(int8 *)(param_2 + -0x18);
local_50 = *(double *)*(int1 (*) [16])(param_2 + -0x10);
local_38._8_8_ = *(int8 *)(param_2 + -8);
local_3c = (int)local_28._8_8_;
local_40 = (int)local_38._8_8_;
local_38._0_8_ = local_50;
local_28._0_8_ = local_48;
local_18 = param_2;
local_10 = param_1;
if ((local_3c == 7) && (local_40 == 7)) {
auVar4 = js_float64(local_48 + local_50);
*(int1 (*) [16])(param_2 + -0x20) = auVar4;
return 0;
}
if ((local_3c == -1) ||
(auVar4 = *(int1 (*) [16])(param_2 + -0x10),
auVar1 = *(int1 (*) [16])(param_2 + -0x20), local_40 == -1)) {
local_70 = JS_ToPrimitiveFree(param_1,local_48,local_28._8_8_,2);
local_28 = local_70;
iVar3 = JS_IsException(local_70._0_8_,local_70._8_8_);
if (iVar3 != 0) {
JS_FreeValue(local_10,local_38._0_8_,local_38._8_8_);
goto LAB_00170e01;
}
local_80 = JS_ToPrimitiveFree(local_10,local_38._0_8_,local_38._8_8_,2);
local_38 = local_80;
iVar3 = JS_IsException(local_80._0_8_,local_80._8_8_);
if (iVar3 != 0) {
JS_FreeValue(local_10,local_28._0_8_,local_28._8_8_);
goto LAB_00170e01;
}
local_3c = local_28._8_4_;
local_40 = local_38._8_4_;
auVar4 = local_38;
auVar1 = local_28;
}
lVar2 = local_18;
local_28._8_8_ = auVar1._8_8_;
local_28._0_8_ = auVar1._0_8_;
local_38._8_8_ = auVar4._8_8_;
local_38._0_8_ = auVar4._0_8_;
if ((local_3c == -7) || (local_40 == -7)) {
local_90 = JS_ConcatString(local_10,local_28._0_8_,local_28._8_8_,local_38._0_8_,local_38._8_8_)
;
local_28 = auVar1;
local_38 = auVar4;
*(int1 (*) [16])(lVar2 + -0x20) = local_90;
iVar3 = JS_IsException(*(int8 *)(local_18 + -0x20),*(int8 *)(local_18 + -0x18));
if (iVar3 == 0) {
return 0;
}
}
else {
local_38 = auVar4;
local_a0 = JS_ToNumericFree(local_10,local_28._0_8_,local_28._8_8_);
local_28 = auVar1;
local_28 = local_a0;
iVar3 = JS_IsException(local_a0._0_8_,local_a0._8_8_);
if (iVar3 == 0) {
local_b0 = JS_ToNumericFree(local_10,local_38._0_8_,local_38._8_8_);
local_38 = local_b0;
iVar3 = JS_IsException(local_b0._0_8_,local_b0._8_8_);
lVar2 = local_18;
if (iVar3 == 0) {
local_3c = local_28._8_4_;
local_40 = local_38._8_4_;
if ((local_3c == 0) && (local_40 == 0)) {
local_b4 = local_28._0_4_;
local_b8 = local_38._0_4_;
local_c0 = (long)(int)local_28._0_4_ + (long)(int)local_38._0_4_;
auVar4 = js_int64(local_c0);
*(int1 (*) [16])(lVar2 + -0x20) = auVar4;
return 0;
}
if ((local_3c == -9) || (local_40 == -9)) {
iVar3 = js_binary_arith_bigint
(local_10,0x9d,local_18 + -0x20,local_28._0_8_,local_28._8_8_,
local_38._0_8_,local_38);
if (iVar3 == 0) {
return 0;
}
}
else {
iVar3 = JS_ToFloat64Free(local_10,local_d8,local_28._0_8_,local_28._8_8_);
if (iVar3 == 0) {
iVar3 = JS_ToFloat64Free(local_10,&local_e0,local_38._0_8_,local_38._8_8_);
lVar2 = local_18;
if (iVar3 == 0) {
auVar4 = js_float64(local_d8[0] + local_e0);
*(int1 (*) [16])(lVar2 + -0x20) = auVar4;
return 0;
}
}
else {
JS_FreeValue(local_10,local_38._0_8_,local_38._8_8_);
}
}
}
else {
JS_FreeValue(local_10,local_28._0_8_,local_28._8_8_);
}
}
else {
JS_FreeValue(local_10,local_38._0_8_,local_38._8_8_);
}
}
LAB_00170e01:
*(ulong *)(local_18 + -0x20) = (ulong)uStack_fc << 0x20;
*(int8 *)(local_18 + -0x18) = 3;
*(ulong *)(local_18 + -0x10) = (ulong)uStack_10c << 0x20;
*(int8 *)(local_18 + -8) = 3;
return 0xffffffff;
}
|
|
14,532
|
ggml_backend_load
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend-reg.cpp
|
ggml_backend_reg_t ggml_backend_load(const char * path) {
return get_reg().load_backend(utf8_to_utf16(path), false);
}
|
O2
|
cpp
|
ggml_backend_load:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
callq 0xb156
leaq 0x28(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xadd0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0xb4bf
leaq 0xa3cb(%rip), %rdi # 0x15838
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0xa890
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa290
leaq 0x28(%rsp), %rdi
callq 0xa910
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa290
jmp 0xb4ad
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xa910
movq %rbx, %rdi
callq 0xae40
|
ggml_backend_load:
push r14
push rbx
sub rsp, 48h
mov rbx, rdi
call _ZL7get_regv; get_reg(void)
lea r14, [rsp+58h+var_30]
lea rdx, [rsp+58h+var_51]
mov rdi, r14
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+58h+var_50]
mov rsi, r14
call _ZL13utf8_to_utf16RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; utf8_to_utf16(std::string const&)
lea rdi, _ZZL7get_regvE3reg; get_reg(void)::reg
lea rsi, [rsp+58h+var_50]
xor edx, edx
call __ZN21ggml_backend_registry12load_backendERKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEb; ggml_backend_registry::load_backend(std::wstring const&,bool)
mov rbx, rax
lea rdi, [rsp+58h+var_50]
call __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev; std::wstring::~wstring()
lea rdi, [rsp+58h+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 48h
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call __ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEED2Ev; std::wstring::~wstring()
jmp short loc_B4AD
mov rbx, rax
loc_B4AD:
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
long long ggml_backend_load(long long a1)
{
int v1; // ecx
int v2; // r8d
int v3; // r9d
long long backend; // rbx
char v6; // [rsp+7h] [rbp-51h] BYREF
_BYTE v7[32]; // [rsp+8h] [rbp-50h] BYREF
_BYTE v8[48]; // [rsp+28h] [rbp-30h] BYREF
get_reg();
std::string::basic_string<std::allocator<char>>(v8, a1, &v6);
utf8_to_utf16(v7, v8);
backend = ggml_backend_registry::load_backend((unsigned int)&get_reg(void)::reg, (unsigned int)v7, 0, v1, v2, v3);
std::wstring::~wstring(v7);
std::string::~string(v8);
return backend;
}
|
ggml_backend_load:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
CALL 0x0010b156
LEA R14,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
MOV RDI,R14
MOV RSI,RBX
CALL 0x0010add0
LAB_0010b459:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x0010b4bf
LAB_0010b466:
LEA RDI,[0x115838]
LEA RSI,[RSP + 0x8]
XOR EDX,EDX
CALL 0x0010a890
LAB_0010b479:
MOV RBX,RAX
LEA RDI,[RSP + 0x8]
CALL 0x0010a290
LEA RDI,[RSP + 0x28]
CALL 0x0010a910
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R14
RET
|
int8 ggml_backend_load(char *param_1)
{
int8 uVar1;
allocator local_51;
string local_50 [32];
string local_30 [32];
get_reg();
std::__cxx11::string::string<std::allocator<char>>(local_30,param_1,&local_51);
/* try { // try from 0010b459 to 0010b465 has its CatchHandler @ 0010b4aa */
utf8_to_utf16(local_50);
/* try { // try from 0010b466 to 0010b478 has its CatchHandler @ 0010b49b */
uVar1 = ggml_backend_registry::load_backend
((ggml_backend_registry *)get_reg()::reg,(wstring *)local_50,false);
std::__cxx11::wstring::~wstring((wstring *)local_50);
std::__cxx11::string::~string(local_30);
return uVar1;
}
|
|
14,533
|
(anonymous namespace)::SpookyHash::EndPartial(unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&)
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/hash.cpp
|
static inline void EndPartial(
uint64 &h0, uint64 &h1, uint64 &h2, uint64 &h3,
uint64 &h4, uint64 &h5, uint64 &h6, uint64 &h7,
uint64 &h8, uint64 &h9, uint64 &h10,uint64 &h11)
{
h11+= h1; h2 ^= h11; h1 = Rot64(h1,44);
h0 += h2; h3 ^= h0; h2 = Rot64(h2,15);
h1 += h3; h4 ^= h1; h3 = Rot64(h3,34);
h2 += h4; h5 ^= h2; h4 = Rot64(h4,21);
h3 += h5; h6 ^= h3; h5 = Rot64(h5,38);
h4 += h6; h7 ^= h4; h6 = Rot64(h6,33);
h5 += h7; h8 ^= h5; h7 = Rot64(h7,10);
h6 += h8; h9 ^= h6; h8 = Rot64(h8,13);
h7 += h9; h10^= h7; h9 = Rot64(h9,38);
h8 += h10; h11^= h8; h10= Rot64(h10,53);
h9 += h11; h0 ^= h9; h11= Rot64(h11,42);
h10+= h0; h1 ^= h10; h0 = Rot64(h0,54);
}
|
O2
|
cpp
|
(anonymous namespace)::SpookyHash::EndPartial(unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %r10
movq 0x38(%rsp), %rbx
movq 0x30(%rsp), %r14
movq 0x28(%rsp), %r15
movq 0x50(%rsp), %r11
movq (%r11), %r12
addq (%rsi), %r12
movq %r12, (%r11)
xorq %r12, (%rdx)
rolq $0x2c, (%rsi)
movq (%rdi), %r12
addq (%rdx), %r12
movq %r12, (%rdi)
xorq %r12, (%rcx)
rolq $0xf, (%rdx)
movq (%rsi), %r12
addq (%rcx), %r12
movq %r12, (%rsi)
xorq %r12, (%r8)
rolq $0x22, (%rcx)
movq (%rdx), %r12
addq (%r8), %r12
movq %r12, (%rdx)
xorq %r12, (%r9)
rolq $0x15, (%r8)
movq (%rcx), %rdx
addq (%r9), %rdx
movq %rdx, (%rcx)
xorq %rdx, (%r15)
rolq $0x26, (%r9)
movq (%r8), %rcx
addq (%r15), %rcx
movq %rcx, (%r8)
xorq %rcx, (%r14)
rolq $0x21, (%r15)
movq (%r9), %rcx
addq (%r14), %rcx
movq %rcx, (%r9)
xorq %rcx, (%rbx)
rolq $0xa, (%r14)
movq (%r15), %rcx
addq (%rbx), %rcx
movq %rcx, (%r15)
xorq %rcx, (%r10)
rolq $0xd, (%rbx)
movq (%r14), %rcx
addq (%r10), %rcx
movq %rcx, (%r14)
xorq %rcx, (%rax)
rolq $0x26, (%r10)
movq (%rbx), %rcx
addq (%rax), %rcx
movq %rcx, (%rbx)
xorq %rcx, (%r11)
rolq $0x35, (%rax)
movq (%r10), %rcx
addq (%r11), %rcx
movq %rcx, (%r10)
xorq %rcx, (%rdi)
rolq $0x2a, (%r11)
movq (%rax), %rcx
addq (%rdi), %rcx
movq %rcx, (%rax)
xorq %rcx, (%rsi)
rolq $0x36, (%rdi)
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
|
_ZN12_GLOBAL__N_110SpookyHash10EndPartialERmS1_S1_S1_S1_S1_S1_S1_S1_S1_S1_S1_:
push r15
push r14
push r12
push rbx
mov rax, [rsp+20h+arg_20]
mov r10, [rsp+20h+arg_18]
mov rbx, [rsp+20h+arg_10]
mov r14, [rsp+20h+arg_8]
mov r15, [rsp+20h+arg_0]
mov r11, [rsp+20h+arg_28]
mov r12, [r11]
add r12, [rsi]
mov [r11], r12
xor [rdx], r12
rol qword ptr [rsi], 2Ch
mov r12, [rdi]
add r12, [rdx]
mov [rdi], r12
xor [rcx], r12
rol qword ptr [rdx], 0Fh
mov r12, [rsi]
add r12, [rcx]
mov [rsi], r12
xor [r8], r12
rol qword ptr [rcx], 22h
mov r12, [rdx]
add r12, [r8]
mov [rdx], r12
xor [r9], r12
rol qword ptr [r8], 15h
mov rdx, [rcx]
add rdx, [r9]
mov [rcx], rdx
xor [r15], rdx
rol qword ptr [r9], 26h
mov rcx, [r8]
add rcx, [r15]
mov [r8], rcx
xor [r14], rcx
rol qword ptr [r15], 21h
mov rcx, [r9]
add rcx, [r14]
mov [r9], rcx
xor [rbx], rcx
rol qword ptr [r14], 0Ah
mov rcx, [r15]
add rcx, [rbx]
mov [r15], rcx
xor [r10], rcx
rol qword ptr [rbx], 0Dh
mov rcx, [r14]
add rcx, [r10]
mov [r14], rcx
xor [rax], rcx
rol qword ptr [r10], 26h
mov rcx, [rbx]
add rcx, [rax]
mov [rbx], rcx
xor [r11], rcx
rol qword ptr [rax], 35h
mov rcx, [r10]
add rcx, [r11]
mov [r10], rcx
xor [rdi], rcx
rol qword ptr [r11], 2Ah
mov rcx, [rax]
add rcx, [rdi]
mov [rax], rcx
xor [rsi], rcx
rol qword ptr [rdi], 36h
pop rbx
pop r12
pop r14
pop r15
retn
|
unsigned long long * `anonymous namespace'::SpookyHash::EndPartial(
_anonymous_namespace_::SpookyHash *this,
unsigned long long *a2,
unsigned long long *a3,
unsigned long long *a4,
unsigned long long *a5,
unsigned long long *a6,
unsigned long long *a7,
unsigned long long *a8,
unsigned long long *a9,
unsigned long long *a10,
unsigned long long *a11,
unsigned long long *a12)
{
unsigned long long *result; // rax
unsigned long long v13; // r12
unsigned long long v14; // r12
unsigned long long v15; // r12
unsigned long long v16; // r12
unsigned long long v17; // rdx
unsigned long long v18; // rcx
unsigned long long v19; // rcx
unsigned long long v20; // rcx
unsigned long long v21; // rcx
unsigned long long v22; // rcx
unsigned long long v23; // rcx
unsigned long long v24; // rcx
result = a11;
v13 = *a2 + *a12;
*a12 = v13;
*a3 ^= v13;
*a2 = __ROL8__(*a2, 44);
v14 = *a3 + *(_QWORD *)this;
*(_QWORD *)this = v14;
*a4 ^= v14;
*a3 = __ROL8__(*a3, 15);
v15 = *a4 + *a2;
*a2 = v15;
*a5 ^= v15;
*a4 = __ROL8__(*a4, 34);
v16 = *a5 + *a3;
*a3 = v16;
*a6 ^= v16;
*a5 = __ROL8__(*a5, 21);
v17 = *a6 + *a4;
*a4 = v17;
*a7 ^= v17;
*a6 = __ROL8__(*a6, 38);
v18 = *a7 + *a5;
*a5 = v18;
*a8 ^= v18;
*a7 = __ROL8__(*a7, 33);
v19 = *a8 + *a6;
*a6 = v19;
*a9 ^= v19;
*a8 = __ROL8__(*a8, 10);
v20 = *a9 + *a7;
*a7 = v20;
*a10 ^= v20;
*a9 = __ROL8__(*a9, 13);
v21 = *a10 + *a8;
*a8 = v21;
*a11 ^= v21;
*a10 = __ROL8__(*a10, 38);
v22 = *a11 + *a9;
*a9 = v22;
*a12 ^= v22;
*a11 = __ROL8__(*a11, 53);
v23 = *a12 + *a10;
*a10 = v23;
*(_QWORD *)this ^= v23;
*a12 = __ROL8__(*a12, 42);
v24 = *(_QWORD *)this + *a11;
*a11 = v24;
*a2 ^= v24;
*(_QWORD *)this = __ROL8__(*(_QWORD *)this, 54);
return result;
}
|
EndPartial:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RAX,qword ptr [RSP + 0x48]
MOV R10,qword ptr [RSP + 0x40]
MOV RBX,qword ptr [RSP + 0x38]
MOV R14,qword ptr [RSP + 0x30]
MOV R15,qword ptr [RSP + 0x28]
MOV R11,qword ptr [RSP + 0x50]
MOV R12,qword ptr [R11]
ADD R12,qword ptr [RSI]
MOV qword ptr [R11],R12
XOR qword ptr [RDX],R12
ROL qword ptr [RSI],0x2c
MOV R12,qword ptr [RDI]
ADD R12,qword ptr [RDX]
MOV qword ptr [RDI],R12
XOR qword ptr [RCX],R12
ROL qword ptr [RDX],0xf
MOV R12,qword ptr [RSI]
ADD R12,qword ptr [RCX]
MOV qword ptr [RSI],R12
XOR qword ptr [R8],R12
ROL qword ptr [RCX],0x22
MOV R12,qword ptr [RDX]
ADD R12,qword ptr [R8]
MOV qword ptr [RDX],R12
XOR qword ptr [R9],R12
ROL qword ptr [R8],0x15
MOV RDX,qword ptr [RCX]
ADD RDX,qword ptr [R9]
MOV qword ptr [RCX],RDX
XOR qword ptr [R15],RDX
ROL qword ptr [R9],0x26
MOV RCX,qword ptr [R8]
ADD RCX,qword ptr [R15]
MOV qword ptr [R8],RCX
XOR qword ptr [R14],RCX
ROL qword ptr [R15],0x21
MOV RCX,qword ptr [R9]
ADD RCX,qword ptr [R14]
MOV qword ptr [R9],RCX
XOR qword ptr [RBX],RCX
ROL qword ptr [R14],0xa
MOV RCX,qword ptr [R15]
ADD RCX,qword ptr [RBX]
MOV qword ptr [R15],RCX
XOR qword ptr [R10],RCX
ROL qword ptr [RBX],0xd
MOV RCX,qword ptr [R14]
ADD RCX,qword ptr [R10]
MOV qword ptr [R14],RCX
XOR qword ptr [RAX],RCX
ROL qword ptr [R10],0x26
MOV RCX,qword ptr [RBX]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RBX],RCX
XOR qword ptr [R11],RCX
ROL qword ptr [RAX],0x35
MOV RCX,qword ptr [R10]
ADD RCX,qword ptr [R11]
MOV qword ptr [R10],RCX
XOR qword ptr [RDI],RCX
ROL qword ptr [R11],0x2a
MOV RCX,qword ptr [RAX]
ADD RCX,qword ptr [RDI]
MOV qword ptr [RAX],RCX
XOR qword ptr [RSI],RCX
ROL qword ptr [RDI],0x36
POP RBX
POP R12
POP R14
POP R15
RET
|
/* (anonymous namespace)::SpookyHash::EndPartial(unsigned long&, unsigned long&, unsigned long&,
unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&, unsigned long&,
unsigned long&, unsigned long&, unsigned long&) */
void (anonymous_namespace)::SpookyHash::EndPartial
(ulong *param_1,ulong *param_2,ulong *param_3,ulong *param_4,ulong *param_5,
ulong *param_6,ulong *param_7,ulong *param_8,ulong *param_9,ulong *param_10,
ulong *param_11,ulong *param_12)
{
ulong uVar1;
ulong uVar2;
uVar1 = *param_12;
uVar2 = *param_2;
*param_12 = uVar1 + uVar2;
*param_3 = *param_3 ^ uVar1 + uVar2;
*param_2 = *param_2 << 0x2c | *param_2 >> 0x14;
uVar1 = *param_1;
uVar2 = *param_3;
*param_1 = uVar1 + uVar2;
*param_4 = *param_4 ^ uVar1 + uVar2;
*param_3 = *param_3 << 0xf | *param_3 >> 0x31;
uVar1 = *param_2;
uVar2 = *param_4;
*param_2 = uVar1 + uVar2;
*param_5 = *param_5 ^ uVar1 + uVar2;
*param_4 = *param_4 << 0x22 | *param_4 >> 0x1e;
uVar1 = *param_3;
uVar2 = *param_5;
*param_3 = uVar1 + uVar2;
*param_6 = *param_6 ^ uVar1 + uVar2;
*param_5 = *param_5 << 0x15 | *param_5 >> 0x2b;
uVar1 = *param_4;
uVar2 = *param_6;
*param_4 = uVar1 + uVar2;
*param_7 = *param_7 ^ uVar1 + uVar2;
*param_6 = *param_6 << 0x26 | *param_6 >> 0x1a;
uVar1 = *param_5;
uVar2 = *param_7;
*param_5 = uVar1 + uVar2;
*param_8 = *param_8 ^ uVar1 + uVar2;
*param_7 = *param_7 << 0x21 | *param_7 >> 0x1f;
uVar1 = *param_6;
uVar2 = *param_8;
*param_6 = uVar1 + uVar2;
*param_9 = *param_9 ^ uVar1 + uVar2;
*param_8 = *param_8 << 10 | *param_8 >> 0x36;
uVar1 = *param_7;
uVar2 = *param_9;
*param_7 = uVar1 + uVar2;
*param_10 = *param_10 ^ uVar1 + uVar2;
*param_9 = *param_9 << 0xd | *param_9 >> 0x33;
uVar1 = *param_8;
uVar2 = *param_10;
*param_8 = uVar1 + uVar2;
*param_11 = *param_11 ^ uVar1 + uVar2;
*param_10 = *param_10 << 0x26 | *param_10 >> 0x1a;
uVar1 = *param_9;
uVar2 = *param_11;
*param_9 = uVar1 + uVar2;
*param_12 = *param_12 ^ uVar1 + uVar2;
*param_11 = *param_11 << 0x35 | *param_11 >> 0xb;
uVar1 = *param_10;
uVar2 = *param_12;
*param_10 = uVar1 + uVar2;
*param_1 = *param_1 ^ uVar1 + uVar2;
*param_12 = *param_12 << 0x2a | *param_12 >> 0x16;
uVar1 = *param_11;
uVar2 = *param_1;
*param_11 = uVar1 + uVar2;
*param_2 = *param_2 ^ uVar1 + uVar2;
*param_1 = *param_1 << 0x36 | *param_1 >> 10;
return;
}
|
|
14,534
|
JS_GetIterator2
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_GetIterator2(JSContext *ctx, JSValue obj,
JSValue method)
{
JSValue enum_obj;
enum_obj = JS_Call(ctx, method, obj, 0, NULL);
if (JS_IsException(enum_obj))
return enum_obj;
if (!JS_IsObject(enum_obj)) {
JS_FreeValue(ctx, enum_obj);
return JS_ThrowTypeErrorNotAnObject(ctx);
}
return enum_obj;
}
|
O1
|
c
|
JS_GetIterator2:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rax
movq %rsi, %r9
movq %rdi, %rbx
movl $0x0, 0x28(%rsp)
movq $0x3, 0x30(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
movl $0x2, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq %rcx, %rsi
movq %r8, %rdx
movq %r9, %rcx
movq %rax, %r8
xorl %r9d, %r9d
callq 0x284ca
movq %rax, %r14
cmpl $-0x1, %edx
je 0x41af1
cmpl $0x6, %edx
je 0x41af1
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x1d8c6
leaq 0x5d546(%rip), %rsi # 0x9f025
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %edx
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
|
JS_GetIterator2:
push r14
push rbx
sub rsp, 38h
mov rax, rdx
mov r9, rsi
mov rbx, rdi
mov dword ptr [rsp+48h+var_20], 0
mov qword ptr [rsp+48h+var_20+8], 3
movups xmm0, [rsp+48h+var_20]
movups [rsp+48h+var_48], xmm0
mov [rsp+48h+var_30], 2
mov [rsp+48h+var_38], 0
mov rsi, rcx
mov rdx, r8
mov rcx, r9
mov r8, rax
xor r9d, r9d
call JS_CallInternal
mov r14, rax
cmp edx, 0FFFFFFFFh
jz short loc_41AF1
cmp edx, 6
jz short loc_41AF1
mov rdi, [rbx+18h]
mov rsi, r14
call JS_FreeValueRT
lea rsi, aOperandPrototy+20h; "not an object"
xor r14d, r14d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
loc_41AF1:
mov rax, r14
add rsp, 38h
pop rbx
pop r14
retn
|
_DWORD * JS_GetIterator2(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
double a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13)
{
_DWORD *v13; // rax
long long v14; // rdx
_DWORD *v15; // r14
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
long long v19; // r9
__m128 v20; // xmm4
__m128 v21; // xmm5
char v23; // [rsp+0h] [rbp-48h]
__m128 v24; // [rsp+28h] [rbp-20h]
v24.m128_i32[0] = 0;
v24.m128_u64[1] = 3LL;
v13 = (_DWORD *)JS_CallInternal(
a1,
a4,
a5,
a2,
a3,
0LL,
v24,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
v24.m128_i8[0],
3,
0LL,
2u);
v15 = v13;
if ( (_DWORD)v14 != -1 && (_DWORD)v14 != 6 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v13, v14);
v15 = 0LL;
JS_ThrowTypeError(a1, (long long)"not an object", v16, v17, v18, v19, v24, a7, a8, a9, v20, v21, a12, a13, v23);
}
return v15;
}
| |||
14,535
|
JS_GetIterator2
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue JS_GetIterator2(JSContext *ctx, JSValue obj,
JSValue method)
{
JSValue enum_obj;
enum_obj = JS_Call(ctx, method, obj, 0, NULL);
if (JS_IsException(enum_obj))
return enum_obj;
if (!JS_IsObject(enum_obj)) {
JS_FreeValue(ctx, enum_obj);
return JS_ThrowTypeErrorNotAnObject(ctx);
}
return enum_obj;
}
|
O2
|
c
|
JS_GetIterator2:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rax
movq %rsi, %r9
movq %rdi, %rbx
andq $0x0, (%rsp)
movq %rcx, %rsi
movq %r8, %rdx
movq %r9, %rcx
movq %rax, %r8
xorl %r9d, %r9d
callq 0x21eb6
cmpl $-0x1, %edx
je 0x398c6
cmpl $0x6, %edx
je 0x398c6
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1801e
movq %rbx, %rdi
callq 0x1d5e1
pushq $0x6
popq %rdx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
|
JS_GetIterator2:
push rbx
sub rsp, 10h
mov rax, rdx
mov r9, rsi
mov rbx, rdi
and [rsp+18h+var_18], 0
mov rsi, rcx
mov rdx, r8
mov rcx, r9
mov r8, rax
xor r9d, r9d
call JS_Call
cmp edx, 0FFFFFFFFh
jz short loc_398C6
cmp edx, 6
jz short loc_398C6
mov rdi, rbx
mov rsi, rax
call JS_FreeValue
mov rdi, rbx
call JS_ThrowTypeErrorNotAnObject
push 6
pop rdx
xor eax, eax
loc_398C6:
add rsp, 10h
pop rbx
retn
|
long long JS_GetIterator2(
long long a1,
int a2,
int a3,
int a4,
int a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long result; // rax
long long v14; // rdx
long long v15; // rsi
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
long long v19; // r9
__m128 v20; // xmm4
__m128 v21; // xmm5
char v22; // [rsp+0h] [rbp-18h]
result = JS_Call(a1, a4, a5, a2, a3, 0, 0LL);
if ( (_DWORD)v14 != -1 && (_DWORD)v14 != 6 )
{
v15 = result;
JS_FreeValue(a1, result, v14);
JS_ThrowTypeErrorNotAnObject(a1, a6, a7, a8, a9, v20, v21, a12, a13, v15, v16, v17, v18, v19, v22);
return 0LL;
}
return result;
}
|
JS_GetIterator2:
PUSH RBX
SUB RSP,0x10
MOV RAX,RDX
MOV R9,RSI
MOV RBX,RDI
AND qword ptr [RSP],0x0
MOV RSI,RCX
MOV RDX,R8
MOV RCX,R9
MOV R8,RAX
XOR R9D,R9D
CALL 0x00121eb6
CMP EDX,-0x1
JZ 0x001398c6
CMP EDX,0x6
JZ 0x001398c6
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011801e
MOV RDI,RBX
CALL 0x0011d5e1
PUSH 0x6
POP RDX
XOR EAX,EAX
LAB_001398c6:
ADD RSP,0x10
POP RBX
RET
|
int8
JS_GetIterator2(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
int8 uVar1;
int1 auVar2 [12];
auVar2 = JS_Call(param_1,param_4,param_5,param_2,param_3,0,0);
uVar1 = auVar2._0_8_;
if ((auVar2._8_4_ != -1) && (auVar2._8_4_ != 6)) {
JS_FreeValue(param_1,uVar1);
JS_ThrowTypeErrorNotAnObject(param_1);
uVar1 = 0;
}
return uVar1;
}
|
|
14,536
|
Slave::handleShot[abi:cxx11](unsigned long, unsigned long)
|
666mxvbee[P]BattleShip/lib/Slave/Slave.cpp
|
std::string Slave::handleShot(uint64_t x, uint64_t y) {
auto& ships = settings.getMasterShipsMutable();
for (auto& ship : ships) {
if (ship.contains(x, y)) {
if (ship.hitAt(x, y)) {
if (ship.isSunk()) {
return "hit_and_sunk";
}
return "hit";
}
}
}
return "miss";
}
|
O2
|
cpp
|
Slave::handleShot[abi:cxx11](unsigned long, unsigned long):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
movq (%rsi), %rdi
callq 0x689e
movq (%rax), %r12
movq 0x8(%rax), %r13
cmpq %r13, %r12
je 0x13864
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x136f8
testb %al, %al
je 0x1385e
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1362e
testb %al, %al
jne 0x13889
addq $0x40, %r12
jmp 0x13835
leaq 0x4b1a(%rip), %rsi # 0x18385
leaq 0xd(%rsp), %rdx
movq %rbx, %rdi
callq 0x6b2a
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r12, %rdi
callq 0x135ea
testb %al, %al
je 0x138a3
leaq 0x4ad8(%rip), %rsi # 0x18374
leaq 0xf(%rsp), %rdx
jmp 0x13870
leaq 0x4ad7(%rip), %rsi # 0x18381
leaq 0xe(%rsp), %rdx
jmp 0x13870
nop
|
_ZN5Slave10handleShotB5cxx11Emm:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r14, rcx
mov r15, rdx
mov rbx, rdi
mov rdi, [rsi]; this
call _ZN8Settings21getMasterShipsMutableEv; Settings::getMasterShipsMutable(void)
mov r12, [rax]
mov r13, [rax+8]
loc_13835:
cmp r12, r13
jz short loc_13864
mov rdi, r12; this
mov rsi, r15; unsigned __int64
mov rdx, r14; unsigned __int64
call _ZNK4Ship8containsEmm; Ship::contains(ulong,ulong)
test al, al
jz short loc_1385E
mov rdi, r12; this
mov rsi, r15; unsigned __int64
mov rdx, r14; unsigned __int64
call _ZN4Ship5hitAtEmm; Ship::hitAt(ulong,ulong)
test al, al
jnz short loc_13889
loc_1385E:
add r12, 40h ; '@'
jmp short loc_13835
loc_13864:
lea rsi, aMiss; "miss"
lea rdx, [rsp+38h+var_2B]
loc_13870:
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, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_13889:
mov rdi, r12; this
call _ZNK4Ship6isSunkEv; Ship::isSunk(void)
test al, al
jz short loc_138A3
lea rsi, aHitAndSunk; "hit_and_sunk"
lea rdx, [rsp+38h+var_29]
jmp short loc_13870
loc_138A3:
lea rsi, aHit; "hit"
lea rdx, [rsp+38h+var_2A]
jmp short loc_13870
|
_QWORD * Slave::handleShot[abi:cxx11](_QWORD *a1, Settings **a2, unsigned long long a3, unsigned long long a4)
{
long long MasterShipsMutable; // rax
Ship *v7; // r12
Ship *v8; // r13
char *v9; // rsi
MasterShipsMutable = Settings::getMasterShipsMutable(*a2);
v7 = *(Ship **)MasterShipsMutable;
v8 = *(Ship **)(MasterShipsMutable + 8);
while ( 1 )
{
if ( v7 == v8 )
{
v9 = "miss";
goto LABEL_7;
}
if ( Ship::contains(v7, a3, a4) && Ship::hitAt(v7, a3, a4) )
break;
v7 = (Ship *)((char *)v7 + 64);
}
if ( Ship::isSunk(v7) )
v9 = "hit_and_sunk";
else
v9 = "hit";
LABEL_7:
std::string::basic_string<std::allocator<char>>(a1, v9);
return a1;
}
|
handleShot[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R14,RCX
MOV R15,RDX
MOV RBX,RDI
MOV RDI,qword ptr [RSI]
CALL 0x0010689e
MOV R12,qword ptr [RAX]
MOV R13,qword ptr [RAX + 0x8]
LAB_00113835:
CMP R12,R13
JZ 0x00113864
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x001136f8
TEST AL,AL
JZ 0x0011385e
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x0011362e
TEST AL,AL
JNZ 0x00113889
LAB_0011385e:
ADD R12,0x40
JMP 0x00113835
LAB_00113864:
LEA RSI,[0x118385]
LEA RDX,[RSP + 0xd]
LAB_00113870:
MOV RDI,RBX
CALL 0x00106b2a
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00113889:
MOV RDI,R12
CALL 0x001135ea
TEST AL,AL
JZ 0x001138a3
LEA RSI,[0x118374]
LEA RDX,[RSP + 0xf]
JMP 0x00113870
LAB_001138a3:
LEA RSI,[0x118381]
LEA RDX,[RSP + 0xe]
JMP 0x00113870
|
/* Slave::handleShot[abi:cxx11](unsigned long, unsigned long) */
ulong Slave::handleShot_abi_cxx11_(ulong param_1,ulong param_2)
{
Ship *pSVar1;
char cVar2;
int8 *puVar3;
ulong in_RCX;
ulong in_RDX;
allocator *paVar4;
char *pcVar5;
Ship *this;
allocator local_2b;
allocator local_2a;
allocator local_29;
puVar3 = (int8 *)Settings::getMasterShipsMutable(*(Settings **)param_2);
this = (Ship *)*puVar3;
pSVar1 = (Ship *)puVar3[1];
do {
if (this == pSVar1) {
pcVar5 = "miss";
paVar4 = &local_2b;
LAB_00113870:
std::__cxx11::string::string<std::allocator<char>>((string *)param_1,pcVar5,paVar4);
return param_1;
}
cVar2 = Ship::contains(this,in_RDX,in_RCX);
if (cVar2 != '\0') {
cVar2 = Ship::hitAt(this,in_RDX,in_RCX);
if (cVar2 != '\0') {
cVar2 = Ship::isSunk(this);
if (cVar2 == '\0') {
pcVar5 = "hit";
paVar4 = &local_2a;
}
else {
pcVar5 = "hit_and_sunk";
paVar4 = &local_29;
}
goto LAB_00113870;
}
}
this = this + 0x40;
} while( true );
}
|
|
14,537
|
delete_map_weak_ref
|
bluesky950520[P]quickjs/quickjs.c
|
static void delete_map_weak_ref(JSRuntime *rt, JSMapRecord *mr)
{
JSWeakRefRecord **pwr, *wr;
pwr = get_first_weak_ref(mr->key);
for(;;) {
wr = *pwr;
assert(wr != NULL);
if (wr->kind == JS_WEAK_REF_KIND_MAP && wr->u.map_record == mr)
break;
pwr = &wr->next_weak_ref;
}
*pwr = wr->next_weak_ref;
js_free_rt(rt, wr);
}
|
O3
|
c
|
delete_map_weak_ref:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rsi), %rax
movl 0x38(%rsi), %edx
movl $0x28, %ecx
cmpl $-0x1, %edx
je 0x3bdd9
cmpl $-0x8, %edx
jne 0x3be28
movl $0x10, %ecx
addq %rcx, %rax
movq (%rax), %r14
cmpl $0x0, (%r14)
jne 0x3bdeb
cmpq %rsi, 0x10(%r14)
je 0x3bdf4
addq $0x8, %r14
movq %r14, %rax
jmp 0x3bddc
movq 0x8(%r14), %rcx
movq %rcx, (%rax)
decq 0x28(%rbx)
movq %r14, %rdi
callq *0x20(%rbx)
movq 0x10(%rbx), %rcx
movq 0x30(%rbx), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
movq 0x40(%rbx), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
callq 0xe090
|
delete_map_weak_ref:
push r14
push rbx
push rax
mov rbx, rdi
mov rax, [rsi+30h]
mov edx, [rsi+38h]
mov ecx, 28h ; '('
cmp edx, 0FFFFFFFFh
jz short loc_3BDD9
cmp edx, 0FFFFFFF8h
jnz short loc_3BE28
mov ecx, 10h
loc_3BDD9:
add rax, rcx
loc_3BDDC:
mov r14, [rax]
cmp dword ptr [r14], 0
jnz short loc_3BDEB
cmp [r14+10h], rsi
jz short loc_3BDF4
loc_3BDEB:
add r14, 8
mov rax, r14
jmp short loc_3BDDC
loc_3BDF4:
mov rcx, [r14+8]
mov [rax], rcx
dec qword ptr [rbx+28h]
mov rdi, r14
call qword ptr [rbx+20h]
mov rcx, [rbx+10h]
mov rdx, [rbx+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
mov rdi, [rbx+40h]
mov rsi, r14
add rsp, 8
pop rbx
pop r14
jmp rcx
loc_3BE28:
call _abort
|
long long delete_map_weak_ref(long long a1, long long a2)
{
long long v2; // rdx
long long v3; // rcx
_QWORD *i; // rax
_DWORD *v5; // r14
long long v6; // rax
long long ( *v7)(_QWORD, _DWORD *); // rcx
v2 = *(unsigned int *)(a2 + 56);
v3 = 40LL;
if ( (_DWORD)v2 != -1 )
{
if ( (_DWORD)v2 != -8 )
abort((const char *)a1, a2, v2, 40LL);
v3 = 16LL;
}
for ( i = (_QWORD *)(v3 + *(_QWORD *)(a2 + 48)); ; i = v5 + 2 )
{
v5 = (_DWORD *)*i;
if ( !*(_DWORD *)*i && *((_QWORD *)v5 + 2) == a2 )
break;
}
*i = *((_QWORD *)v5 + 1);
--*(_QWORD *)(a1 + 40);
v6 = (*(long long ( **)(_DWORD *))(a1 + 32))(v5);
v7 = *(long long ( **)(_QWORD, _DWORD *))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v6 - 8;
return v7(*(_QWORD *)(a1 + 64), v5);
}
|
delete_map_weak_ref:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x30]
MOV EDX,dword ptr [RSI + 0x38]
MOV ECX,0x28
CMP EDX,-0x1
JZ 0x0013bdd9
CMP EDX,-0x8
JNZ 0x0013be28
MOV ECX,0x10
LAB_0013bdd9:
ADD RAX,RCX
LAB_0013bddc:
MOV R14,qword ptr [RAX]
CMP dword ptr [R14],0x0
JNZ 0x0013bdeb
CMP qword ptr [R14 + 0x10],RSI
JZ 0x0013bdf4
LAB_0013bdeb:
ADD R14,0x8
MOV RAX,R14
JMP 0x0013bddc
LAB_0013bdf4:
MOV RCX,qword ptr [R14 + 0x8]
MOV qword ptr [RAX],RCX
DEC qword ptr [RBX + 0x28]
MOV RDI,R14
CALL qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [RBX + 0x30],RDX
MOV RDI,qword ptr [RBX + 0x40]
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
LAB_0013be28:
CALL 0x0010e090
|
void delete_map_weak_ref(long param_1,long param_2)
{
int *piVar1;
int *piVar2;
long lVar3;
lVar3 = 0x28;
if (*(int *)(param_2 + 0x38) != -1) {
if (*(int *)(param_2 + 0x38) != -8) {
/* WARNING: Subroutine does not return */
abort();
}
lVar3 = 0x10;
}
piVar2 = (int *)(*(long *)(param_2 + 0x30) + lVar3);
while ((piVar1 = *(int **)piVar2, *piVar1 != 0 || (*(long *)(piVar1 + 4) != param_2))) {
piVar2 = piVar1 + 2;
}
*(int8 *)piVar2 = *(int8 *)(piVar1 + 2);
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar3 = (**(code **)(param_1 + 0x20))(piVar1);
lVar3 = (*(long *)(param_1 + 0x30) - lVar3) + -8;
*(long *)(param_1 + 0x30) = lVar3;
/* WARNING: Could not recover jumptable at 0x0013be26. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),piVar1,lVar3,*(code **)(param_1 + 0x10));
return;
}
|
|
14,538
|
r3d_shader_load_raster_geometry_inst
|
r3d/src/r3d_state.c
|
void r3d_shader_load_raster_geometry_inst(void)
{
R3D.shader.raster.geometryInst.id = rlLoadShaderCode(
VS_RASTER_GEOMETRY_INST, FS_RASTER_GEOMETRY
);
r3d_shader_get_location(raster.geometryInst, uMatInvView);
r3d_shader_get_location(raster.geometryInst, uMatModel);
r3d_shader_get_location(raster.geometryInst, uMatVP);
r3d_shader_get_location(raster.geometryInst, uTexCoordOffset);
r3d_shader_get_location(raster.geometryInst, uTexCoordScale);
r3d_shader_get_location(raster.geometryInst, uBillboardMode);
r3d_shader_get_location(raster.geometryInst, uTexAlbedo);
r3d_shader_get_location(raster.geometryInst, uTexNormal);
r3d_shader_get_location(raster.geometryInst, uTexEmission);
r3d_shader_get_location(raster.geometryInst, uTexOcclusion);
r3d_shader_get_location(raster.geometryInst, uTexRoughness);
r3d_shader_get_location(raster.geometryInst, uTexMetalness);
r3d_shader_get_location(raster.geometryInst, uValEmission);
r3d_shader_get_location(raster.geometryInst, uValOcclusion);
r3d_shader_get_location(raster.geometryInst, uValRoughness);
r3d_shader_get_location(raster.geometryInst, uValMetalness);
r3d_shader_get_location(raster.geometryInst, uColAlbedo);
r3d_shader_get_location(raster.geometryInst, uColEmission);
r3d_shader_enable(raster.geometryInst);
r3d_shader_set_sampler2D_slot(raster.geometryInst, uTexAlbedo, 0);
r3d_shader_set_sampler2D_slot(raster.geometryInst, uTexNormal, 1);
r3d_shader_set_sampler2D_slot(raster.geometryInst, uTexEmission, 2);
r3d_shader_set_sampler2D_slot(raster.geometryInst, uTexOcclusion, 3);
r3d_shader_set_sampler2D_slot(raster.geometryInst, uTexRoughness, 4);
r3d_shader_set_sampler2D_slot(raster.geometryInst, uTexMetalness, 5);
r3d_shader_disable();
}
|
O3
|
c
|
r3d_shader_load_raster_geometry_inst:
pushq %rbp
movq %rsp, %rbp
leaq 0x599a7(%rip), %rdi # 0x11ae60
leaq 0x5a150(%rip), %rsi # 0x11b610
callq 0x1e525
movl %eax, 0xee9e1(%rip) # 0x1afeac
leaq 0x50a8a(%rip), %rsi # 0x111f5c
movl %eax, %edi
callq 0x1e97e
movl %eax, 0xee9d1(%rip) # 0x1afeb0
movl 0xee9c7(%rip), %edi # 0x1afeac
leaq 0x509a3(%rip), %rsi # 0x111e8f
callq 0x1e97e
movl %eax, 0xee9bd(%rip) # 0x1afeb4
movl 0xee9af(%rip), %edi # 0x1afeac
leaq 0x50a64(%rip), %rsi # 0x111f68
callq 0x1e97e
movl %eax, 0xee9a9(%rip) # 0x1afeb8
movl 0xee997(%rip), %edi # 0x1afeac
leaq 0x50985(%rip), %rsi # 0x111ea1
callq 0x1e97e
movl %eax, 0xee99d(%rip) # 0x1afec4
movl 0xee97f(%rip), %edi # 0x1afeac
leaq 0x5097d(%rip), %rsi # 0x111eb1
callq 0x1e97e
movl %eax, 0xee991(%rip) # 0x1afed0
movl 0xee967(%rip), %edi # 0x1afeac
leaq 0x50a23(%rip), %rsi # 0x111f6f
callq 0x1e97e
movl %eax, 0xee981(%rip) # 0x1afed8
movl 0xee94f(%rip), %edi # 0x1afeac
leaq 0x5095c(%rip), %rsi # 0x111ec0
callq 0x1e97e
movl %eax, 0xee971(%rip) # 0x1afee0
movl 0xee937(%rip), %edi # 0x1afeac
leaq 0x5094f(%rip), %rsi # 0x111ecb
callq 0x1e97e
movl %eax, 0xee961(%rip) # 0x1afee8
movl 0xee91f(%rip), %edi # 0x1afeac
leaq 0x50942(%rip), %rsi # 0x111ed6
callq 0x1e97e
movl %eax, 0xee951(%rip) # 0x1afef0
movl 0xee907(%rip), %edi # 0x1afeac
leaq 0x50937(%rip), %rsi # 0x111ee3
callq 0x1e97e
movl %eax, 0xee941(%rip) # 0x1afef8
movl 0xee8ef(%rip), %edi # 0x1afeac
leaq 0x5092d(%rip), %rsi # 0x111ef1
callq 0x1e97e
movl %eax, 0xee931(%rip) # 0x1aff00
movl 0xee8d7(%rip), %edi # 0x1afeac
leaq 0x50923(%rip), %rsi # 0x111eff
callq 0x1e97e
movl %eax, 0xee921(%rip) # 0x1aff08
movl 0xee8bf(%rip), %edi # 0x1afeac
leaq 0x50919(%rip), %rsi # 0x111f0d
callq 0x1e97e
movl %eax, 0xee911(%rip) # 0x1aff10
movl 0xee8a7(%rip), %edi # 0x1afeac
leaq 0x5090e(%rip), %rsi # 0x111f1a
callq 0x1e97e
movl %eax, 0xee901(%rip) # 0x1aff18
movl 0xee88f(%rip), %edi # 0x1afeac
leaq 0x50904(%rip), %rsi # 0x111f28
callq 0x1e97e
movl %eax, 0xee8f1(%rip) # 0x1aff20
movl 0xee877(%rip), %edi # 0x1afeac
leaq 0x508fa(%rip), %rsi # 0x111f36
callq 0x1e97e
movl %eax, 0xee8e1(%rip) # 0x1aff28
movl 0xee85f(%rip), %edi # 0x1afeac
leaq 0x508f0(%rip), %rsi # 0x111f44
callq 0x1e97e
movl %eax, 0xee8d9(%rip) # 0x1aff38
movl 0xee847(%rip), %edi # 0x1afeac
leaq 0x508e3(%rip), %rsi # 0x111f4f
callq 0x1e97e
movl %eax, 0xee8d1(%rip) # 0x1aff48
movl 0xee82f(%rip), %edi # 0x1afeac
callq 0x1bdaa
cmpl $0x0, 0xee853(%rip) # 0x1afedc
je 0xc16b1
movl $0x0, 0xee847(%rip) # 0x1afedc
leaq 0xee840(%rip), %rsi # 0x1afedc
movl 0xee83e(%rip), %edi # 0x1afee0
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1e99a
cmpl $0x1, 0xee82c(%rip) # 0x1afee4
je 0xc16e0
movl $0x1, 0xee820(%rip) # 0x1afee4
leaq 0xee819(%rip), %rsi # 0x1afee4
movl 0xee817(%rip), %edi # 0x1afee8
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1e99a
cmpl $0x2, 0xee805(%rip) # 0x1afeec
je 0xc170f
movl $0x2, 0xee7f9(%rip) # 0x1afeec
leaq 0xee7f2(%rip), %rsi # 0x1afeec
movl 0xee7f0(%rip), %edi # 0x1afef0
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1e99a
cmpl $0x3, 0xee7de(%rip) # 0x1afef4
je 0xc173e
movl $0x3, 0xee7d2(%rip) # 0x1afef4
leaq 0xee7cb(%rip), %rsi # 0x1afef4
movl 0xee7c9(%rip), %edi # 0x1afef8
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1e99a
cmpl $0x4, 0xee7b7(%rip) # 0x1afefc
je 0xc176d
movl $0x4, 0xee7ab(%rip) # 0x1afefc
leaq 0xee7a4(%rip), %rsi # 0x1afefc
movl 0xee7a2(%rip), %edi # 0x1aff00
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1e99a
cmpl $0x5, 0xee790(%rip) # 0x1aff04
je 0xc179c
movl $0x5, 0xee784(%rip) # 0x1aff04
leaq 0xee77d(%rip), %rsi # 0x1aff04
movl 0xee77b(%rip), %edi # 0x1aff08
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1e99a
popq %rbp
jmp 0x1bdb5
|
r3d_shader_load_raster_geometry_inst:
push rbp
mov rbp, rsp
lea rdi, VS_RASTER_GEOMETRY_INST; "#version 330 core\n#define BILLBOARD_FR"...
lea rsi, FS_RASTER_GEOMETRY; "#version 330 core\nflat in vec3 vEmissi"...
call rlLoadShaderCode
mov cs:dword_1AFEAC, eax
lea rsi, aUmatinvview; "uMatInvView"
mov edi, eax
call rlGetLocationUniform
mov cs:dword_1AFEB0, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUmatmodel; "uMatModel"
call rlGetLocationUniform
mov cs:dword_1AFEB4, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUmatvp; "uMatVP"
call rlGetLocationUniform
mov cs:dword_1AFEB8, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUtexcoordoffse; "uTexCoordOffset"
call rlGetLocationUniform
mov cs:dword_1AFEC4, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUtexcoordscale; "uTexCoordScale"
call rlGetLocationUniform
mov cs:dword_1AFED0, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUbillboardmode; "uBillboardMode"
call rlGetLocationUniform
mov cs:dword_1AFED8, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUtexalbedo; "uTexAlbedo"
call rlGetLocationUniform
mov cs:dword_1AFEE0, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUtexnormal; "uTexNormal"
call rlGetLocationUniform
mov cs:dword_1AFEE8, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUtexemission; "uTexEmission"
call rlGetLocationUniform
mov cs:dword_1AFEF0, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUtexocclusion; "uTexOcclusion"
call rlGetLocationUniform
mov cs:dword_1AFEF8, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUtexroughness; "uTexRoughness"
call rlGetLocationUniform
mov cs:dword_1AFF00, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUtexmetalness; "uTexMetalness"
call rlGetLocationUniform
mov cs:dword_1AFF08, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUvalemission; "uValEmission"
call rlGetLocationUniform
mov cs:dword_1AFF10, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUvalocclusion; "uValOcclusion"
call rlGetLocationUniform
mov cs:dword_1AFF18, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUvalroughness; "uValRoughness"
call rlGetLocationUniform
mov cs:dword_1AFF20, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUvalmetalness; "uValMetalness"
call rlGetLocationUniform
mov cs:dword_1AFF28, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUcolalbedo; "uColAlbedo"
call rlGetLocationUniform
mov cs:dword_1AFF38, eax
mov edi, cs:dword_1AFEAC
lea rsi, aUcolemission; "uColEmission"
call rlGetLocationUniform
mov cs:dword_1AFF48, eax
mov edi, cs:dword_1AFEAC
call rlEnableShader
cmp cs:dword_1AFEDC, 0
jz short loc_C16B1
mov cs:dword_1AFEDC, 0
lea rsi, dword_1AFEDC
mov edi, cs:dword_1AFEE0
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C16B1:
cmp cs:dword_1AFEE4, 1
jz short loc_C16E0
mov cs:dword_1AFEE4, 1
lea rsi, dword_1AFEE4
mov edi, cs:dword_1AFEE8
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C16E0:
cmp cs:dword_1AFEEC, 2
jz short loc_C170F
mov cs:dword_1AFEEC, 2
lea rsi, dword_1AFEEC
mov edi, cs:dword_1AFEF0
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C170F:
cmp cs:dword_1AFEF4, 3
jz short loc_C173E
mov cs:dword_1AFEF4, 3
lea rsi, dword_1AFEF4
mov edi, cs:dword_1AFEF8
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C173E:
cmp cs:dword_1AFEFC, 4
jz short loc_C176D
mov cs:dword_1AFEFC, 4
lea rsi, dword_1AFEFC
mov edi, cs:dword_1AFF00
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C176D:
cmp cs:dword_1AFF04, 5
jz short loc_C179C
mov cs:dword_1AFF04, 5
lea rsi, dword_1AFF04
mov edi, cs:dword_1AFF08
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C179C:
pop rbp
jmp rlDisableShader
|
long long r3d_shader_load_raster_geometry_inst()
{
int v0; // r8d
int v1; // r9d
dword_1AFEAC = rlLoadShaderCode(
(long long)"#version 330 core\n"
"#define BILLBOARD_FRONT 1\n"
"#define BILLBOARD_Y_AXIS 2\n"
"layout(location=0)in vec3 aPosition;layout(location=1)in vec2 aTexCoord;layout(location=2)in"
" vec3 aNormal;layout(location=3)in vec4 aColor;layout(location=4)in vec4 aTangent;layout(loc"
"ation=10)in mat4 iMatModel;layout(location=14)in vec4 iColor;uniform mat4 uMatInvView;unifor"
"m mat4 uMatModel;uniform mat4 uMatVP;uniform lowp int uBillboardMode;uniform float uValEmiss"
"ion;uniform vec3 uColEmission;uniform vec3 uColAlbedo;uniform vec2 uTexCoordOffset;uniform v"
"ec2 uTexCoordScale;flat out vec3 vEmission;out vec2 vTexCoord;out vec3 vColor;out mat3 vTBN;"
"void BillboardFront(inout mat4 h,inout mat3 i){float l=length(vec3(h[0]));float m=length(vec"
"3(h[1]));float n=length(vec3(h[2]));h[0]=vec4(normalize(uMatInvView[0].xyz)*l,0.0);h[1]=vec4"
"(normalize(uMatInvView[1].xyz)*m,0.0);h[2]=vec4(normalize(uMatInvView[2].xyz)*n,0.0);float b"
"=1.0/l;float c=1.0/m;float d=1.0/n;i[0]=normalize(uMatInvView[0].xyz)*b;i[1]=normalize(uMatI"
"nvView[1].xyz)*c;i[2]=normalize(uMatInvView[2].xyz)*d;}void BillboardY(inout mat4 h,inout ma"
"t3 i){vec3 j=vec3(h[3]);float l=length(vec3(h[0]));float m=length(vec3(h[1]));float n=length"
"(vec3(h[2]));vec3 o=normalize(vec3(h[1]));vec3 e=normalize(j-vec3(uMatInvView[3]));vec3 k=no"
"rmalize(cross(o,e));vec3 a=normalize(cross(k,o));h[0]=vec4(k*l,0.0);h[1]=vec4(o*m,0.0);h[2]="
"vec4(a*n,0.0);float b=1.0/l;float c=1.0/m;float d=1.0/n;i[0]=k*b;i[1]=o*c;i[2]=a*d;}void mai"
"n(){vTexCoord=uTexCoordOffset+aTexCoord*uTexCoordScale;vEmission=uColEmission*uValEmission;v"
"Color=aColor.rgb*iColor.rgb*uColAlbedo;mat4 f=uMatModel*transpose(iMatModel);mat3 g=mat3(0.0"
");if(uBillboardMode==BILLBOARD_FRONT)BillboardFront(f,g);else if(uBillboardMode==BILLBOARD_Y"
"_AXIS)BillboardY(f,g);else g=transpose(inverse(mat3(f)));vec3 T=normalize(vec3(f*vec4(aTange"
"nt.xyz,0.0)));vec3 N=normalize(g*aNormal);vec3 B=normalize(cross(N,T))*aTangent.w;vTBN=mat3("
"T,B,N);gl_Position=uMatVP*(f*vec4(aPosition,1.0));}",
(long long)"#version 330 core\n"
"flat in vec3 vEmission;in vec2 vTexCoord;in vec3 vColor;in mat3 vTBN;uniform sampler2D uTexA"
"lbedo;uniform sampler2D uTexNormal;uniform sampler2D uTexEmission;uniform sampler2D uTexOccl"
"usion;uniform sampler2D uTexRoughness;uniform sampler2D uTexMetalness;uniform float uValOccl"
"usion;uniform float uValRoughness;uniform float uValMetalness;layout(location=0)out vec3 a;l"
"ayout(location=1)out vec3 b;layout(location=2)out vec2 c;layout(location=3)out vec3 d;vec2 E"
"ncodeOctahedral(vec3 f){f/=abs(f.x)+abs(f.y)+abs(f.z);vec2 e=f.xy;if(f.z < 0.0){vec2 g=vec2("
"f.x >=0.0 ? 1.0 :-1.0,f.y >=0.0 ? 1.0 :-1.0);e=(1.0-abs(e.yx))*g;}return e*0.5+0.5;}void mai"
"n(){a=vColor*texture(uTexAlbedo,vTexCoord).rgb;b=vEmission*texture(uTexEmission,vTexCoord).r"
"gb;c=EncodeOctahedral(normalize(vTBN*(texture(uTexNormal,vTexCoord).rgb*2.0-1.0)));d.r=uValO"
"cclusion*texture(uTexOcclusion,vTexCoord).r;d.g=uValRoughness*texture(uTexRoughness,vTexCoor"
"d).g;d.b=uValMetalness*texture(uTexMetalness,vTexCoord).b;}");
dword_1AFEB0 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uMatInvView");
dword_1AFEB4 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uMatModel");
dword_1AFEB8 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uMatVP");
dword_1AFEC4 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uTexCoordOffset");
dword_1AFED0 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uTexCoordScale");
dword_1AFED8 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uBillboardMode");
dword_1AFEE0 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uTexAlbedo");
dword_1AFEE8 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uTexNormal");
dword_1AFEF0 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uTexEmission");
dword_1AFEF8 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uTexOcclusion");
dword_1AFF00 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uTexRoughness");
dword_1AFF08 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uTexMetalness");
dword_1AFF10 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uValEmission");
dword_1AFF18 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uValOcclusion");
dword_1AFF20 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uValRoughness");
dword_1AFF28 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uValMetalness");
dword_1AFF38 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uColAlbedo");
dword_1AFF48 = rlGetLocationUniform((unsigned int)dword_1AFEAC, (long long)"uColEmission");
rlEnableShader((unsigned int)dword_1AFEAC);
if ( dword_1AFEDC )
{
dword_1AFEDC = 0;
rlSetUniform((unsigned int)dword_1AFEE0, (long long)&dword_1AFEDC, 4, 1u, v0, v1);
}
if ( dword_1AFEE4 != 1 )
{
dword_1AFEE4 = 1;
rlSetUniform((unsigned int)dword_1AFEE8, (long long)&dword_1AFEE4, 4, 1u, v0, v1);
}
if ( dword_1AFEEC != 2 )
{
dword_1AFEEC = 2;
rlSetUniform((unsigned int)dword_1AFEF0, (long long)&dword_1AFEEC, 4, 1u, v0, v1);
}
if ( dword_1AFEF4 != 3 )
{
dword_1AFEF4 = 3;
rlSetUniform((unsigned int)dword_1AFEF8, (long long)&dword_1AFEF4, 4, 1u, v0, v1);
}
if ( dword_1AFEFC != 4 )
{
dword_1AFEFC = 4;
rlSetUniform((unsigned int)dword_1AFF00, (long long)&dword_1AFEFC, 4, 1u, v0, v1);
}
if ( dword_1AFF04 != 5 )
{
dword_1AFF04 = 5;
rlSetUniform((unsigned int)dword_1AFF08, (long long)&dword_1AFF04, 4, 1u, v0, v1);
}
return rlDisableShader();
}
|
r3d_shader_load_raster_geometry_inst:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x21ae60]
LEA RSI,[0x21b610]
CALL 0x0011e525
MOV dword ptr [0x002afeac],EAX
LEA RSI,[0x211f5c]
MOV EDI,EAX
CALL 0x0011e97e
MOV dword ptr [0x002afeb0],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211e8f]
CALL 0x0011e97e
MOV dword ptr [0x002afeb4],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211f68]
CALL 0x0011e97e
MOV dword ptr [0x002afeb8],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211ea1]
CALL 0x0011e97e
MOV dword ptr [0x002afec4],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211eb1]
CALL 0x0011e97e
MOV dword ptr [0x002afed0],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211f6f]
CALL 0x0011e97e
MOV dword ptr [0x002afed8],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211ec0]
CALL 0x0011e97e
MOV dword ptr [0x002afee0],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211ecb]
CALL 0x0011e97e
MOV dword ptr [0x002afee8],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211ed6]
CALL 0x0011e97e
MOV dword ptr [0x002afef0],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211ee3]
CALL 0x0011e97e
MOV dword ptr [0x002afef8],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211ef1]
CALL 0x0011e97e
MOV dword ptr [0x002aff00],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211eff]
CALL 0x0011e97e
MOV dword ptr [0x002aff08],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211f0d]
CALL 0x0011e97e
MOV dword ptr [0x002aff10],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211f1a]
CALL 0x0011e97e
MOV dword ptr [0x002aff18],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211f28]
CALL 0x0011e97e
MOV dword ptr [0x002aff20],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211f36]
CALL 0x0011e97e
MOV dword ptr [0x002aff28],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211f44]
CALL 0x0011e97e
MOV dword ptr [0x002aff38],EAX
MOV EDI,dword ptr [0x002afeac]
LEA RSI,[0x211f4f]
CALL 0x0011e97e
MOV dword ptr [0x002aff48],EAX
MOV EDI,dword ptr [0x002afeac]
CALL 0x0011bdaa
CMP dword ptr [0x002afedc],0x0
JZ 0x001c16b1
MOV dword ptr [0x002afedc],0x0
LEA RSI,[0x2afedc]
MOV EDI,dword ptr [0x002afee0]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011e99a
LAB_001c16b1:
CMP dword ptr [0x002afee4],0x1
JZ 0x001c16e0
MOV dword ptr [0x002afee4],0x1
LEA RSI,[0x2afee4]
MOV EDI,dword ptr [0x002afee8]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011e99a
LAB_001c16e0:
CMP dword ptr [0x002afeec],0x2
JZ 0x001c170f
MOV dword ptr [0x002afeec],0x2
LEA RSI,[0x2afeec]
MOV EDI,dword ptr [0x002afef0]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011e99a
LAB_001c170f:
CMP dword ptr [0x002afef4],0x3
JZ 0x001c173e
MOV dword ptr [0x002afef4],0x3
LEA RSI,[0x2afef4]
MOV EDI,dword ptr [0x002afef8]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011e99a
LAB_001c173e:
CMP dword ptr [0x002afefc],0x4
JZ 0x001c176d
MOV dword ptr [0x002afefc],0x4
LEA RSI,[0x2afefc]
MOV EDI,dword ptr [0x002aff00]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011e99a
LAB_001c176d:
CMP dword ptr [0x002aff04],0x5
JZ 0x001c179c
MOV dword ptr [0x002aff04],0x5
LEA RSI,[0x2aff04]
MOV EDI,dword ptr [0x002aff08]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011e99a
LAB_001c179c:
POP RBP
JMP 0x0011bdb5
|
void r3d_shader_load_raster_geometry_inst(void)
{
DAT_002afeac = rlLoadShaderCode("#version 330 core\n#define BILLBOARD_FRONT 1\n#define BILLBOARD_Y_AXIS 2\nlayout(location=0)in vec3 aPosition;layout(location=1)in vec2 aTexCoord;layout(location=2)in vec3 aNormal;layout(location=3)in vec4 aColor;layout(location=4)in vec4 aTangent;layout(location=10)in mat4 iMatModel;layout(location=14)in vec4 iColor;uniform mat4 uMatInvView;uniform mat4 uMatModel;uniform mat4 uMatVP;uniform lowp int uBillboardMode;uniform float uValEmission;uniform vec3 uColEmission;uniform vec3 uColAlbedo;uniform vec2 uTexCoordOffset;uniform vec2 uTexCoordScale;flat out vec3 vEmission;out vec2 vTexCoord;out vec3 vColor;out mat3 vTBN;void BillboardFront(inout mat4 h,inout mat3 i){float l=length(vec3(h[0]));float m=length(vec3(h[1]));float n=length(vec3(h[2]));h[0]=vec4(normalize(uMatInvView[0].xyz)*l,0.0);h[1]=vec4(normalize(uMatInvView[1].xyz)*m,0.0);h[2]=vec4(normalize(uMatInvView[2].xyz)*n,0.0);float b=1.0/l;float c=1.0/m;float d=1.0/n;i[0]=normalize(uMatInvView[0].xyz)*b;i[1]=normalize(uMatInvView[1].xyz)*c;i[2]=normalize(uMatInvView[2].xyz)*d;}void BillboardY(inout mat4 h,inout mat3 i){vec3 j=vec3(h[3]);float l=length(vec3(h[0]));float m=length(vec3(h[1]));float n=length(vec3(h[2]));vec3 o=normalize(vec3(h[1]));vec3 e=normalize(j-vec3(uMatInvView[3]));vec3 k=normalize(cross(o,e));vec3 a=normalize(cross(k,o));h[0]=vec4(k*l,0.0);h[1]=vec4(o*m,0.0);h[2]=vec4(a*n,0.0);float b=1.0/l;float c=1.0/m;float d=1.0/n;i[0]=k*b;i[1]=o*c;i[2]=a*d;}void main(){vTexCoord=uTexCoordOffset+aTexCoord*uTexCoordScale;vEmission=uColEmission*uValEmission;vColor=aColor.rgb*iColor.rgb*uColAlbedo;mat4 f=uMatModel*transpose(iMatModel);mat3 g=mat3(0.0);if(uBillboardMode==BILLBOARD_FRONT)BillboardFront(f,g);else if(uBillboardMode==BILLBOARD_Y_AXIS)BillboardY(f,g);else g=transpose(inverse(mat3(f)));vec3 T=normalize(vec3(f*vec4(aTangent.xyz,0.0)));vec3 N=normalize(g*aNormal);vec3 B=normalize(cross(N,T))*aTangent.w;vTBN=mat3(T,B,N);gl_Position=uMatVP*(f*vec4(aPosition,1.0));}"
,
"#version 330 core\nflat in vec3 vEmission;in vec2 vTexCoord;in vec3 vColor;in mat3 vTBN;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform sampler2D uTexEmission;uniform sampler2D uTexOcclusion;uniform sampler2D uTexRoughness;uniform sampler2D uTexMetalness;uniform float uValOcclusion;uniform float uValRoughness;uniform float uValMetalness;layout(location=0)out vec3 a;layout(location=1)out vec3 b;layout(location=2)out vec2 c;layout(location=3)out vec3 d;vec2 EncodeOctahedral(vec3 f){f/=abs(f.x)+abs(f.y)+abs(f.z);vec2 e=f.xy;if(f.z < 0.0){vec2 g=vec2(f.x >=0.0 ? 1.0 :-1.0,f.y >=0.0 ? 1.0 :-1.0);e=(1.0-abs(e.yx))*g;}return e*0.5+0.5;}void main(){a=vColor*texture(uTexAlbedo,vTexCoord).rgb;b=vEmission*texture(uTexEmission,vTexCoord).rgb;c=EncodeOctahedral(normalize(vTBN*(texture(uTexNormal,vTexCoord).rgb*2.0-1.0)));d.r=uValOcclusion*texture(uTexOcclusion,vTexCoord).r;d.g=uValRoughness*texture(uTexRoughness,vTexCoord).g;d.b=uValMetalness*texture(uTexMetalness,vTexCoord).b;}"
);
DAT_002afeb0 = rlGetLocationUniform(DAT_002afeac,"uMatInvView");
DAT_002afeb4 = rlGetLocationUniform(DAT_002afeac,"uMatModel");
DAT_002afeb8 = rlGetLocationUniform(DAT_002afeac,"uMatVP");
DAT_002afec4 = rlGetLocationUniform(DAT_002afeac,"uTexCoordOffset");
DAT_002afed0 = rlGetLocationUniform(DAT_002afeac,"uTexCoordScale");
DAT_002afed8 = rlGetLocationUniform(DAT_002afeac,"uBillboardMode");
DAT_002afee0 = rlGetLocationUniform(DAT_002afeac,"uTexAlbedo");
DAT_002afee8 = rlGetLocationUniform(DAT_002afeac,"uTexNormal");
DAT_002afef0 = rlGetLocationUniform(DAT_002afeac,"uTexEmission");
DAT_002afef8 = rlGetLocationUniform(DAT_002afeac,"uTexOcclusion");
DAT_002aff00 = rlGetLocationUniform(DAT_002afeac,"uTexRoughness");
DAT_002aff08 = rlGetLocationUniform(DAT_002afeac,"uTexMetalness");
DAT_002aff10 = rlGetLocationUniform(DAT_002afeac,"uValEmission");
DAT_002aff18 = rlGetLocationUniform(DAT_002afeac,"uValOcclusion");
DAT_002aff20 = rlGetLocationUniform(DAT_002afeac,"uValRoughness");
DAT_002aff28 = rlGetLocationUniform(DAT_002afeac,"uValMetalness");
DAT_002aff38 = rlGetLocationUniform(DAT_002afeac,"uColAlbedo");
DAT_002aff48 = rlGetLocationUniform(DAT_002afeac,"uColEmission");
rlEnableShader(DAT_002afeac);
if (DAT_002afedc != 0) {
DAT_002afedc = 0;
rlSetUniform(DAT_002afee0,&DAT_002afedc,4,1);
}
if (DAT_002afee4 != 1) {
DAT_002afee4 = 1;
rlSetUniform(DAT_002afee8,&DAT_002afee4,4,1);
}
if (DAT_002afeec != 2) {
DAT_002afeec = 2;
rlSetUniform(DAT_002afef0,&DAT_002afeec,4,1);
}
if (DAT_002afef4 != 3) {
DAT_002afef4 = 3;
rlSetUniform(DAT_002afef8,&DAT_002afef4,4,1);
}
if (DAT_002afefc != 4) {
DAT_002afefc = 4;
rlSetUniform(DAT_002aff00,&DAT_002afefc,4,1);
}
if (DAT_002aff04 != 5) {
DAT_002aff04 = 5;
rlSetUniform(DAT_002aff08,&DAT_002aff04,4,1);
}
rlDisableShader();
return;
}
|
|
14,539
|
minja::Value::get(minja::Value const&)
|
monkey531[P]llama/common/minja.hpp
|
Value get(const Value& key) {
if (array_) {
if (!key.is_number_integer()) {
return Value();
}
auto index = key.get<int>();
return array_->at(index < 0 ? array_->size() + index : index);
} else if (object_) {
if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump());
auto it = object_->find(key.primitive_);
if (it == object_->end()) return Value();
return it->second;
}
return Value();
}
|
O2
|
cpp
|
minja::Value::get(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x10(%rsi)
je 0x6db76
movb 0x40(%r15), %al
addb $-0x5, %al
cmpb $0x2, %al
jae 0x6dba9
movq %r15, %rdi
callq 0x6dd78
movl %eax, %ecx
movq 0x10(%r14), %rdi
testl %eax, %eax
js 0x6dbb3
movl %ecx, %esi
jmp 0x6dbc8
cmpq $0x0, 0x20(%r14)
je 0x6dba9
movq %r15, %rdi
callq 0x65b6e
testb %al, %al
je 0x6dbe6
movq 0x20(%r14), %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x6de2e
movq 0x20(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x6dba9
addq $0x10, %rax
jmp 0x6dbcd
movq %rbx, %rdi
callq 0x68ccc
jmp 0x6dbd8
movq 0x8(%rdi), %rax
subq (%rdi), %rax
pushq $0x50
popq %rsi
cqto
idivq %rsi
movslq %ecx, %rsi
addq %rax, %rsi
callq 0x6dc7a
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6b366
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x24520
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x65b7e
leaq 0x488f0(%rip), %rsi # 0xb64fa
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x5b1b2
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x25050
xorl %ebp, %ebp
movq 0x933be(%rip), %rsi # 0x100ff0
movq 0x9331f(%rip), %rdx # 0x100f58
movq %rbx, %rdi
callq 0x25150
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x25478
jmp 0x6dc56
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x25478
testb %bpl, %bpl
jne 0x6dc6a
jmp 0x6dc72
movq %rax, %r14
movq %rbx, %rdi
callq 0x247a0
movq %r14, %rdi
callq 0x251e0
|
_ZN5minja5Value3getERKS0_:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
cmp qword ptr [rsi+10h], 0
jz short loc_6DB76
mov al, [r15+40h]
add al, 0FBh
cmp al, 2
jnb short loc_6DBA9
mov rdi, r15
call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void)
mov ecx, eax
mov rdi, [r14+10h]
test eax, eax
js short loc_6DBB3
mov esi, ecx
jmp short loc_6DBC8
loc_6DB76:
cmp qword ptr [r14+20h], 0
jz short loc_6DBA9
mov rdi, r15; this
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, al
jz short loc_6DBE6
mov rdi, [r14+20h]
add r15, 40h ; '@'
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE4findERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<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,minja::Value>>>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rcx, [r14+20h]
cmp rax, [rcx+8]
jz short loc_6DBA9
add rax, 10h
jmp short loc_6DBCD
loc_6DBA9:
mov rdi, rbx; this
call _ZN5minja5ValueC2Ev; minja::Value::Value(void)
jmp short loc_6DBD8
loc_6DBB3:
mov rax, [rdi+8]
sub rax, [rdi]
push 50h ; 'P'
pop rsi
cqo
idiv rsi
movsxd rsi, ecx
add rsi, rax
loc_6DBC8:
call _ZNSt6vectorIN5minja5ValueESaIS1_EE2atEm; std::vector<minja::Value>::at(ulong)
loc_6DBCD:
mov rdi, rbx; this
mov rsi, rax; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
loc_6DBD8:
mov rax, rbx
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_6DBE6:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+68h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6DC56
mov r14, rax
mov bpl, 1
loc_6DC56:
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_6DC6A
jmp short loc_6DC72
mov r14, rax
loc_6DC6A:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6DC72:
mov rdi, r14
call __Unwind_Resume
|
minja::Value * minja::Value::get(minja::Value *this, const minja::Value *a2, minja::Value *a3)
{
int v5; // ecx
_QWORD *v6; // rdi
long long v7; // rsi
long long v8; // rax
const minja::Value *v9; // rax
void *exception; // rbx
_BYTE v12[32]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v13[64]; // [rsp+28h] [rbp-40h] BYREF
if ( *((_QWORD *)a2 + 2) )
{
if ( (unsigned __int8)(*((_BYTE *)a3 + 64) - 5) < 2u )
{
v5 = minja::Value::get<int>(a3);
v6 = (_QWORD *)*((_QWORD *)a2 + 2);
if ( v5 < 0 )
v7 = (v6[1] - *v6) / 80LL + v5;
else
v7 = (unsigned int)v5;
v9 = (const minja::Value *)std::vector<minja::Value>::at(v6, v7);
goto LABEL_12;
}
}
else if ( *((_QWORD *)a2 + 4) )
{
if ( !minja::Value::is_primitive(a3) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v12, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v13, (long long)"Unashable type: ", (long long)v12);
std::runtime_error::runtime_error(exception, v13);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v8 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::find(
*((_QWORD *)a2 + 4),
(char *)a3 + 64);
if ( v8 != *(_QWORD *)(*((_QWORD *)a2 + 4) + 8LL) )
{
v9 = (const minja::Value *)(v8 + 16);
LABEL_12:
minja::Value::Value(this, v9);
return this;
}
}
minja::Value::Value(this);
return this;
}
|
get:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
CMP qword ptr [RSI + 0x10],0x0
JZ 0x0016db76
MOV AL,byte ptr [R15 + 0x40]
ADD AL,0xfb
CMP AL,0x2
JNC 0x0016dba9
MOV RDI,R15
CALL 0x0016dd78
MOV ECX,EAX
MOV RDI,qword ptr [R14 + 0x10]
TEST EAX,EAX
JS 0x0016dbb3
MOV ESI,ECX
JMP 0x0016dbc8
LAB_0016db76:
CMP qword ptr [R14 + 0x20],0x0
JZ 0x0016dba9
MOV RDI,R15
CALL 0x00165b6e
TEST AL,AL
JZ 0x0016dbe6
MOV RDI,qword ptr [R14 + 0x20]
ADD R15,0x40
MOV RSI,R15
CALL 0x0016de2e
MOV RCX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0016dba9
ADD RAX,0x10
JMP 0x0016dbcd
LAB_0016dba9:
MOV RDI,RBX
CALL 0x00168ccc
JMP 0x0016dbd8
LAB_0016dbb3:
MOV RAX,qword ptr [RDI + 0x8]
SUB RAX,qword ptr [RDI]
PUSH 0x50
POP RSI
CQO
IDIV RSI
MOVSXD RSI,ECX
ADD RSI,RAX
LAB_0016dbc8:
CALL 0x0016dc7a
LAB_0016dbcd:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0016b366
LAB_0016dbd8:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0016dbe6:
PUSH 0x10
POP RDI
CALL 0x00124520
MOV RBX,RAX
LAB_0016dbf1:
LEA RDI,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x00165b7e
LAB_0016dc03:
LEA RSI,[0x1b64fa]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0015b1b2
MOV BPL,0x1
LAB_0016dc1c:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00125050
XOR EBP,EBP
MOV RSI,qword ptr [0x00200ff0]
MOV RDX,qword ptr [0x00200f58]
MOV RDI,RBX
CALL 0x00125150
|
/* minja::Value::get(minja::Value const&) */
Value * minja::Value::get(Value *param_1)
{
vector<minja::Value,std::allocator<minja::Value>> *this;
char cVar1;
uint uVar2;
long lVar3;
Value *pVVar4;
runtime_error *this_00;
Value *in_RDX;
long in_RSI;
ulong uVar5;
int1 local_60 [32];
string local_40 [32];
if (*(long *)(in_RSI + 0x10) == 0) {
if (*(long *)(in_RSI + 0x20) != 0) {
cVar1 = is_primitive(in_RDX);
if (cVar1 == '\0') {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016dbf1 to 0016dc02 has its CatchHandler @ 0016dc67 */
dump_abi_cxx11_((int)local_60,SUB81(in_RSI,0));
/* try { // try from 0016dc03 to 0016dc18 has its CatchHandler @ 0016dc50 */
std::operator+((char *)local_40,(string *)"Unashable type: ");
/* try { // try from 0016dc1c to 0016dc40 has its CatchHandler @ 0016dc41 */
std::runtime_error::runtime_error(this_00,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00200ff0,PTR__runtime_error_00200f58);
}
lVar3 = nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::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>,minja::Value,std::less<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<std::pair<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,minja::Value>>>
::find(*(ordered_map<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>,minja::Value,std::less<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<std::pair<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,minja::Value>>>
**)(in_RSI + 0x20),in_RDX + 0x40);
if (lVar3 != *(long *)(*(long *)(in_RSI + 0x20) + 8)) {
pVVar4 = (Value *)(lVar3 + 0x10);
goto LAB_0016dbcd;
}
}
}
else if ((byte)((char)in_RDX[0x40] - 5U) < 2) {
uVar2 = get<int>(in_RDX);
this = *(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10);
if ((int)uVar2 < 0) {
uVar5 = (long)(int)uVar2 + (*(long *)(this + 8) - *(long *)this) / 0x50;
}
else {
uVar5 = (ulong)uVar2;
}
pVVar4 = (Value *)std::vector<minja::Value,std::allocator<minja::Value>>::at(this,uVar5);
LAB_0016dbcd:
Value(param_1,pVVar4);
return param_1;
}
Value(param_1);
return param_1;
}
|
|
14,540
|
Settings::allMasterShipsSunk() const
|
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
|
bool Settings::allMasterShipsSunk() const {
std::lock_guard<std::mutex> lock(settings_mutex);
for (const auto& ship : masterShips) {
if (!ship.isSunk()) return false;
}
return true;
}
|
O1
|
cpp
|
Settings::allMasterShipsSunk() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5500
testl %eax, %eax
jne 0x7145
movq 0x90(%rbx), %r14
movq 0x98(%rbx), %r15
cmpq %r15, %r14
sete %bpl
je 0x712c
movq %r14, %rdi
callq 0x155d2
testb %al, %al
je 0x712c
addq $0x40, %r14
jmp 0x7111
movq %rbx, %rdi
callq 0x52d0
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x5260
movq %rax, %r14
movq %rbx, %rdi
callq 0x52d0
movq %r14, %rdi
callq 0x55e0
nop
|
_ZNK8Settings18allMasterShipsSunkEv:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdi
call _pthread_mutex_lock
test eax, eax
jnz short loc_7145
mov r14, [rbx+90h]
mov r15, [rbx+98h]
loc_7111:
cmp r14, r15
setz bpl
jz short loc_712C
mov rdi, r14; this
call _ZNK4Ship6isSunkEv; Ship::isSunk(void)
test al, al
jz short loc_712C
add r14, 40h ; '@'
jmp short loc_7111
loc_712C:
mov rdi, rbx
call _pthread_mutex_unlock
and bpl, 1
mov eax, ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_7145:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov r14, rax
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
|
long long Settings::allMasterShipsSunk(Ship **this)
{
unsigned int v1; // ebp
int v2; // eax
Ship *v3; // r14
Ship *v4; // r15
v2 = pthread_mutex_lock(this);
if ( v2 )
std::__throw_system_error(v2);
v3 = this[18];
v4 = this[19];
while ( v3 != v4 && (unsigned __int8)Ship::isSunk(v3) )
v3 = (Ship *)((char *)v3 + 64);
pthread_mutex_unlock(this);
LOBYTE(v1) = v3 == v4;
return v1;
}
|
allMasterShipsSunk:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00105500
TEST EAX,EAX
JNZ 0x00107145
MOV R14,qword ptr [RBX + 0x90]
MOV R15,qword ptr [RBX + 0x98]
LAB_00107111:
CMP R14,R15
SETZ BPL
JZ 0x0010712c
LAB_0010711a:
MOV RDI,R14
CALL 0x001155d2
LAB_00107122:
TEST AL,AL
JZ 0x0010712c
ADD R14,0x40
JMP 0x00107111
LAB_0010712c:
MOV RDI,RBX
CALL 0x001052d0
AND BPL,0x1
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00107145:
MOV EDI,EAX
CALL 0x00105260
|
/* Settings::allMasterShipsSunk() const */
ulong __thiscall Settings::allMasterShipsSunk(Settings *this)
{
Ship *pSVar1;
char cVar2;
int iVar3;
int8 unaff_RBP;
int7 uVar4;
Ship *this_00;
bool bVar5;
iVar3 = pthread_mutex_lock((pthread_mutex_t *)this);
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
this_00 = *(Ship **)(this + 0x90);
pSVar1 = *(Ship **)(this + 0x98);
while( true ) {
bVar5 = this_00 == pSVar1;
uVar4 = (int7)((ulong)unaff_RBP >> 8);
unaff_RBP = CONCAT71(uVar4,bVar5);
if (bVar5) break;
/* try { // try from 0010711a to 00107121 has its CatchHandler @ 0010714c */
cVar2 = Ship::isSunk(this_00);
if (cVar2 == '\0') break;
this_00 = this_00 + 0x40;
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return CONCAT71(uVar4,bVar5) & 0xffffffff;
}
|
|
14,541
|
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 0xe0f70
jmp 0xe0f72
cmpq $0x0, -0x20(%rbp)
je 0xe1353
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 0xe100d
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 0xe103f
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 0xe1079
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq -0x28(%rbp), %rcx
cmpq %rcx, %rax
jbe 0xe1079
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0xe109c
movq -0x40(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xe4(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xe135c
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xe2b20
cmpl $0x0, %eax
je 0xe1210
jmp 0xe10b4
jmp 0xe10b6
movq -0x10(%rbp), %rax
cmpl $0x0, 0xd4(%rax)
jge 0xe10d0
movq $0x0, -0x58(%rbp)
jmp 0xe1165
movq -0x10(%rbp), %rax
cmpl $0x0, 0xe0(%rax)
je 0xe112f
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x28(%rbp), %rcx
leaq 0x72eae(%rip), %rdi # 0x153fa0
movl $0x4cb, %esi # imm = 0x4CB
xorl %r8d, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0xdffa0
cmpq $-0x1, %rax
jne 0xe112d
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rdi
callq 0xe2d80
movl $0x1, -0x4(%rbp)
jmp 0xe135c
jmp 0xe112f
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 0x72e49(%rip), %rdi # 0x153fa0
movl $0x4d3, %esi # imm = 0x4D3
callq 0xe29b0
movq %rax, -0x58(%rbp)
jmp 0xe1167
jmp 0xe1169
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x68(%rbp)
cmpq $-0x1, -0x58(%rbp)
jne 0xe1184
xorl %eax, %eax
movq %rax, -0x70(%rbp)
jmp 0xe118c
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 0xe11b0
xorl %eax, %eax
movl %eax, -0x74(%rbp)
jmp 0xe11b7
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 0xe2d80
jmp 0xe1282
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 0xe1263
movq $-0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0xe127a
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 0xe12ae
cmpq $-0x1, -0x58(%rbp)
jne 0xe12ce
jmp 0xe12b0
jmp 0xe12b2
movq -0x40(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xe4(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xe135c
movq -0x58(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0xe12e5
movq -0x20(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0xe12f0
movq -0x58(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xe1317
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x50(%rbp), %rdx
callq 0x2a090
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 0xe0f72
jmp 0xe1355
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_E0F70:
jmp short $+2
loc_E0F72:
cmp [rbp+var_20], 0
jz loc_E1353
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_E100D
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_E103F
loc_E100D:
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_E103F:
mov rax, [rbp+var_60]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+0B0h], 4
jz short loc_E1079
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_E1079
mov rax, [rbp+var_10]
mov rax, [rax+8]
sub rax, [rbp+var_28]
mov [rbp+var_30], rax
loc_E1079:
cmp [rbp+var_30], 0
jnz short loc_E109C
mov rax, [rbp+var_40]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+0E4h], ecx
mov [rbp+var_4], 1
jmp loc_E135C
loc_E109C:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
call lock_io_cache
cmp eax, 0
jz loc_E1210
jmp short $+2
loc_E10B4:
jmp short $+2
loc_E10B6:
mov rax, [rbp+var_10]
cmp dword ptr [rax+0D4h], 0
jge short loc_E10D0
mov [rbp+var_58], 0
jmp loc_E1165
loc_E10D0:
mov rax, [rbp+var_10]
cmp dword ptr [rax+0E0h], 0
jz short loc_E112F
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_28]
lea rdi, aWorkspaceLlm4b_35; "/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_E112D
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_E135C
loc_E112D:
jmp short $+2
loc_E112F:
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_35; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 4D3h
call inline_mysql_file_read_5
mov [rbp+var_58], rax
loc_E1165:
jmp short $+2
loc_E1167:
jmp short $+2
loc_E1169:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov [rbp+var_68], rax
cmp [rbp+var_58], 0FFFFFFFFFFFFFFFFh
jnz short loc_E1184
xor eax, eax
mov [rbp+var_70], rax
jmp short loc_E118C
loc_E1184:
mov rax, [rbp+var_58]
mov [rbp+var_70], rax
loc_E118C:
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_E11B0
xor eax, eax
mov [rbp+var_74], eax
jmp short loc_E11B7
loc_E11B0:
mov rax, [rbp+var_58]
mov [rbp+var_74], eax
loc_E11B7:
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_E1282
loc_E1210:
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_E1263
mov rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_80], rax
jmp short loc_E127A
loc_E1263:
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_E127A:
mov rax, [rbp+var_80]
mov [rbp+var_58], rax
loc_E1282:
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_E12AE
cmp [rbp+var_58], 0FFFFFFFFFFFFFFFFh
jnz short loc_E12CE
loc_E12AE:
jmp short $+2
loc_E12B0:
jmp short $+2
loc_E12B2:
mov rax, [rbp+var_40]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+0E4h], ecx
mov [rbp+var_4], 1
jmp loc_E135C
loc_E12CE:
mov rax, [rbp+var_58]
cmp rax, [rbp+var_20]
jbe short loc_E12E5
mov rax, [rbp+var_20]
mov [rbp+var_88], rax
jmp short loc_E12F0
loc_E12E5:
mov rax, [rbp+var_58]
mov [rbp+var_88], rax
loc_E12F0:
mov rax, [rbp+var_88]
mov [rbp+var_50], rax
cmp [rbp+var_50], 0
jz short loc_E1317
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
mov rdx, [rbp+var_50]
call _memcpy
loc_E1317:
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_E0F72
loc_E1353:
jmp short $+2
loc_E1355:
mov [rbp+var_4], 0
loc_E135C:
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 0x001e0f70
LAB_001e0f70:
JMP 0x001e0f72
LAB_001e0f72:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001e1353
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 0x001e100d
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 0x001e103f
LAB_001e100d:
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_001e103f:
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 0x001e1079
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 0x001e1079
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_001e1079:
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x001e109c
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 0x001e135c
LAB_001e109c:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001e2b20
CMP EAX,0x0
JZ 0x001e1210
JMP 0x001e10b4
LAB_001e10b4:
JMP 0x001e10b6
LAB_001e10b6:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0xd4],0x0
JGE 0x001e10d0
MOV qword ptr [RBP + -0x58],0x0
JMP 0x001e1165
LAB_001e10d0:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0xe0],0x0
JZ 0x001e112f
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x28]
LEA RDI,[0x253fa0]
MOV ESI,0x4cb
XOR R8D,R8D
XOR EAX,EAX
MOV R9D,EAX
CALL 0x001dffa0
CMP RAX,-0x1
JNZ 0x001e112d
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],0xffffffff
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e2d80
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e135c
LAB_001e112d:
JMP 0x001e112f
LAB_001e112f:
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,[0x253fa0]
MOV ESI,0x4d3
CALL 0x001e29b0
MOV qword ptr [RBP + -0x58],RAX
LAB_001e1165:
JMP 0x001e1167
LAB_001e1167:
JMP 0x001e1169
LAB_001e1169:
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 0x001e1184
XOR EAX,EAX
MOV qword ptr [RBP + -0x70],RAX
JMP 0x001e118c
LAB_001e1184:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x70],RAX
LAB_001e118c:
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 0x001e11b0
XOR EAX,EAX
MOV dword ptr [RBP + -0x74],EAX
JMP 0x001e11b7
LAB_001e11b0:
MOV RAX,qword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x74],EAX
LAB_001e11b7:
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 0x001e2d80
JMP 0x001e1282
LAB_001e1210:
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 0x001e1263
MOV RAX,-0x1
MOV qword ptr [RBP + -0x80],RAX
JMP 0x001e127a
LAB_001e1263:
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_001e127a:
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x58],RAX
LAB_001e1282:
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 0x001e12ae
CMP qword ptr [RBP + -0x58],-0x1
JNZ 0x001e12ce
LAB_001e12ae:
JMP 0x001e12b0
LAB_001e12b0:
JMP 0x001e12b2
LAB_001e12b2:
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 0x001e135c
LAB_001e12ce:
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001e12e5
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x88],RAX
JMP 0x001e12f0
LAB_001e12e5:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x88],RAX
LAB_001e12f0:
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001e1317
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 0x0012a090
LAB_001e1317:
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 0x001e0f72
LAB_001e1353:
JMP 0x001e1355
LAB_001e1355:
MOV dword ptr [RBP + -0x4],0x0
LAB_001e135c:
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;
}
|
|
14,542
|
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);
}
|
O3
|
c
|
my_b_cache_read_r:
testq %rdx, %rdx
je 0x95b7e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, -0x50(%rbp)
movq 0x98(%rdi), %rax
movq %rax, -0x40(%rbp)
xorl %edx, %edx
movq 0x18(%rbx), %r13
movq 0xf0(%rbx), %r12
subq 0x20(%rbx), %r13
addq (%rbx), %r13
movl %r13d, %ecx
andl $0xfff, %ecx # imm = 0xFFF
leal (%r14,%rcx), %eax
addl $0xfff, %eax # imm = 0xFFF
andl $0xfffff000, %eax # imm = 0xFFFFF000
subq %rcx, %rax
cmpq %r12, %rax
jbe 0x9590c
movl %eax, %ecx
subl %r12d, %ecx
addl $0xfff, %ecx # imm = 0xFFF
andl $0xfffff000, %ecx # imm = 0xFFFFF000
subq %rcx, %rax
movq %rax, %r12
jmp 0x95919
subl %eax, %r12d
andl $0xfffff000, %r12d # imm = 0xFFFFF000
addq %rax, %r12
cmpl $0x4, 0xb0(%rbx)
je 0x95930
movq 0x8(%rbx), %rax
subq %r13, %rax
cmpq %rax, %r12
cmovaeq %rax, %r12
testq %r12, %r12
je 0x95b81
movq %rdx, -0x48(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x96eaa
testl %eax, %eax
je 0x95a11
movl 0xd4(%rbx), %r15d
testl %r15d, %r15d
js 0x95a48
cmpl $0x0, 0xe0(%rbx)
je 0x959b1
leaq 0x2f06a0(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0xa8(%rbp), %rdi
movl %r15d, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x95b63
movl %r15d, %edi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xa0ba4
cmpq $-0x1, %rax
je 0x95bbc
movl 0xd4(%rbx), %r15d
movq 0x20(%rbx), %rax
movq %rax, -0x38(%rbp)
movq 0xf8(%rbx), %rax
movq %rax, -0x30(%rbp)
leaq 0x2f0645(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0xa8(%rbp), %rdi
movl %r15d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x95aea
movl %r15d, %edi
movq -0x38(%rbp), %rsi
movq %r12, %rdx
movq -0x30(%rbp), %rcx
callq 0xa09a4
movq %rax, %r15
cmpq $-0x1, %r15
movl $0x0, %eax
cmovneq %r15, %rax
jmp 0x95a4d
movq -0x40(%rbp), %rcx
movl 0xe0(%rcx), %eax
movl %eax, 0xe4(%rbx)
movq 0xd0(%rcx), %r15
movq %r15, 0x18(%rbx)
movq 0xb8(%rcx), %rcx
movq %rcx, (%rbx)
movq 0x20(%rbx), %rsi
cmpl $-0x1, %eax
je 0x95b8d
subq %rsi, %r15
jmp 0x95a98
xorl %r15d, %r15d
xorl %eax, %eax
addq 0x20(%rbx), %rax
cmpq %r12, %r15
movl %r15d, %ecx
movl $0x0, %edx
cmovel %edx, %ecx
movq %rax, 0x18(%rbx)
movl %ecx, 0xe4(%rbx)
movq %r13, (%rbx)
movq -0x40(%rbp), %rdx
movl %ecx, 0xe0(%rdx)
movq 0x18(%rbx), %rax
movq %rax, 0xd0(%rdx)
movq %r13, 0xb8(%rdx)
movq 0x98(%rbx), %rdi
callq 0x970ab
movq 0x20(%rbx), %rsi
movq %rsi, 0x10(%rbx)
movl $0x0, 0xe0(%rbx)
leaq 0x1(%r15), %rax
cmpq $0x1, %rax
jbe 0x95b9b
cmpq %r14, %r15
cmovaeq %r14, %r15
movq -0x50(%rbp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0x29080
addq %r15, %r12
movq %r12, -0x50(%rbp)
movq -0x48(%rbp), %rdx
addq %r15, %rdx
addq %r15, 0x10(%rbx)
subq %r15, %r14
jne 0x958c2
jmp 0x95b89
movq %rax, %rcx
leaq 0x2f051c(%rip), %rax # 0x386010
movq (%rax), %rax
movq %rcx, -0x58(%rbp)
movq %rcx, %rdi
movq %r12, %rsi
leaq 0x46491(%rip), %rdx # 0xdbf99
movl $0x4d3, %ecx # imm = 0x4D3
callq *0x210(%rax)
movl %r15d, %edi
movq -0x38(%rbp), %rsi
movq %r12, %rdx
movq -0x30(%rbp), %rcx
callq 0xa09a4
movq %rax, %r15
testq %rax, %rax
movl $0x0, %eax
cmoveq %r12, %rax
cmpq $-0x1, %r15
movl $0x0, %esi
cmovneq %r15, %rsi
testb $0x6, -0x30(%rbp)
cmovneq %rax, %rsi
leaq 0x2f04bf(%rip), %rax # 0x386010
movq (%rax), %rax
movq -0x58(%rbp), %rdi
callq *0x218(%rax)
jmp 0x95a02
movq %rax, %rdi
movl %r15d, %esi
movq %r13, %rdx
leaq -0x60(%rbp), %rcx
callq 0x2ea0a
movq -0x60(%rbp), %rax
jmp 0x959a0
xorl %eax, %eax
retq
movl %edx, 0xe4(%rbx)
jmp 0x95ba5
xorl %eax, %eax
jmp 0x95baa
movq %rsi, 0x10(%rbx)
movl $0x0, 0xe0(%rbx)
movq -0x48(%rbp), %rax
movl %eax, 0xe4(%rbx)
movl $0x1, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF
movq 0x98(%rbx), %rdi
callq 0x970ab
jmp 0x95ba5
|
_my_b_cache_read_r:
test rdx, rdx
jz loc_95B7E
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r14, rdx
mov rbx, rdi
mov [rbp-50h], rsi
mov rax, [rdi+98h]
mov [rbp-40h], rax
xor edx, edx
loc_958C2:
mov r13, [rbx+18h]
mov r12, [rbx+0F0h]
sub r13, [rbx+20h]
add r13, [rbx]
mov ecx, r13d
and ecx, 0FFFh
lea eax, [r14+rcx]
add eax, 0FFFh
and eax, 0FFFFF000h
sub rax, rcx
cmp rax, r12
jbe short loc_9590C
mov ecx, eax
sub ecx, r12d
add ecx, 0FFFh
and ecx, 0FFFFF000h
sub rax, rcx
mov r12, rax
jmp short loc_95919
loc_9590C:
sub r12d, eax
and r12d, 0FFFFF000h
add r12, rax
loc_95919:
cmp dword ptr [rbx+0B0h], 4
jz short loc_95930
mov rax, [rbx+8]
sub rax, r13
cmp r12, rax
cmovnb r12, rax
loc_95930:
test r12, r12
jz loc_95B81
mov [rbp-48h], rdx
mov rdi, rbx
mov rsi, r13
call lock_io_cache
test eax, eax
jz loc_95A11
mov r15d, [rbx+0D4h]
test r15d, r15d
js loc_95A48
cmp dword ptr [rbx+0E0h], 0
jz short loc_959B1
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp-0A8h]
mov esi, r15d
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz loc_95B63
mov edi, r15d
mov rsi, r13
xor edx, edx
xor ecx, ecx
call my_seek
loc_959A0:
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_95BBC
mov r15d, [rbx+0D4h]
loc_959B1:
mov rax, [rbx+20h]
mov [rbp-38h], rax
mov rax, [rbx+0F8h]
mov [rbp-30h], rax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp-0A8h]
mov esi, r15d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_95AEA
mov edi, r15d
mov rsi, [rbp-38h]
mov rdx, r12
mov rcx, [rbp-30h]
call my_read
mov r15, rax
loc_95A02:
cmp r15, 0FFFFFFFFFFFFFFFFh
mov eax, 0
cmovnz rax, r15
jmp short loc_95A4D
loc_95A11:
mov rcx, [rbp-40h]
mov eax, [rcx+0E0h]
mov [rbx+0E4h], eax
mov r15, [rcx+0D0h]
mov [rbx+18h], r15
mov rcx, [rcx+0B8h]
mov [rbx], rcx
mov rsi, [rbx+20h]
cmp eax, 0FFFFFFFFh
jz loc_95B8D
sub r15, rsi
jmp short loc_95A98
loc_95A48:
xor r15d, r15d
xor eax, eax
loc_95A4D:
add rax, [rbx+20h]
cmp r15, r12
mov ecx, r15d
mov edx, 0
cmovz ecx, edx
mov [rbx+18h], rax
mov [rbx+0E4h], ecx
mov [rbx], r13
mov rdx, [rbp-40h]
mov [rdx+0E0h], ecx
mov rax, [rbx+18h]
mov [rdx+0D0h], rax
mov [rdx+0B8h], r13
mov rdi, [rbx+98h]
call unlock_io_cache
mov rsi, [rbx+20h]
loc_95A98:
mov [rbx+10h], rsi
mov dword ptr [rbx+0E0h], 0
lea rax, [r15+1]
cmp rax, 1
jbe loc_95B9B
cmp r15, r14
cmovnb r15, r14
mov r12, [rbp-50h]
mov rdi, r12
mov rdx, r15
call _memcpy
add r12, r15
mov [rbp-50h], r12
mov rdx, [rbp-48h]
add rdx, r15
add [rbx+10h], r15
sub r14, r15
jnz loc_958C2
jmp loc_95B89
loc_95AEA:
mov rcx, rax
lea rax, PSI_server
mov rax, [rax]
mov [rbp-58h], rcx
mov rdi, rcx
mov rsi, r12
lea rdx, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4D3h
call qword ptr [rax+210h]
mov edi, r15d
mov rsi, [rbp-38h]
mov rdx, r12
mov rcx, [rbp-30h]
call my_read
mov r15, rax
test rax, rax
mov eax, 0
cmovz rax, r12
cmp r15, 0FFFFFFFFFFFFFFFFh
mov esi, 0
cmovnz rsi, r15
test byte ptr [rbp-30h], 6
cmovnz rsi, rax
lea rax, PSI_server
mov rax, [rax]
mov rdi, [rbp-58h]
call qword ptr [rax+218h]
jmp loc_95A02
loc_95B63:
mov rdi, rax
mov esi, r15d
mov rdx, r13
lea rcx, [rbp-60h]
call _my_b_cache_read_r_cold_1
mov rax, [rbp-60h]
jmp loc_959A0
loc_95B7E:
xor eax, eax
retn
loc_95B81:
mov [rbx+0E4h], edx
jmp short loc_95BA5
loc_95B89:
xor eax, eax
jmp short loc_95BAA
loc_95B8D:
mov [rbx+10h], rsi
mov dword ptr [rbx+0E0h], 0
loc_95B9B:
mov rax, [rbp-48h]
mov [rbx+0E4h], eax
loc_95BA5:
mov eax, 1
loc_95BAA:
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_95BBC:
mov dword ptr [rbx+0E4h], 0FFFFFFFFh
mov rdi, [rbx+98h]
call unlock_io_cache
jmp short loc_95BA5
|
long long my_b_cache_read_r(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v3; // r14
long long v4; // rdx
unsigned long long v5; // r12
long long v6; // r13
long long v7; // rcx
unsigned long long v8; // rax
unsigned long long v9; // r12
unsigned int v10; // r15d
long long v11; // rax
long long v12; // rax
long long v13; // rax
unsigned long long v14; // r15
unsigned long long v15; // rax
long long v16; // rcx
int v17; // eax
long long v18; // r15
long long v19; // rsi
unsigned long long v20; // rax
int v21; // ecx
long long v22; // rdx
long long v23; // r12
unsigned long long v24; // rax
unsigned long long v25; // rsi
_BYTE v27[72]; // [rsp-B0h] [rbp-B0h] BYREF
long long v28; // [rsp-68h] [rbp-68h] BYREF
long long v29; // [rsp-60h] [rbp-60h]
long long v30; // [rsp-58h] [rbp-58h]
long long v31; // [rsp-50h] [rbp-50h]
long long v32; // [rsp-48h] [rbp-48h]
long long v33; // [rsp-40h] [rbp-40h]
long long v34; // [rsp-38h] [rbp-38h]
if ( !a3 )
return 0LL;
v3 = a3;
v30 = a2;
v32 = *(_QWORD *)(a1 + 152);
v4 = 0LL;
while ( 1 )
{
v5 = *(_QWORD *)(a1 + 240);
v6 = *(_QWORD *)a1 + *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 32);
v7 = (*(_WORD *)a1 + *(_WORD *)(a1 + 24) - *(_WORD *)(a1 + 32)) & 0xFFF;
v8 = (((_DWORD)v3 + (_DWORD)v7 + 4095) & 0xFFFFF000) - v7;
if ( v8 <= v5 )
v9 = v8 + (((_DWORD)v5 - (_DWORD)v8) & 0xFFFFF000);
else
v9 = v8 - (((_DWORD)v8 - (_DWORD)v5 + 4095) & 0xFFFFF000);
if ( *(_DWORD *)(a1 + 176) != 4 && v9 >= *(_QWORD *)(a1 + 8) - v6 )
v9 = *(_QWORD *)(a1 + 8) - v6;
if ( !v9 )
{
*(_DWORD *)(a1 + 228) = v4;
return 1LL;
}
v31 = v4;
if ( (unsigned int)lock_io_cache(a1, v6) )
break;
v16 = v32;
v17 = *(_DWORD *)(v32 + 224);
*(_DWORD *)(a1 + 228) = v17;
v18 = *(_QWORD *)(v16 + 208);
*(_QWORD *)(a1 + 24) = v18;
*(_QWORD *)a1 = *(_QWORD *)(v16 + 184);
v19 = *(_QWORD *)(a1 + 32);
if ( v17 == -1 )
{
*(_QWORD *)(a1 + 16) = v19;
*(_DWORD *)(a1 + 224) = 0;
LABEL_44:
*(_DWORD *)(a1 + 228) = v31;
return 1LL;
}
v14 = v18 - v19;
LABEL_28:
*(_QWORD *)(a1 + 16) = v19;
*(_DWORD *)(a1 + 224) = 0;
if ( v14 + 1 <= 1 )
goto LABEL_44;
if ( v14 >= v3 )
v14 = v3;
v23 = v30;
memcpy(v30, v19, v14);
v30 = v14 + v23;
v4 = v14 + v31;
*(_QWORD *)(a1 + 16) += v14;
v3 -= v14;
if ( !v3 )
return 0LL;
}
v10 = *(_DWORD *)(a1 + 212);
if ( (v10 & 0x80000000) != 0 )
{
v14 = 0LL;
v15 = 0LL;
LABEL_25:
v20 = *(_QWORD *)(a1 + 32) + v15;
v21 = v14;
if ( v14 == v9 )
v21 = 0;
*(_QWORD *)(a1 + 24) = v20;
*(_DWORD *)(a1 + 228) = v21;
*(_QWORD *)a1 = v6;
v22 = v32;
*(_DWORD *)(v32 + 224) = v21;
*(_QWORD *)(v22 + 208) = *(_QWORD *)(a1 + 24);
*(_QWORD *)(v22 + 184) = v6;
unlock_io_cache(*(_QWORD *)(a1 + 152));
v19 = *(_QWORD *)(a1 + 32);
goto LABEL_28;
}
if ( !*(_DWORD *)(a1 + 224) )
{
LABEL_17:
v33 = *(_QWORD *)(a1 + 32);
v34 = *(_QWORD *)(a1 + 248);
v13 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v27, v10, 6LL);
if ( v13 )
{
v29 = v13;
((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])(
v13,
v9,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1235LL);
v14 = my_read(v10, v33, v9, v34);
v24 = 0LL;
if ( !v14 )
v24 = v9;
v25 = 0LL;
if ( v14 != -1LL )
v25 = v14;
if ( (v34 & 6) != 0 )
v25 = v24;
((void ( *)(long long, unsigned long long))PSI_server[67])(v29, v25);
}
else
{
v14 = my_read(v10, v33, v9, v34);
}
v15 = 0LL;
if ( v14 != -1LL )
v15 = v14;
goto LABEL_25;
}
v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v27, v10, 8LL);
if ( v11 )
{
my_b_cache_read_r_cold_1(v11, v10, v6, &v28);
v12 = v28;
}
else
{
v12 = my_seek(v10, v6, 0LL, 0LL);
}
if ( v12 != -1 )
{
v10 = *(_DWORD *)(a1 + 212);
goto LABEL_17;
}
*(_DWORD *)(a1 + 228) = -1;
unlock_io_cache(*(_QWORD *)(a1 + 152));
return 1LL;
}
|
_my_b_cache_read_r:
TEST RDX,RDX
JZ 0x00195b7e
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV RBX,RDI
MOV qword ptr [RBP + -0x50],RSI
MOV RAX,qword ptr [RDI + 0x98]
MOV qword ptr [RBP + -0x40],RAX
XOR EDX,EDX
LAB_001958c2:
MOV R13,qword ptr [RBX + 0x18]
MOV R12,qword ptr [RBX + 0xf0]
SUB R13,qword ptr [RBX + 0x20]
ADD R13,qword ptr [RBX]
MOV ECX,R13D
AND ECX,0xfff
LEA EAX,[R14 + RCX*0x1]
ADD EAX,0xfff
AND EAX,0xfffff000
SUB RAX,RCX
CMP RAX,R12
JBE 0x0019590c
MOV ECX,EAX
SUB ECX,R12D
ADD ECX,0xfff
AND ECX,0xfffff000
SUB RAX,RCX
MOV R12,RAX
JMP 0x00195919
LAB_0019590c:
SUB R12D,EAX
AND R12D,0xfffff000
ADD R12,RAX
LAB_00195919:
CMP dword ptr [RBX + 0xb0],0x4
JZ 0x00195930
MOV RAX,qword ptr [RBX + 0x8]
SUB RAX,R13
CMP R12,RAX
CMOVNC R12,RAX
LAB_00195930:
TEST R12,R12
JZ 0x00195b81
MOV qword ptr [RBP + -0x48],RDX
MOV RDI,RBX
MOV RSI,R13
CALL 0x00196eaa
TEST EAX,EAX
JZ 0x00195a11
MOV R15D,dword ptr [RBX + 0xd4]
TEST R15D,R15D
JS 0x00195a48
CMP dword ptr [RBX + 0xe0],0x0
JZ 0x001959b1
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa8]
MOV ESI,R15D
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00195b63
MOV EDI,R15D
MOV RSI,R13
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001a0ba4
LAB_001959a0:
CMP RAX,-0x1
JZ 0x00195bbc
MOV R15D,dword ptr [RBX + 0xd4]
LAB_001959b1:
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBX + 0xf8]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0xa8]
MOV ESI,R15D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00195aea
MOV EDI,R15D
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,R12
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001a09a4
MOV R15,RAX
LAB_00195a02:
CMP R15,-0x1
MOV EAX,0x0
CMOVNZ RAX,R15
JMP 0x00195a4d
LAB_00195a11:
MOV RCX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RCX + 0xe0]
MOV dword ptr [RBX + 0xe4],EAX
MOV R15,qword ptr [RCX + 0xd0]
MOV qword ptr [RBX + 0x18],R15
MOV RCX,qword ptr [RCX + 0xb8]
MOV qword ptr [RBX],RCX
MOV RSI,qword ptr [RBX + 0x20]
CMP EAX,-0x1
JZ 0x00195b8d
SUB R15,RSI
JMP 0x00195a98
LAB_00195a48:
XOR R15D,R15D
XOR EAX,EAX
LAB_00195a4d:
ADD RAX,qword ptr [RBX + 0x20]
CMP R15,R12
MOV ECX,R15D
MOV EDX,0x0
CMOVZ ECX,EDX
MOV qword ptr [RBX + 0x18],RAX
MOV dword ptr [RBX + 0xe4],ECX
MOV qword ptr [RBX],R13
MOV RDX,qword ptr [RBP + -0x40]
MOV dword ptr [RDX + 0xe0],ECX
MOV RAX,qword ptr [RBX + 0x18]
MOV qword ptr [RDX + 0xd0],RAX
MOV qword ptr [RDX + 0xb8],R13
MOV RDI,qword ptr [RBX + 0x98]
CALL 0x001970ab
MOV RSI,qword ptr [RBX + 0x20]
LAB_00195a98:
MOV qword ptr [RBX + 0x10],RSI
MOV dword ptr [RBX + 0xe0],0x0
LEA RAX,[R15 + 0x1]
CMP RAX,0x1
JBE 0x00195b9b
CMP R15,R14
CMOVNC R15,R14
MOV R12,qword ptr [RBP + -0x50]
MOV RDI,R12
MOV RDX,R15
CALL 0x00129080
ADD R12,R15
MOV qword ptr [RBP + -0x50],R12
MOV RDX,qword ptr [RBP + -0x48]
ADD RDX,R15
ADD qword ptr [RBX + 0x10],R15
SUB R14,R15
JNZ 0x001958c2
JMP 0x00195b89
LAB_00195aea:
MOV RCX,RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RCX
MOV RDI,RCX
MOV RSI,R12
LEA RDX,[0x1dbf99]
MOV ECX,0x4d3
CALL qword ptr [RAX + 0x210]
MOV EDI,R15D
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,R12
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001a09a4
MOV R15,RAX
TEST RAX,RAX
MOV EAX,0x0
CMOVZ RAX,R12
CMP R15,-0x1
MOV ESI,0x0
CMOVNZ RSI,R15
TEST byte ptr [RBP + -0x30],0x6
CMOVNZ RSI,RAX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x58]
CALL qword ptr [RAX + 0x218]
JMP 0x00195a02
LAB_00195b63:
MOV RDI,RAX
MOV ESI,R15D
MOV RDX,R13
LEA RCX,[RBP + -0x60]
CALL 0x0012ea0a
MOV RAX,qword ptr [RBP + -0x60]
JMP 0x001959a0
LAB_00195b7e:
XOR EAX,EAX
RET
LAB_00195b81:
MOV dword ptr [RBX + 0xe4],EDX
JMP 0x00195ba5
LAB_00195b89:
XOR EAX,EAX
JMP 0x00195baa
LAB_00195b8d:
MOV qword ptr [RBX + 0x10],RSI
MOV dword ptr [RBX + 0xe0],0x0
LAB_00195b9b:
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RBX + 0xe4],EAX
LAB_00195ba5:
MOV EAX,0x1
LAB_00195baa:
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00195bbc:
MOV dword ptr [RBX + 0xe4],0xffffffff
MOV RDI,qword ptr [RBX + 0x98]
CALL 0x001970ab
JMP 0x00195ba5
|
int8 _my_b_cache_read_r(long *param_1,void *param_2,ulong param_3)
{
void *pvVar1;
int iVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
uint uVar7;
int4 uVar8;
void *__src;
ulong uVar9;
long lVar10;
int1 local_b0 [72];
long local_68;
long local_60;
void *local_58;
long local_50;
long local_48;
long local_40;
ulong local_38;
if (param_3 == 0) {
return 0;
}
local_48 = param_1[0x13];
local_50 = 0;
local_58 = param_2;
while( true ) {
lVar10 = (param_1[3] - param_1[4]) + *param_1;
uVar7 = (uint)lVar10 & 0xfff;
uVar3 = (ulong)((int)param_3 + uVar7 + 0xfff & 0xfffff000) - (ulong)uVar7;
iVar2 = (int)param_1[0x1e];
if ((ulong)param_1[0x1e] < uVar3) {
uVar5 = -(ulong)(((int)uVar3 - iVar2) + 0xfffU & 0xfffff000);
}
else {
uVar5 = (ulong)(iVar2 - (int)uVar3 & 0xfffff000);
}
uVar3 = uVar3 + uVar5;
if (((int)param_1[0x16] != 4) && ((ulong)(param_1[1] - lVar10) <= uVar3)) {
uVar3 = param_1[1] - lVar10;
}
if (uVar3 == 0) {
*(int *)((long)param_1 + 0xe4) = (int)local_50;
return 1;
}
iVar2 = lock_io_cache(param_1,lVar10);
if (iVar2 == 0) {
iVar2 = *(int *)(local_48 + 0xe0);
*(int *)((long)param_1 + 0xe4) = iVar2;
lVar10 = *(long *)(local_48 + 0xd0);
param_1[3] = lVar10;
*param_1 = *(long *)(local_48 + 0xb8);
__src = (void *)param_1[4];
if (iVar2 == -1) {
param_1[2] = (long)__src;
*(int4 *)(param_1 + 0x1c) = 0;
break;
}
uVar5 = lVar10 - (long)__src;
}
else {
iVar2 = *(int *)((long)param_1 + 0xd4);
if (iVar2 < 0) {
uVar5 = 0;
uVar6 = 0;
}
else {
if ((int)param_1[0x1c] != 0) {
lVar4 = (**(code **)(PSI_server + 0x158))(local_b0,iVar2,8);
if (lVar4 == 0) {
lVar4 = my_seek(iVar2,lVar10,0,0);
}
else {
_my_b_cache_read_r_cold_1(lVar4,iVar2,lVar10,&local_68);
lVar4 = local_68;
}
if (lVar4 == -1) {
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
unlock_io_cache(param_1[0x13]);
return 1;
}
iVar2 = *(int *)((long)param_1 + 0xd4);
}
local_40 = param_1[4];
local_38 = param_1[0x1f];
lVar4 = (**(code **)(PSI_server + 0x158))(local_b0,iVar2,6);
if (lVar4 == 0) {
uVar5 = my_read(iVar2,local_40,uVar3,local_38);
}
else {
local_60 = lVar4;
(**(code **)(PSI_server + 0x210))
(lVar4,uVar3,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x4d3
);
uVar5 = my_read(iVar2,local_40,uVar3,local_38);
uVar6 = 0;
if (uVar5 == 0) {
uVar6 = uVar3;
}
uVar9 = 0;
if (uVar5 != 0xffffffffffffffff) {
uVar9 = uVar5;
}
if ((local_38 & 6) != 0) {
uVar9 = uVar6;
}
(**(code **)(PSI_server + 0x218))(local_60,uVar9);
}
uVar6 = 0;
if (uVar5 != 0xffffffffffffffff) {
uVar6 = uVar5;
}
}
uVar8 = (int4)uVar5;
if (uVar5 == uVar3) {
uVar8 = 0;
}
param_1[3] = uVar6 + param_1[4];
*(int4 *)((long)param_1 + 0xe4) = uVar8;
*param_1 = lVar10;
*(int4 *)(local_48 + 0xe0) = uVar8;
*(long *)(local_48 + 0xd0) = param_1[3];
*(long *)(local_48 + 0xb8) = lVar10;
unlock_io_cache(param_1[0x13]);
__src = (void *)param_1[4];
}
pvVar1 = local_58;
param_1[2] = (long)__src;
*(int4 *)(param_1 + 0x1c) = 0;
if (uVar5 + 1 < 2) break;
if (param_3 <= uVar5) {
uVar5 = param_3;
}
memcpy(local_58,__src,uVar5);
local_58 = (void *)((long)pvVar1 + uVar5);
local_50 = local_50 + uVar5;
param_1[2] = param_1[2] + uVar5;
param_3 = param_3 - uVar5;
if (param_3 == 0) {
return 0;
}
}
*(int *)((long)param_1 + 0xe4) = (int)local_50;
return 1;
}
|
|
14,543
|
get_charsets_dir
|
eloqsql/mysys/charset.c
|
char *get_charsets_dir(char *buf)
{
const char *sharedir= SHAREDIR;
char *res;
DBUG_ENTER("get_charsets_dir");
if (charsets_dir != NULL)
strmake(buf, charsets_dir, FN_REFLEN-1);
else
{
if (test_if_hard_path(sharedir) ||
is_prefix(sharedir, DEFAULT_CHARSET_HOME))
strxmov(buf, sharedir, "/", CHARSET_DIR, NullS);
else
strxmov(buf, DEFAULT_CHARSET_HOME, "/", sharedir, "/", CHARSET_DIR,
NullS);
}
res= convert_dirname(buf,buf,NullS);
DBUG_PRINT("info",("charsets dir: '%s'", buf));
DBUG_RETURN(res);
}
|
O0
|
c
|
get_charsets_dir:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x7eeac(%rip), %rax # 0x15f56f
movq %rax, -0x10(%rbp)
leaq 0xba9052(%rip), %rax # 0xc89720
cmpq $0x0, (%rax)
je 0xe06ee
movq -0x8(%rbp), %rdi
leaq 0xba9041(%rip), %rax # 0xc89720
movq (%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x159ee0
jmp 0xe0768
movq -0x10(%rbp), %rdi
callq 0xf8c10
cmpl $0x0, %eax
jne 0xe0711
movq -0x10(%rbp), %rdi
leaq 0x7ee81(%rip), %rsi # 0x15f588
callq 0x1566d0
cmpl $0x0, %eax
je 0xe0735
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x80fbb(%rip), %rdx # 0x1616db
leaq 0x7ee74(%rip), %rcx # 0x15f59b
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x159fc0
jmp 0xe0766
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
leaq 0x7ee44(%rip), %rsi # 0x15f588
leaq 0x80f90(%rip), %r8 # 0x1616db
leaq 0x7ee49(%rip), %r9 # 0x15f59b
xorl %eax, %eax
movq %r8, %rdx
movq $0x0, (%rsp)
movb $0x0, %al
callq 0x159fc0
jmp 0xe0768
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xe4710
movq %rax, -0x18(%rbp)
jmp 0xe077f
jmp 0xe0781
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
get_charsets_dir:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
lea rax, aHomeMonoInstal; "/home/mono/install/share"
mov [rbp+var_10], rax
lea rax, charsets_dir
cmp qword ptr [rax], 0
jz short loc_E06EE
mov rdi, [rbp+var_8]
lea rax, charsets_dir
mov rsi, [rax]
mov edx, 1FFh
call strmake
jmp short loc_E0768
loc_E06EE:
mov rdi, [rbp+var_10]
call test_if_hard_path
cmp eax, 0
jnz short loc_E0711
mov rdi, [rbp+var_10]
lea rsi, aHomeMonoInstal_0; "/home/mono/install"
call is_prefix
cmp eax, 0
jz short loc_E0735
loc_E0711:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
lea rdx, word_1616DB
lea rcx, aCharsets; "charsets/"
xor eax, eax
mov r8d, eax
mov al, 0
call strxmov
jmp short loc_E0766
loc_E0735:
mov rdi, [rbp+var_8]
mov rcx, [rbp+var_10]
lea rsi, aHomeMonoInstal_0; "/home/mono/install"
lea r8, word_1616DB
lea r9, aCharsets; "charsets/"
xor eax, eax
mov rdx, r8
mov [rsp+30h+var_30], 0
mov al, 0
call strxmov
loc_E0766:
jmp short $+2
loc_E0768:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
xor eax, eax
mov edx, eax
call convert_dirname
mov [rbp+var_18], rax
jmp short $+2
loc_E077F:
jmp short $+2
loc_E0781:
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rsp, 30h
pop rbp
retn
|
long long get_charsets_dir(long long a1)
{
int v1; // r9d
if ( charsets_dir )
{
strmake(a1, charsets_dir, 511LL);
}
else if ( (unsigned int)test_if_hard_path("/home/mono/install/share")
|| (unsigned int)is_prefix("/home/mono/install/share", "/home/mono/install") )
{
strxmov(a1, (unsigned int)"/home/mono/install/share", (unsigned int)&word_1616DB, (unsigned int)"charsets/", 0, v1);
}
else
{
strxmov(
a1,
(unsigned int)"/home/mono/install",
(unsigned int)&word_1616DB,
(unsigned int)"/home/mono/install/share",
(unsigned int)&word_1616DB,
(unsigned int)"charsets/");
}
return convert_dirname(a1, a1, 0LL);
}
|
get_charsets_dir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
LEA RAX,[0x25f56f]
MOV qword ptr [RBP + -0x10],RAX
LEA RAX,[0xd89720]
CMP qword ptr [RAX],0x0
JZ 0x001e06ee
MOV RDI,qword ptr [RBP + -0x8]
LEA RAX,[0xd89720]
MOV RSI,qword ptr [RAX]
MOV EDX,0x1ff
CALL 0x00259ee0
JMP 0x001e0768
LAB_001e06ee:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001f8c10
CMP EAX,0x0
JNZ 0x001e0711
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x25f588]
CALL 0x002566d0
CMP EAX,0x0
JZ 0x001e0735
LAB_001e0711:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[0x2616db]
LEA RCX,[0x25f59b]
XOR EAX,EAX
MOV R8D,EAX
MOV AL,0x0
CALL 0x00259fc0
JMP 0x001e0766
LAB_001e0735:
MOV RDI,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
LEA RSI,[0x25f588]
LEA R8,[0x2616db]
LEA R9,[0x25f59b]
XOR EAX,EAX
MOV RDX,R8
MOV qword ptr [RSP],0x0
MOV AL,0x0
CALL 0x00259fc0
LAB_001e0766:
JMP 0x001e0768
LAB_001e0768:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001e4710
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001e077f
LAB_001e077f:
JMP 0x001e0781
LAB_001e0781:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
int8 get_charsets_dir(int8 param_1)
{
int iVar1;
int8 uVar2;
if (charsets_dir == 0) {
iVar1 = test_if_hard_path("/home/mono/install/share");
if ((iVar1 == 0) &&
(iVar1 = is_prefix("/home/mono/install/share","/home/mono/install"), iVar1 == 0)) {
strxmov(param_1,"/home/mono/install",&DAT_002616db,"/home/mono/install/share",&DAT_002616db,
"charsets/",0);
}
else {
strxmov(param_1,"/home/mono/install/share",&DAT_002616db,"charsets/",0);
}
}
else {
strmake(param_1,charsets_dir,0x1ff);
}
uVar2 = convert_dirname(param_1,param_1,0);
return uVar2;
}
|
|
14,544
|
my_coll_parser_exec
|
eloqsql/strings/ctype-uca.c
|
static int
my_coll_parser_exec(MY_COLL_RULE_PARSER *p)
{
if (!my_coll_parser_scan_settings(p))
return 0;
while (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_RESET)
{
if (!my_coll_parser_scan_rule(p))
return 0;
}
/* Make sure no unparsed input data left */
return my_coll_parser_scan_term(p, MY_COLL_LEXEM_EOF);
}
|
O0
|
c
|
my_coll_parser_exec:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5e0d0
cmpl $0x0, %eax
jne 0x5daa3
movl $0x0, -0x4(%rbp)
jmp 0x5dada
jmp 0x5daa5
movq -0x10(%rbp), %rdi
callq 0x5dc00
cmpl $0x4, (%rax)
jne 0x5dacc
movq -0x10(%rbp), %rdi
callq 0x5e120
cmpl $0x0, %eax
jne 0x5daca
movl $0x0, -0x4(%rbp)
jmp 0x5dada
jmp 0x5daa5
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x5e1d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_coll_parser_exec:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
call my_coll_parser_scan_settings
cmp eax, 0
jnz short loc_5DAA3
mov [rbp+var_4], 0
jmp short loc_5DADA
loc_5DAA3:
jmp short $+2
loc_5DAA5:
mov rdi, [rbp+var_10]
call my_coll_parser_curr
cmp dword ptr [rax], 4
jnz short loc_5DACC
mov rdi, [rbp+var_10]
call my_coll_parser_scan_rule
cmp eax, 0
jnz short loc_5DACA
mov [rbp+var_4], 0
jmp short loc_5DADA
loc_5DACA:
jmp short loc_5DAA5
loc_5DACC:
mov rdi, [rbp+var_10]
xor esi, esi
call my_coll_parser_scan_term
mov [rbp+var_4], eax
loc_5DADA:
mov eax, [rbp+var_4]
add rsp, 10h
pop rbp
retn
|
long long my_coll_parser_exec(long long a1)
{
if ( (unsigned int)my_coll_parser_scan_settings(a1) )
{
while ( *(_DWORD *)my_coll_parser_curr(a1) == 4 )
{
if ( !(unsigned int)my_coll_parser_scan_rule(a1) )
return 0;
}
return (unsigned int)my_coll_parser_scan_term(a1, 0LL);
}
else
{
return 0;
}
}
|
my_coll_parser_exec:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015e0d0
CMP EAX,0x0
JNZ 0x0015daa3
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015dada
LAB_0015daa3:
JMP 0x0015daa5
LAB_0015daa5:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015dc00
CMP dword ptr [RAX],0x4
JNZ 0x0015dacc
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015e120
CMP EAX,0x0
JNZ 0x0015daca
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015dada
LAB_0015daca:
JMP 0x0015daa5
LAB_0015dacc:
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x0015e1d0
MOV dword ptr [RBP + -0x4],EAX
LAB_0015dada:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x10
POP RBP
RET
|
int4 my_coll_parser_exec(int8 param_1)
{
int iVar1;
int4 uVar2;
int *piVar3;
iVar1 = my_coll_parser_scan_settings(param_1);
while( true ) {
if (iVar1 == 0) {
return 0;
}
piVar3 = (int *)my_coll_parser_curr(param_1);
if (*piVar3 != 4) break;
iVar1 = my_coll_parser_scan_rule(param_1);
}
uVar2 = my_coll_parser_scan_term(param_1,0);
return uVar2;
}
|
|
14,545
|
thr_abort_locks
|
eloqsql/mysys/thr_lock.c
|
void thr_abort_locks(THR_LOCK *lock, my_bool upgrade_lock)
{
THR_LOCK_DATA *data;
DBUG_ENTER("thr_abort_locks");
mysql_mutex_lock(&lock->mutex);
for (data=lock->read_wait.data; data ; data=data->next)
{
data->type=TL_UNLOCK; /* Mark killed */
/* It's safe to signal the cond first: we're still holding the mutex. */
mysql_cond_signal(data->cond);
data->cond=0; /* Removed from list */
}
for (data=lock->write_wait.data; data ; data=data->next)
{
data->type=TL_UNLOCK;
mysql_cond_signal(data->cond);
data->cond=0;
}
lock->read_wait.last= &lock->read_wait.data;
lock->write_wait.last= &lock->write_wait.data;
lock->read_wait.data=lock->write_wait.data=0;
if (upgrade_lock && lock->write.data)
lock->write.data->type=TL_WRITE_ONLY;
mysql_mutex_unlock(&lock->mutex);
DBUG_VOID_RETURN;
}
|
O3
|
c
|
thr_abort_locks:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, -0x2c(%rbp)
movq %rdi, %r14
addq $0x18, %rdi
cmpq $0x0, 0x58(%r14)
movq %rdi, -0x38(%rbp)
jne 0xa63b7
callq 0x291e0
movq 0x60(%r14), %r15
testq %r15, %r15
je 0xa6312
leaq 0x2e2d8a(%rip), %rbx # 0x389060
movl $0x0, 0x40(%r15)
movq 0x20(%r15), %r12
movq 0x30(%r12), %rdi
testq %rdi, %rdi
jne 0xa6307
movq %r12, %rdi
callq 0x29570
movq $0x0, 0x20(%r15)
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0xa62d6
jmp 0xa6312
movq (%rbx), %rax
callq *0x170(%rax)
jmp 0xa62ec
leaq 0x60(%r14), %r13
leaq 0x80(%r14), %r15
movq 0x80(%r14), %rbx
testq %rbx, %rbx
je 0xa6366
movl $0x0, 0x40(%rbx)
movq 0x20(%rbx), %r12
movq 0x30(%r12), %rdi
testq %rdi, %rdi
jne 0xa6354
movq %r12, %rdi
callq 0x29570
movq $0x0, 0x20(%rbx)
movq 0x8(%rbx), %rbx
jmp 0xa6324
leaq 0x2e2d05(%rip), %rax # 0x389060
movq (%rax), %rax
callq *0x170(%rax)
jmp 0xa633e
movq %r13, 0x68(%r14)
movq %r15, 0x88(%r14)
xorl %eax, %eax
movq %rax, 0x80(%r14)
movq %rax, 0x60(%r14)
cmpb $0x0, -0x2c(%rbp)
je 0xa6397
movq 0x90(%r14), %rax
testq %rax, %rax
je 0xa6397
movl $0xe, 0x40(%rax)
movq 0x58(%r14), %rdi
testq %rdi, %rdi
jne 0xa63cd
movq -0x38(%rbp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x291b0
leaq 0x38541(%rip), %rsi # 0xde8ff
movl $0x520, %edx # imm = 0x520
callq 0x2ee5b
jmp 0xa62c6
leaq 0x2e2c8c(%rip), %rax # 0x389060
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xa63a0
|
thr_abort_locks:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_2C], esi
mov r14, rdi
add rdi, 18h
cmp qword ptr [r14+58h], 0
mov [rbp+var_38], rdi
jnz loc_A63B7
call _pthread_mutex_lock
loc_A62C6:
mov r15, [r14+60h]
test r15, r15
jz short loc_A6312
lea rbx, PSI_server
loc_A62D6:
mov dword ptr [r15+40h], 0
mov r12, [r15+20h]
mov rdi, [r12+30h]
test rdi, rdi
jnz short loc_A6307
loc_A62EC:
mov rdi, r12
call _pthread_cond_signal
mov qword ptr [r15+20h], 0
mov r15, [r15+8]
test r15, r15
jnz short loc_A62D6
jmp short loc_A6312
loc_A6307:
mov rax, [rbx]
call qword ptr [rax+170h]
jmp short loc_A62EC
loc_A6312:
lea r13, [r14+60h]
lea r15, [r14+80h]
mov rbx, [r14+80h]
loc_A6324:
test rbx, rbx
jz short loc_A6366
mov dword ptr [rbx+40h], 0
mov r12, [rbx+20h]
mov rdi, [r12+30h]
test rdi, rdi
jnz short loc_A6354
loc_A633E:
mov rdi, r12
call _pthread_cond_signal
mov qword ptr [rbx+20h], 0
mov rbx, [rbx+8]
jmp short loc_A6324
loc_A6354:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_A633E
loc_A6366:
mov [r14+68h], r13
mov [r14+88h], r15
xor eax, eax
mov [r14+80h], rax
mov [r14+60h], rax
cmp byte ptr [rbp+var_2C], 0
jz short loc_A6397
mov rax, [r14+90h]
test rax, rax
jz short loc_A6397
mov dword ptr [rax+40h], 0Eh
loc_A6397:
mov rdi, [r14+58h]
test rdi, rdi
jnz short loc_A63CD
loc_A63A0:
mov rdi, [rbp+var_38]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_A63B7:
lea rsi, aWorkspaceLlm4b_24; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 520h
call psi_mutex_lock
jmp loc_A62C6
loc_A63CD:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_A63A0
|
long long thr_abort_locks(_QWORD *a1, char a2)
{
long long v3; // rdi
long long i; // r15
long long v5; // r12
long long j; // rbx
long long v7; // r12
long long v8; // rax
v3 = (long long)(a1 + 3);
if ( a1[11] )
psi_mutex_lock(v3, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x520u);
else
pthread_mutex_lock(v3);
for ( i = a1[12]; i; i = *(_QWORD *)(i + 8) )
{
*(_DWORD *)(i + 64) = 0;
v5 = *(_QWORD *)(i + 32);
if ( *(_QWORD *)(v5 + 48) )
PSI_server[46]();
pthread_cond_signal(v5);
*(_QWORD *)(i + 32) = 0LL;
}
for ( j = a1[16]; j; j = *(_QWORD *)(j + 8) )
{
*(_DWORD *)(j + 64) = 0;
v7 = *(_QWORD *)(j + 32);
if ( *(_QWORD *)(v7 + 48) )
PSI_server[46]();
pthread_cond_signal(v7);
*(_QWORD *)(j + 32) = 0LL;
}
a1[13] = a1 + 12;
a1[17] = a1 + 16;
a1[16] = 0LL;
a1[12] = 0LL;
if ( a2 )
{
v8 = a1[18];
if ( v8 )
*(_DWORD *)(v8 + 64) = 14;
}
if ( a1[11] )
PSI_server[44]();
return pthread_mutex_unlock(v3);
}
|
thr_abort_locks:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x2c],ESI
MOV R14,RDI
ADD RDI,0x18
CMP qword ptr [R14 + 0x58],0x0
MOV qword ptr [RBP + -0x38],RDI
JNZ 0x001a63b7
CALL 0x001291e0
LAB_001a62c6:
MOV R15,qword ptr [R14 + 0x60]
TEST R15,R15
JZ 0x001a6312
LEA RBX,[0x489060]
LAB_001a62d6:
MOV dword ptr [R15 + 0x40],0x0
MOV R12,qword ptr [R15 + 0x20]
MOV RDI,qword ptr [R12 + 0x30]
TEST RDI,RDI
JNZ 0x001a6307
LAB_001a62ec:
MOV RDI,R12
CALL 0x00129570
MOV qword ptr [R15 + 0x20],0x0
MOV R15,qword ptr [R15 + 0x8]
TEST R15,R15
JNZ 0x001a62d6
JMP 0x001a6312
LAB_001a6307:
MOV RAX,qword ptr [RBX]
CALL qword ptr [RAX + 0x170]
JMP 0x001a62ec
LAB_001a6312:
LEA R13,[R14 + 0x60]
LEA R15,[R14 + 0x80]
MOV RBX,qword ptr [R14 + 0x80]
LAB_001a6324:
TEST RBX,RBX
JZ 0x001a6366
MOV dword ptr [RBX + 0x40],0x0
MOV R12,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [R12 + 0x30]
TEST RDI,RDI
JNZ 0x001a6354
LAB_001a633e:
MOV RDI,R12
CALL 0x00129570
MOV qword ptr [RBX + 0x20],0x0
MOV RBX,qword ptr [RBX + 0x8]
JMP 0x001a6324
LAB_001a6354:
LEA RAX,[0x489060]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001a633e
LAB_001a6366:
MOV qword ptr [R14 + 0x68],R13
MOV qword ptr [R14 + 0x88],R15
XOR EAX,EAX
MOV qword ptr [R14 + 0x80],RAX
MOV qword ptr [R14 + 0x60],RAX
CMP byte ptr [RBP + -0x2c],0x0
JZ 0x001a6397
MOV RAX,qword ptr [R14 + 0x90]
TEST RAX,RAX
JZ 0x001a6397
MOV dword ptr [RAX + 0x40],0xe
LAB_001a6397:
MOV RDI,qword ptr [R14 + 0x58]
TEST RDI,RDI
JNZ 0x001a63cd
LAB_001a63a0:
MOV RDI,qword ptr [RBP + -0x38]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001291b0
LAB_001a63b7:
LEA RSI,[0x1de8ff]
MOV EDX,0x520
CALL 0x0012ee5b
JMP 0x001a62c6
LAB_001a63cd:
LEA RAX,[0x489060]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001a63a0
|
void thr_abort_locks(long param_1,char param_2)
{
pthread_cond_t *ppVar1;
long lVar2;
pthread_mutex_t *__mutex;
__mutex = (pthread_mutex_t *)(param_1 + 0x18);
if (*(long *)(param_1 + 0x58) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x520);
}
for (lVar2 = *(long *)(param_1 + 0x60); lVar2 != 0; lVar2 = *(long *)(lVar2 + 8)) {
*(int4 *)(lVar2 + 0x40) = 0;
ppVar1 = *(pthread_cond_t **)(lVar2 + 0x20);
if (ppVar1[1].__align != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal(ppVar1);
*(int8 *)(lVar2 + 0x20) = 0;
}
for (lVar2 = *(long *)(param_1 + 0x80); lVar2 != 0; lVar2 = *(long *)(lVar2 + 8)) {
*(int4 *)(lVar2 + 0x40) = 0;
ppVar1 = *(pthread_cond_t **)(lVar2 + 0x20);
if (ppVar1[1].__align != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal(ppVar1);
*(int8 *)(lVar2 + 0x20) = 0;
}
*(long *)(param_1 + 0x68) = param_1 + 0x60;
*(long *)(param_1 + 0x88) = param_1 + 0x80;
*(int8 *)(param_1 + 0x80) = 0;
*(int8 *)(param_1 + 0x60) = 0;
if ((param_2 != '\0') && (*(long *)(param_1 + 0x90) != 0)) {
*(int4 *)(*(long *)(param_1 + 0x90) + 0x40) = 0xe;
}
if (*(long *)(param_1 + 0x58) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return;
}
|
|
14,546
|
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&)
|
monkey531[P]llama/common/./minja.hpp
|
SliceExpr(const Location & location, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e)
: Expression(location), start(std::move(s)), end(std::move(e)) {}
|
O2
|
cpp
|
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
callq 0x3aef0
leaq 0x9559a(%rip), %rax # 0xe06f8
movq %rax, (%r15)
andq $0x0, 0x28(%r15)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x20(%r15)
andq $0x0, (%r14)
andq $0x0, 0x38(%r15)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x30(%r15)
andq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
|
_ZN5minja9SliceExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_:
push r15
push r14
push rbx
mov rbx, rcx
mov r14, rdx
mov r15, rdi
call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&)
lea rax, off_E06F8
mov [r15], rax
and qword ptr [r15+28h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [r15+20h], xmm0
and qword ptr [r14], 0
and qword ptr [r15+38h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r15+30h], xmm0
and qword ptr [rbx], 0
pop rbx
pop r14
pop r15
retn
|
void ( __noreturn ** minja::SliceExpr::SliceExpr(
long long a1,
_QWORD *a2,
__int128 *a3,
__int128 *a4))()
{
void ( __noreturn **result)(); // rax
__int128 v7; // xmm0
__int128 v8; // xmm0
minja::Expression::Expression((_QWORD *)a1, a2);
result = &off_E06F8;
*(_QWORD *)a1 = &off_E06F8;
*(_QWORD *)(a1 + 40) = 0LL;
v7 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v7;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v8 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v8;
*(_QWORD *)a4 = 0LL;
return result;
}
| |||
14,547
|
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&)
|
monkey531[P]llama/common/./minja.hpp
|
SliceExpr(const Location & location, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e)
: Expression(location), start(std::move(s)), end(std::move(e)) {}
|
O3
|
cpp
|
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&):
pushq %rbx
movq %rdi, %rbx
leaq 0x9db71(%rip), %rax # 0xee6f8
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x50b98
callq 0x2f80e
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x50ba6
callq 0x2f80e
leaq 0x9d6db(%rip), %rax # 0xee288
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x50bbf
popq %rbx
jmp 0x2f80e
popq %rbx
retq
nop
|
_ZN5minja9SliceExprD2Ev:
push rbx
mov rbx, rdi
lea rax, off_EE6F8
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_50B98
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_50B98:
mov rdi, [rbx+28h]
test rdi, rdi
jz short loc_50BA6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_50BA6:
lea rax, off_EE288
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_50BBF
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_50BBF:
pop rbx
retn
|
void minja::SliceExpr::~SliceExpr(minja::SliceExpr *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
volatile signed __int32 *v4; // rdi
*(_QWORD *)this = &off_EE6F8;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
v3 = (volatile signed __int32 *)*((_QWORD *)this + 5);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
*(_QWORD *)this = &off_EE288;
v4 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v4 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4);
}
|
~SliceExpr:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1ee6f8]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x00150b98
CALL 0x0012f80e
LAB_00150b98:
MOV RDI,qword ptr [RBX + 0x28]
TEST RDI,RDI
JZ 0x00150ba6
CALL 0x0012f80e
LAB_00150ba6:
LEA RAX,[0x1ee288]
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x00150bbf
POP RBX
JMP 0x0012f80e
LAB_00150bbf:
POP RBX
RET
|
/* minja::SliceExpr::~SliceExpr() */
void __thiscall minja::SliceExpr::~SliceExpr(SliceExpr *this)
{
*(int ***)this = &PTR_do_evaluate_001ee6f8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38));
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28));
}
*(int ***)this = &PTR___cxa_pure_virtual_001ee288;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10));
return;
}
return;
}
|
|
14,548
|
mi_seq_search
|
eloqsql/storage/myisam/mi_search.c
|
int _mi_seq_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint key_len, uint comp_flag, uchar **ret_pos,
uchar *buff, my_bool *last_key)
{
int UNINIT_VAR(flag);
uint nod_flag,UNINIT_VAR(length),not_used[2];
uchar t_buff[HA_MAX_KEY_BUFF],*end;
DBUG_ENTER("_mi_seq_search");
end= page+mi_getint(page);
nod_flag=mi_test_if_nod(page);
page+=2+nod_flag;
*ret_pos=page;
t_buff[0]=0; /* Avoid bugs */
while (page < end)
{
length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,t_buff);
if (length == 0 || page > end)
{
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_PRINT("error",
("Found wrong key: length: %u page: %p end: %p",
length, page, end));
DBUG_RETURN(MI_FOUND_WRONG_KEY);
}
if ((flag=ha_key_cmp(keyinfo->seg,t_buff,key,key_len,comp_flag,
not_used)) >= 0)
break;
#ifdef EXTRA_DEBUG
DBUG_PRINT("loop",("page: 0x%lx key: '%s' flag: %d", (long) page, t_buff,
flag));
#endif
memcpy(buff,t_buff,length);
*ret_pos=page;
}
if (flag == 0)
memcpy(buff,t_buff,length); /* Result is first key */
*last_key= page == end;
DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos));
DBUG_RETURN(flag);
}
|
O0
|
c
|
mi_seq_search:
pushq %rbp
movq %rsp, %rbp
subq $0x520, %rsp # imm = 0x520
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x4d0(%rbp)
movq %rsi, -0x4d8(%rbp)
movq %rdx, -0x4e0(%rbp)
movq %rcx, -0x4e8(%rbp)
movl %r8d, -0x4ec(%rbp)
movl %r9d, -0x4f0(%rbp)
movl -0x4f4(%rbp), %eax
movl %eax, -0x4f4(%rbp)
movl -0x4fc(%rbp), %eax
movl %eax, -0x4fc(%rbp)
movq -0x4e0(%rbp), %rax
movq -0x4e0(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
movq -0x4e0(%rbp), %rdx
movzbl (%rdx), %edx
movzwl %dx, %edx
shll $0x8, %edx
orl %edx, %ecx
movzwl %cx, %ecx
andl $0x7fff, %ecx # imm = 0x7FFF
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x510(%rbp)
movq -0x4e0(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xe9afe
movq -0x4d0(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %eax
movl %eax, -0x514(%rbp)
jmp 0xe9b08
xorl %eax, %eax
movl %eax, -0x514(%rbp)
jmp 0xe9b08
movl -0x514(%rbp), %eax
movl %eax, -0x4f8(%rbp)
movl -0x4f8(%rbp), %ecx
addl $0x2, %ecx
movq -0x4e0(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x4e0(%rbp)
movq -0x4e0(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, -0x4c0(%rbp)
movq -0x4e0(%rbp), %rax
cmpq -0x510(%rbp), %rax
jae 0xe9c43
movq -0x4d8(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x4d8(%rbp), %rdi
movl -0x4f8(%rbp), %esi
leaq -0x4c0(%rbp), %rcx
leaq -0x4e0(%rbp), %rdx
callq *%rax
movl %eax, -0x4fc(%rbp)
cmpl $0x0, -0x4fc(%rbp)
je 0xe9ba0
movq -0x4e0(%rbp), %rax
cmpq -0x510(%rbp), %rax
jbe 0xe9bd9
movq -0x4d0(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0xd89c0
callq 0x1295d0
movl $0x7e, (%rax)
jmp 0xe9bc8
jmp 0xe9bca
movl $0x7fffffff, -0x4c4(%rbp) # imm = 0x7FFFFFFF
jmp 0xe9c92
movq -0x4d8(%rbp), %rax
movq 0x28(%rax), %rdi
leaq -0x4c0(%rbp), %rsi
movq -0x4e8(%rbp), %rdx
movl -0x4ec(%rbp), %ecx
movl -0x4f0(%rbp), %r8d
leaq -0x504(%rbp), %r9
callq 0x1234b0
movl %eax, -0x4f4(%rbp)
cmpl $0x0, %eax
jl 0xe9c18
jmp 0xe9c43
movq 0x18(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
movl -0x4fc(%rbp), %eax
movl %eax, %edx
callq 0x2c0c0
movq -0x4e0(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0xe9b45
cmpl $0x0, -0x4f4(%rbp)
jne 0xe9c64
movq 0x18(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
movl -0x4fc(%rbp), %eax
movl %eax, %edx
callq 0x2c0c0
movq -0x4e0(%rbp), %rax
cmpq -0x510(%rbp), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq 0x20(%rbp), %rax
movb %cl, (%rax)
jmp 0xe9c84
jmp 0xe9c86
movl -0x4f4(%rbp), %eax
movl %eax, -0x4c4(%rbp)
movl -0x4c4(%rbp), %eax
movl %eax, -0x518(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xe9cbf
movl -0x518(%rbp), %eax
addq $0x520, %rsp # imm = 0x520
popq %rbp
retq
callq 0x2c290
nopw %cs:(%rax,%rax)
|
_mi_seq_search:
push rbp
mov rbp, rsp
sub rsp, 520h
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_4D0], rdi
mov [rbp+var_4D8], rsi
mov [rbp+var_4E0], rdx
mov [rbp+var_4E8], rcx
mov [rbp+var_4EC], r8d
mov [rbp+var_4F0], r9d
mov eax, [rbp+var_4F4]
mov [rbp+var_4F4], eax
mov eax, [rbp+var_4FC]
mov [rbp+var_4FC], eax
mov rax, [rbp+var_4E0]
mov rcx, [rbp+var_4E0]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
mov rdx, [rbp+var_4E0]
movzx edx, byte ptr [rdx]
movzx edx, dx
shl edx, 8
or ecx, edx
movzx ecx, cx
and ecx, 7FFFh
mov ecx, ecx
add rax, rcx
mov [rbp+var_510], rax
mov rax, [rbp+var_4E0]
movzx eax, byte ptr [rax]
and eax, 80h
cmp eax, 0
jz short loc_E9AFE
mov rax, [rbp+var_4D0]
mov rax, [rax]
mov eax, [rax+17Ch]
mov [rbp+var_514], eax
jmp short loc_E9B08
loc_E9AFE:
xor eax, eax
mov [rbp+var_514], eax
jmp short $+2
loc_E9B08:
mov eax, [rbp+var_514]
mov [rbp+var_4F8], eax
mov ecx, [rbp+var_4F8]
add ecx, 2
mov rax, [rbp+var_4E0]
mov ecx, ecx
add rax, rcx
mov [rbp+var_4E0], rax
mov rcx, [rbp+var_4E0]
mov rax, [rbp+arg_0]
mov [rax], rcx
mov [rbp+var_4C0], 0
loc_E9B45:
mov rax, [rbp+var_4E0]
cmp rax, [rbp+var_510]
jnb loc_E9C43
mov rax, [rbp+var_4D8]
mov rax, [rax+48h]
mov rdi, [rbp+var_4D8]
mov esi, [rbp+var_4F8]
lea rcx, [rbp+var_4C0]
lea rdx, [rbp+var_4E0]
call rax
mov [rbp+var_4FC], eax
cmp [rbp+var_4FC], 0
jz short loc_E9BA0
mov rax, [rbp+var_4E0]
cmp rax, [rbp+var_510]
jbe short loc_E9BD9
loc_E9BA0:
mov rax, [rbp+var_4D0]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
jmp short $+2
loc_E9BC8:
jmp short $+2
loc_E9BCA:
mov [rbp+var_4C4], 7FFFFFFFh
jmp loc_E9C92
loc_E9BD9:
mov rax, [rbp+var_4D8]
mov rdi, [rax+28h]
lea rsi, [rbp+var_4C0]
mov rdx, [rbp+var_4E8]
mov ecx, [rbp+var_4EC]
mov r8d, [rbp+var_4F0]
lea r9, [rbp+var_504]
call ha_key_cmp
mov [rbp+var_4F4], eax
cmp eax, 0
jl short loc_E9C18
jmp short loc_E9C43
loc_E9C18:
mov rdi, [rbp+arg_8]
lea rsi, [rbp+var_4C0]
mov eax, [rbp+var_4FC]
mov edx, eax
call _memcpy
mov rcx, [rbp+var_4E0]
mov rax, [rbp+arg_0]
mov [rax], rcx
jmp loc_E9B45
loc_E9C43:
cmp [rbp+var_4F4], 0
jnz short loc_E9C64
mov rdi, [rbp+arg_8]
lea rsi, [rbp+var_4C0]
mov eax, [rbp+var_4FC]
mov edx, eax
call _memcpy
loc_E9C64:
mov rax, [rbp+var_4E0]
cmp rax, [rbp+var_510]
setz al
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+arg_10]
mov [rax], cl
jmp short $+2
loc_E9C84:
jmp short $+2
loc_E9C86:
mov eax, [rbp+var_4F4]
mov [rbp+var_4C4], eax
loc_E9C92:
mov eax, [rbp+var_4C4]
mov [rbp+var_518], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_E9CBF
mov eax, [rbp+var_518]
add rsp, 520h
pop rbp
retn
loc_E9CBF:
call ___stack_chk_fail
|
long long mi_seq_search(
long long a1,
long long a2,
unsigned __int16 *a3,
long long a4,
unsigned int a5,
unsigned int a6,
unsigned __int16 **a7,
long long a8,
bool *a9)
{
const char *v9; // rsi
unsigned int v11; // [rsp+Ch] [rbp-514h]
unsigned __int16 *v12; // [rsp+10h] [rbp-510h]
char v13[8]; // [rsp+1Ch] [rbp-504h] BYREF
unsigned int v14; // [rsp+24h] [rbp-4FCh]
unsigned int v15; // [rsp+28h] [rbp-4F8h]
int v16; // [rsp+2Ch] [rbp-4F4h]
unsigned int v17; // [rsp+30h] [rbp-4F0h]
unsigned int v18; // [rsp+34h] [rbp-4ECh]
long long v19; // [rsp+38h] [rbp-4E8h]
unsigned __int16 *v20; // [rsp+40h] [rbp-4E0h] BYREF
long long v21; // [rsp+48h] [rbp-4D8h]
long long v22; // [rsp+50h] [rbp-4D0h]
_BYTE v24[1208]; // [rsp+60h] [rbp-4C0h] BYREF
unsigned long long v25; // [rsp+518h] [rbp-8h]
v25 = __readfsqword(0x28u);
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
v12 = (unsigned __int16 *)((char *)a3 + (_byteswap_ushort(*a3) & 0x7FFF));
if ( (*(_BYTE *)a3 & 0x80) != 0 )
v11 = *(_DWORD *)(*(_QWORD *)v22 + 380LL);
else
v11 = 0;
v15 = v11;
v20 = (unsigned __int16 *)((char *)v20 + v11 + 2);
*a7 = v20;
v24[0] = 0;
while ( v20 < v12 )
{
v14 = (*(long long ( **)(long long, _QWORD, unsigned __int16 **, _BYTE *))(v21 + 72))(v21, v15, &v20, v24);
if ( !v14 || v20 > v12 )
{
v9 = *(const char **)(*(_QWORD *)v22 + 616LL);
mi_report_error(126, (long long)v9);
*(_DWORD *)my_thread_var(126LL, v9) = 126;
return 0x7FFFFFFF;
}
v16 = ha_key_cmp(*(_QWORD *)(v21 + 40), v24, v19, v18, v17, v13);
if ( v16 >= 0 )
break;
memcpy(a8, v24, v14);
*a7 = v20;
}
if ( !v16 )
memcpy(a8, v24, v14);
*a9 = v20 == v12;
return (unsigned int)v16;
}
|
_mi_seq_search:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x520
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x4d0],RDI
MOV qword ptr [RBP + -0x4d8],RSI
MOV qword ptr [RBP + -0x4e0],RDX
MOV qword ptr [RBP + -0x4e8],RCX
MOV dword ptr [RBP + -0x4ec],R8D
MOV dword ptr [RBP + -0x4f0],R9D
MOV EAX,dword ptr [RBP + -0x4f4]
MOV dword ptr [RBP + -0x4f4],EAX
MOV EAX,dword ptr [RBP + -0x4fc]
MOV dword ptr [RBP + -0x4fc],EAX
MOV RAX,qword ptr [RBP + -0x4e0]
MOV RCX,qword ptr [RBP + -0x4e0]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
MOV RDX,qword ptr [RBP + -0x4e0]
MOVZX EDX,byte ptr [RDX]
MOVZX EDX,DX
SHL EDX,0x8
OR ECX,EDX
MOVZX ECX,CX
AND ECX,0x7fff
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x510],RAX
MOV RAX,qword ptr [RBP + -0x4e0]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001e9afe
MOV RAX,qword ptr [RBP + -0x4d0]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x17c]
MOV dword ptr [RBP + -0x514],EAX
JMP 0x001e9b08
LAB_001e9afe:
XOR EAX,EAX
MOV dword ptr [RBP + -0x514],EAX
JMP 0x001e9b08
LAB_001e9b08:
MOV EAX,dword ptr [RBP + -0x514]
MOV dword ptr [RBP + -0x4f8],EAX
MOV ECX,dword ptr [RBP + -0x4f8]
ADD ECX,0x2
MOV RAX,qword ptr [RBP + -0x4e0]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x4e0],RAX
MOV RCX,qword ptr [RBP + -0x4e0]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x4c0],0x0
LAB_001e9b45:
MOV RAX,qword ptr [RBP + -0x4e0]
CMP RAX,qword ptr [RBP + -0x510]
JNC 0x001e9c43
MOV RAX,qword ptr [RBP + -0x4d8]
MOV RAX,qword ptr [RAX + 0x48]
MOV RDI,qword ptr [RBP + -0x4d8]
MOV ESI,dword ptr [RBP + -0x4f8]
LEA RCX,[RBP + -0x4c0]
LEA RDX,[RBP + -0x4e0]
CALL RAX
MOV dword ptr [RBP + -0x4fc],EAX
CMP dword ptr [RBP + -0x4fc],0x0
JZ 0x001e9ba0
MOV RAX,qword ptr [RBP + -0x4e0]
CMP RAX,qword ptr [RBP + -0x510]
JBE 0x001e9bd9
LAB_001e9ba0:
MOV RAX,qword ptr [RBP + -0x4d0]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x001d89c0
CALL 0x002295d0
MOV dword ptr [RAX],0x7e
JMP 0x001e9bc8
LAB_001e9bc8:
JMP 0x001e9bca
LAB_001e9bca:
MOV dword ptr [RBP + -0x4c4],0x7fffffff
JMP 0x001e9c92
LAB_001e9bd9:
MOV RAX,qword ptr [RBP + -0x4d8]
MOV RDI,qword ptr [RAX + 0x28]
LEA RSI,[RBP + -0x4c0]
MOV RDX,qword ptr [RBP + -0x4e8]
MOV ECX,dword ptr [RBP + -0x4ec]
MOV R8D,dword ptr [RBP + -0x4f0]
LEA R9,[RBP + -0x504]
CALL 0x002234b0
MOV dword ptr [RBP + -0x4f4],EAX
CMP EAX,0x0
JL 0x001e9c18
JMP 0x001e9c43
LAB_001e9c18:
MOV RDI,qword ptr [RBP + 0x18]
LEA RSI,[RBP + -0x4c0]
MOV EAX,dword ptr [RBP + -0x4fc]
MOV EDX,EAX
CALL 0x0012c0c0
MOV RCX,qword ptr [RBP + -0x4e0]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],RCX
JMP 0x001e9b45
LAB_001e9c43:
CMP dword ptr [RBP + -0x4f4],0x0
JNZ 0x001e9c64
MOV RDI,qword ptr [RBP + 0x18]
LEA RSI,[RBP + -0x4c0]
MOV EAX,dword ptr [RBP + -0x4fc]
MOV EDX,EAX
CALL 0x0012c0c0
LAB_001e9c64:
MOV RAX,qword ptr [RBP + -0x4e0]
CMP RAX,qword ptr [RBP + -0x510]
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + 0x20]
MOV byte ptr [RAX],CL
JMP 0x001e9c84
LAB_001e9c84:
JMP 0x001e9c86
LAB_001e9c86:
MOV EAX,dword ptr [RBP + -0x4f4]
MOV dword ptr [RBP + -0x4c4],EAX
LAB_001e9c92:
MOV EAX,dword ptr [RBP + -0x4c4]
MOV dword ptr [RBP + -0x518],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001e9cbf
MOV EAX,dword ptr [RBP + -0x518]
ADD RSP,0x520
POP RBP
RET
LAB_001e9cbf:
CALL 0x0012c290
|
int _mi_seq_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5,
int4 param_6,int8 *param_7,void *param_8,int8 param_9)
{
byte *pbVar1;
int4 *puVar2;
long in_FS_OFFSET;
int local_51c;
int1 local_50c [8];
uint local_504;
int local_500;
int local_4fc;
int4 local_4f8;
int4 local_4f4;
int8 local_4f0;
byte *local_4e8;
long local_4e0;
long *local_4d8;
int local_4cc;
int1 local_4c8 [1208];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pbVar1 = param_3 + ((uint)param_3[1] | (*param_3 & 0x7f) << 8);
if ((*param_3 & 0x80) == 0) {
local_51c = 0;
}
else {
local_51c = *(int *)(*param_1 + 0x17c);
}
local_500 = local_51c;
local_4e8 = param_3 + (local_51c + 2);
*param_7 = local_4e8;
local_4c8[0] = 0;
local_4f8 = param_6;
local_4f4 = param_5;
local_4f0 = param_4;
local_4e0 = param_2;
local_4d8 = param_1;
while (local_4e8 < pbVar1) {
local_504 = (**(code **)(local_4e0 + 0x48))(local_4e0,local_500,&local_4e8,local_4c8);
if ((local_504 == 0) || (pbVar1 < local_4e8)) {
mi_report_error(0x7e,*(int8 *)(*local_4d8 + 0x268));
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
local_4cc = 0x7fffffff;
goto LAB_001e9c92;
}
local_4fc = ha_key_cmp(*(int8 *)(local_4e0 + 0x28),local_4c8,local_4f0,local_4f4,local_4f8
,local_50c);
if (-1 < local_4fc) break;
memcpy(param_8,local_4c8,(ulong)local_504);
*param_7 = local_4e8;
}
if (local_4fc == 0) {
memcpy(param_8,local_4c8,(ulong)local_504);
}
*(bool *)param_9 = local_4e8 == pbVar1;
local_4cc = local_4fc;
LAB_001e9c92:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_4cc;
}
|
|
14,549
|
ma_retrieve_auto_increment
|
eloqsql/storage/maria/ma_key.c
|
ulonglong ma_retrieve_auto_increment(const uchar *key, uint8 key_type)
{
ulonglong value= 0; /* Store unsigned values here */
longlong s_value= 0; /* Store signed values here */
switch (key_type) {
case HA_KEYTYPE_INT8:
s_value= (longlong) *(const signed char*) key;
break;
case HA_KEYTYPE_BINARY:
value=(ulonglong) *key;
break;
case HA_KEYTYPE_SHORT_INT:
s_value= (longlong) sint2korr(key);
break;
case HA_KEYTYPE_USHORT_INT:
value=(ulonglong) uint2korr(key);
break;
case HA_KEYTYPE_LONG_INT:
s_value= (longlong) sint4korr(key);
break;
case HA_KEYTYPE_ULONG_INT:
value=(ulonglong) uint4korr(key);
break;
case HA_KEYTYPE_INT24:
s_value= (longlong) sint3korr(key);
break;
case HA_KEYTYPE_UINT24:
value=(ulonglong) uint3korr(key);
break;
case HA_KEYTYPE_FLOAT: /* This shouldn't be used */
{
float f_1;
float4get(f_1,key);
/* Ignore negative values */
value = (f_1 < (float) 0.0) ? 0 : (ulonglong) f_1;
break;
}
case HA_KEYTYPE_DOUBLE: /* This shouldn't be used */
{
double f_1;
float8get(f_1,key);
/* Ignore negative values */
value = (f_1 < 0.0) ? 0 : (ulonglong) f_1;
break;
}
case HA_KEYTYPE_LONGLONG:
s_value= sint8korr(key);
break;
case HA_KEYTYPE_ULONGLONG:
value= uint8korr(key);
break;
default:
DBUG_ASSERT(0);
value=0; /* Error */
break;
}
/*
The following code works becasue if s_value < 0 then value is 0
and if s_value == 0 then value will contain either s_value or the
correct value.
*/
return (s_value > 0) ? (ulonglong) s_value : value;
}
|
O0
|
c
|
ma_retrieve_auto_increment:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movzbl -0x9(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0xc, %eax
ja 0x35467
movq -0x38(%rbp), %rax
leaq 0x123ab1(%rip), %rcx # 0x158d50
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movsbq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x35473
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movq %rax, -0x18(%rbp)
jmp 0x35473
movq -0x8(%rbp), %rax
movswq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x35473
movq -0x8(%rbp), %rax
movzwl (%rax), %eax
movq %rax, -0x18(%rbp)
jmp 0x35473
movq -0x8(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x35473
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
jmp 0x35473
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x35346
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x10, %eax
orl $0xff000000, %eax # imm = 0xFF000000
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3536a
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x10, %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cltq
movq %rax, -0x20(%rbp)
jmp 0x35473
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
jmp 0x35473
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x24(%rbp), %xmm0
jbe 0x353be
xorl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x353ed
movss -0x24(%rbp), %xmm0
movss 0x11bc39(%rip), %xmm2 # 0x151004
movaps %xmm0, %xmm1
subss %xmm2, %xmm1
cvttss2si %xmm1, %rcx
cvttss2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x35473
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x30(%rbp), %xmm0
jbe 0x35414
xorl %eax, %eax
movq %rax, -0x50(%rbp)
jmp 0x35443
movsd -0x30(%rbp), %xmm0
movsd 0x123837(%rip), %xmm2 # 0x158c58
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x35473
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x35473
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x35473
jmp 0x35469
jmp 0x3546b
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x20(%rbp)
jle 0x35484
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x3548c
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ma_retrieve_auto_increment:
push rbp
mov rbp, rsp
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov [rbp+var_18], 0
mov [rbp+var_20], 0
movzx eax, [rbp+var_9]
add eax, 0FFFFFFFEh; switch 13 cases
mov ecx, eax
mov [rbp+var_38], rcx
sub eax, 0Ch
ja def_352A6; jumptable 00000000000352A6 default case, case 7
mov rax, [rbp+var_38]
lea rcx, jpt_352A6
movsxd rax, ds:(jpt_352A6 - 158D50h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_352A8:
mov rax, [rbp+var_8]; jumptable 00000000000352A6 case 14
movsx rax, byte ptr [rax]
mov [rbp+var_20], rax
jmp loc_35473
loc_352B9:
mov rax, [rbp+var_8]; jumptable 00000000000352A6 case 2
movzx eax, byte ptr [rax]
mov [rbp+var_18], rax
jmp loc_35473
loc_352C9:
mov rax, [rbp+var_8]; jumptable 00000000000352A6 case 3
movsx rax, word ptr [rax]
mov [rbp+var_20], rax
jmp loc_35473
loc_352DA:
mov rax, [rbp+var_8]; jumptable 00000000000352A6 case 8
movzx eax, word ptr [rax]
mov [rbp+var_18], rax
jmp loc_35473
loc_352EA:
mov rax, [rbp+var_8]; jumptable 00000000000352A6 case 4
movsxd rax, dword ptr [rax]
mov [rbp+var_20], rax
jmp loc_35473
loc_352FA:
mov rax, [rbp+var_8]; jumptable 00000000000352A6 case 9
mov eax, [rax]
mov [rbp+var_18], rax
jmp loc_35473
loc_35309:
mov rax, [rbp+var_8]; jumptable 00000000000352A6 case 12
movzx eax, byte ptr [rax+2]
and eax, 80h
cmp eax, 0
jz short loc_35346
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+2]
shl eax, 10h
or eax, 0FF000000h
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
or eax, ecx
mov [rbp+var_3C], eax
jmp short loc_3536A
loc_35346:
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+2]
shl eax, 10h
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
or eax, ecx
mov [rbp+var_3C], eax
loc_3536A:
mov eax, [rbp+var_3C]
cdqe
mov [rbp+var_20], rax
jmp loc_35473
loc_35378:
mov rax, [rbp+var_8]; jumptable 00000000000352A6 case 13
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov [rbp+var_18], rax
jmp loc_35473
loc_353A4:
mov rax, [rbp+var_8]; jumptable 00000000000352A6 case 5
mov eax, [rax]
mov [rbp+var_24], eax
xorps xmm0, xmm0
ucomiss xmm0, [rbp+var_24]
jbe short loc_353BE
xor eax, eax
mov [rbp+var_48], rax
jmp short loc_353ED
loc_353BE:
movss xmm0, [rbp+var_24]
movss xmm2, cs:dword_151004
movaps xmm1, xmm0
subss xmm1, xmm2
cvttss2si rcx, xmm1
cvttss2si rax, xmm0
mov rdx, rax
sar rdx, 3Fh
and rcx, rdx
or rax, rcx
mov [rbp+var_48], rax
loc_353ED:
mov rax, [rbp+var_48]
mov [rbp+var_18], rax
jmp short loc_35473
loc_353F7:
mov rax, [rbp+var_8]; jumptable 00000000000352A6 case 6
mov rax, [rax]
mov [rbp+var_30], rax
xorps xmm0, xmm0
ucomisd xmm0, [rbp+var_30]
jbe short loc_35414
xor eax, eax
mov [rbp+var_50], rax
jmp short loc_35443
loc_35414:
movsd xmm0, [rbp+var_30]
movsd xmm2, cs:qword_158C58
movaps xmm1, xmm0
subsd xmm1, xmm2
cvttsd2si rcx, xmm1
cvttsd2si rax, xmm0
mov rdx, rax
sar rdx, 3Fh
and rcx, rdx
or rax, rcx
mov [rbp+var_50], rax
loc_35443:
mov rax, [rbp+var_50]
mov [rbp+var_18], rax
jmp short loc_35473
loc_3544D:
mov rax, [rbp+var_8]; jumptable 00000000000352A6 case 10
mov rax, [rax]
mov [rbp+var_20], rax
jmp short loc_35473
loc_3545A:
mov rax, [rbp+var_8]; jumptable 00000000000352A6 case 11
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_35473
def_352A6:
jmp short $+2; jumptable 00000000000352A6 default case, case 7
loc_35469:
jmp short $+2
loc_3546B:
mov [rbp+var_18], 0
loc_35473:
cmp [rbp+var_20], 0
jle short loc_35484
mov rax, [rbp+var_20]
mov [rbp+var_58], rax
jmp short loc_3548C
loc_35484:
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
loc_3548C:
mov rax, [rbp+var_58]
pop rbp
retn
|
long long ma_retrieve_auto_increment(float *a1, char a2)
{
long long v4; // [rsp+8h] [rbp-50h]
long long v5; // [rsp+10h] [rbp-48h]
signed int v6; // [rsp+1Ch] [rbp-3Ch]
long long v7; // [rsp+38h] [rbp-20h]
long long v8; // [rsp+40h] [rbp-18h]
v8 = 0LL;
v7 = 0LL;
switch ( a2 )
{
case 2:
v8 = *(unsigned __int8 *)a1;
break;
case 3:
v7 = *(__int16 *)a1;
break;
case 4:
v7 = *(int *)a1;
break;
case 5:
if ( *a1 >= 0.0 )
v5 = (unsigned int)(int)*a1;
else
v5 = 0LL;
v8 = v5;
break;
case 6:
if ( *(double *)a1 >= 0.0 )
v4 = (unsigned int)(int)*(double *)a1;
else
v4 = 0LL;
v8 = v4;
break;
case 8:
v8 = *(unsigned __int16 *)a1;
break;
case 9:
v8 = *(unsigned int *)a1;
break;
case 10:
v7 = *(_QWORD *)a1;
break;
case 11:
v8 = *(_QWORD *)a1;
break;
case 12:
if ( (*((_BYTE *)a1 + 2) & 0x80) != 0 )
v6 = *(unsigned __int8 *)a1 | (*((unsigned __int8 *)a1 + 1) << 8) | (*((unsigned __int8 *)a1 + 2) << 16) | 0xFF000000;
else
v6 = *(unsigned __int8 *)a1 | (*((unsigned __int8 *)a1 + 1) << 8) | (*((unsigned __int8 *)a1 + 2) << 16);
v7 = v6;
break;
case 13:
v8 = (*((unsigned __int8 *)a1 + 2) << 16) | (unsigned int)*(unsigned __int16 *)a1;
break;
case 14:
v7 = *(char *)a1;
break;
default:
v8 = 0LL;
break;
}
if ( v7 <= 0 )
return v8;
else
return v7;
}
|
ma_retrieve_auto_increment:
PUSH RBP
MOV RBP,RSP
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV qword ptr [RBP + -0x18],0x0
MOV qword ptr [RBP + -0x20],0x0
MOVZX EAX,byte ptr [RBP + -0x9]
ADD EAX,-0x2
MOV ECX,EAX
MOV qword ptr [RBP + -0x38],RCX
SUB EAX,0xc
JA 0x00135467
MOV RAX,qword ptr [RBP + -0x38]
LEA RCX,[0x258d50]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_e:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX RAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00135473
caseD_2:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00135473
caseD_3:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX RAX,word ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00135473
caseD_8:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,word ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00135473
caseD_4:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00135473
caseD_9:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00135473
caseD_c:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
AND EAX,0x80
CMP EAX,0x0
JZ 0x00135346
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
SHL EAX,0x10
OR EAX,0xff000000
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
OR EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0013536a
LAB_00135346:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
SHL EAX,0x10
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
OR EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
LAB_0013536a:
MOV EAX,dword ptr [RBP + -0x3c]
CDQE
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00135473
caseD_d:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00135473
caseD_5:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
XORPS XMM0,XMM0
UCOMISS XMM0,dword ptr [RBP + -0x24]
JBE 0x001353be
XOR EAX,EAX
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001353ed
LAB_001353be:
MOVSS XMM0,dword ptr [RBP + -0x24]
MOVSS XMM2,dword ptr [0x00251004]
MOVAPS XMM1,XMM0
SUBSS XMM1,XMM2
CVTTSS2SI RCX,XMM1
CVTTSS2SI RAX,XMM0
MOV RDX,RAX
SAR RDX,0x3f
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
LAB_001353ed:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00135473
caseD_6:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
XORPS XMM0,XMM0
UCOMISD XMM0,qword ptr [RBP + -0x30]
JBE 0x00135414
XOR EAX,EAX
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00135443
LAB_00135414:
MOVSD XMM0,qword ptr [RBP + -0x30]
MOVSD XMM2,qword ptr [0x00258c58]
MOVAPS XMM1,XMM0
SUBSD XMM1,XMM2
CVTTSD2SI RCX,XMM1
CVTTSD2SI RAX,XMM0
MOV RDX,RAX
SAR RDX,0x3f
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
LAB_00135443:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00135473
caseD_a:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00135473
caseD_b:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00135473
caseD_7:
JMP 0x00135469
LAB_00135469:
JMP 0x0013546b
LAB_0013546b:
MOV qword ptr [RBP + -0x18],0x0
LAB_00135473:
CMP qword ptr [RBP + -0x20],0x0
JLE 0x00135484
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0013548c
LAB_00135484:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
LAB_0013548c:
MOV RAX,qword ptr [RBP + -0x58]
POP RBP
RET
|
double ma_retrieve_auto_increment(double *param_1,int1 param_2)
{
float fVar1;
double dVar2;
double local_60;
double local_58;
double local_50;
uint local_44;
double local_28;
double local_20;
local_20 = 0.0;
local_28 = 0.0;
switch(param_2) {
case 2:
local_20 = (double)(ulong)*(byte *)param_1;
break;
case 3:
local_28 = (double)(long)(short)*(ushort *)param_1;
break;
case 4:
local_28 = (double)(long)(int)*(float *)param_1;
break;
case 5:
fVar1 = *(float *)param_1;
if (0.0 <= fVar1) {
local_50 = (double)((long)fVar1 | (long)(fVar1 - DAT_00251004) & (long)fVar1 >> 0x3f);
}
else {
local_50 = 0.0;
}
local_20 = local_50;
break;
case 6:
dVar2 = *param_1;
if (0.0 <= dVar2) {
local_58 = (double)((long)dVar2 | (long)(dVar2 - DAT_00258c58) & (long)dVar2 >> 0x3f);
}
else {
local_58 = 0.0;
}
local_20 = local_58;
break;
default:
local_20 = 0.0;
break;
case 8:
local_20 = (double)(ulong)*(ushort *)param_1;
break;
case 9:
local_20 = (double)(ulong)(uint)*(float *)param_1;
break;
case 10:
local_28 = *param_1;
break;
case 0xb:
local_20 = *param_1;
break;
case 0xc:
if (((ulong)*param_1 & 0x800000) == 0) {
local_44 = (uint)*(byte *)((long)param_1 + 2) << 0x10 |
(uint)*(byte *)((long)param_1 + 1) << 8 | (uint)*(byte *)param_1;
}
else {
local_44 = (uint)*(byte *)((long)param_1 + 2) << 0x10 | 0xff000000 |
(uint)*(byte *)((long)param_1 + 1) << 8 | (uint)*(byte *)param_1;
}
local_28 = (double)(long)(int)local_44;
break;
case 0xd:
local_20 = (double)(ulong)*(uint3 *)param_1;
break;
case 0xe:
local_28 = (double)(long)(char)*(byte *)param_1;
}
if ((long)local_28 < 1) {
local_60 = local_20;
}
else {
local_60 = local_28;
}
return local_60;
}
|
|
14,550
|
Common::Log::LogManager::SaveSettings()
|
Dolphin-anty/Source/Core/Common/Logging/LogManager.cpp
|
void LogManager::SaveSettings()
{
Config::ConfigChangeCallbackGuard config_guard;
Config::SetBaseOrCurrent(LOGGER_WRITE_TO_FILE, IsListenerEnabled(LogListener::FILE_LISTENER));
Config::SetBaseOrCurrent(LOGGER_WRITE_TO_CONSOLE,
IsListenerEnabled(LogListener::CONSOLE_LISTENER));
Config::SetBaseOrCurrent(LOGGER_WRITE_TO_WINDOW,
IsListenerEnabled(LogListener::LOG_WINDOW_LISTENER));
Config::SetBaseOrCurrent(LOGGER_VERBOSITY, GetLogLevel());
for (const auto& container : m_log)
{
const Config::Info<bool> info{{Config::System::Logger, "Logs", container.m_short_name}, false};
Config::SetBaseOrCurrent(info, container.m_enable);
}
Config::Save();
}
|
O0
|
cpp
|
Common::Log::LogManager::SaveSettings():
subq $0x138, %rsp # imm = 0x138
movq %rdi, 0x130(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x12f(%rsp), %rdi
callq 0x37cf0
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x15240
andb $0x1, %al
movb %al, 0x12e(%rsp)
leaq 0xb17fb(%rip), %rdi # 0xc6850
leaq 0x12e(%rsp), %rsi
callq 0x15e60
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x15240
andb $0x1, %al
movb %al, 0x12d(%rsp)
leaq 0xb1867(%rip), %rdi # 0xc68e8
leaq 0x12d(%rsp), %rsi
callq 0x15e60
movq 0x18(%rsp), %rdi
movl $0x2, %esi
callq 0x15240
andb $0x1, %al
movb %al, 0x12c(%rsp)
leaq 0xb18d3(%rip), %rdi # 0xc6980
leaq 0x12c(%rsp), %rsi
callq 0x15e60
movq 0x18(%rsp), %rdi
callq 0x15280
movl %eax, 0x128(%rsp)
leaq 0xb1946(%rip), %rdi # 0xc6a18
leaq 0x128(%rsp), %rsi
callq 0x15eb0
movq 0x18(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x120(%rsp)
movq 0x120(%rsp), %rdi
callq 0x15e10
movq %rax, 0x118(%rsp)
movq 0x120(%rsp), %rdi
callq 0x15e20
movq %rax, 0x110(%rsp)
movq 0x118(%rsp), %rax
cmpq 0x110(%rsp), %rax
je 0x15220
movq 0x118(%rsp), %rax
movq %rax, 0x108(%rsp)
movl $0x6, 0x28(%rsp)
leaq 0x28(%rsp), %rax
addq $0x8, %rax
movq %rax, (%rsp)
leaq 0x27(%rsp), %rdi
callq 0x9220
movq (%rsp), %rdi
leaq 0x89cd5(%rip), %rsi # 0x9ee3f
leaq 0x27(%rsp), %rdx
callq 0x12a40
leaq 0x28(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x8(%rsp)
movq 0x108(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x26(%rsp), %rdi
callq 0x9220
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
leaq 0x26(%rsp), %rdx
callq 0x12a40
movb $0x0, 0x25(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x25(%rsp), %rdx
callq 0x15b00
leaq 0x28(%rsp), %rdi
callq 0x15b60
leaq 0x26(%rsp), %rdi
callq 0x9d60
leaq 0x27(%rsp), %rdi
callq 0x9d60
movq 0x108(%rsp), %rsi
addq $0x10, %rsi
leaq 0x70(%rsp), %rdi
callq 0x15e60
leaq 0x70(%rsp), %rdi
callq 0x15b90
movq 0x118(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x118(%rsp)
jmp 0x1511a
callq 0x375e0
leaq 0x12f(%rsp), %rdi
callq 0x37d10
addq $0x138, %rsp # imm = 0x138
retq
nopw (%rax,%rax)
|
_ZN6Common3Log10LogManager12SaveSettingsEv:
sub rsp, 138h
mov [rsp+138h+var_8], rdi
mov rax, [rsp+138h+var_8]
mov [rsp+138h+var_120], rax
lea rdi, [rsp+138h+var_9]; this
call _ZN6Config25ConfigChangeCallbackGuardC2Ev; Config::ConfigChangeCallbackGuard::ConfigChangeCallbackGuard(void)
mov rdi, [rsp+138h+var_120]
xor esi, esi
call _ZNK6Common3Log10LogManager17IsListenerEnabledENS0_11LogListener8LISTENERE; Common::Log::LogManager::IsListenerEnabled(Common::Log::LogListener::LISTENER)
and al, 1
mov [rsp+138h+var_A], al
lea rdi, _ZN6Common3LogL20LOGGER_WRITE_TO_FILEE; Common::Log::LOGGER_WRITE_TO_FILE
lea rsi, [rsp+138h+var_A]
call _ZN6Config16SetBaseOrCurrentIbEEvRKNS_4InfoIT_EERKNSt11common_typeIJS2_EE4typeE; Config::SetBaseOrCurrent<bool>(Config::Info<bool> const&,std::common_type<bool>::type const&)
mov rdi, [rsp+138h+var_120]
mov esi, 1
call _ZNK6Common3Log10LogManager17IsListenerEnabledENS0_11LogListener8LISTENERE; Common::Log::LogManager::IsListenerEnabled(Common::Log::LogListener::LISTENER)
and al, 1
mov [rsp+138h+var_B], al
lea rdi, _ZN6Common3LogL23LOGGER_WRITE_TO_CONSOLEE; Common::Log::LOGGER_WRITE_TO_CONSOLE
lea rsi, [rsp+138h+var_B]
call _ZN6Config16SetBaseOrCurrentIbEEvRKNS_4InfoIT_EERKNSt11common_typeIJS2_EE4typeE; Config::SetBaseOrCurrent<bool>(Config::Info<bool> const&,std::common_type<bool>::type const&)
mov rdi, [rsp+138h+var_120]
mov esi, 2
call _ZNK6Common3Log10LogManager17IsListenerEnabledENS0_11LogListener8LISTENERE; Common::Log::LogManager::IsListenerEnabled(Common::Log::LogListener::LISTENER)
and al, 1
mov [rsp+138h+var_C], al
lea rdi, _ZN6Common3LogL22LOGGER_WRITE_TO_WINDOWE; Common::Log::LOGGER_WRITE_TO_WINDOW
lea rsi, [rsp+138h+var_C]
call _ZN6Config16SetBaseOrCurrentIbEEvRKNS_4InfoIT_EERKNSt11common_typeIJS2_EE4typeE; Config::SetBaseOrCurrent<bool>(Config::Info<bool> const&,std::common_type<bool>::type const&)
mov rdi, [rsp+138h+var_120]; this
call _ZNK6Common3Log10LogManager11GetLogLevelEv; Common::Log::LogManager::GetLogLevel(void)
mov [rsp+138h+var_10], eax
lea rdi, _ZN6Common3LogL16LOGGER_VERBOSITYE; Common::Log::LOGGER_VERBOSITY
lea rsi, [rsp+138h+var_10]
call _ZN6Config16SetBaseOrCurrentIN6Common3Log8LogLevelEEEvRKNS_4InfoIT_EERKNSt11common_typeIJS5_EE4typeE; Config::SetBaseOrCurrent<Common::Log::LogLevel>(Config::Info<Common::Log::LogLevel> const&,std::common_type<Common::Log::LogLevel>::type const&)
mov rax, [rsp+138h+var_120]
add rax, 8
mov [rsp+138h+var_18], rax
mov rdi, [rsp+138h+var_18]
call _ZN6Common7EnumMapINS_3Log10LogManager12LogContainerELNS1_7LogTypeE52EE5beginEv; Common::EnumMap<Common::Log::LogManager::LogContainer,(Common::Log::LogType)52>::begin(void)
mov [rsp+138h+var_20], rax
mov rdi, [rsp+138h+var_18]; this
call _ZN6Common7EnumMapINS_3Log10LogManager12LogContainerELNS1_7LogTypeE52EE3endEv; Common::EnumMap<Common::Log::LogManager::LogContainer,(Common::Log::LogType)52>::end(void)
mov [rsp+138h+var_28], rax
loc_1511A:
mov rax, [rsp+138h+var_20]
cmp rax, [rsp+138h+var_28]
jz loc_15220
mov rax, [rsp+138h+var_20]
mov [rsp+138h+var_30], rax
mov [rsp+138h+var_110], 6
lea rax, [rsp+138h+var_110]
add rax, 8
mov [rsp+138h+var_138], rax
lea rdi, [rsp+138h+var_111]
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+138h+var_138]
lea rsi, aLogs; "Logs"
lea rdx, [rsp+138h+var_111]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rax, [rsp+138h+var_110]
add rax, 28h ; '('
mov [rsp+138h+var_130], rax
mov rax, [rsp+138h+var_30]
mov rax, [rax]
mov [rsp+138h+var_128], rax
lea rdi, [rsp+138h+var_112]
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+138h+var_130]
mov rsi, [rsp+138h+var_128]
lea rdx, [rsp+138h+var_112]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov [rsp+138h+var_113], 0
lea rdi, [rsp+138h+var_C8]
lea rsi, [rsp+138h+var_110]
lea rdx, [rsp+138h+var_113]
call _ZN6Config4InfoIbEC2ERKNS_8LocationERKb; Config::Info<bool>::Info(Config::Location const&,bool const&)
lea rdi, [rsp+138h+var_110]; this
call _ZN6Config8LocationD2Ev; Config::Location::~Location()
lea rdi, [rsp+138h+var_112]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+138h+var_111]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rsi, [rsp+138h+var_30]
add rsi, 10h
lea rdi, [rsp+138h+var_C8]
call _ZN6Config16SetBaseOrCurrentIbEEvRKNS_4InfoIT_EERKNSt11common_typeIJS2_EE4typeE; Config::SetBaseOrCurrent<bool>(Config::Info<bool> const&,std::common_type<bool>::type const&)
lea rdi, [rsp+138h+var_C8]; void *
call _ZN6Config4InfoIbED2Ev; Config::Info<bool>::~Info()
mov rax, [rsp+138h+var_20]
add rax, 18h
mov [rsp+138h+var_20], rax
jmp loc_1511A
loc_15220:
call _ZN6Config4SaveEv; Config::Save(void)
lea rdi, [rsp+138h+var_9]; this
call _ZN6Config25ConfigChangeCallbackGuardD2Ev; Config::ConfigChangeCallbackGuard::~ConfigChangeCallbackGuard()
add rsp, 138h
retn
|
void Common::Log::LogManager::SaveSettings(Common::Log::LogManager *this)
{
Config *v1; // rdi
long long v2; // [rsp+10h] [rbp-128h]
char v3; // [rsp+25h] [rbp-113h] BYREF
char v4; // [rsp+26h] [rbp-112h] BYREF
char v5; // [rsp+27h] [rbp-111h] BYREF
int v6; // [rsp+28h] [rbp-110h] BYREF
long long v7; // [rsp+30h] [rbp-108h] BYREF
long long v8; // [rsp+50h] [rbp-E8h] BYREF
_BYTE v9[152]; // [rsp+70h] [rbp-C8h] BYREF
long long *v10; // [rsp+108h] [rbp-30h]
long long v11; // [rsp+110h] [rbp-28h]
long long v12; // [rsp+118h] [rbp-20h]
Config *v13; // [rsp+120h] [rbp-18h]
int LogLevel; // [rsp+128h] [rbp-10h] BYREF
char v15; // [rsp+12Ch] [rbp-Ch] BYREF
char v16; // [rsp+12Dh] [rbp-Bh] BYREF
char v17; // [rsp+12Eh] [rbp-Ah] BYREF
char v18; // [rsp+12Fh] [rbp-9h] BYREF
Common::Log::LogManager *v19; // [rsp+130h] [rbp-8h]
v19 = this;
Config::ConfigChangeCallbackGuard::ConfigChangeCallbackGuard((Config::ConfigChangeCallbackGuard *)&v18);
v17 = Common::Log::LogManager::IsListenerEnabled(this, 0LL) & 1;
Config::SetBaseOrCurrent<bool>(&Common::Log::LOGGER_WRITE_TO_FILE, &v17);
v16 = Common::Log::LogManager::IsListenerEnabled(this, 1LL) & 1;
Config::SetBaseOrCurrent<bool>(&Common::Log::LOGGER_WRITE_TO_CONSOLE, &v16);
v15 = Common::Log::LogManager::IsListenerEnabled(this, 2LL) & 1;
Config::SetBaseOrCurrent<bool>(&Common::Log::LOGGER_WRITE_TO_WINDOW, &v15);
LogLevel = Common::Log::LogManager::GetLogLevel(this);
Config::SetBaseOrCurrent<Common::Log::LogLevel>(&Common::Log::LOGGER_VERBOSITY, &LogLevel);
v13 = (Common::Log::LogManager *)((char *)this + 8);
v12 = Common::EnumMap<Common::Log::LogManager::LogContainer,(Common::Log::LogType)52>::begin((char *)this + 8);
v1 = v13;
v11 = Common::EnumMap<Common::Log::LogManager::LogContainer,(Common::Log::LogType)52>::end(v13);
while ( v12 != v11 )
{
v10 = (long long *)v12;
v6 = 6;
std::allocator<char>::allocator(&v5);
std::string::basic_string<std::allocator<char>>((long long)&v7, (long long)"Logs", (long long)&v5);
v2 = *v10;
std::allocator<char>::allocator(&v4);
std::string::basic_string<std::allocator<char>>((long long)&v8, v2, (long long)&v4);
v3 = 0;
Config::Info<bool>::Info(v9, &v6, &v3);
Config::Location::~Location((Config::Location *)&v6);
std::allocator<char>::~allocator(&v4);
std::allocator<char>::~allocator(&v5);
Config::SetBaseOrCurrent<bool>(v9, v10 + 2);
v1 = (Config *)v9;
Config::Info<bool>::~Info(v9);
v12 += 24LL;
}
Config::Save(v1);
Config::ConfigChangeCallbackGuard::~ConfigChangeCallbackGuard((Config::ConfigChangeCallbackGuard *)&v18);
}
|
SaveSettings:
SUB RSP,0x138
MOV qword ptr [RSP + 0x130],RDI
MOV RAX,qword ptr [RSP + 0x130]
MOV qword ptr [RSP + 0x18],RAX
LEA RDI,[RSP + 0x12f]
CALL 0x00137cf0
MOV RDI,qword ptr [RSP + 0x18]
XOR ESI,ESI
CALL 0x00115240
AND AL,0x1
MOV byte ptr [RSP + 0x12e],AL
LEA RDI,[0x1c6850]
LEA RSI,[RSP + 0x12e]
CALL 0x00115e60
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x1
CALL 0x00115240
AND AL,0x1
MOV byte ptr [RSP + 0x12d],AL
LEA RDI,[0x1c68e8]
LEA RSI,[RSP + 0x12d]
CALL 0x00115e60
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x2
CALL 0x00115240
AND AL,0x1
MOV byte ptr [RSP + 0x12c],AL
LEA RDI,[0x1c6980]
LEA RSI,[RSP + 0x12c]
CALL 0x00115e60
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00115280
MOV dword ptr [RSP + 0x128],EAX
LEA RDI,[0x1c6a18]
LEA RSI,[RSP + 0x128]
CALL 0x00115eb0
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x8
MOV qword ptr [RSP + 0x120],RAX
MOV RDI,qword ptr [RSP + 0x120]
CALL 0x00115e10
MOV qword ptr [RSP + 0x118],RAX
MOV RDI,qword ptr [RSP + 0x120]
CALL 0x00115e20
MOV qword ptr [RSP + 0x110],RAX
LAB_0011511a:
MOV RAX,qword ptr [RSP + 0x118]
CMP RAX,qword ptr [RSP + 0x110]
JZ 0x00115220
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0x108],RAX
MOV dword ptr [RSP + 0x28],0x6
LEA RAX,[RSP + 0x28]
ADD RAX,0x8
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x27]
CALL 0x00109220
MOV RDI,qword ptr [RSP]
LEA RSI,[0x19ee3f]
LEA RDX,[RSP + 0x27]
CALL 0x00112a40
LEA RAX,[RSP + 0x28]
ADD RAX,0x28
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x108]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x26]
CALL 0x00109220
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
LEA RDX,[RSP + 0x26]
CALL 0x00112a40
MOV byte ptr [RSP + 0x25],0x0
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x25]
CALL 0x00115b00
LEA RDI,[RSP + 0x28]
CALL 0x00115b60
LEA RDI,[RSP + 0x26]
CALL 0x00109d60
LEA RDI,[RSP + 0x27]
CALL 0x00109d60
MOV RSI,qword ptr [RSP + 0x108]
ADD RSI,0x10
LEA RDI,[RSP + 0x70]
CALL 0x00115e60
LEA RDI,[RSP + 0x70]
CALL 0x00115b90
MOV RAX,qword ptr [RSP + 0x118]
ADD RAX,0x18
MOV qword ptr [RSP + 0x118],RAX
JMP 0x0011511a
LAB_00115220:
CALL 0x001375e0
LEA RDI,[RSP + 0x12f]
CALL 0x00137d10
ADD RSP,0x138
RET
|
/* Common::Log::LogManager::SaveSettings() */
void __thiscall Common::Log::LogManager::SaveSettings(LogManager *this)
{
char *pcVar1;
byte bVar2;
bool local_113;
allocator local_112;
allocator local_111;
int4 local_110 [2];
string asStack_108 [32];
string asStack_e8 [32];
Info<bool> local_c8 [152];
int8 *local_30;
int8 *local_28;
int8 *local_20;
EnumMap<Common::Log::LogManager::LogContainer,(Common::Log::LogType)52> *local_18;
int4 local_10;
type local_c;
type local_b;
type local_a;
ConfigChangeCallbackGuard local_9;
LogManager *local_8;
local_8 = this;
Config::ConfigChangeCallbackGuard::ConfigChangeCallbackGuard(&local_9);
bVar2 = IsListenerEnabled(this,0);
local_a = (type)(bVar2 & 1);
Config::SetBaseOrCurrent<bool>((Info *)LOGGER_WRITE_TO_FILE,&local_a);
bVar2 = IsListenerEnabled(this,1);
local_b = (type)(bVar2 & 1);
Config::SetBaseOrCurrent<bool>((Info *)LOGGER_WRITE_TO_CONSOLE,&local_b);
bVar2 = IsListenerEnabled(this,2);
local_c = (type)(bVar2 & 1);
Config::SetBaseOrCurrent<bool>((Info *)LOGGER_WRITE_TO_WINDOW,&local_c);
local_10 = GetLogLevel(this);
Config::SetBaseOrCurrent<Common::Log::LogLevel>((Info *)LOGGER_VERBOSITY,(type *)&local_10);
local_18 = (EnumMap<Common::Log::LogManager::LogContainer,(Common::Log::LogType)52> *)(this + 8);
local_20 = (int8 *)
EnumMap<Common::Log::LogManager::LogContainer,(Common::Log::LogType)52>::begin
(local_18);
local_28 = (int8 *)
EnumMap<Common::Log::LogManager::LogContainer,(Common::Log::LogType)52>::end(local_18);
for (; local_20 != local_28; local_20 = local_20 + 3) {
local_30 = local_20;
local_110[0] = 6;
std::allocator<char>::allocator();
std::__cxx11::string::string<std::allocator<char>>(asStack_108,"Logs",&local_111);
pcVar1 = (char *)*local_30;
std::allocator<char>::allocator();
std::__cxx11::string::string<std::allocator<char>>(asStack_e8,pcVar1,&local_112);
local_113 = false;
Config::Info<bool>::Info(local_c8,(Location *)local_110,&local_113);
Config::Location::~Location((Location *)local_110);
std::allocator<char>::~allocator((allocator<char> *)&local_112);
std::allocator<char>::~allocator((allocator<char> *)&local_111);
Config::SetBaseOrCurrent<bool>((Info *)local_c8,(type *)(local_30 + 2));
Config::Info<bool>::~Info(local_c8);
}
Config::Save();
Config::ConfigChangeCallbackGuard::~ConfigChangeCallbackGuard(&local_9);
return;
}
|
|
14,551
|
nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)
|
ng-log[P]ng-log/src/logging.cc
|
CheckOpMessageBuilder::CheckOpMessageBuilder(const char* exprtext)
: stream_(new ostringstream) {
*stream_ << exprtext << " (";
}
|
O3
|
cpp
|
nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x178, %edi # imm = 0x178
callq 0x92e0
movq %rax, %rbx
movq %rax, %rdi
callq 0x7730
movq %rbx, (%r15)
testq %r14, %r14
je 0xed90
movq %r14, %rdi
callq 0x7200
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x75f0
jmp 0xeda9
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %rbx, %rdi
addq %rax, %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x7910
leaq 0x14e34(%rip), %rsi # 0x23be4
movl $0x2, %edx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x75f0
movq %rax, %r14
movl $0x178, %esi # imm = 0x178
movq %rbx, %rdi
callq 0x932c
movq %r14, %rdi
callq 0x7950
|
_ZN5nglog8internal21CheckOpMessageBuilderC2EPKc:
push r15; Alternative name is 'nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)'
push r14
push rbx
mov r14, rsi
mov r15, rdi
mov edi, 178h; unsigned __int64
call _Znwm; operator new(ulong)
mov rbx, rax
mov rdi, rax
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov [r15], rbx
test r14, r14
jz short loc_ED90
mov rdi, r14
call _strlen
mov rdi, rbx
mov rsi, r14
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_EDA9
loc_ED90:
mov rax, [rbx]
mov rax, [rax-18h]
mov rdi, rbx
add rdi, rax
mov esi, [rbx+rax+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_EDA9:
lea rsi, asc_23BE4; " ("
mov edx, 2
mov rdi, rbx
pop rbx
pop r14
pop r15
jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r14, rax
mov esi, 178h; unsigned __int64
mov rdi, rbx; void *
call _ZdlPvm; operator delete(void *,ulong)
mov rdi, r14
call __Unwind_Resume
|
long long nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(
nglog::internal::CheckOpMessageBuilder *this,
const char *a2)
{
_QWORD *v2; // rbx
long long v3; // rax
v2 = (_QWORD *)operator new(376LL);
std::ostringstream::basic_ostringstream(v2);
*(_QWORD *)this = v2;
if ( a2 )
{
v3 = strlen(a2);
std::__ostream_insert<char,std::char_traits<char>>(v2, a2, v3);
}
else
{
std::ios::clear((char *)v2 + *(_QWORD *)(*v2 - 24LL), *(_DWORD *)((char *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) | 1u);
}
return std::__ostream_insert<char,std::char_traits<char>>(v2, " (", 2LL);
}
|
CheckOpMessageBuilder:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV R15,RDI
MOV EDI,0x178
CALL 0x001092e0
MOV RBX,RAX
LAB_0010ed68:
MOV RDI,RAX
CALL 0x00107730
LAB_0010ed70:
MOV qword ptr [R15],RBX
TEST R14,R14
JZ 0x0010ed90
MOV RDI,R14
CALL 0x00107200
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RAX
CALL 0x001075f0
JMP 0x0010eda9
LAB_0010ed90:
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
MOV RDI,RBX
ADD RDI,RAX
MOV ESI,dword ptr [RBX + RAX*0x1 + 0x20]
OR ESI,0x1
CALL 0x00107910
LAB_0010eda9:
LEA RSI,[0x123be4]
MOV EDX,0x2
MOV RDI,RBX
POP RBX
POP R14
POP R15
JMP 0x001075f0
|
/* nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*) */
void __thiscall
nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder
(CheckOpMessageBuilder *this,char *param_1)
{
ostringstream *this_00;
size_t sVar1;
this_00 = (ostringstream *)operator_new(0x178);
/* try { // try from 0010ed68 to 0010ed6f has its CatchHandler @ 0010edc2 */
std::__cxx11::ostringstream::ostringstream(this_00);
*(ostringstream **)this = this_00;
if (param_1 == (char *)0x0) {
std::ios::clear(this_00 + *(long *)(*(long *)this_00 + -0x18),
*(uint *)(this_00 + *(long *)(*(long *)this_00 + -0x18) + 0x20) | 1);
}
else {
sVar1 = strlen(param_1);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)this_00,param_1,sVar1);
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)this_00," (",2);
return;
}
|
|
14,552
|
my_once_free
|
eloqsql/mysys/my_once.c
|
void my_once_free(void)
{
reg1 USED_MEM *next,*old;
DBUG_ENTER("my_once_free");
for (next=my_once_root_block ; next ; )
{
old=next; next= next->next ;
free((uchar*) old);
}
my_once_root_block=0;
DBUG_VOID_RETURN;
}
|
O3
|
c
|
my_once_free:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x34200e(%rip), %rbx # 0x36a810
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2881a
movq (%rdi), %r14
callq 0x243f0
movq %r14, %rdi
testq %r14, %r14
jne 0x2880a
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
|
my_once_free:
push rbp
mov rbp, rsp
push r14
push rbx
lea rbx, my_once_root_block
mov rdi, [rbx]
test rdi, rdi
jz short loc_2881A
loc_2880A:
mov r14, [rdi]
call _free
mov rdi, r14
test r14, r14
jnz short loc_2880A
loc_2881A:
mov qword ptr [rbx], 0
pop rbx
pop r14
pop rbp
retn
|
long long my_once_free(long long a1, long long a2)
{
_QWORD *v2; // rdi
_QWORD *v3; // r14
long long result; // rax
v2 = (_QWORD *)my_once_root_block;
if ( my_once_root_block )
{
do
{
v3 = (_QWORD *)*v2;
result = free(v2, a2);
v2 = v3;
}
while ( v3 );
}
my_once_root_block = 0LL;
return result;
}
|
my_once_free:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA RBX,[0x46a810]
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x0012881a
LAB_0012880a:
MOV R14,qword ptr [RDI]
CALL 0x001243f0
MOV RDI,R14
TEST R14,R14
JNZ 0x0012880a
LAB_0012881a:
MOV qword ptr [RBX],0x0
POP RBX
POP R14
POP RBP
RET
|
void my_once_free(void)
{
long *plVar1;
long *__ptr;
__ptr = my_once_root_block;
if (my_once_root_block != (long *)0x0) {
do {
plVar1 = (long *)*__ptr;
free(__ptr);
__ptr = plVar1;
} while (plVar1 != (long *)0x0);
}
my_once_root_block = (long *)0x0;
return;
}
|
|
14,553
|
report_printbuf
|
pnggroup[P]pngcheck/pngcheck.c
|
void report_printbuf(printbuf_state *prbuf, const char *fname, char *chunkid)
{
if (prbuf->cr) {
if (prbuf->lf) {
printf("%s %s chunk contains both CR and LF as line terminators\n",
verbose? "":fname, chunkid);
set_err(kMinorError);
} else {
printf("%s %s chunk contains only CR as line terminator\n",
verbose? "":fname, chunkid);
set_err(kMinorError);
}
}
if (prbuf->nul) {
printf("%s %s chunk contains null bytes\n", verbose? "":fname, chunkid);
set_err(kMinorError);
}
if (prbuf->control) {
printf("%s %s chunk contains one or more control characters%s\n",
verbose? "":fname, chunkid, prbuf->esc? " including Escape":"");
set_err(kMinorError);
}
}
|
O3
|
c
|
report_printbuf:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x0, (%rdi)
je 0x11b2b
cmpl $0x0, 0xa728(%rip) # 0x1c210
leaq 0x1cf5(%rip), %rsi # 0x137e4
cmoveq %r14, %rsi
cmpl $0x0, 0x4(%r15)
leaq 0x21f1(%rip), %rax # 0x13cf0
leaq 0x21b0(%rip), %rdi # 0x13cb6
cmoveq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x20e0
movl 0xa726(%rip), %eax # 0x1c240
cmpl $0x4, %eax
movl $0x3, %ecx
cmovgel %eax, %ecx
movl %ecx, 0xa715(%rip) # 0x1c240
cmpl $0x0, 0x8(%r15)
je 0x11b6c
cmpl $0x0, 0xa6d7(%rip) # 0x1c210
leaq 0x1ca4(%rip), %rsi # 0x137e4
cmoveq %r14, %rsi
leaq 0x21d7(%rip), %rdi # 0x13d22
movq %rbx, %rdx
xorl %eax, %eax
callq 0x20e0
movl 0xa6e5(%rip), %eax # 0x1c240
cmpl $0x4, %eax
movl $0x3, %ecx
cmovgel %eax, %ecx
movl %ecx, 0xa6d4(%rip) # 0x1c240
cmpl $0x0, 0xc(%r15)
je 0x11bc0
cmpl $0x0, 0xa696(%rip) # 0x1c210
leaq 0x1c63(%rip), %rax # 0x137e4
cmovneq %rax, %r14
cmpl $0x0, 0x10(%r15)
leaq 0x21eb(%rip), %rcx # 0x13d7c
cmoveq %rax, %rcx
leaq 0x21a8(%rip), %rdi # 0x13d44
movq %r14, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x20e0
movl 0xa691(%rip), %eax # 0x1c240
cmpl $0x4, %eax
movl $0x3, %ecx
cmovgel %eax, %ecx
movl %ecx, 0xa680(%rip) # 0x1c240
popq %rbx
popq %r14
popq %r15
retq
|
report_printbuf:
push r15
push r14
push rbx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
cmp dword ptr [rdi], 0
jz short loc_11B2B
cmp cs:verbose, 0
lea rsi, aZlibWarningDif+3Ah; ""
cmovz rsi, r14
cmp dword ptr [r15+4], 0
lea rax, aSSChunkContain; "%s %s chunk contains only CR as line t"...
lea rdi, aSSChunkContain_0; "%s %s chunk contains both CR and LF as"...
cmovz rdi, rax
mov rdx, rbx
xor eax, eax
call _printf
mov eax, cs:global_error
cmp eax, 4
mov ecx, 3
cmovge ecx, eax
mov cs:global_error, ecx
loc_11B2B:
cmp dword ptr [r15+8], 0
jz short loc_11B6C
cmp cs:verbose, 0
lea rsi, aZlibWarningDif+3Ah; ""
cmovz rsi, r14
lea rdi, aSSChunkContain_1; "%s %s chunk contains null bytes\n"
mov rdx, rbx
xor eax, eax
call _printf
mov eax, cs:global_error
cmp eax, 4
mov ecx, 3
cmovge ecx, eax
mov cs:global_error, ecx
loc_11B6C:
cmp dword ptr [r15+0Ch], 0
jz short loc_11BC0
cmp cs:verbose, 0
lea rax, aZlibWarningDif+3Ah; ""
cmovnz r14, rax
cmp dword ptr [r15+10h], 0
lea rcx, aIncludingEscap; " including Escape"
cmovz rcx, rax
lea rdi, aSSChunkContain_2; "%s %s chunk contains one or more contr"...
mov rsi, r14
mov rdx, rbx
xor eax, eax
call _printf
mov eax, cs:global_error
cmp eax, 4
mov ecx, 3
cmovge ecx, eax
mov cs:global_error, ecx
loc_11BC0:
pop rbx
pop r14
pop r15
retn
|
void report_printbuf(_DWORD *a1, const char *a2, const char *a3)
{
char *v6; // rsi
const char *v7; // rdi
int v8; // ecx
const char *v9; // rsi
int v10; // ecx
const char *v11; // rcx
int v12; // ecx
if ( *a1 )
{
v6 = "";
if ( !verbose )
v6 = (char *)a2;
v7 = "%s %s chunk contains both CR and LF as line terminators\n";
if ( !a1[1] )
v7 = "%s %s chunk contains only CR as line terminator\n";
printf(v7, v6, a3);
v8 = 3;
if ( global_error >= 4 )
v8 = global_error;
global_error = v8;
}
if ( a1[2] )
{
v9 = "";
if ( !verbose )
v9 = a2;
printf("%s %s chunk contains null bytes\n", v9, a3);
v10 = 3;
if ( global_error >= 4 )
v10 = global_error;
global_error = v10;
}
if ( a1[3] )
{
if ( verbose )
a2 = "";
v11 = " including Escape";
if ( !a1[4] )
v11 = "";
printf("%s %s chunk contains one or more control characters%s\n", a2, a3, v11);
v12 = 3;
if ( global_error >= 4 )
v12 = global_error;
global_error = v12;
}
}
|
report_printbuf:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CMP dword ptr [RDI],0x0
JZ 0x00111b2b
CMP dword ptr [0x0011c210],0x0
LEA RSI,[0x1137e4]
CMOVZ RSI,R14
CMP dword ptr [R15 + 0x4],0x0
LEA RAX,[0x113cf0]
LEA RDI,[0x113cb6]
CMOVZ RDI,RAX
MOV RDX,RBX
XOR EAX,EAX
CALL 0x001020e0
MOV EAX,dword ptr [0x0011c240]
CMP EAX,0x4
MOV ECX,0x3
CMOVGE ECX,EAX
MOV dword ptr [0x0011c240],ECX
LAB_00111b2b:
CMP dword ptr [R15 + 0x8],0x0
JZ 0x00111b6c
CMP dword ptr [0x0011c210],0x0
LEA RSI,[0x1137e4]
CMOVZ RSI,R14
LEA RDI,[0x113d22]
MOV RDX,RBX
XOR EAX,EAX
CALL 0x001020e0
MOV EAX,dword ptr [0x0011c240]
CMP EAX,0x4
MOV ECX,0x3
CMOVGE ECX,EAX
MOV dword ptr [0x0011c240],ECX
LAB_00111b6c:
CMP dword ptr [R15 + 0xc],0x0
JZ 0x00111bc0
CMP dword ptr [0x0011c210],0x0
LEA RAX,[0x1137e4]
CMOVNZ R14,RAX
CMP dword ptr [R15 + 0x10],0x0
LEA RCX,[0x113d7c]
CMOVZ RCX,RAX
LEA RDI,[0x113d44]
MOV RSI,R14
MOV RDX,RBX
XOR EAX,EAX
CALL 0x001020e0
MOV EAX,dword ptr [0x0011c240]
CMP EAX,0x4
MOV ECX,0x3
CMOVGE ECX,EAX
MOV dword ptr [0x0011c240],ECX
LAB_00111bc0:
POP RBX
POP R14
POP R15
RET
|
void report_printbuf(int *param_1,char *param_2,int8 param_3)
{
int iVar1;
char *pcVar2;
char *__format;
iVar1 = global_error;
if (*param_1 != 0) {
pcVar2 = "";
if (verbose == 0) {
pcVar2 = param_2;
}
__format = "%s %s chunk contains both CR and LF as line terminators\n";
if (param_1[1] == 0) {
__format = "%s %s chunk contains only CR as line terminator\n";
}
printf(__format,pcVar2,param_3);
iVar1 = 3;
if (3 < global_error) {
iVar1 = global_error;
}
}
global_error = iVar1;
iVar1 = global_error;
if (param_1[2] != 0) {
pcVar2 = "";
if (verbose == 0) {
pcVar2 = param_2;
}
printf("%s %s chunk contains null bytes\n",pcVar2,param_3);
iVar1 = 3;
if (3 < global_error) {
iVar1 = global_error;
}
}
global_error = iVar1;
iVar1 = global_error;
if (param_1[3] != 0) {
if (verbose != 0) {
param_2 = "";
}
pcVar2 = " including Escape";
if (param_1[4] == 0) {
pcVar2 = "";
}
printf("%s %s chunk contains one or more control characters%s\n",param_2,param_3,pcVar2);
iVar1 = 3;
if (3 < global_error) {
iVar1 = global_error;
}
}
global_error = iVar1;
return;
}
|
|
14,554
|
ma_set_dynamic
|
eloqsql/libmariadb/libmariadb/ma_array.c
|
my_bool ma_set_dynamic(DYNAMIC_ARRAY *array, void * element, uint idx)
{
if (idx >= array->elements)
{
if (idx >= array->max_element)
{
uint size;
char *new_ptr;
size=(idx+array->alloc_increment)/array->alloc_increment;
size*= array->alloc_increment;
if (!(new_ptr=(char*) realloc(array->buffer,size*
array->size_of_element)))
return TRUE;
array->buffer=new_ptr;
array->max_element=size;
}
memset((array->buffer+array->elements*array->size_of_element), 0,
(idx - array->elements)*array->size_of_element);
array->elements=idx+1;
}
memcpy(array->buffer+(idx * array->size_of_element),element,
(size_t) array->size_of_element);
return FALSE;
}
|
O3
|
c
|
ma_set_dynamic:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movl 0x8(%rdi), %eax
cmpl %edx, %eax
ja 0x73ab4
movq (%r15), %rcx
cmpl %r14d, 0xc(%r15)
ja 0x73a91
movl 0x10(%r15), %esi
movl %esi, %r12d
addl %r14d, %r12d
movl %r12d, %eax
xorl %edx, %edx
divl %esi
subl %edx, %r12d
movl 0x14(%r15), %esi
imull %r12d, %esi
movq %rcx, %rdi
callq 0x3a0f0
testq %rax, %rax
je 0x73ad5
movq %rax, %rcx
movq %rax, (%r15)
movl %r12d, 0xc(%r15)
movl 0x8(%r15), %eax
movl 0x14(%r15), %esi
movl %r14d, %edx
subl %eax, %edx
imull %esi, %edx
movl %esi, %edi
imull %eax, %edi
addq %rcx, %rdi
xorl %esi, %esi
callq 0x3a3a0
leal 0x1(%r14), %eax
movl %eax, 0x8(%r15)
movl 0x14(%r15), %edx
imull %edx, %r14d
addq (%r15), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3a0c0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x73acc
|
ma_set_dynamic:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14d, edx
mov rbx, rsi
mov r15, rdi
mov eax, [rdi+8]
cmp eax, edx
ja short loc_73AB4
mov rcx, [r15]
cmp [r15+0Ch], r14d
ja short loc_73A91
mov esi, [r15+10h]
mov r12d, esi
add r12d, r14d
mov eax, r12d
xor edx, edx
div esi
sub r12d, edx
mov esi, [r15+14h]
imul esi, r12d
mov rdi, rcx
call _realloc
test rax, rax
jz short loc_73AD5
mov rcx, rax
mov [r15], rax
mov [r15+0Ch], r12d
mov eax, [r15+8]
loc_73A91:
mov esi, [r15+14h]
mov edx, r14d
sub edx, eax
imul edx, esi
mov edi, esi
imul edi, eax
add rdi, rcx
xor esi, esi
call _memset
lea eax, [r14+1]
mov [r15+8], eax
loc_73AB4:
mov edx, [r15+14h]
imul r14d, edx
add r14, [r15]
mov rdi, r14
mov rsi, rbx
call _memcpy
xor eax, eax
loc_73ACC:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_73AD5:
mov al, 1
jmp short loc_73ACC
|
long long ma_set_dynamic(long long *a1, long long a2, unsigned int a3, long long a4, long long a5, long long a6)
{
unsigned int v7; // eax
long long v8; // rcx
unsigned int v9; // r12d
long long v10; // rax
v7 = *((_DWORD *)a1 + 2);
if ( v7 > a3 )
goto LABEL_6;
v8 = *a1;
if ( *((_DWORD *)a1 + 3) > a3 )
{
LABEL_5:
memset(v8 + v7 * *((_DWORD *)a1 + 5), 0LL, *((_DWORD *)a1 + 5) * (a3 - v7));
*((_DWORD *)a1 + 2) = a3 + 1;
LABEL_6:
memcpy(*a1 + *((_DWORD *)a1 + 5) * a3, a2, *((unsigned int *)a1 + 5), a4, a5, a6);
return 0LL;
}
v9 = a3 + *((_DWORD *)a1 + 4) - (a3 + *((_DWORD *)a1 + 4)) % *((_DWORD *)a1 + 4);
v10 = realloc(*a1, v9 * *((_DWORD *)a1 + 5));
if ( v10 )
{
v8 = v10;
*a1 = v10;
*((_DWORD *)a1 + 3) = v9;
v7 = *((_DWORD *)a1 + 2);
goto LABEL_5;
}
return 1LL;
}
|
ma_set_dynamic:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14D,EDX
MOV RBX,RSI
MOV R15,RDI
MOV EAX,dword ptr [RDI + 0x8]
CMP EAX,EDX
JA 0x00173ab4
MOV RCX,qword ptr [R15]
CMP dword ptr [R15 + 0xc],R14D
JA 0x00173a91
MOV ESI,dword ptr [R15 + 0x10]
MOV R12D,ESI
ADD R12D,R14D
MOV EAX,R12D
XOR EDX,EDX
DIV ESI
SUB R12D,EDX
MOV ESI,dword ptr [R15 + 0x14]
IMUL ESI,R12D
MOV RDI,RCX
CALL 0x0013a0f0
TEST RAX,RAX
JZ 0x00173ad5
MOV RCX,RAX
MOV qword ptr [R15],RAX
MOV dword ptr [R15 + 0xc],R12D
MOV EAX,dword ptr [R15 + 0x8]
LAB_00173a91:
MOV ESI,dword ptr [R15 + 0x14]
MOV EDX,R14D
SUB EDX,EAX
IMUL EDX,ESI
MOV EDI,ESI
IMUL EDI,EAX
ADD RDI,RCX
XOR ESI,ESI
CALL 0x0013a3a0
LEA EAX,[R14 + 0x1]
MOV dword ptr [R15 + 0x8],EAX
LAB_00173ab4:
MOV EDX,dword ptr [R15 + 0x14]
IMUL R14D,EDX
ADD R14,qword ptr [R15]
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013a0c0
XOR EAX,EAX
LAB_00173acc:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00173ad5:
MOV AL,0x1
JMP 0x00173acc
|
int8 ma_set_dynamic(long *param_1,void *param_2,uint param_3)
{
void *__ptr;
uint uVar1;
int iVar2;
uVar1 = *(uint *)(param_1 + 1);
if (uVar1 <= param_3) {
__ptr = (void *)*param_1;
if (*(uint *)((long)param_1 + 0xc) <= param_3) {
uVar1 = *(uint *)(param_1 + 2) + param_3;
iVar2 = uVar1 - uVar1 % *(uint *)(param_1 + 2);
__ptr = realloc(__ptr,(ulong)(uint)(*(int *)((long)param_1 + 0x14) * iVar2));
if (__ptr == (void *)0x0) {
return 1;
}
*param_1 = (long)__ptr;
*(int *)((long)param_1 + 0xc) = iVar2;
uVar1 = *(uint *)(param_1 + 1);
}
memset((void *)((ulong)(*(int *)((long)param_1 + 0x14) * uVar1) + (long)__ptr),0,
(ulong)((param_3 - uVar1) * *(int *)((long)param_1 + 0x14)));
*(uint *)(param_1 + 1) = param_3 + 1;
}
memcpy((void *)((ulong)(param_3 * *(uint *)((long)param_1 + 0x14)) + *param_1),param_2,
(ulong)*(uint *)((long)param_1 + 0x14));
return 0;
}
|
|
14,555
|
ma_apply_undo_key_delete
|
eloqsql/storage/maria/ma_key_recover.c
|
my_bool _ma_apply_undo_key_delete(MARIA_HA *info, LSN undo_lsn,
const uchar *header, uint length,
my_bool with_root)
{
LSN lsn;
my_bool res;
uint keynr, skip_bytes;
uchar key_buff[MARIA_MAX_KEY_BUFF];
MARIA_SHARE *share= info->s;
my_off_t new_root;
struct st_msg_to_write_hook_for_undo_key msg;
MARIA_KEY key;
DBUG_ENTER("_ma_apply_undo_key_delete");
share->state.changed|= (STATE_CHANGED | STATE_NOT_OPTIMIZED_KEYS |
STATE_NOT_SORTED_PAGES | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
keynr= key_nr_korr(header);
skip_bytes= KEY_NR_STORE_SIZE + (with_root ? PAGE_STORE_SIZE : 0);
header+= skip_bytes;
length-= skip_bytes;
/* We have to copy key as _ma_ck_real_write_btree() may change it */
memcpy(key_buff, header, length);
DBUG_DUMP("key", key_buff, length);
key.keyinfo= share->keyinfo + keynr;
key.data= key_buff;
key.data_length= length - share->rec_reflength;
key.ref_length= share->rec_reflength;
key.flag= SEARCH_USER_KEY_HAS_TRANSID;
new_root= share->state.key_root[keynr];
res= (share->keyinfo[keynr].key_alg == HA_KEY_ALG_RTREE) ?
maria_rtree_insert_level(info, &key, -1, &new_root) :
_ma_ck_real_write_btree(info, &key, &new_root,
share->keyinfo[keynr].write_comp_flag |
key.flag);
if (res)
_ma_mark_file_crashed(share);
msg.root= &share->state.key_root[keynr];
msg.value= new_root;
msg.keynr= keynr;
if (_ma_write_clr(info, undo_lsn,
*msg.root == msg.value ?
LOGREC_UNDO_KEY_DELETE : LOGREC_UNDO_KEY_DELETE_WITH_ROOT,
0, 0, &lsn,
(void*) &msg))
res= 1;
_ma_fast_unlock_key_del(info);
_ma_unpin_all_pages_and_finalize_row(info, lsn);
DBUG_RETURN(res);
}
|
O3
|
c
|
ma_apply_undo_key_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa48, %rsp # imm = 0xA48
movq %rsi, -0xa20(%rbp)
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %r15
orl $0x1b1, 0x170(%r15) # imm = 0x1B1
movzbl (%rdx), %r14d
xorl %eax, %eax
testb %r8b, %r8b
setne %al
leal (%rax,%rax,4), %r12d
leaq (%r12,%rdx), %rsi
incq %rsi
notl %r12d
addl %ecx, %r12d
leaq -0xa10(%rbp), %r13
movl $0x9d3, %ecx # imm = 0x9D3
movq %r13, %rdi
movq %r12, %rdx
callq 0x29420
movq 0x570(%r15), %rcx
imulq $0x118, %r14, %rdx # imm = 0x118
leaq (%rcx,%rdx), %rax
movq %rax, -0xa40(%rbp)
movq %r13, -0xa48(%rbp)
movl 0x740(%r15), %esi
subl %esi, %r12d
movl %r12d, -0xa38(%rbp)
movl %esi, -0xa34(%rbp)
movl $0x80000, -0xa30(%rbp) # imm = 0x80000
movq 0x118(%r15), %rsi
movq (%rsi,%r14,8), %rsi
movq %rsi, -0xa18(%rbp)
cmpb $0x2, 0xa4(%rcx,%rdx)
jne 0x5a842
leaq -0xa48(%rbp), %rsi
leaq -0xa18(%rbp), %rcx
movq %rbx, %rdi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0x6b36e
movl %eax, %r12d
jmp 0x5a866
movl $0x80000, %ecx # imm = 0x80000
orl 0xb4(%rax), %ecx
leaq -0xa48(%rbp), %rsi
leaq -0xa18(%rbp), %rdx
movq %rbx, %rdi
callq 0x64614
movl %eax, %r12d
testb %r12b, %r12b
je 0x5a873
movq %r15, %rdi
callq 0x37e16
movq 0x118(%r15), %rax
leaq (%rax,%r14,8), %rax
leaq -0xa68(%rbp), %rcx
movq %rax, (%rcx)
movq -0xa18(%rbp), %rsi
movq %rsi, 0x8(%rcx)
movl %r14d, 0x10(%rcx)
xorl %edx, %edx
cmpq %rsi, (%rax)
setne %dl
addl $0x17, %edx
movq %rcx, (%rsp)
leaq -0xa28(%rbp), %r9
movq %rbx, %rdi
movq -0xa20(%rbp), %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x59441
movl %eax, %r14d
cmpb $0x0, 0x67e(%rbx)
je 0x5a8d5
movq %rbx, %rdi
callq 0x5aa7e
testb %r14b, %r14b
movzbl %r12b, %eax
movl $0x1, %r14d
cmovel %eax, %r14d
movq -0xa28(%rbp), %rsi
movq %rbx, %rdi
callq 0x593c4
movq 0x8(%rbx), %rax
movq $0x0, 0x90(%rax)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x5a928
movl %r14d, %eax
addq $0xa48, %rsp # imm = 0xA48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
|
_ma_apply_undo_key_delete:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A48h
mov [rbp+var_A20], rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r15, [rdi]
or dword ptr [r15+170h], 1B1h
movzx r14d, byte ptr [rdx]
xor eax, eax
test r8b, r8b
setnz al
lea r12d, [rax+rax*4]
lea rsi, [r12+rdx]
inc rsi
not r12d
add r12d, ecx
lea r13, [rbp+var_A10]
mov ecx, 9D3h
mov rdi, r13
mov rdx, r12
call ___memcpy_chk
mov rcx, [r15+570h]
imul rdx, r14, 118h
lea rax, [rcx+rdx]
mov [rbp+var_A40], rax
mov [rbp+var_A48], r13
mov esi, [r15+740h]
sub r12d, esi
mov [rbp+var_A38], r12d
mov [rbp+var_A34], esi
mov [rbp+var_A30], 80000h
mov rsi, [r15+118h]
mov rsi, [rsi+r14*8]
mov [rbp+var_A18], rsi
cmp byte ptr [rcx+rdx+0A4h], 2
jnz short loc_5A842
lea rsi, [rbp+var_A48]
lea rcx, [rbp+var_A18]
mov rdi, rbx
mov edx, 0FFFFFFFFh
call maria_rtree_insert_level
mov r12d, eax
jmp short loc_5A866
loc_5A842:
mov ecx, 80000h
or ecx, [rax+0B4h]
lea rsi, [rbp+var_A48]
lea rdx, [rbp+var_A18]
mov rdi, rbx
call _ma_ck_real_write_btree
mov r12d, eax
loc_5A866:
test r12b, r12b
jz short loc_5A873
mov rdi, r15
call _ma_mark_file_crashed
loc_5A873:
mov rax, [r15+118h]
lea rax, [rax+r14*8]
lea rcx, [rbp+var_A68]
mov [rcx], rax
mov rsi, [rbp+var_A18]
mov [rcx+8], rsi
mov [rcx+10h], r14d
xor edx, edx
cmp [rax], rsi
setnz dl
add edx, 17h
mov [rsp+0A70h+var_A70], rcx
lea r9, [rbp+var_A28]
mov rdi, rbx
mov rsi, [rbp+var_A20]
xor ecx, ecx
xor r8d, r8d
call _ma_write_clr
mov r14d, eax
cmp byte ptr [rbx+67Eh], 0
jz short loc_5A8D5
mov rdi, rbx
call _ma_unlock_key_del
loc_5A8D5:
test r14b, r14b
movzx eax, r12b
mov r14d, 1
cmovz r14d, eax
mov rsi, [rbp+var_A28]
mov rdi, rbx
call _ma_unpin_all_pages
mov rax, [rbx+8]
mov qword ptr [rax+90h], 0
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_5A928
mov eax, r14d
add rsp, 0A48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5A928:
call ___stack_chk_fail
|
long long ma_apply_undo_key_delete(long long a1, long long a2, unsigned __int8 *a3, int a4, char a5)
{
long long v5; // r15
long long v6; // r14
long long v7; // r12
long long v8; // rsi
long long v9; // r12
long long v10; // rax
unsigned __int8 inserted; // r12
char v12; // r14
bool v13; // zf
unsigned int v14; // r14d
_QWORD v16[2]; // [rsp+8h] [rbp-A68h] BYREF
int v17; // [rsp+18h] [rbp-A58h]
_QWORD v18[2]; // [rsp+28h] [rbp-A48h] BYREF
int v19; // [rsp+38h] [rbp-A38h]
int v20; // [rsp+3Ch] [rbp-A34h]
int v21; // [rsp+40h] [rbp-A30h]
signed long long v22; // [rsp+48h] [rbp-A28h] BYREF
long long v23; // [rsp+50h] [rbp-A20h]
long long v24; // [rsp+58h] [rbp-A18h] BYREF
_BYTE v25[2528]; // [rsp+60h] [rbp-A10h] BYREF
unsigned long long v26; // [rsp+A40h] [rbp-30h]
v23 = a2;
v26 = __readfsqword(0x28u);
v5 = *(_QWORD *)a1;
*(_DWORD *)(*(_QWORD *)a1 + 368LL) |= 0x1B1u;
v6 = *a3;
v7 = 5 * (unsigned int)(a5 != 0);
v8 = (long long)&a3[v7 + 1];
v9 = (unsigned int)(a4 + ~(_DWORD)v7);
__memcpy_chk(v25, v8, v9, 2515LL);
v10 = *(_QWORD *)(v5 + 1392) + 280 * v6;
v18[1] = v10;
v18[0] = v25;
LODWORD(v8) = *(_DWORD *)(v5 + 1856);
v19 = v9 - v8;
v20 = v8;
v21 = 0x80000;
v24 = *(_QWORD *)(*(_QWORD *)(v5 + 280) + 8 * v6);
if ( *(_BYTE *)(v10 + 164) == 2 )
inserted = maria_rtree_insert_level(a1, v18, 0xFFFFFFFFLL, &v24);
else
inserted = ma_ck_real_write_btree(a1, v18, &v24, *(_DWORD *)(v10 + 180) | 0x80000u);
if ( inserted )
ma_mark_file_crashed(v5);
v16[0] = *(_QWORD *)(v5 + 280) + 8 * v6;
v16[1] = v24;
v17 = v6;
v12 = ma_write_clr(
(long long *)a1,
v23,
(unsigned int)(*(_QWORD *)v16[0] != v24) + 23,
0,
0,
(unsigned long long)&v22,
(long long)v16);
if ( *(_BYTE *)(a1 + 1662) )
ma_unlock_key_del(a1);
v13 = v12 == 0;
v14 = 1;
if ( v13 )
v14 = inserted;
ma_unpin_all_pages(a1, v22);
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 144LL) = 0LL;
return v14;
}
|
_ma_apply_undo_key_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa48
MOV qword ptr [RBP + -0xa20],RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R15,qword ptr [RDI]
OR dword ptr [R15 + 0x170],0x1b1
MOVZX R14D,byte ptr [RDX]
XOR EAX,EAX
TEST R8B,R8B
SETNZ AL
LEA R12D,[RAX + RAX*0x4]
LEA RSI,[R12 + RDX*0x1]
INC RSI
NOT R12D
ADD R12D,ECX
LEA R13,[RBP + -0xa10]
MOV ECX,0x9d3
MOV RDI,R13
MOV RDX,R12
CALL 0x00129420
MOV RCX,qword ptr [R15 + 0x570]
IMUL RDX,R14,0x118
LEA RAX,[RCX + RDX*0x1]
MOV qword ptr [RBP + -0xa40],RAX
MOV qword ptr [RBP + -0xa48],R13
MOV ESI,dword ptr [R15 + 0x740]
SUB R12D,ESI
MOV dword ptr [RBP + -0xa38],R12D
MOV dword ptr [RBP + -0xa34],ESI
MOV dword ptr [RBP + -0xa30],0x80000
MOV RSI,qword ptr [R15 + 0x118]
MOV RSI,qword ptr [RSI + R14*0x8]
MOV qword ptr [RBP + -0xa18],RSI
CMP byte ptr [RCX + RDX*0x1 + 0xa4],0x2
JNZ 0x0015a842
LEA RSI,[RBP + -0xa48]
LEA RCX,[RBP + -0xa18]
MOV RDI,RBX
MOV EDX,0xffffffff
CALL 0x0016b36e
MOV R12D,EAX
JMP 0x0015a866
LAB_0015a842:
MOV ECX,0x80000
OR ECX,dword ptr [RAX + 0xb4]
LEA RSI,[RBP + -0xa48]
LEA RDX,[RBP + -0xa18]
MOV RDI,RBX
CALL 0x00164614
MOV R12D,EAX
LAB_0015a866:
TEST R12B,R12B
JZ 0x0015a873
MOV RDI,R15
CALL 0x00137e16
LAB_0015a873:
MOV RAX,qword ptr [R15 + 0x118]
LEA RAX,[RAX + R14*0x8]
LEA RCX,[RBP + -0xa68]
MOV qword ptr [RCX],RAX
MOV RSI,qword ptr [RBP + -0xa18]
MOV qword ptr [RCX + 0x8],RSI
MOV dword ptr [RCX + 0x10],R14D
XOR EDX,EDX
CMP qword ptr [RAX],RSI
SETNZ DL
ADD EDX,0x17
MOV qword ptr [RSP],RCX
LEA R9,[RBP + -0xa28]
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0xa20]
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00159441
MOV R14D,EAX
CMP byte ptr [RBX + 0x67e],0x0
JZ 0x0015a8d5
MOV RDI,RBX
CALL 0x0015aa7e
LAB_0015a8d5:
TEST R14B,R14B
MOVZX EAX,R12B
MOV R14D,0x1
CMOVZ R14D,EAX
MOV RSI,qword ptr [RBP + -0xa28]
MOV RDI,RBX
CALL 0x001593c4
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RAX + 0x90],0x0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015a928
MOV EAX,R14D
ADD RSP,0xa48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015a928:
CALL 0x00129270
|
char _ma_apply_undo_key_delete
(long *param_1,int8 param_2,byte *param_3,int param_4,char param_5)
{
byte bVar1;
long lVar2;
uint uVar3;
char cVar4;
char cVar5;
char cVar6;
ulong uVar7;
long in_FS_OFFSET;
long *local_a70;
long local_a68;
uint local_a60;
int1 *local_a50;
long local_a48;
int local_a40;
int local_a3c;
int4 local_a38;
int8 local_a30;
int8 local_a28;
long local_a20;
int1 local_a18 [2528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = *param_1;
*(uint *)(lVar2 + 0x170) = *(uint *)(lVar2 + 0x170) | 0x1b1;
bVar1 = *param_3;
uVar7 = (ulong)bVar1;
uVar3 = (uint)(param_5 != '\0') * 5;
param_4 = ~uVar3 + param_4;
local_a28 = param_2;
__memcpy_chk(local_a18,param_3 + (ulong)uVar3 + 1,param_4,0x9d3);
local_a48 = *(long *)(lVar2 + 0x570) + uVar7 * 0x118;
local_a3c = *(int *)(lVar2 + 0x740);
local_a40 = param_4 - local_a3c;
local_a38 = 0x80000;
local_a20 = *(long *)(*(long *)(lVar2 + 0x118) + uVar7 * 8);
local_a50 = local_a18;
if (*(char *)(*(long *)(lVar2 + 0x570) + 0xa4 + uVar7 * 0x118) == '\x02') {
cVar4 = maria_rtree_insert_level(param_1,&local_a50,0xffffffff,&local_a20);
}
else {
cVar4 = _ma_ck_real_write_btree
(param_1,&local_a50,&local_a20,*(uint *)(local_a48 + 0xb4) | 0x80000);
}
if (cVar4 != '\0') {
_ma_mark_file_crashed(lVar2);
}
local_a70 = (long *)(*(long *)(lVar2 + 0x118) + uVar7 * 8);
local_a68 = local_a20;
local_a60 = (uint)bVar1;
cVar5 = _ma_write_clr(param_1,local_a28,(*local_a70 != local_a20) + '\x17',0,0,&local_a30,
&local_a70);
if (*(char *)((long)param_1 + 0x67e) != '\0') {
_ma_unlock_key_del(param_1);
}
cVar6 = '\x01';
if (cVar5 == '\0') {
cVar6 = cVar4;
}
_ma_unpin_all_pages(param_1,local_a30);
*(int8 *)(param_1[1] + 0x90) = 0;
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return cVar6;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
14,556
|
ma_init_alloc_root
|
eloqsql/libmariadb/libmariadb/ma_alloc.c
|
void ma_init_alloc_root(MA_MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size)
{
mem_root->free= mem_root->used= mem_root->pre_alloc= 0;
mem_root->min_malloc=32;
mem_root->block_size= (block_size-MALLOC_OVERHEAD-sizeof(MA_USED_MEM)+8);
mem_root->error_handler=0;
mem_root->block_num= 4;
mem_root->first_block_usage= 0;
#if !(defined(HAVE_purify) && defined(EXTRA_DEBUG))
if (pre_alloc_size)
{
if ((mem_root->free = mem_root->pre_alloc=
(MA_USED_MEM*) malloc(pre_alloc_size+ ALIGN_SIZE(sizeof(MA_USED_MEM)))))
{
mem_root->free->size=pre_alloc_size+ALIGN_SIZE(sizeof(MA_USED_MEM));
mem_root->free->left=pre_alloc_size;
mem_root->free->next=0;
}
}
#endif
}
|
O0
|
c
|
ma_init_alloc_root:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x20, 0x18(%rax)
movq -0x10(%rbp), %rcx
subq $0x8, %rcx
subq $0x18, %rcx
addq $0x8, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x24ad8
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x135b0
movq -0x8(%rbp), %rcx
movq %rax, 0x10(%rcx)
movq -0x8(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x24ad6
movq -0x18(%rbp), %rcx
addq $0x18, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq $0x0, (%rax)
jmp 0x24ad8
addq $0x20, %rsp
popq %rbp
retq
nop
|
ma_init_alloc_root:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
mov rax, [rbp+var_8]
mov qword ptr [rax], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+18h], 20h ; ' '
mov rcx, [rbp+var_10]
sub rcx, 8
sub rcx, 18h
add rcx, 8
mov rax, [rbp+var_8]
mov [rax+20h], rcx
mov rax, [rbp+var_8]
mov qword ptr [rax+30h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+28h], 4
mov rax, [rbp+var_8]
mov dword ptr [rax+2Ch], 0
cmp [rbp+var_18], 0
jz short loc_24AD8
mov rdi, [rbp+var_18]
add rdi, 18h
call _malloc
mov rcx, [rbp+var_8]
mov [rcx+10h], rax
mov rcx, [rbp+var_8]
mov [rcx], rax
cmp rax, 0
jz short loc_24AD6
mov rcx, [rbp+var_18]
add rcx, 18h
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rax+10h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rax+8], rcx
mov rax, [rbp+var_8]
mov rax, [rax]
mov qword ptr [rax], 0
loc_24AD6:
jmp short $+2
loc_24AD8:
add rsp, 20h
pop rbp
retn
|
long long ma_init_alloc_root(long long *a1, long long a2, long long a3)
{
long long result; // rax
a1[2] = 0LL;
a1[1] = 0LL;
*a1 = 0LL;
a1[3] = 32LL;
a1[4] = a2 - 32 + 8;
a1[6] = 0LL;
*((_DWORD *)a1 + 10) = 4;
result = (long long)a1;
*((_DWORD *)a1 + 11) = 0;
if ( a3 )
{
result = malloc(a3 + 24);
a1[2] = result;
*a1 = result;
if ( result )
{
*(_QWORD *)(*a1 + 16) = a3 + 24;
*(_QWORD *)(*a1 + 8) = a3;
result = *a1;
*(_QWORD *)*a1 = 0LL;
}
}
return result;
}
|
ma_init_alloc_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],0x20
MOV RCX,qword ptr [RBP + -0x10]
SUB RCX,0x8
SUB RCX,0x18
ADD RCX,0x8
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x28],0x4
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x2c],0x0
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00124ad8
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
CALL 0x001135b0
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RCX + 0x10],RAX
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x00124ad6
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x18
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],0x0
LAB_00124ad6:
JMP 0x00124ad8
LAB_00124ad8:
ADD RSP,0x20
POP RBP
RET
|
void ma_init_alloc_root(long *param_1,long param_2,long param_3)
{
void *pvVar1;
param_1[2] = 0;
param_1[1] = 0;
*param_1 = 0;
param_1[3] = 0x20;
param_1[4] = param_2 + -0x18;
param_1[6] = 0;
*(int4 *)(param_1 + 5) = 4;
*(int4 *)((long)param_1 + 0x2c) = 0;
if (param_3 != 0) {
pvVar1 = malloc(param_3 + 0x18);
param_1[2] = (long)pvVar1;
*param_1 = (long)pvVar1;
if (pvVar1 != (void *)0x0) {
*(long *)(*param_1 + 0x10) = param_3 + 0x18;
*(long *)(*param_1 + 8) = param_3;
*(int8 *)*param_1 = 0;
}
}
return;
}
|
|
14,557
|
testing::internal::GTestFlagSaver::GTestFlagSaver()
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-internal-inl.h
|
GTestFlagSaver() {
also_run_disabled_tests_ = GTEST_FLAG_GET(also_run_disabled_tests);
break_on_failure_ = GTEST_FLAG_GET(break_on_failure);
catch_exceptions_ = GTEST_FLAG_GET(catch_exceptions);
color_ = GTEST_FLAG_GET(color);
death_test_style_ = GTEST_FLAG_GET(death_test_style);
death_test_use_fork_ = GTEST_FLAG_GET(death_test_use_fork);
fail_fast_ = GTEST_FLAG_GET(fail_fast);
filter_ = GTEST_FLAG_GET(filter);
internal_run_death_test_ = GTEST_FLAG_GET(internal_run_death_test);
list_tests_ = GTEST_FLAG_GET(list_tests);
output_ = GTEST_FLAG_GET(output);
brief_ = GTEST_FLAG_GET(brief);
print_time_ = GTEST_FLAG_GET(print_time);
print_utf8_ = GTEST_FLAG_GET(print_utf8);
random_seed_ = GTEST_FLAG_GET(random_seed);
repeat_ = GTEST_FLAG_GET(repeat);
recreate_environments_when_repeating_ =
GTEST_FLAG_GET(recreate_environments_when_repeating);
shuffle_ = GTEST_FLAG_GET(shuffle);
stack_trace_depth_ = GTEST_FLAG_GET(stack_trace_depth);
stream_result_to_ = GTEST_FLAG_GET(stream_result_to);
throw_on_failure_ = GTEST_FLAG_GET(throw_on_failure);
}
|
O0
|
c
|
testing::internal::GTestFlagSaver::GTestFlagSaver():
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x30(%rsp)
addq $0x8, %rdi
movq %rdi, 0x38(%rsp)
callq 0x20ad0
movq 0x30(%rsp), %rdi
addq $0x28, %rdi
movq %rdi, 0x8(%rsp)
callq 0x20ad0
movq 0x30(%rsp), %rdi
addq $0x50, %rdi
movq %rdi, 0x10(%rsp)
callq 0x20ad0
movq 0x30(%rsp), %rdi
addq $0x70, %rdi
movq %rdi, 0x18(%rsp)
callq 0x20ad0
movq 0x30(%rsp), %rdi
addq $0x98, %rdi
movq %rdi, 0x20(%rsp)
callq 0x20ad0
movq 0x30(%rsp), %rdi
addq $0xd0, %rdi
movq %rdi, 0x28(%rsp)
callq 0x20ad0
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rdi
leaq 0x9157c(%rip), %rcx # 0x178b53
movb (%rcx), %cl
andb $0x1, %cl
movb %cl, (%rax)
leaq 0x9156f(%rip), %rcx # 0x178b54
movb (%rcx), %cl
andb $0x1, %cl
movb %cl, 0x1(%rax)
leaq 0x91561(%rip), %rcx # 0x178b55
movb (%rcx), %cl
andb $0x1, %cl
movb %cl, 0x2(%rax)
leaq 0x91555(%rip), %rsi # 0x178b58
callq 0x93e90
jmp 0xe760a
movq 0x30(%rsp), %rdi
addq $0x28, %rdi
leaq 0x914ae(%rip), %rsi # 0x178ac8
callq 0x93e90
jmp 0xe7621
movq 0x30(%rsp), %rdi
leaq 0x914bb(%rip), %rax # 0x178ae8
movb (%rax), %al
andb $0x1, %al
movb %al, 0x48(%rdi)
leaq 0x91517(%rip), %rax # 0x178b52
movb (%rax), %al
andb $0x1, %al
movb %al, 0x49(%rdi)
addq $0x50, %rdi
leaq 0x9152b(%rip), %rsi # 0x178b78
callq 0x93e90
jmp 0xe7654
movq 0x30(%rsp), %rdi
addq $0x70, %rdi
leaq 0x9148c(%rip), %rsi # 0x178af0
callq 0x93e90
jmp 0xe766b
movq 0x30(%rsp), %rdi
leaq 0x91522(%rip), %rax # 0x178b99
movb (%rax), %al
andb $0x1, %al
movb %al, 0x90(%rdi)
addq $0x98, %rdi
leaq 0x91511(%rip), %rsi # 0x178ba0
callq 0x93e90
jmp 0xe7696
movq 0x30(%rsp), %rdi
leaq 0x9151e(%rip), %rax # 0x178bc0
movb (%rax), %al
andb $0x1, %al
movb %al, 0xb8(%rdi)
leaq 0x9150e(%rip), %rax # 0x178bc1
movb (%rax), %al
andb $0x1, %al
movb %al, 0xb9(%rdi)
leaq 0x9148c(%rip), %rax # 0x178b50
movb (%rax), %al
andb $0x1, %al
movb %al, 0xba(%rdi)
leaq 0x914ef(%rip), %rax # 0x178bc4
movl (%rax), %eax
movl %eax, 0xbc(%rdi)
leaq 0x914e4(%rip), %rax # 0x178bc8
movl (%rax), %eax
movl %eax, 0xc0(%rdi)
leaq 0x914d9(%rip), %rax # 0x178bcc
movb (%rax), %al
andb $0x1, %al
movb %al, 0xc4(%rdi)
leaq 0x914ca(%rip), %rax # 0x178bce
movb (%rax), %al
andb $0x1, %al
movb %al, 0xc5(%rdi)
leaq 0x914bb(%rip), %rax # 0x178bd0
movl (%rax), %eax
movl %eax, 0xc8(%rdi)
addq $0xd0, %rdi
leaq 0x914ad(%rip), %rsi # 0x178bd8
callq 0x93e90
jmp 0xe7732
movq 0x30(%rsp), %rax
leaq 0x914ba(%rip), %rcx # 0x178bf8
movb (%rcx), %cl
andb $0x1, %cl
movb %cl, 0xf0(%rax)
addq $0x58, %rsp
retq
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
callq 0x1aac0
movq 0x20(%rsp), %rdi
callq 0x1aac0
movq 0x18(%rsp), %rdi
callq 0x1aac0
movq 0x10(%rsp), %rdi
callq 0x1aac0
movq 0x8(%rsp), %rdi
callq 0x1aac0
movq 0x38(%rsp), %rdi
callq 0x1aac0
movq 0x48(%rsp), %rdi
callq 0x14c80
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN7testing8internal14GTestFlagSaverC2Ev:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov rdi, [rsp+58h+var_8]
mov [rsp+58h+var_28], rdi
add rdi, 8
mov [rsp+58h+var_20], rdi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void)
mov rdi, [rsp+58h+var_28]
add rdi, 28h ; '('
mov [rsp+58h+var_50], rdi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void)
mov rdi, [rsp+58h+var_28]
add rdi, 50h ; 'P'
mov [rsp+58h+var_48], rdi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void)
mov rdi, [rsp+58h+var_28]
add rdi, 70h ; 'p'
mov [rsp+58h+var_40], rdi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void)
mov rdi, [rsp+58h+var_28]
add rdi, 98h
mov [rsp+58h+var_38], rdi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void)
mov rdi, [rsp+58h+var_28]
add rdi, 0D0h
mov [rsp+58h+var_30], rdi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void)
mov rax, [rsp+58h+var_28]
mov rdi, [rsp+58h+var_20]
lea rcx, _ZN7testing35FLAGS_gtest_also_run_disabled_testsE; testing::FLAGS_gtest_also_run_disabled_tests
mov cl, [rcx]
and cl, 1
mov [rax], cl
lea rcx, _ZN7testing28FLAGS_gtest_break_on_failureE; testing::FLAGS_gtest_break_on_failure
mov cl, [rcx]
and cl, 1
mov [rax+1], cl
lea rcx, _ZN7testing28FLAGS_gtest_catch_exceptionsE; testing::FLAGS_gtest_catch_exceptions
mov cl, [rcx]
and cl, 1
mov [rax+2], cl
lea rsi, _ZN7testing17FLAGS_gtest_colorB5cxx11E; testing::FLAGS_gtest_color
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_E760A:
mov rdi, [rsp+58h+var_28]
add rdi, 28h ; '('
lea rsi, _ZN7testing28FLAGS_gtest_death_test_styleB5cxx11E; testing::FLAGS_gtest_death_test_style
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_E7621:
mov rdi, [rsp+58h+var_28]
lea rax, _ZN7testing31FLAGS_gtest_death_test_use_forkE; testing::FLAGS_gtest_death_test_use_fork
mov al, [rax]
and al, 1
mov [rdi+48h], al
lea rax, _ZN7testing21FLAGS_gtest_fail_fastE; testing::FLAGS_gtest_fail_fast
mov al, [rax]
and al, 1
mov [rdi+49h], al
add rdi, 50h ; 'P'
lea rsi, _ZN7testing18FLAGS_gtest_filterB5cxx11E; testing::FLAGS_gtest_filter
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_E7654:
mov rdi, [rsp+58h+var_28]
add rdi, 70h ; 'p'
lea rsi, _ZN7testing35FLAGS_gtest_internal_run_death_testB5cxx11E; testing::FLAGS_gtest_internal_run_death_test
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_E766B:
mov rdi, [rsp+58h+var_28]
lea rax, _ZN7testing22FLAGS_gtest_list_testsE; testing::FLAGS_gtest_list_tests
mov al, [rax]
and al, 1
mov [rdi+90h], al
add rdi, 98h
lea rsi, _ZN7testing18FLAGS_gtest_outputB5cxx11E; testing::FLAGS_gtest_output
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_E7696:
mov rdi, [rsp+58h+var_28]
lea rax, _ZN7testing17FLAGS_gtest_briefE; testing::FLAGS_gtest_brief
mov al, [rax]
and al, 1
mov [rdi+0B8h], al
lea rax, _ZN7testing22FLAGS_gtest_print_timeE; testing::FLAGS_gtest_print_time
mov al, [rax]
and al, 1
mov [rdi+0B9h], al
lea rax, _ZN7testing22FLAGS_gtest_print_utf8E; testing::FLAGS_gtest_print_utf8
mov al, [rax]
and al, 1
mov [rdi+0BAh], al
lea rax, _ZN7testing23FLAGS_gtest_random_seedE; testing::FLAGS_gtest_random_seed
mov eax, [rax]
mov [rdi+0BCh], eax
lea rax, _ZN7testing18FLAGS_gtest_repeatE; testing::FLAGS_gtest_repeat
mov eax, [rax]
mov [rdi+0C0h], eax
lea rax, _ZN7testing48FLAGS_gtest_recreate_environments_when_repeatingE; testing::FLAGS_gtest_recreate_environments_when_repeating
mov al, [rax]
and al, 1
mov [rdi+0C4h], al
lea rax, _ZN7testing19FLAGS_gtest_shuffleE; testing::FLAGS_gtest_shuffle
mov al, [rax]
and al, 1
mov [rdi+0C5h], al
lea rax, _ZN7testing29FLAGS_gtest_stack_trace_depthE; testing::FLAGS_gtest_stack_trace_depth
mov eax, [rax]
mov [rdi+0C8h], eax
add rdi, 0D0h
lea rsi, _ZN7testing28FLAGS_gtest_stream_result_toB5cxx11E; testing::FLAGS_gtest_stream_result_to
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_E7732:
mov rax, [rsp+58h+var_28]
lea rcx, _ZN7testing28FLAGS_gtest_throw_on_failureE; testing::FLAGS_gtest_throw_on_failure
mov cl, [rcx]
and cl, 1
mov [rax+0F0h], cl
add rsp, 58h
retn
mov rdi, [rsp+arg_20]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+arg_10]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+arg_40]
call __Unwind_Resume
|
testing::internal::GTestFlagSaver * testing::internal::GTestFlagSaver::GTestFlagSaver(
testing::internal::GTestFlagSaver *this)
{
testing::internal::GTestFlagSaver *result; // rax
std::string::basic_string((_QWORD *)this + 1);
std::string::basic_string((_QWORD *)this + 5);
std::string::basic_string((_QWORD *)this + 10);
std::string::basic_string((_QWORD *)this + 14);
std::string::basic_string((_QWORD *)this + 19);
std::string::basic_string((_QWORD *)this + 26);
*(_BYTE *)this = testing::FLAGS_gtest_also_run_disabled_tests & 1;
*((_BYTE *)this + 1) = testing::FLAGS_gtest_break_on_failure & 1;
*((_BYTE *)this + 2) = testing::FLAGS_gtest_catch_exceptions & 1;
std::string::operator=((long long)this + 8, (long long)&testing::FLAGS_gtest_color[abi:cxx11]);
std::string::operator=((long long)this + 40, (long long)&testing::FLAGS_gtest_death_test_style[abi:cxx11]);
*((_BYTE *)this + 72) = testing::FLAGS_gtest_death_test_use_fork & 1;
*((_BYTE *)this + 73) = testing::FLAGS_gtest_fail_fast & 1;
std::string::operator=((long long)this + 80, (long long)&testing::FLAGS_gtest_filter[abi:cxx11]);
std::string::operator=((long long)this + 112, (long long)&testing::FLAGS_gtest_internal_run_death_test[abi:cxx11]);
*((_BYTE *)this + 144) = testing::FLAGS_gtest_list_tests & 1;
std::string::operator=((long long)this + 152, (long long)&testing::FLAGS_gtest_output[abi:cxx11]);
*((_BYTE *)this + 184) = testing::FLAGS_gtest_brief & 1;
*((_BYTE *)this + 185) = testing::FLAGS_gtest_print_time & 1;
*((_BYTE *)this + 186) = testing::FLAGS_gtest_print_utf8 & 1;
*((_DWORD *)this + 47) = testing::FLAGS_gtest_random_seed;
*((_DWORD *)this + 48) = testing::FLAGS_gtest_repeat;
*((_BYTE *)this + 196) = testing::FLAGS_gtest_recreate_environments_when_repeating & 1;
*((_BYTE *)this + 197) = testing::FLAGS_gtest_shuffle & 1;
*((_DWORD *)this + 50) = testing::FLAGS_gtest_stack_trace_depth;
std::string::operator=((long long)this + 208, (long long)&testing::FLAGS_gtest_stream_result_to[abi:cxx11]);
result = this;
*((_BYTE *)this + 240) = testing::FLAGS_gtest_throw_on_failure & 1;
return result;
}
|
GTestFlagSaver:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV RDI,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x30],RDI
ADD RDI,0x8
MOV qword ptr [RSP + 0x38],RDI
CALL 0x00120ad0
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x28
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00120ad0
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x50
MOV qword ptr [RSP + 0x10],RDI
CALL 0x00120ad0
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x70
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00120ad0
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x98
MOV qword ptr [RSP + 0x20],RDI
CALL 0x00120ad0
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0xd0
MOV qword ptr [RSP + 0x28],RDI
CALL 0x00120ad0
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RSP + 0x38]
LEA RCX,[0x278b53]
MOV CL,byte ptr [RCX]
AND CL,0x1
MOV byte ptr [RAX],CL
LEA RCX,[0x278b54]
MOV CL,byte ptr [RCX]
AND CL,0x1
MOV byte ptr [RAX + 0x1],CL
LEA RCX,[0x278b55]
MOV CL,byte ptr [RCX]
AND CL,0x1
MOV byte ptr [RAX + 0x2],CL
LAB_001e75fc:
LEA RSI,[0x278b58]
CALL 0x00193e90
JMP 0x001e760a
LAB_001e760a:
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x28
LEA RSI,[0x278ac8]
CALL 0x00193e90
JMP 0x001e7621
LAB_001e7621:
MOV RDI,qword ptr [RSP + 0x30]
LEA RAX,[0x278ae8]
MOV AL,byte ptr [RAX]
AND AL,0x1
MOV byte ptr [RDI + 0x48],AL
LEA RAX,[0x278b52]
MOV AL,byte ptr [RAX]
AND AL,0x1
MOV byte ptr [RDI + 0x49],AL
ADD RDI,0x50
LEA RSI,[0x278b78]
CALL 0x00193e90
JMP 0x001e7654
LAB_001e7654:
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x70
LEA RSI,[0x278af0]
CALL 0x00193e90
JMP 0x001e766b
LAB_001e766b:
MOV RDI,qword ptr [RSP + 0x30]
LEA RAX,[0x278b99]
MOV AL,byte ptr [RAX]
AND AL,0x1
MOV byte ptr [RDI + 0x90],AL
ADD RDI,0x98
LEA RSI,[0x278ba0]
CALL 0x00193e90
JMP 0x001e7696
LAB_001e7696:
MOV RDI,qword ptr [RSP + 0x30]
LEA RAX,[0x278bc0]
MOV AL,byte ptr [RAX]
AND AL,0x1
MOV byte ptr [RDI + 0xb8],AL
LEA RAX,[0x278bc1]
MOV AL,byte ptr [RAX]
AND AL,0x1
MOV byte ptr [RDI + 0xb9],AL
LEA RAX,[0x278b50]
MOV AL,byte ptr [RAX]
AND AL,0x1
MOV byte ptr [RDI + 0xba],AL
LEA RAX,[0x278bc4]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RDI + 0xbc],EAX
LEA RAX,[0x278bc8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RDI + 0xc0],EAX
LEA RAX,[0x278bcc]
MOV AL,byte ptr [RAX]
AND AL,0x1
MOV byte ptr [RDI + 0xc4],AL
LEA RAX,[0x278bce]
MOV AL,byte ptr [RAX]
AND AL,0x1
MOV byte ptr [RDI + 0xc5],AL
LEA RAX,[0x278bd0]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RDI + 0xc8],EAX
ADD RDI,0xd0
LEA RSI,[0x278bd8]
CALL 0x00193e90
LAB_001e7730:
JMP 0x001e7732
LAB_001e7732:
MOV RAX,qword ptr [RSP + 0x30]
LEA RCX,[0x278bf8]
MOV CL,byte ptr [RCX]
AND CL,0x1
MOV byte ptr [RAX + 0xf0],CL
ADD RSP,0x58
RET
|
/* testing::internal::GTestFlagSaver::GTestFlagSaver() */
void __thiscall testing::internal::GTestFlagSaver::GTestFlagSaver(GTestFlagSaver *this)
{
std::__cxx11::string::string((string *)(this + 8));
std::__cxx11::string::string((string *)(this + 0x28));
std::__cxx11::string::string((string *)(this + 0x50));
std::__cxx11::string::string((string *)(this + 0x70));
std::__cxx11::string::string((string *)(this + 0x98));
std::__cxx11::string::string((string *)(this + 0xd0));
*this = (GTestFlagSaver)(FLAGS_gtest_also_run_disabled_tests & 1);
this[1] = (GTestFlagSaver)(FLAGS_gtest_break_on_failure & 1);
this[2] = (GTestFlagSaver)(FLAGS_gtest_catch_exceptions & 1);
/* try { // try from 001e75fc to 001e772f has its CatchHandler @ 001e774e */
std::__cxx11::string::operator=((string *)(this + 8),(string *)FLAGS_gtest_color_abi_cxx11_);
std::__cxx11::string::operator=
((string *)(this + 0x28),(string *)FLAGS_gtest_death_test_style_abi_cxx11_);
this[0x48] = (GTestFlagSaver)(FLAGS_gtest_death_test_use_fork & 1);
this[0x49] = (GTestFlagSaver)(FLAGS_gtest_fail_fast & 1);
std::__cxx11::string::operator=((string *)(this + 0x50),(string *)FLAGS_gtest_filter_abi_cxx11_);
std::__cxx11::string::operator=
((string *)(this + 0x70),(string *)FLAGS_gtest_internal_run_death_test_abi_cxx11_);
this[0x90] = (GTestFlagSaver)(FLAGS_gtest_list_tests & 1);
std::__cxx11::string::operator=((string *)(this + 0x98),(string *)FLAGS_gtest_output_abi_cxx11_);
this[0xb8] = (GTestFlagSaver)(FLAGS_gtest_brief & 1);
this[0xb9] = (GTestFlagSaver)(FLAGS_gtest_print_time & 1);
this[0xba] = (GTestFlagSaver)(FLAGS_gtest_print_utf8 & 1);
*(int4 *)(this + 0xbc) = FLAGS_gtest_random_seed;
*(int4 *)(this + 0xc0) = FLAGS_gtest_repeat;
this[0xc4] = (GTestFlagSaver)(FLAGS_gtest_recreate_environments_when_repeating & 1);
this[0xc5] = (GTestFlagSaver)(FLAGS_gtest_shuffle & 1);
*(int4 *)(this + 200) = FLAGS_gtest_stack_trace_depth;
std::__cxx11::string::operator=
((string *)(this + 0xd0),(string *)FLAGS_gtest_stream_result_to_abi_cxx11_);
this[0xf0] = (GTestFlagSaver)(FLAGS_gtest_throw_on_failure & 1);
return;
}
|
|
14,558
|
allocate_tail
|
eloqsql/storage/maria/ma_bitmap.c
|
static my_bool allocate_tail(MARIA_FILE_BITMAP *bitmap, uint size,
MARIA_BITMAP_BLOCK *block)
{
uint min_bits= size_to_tail_pattern(bitmap, size);
uchar *data, *end, *best_data= 0;
my_bool first_found= 1;
uint best_bits= (uint) -1, UNINIT_VAR(best_pos);
DBUG_ENTER("allocate_tail");
DBUG_PRINT("enter", ("size: %u", size));
data= bitmap->map + (bitmap->full_tail_size/6)*6;
end= bitmap->map + bitmap->used_size;
/*
We have to add DIR_ENTRY_SIZE here as this is not part of the data size
See call to allocate_tail() in find_tail().
*/
DBUG_ASSERT(size <= MAX_TAIL_SIZE(bitmap->block_size) + DIR_ENTRY_SIZE);
for (; data < end; data += 6)
{
ulonglong bits= uint6korr(data); /* 6 bytes = 6*8/3= 16 patterns */
uint i;
/*
Skip common patterns
We can skip empty pages (if we already found a match) or
the following patterns: 1-4 (head pages, not suitable for tail) or
7 (full tail page). See 'Dynamic size records' comment at start of file.
At the moment we only skip full head and tail pages (ie, all bits are
set) as this is easy to detect with one simple test and is a
quite common case if we have blobs.
*/
if ((!bits && best_data) || bits == 0xffffffffffffLL ||
bits == 04444444444444444LL)
continue;
for (i= 0; i < 16; i++, bits >>= 3)
{
uint pattern= (uint) (bits & 7);
if (pattern == 0 ||
(pattern > FULL_HEAD_PAGE && pattern < FULL_TAIL_PAGE))
{
/* There is room for tail data */
if (first_found)
{
first_found= 0;
bitmap->full_tail_size= (uint)(data - bitmap->map);
}
}
if (pattern <= min_bits && (!pattern || pattern > FULL_HEAD_PAGE))
{
if ((int) pattern > (int) best_bits)
{
best_bits= pattern;
best_data= data;
best_pos= i;
if (pattern == min_bits)
goto found; /* Can't be better */
}
}
}
}
if (!best_data)
{
if (data >= bitmap->map + bitmap->total_size)
DBUG_RETURN(1);
DBUG_ASSERT(uint6korr(data) == 0);
/* Allocate data at end of bitmap */
best_data= data;
bitmap->used_size= (uint) (data - bitmap->map) + 6;
DBUG_ASSERT(bitmap->used_size <= bitmap->total_size);
best_pos= best_bits= 0;
}
found:
fill_block(bitmap, block, best_data, best_pos, best_bits, FULL_TAIL_PAGE);
DBUG_RETURN(0);
}
|
O0
|
c
|
allocate_tail:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3ef80
movl %eax, -0x24(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x1, -0x41(%rbp)
movl $0xffffffff, -0x48(%rbp) # imm = 0xFFFFFFFF
movl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x3ed8d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movl $0x6, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
movq -0x68(%rbp), %rax
imull $0x6, %ecx, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x24(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x3edd3
jmp 0x3edd5
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x3eee5
movq -0x30(%rbp), %rdi
callq 0x3c150
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x3edfe
cmpq $0x0, -0x40(%rbp)
jne 0x3ee1e
movabsq $0xffffffffffff, %rax # imm = 0xFFFFFFFFFFFF
cmpq %rax, -0x58(%rbp)
je 0x3ee1e
movabsq $0x924924924924, %rax # imm = 0x924924924924
cmpq %rax, -0x58(%rbp)
jne 0x3ee23
jmp 0x3eed4
movl $0x0, -0x5c(%rbp)
cmpl $0x10, -0x5c(%rbp)
jae 0x3eed2
movq -0x58(%rbp), %rax
andq $0x7, %rax
movl %eax, -0x60(%rbp)
cmpl $0x0, -0x60(%rbp)
je 0x3ee51
cmpl $0x4, -0x60(%rbp)
jbe 0x3ee75
cmpl $0x7, -0x60(%rbp)
jae 0x3ee75
cmpb $0x0, -0x41(%rbp)
je 0x3ee73
movb $0x0, -0x41(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c(%rax)
jmp 0x3ee75
movl -0x60(%rbp), %eax
cmpl -0x24(%rbp), %eax
ja 0x3eeb6
cmpl $0x0, -0x60(%rbp)
je 0x3ee89
cmpl $0x4, -0x60(%rbp)
jbe 0x3eeb6
movl -0x60(%rbp), %eax
cmpl -0x48(%rbp), %eax
jle 0x3eeb4
movl -0x60(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x60(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0x3eeb2
jmp 0x3ef4b
jmp 0x3eeb4
jmp 0x3eeb6
jmp 0x3eeb8
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movq -0x58(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x3ee2a
jmp 0x3eed4
movq -0x30(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x30(%rbp)
jmp 0x3edd5
cmpq $0x0, -0x40(%rbp)
jne 0x3ef49
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
movl 0x128(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jb 0x3ef12
jmp 0x3ef0c
movb $0x1, -0x1(%rbp)
jmp 0x3ef6d
jmp 0x3ef14
jmp 0x3ef16
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
addl $0x6, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x3ef3b
movl $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
jmp 0x3ef4b
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
movl -0x4c(%rbp), %ecx
movl -0x48(%rbp), %r8d
movl $0x7, %r9d
callq 0x3e3f0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
allocate_tail:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call size_to_tail_pattern
mov [rbp+var_24], eax
mov [rbp+var_40], 0
mov [rbp+var_41], 1
mov [rbp+var_48], 0FFFFFFFFh
mov eax, [rbp+var_4C]
mov [rbp+var_4C], eax
jmp short $+2
loc_3ED8D:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_68], rax
mov rax, [rbp+var_10]
mov eax, [rax+2Ch]
mov ecx, 6
xor edx, edx
div ecx
mov ecx, eax
mov rax, [rbp+var_68]
imul ecx, 6
mov ecx, ecx
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov ecx, [rcx+24h]
add rax, rcx
mov [rbp+var_38], rax
jmp short $+2
loc_3EDD3:
jmp short $+2
loc_3EDD5:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_3EEE5
mov rdi, [rbp+var_30]
call uint6korr_0
mov [rbp+var_58], rax
cmp [rbp+var_58], 0
jnz short loc_3EDFE
cmp [rbp+var_40], 0
jnz short loc_3EE1E
loc_3EDFE:
mov rax, 0FFFFFFFFFFFFh
cmp [rbp+var_58], rax
jz short loc_3EE1E
mov rax, 924924924924h
cmp [rbp+var_58], rax
jnz short loc_3EE23
loc_3EE1E:
jmp loc_3EED4
loc_3EE23:
mov [rbp+var_5C], 0
loc_3EE2A:
cmp [rbp+var_5C], 10h
jnb loc_3EED2
mov rax, [rbp+var_58]
and rax, 7
mov [rbp+var_60], eax
cmp [rbp+var_60], 0
jz short loc_3EE51
cmp [rbp+var_60], 4
jbe short loc_3EE75
cmp [rbp+var_60], 7
jnb short loc_3EE75
loc_3EE51:
cmp [rbp+var_41], 0
jz short loc_3EE73
mov [rbp+var_41], 0
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+2Ch], ecx
loc_3EE73:
jmp short $+2
loc_3EE75:
mov eax, [rbp+var_60]
cmp eax, [rbp+var_24]
ja short loc_3EEB6
cmp [rbp+var_60], 0
jz short loc_3EE89
cmp [rbp+var_60], 4
jbe short loc_3EEB6
loc_3EE89:
mov eax, [rbp+var_60]
cmp eax, [rbp+var_48]
jle short loc_3EEB4
mov eax, [rbp+var_60]
mov [rbp+var_48], eax
mov rax, [rbp+var_30]
mov [rbp+var_40], rax
mov eax, [rbp+var_5C]
mov [rbp+var_4C], eax
mov eax, [rbp+var_60]
cmp eax, [rbp+var_24]
jnz short loc_3EEB2
jmp loc_3EF4B
loc_3EEB2:
jmp short $+2
loc_3EEB4:
jmp short $+2
loc_3EEB6:
jmp short $+2
loc_3EEB8:
mov eax, [rbp+var_5C]
add eax, 1
mov [rbp+var_5C], eax
mov rax, [rbp+var_58]
shr rax, 3
mov [rbp+var_58], rax
jmp loc_3EE2A
loc_3EED2:
jmp short $+2
loc_3EED4:
mov rax, [rbp+var_30]
add rax, 6
mov [rbp+var_30], rax
jmp loc_3EDD5
loc_3EEE5:
cmp [rbp+var_40], 0
jnz short loc_3EF49
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
mov rdx, [rbp+var_10]
mov edx, [rdx+128h]
add rcx, rdx
cmp rax, rcx
jb short loc_3EF12
jmp short $+2
loc_3EF0C:
mov [rbp+var_1], 1
jmp short loc_3EF6D
loc_3EF12:
jmp short $+2
loc_3EF14:
jmp short $+2
loc_3EF16:
mov rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rax, rcx
mov ecx, eax
add ecx, 6
mov rax, [rbp+var_10]
mov [rax+24h], ecx
jmp short $+2
loc_3EF3B:
mov [rbp+var_48], 0
mov [rbp+var_4C], 0
loc_3EF49:
jmp short $+2
loc_3EF4B:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_40]
mov ecx, [rbp+var_4C]
mov r8d, [rbp+var_48]
mov r9d, 7
call fill_block
mov [rbp+var_1], 0
loc_3EF6D:
mov al, [rbp+var_1]
add rsp, 70h
pop rbp
retn
|
char allocate_tail(long long a1, unsigned int a2, long long a3)
{
unsigned int v4; // [rsp+10h] [rbp-60h]
unsigned int i; // [rsp+14h] [rbp-5Ch]
unsigned long long v6; // [rsp+18h] [rbp-58h]
int v7; // [rsp+24h] [rbp-4Ch]
signed int v8; // [rsp+28h] [rbp-48h]
char v9; // [rsp+2Fh] [rbp-41h]
long long v10; // [rsp+30h] [rbp-40h]
unsigned long long v11; // [rsp+38h] [rbp-38h]
unsigned int *v12; // [rsp+40h] [rbp-30h]
unsigned int v13; // [rsp+4Ch] [rbp-24h]
v13 = size_to_tail_pattern(a1, a2);
v10 = 0LL;
v9 = 1;
v8 = -1;
v12 = (unsigned int *)(6 * (*(_DWORD *)(a1 + 44) / 6u) + *(_QWORD *)(a1 + 8));
v11 = *(unsigned int *)(a1 + 36) + *(_QWORD *)(a1 + 8);
while ( (unsigned long long)v12 < v11 )
{
v6 = uint6korr_0(v12);
if ( (v6 || !v10) && v6 != 0xFFFFFFFFFFFFLL && v6 != 0x924924924924LL )
{
for ( i = 0; i < 0x10; ++i )
{
v4 = v6 & 7;
if ( ((v6 & 7) == 0 || v4 > 4 && v4 < 7) && v9 )
{
v9 = 0;
*(_DWORD *)(a1 + 44) = (_DWORD)v12 - *(_QWORD *)(a1 + 8);
}
if ( v4 <= v13 && ((v6 & 7) == 0 || v4 > 4) && (int)v4 > v8 )
{
v8 = v6 & 7;
v10 = (long long)v12;
v7 = i;
if ( v4 == v13 )
goto LABEL_26;
}
v6 >>= 3;
}
}
v12 = (unsigned int *)((char *)v12 + 6);
}
if ( v10 )
goto LABEL_26;
if ( (unsigned long long)v12 < (unsigned long long)*(unsigned int *)(a1 + 296) + *(_QWORD *)(a1 + 8) )
{
v10 = (long long)v12;
*(_DWORD *)(a1 + 36) = (_DWORD)v12 - *(_QWORD *)(a1 + 8) + 6;
v8 = 0;
v7 = 0;
LABEL_26:
fill_block(a1, a3, v10, v7, v8, 7);
return 0;
}
return 1;
}
|
allocate_tail:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x0013ef80
MOV dword ptr [RBP + -0x24],EAX
MOV qword ptr [RBP + -0x40],0x0
MOV byte ptr [RBP + -0x41],0x1
MOV dword ptr [RBP + -0x48],0xffffffff
MOV EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x0013ed8d
LAB_0013ed8d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x2c]
MOV ECX,0x6
XOR EDX,EDX
DIV ECX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x68]
IMUL ECX,ECX,0x6
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x24]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0013edd3
LAB_0013edd3:
JMP 0x0013edd5
LAB_0013edd5:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0013eee5
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0013c150
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x58],0x0
JNZ 0x0013edfe
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x0013ee1e
LAB_0013edfe:
MOV RAX,0xffffffffffff
CMP qword ptr [RBP + -0x58],RAX
JZ 0x0013ee1e
MOV RAX,0x924924924924
CMP qword ptr [RBP + -0x58],RAX
JNZ 0x0013ee23
LAB_0013ee1e:
JMP 0x0013eed4
LAB_0013ee23:
MOV dword ptr [RBP + -0x5c],0x0
LAB_0013ee2a:
CMP dword ptr [RBP + -0x5c],0x10
JNC 0x0013eed2
MOV RAX,qword ptr [RBP + -0x58]
AND RAX,0x7
MOV dword ptr [RBP + -0x60],EAX
CMP dword ptr [RBP + -0x60],0x0
JZ 0x0013ee51
CMP dword ptr [RBP + -0x60],0x4
JBE 0x0013ee75
CMP dword ptr [RBP + -0x60],0x7
JNC 0x0013ee75
LAB_0013ee51:
CMP byte ptr [RBP + -0x41],0x0
JZ 0x0013ee73
MOV byte ptr [RBP + -0x41],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x2c],ECX
LAB_0013ee73:
JMP 0x0013ee75
LAB_0013ee75:
MOV EAX,dword ptr [RBP + -0x60]
CMP EAX,dword ptr [RBP + -0x24]
JA 0x0013eeb6
CMP dword ptr [RBP + -0x60],0x0
JZ 0x0013ee89
CMP dword ptr [RBP + -0x60],0x4
JBE 0x0013eeb6
LAB_0013ee89:
MOV EAX,dword ptr [RBP + -0x60]
CMP EAX,dword ptr [RBP + -0x48]
JLE 0x0013eeb4
MOV EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x48],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + -0x5c]
MOV dword ptr [RBP + -0x4c],EAX
MOV EAX,dword ptr [RBP + -0x60]
CMP EAX,dword ptr [RBP + -0x24]
JNZ 0x0013eeb2
JMP 0x0013ef4b
LAB_0013eeb2:
JMP 0x0013eeb4
LAB_0013eeb4:
JMP 0x0013eeb6
LAB_0013eeb6:
JMP 0x0013eeb8
LAB_0013eeb8:
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x58]
SHR RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0013ee2a
LAB_0013eed2:
JMP 0x0013eed4
LAB_0013eed4:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x6
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0013edd5
LAB_0013eee5:
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x0013ef49
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RDX + 0x128]
ADD RCX,RDX
CMP RAX,RCX
JC 0x0013ef12
JMP 0x0013ef0c
LAB_0013ef0c:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0013ef6d
LAB_0013ef12:
JMP 0x0013ef14
LAB_0013ef14:
JMP 0x0013ef16
LAB_0013ef16:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,RCX
MOV ECX,EAX
ADD ECX,0x6
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x0013ef3b
LAB_0013ef3b:
MOV dword ptr [RBP + -0x48],0x0
MOV dword ptr [RBP + -0x4c],0x0
LAB_0013ef49:
JMP 0x0013ef4b
LAB_0013ef4b:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x4c]
MOV R8D,dword ptr [RBP + -0x48]
MOV R9D,0x7
CALL 0x0013e3f0
MOV byte ptr [RBP + -0x1],0x0
LAB_0013ef6d:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x70
POP RBP
RET
|
int1 allocate_tail(long param_1,int4 param_2,int8 param_3)
{
uint uVar1;
long lVar2;
bool bVar3;
uint uVar4;
uint uVar5;
uint local_64;
ulong local_60;
uint local_54;
uint local_50;
ulong local_48;
ulong local_38;
uVar4 = size_to_tail_pattern(param_1,param_2);
local_48 = 0;
bVar3 = true;
local_50 = 0xffffffff;
lVar2 = *(long *)(param_1 + 8);
uVar1 = *(uint *)(param_1 + 0x24);
for (local_38 = *(long *)(param_1 + 8) + (ulong)((*(uint *)(param_1 + 0x2c) / 6) * 6);
local_38 < lVar2 + (ulong)uVar1; local_38 = local_38 + 6) {
local_60 = uint6korr(local_38);
if ((((local_60 != 0) || (local_48 == 0)) && (local_60 != 0xffffffffffff)) &&
(local_60 != 0x924924924924)) {
for (local_64 = 0; local_64 < 0x10; local_64 = local_64 + 1) {
uVar5 = (uint)local_60 & 7;
if ((((local_60 & 7) == 0) || ((4 < uVar5 && (uVar5 < 7)))) && (bVar3)) {
bVar3 = false;
*(int *)(param_1 + 0x2c) = (int)local_38 - (int)*(int8 *)(param_1 + 8);
}
if (((uVar5 <= uVar4) && (((local_60 & 7) == 0 || (4 < uVar5)))) &&
((int)local_50 < (int)uVar5)) {
local_48 = local_38;
local_54 = local_64;
local_50 = uVar5;
if (uVar5 == uVar4) goto LAB_0013ef4b;
}
local_60 = local_60 >> 3;
}
}
}
if (local_48 == 0) {
if (*(long *)(param_1 + 8) + (ulong)*(uint *)(param_1 + 0x128) <= local_38) {
return 1;
}
local_48 = local_38;
*(int *)(param_1 + 0x24) = ((int)local_38 - (int)*(int8 *)(param_1 + 8)) + 6;
local_50 = 0;
local_54 = 0;
}
LAB_0013ef4b:
fill_block(param_1,param_3,local_48,local_54,local_50,7);
return 0;
}
|
|
14,559
|
format_json_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/examples/llama-bench/llama-bench.cpp
|
static std::string format_json_value(const std::string & field, const std::string & value) {
switch (test::get_field_type(field)) {
case test::STRING:
return "\"" + escape_json(value) + "\"";
case test::BOOL:
return value == "0" ? "false" : "true";
default:
return value;
}
}
|
O2
|
cpp
|
format_json_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3a38e
cmpl $0x1, %eax
je 0x28f58
testl %eax, %eax
jne 0x28f8a
movq %rbx, 0x8(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%r14), %rbp
movq 0x8(%r14), %r15
leaq 0x728e5(%rip), %r13 # 0x9b7cd
leaq 0x10(%rsp), %r14
leaq 0x50(%rsp), %r12
xorl %ebx, %ebx
cmpq %rbx, %r15
je 0x28f97
movzbl (%rbp,%rbx), %eax
movq %r13, %rsi
cmpl $0x5c, %eax
je 0x28f16
cmpl $0x22, %eax
jne 0x28f23
leaq 0x7bc11(%rip), %rsi # 0xa4b27
movq %r14, %rdi
callq 0x22ed0
incq %rbx
jmp 0x28ef4
movsbl %al, %ecx
cmpb $0x1f, %cl
jg 0x28f4c
movq %r12, %rdi
pushq $0x8
popq %rsi
leaq 0x777c4(%rip), %rdx # 0xa06fc
xorl %eax, %eax
callq 0x22c30
movq %r14, %rdi
movq %r12, %rsi
callq 0x22ed0
jmp 0x28f1e
movq %r14, %rdi
movl %ecx, %esi
callq 0x22660
jmp 0x28f1e
leaq 0x77b5e(%rip), %rsi # 0xa0abd
movq %r14, %rdi
callq 0x29b97
leaq 0x7284d(%rip), %rcx # 0x9b7bb
leaq 0x7284c(%rip), %rsi # 0x9b7c1
testb %al, %al
cmovneq %rcx, %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x29014
jmp 0x28fda
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22ac0
jmp 0x28fda
leaq 0x7bbb1(%rip), %rsi # 0xa4b4f
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x3a58f
leaq 0x7bb9b(%rip), %rdx # 0xa4b4f
leaq 0x30(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x3a570
leaq 0x30(%rsp), %rdi
callq 0x22f98
leaq 0x10(%rsp), %rdi
callq 0x22f98
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x22f98
jmp 0x29002
jmp 0x28fff
jmp 0x28fff
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x22f98
movq %rbx, %rdi
callq 0x22da0
|
_ZL17format_json_valueRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rdx
mov rbx, rdi
mov rdi, rsi
call _ZN4test14get_field_typeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; test::get_field_type(std::string const&)
cmp eax, 1
jz loc_28F58
test eax, eax
jnz loc_28F8A
mov [rsp+88h+var_80], rbx
lea rax, [rsp+88h+var_68]
mov [rax-10h], rax
and qword ptr [rax-8], 0
mov byte ptr [rax], 0
mov rbp, [r14]
mov r15, [r14+8]
lea r13, asc_9B7CD; "\\\\"
lea r14, [rsp+88h+var_78]
lea r12, [rsp+88h+var_38]
xor ebx, ebx
loc_28EF4:
cmp r15, rbx
jz loc_28F97
movzx eax, byte ptr [rbp+rbx+0]
mov rsi, r13
cmp eax, 5Ch ; '\'
jz short loc_28F16
cmp eax, 22h ; '"'
jnz short loc_28F23
lea rsi, aSpaceTypeSpace+42h; "\\\""
loc_28F16:
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_28F1E:
inc rbx
jmp short loc_28EF4
loc_28F23:
movsx ecx, al
cmp cl, 1Fh
jg short loc_28F4C
mov rdi, r12
push 8
pop rsi
lea rdx, aU04xU04x+6; "\\u%04x"
xor eax, eax
call _snprintf
mov rdi, r14
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
jmp short loc_28F1E
loc_28F4C:
mov rdi, r14
mov esi, ecx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short loc_28F1E
loc_28F58:
lea rsi, aMinExp0+0Ah; "0"
mov rdi, r14
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
lea rcx, aFalse; "false"
lea rsi, aTrue; "true"
test al, al
cmovnz rsi, rcx
lea rdx, [rsp+88h+var_58]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short loc_28FDA
loc_28F8A:
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
jmp short loc_28FDA
loc_28F97:
lea rsi, aName_2+9; "\""
lea rdi, [rsp+88h+var_58]
lea rdx, [rsp+88h+var_78]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
lea rdx, aName_2+9; "\""
lea rsi, [rsp+88h+var_58]
mov rbx, [rsp+88h+var_80]
mov rdi, rbx
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
lea rdi, [rsp+88h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+88h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_28FDA:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_29002
jmp short loc_28FFF
jmp short $+2
loc_28FFF:
mov rbx, rax
loc_29002:
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
long long format_json_value(long long a1, long long a2, long long *a3)
{
long long v4; // rbx
int field_type; // eax
long long v6; // rbp
long long v7; // r15
long long i; // rbx
int v9; // eax
char *v10; // rsi
const char *v11; // rsi
_QWORD v13[2]; // [rsp+10h] [rbp-78h] BYREF
char v14; // [rsp+20h] [rbp-68h] BYREF
_BYTE v15[32]; // [rsp+30h] [rbp-58h] BYREF
_BYTE v16[56]; // [rsp+50h] [rbp-38h] BYREF
v4 = a1;
field_type = test::get_field_type(a2);
if ( field_type == 1 )
{
v11 = "true";
if ( (unsigned __int8)std::operator==<char>(a3, "0") )
v11 = "false";
std::string::basic_string<std::allocator<char>>(a1, v11, v15);
}
else
{
if ( !field_type )
{
v13[0] = &v14;
v13[1] = 0LL;
v14 = 0;
v6 = *a3;
v7 = a3[1];
for ( i = 0LL; ; ++i )
{
if ( v7 == i )
{
std::operator+<char>(v15, "\"", v13);
v4 = a1;
std::operator+<char>(a1, v15, "\"");
std::string::~string(v15);
std::string::~string(v13);
return v4;
}
v9 = *(unsigned __int8 *)(v6 + i);
v10 = "\\\\";
if ( v9 == 92 )
goto LABEL_8;
if ( v9 == 34 )
break;
if ( (char)v9 > 31 )
{
std::string::push_back(v13, (unsigned int)(char)v9);
}
else
{
snprintf(v16, 8LL, "\\u%04x", (char)v9);
std::string::append(v13, v16);
}
LABEL_9:
;
}
v10 = "\\\"";
LABEL_8:
std::string::append(v13, v10);
goto LABEL_9;
}
std::string::basic_string(a1, a3);
}
return v4;
}
|
format_json_value:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RDX
MOV RBX,RDI
MOV RDI,RSI
CALL 0x0013a38e
CMP EAX,0x1
JZ 0x00128f58
TEST EAX,EAX
JNZ 0x00128f8a
MOV qword ptr [RSP + 0x8],RBX
LEA RAX,[RSP + 0x20]
MOV qword ptr [RAX + -0x10],RAX
AND qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
MOV RBP,qword ptr [R14]
MOV R15,qword ptr [R14 + 0x8]
LEA R13,[0x19b7cd]
LEA R14,[RSP + 0x10]
LEA R12,[RSP + 0x50]
XOR EBX,EBX
LAB_00128ef4:
CMP R15,RBX
JZ 0x00128f97
MOVZX EAX,byte ptr [RBP + RBX*0x1]
MOV RSI,R13
CMP EAX,0x5c
JZ 0x00128f16
CMP EAX,0x22
JNZ 0x00128f23
LEA RSI,[0x1a4b27]
LAB_00128f16:
MOV RDI,R14
CALL 0x00122ed0
LAB_00128f1e:
INC RBX
JMP 0x00128ef4
LAB_00128f23:
MOVSX ECX,AL
CMP CL,0x1f
JG 0x00128f4c
MOV RDI,R12
PUSH 0x8
POP RSI
LEA RDX,[0x1a06fc]
XOR EAX,EAX
CALL 0x00122c30
LAB_00128f3f:
MOV RDI,R14
MOV RSI,R12
CALL 0x00122ed0
JMP 0x00128f1e
LAB_00128f4c:
MOV RDI,R14
MOV ESI,ECX
CALL 0x00122660
LAB_00128f56:
JMP 0x00128f1e
LAB_00128f58:
LEA RSI,[0x1a0abd]
MOV RDI,R14
CALL 0x00129b97
LEA RCX,[0x19b7bb]
LEA RSI,[0x19b7c1]
TEST AL,AL
CMOVNZ RSI,RCX
LEA RDX,[RSP + 0x30]
MOV RDI,RBX
CALL 0x00129014
JMP 0x00128fda
LAB_00128f8a:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00122ac0
JMP 0x00128fda
LAB_00128f97:
LEA RSI,[0x1a4b4f]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
CALL 0x0013a58f
LAB_00128fad:
LEA RDX,[0x1a4b4f]
LEA RSI,[RSP + 0x30]
MOV RBX,qword ptr [RSP + 0x8]
MOV RDI,RBX
CALL 0x0013a570
LAB_00128fc6:
LEA RDI,[RSP + 0x30]
CALL 0x00122f98
LEA RDI,[RSP + 0x10]
CALL 0x00122f98
LAB_00128fda:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* format_json_value(std::__cxx11::string const&, std::__cxx11::string const&) */
string * format_json_value(string *param_1,string *param_2)
{
char cVar1;
long lVar2;
long lVar3;
bool bVar4;
int iVar5;
string *in_RDX;
long lVar6;
char *pcVar7;
int1 *local_78;
int8 local_70;
int1 local_68 [16];
allocator local_58 [32];
char local_38 [8];
iVar5 = test::get_field_type(param_2);
if (iVar5 == 1) {
bVar4 = std::operator==(in_RDX,"0");
pcVar7 = "true";
if (bVar4) {
pcVar7 = "false";
}
std::__cxx11::string::string<std::allocator<char>>(param_1,pcVar7,local_58);
}
else if (iVar5 == 0) {
local_78 = local_68;
local_70 = 0;
local_68[0] = 0;
lVar2 = *(long *)in_RDX;
lVar3 = *(long *)(in_RDX + 8);
for (lVar6 = 0; lVar3 != lVar6; lVar6 = lVar6 + 1) {
cVar1 = *(char *)(lVar2 + lVar6);
if ((cVar1 == '\\') || (cVar1 == '\"')) {
/* try { // try from 00128f16 to 00128f1d has its CatchHandler @ 00128fff */
std::__cxx11::string::append((char *)&local_78);
}
else if (cVar1 < ' ') {
snprintf(local_38,8,"\\u%04x");
/* try { // try from 00128f3f to 00128f49 has its CatchHandler @ 00128ffd */
std::__cxx11::string::append((char *)&local_78);
}
else {
/* try { // try from 00128f4c to 00128f55 has its CatchHandler @ 00128fff */
std::__cxx11::string::push_back((char)&local_78);
}
}
/* try { // try from 00128f97 to 00128fac has its CatchHandler @ 00128ffb */
std::operator+((char *)local_58,(string *)&DAT_001a4b4f);
/* try { // try from 00128fad to 00128fc5 has its CatchHandler @ 00128fec */
std::operator+(param_1,(char *)local_58);
std::__cxx11::string::~string((string *)local_58);
std::__cxx11::string::~string((string *)&local_78);
}
else {
std::__cxx11::string::string(param_1,in_RDX);
}
return param_1;
}
|
|
14,560
|
inline_mysql_file_open
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline File
inline_mysql_file_open(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *filename, int flags, myf myFlags)
{
File file;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename,
&locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
file= my_open(filename, flags, myFlags);
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
return file;
}
#endif
file= my_open(filename, flags, myFlags);
return file;
}
|
O3
|
c
|
inline_mysql_file_open:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %rbx
movl %ecx, %r14d
movq %rdx, %r15
movl %esi, %r12d
movl %edi, %esi
leaq 0x306df0(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
leaq -0x30(%rbp), %r13
movl $0x2, %edx
movq %r15, %rcx
movq %r13, %r8
callq *0x148(%rax)
movq %rax, (%r13)
testq %rax, %rax
jne 0x7f266
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0xa03b8
movl %eax, %ebx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x306da3(%rip), %r13 # 0x386010
movq (%r13), %rcx
leaq 0x5ca86(%rip), %rsi # 0xdbcfe
movq %rax, %rdi
movl %r12d, %edx
callq *0x1f0(%rcx)
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0xa03b8
movl %eax, %ebx
movq (%r13), %rax
movq -0x30(%rbp), %rdi
movl %ebx, %esi
callq *0x200(%rax)
jmp 0x7f255
|
inline_mysql_file_open_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, r8
mov r14d, ecx
mov r15, rdx
mov r12d, esi
mov esi, edi
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
lea r13, [rbp+var_30]
mov edx, 2
mov rcx, r15
mov r8, r13
call qword ptr [rax+148h]
mov [r13+0], rax
test rax, rax
jnz short loc_7F266
mov rdi, r15
mov esi, r14d
mov rdx, rbx
call my_open
mov ebx, eax
loc_7F255:
mov eax, ebx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7F266:
lea r13, PSI_server
mov rcx, [r13+0]
lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rax
mov edx, r12d
call qword ptr [rcx+1F0h]
mov rdi, r15
mov esi, r14d
mov rdx, rbx
call my_open
mov ebx, eax
mov rax, [r13+0]
mov rdi, [rbp+var_30]
mov esi, ebx
call qword ptr [rax+200h]
jmp short loc_7F255
|
long long inline_mysql_file_open_0(unsigned int a1, unsigned int a2, long long a3, unsigned int a4, long long a5)
{
long long v8; // rax
_BYTE v10[72]; // [rsp+8h] [rbp-78h] BYREF
long long v11[6]; // [rsp+50h] [rbp-30h] BYREF
v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v10, a1, 2LL, a3, v11);
v11[0] = v8;
if ( v8 )
{
((void ( *)(long long, const char *, _QWORD))PSI_server[62])(
v8,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
a2);
a5 = (unsigned int)my_open(a3, a4, a5);
((void ( *)(long long, long long))PSI_server[64])(v11[0], a5);
}
else
{
LODWORD(a5) = my_open(a3, a4, a5);
}
return (unsigned int)a5;
}
|
inline_mysql_file_open:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,R8
MOV R14D,ECX
MOV R15,RDX
MOV R12D,ESI
MOV ESI,EDI
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
LEA R13,[RBP + -0x30]
MOV EDX,0x2
MOV RCX,R15
MOV R8,R13
CALL qword ptr [RAX + 0x148]
MOV qword ptr [R13],RAX
TEST RAX,RAX
JNZ 0x0017f266
MOV RDI,R15
MOV ESI,R14D
MOV RDX,RBX
CALL 0x001a03b8
MOV EBX,EAX
LAB_0017f255:
MOV EAX,EBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017f266:
LEA R13,[0x486010]
MOV RCX,qword ptr [R13]
LEA RSI,[0x1dbcfe]
MOV RDI,RAX
MOV EDX,R12D
CALL qword ptr [RCX + 0x1f0]
MOV RDI,R15
MOV ESI,R14D
MOV RDX,RBX
CALL 0x001a03b8
MOV EBX,EAX
MOV RAX,qword ptr [R13]
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,EBX
CALL qword ptr [RAX + 0x200]
JMP 0x0017f255
|
int4
inline_mysql_file_open
(int4 param_1,int4 param_2,int8 param_3,int4 param_4,
int8 param_5)
{
int4 uVar1;
int1 local_80 [72];
long local_38;
local_38 = (**(code **)(PSI_server + 0x148))(local_80,param_1,2,param_3,&local_38);
if (local_38 == 0) {
uVar1 = my_open(param_3,param_4,param_5);
}
else {
(**(code **)(PSI_server + 0x1f0))
(local_38,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",param_2)
;
uVar1 = my_open(param_3,param_4,param_5);
(**(code **)(PSI_server + 0x200))(local_38,uVar1);
}
return uVar1;
}
|
|
14,561
|
common_sampler::set_logits(llama_context*, int)
|
monkey531[P]llama/common/sampling.cpp
|
void set_logits(struct llama_context * ctx, int idx) {
const auto * logits = llama_get_logits_ith(ctx, idx);
const llama_model * model = llama_get_model(ctx);
const llama_vocab * vocab = llama_model_get_vocab(model);
const int n_vocab = llama_vocab_n_tokens(vocab);
cur.resize(n_vocab);
for (llama_token token_id = 0; token_id < n_vocab; token_id++) {
cur[token_id] = llama_token_data{token_id, logits[token_id], 0.0f};
}
cur_p = { cur.data(), cur.size(), -1, false };
}
|
O3
|
cpp
|
common_sampler::set_logits(llama_context*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
callq 0x1bd90
movq %rax, %r14
movq %r15, %rdi
callq 0x1b790
movq %rax, %rdi
callq 0x1c160
movq %rax, %rdi
callq 0x1c0d0
movl %eax, %ebp
leaq 0x180(%rbx), %rdi
movslq %eax, %r15
movq %r15, %rsi
callq 0xd11ae
movq 0x180(%rbx), %rax
testl %r15d, %r15d
jle 0xd0fb8
movl %ebp, %ecx
leaq 0x8(%rax), %rdx
xorl %esi, %esi
movss (%r14,%rsi,4), %xmm0
movl %esi, -0x8(%rdx)
movss %xmm0, -0x4(%rdx)
movl $0x0, (%rdx)
incq %rsi
addq $0xc, %rdx
cmpq %rsi, %rcx
jne 0xd0f98
movq 0x188(%rbx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
movq %rax, 0x198(%rbx)
movq %rdx, 0x1a0(%rbx)
movq $-0x1, 0x1a8(%rbx)
movb $0x0, 0x1b0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN14common_sampler10set_logitsEP13llama_contexti:
push rbp
push r15
push r14
push rbx
push rax
mov r15, rsi
mov rbx, rdi
mov rdi, rsi
mov esi, edx
call _llama_get_logits_ith
mov r14, rax
mov rdi, r15
call _llama_get_model
mov rdi, rax
call _llama_model_get_vocab
mov rdi, rax
call _llama_vocab_n_tokens
mov ebp, eax
lea rdi, [rbx+180h]
movsxd r15, eax
mov rsi, r15
call _ZNSt6vectorI16llama_token_dataSaIS0_EE6resizeEm; std::vector<llama_token_data>::resize(ulong)
mov rax, [rbx+180h]
test r15d, r15d
jle short loc_D0FB8
mov ecx, ebp
lea rdx, [rax+8]
xor esi, esi
loc_D0F98:
movss xmm0, dword ptr [r14+rsi*4]
mov [rdx-8], esi
movss dword ptr [rdx-4], xmm0
mov dword ptr [rdx], 0
inc rsi
add rdx, 0Ch
cmp rcx, rsi
jnz short loc_D0F98
loc_D0FB8:
mov rcx, [rbx+188h]
sub rcx, rax
sar rcx, 2
mov rdx, 0AAAAAAAAAAAAAAABh
imul rdx, rcx
mov [rbx+198h], rax
mov [rbx+1A0h], rdx
mov qword ptr [rbx+1A8h], 0FFFFFFFFFFFFFFFFh
mov byte ptr [rbx+1B0h], 0
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long common_sampler::set_logits(long long a1, long long a2, unsigned int a3)
{
long long logits_ith; // r14
long long model; // rax
long long vocab; // rax
int v6; // ebp
long long result; // rax
_DWORD *v8; // rdx
long long i; // rsi
int v10; // xmm0_4
unsigned long long v11; // rdx
logits_ith = llama_get_logits_ith(a2, a3);
model = llama_get_model(a2);
vocab = llama_model_get_vocab(model);
v6 = llama_vocab_n_tokens(vocab);
std::vector<llama_token_data>::resize(a1 + 384, v6);
result = *(_QWORD *)(a1 + 384);
if ( v6 > 0 )
{
v8 = (_DWORD *)(result + 8);
for ( i = 0LL; i != v6; ++i )
{
v10 = *(_DWORD *)(logits_ith + 4 * i);
*(v8 - 2) = i;
*(v8 - 1) = v10;
*v8 = 0;
v8 += 3;
}
}
v11 = 0xAAAAAAAAAAAAAAABLL * ((*(_QWORD *)(a1 + 392) - result) >> 2);
*(_QWORD *)(a1 + 408) = result;
*(_QWORD *)(a1 + 416) = v11;
*(_QWORD *)(a1 + 424) = -1LL;
*(_BYTE *)(a1 + 432) = 0;
return result;
}
|
set_logits:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV ESI,EDX
CALL 0x0011bd90
MOV R14,RAX
MOV RDI,R15
CALL 0x0011b790
MOV RDI,RAX
CALL 0x0011c160
MOV RDI,RAX
CALL 0x0011c0d0
MOV EBP,EAX
LEA RDI,[RBX + 0x180]
MOVSXD R15,EAX
MOV RSI,R15
CALL 0x001d11ae
MOV RAX,qword ptr [RBX + 0x180]
TEST R15D,R15D
JLE 0x001d0fb8
MOV ECX,EBP
LEA RDX,[RAX + 0x8]
XOR ESI,ESI
LAB_001d0f98:
MOVSS XMM0,dword ptr [R14 + RSI*0x4]
MOV dword ptr [RDX + -0x8],ESI
MOVSS dword ptr [RDX + -0x4],XMM0
MOV dword ptr [RDX],0x0
INC RSI
ADD RDX,0xc
CMP RCX,RSI
JNZ 0x001d0f98
LAB_001d0fb8:
MOV RCX,qword ptr [RBX + 0x188]
SUB RCX,RAX
SAR RCX,0x2
MOV RDX,-0x5555555555555555
IMUL RDX,RCX
MOV qword ptr [RBX + 0x198],RAX
MOV qword ptr [RBX + 0x1a0],RDX
MOV qword ptr [RBX + 0x1a8],-0x1
MOV byte ptr [RBX + 0x1b0],0x0
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* common_sampler::set_logits(llama_context*, int) */
void __thiscall common_sampler::set_logits(common_sampler *this,llama_context *param_1,int param_2)
{
int4 uVar1;
long lVar2;
uint uVar3;
long lVar4;
int8 uVar5;
int4 *puVar6;
ulong uVar7;
lVar4 = llama_get_logits_ith(param_1,param_2);
uVar5 = llama_get_model(param_1);
uVar5 = llama_model_get_vocab(uVar5);
uVar3 = llama_vocab_n_tokens(uVar5);
std::vector<llama_token_data,std::allocator<llama_token_data>>::resize
((vector<llama_token_data,std::allocator<llama_token_data>> *)(this + 0x180),
(long)(int)uVar3);
lVar2 = *(long *)(this + 0x180);
if (0 < (int)uVar3) {
puVar6 = (int4 *)(lVar2 + 8);
uVar7 = 0;
do {
uVar1 = *(int4 *)(lVar4 + uVar7 * 4);
puVar6[-2] = (int)uVar7;
puVar6[-1] = uVar1;
*puVar6 = 0;
uVar7 = uVar7 + 1;
puVar6 = puVar6 + 3;
} while (uVar3 != uVar7);
}
*(long *)(this + 0x198) = lVar2;
*(long *)(this + 0x1a0) = (*(long *)(this + 0x188) - lVar2 >> 2) * -0x5555555555555555;
*(int8 *)(this + 0x1a8) = 0xffffffffffffffff;
this[0x1b0] = (common_sampler)0x0;
return;
}
|
|
14,562
|
c4_state_get_data_request_by_id
|
corpus-core[P]colibri-stateless/src/util/state.c
|
data_request_t* c4_state_get_data_request_by_id(c4_state_t* state, bytes32_t id) {
data_request_t* data_request = state->requests;
while (data_request) {
if (memcmp(data_request->id, id, 32) == 0) return data_request;
data_request = data_request->next;
}
return NULL;
}
|
O0
|
c
|
c4_state_get_data_request_by_id:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xa61a5
movq -0x20(%rbp), %rdi
addq $0x58, %rdi
movq -0x18(%rbp), %rsi
movl $0x20, %edx
callq 0x23100
cmpl $0x0, %eax
jne 0xa6197
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa61ad
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xa616b
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
c4_state_get_data_request_by_id:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
loc_A616B:
cmp [rbp+var_20], 0
jz short loc_A61A5
mov rdi, [rbp+var_20]
add rdi, 58h ; 'X'
mov rsi, [rbp+var_18]
mov edx, 20h ; ' '
call _memcmp
cmp eax, 0
jnz short loc_A6197
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
jmp short loc_A61AD
loc_A6197:
mov rax, [rbp+var_20]
mov rax, [rax+50h]
mov [rbp+var_20], rax
jmp short loc_A616B
loc_A61A5:
mov [rbp+var_8], 0
loc_A61AD:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
|
long long c4_state_get_data_request_by_id(long long *a1, long long a2)
{
long long i; // [rsp+0h] [rbp-20h]
for ( i = *a1; i; i = *(_QWORD *)(i + 80) )
{
if ( !(unsigned int)memcmp(i + 88, a2, 32LL) )
return i;
}
return 0LL;
}
|
c4_state_get_data_request_by_id:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
LAB_001a616b:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001a61a5
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x58
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x20
CALL 0x00123100
CMP EAX,0x0
JNZ 0x001a6197
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a61ad
LAB_001a6197:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001a616b
LAB_001a61a5:
MOV qword ptr [RBP + -0x8],0x0
LAB_001a61ad:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long c4_state_get_data_request_by_id(long *param_1,void *param_2)
{
int iVar1;
long local_28;
local_28 = *param_1;
while( true ) {
if (local_28 == 0) {
return 0;
}
iVar1 = memcmp((void *)(local_28 + 0x58),param_2,0x20);
if (iVar1 == 0) break;
local_28 = *(long *)(local_28 + 0x50);
}
return local_28;
}
|
|
14,563
|
ggml_backend_tensor_memset
|
ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp
|
void ggml_backend_tensor_memset(struct ggml_tensor * tensor, uint8_t value, size_t offset, size_t size) {
ggml_backend_buffer_t buf = tensor->view_src ? tensor->view_src->buffer : tensor->buffer;
if (size == 0) {
return;
}
GGML_ASSERT(buf != NULL && "tensor buffer not set");
GGML_ASSERT(tensor->data != NULL && "tensor not allocated");
GGML_ASSERT(offset + size <= ggml_nbytes(tensor) && "tensor write out of bounds");
GGML_ASSERT(buf->iface.memset_tensor != NULL && "memset not implemented by backend buffer");
buf->iface.memset_tensor(buf, tensor, value, offset, size);
}
|
O0
|
cpp
|
ggml_backend_tensor_memset:
subq $0x38, %rsp
movb %sil, %al
movq %rdi, 0x30(%rsp)
movb %al, 0x2f(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq 0x30(%rsp), %rax
cmpq $0x0, 0xe8(%rax)
je 0x5e680
movq 0x30(%rsp), %rax
movq 0xe8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x5e68e
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x5e6a5
jmp 0x5e796
cmpq $0x0, 0x10(%rsp)
jne 0x5e6ce
leaq 0x58f75(%rip), %rdi # 0xb7629
movl $0x125, %esi # imm = 0x125
leaq 0x55f42(%rip), %rdx # 0xb4602
leaq 0x590a4(%rip), %rcx # 0xb776b
movb $0x0, %al
callq 0x46780
movq 0x30(%rsp), %rax
cmpq $0x0, 0xf8(%rax)
jne 0x5e6fe
leaq 0x58f45(%rip), %rdi # 0xb7629
movl $0x126, %esi # imm = 0x126
leaq 0x55f12(%rip), %rdx # 0xb4602
leaq 0x58fbc(%rip), %rcx # 0xb76b3
movb $0x0, %al
callq 0x46780
movq 0x20(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rdi
callq 0x40640
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jbe 0x5e743
leaq 0x58f00(%rip), %rdi # 0xb7629
movl $0x127, %esi # imm = 0x127
leaq 0x55ecd(%rip), %rdx # 0xb4602
leaq 0x58fa6(%rip), %rcx # 0xb76e2
movb $0x0, %al
callq 0x46780
movq 0x10(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x5e770
leaq 0x58ed3(%rip), %rdi # 0xb7629
movl $0x128, %esi # imm = 0x128
leaq 0x55ea0(%rip), %rdx # 0xb4602
leaq 0x59029(%rip), %rcx # 0xb7792
movb $0x0, %al
callq 0x46780
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
movb 0x2f(%rsp), %dl
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %r8
movzbl %dl, %edx
callq *%rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
|
ggml_backend_tensor_memset:
sub rsp, 38h
mov al, sil
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_9], al
mov [rsp+38h+var_18], rdx
mov [rsp+38h+var_20], rcx
mov rax, [rsp+38h+var_8]
cmp qword ptr [rax+0E8h], 0
jz short loc_5E680
mov rax, [rsp+38h+var_8]
mov rax, [rax+0E8h]
mov rax, [rax+8]
mov [rsp+38h+var_30], rax
jmp short loc_5E68E
loc_5E680:
mov rax, [rsp+38h+var_8]
mov rax, [rax+8]
mov [rsp+38h+var_30], rax
loc_5E68E:
mov rax, [rsp+38h+var_30]
mov [rsp+38h+var_28], rax
cmp [rsp+38h+var_20], 0
jnz short loc_5E6A5
jmp loc_5E796
loc_5E6A5:
cmp [rsp+38h+var_28], 0
jnz short loc_5E6CE
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 125h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufNullTensorB; "buf != NULL && \"tensor buffer not set"...
mov al, 0
call _ggml_abort
loc_5E6CE:
mov rax, [rsp+38h+var_8]
cmp qword ptr [rax+0F8h], 0
jnz short loc_5E6FE
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 126h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorDataNull; "tensor->data != NULL && \"tensor not al"...
mov al, 0
call _ggml_abort
loc_5E6FE:
mov rax, [rsp+38h+var_18]
add rax, [rsp+38h+var_20]
mov [rsp+38h+var_38], rax
mov rdi, [rsp+38h+var_8]
call _ggml_nbytes
mov rcx, rax
mov rax, [rsp+38h+var_38]
cmp rax, rcx
jbe short loc_5E743
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 127h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aOffsetSizeGgml; "offset + size <= ggml_nbytes(tensor) &&"...
mov al, 0
call _ggml_abort
loc_5E743:
mov rax, [rsp+38h+var_28]
cmp qword ptr [rax+18h], 0
jnz short loc_5E770
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov esi, 128h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufIfaceMemset; "buf->iface.memset_tensor != NULL && \"m"...
mov al, 0
call _ggml_abort
loc_5E770:
mov rax, [rsp+38h+var_28]
mov rax, [rax+18h]
mov rdi, [rsp+38h+var_28]
mov rsi, [rsp+38h+var_8]
mov dl, [rsp+38h+var_9]
mov rcx, [rsp+38h+var_18]
mov r8, [rsp+38h+var_20]
movzx edx, dl
call rax
loc_5E796:
add rsp, 38h
retn
|
long long ggml_backend_tensor_memset(long long a1, unsigned __int8 a2, long long a3, long long a4)
{
long long result; // rax
long long v5; // [rsp+8h] [rbp-30h]
if ( *(_QWORD *)(a1 + 232) )
v5 = *(_QWORD *)(*(_QWORD *)(a1 + 232) + 8LL);
else
v5 = *(_QWORD *)(a1 + 8);
result = v5;
if ( a4 )
{
if ( !v5 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp",
293,
(long long)"GGML_ASSERT(%s) failed",
"buf != NULL && \"tensor buffer not set\"");
if ( !*(_QWORD *)(a1 + 248) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp",
294,
(long long)"GGML_ASSERT(%s) failed",
"tensor->data != NULL && \"tensor not allocated\"");
if ( a4 + a3 > (unsigned long long)ggml_nbytes((unsigned int *)a1) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp",
295,
(long long)"GGML_ASSERT(%s) failed",
"offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\"");
if ( !*(_QWORD *)(v5 + 24) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp",
296,
(long long)"GGML_ASSERT(%s) failed",
"buf->iface.memset_tensor != NULL && \"memset not implemented by backend buffer\"");
return (*(long long ( **)(long long, long long, _QWORD, long long, long long))(v5 + 24))(v5, a1, a2, a3, a4);
}
return result;
}
|
ggml_backend_tensor_memset:
SUB RSP,0x38
MOV AL,SIL
MOV qword ptr [RSP + 0x30],RDI
MOV byte ptr [RSP + 0x2f],AL
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x18],RCX
MOV RAX,qword ptr [RSP + 0x30]
CMP qword ptr [RAX + 0xe8],0x0
JZ 0x0015e680
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0xe8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0015e68e
LAB_0015e680:
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
LAB_0015e68e:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x0015e6a5
JMP 0x0015e796
LAB_0015e6a5:
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x0015e6ce
LEA RDI,[0x1b7629]
MOV ESI,0x125
LEA RDX,[0x1b4602]
LEA RCX,[0x1b776b]
MOV AL,0x0
CALL 0x00146780
LAB_0015e6ce:
MOV RAX,qword ptr [RSP + 0x30]
CMP qword ptr [RAX + 0xf8],0x0
JNZ 0x0015e6fe
LEA RDI,[0x1b7629]
MOV ESI,0x126
LEA RDX,[0x1b4602]
LEA RCX,[0x1b76b3]
MOV AL,0x0
CALL 0x00146780
LAB_0015e6fe:
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00140640
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
CMP RAX,RCX
JBE 0x0015e743
LEA RDI,[0x1b7629]
MOV ESI,0x127
LEA RDX,[0x1b4602]
LEA RCX,[0x1b76e2]
MOV AL,0x0
CALL 0x00146780
LAB_0015e743:
MOV RAX,qword ptr [RSP + 0x10]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x0015e770
LEA RDI,[0x1b7629]
MOV ESI,0x128
LEA RDX,[0x1b4602]
LEA RCX,[0x1b7792]
MOV AL,0x0
CALL 0x00146780
LAB_0015e770:
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x30]
MOV DL,byte ptr [RSP + 0x2f]
MOV RCX,qword ptr [RSP + 0x20]
MOV R8,qword ptr [RSP + 0x18]
MOVZX EDX,DL
CALL RAX
LAB_0015e796:
ADD RSP,0x38
RET
|
void ggml_backend_tensor_memset(long param_1,int1 param_2,long param_3,long param_4)
{
ulong uVar1;
long local_30;
if (*(long *)(param_1 + 0xe8) == 0) {
local_30 = *(long *)(param_1 + 8);
}
else {
local_30 = *(long *)(*(long *)(param_1 + 0xe8) + 8);
}
if (param_4 != 0) {
if (local_30 == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp"
,0x125,"GGML_ASSERT(%s) failed","buf != NULL && \"tensor buffer not set\"");
}
if (*(long *)(param_1 + 0xf8) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp"
,0x126,"GGML_ASSERT(%s) failed","tensor->data != NULL && \"tensor not allocated\"")
;
}
uVar1 = ggml_nbytes(param_1);
if (uVar1 < (ulong)(param_3 + param_4)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp"
,0x127,"GGML_ASSERT(%s) failed",
"offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\"");
}
if (*(long *)(local_30 + 0x18) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp"
,0x128,"GGML_ASSERT(%s) failed",
"buf->iface.memset_tensor != NULL && \"memset not implemented by backend buffer\"")
;
}
(**(code **)(local_30 + 0x18))(local_30,param_1,param_2,param_3,param_4);
}
return;
}
|
|
14,564
|
translog_close_log_file
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_close_log_file(TRANSLOG_FILE *file)
{
int rc= 0;
flush_pagecache_blocks(log_descriptor.pagecache, &file->handler,
FLUSH_RELEASE);
/*
Sync file when we close it
TODO: sync only we have changed the log
*/
if (!file->is_sync)
{
rc= mysql_file_sync(file->handler.file, MYF(MY_WME));
translog_syncs++;
}
rc|= mysql_file_close(file->handler.file, MYF(MY_WME));
my_free(file);
return MY_TEST(rc);
}
|
O0
|
c
|
translog_close_log_file:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq 0x3e8ff6(%rip), %rdi # 0x441fa0
movq -0x8(%rbp), %rsi
addq $0x8, %rsi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x66170
movq -0x8(%rbp), %rax
cmpb $0x0, 0x51(%rax)
jne 0x59000
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
leaq 0xc6253(%rip), %rdi # 0x11f22f
movl $0x647, %esi # imm = 0x647
movl $0x10, %ecx
callq 0x5e320
movl %eax, -0xc(%rbp)
movq 0x3e7da3(%rip), %rax # 0x440d98
addq $0x1, %rax
movq %rax, 0x3e7d98(%rip) # 0x440d98
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
leaq 0xc6221(%rip), %rdi # 0x11f22f
movl $0x64a, %esi # imm = 0x64A
movl $0x10, %ecx
callq 0x55050
orl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0xbe980
movl -0xc(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_close_log_file:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rdi, cs:log_descriptor
mov rsi, [rbp+var_8]
add rsi, 8
mov edx, 1
xor eax, eax
mov r8d, eax
mov rcx, r8
call flush_pagecache_blocks_with_filter
mov rax, [rbp+var_8]
cmp byte ptr [rax+51h], 0
jnz short loc_59000
mov rax, [rbp+var_8]
mov edx, [rax+18h]
lea rdi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 647h
mov ecx, 10h
call inline_mysql_file_sync_3
mov [rbp+var_C], eax
mov rax, cs:translog_syncs
add rax, 1
mov cs:translog_syncs, rax
loc_59000:
mov rax, [rbp+var_8]
mov edx, [rax+18h]
lea rdi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 64Ah
mov ecx, 10h
call inline_mysql_file_close_2
or eax, [rbp+var_C]
mov [rbp+var_C], eax
mov rdi, [rbp+var_8]
call my_free
mov edx, [rbp+var_C]
xor eax, eax
mov ecx, 1
cmp edx, 0
cmovnz eax, ecx
add rsp, 10h
pop rbp
retn
|
_BOOL8 translog_close_log_file(long long a1)
{
int v2; // [rsp+4h] [rbp-Ch]
int v3; // [rsp+4h] [rbp-Ch]
v2 = 0;
flush_pagecache_blocks_with_filter(log_descriptor[0], a1 + 8, 1LL, 0LL);
if ( !*(_BYTE *)(a1 + 81) )
{
v2 = inline_mysql_file_sync_3(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
1607LL,
*(unsigned int *)(a1 + 24),
16LL);
++translog_syncs;
}
v3 = v2 | inline_mysql_file_close_2(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x64Au,
*(_DWORD *)(a1 + 24),
16LL);
my_free(a1);
return v3 != 0;
}
|
translog_close_log_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RDI,qword ptr [0x00541fa0]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x8
MOV EDX,0x1
XOR EAX,EAX
MOV R8D,EAX
MOV RCX,R8
CALL 0x00166170
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x51],0x0
JNZ 0x00159000
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x18]
LEA RDI,[0x21f22f]
MOV ESI,0x647
MOV ECX,0x10
CALL 0x0015e320
MOV dword ptr [RBP + -0xc],EAX
MOV RAX,qword ptr [0x00540d98]
ADD RAX,0x1
MOV qword ptr [0x00540d98],RAX
LAB_00159000:
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0x18]
LEA RDI,[0x21f22f]
MOV ESI,0x64a
MOV ECX,0x10
CALL 0x00155050
OR EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0xc],EAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001be980
MOV EDX,dword ptr [RBP + -0xc]
XOR EAX,EAX
MOV ECX,0x1
CMP EDX,0x0
CMOVNZ EAX,ECX
ADD RSP,0x10
POP RBP
RET
|
bool translog_close_log_file(long param_1)
{
int iVar1;
int local_14;
local_14 = 0;
flush_pagecache_blocks_with_filter(log_descriptor,param_1 + 8,1,0);
if (*(char *)(param_1 + 0x51) == '\0') {
local_14 = inline_mysql_file_sync
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x647,*(int4 *)(param_1 + 0x18),0x10);
translog_syncs = translog_syncs + 1;
}
iVar1 = inline_mysql_file_close
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x64a,
*(int4 *)(param_1 + 0x18),0x10);
my_free(param_1);
return iVar1 != 0 || local_14 != 0;
}
|
|
14,565
|
stmt_unbuffered_fetch
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
static int stmt_unbuffered_fetch(MYSQL_STMT *stmt, uchar **row)
{
ulong pkt_len;
pkt_len= ma_net_safe_read(stmt->mysql);
if (pkt_len == packet_error)
{
stmt->fetch_row_func= stmt_unbuffered_eof;
return(1);
}
if (stmt->mysql->net.read_pos[0] == 254)
{
*row = NULL;
stmt->fetch_row_func= stmt_unbuffered_eof;
return(MYSQL_NO_DATA);
}
else
*row = stmt->mysql->net.read_pos;
stmt->result.rows++;
return(0);
}
|
O0
|
c
|
stmt_unbuffered_fetch:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x304c0
movq %rax, -0x20(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, -0x20(%rbp)
jne 0x40b57
movq -0x10(%rbp), %rax
leaq 0x7069(%rip), %rcx # 0x47bb0
movq %rcx, 0x348(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x40bc3
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jne 0x40b93
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
leaq 0x702d(%rip), %rcx # 0x47bb0
movq %rcx, 0x348(%rax)
movl $0x64, -0x4(%rbp)
jmp 0x40bc3
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xc8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
stmt_unbuffered_fetch:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call ma_net_safe_read
mov [rbp+var_20], rax
mov eax, 0FFFFFFFFh
cmp [rbp+var_20], rax
jnz short loc_40B57
mov rax, [rbp+var_10]
lea rcx, stmt_unbuffered_eof
mov [rax+348h], rcx
mov [rbp+var_4], 1
jmp short loc_40BC3
loc_40B57:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+20h]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jnz short loc_40B93
mov rax, [rbp+var_18]
mov qword ptr [rax], 0
mov rax, [rbp+var_10]
lea rcx, stmt_unbuffered_eof
mov [rax+348h], rcx
mov [rbp+var_4], 64h ; 'd'
jmp short loc_40BC3
loc_40B93:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rcx, [rax+20h]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+0C8h]
add rcx, 1
mov [rax+0C8h], rcx
mov [rbp+var_4], 0
loc_40BC3:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long stmt_unbuffered_fetch(long long *a1, _QWORD *a2, long long a3, long long a4, int a5, int a6)
{
if ( ma_net_safe_read(a1[7], (long long)a2, a3, a4, a5, a6) == 0xFFFFFFFFLL )
{
a1[105] = (long long)stmt_unbuffered_eof;
return 1;
}
else if ( **(unsigned __int8 **)(a1[7] + 32) == 254 )
{
*a2 = 0LL;
a1[105] = (long long)stmt_unbuffered_eof;
return 100;
}
else
{
*a2 = *(_QWORD *)(a1[7] + 32);
++a1[25];
return 0;
}
}
|
mysql_get_parameters:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x183608]
POP RBP
RET
|
int1 * mysql_get_parameters(void)
{
return mariadb_internal_parameters;
}
|
|
14,566
|
OpenSubdiv::v3_6_0::Bfr::Surface<double>::Evaluate(double const*, double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*, double*) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/surface.h
|
inline void
Surface<REAL>::Evaluate(REAL const uv[2],
REAL const patchPoints[],
PointDescriptor const & pointDesc,
REAL P[], REAL Du[], REAL Dv[]) const {
REAL * derivatives[6] = { P, Du, Dv, 0, 0, 0 };
evaluateDerivs(uv, patchPoints, pointDesc, derivatives);
}
|
O1
|
c
|
OpenSubdiv::v3_6_0::Bfr::Surface<double>::Evaluate(double const*, double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*, double*) const:
subq $0x38, %rsp
movq 0x40(%rsp), %rax
movq %r8, (%rsp)
movq %r9, 0x8(%rsp)
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movq $0x0, 0x28(%rsp)
movb 0x6c(%rdi), %al
movq %rsp, %r8
testb $0x4, %al
jne 0x97ab5
testb $0x8, %al
jne 0x97abc
callq 0x398e0
jmp 0x97ac1
callq 0x3a550
jmp 0x97ac1
callq 0x3a060
addq $0x38, %rsp
retq
|
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE8EvaluateEPKdS5_RKNS3_15PointDescriptorEPdS9_S9_:
sub rsp, 38h
mov rax, [rsp+38h+arg_0]
mov [rsp+38h+var_38], r8
mov [rsp+38h+var_30], r9
mov [rsp+38h+var_28], rax
xorps xmm0, xmm0
movups [rsp+38h+var_20], xmm0
mov [rsp+38h+var_10], 0
mov al, [rdi+6Ch]
mov r8, rsp
test al, 4
jnz short loc_97AB5
test al, 8
jnz short loc_97ABC
call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE19evalIrregularDerivsEPKdS5_RKNS3_15PointDescriptorEPPd; OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs(double const*,double const*,OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&,double **)
jmp short loc_97AC1
loc_97AB5:
call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE17evalRegularDerivsEPKdS5_RKNS3_15PointDescriptorEPPd; OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularDerivs(double const*,double const*,OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&,double **)
jmp short loc_97AC1
loc_97ABC:
call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE21evalMultiLinearDerivsEPKdS5_RKNS3_15PointDescriptorEPPd; OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalMultiLinearDerivs(double const*,double const*,OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&,double **)
loc_97AC1:
add rsp, 38h
retn
|
long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::Evaluate(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7)
{
char v7; // al
long long v9; // [rsp+0h] [rbp-38h] BYREF
long long v10; // [rsp+8h] [rbp-30h]
long long v11; // [rsp+10h] [rbp-28h]
__int128 v12; // [rsp+18h] [rbp-20h]
long long v13; // [rsp+28h] [rbp-10h]
v9 = a5;
v10 = a6;
v11 = a7;
v12 = 0LL;
v13 = 0LL;
v7 = *(_BYTE *)(a1 + 108);
if ( (v7 & 4) != 0 )
return OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularDerivs(
a1,
a2,
a3,
a4,
&v9,
a6,
v9,
v10,
v11,
v12,
*((_QWORD *)&v12 + 1),
v13);
if ( (v7 & 8) != 0 )
return OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalMultiLinearDerivs(
a1,
a2,
a3,
a4,
&v9,
a6,
v9,
v10,
v11,
v12,
*((_QWORD *)&v12 + 1),
v13);
return OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs(
a1,
a2,
a3,
a4,
&v9,
a6,
v9,
v10,
v11,
v12,
*((_QWORD *)&v12 + 1),
v13);
}
|
Evaluate:
SUB RSP,0x38
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP],R8
MOV qword ptr [RSP + 0x8],R9
MOV qword ptr [RSP + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV qword ptr [RSP + 0x28],0x0
MOV AL,byte ptr [RDI + 0x6c]
MOV R8,RSP
TEST AL,0x4
JNZ 0x00197ab5
TEST AL,0x8
JNZ 0x00197abc
CALL 0x001398e0
JMP 0x00197ac1
LAB_00197ab5:
CALL 0x0013a550
JMP 0x00197ac1
LAB_00197abc:
CALL 0x0013a060
LAB_00197ac1:
ADD RSP,0x38
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::Evaluate(double const*, double const*,
OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*, double*)
const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Surface<double>::Evaluate
(Surface<double> *this,double *param_1,double *param_2,PointDescriptor *param_3,
double *param_4,double *param_5,double *param_6)
{
double *local_38;
double *local_30;
double *local_28;
int8 local_20;
int8 uStack_18;
int8 local_10;
local_28 = param_6;
local_20 = 0;
uStack_18 = 0;
local_10 = 0;
local_38 = param_4;
local_30 = param_5;
if (((byte)this[0x6c] & 4) == 0) {
if (((byte)this[0x6c] & 8) == 0) {
evalIrregularDerivs(this,param_1,param_2,param_3,&local_38);
}
else {
evalMultiLinearDerivs(this,param_1,param_2,param_3,&local_38);
}
}
else {
evalRegularDerivs(this,param_1,param_2,param_3,&local_38);
}
return;
}
|
|
14,567
|
OpenSubdiv::v3_6_0::Bfr::Surface<double>::Evaluate(double const*, double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*, double*) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/surface.h
|
inline void
Surface<REAL>::Evaluate(REAL const uv[2],
REAL const patchPoints[],
PointDescriptor const & pointDesc,
REAL P[], REAL Du[], REAL Dv[]) const {
REAL * derivatives[6] = { P, Du, Dv, 0, 0, 0 };
evaluateDerivs(uv, patchPoints, pointDesc, derivatives);
}
|
O3
|
c
|
OpenSubdiv::v3_6_0::Bfr::Surface<double>::Evaluate(double const*, double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*, double*) const:
subq $0x38, %rsp
movq 0x40(%rsp), %rax
movq %r8, (%rsp)
movq %r9, 0x8(%rsp)
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movq $0x0, 0x28(%rsp)
movb 0x6c(%rdi), %al
movq %rsp, %r8
testb $0x4, %al
jne 0x9a74b
testb $0x8, %al
jne 0x9a752
callq 0x398c0
jmp 0x9a757
callq 0x3a530
jmp 0x9a757
callq 0x3a040
addq $0x38, %rsp
retq
|
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE8EvaluateEPKdS5_RKNS3_15PointDescriptorEPdS9_S9_:
sub rsp, 38h
mov rax, [rsp+38h+arg_0]
mov [rsp+38h+var_38], r8
mov [rsp+38h+var_30], r9
mov [rsp+38h+var_28], rax
xorps xmm0, xmm0
movups [rsp+38h+var_20], xmm0
mov [rsp+38h+var_10], 0
mov al, [rdi+6Ch]
mov r8, rsp
test al, 4
jnz short loc_9A74B
test al, 8
jnz short loc_9A752
call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE19evalIrregularDerivsEPKdS5_RKNS3_15PointDescriptorEPPd; OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs(double const*,double const*,OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&,double **)
jmp short loc_9A757
loc_9A74B:
call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE17evalRegularDerivsEPKdS5_RKNS3_15PointDescriptorEPPd; OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularDerivs(double const*,double const*,OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&,double **)
jmp short loc_9A757
loc_9A752:
call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE21evalMultiLinearDerivsEPKdS5_RKNS3_15PointDescriptorEPPd; OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalMultiLinearDerivs(double const*,double const*,OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&,double **)
loc_9A757:
add rsp, 38h
retn
|
long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::Evaluate(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7)
{
char v7; // al
long long v9; // [rsp+0h] [rbp-38h] BYREF
long long v10; // [rsp+8h] [rbp-30h]
long long v11; // [rsp+10h] [rbp-28h]
__int128 v12; // [rsp+18h] [rbp-20h]
long long v13; // [rsp+28h] [rbp-10h]
v9 = a5;
v10 = a6;
v11 = a7;
v12 = 0LL;
v13 = 0LL;
v7 = *(_BYTE *)(a1 + 108);
if ( (v7 & 4) != 0 )
return OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularDerivs(
a1,
a2,
a3,
a4,
&v9,
a6,
v9,
v10,
v11,
v12,
*((_QWORD *)&v12 + 1),
v13);
if ( (v7 & 8) != 0 )
return OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalMultiLinearDerivs(
a1,
a2,
a3,
a4,
&v9,
a6,
v9,
v10,
v11,
v12,
*((_QWORD *)&v12 + 1),
v13);
return OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs(
a1,
a2,
a3,
a4,
&v9,
a6,
v9,
v10,
v11,
v12,
*((_QWORD *)&v12 + 1),
v13);
}
|
Evaluate:
SUB RSP,0x38
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP],R8
MOV qword ptr [RSP + 0x8],R9
MOV qword ptr [RSP + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV qword ptr [RSP + 0x28],0x0
MOV AL,byte ptr [RDI + 0x6c]
MOV R8,RSP
TEST AL,0x4
JNZ 0x0019a74b
TEST AL,0x8
JNZ 0x0019a752
CALL 0x001398c0
JMP 0x0019a757
LAB_0019a74b:
CALL 0x0013a530
JMP 0x0019a757
LAB_0019a752:
CALL 0x0013a040
LAB_0019a757:
ADD RSP,0x38
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::Evaluate(double const*, double const*,
OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*, double*)
const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Surface<double>::Evaluate
(Surface<double> *this,double *param_1,double *param_2,PointDescriptor *param_3,
double *param_4,double *param_5,double *param_6)
{
double *local_38;
double *local_30;
double *local_28;
int8 local_20;
int8 uStack_18;
int8 local_10;
local_28 = param_6;
local_20 = 0;
uStack_18 = 0;
local_10 = 0;
local_38 = param_4;
local_30 = param_5;
if (((byte)this[0x6c] & 4) == 0) {
if (((byte)this[0x6c] & 8) == 0) {
evalIrregularDerivs(this,param_1,param_2,param_3,&local_38);
}
else {
evalMultiLinearDerivs(this,param_1,param_2,param_3,&local_38);
}
}
else {
evalRegularDerivs(this,param_1,param_2,param_3,&local_38);
}
return;
}
|
|
14,568
|
my_collation_get_by_name
|
eloqsql/mysys/charset.c
|
CHARSET_INFO *
my_collation_get_by_name(MY_CHARSET_LOADER *loader,
const char *name, myf flags)
{
uint cs_number;
CHARSET_INFO *cs;
my_pthread_once(&charsets_initialized, init_available_charsets);
cs_number= get_collation_number(name,flags);
my_charset_loader_init_mysys(loader);
cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL;
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
my_error(EE_UNKNOWN_COLLATION, MYF(ME_BELL), name, index_file);
}
return cs;
}
|
O0
|
c
|
my_collation_get_by_name:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x228(%rbp)
movq %rsi, -0x230(%rbp)
movq %rdx, -0x238(%rbp)
leaq 0xba22c0(%rip), %rdi # 0xc4b1b4
leaq -0x90b(%rip), %rsi # 0xa85f0
callq 0x27280
movq -0x230(%rbp), %rdi
movq -0x238(%rbp), %rsi
callq 0xa8540
movl %eax, -0x23c(%rbp)
movq -0x228(%rbp), %rdi
callq 0xa7c10
cmpl $0x0, -0x23c(%rbp)
je 0xa8f50
movq -0x228(%rbp), %rdi
movl -0x23c(%rbp), %esi
movq -0x238(%rbp), %rdx
callq 0xa8c40
movq %rax, -0x250(%rbp)
jmp 0xa8f5b
xorl %eax, %eax
movq %rax, -0x250(%rbp)
jmp 0xa8f5b
movq -0x250(%rbp), %rax
movq %rax, -0x248(%rbp)
cmpq $0x0, -0x248(%rbp)
jne 0xa8fbe
movq -0x238(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0xa8fbe
leaq -0x220(%rbp), %rdi
callq 0xa82b0
movq %rax, %rdi
leaq 0x771a5(%rip), %rsi # 0x12013f
callq 0x27880
movq -0x230(%rbp), %rdx
leaq -0x220(%rbp), %rcx
movl $0x1c, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0xb67b0
movq -0x248(%rbp), %rax
movq %rax, -0x258(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xa8fee
movq -0x258(%rbp), %rax
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x272b0
nopw %cs:(%rax,%rax)
|
my_collation_get_by_name:
push rbp
mov rbp, rsp
sub rsp, 260h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_228], rdi
mov [rbp+var_230], rsi
mov [rbp+var_238], rdx
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, [rbp+var_230]
mov rsi, [rbp+var_238]
call get_collation_number
mov [rbp+var_23C], eax
mov rdi, [rbp+var_228]
call my_charset_loader_init_mysys
cmp [rbp+var_23C], 0
jz short loc_A8F50
mov rdi, [rbp+var_228]
mov esi, [rbp+var_23C]
mov rdx, [rbp+var_238]
call get_internal_charset
mov [rbp+var_250], rax
jmp short loc_A8F5B
loc_A8F50:
xor eax, eax
mov [rbp+var_250], rax
jmp short $+2
loc_A8F5B:
mov rax, [rbp+var_250]
mov [rbp+var_248], rax
cmp [rbp+var_248], 0
jnz short loc_A8FBE
mov rax, [rbp+var_238]
and rax, 10h
cmp rax, 0
jz short loc_A8FBE
lea rdi, [rbp+var_220]
call get_charsets_dir
mov rdi, rax
lea rsi, aIndexXml; "Index.xml"
call _stpcpy
mov rdx, [rbp+var_230]
lea rcx, [rbp+var_220]
mov edi, 1Ch
mov esi, 4
mov al, 0
call my_error
loc_A8FBE:
mov rax, [rbp+var_248]
mov [rbp+var_258], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_A8FEE
mov rax, [rbp+var_258]
add rsp, 260h
pop rbp
retn
loc_A8FEE:
call ___stack_chk_fail
|
long long my_collation_get_by_name(long long a1, long long a2, long long a3)
{
long long charsets_dir; // rax
int v4; // r8d
int v5; // r9d
long long internal_charset; // [rsp+10h] [rbp-250h]
unsigned int collation_number; // [rsp+24h] [rbp-23Ch]
_BYTE v10[536]; // [rsp+40h] [rbp-220h] BYREF
unsigned long long v11; // [rsp+258h] [rbp-8h]
v11 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
collation_number = get_collation_number(a2, a3);
my_charset_loader_init_mysys(a1);
if ( collation_number )
internal_charset = get_internal_charset(a1, collation_number, a3);
else
internal_charset = 0LL;
if ( !internal_charset && (a3 & 0x10) != 0 )
{
charsets_dir = get_charsets_dir((long long)v10);
stpcpy(charsets_dir, "Index.xml");
my_error(28, 4, a2, (unsigned int)v10, v4, v5);
}
return internal_charset;
}
|
my_collation_get_by_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x228],RDI
MOV qword ptr [RBP + -0x230],RSI
MOV qword ptr [RBP + -0x238],RDX
LEA RDI,[0xd4b1b4]
LEA RSI,[0x1a85f0]
CALL 0x00127280
MOV RDI,qword ptr [RBP + -0x230]
MOV RSI,qword ptr [RBP + -0x238]
CALL 0x001a8540
MOV dword ptr [RBP + -0x23c],EAX
MOV RDI,qword ptr [RBP + -0x228]
CALL 0x001a7c10
CMP dword ptr [RBP + -0x23c],0x0
JZ 0x001a8f50
MOV RDI,qword ptr [RBP + -0x228]
MOV ESI,dword ptr [RBP + -0x23c]
MOV RDX,qword ptr [RBP + -0x238]
CALL 0x001a8c40
MOV qword ptr [RBP + -0x250],RAX
JMP 0x001a8f5b
LAB_001a8f50:
XOR EAX,EAX
MOV qword ptr [RBP + -0x250],RAX
JMP 0x001a8f5b
LAB_001a8f5b:
MOV RAX,qword ptr [RBP + -0x250]
MOV qword ptr [RBP + -0x248],RAX
CMP qword ptr [RBP + -0x248],0x0
JNZ 0x001a8fbe
MOV RAX,qword ptr [RBP + -0x238]
AND RAX,0x10
CMP RAX,0x0
JZ 0x001a8fbe
LEA RDI,[RBP + -0x220]
CALL 0x001a82b0
MOV RDI,RAX
LEA RSI,[0x22013f]
CALL 0x00127880
MOV RDX,qword ptr [RBP + -0x230]
LEA RCX,[RBP + -0x220]
MOV EDI,0x1c
MOV ESI,0x4
MOV AL,0x0
CALL 0x001b67b0
LAB_001a8fbe:
MOV RAX,qword ptr [RBP + -0x248]
MOV qword ptr [RBP + -0x258],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001a8fee
MOV RAX,qword ptr [RBP + -0x258]
ADD RSP,0x260
POP RBP
RET
LAB_001a8fee:
CALL 0x001272b0
|
long my_collation_get_by_name(int8 param_1,int8 param_2,ulong param_3)
{
int iVar1;
char *__dest;
long in_FS_OFFSET;
long local_258;
int1 local_228 [536];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
iVar1 = get_collation_number(param_2,param_3);
my_charset_loader_init_mysys(param_1);
if (iVar1 == 0) {
local_258 = 0;
}
else {
local_258 = get_internal_charset(param_1,iVar1,param_3);
}
if ((local_258 == 0) && ((param_3 & 0x10) != 0)) {
__dest = (char *)get_charsets_dir(local_228);
stpcpy(__dest,"Index.xml");
my_error(0x1c,4,param_2,local_228);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_258;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
14,569
|
my_casefold_mb
|
eloqsql/strings/ctype-mb.c
|
static size_t
my_casefold_mb(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)),
const uchar *map,
size_t is_upper)
{
const char *srcend= src + srclen;
char *dst0= dst;
DBUG_ASSERT(cs->mbmaxlen == 2);
while (src < srcend)
{
size_t mblen= my_ismbchar(cs, src, srcend);
if (mblen)
{
MY_UNICASE_CHARACTER *ch;
if ((ch= get_case_info_for_ch(cs, (uchar) src[0], (uchar) src[1])))
{
int code= is_upper ? ch->toupper : ch->tolower;
src+= 2;
if (code > 0xFF)
*dst++= code >> 8;
*dst++= code & 0xFF;
}
else
{
*dst++= *src++;
*dst++= *src++;
}
}
else
{
*dst++= (char) map[(uchar) *src++];
}
}
return (size_t) (dst - dst0);
}
|
O0
|
c
|
my_casefold_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x8f86a
jmp 0x8f86c
movq -0x10(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x8f9a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x8f6d0
movl %eax, %eax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x8f971
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %esi
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %edx
callq 0x923b0
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0x8f92b
cmpq $0x0, 0x10(%rbp)
je 0x8f8d0
movq -0x50(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x58(%rbp)
jmp 0x8f8da
movq -0x50(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
cmpl $0xff, -0x54(%rbp)
jle 0x8f90e
movl -0x54(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl -0x54(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x8f96f
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x8f99b
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x8f86c
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_casefold_mb:
push rbp
mov rbp, rsp
sub rsp, 60h
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
jmp short $+2
loc_8F86A:
jmp short $+2
loc_8F86C:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_38]
jnb loc_8F9A0
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_38]
call my_ismbchar_0
mov eax, eax
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
jz loc_8F971
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
movzx esi, byte ptr [rax]
mov rax, [rbp+var_10]
movzx edx, byte ptr [rax+1]
call get_case_info_for_ch
mov [rbp+var_50], rax
cmp rax, 0
jz short loc_8F92B
cmp [rbp+arg_0], 0
jz short loc_8F8D0
mov rax, [rbp+var_50]
mov eax, [rax]
mov [rbp+var_58], eax
jmp short loc_8F8DA
loc_8F8D0:
mov rax, [rbp+var_50]
mov eax, [rax+4]
mov [rbp+var_58], eax
loc_8F8DA:
mov eax, [rbp+var_58]
mov [rbp+var_54], eax
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_10], rax
cmp [rbp+var_54], 0FFh
jle short loc_8F90E
mov eax, [rbp+var_54]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
loc_8F90E:
mov eax, [rbp+var_54]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
jmp short loc_8F96F
loc_8F92B:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov cl, [rax]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov cl, [rax]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
loc_8F96F:
jmp short loc_8F99B
loc_8F971:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov rdx, rcx
add rdx, 1
mov [rbp+var_10], rdx
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
loc_8F99B:
jmp loc_8F86C
loc_8F9A0:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_40]
sub rax, rcx
add rsp, 60h
pop rbp
retn
|
_BYTE * my_casefold_mb(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 *a4,
long long a5,
long long a6,
long long a7)
{
unsigned __int8 *v7; // rax
unsigned __int8 *v8; // rax
char *v9; // rax
char v10; // cl
_BYTE *v11; // rax
unsigned __int8 *v12; // rcx
unsigned __int8 *v13; // rax
int v15; // [rsp+8h] [rbp-58h]
int *case_info_for_ch; // [rsp+10h] [rbp-50h]
unsigned long long v18; // [rsp+28h] [rbp-38h]
unsigned __int8 *v20; // [rsp+40h] [rbp-20h]
unsigned __int8 *v21; // [rsp+50h] [rbp-10h]
v21 = a2;
v20 = a4;
v18 = (unsigned long long)&a2[a3];
while ( (unsigned long long)v21 < v18 )
{
if ( (unsigned int)my_ismbchar_0(a1, (long long)v21, v18) )
{
case_info_for_ch = (int *)get_case_info_for_ch(a1, *v21, v21[1]);
if ( case_info_for_ch )
{
if ( a7 )
v15 = *case_info_for_ch;
else
v15 = case_info_for_ch[1];
v21 += 2;
if ( v15 > 255 )
{
v7 = v20++;
*v7 = BYTE1(v15);
}
v8 = v20++;
*v8 = v15;
}
else
{
*v20 = *v21;
v9 = (char *)(v21 + 1);
v21 += 2;
v10 = *v9;
v11 = v20 + 1;
v20 += 2;
*v11 = v10;
}
}
else
{
v12 = v21++;
v13 = v20++;
*v13 = *(_BYTE *)(a6 + *v12);
}
}
return (_BYTE *)(v20 - a4);
}
|
my_casefold_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
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]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0018f86a
LAB_0018f86a:
JMP 0x0018f86c
LAB_0018f86c:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0018f9a0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x0018f6d0
MOV EAX,EAX
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0018f971
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ESI,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EDX,byte ptr [RAX + 0x1]
CALL 0x001923b0
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JZ 0x0018f92b
CMP qword ptr [RBP + 0x10],0x0
JZ 0x0018f8d0
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x58],EAX
JMP 0x0018f8da
LAB_0018f8d0:
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x58],EAX
LAB_0018f8da:
MOV EAX,dword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x10],RAX
CMP dword ptr [RBP + -0x54],0xff
JLE 0x0018f90e
MOV EAX,dword ptr [RBP + -0x54]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
LAB_0018f90e:
MOV EAX,dword ptr [RBP + -0x54]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
JMP 0x0018f96f
LAB_0018f92b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
LAB_0018f96f:
JMP 0x0018f99b
LAB_0018f971:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOVZX ECX,byte ptr [RCX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
LAB_0018f99b:
JMP 0x0018f86c
LAB_0018f9a0:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long my_casefold_mb(int8 param_1,byte *param_2,long param_3,byte *param_4,int8 param_5,
long param_6,long param_7)
{
int iVar1;
int *piVar2;
byte *pbVar3;
int local_60;
byte *local_28;
byte *local_18;
local_28 = param_4;
local_18 = param_2;
while (local_18 < param_2 + param_3) {
iVar1 = my_ismbchar(param_1,local_18,param_2 + param_3);
if (iVar1 == 0) {
*local_28 = *(byte *)(param_6 + (ulong)*local_18);
local_28 = local_28 + 1;
local_18 = local_18 + 1;
}
else {
piVar2 = (int *)get_case_info_for_ch(param_1,*local_18,local_18[1]);
if (piVar2 == (int *)0x0) {
pbVar3 = local_28 + 1;
*local_28 = *local_18;
local_28 = local_28 + 2;
*pbVar3 = local_18[1];
}
else {
if (param_7 == 0) {
local_60 = piVar2[1];
}
else {
local_60 = *piVar2;
}
if (0xff < local_60) {
*local_28 = (byte)((uint)local_60 >> 8);
local_28 = local_28 + 1;
}
*local_28 = (byte)local_60;
local_28 = local_28 + 1;
}
local_18 = local_18 + 2;
}
}
return (long)local_28 - (long)param_4;
}
|
|
14,570
|
unpack_filename
|
eloqsql/mysys/mf_pack.c
|
size_t unpack_filename(char * to, const char *from)
{
size_t length, n_length, buff_length;
char buff[FN_REFLEN + 1];
DBUG_ENTER("unpack_filename");
length=dirname_part(buff, from, &buff_length);/* copy & convert dirname */
n_length=unpack_dirname(buff,buff);
if (n_length+strlen(from+length) < FN_REFLEN)
{
(void) strmov(buff+n_length,from+length);
length= system_filename(to,buff); /* Fix to usably filename */
}
else
length= system_filename(to,from); /* Fix to usably filename */
DBUG_RETURN(length);
}
|
O0
|
c
|
unpack_filename:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp # imm = 0x250
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x220(%rbp), %rsi
leaq -0x238(%rbp), %rdx
callq 0xdf670
movq %rax, -0x228(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0xe9370
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x220(%rbp), %rdi
addq -0x228(%rbp), %rdi
callq 0x2a350
movq %rax, %rcx
movq -0x240(%rbp), %rax
addq %rcx, %rax
cmpq $0x200, %rax # imm = 0x200
jae 0xe9724
leaq -0x210(%rbp), %rdi
addq -0x230(%rbp), %rdi
movq -0x220(%rbp), %rsi
addq -0x228(%rbp), %rsi
callq 0x2a730
movq -0x218(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0xe9620
movq %rax, -0x228(%rbp)
jmp 0xe973e
movq -0x218(%rbp), %rdi
movq -0x220(%rbp), %rsi
callq 0xe9620
movq %rax, -0x228(%rbp)
jmp 0xe9740
movq -0x228(%rbp), %rax
movq %rax, -0x248(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xe9770
movq -0x248(%rbp), %rax
addq $0x250, %rsp # imm = 0x250
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
nop
|
unpack_filename:
push rbp
mov rbp, rsp
sub rsp, 250h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_220]
lea rdx, [rbp+var_238]
call dirname_part
mov [rbp+var_228], rax
lea rdi, [rbp+var_210]
lea rsi, [rbp+var_210]
call unpack_dirname
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
mov [rbp+var_240], rax
mov rdi, [rbp+var_220]
add rdi, [rbp+var_228]
call _strlen
mov rcx, rax
mov rax, [rbp+var_240]
add rax, rcx
cmp rax, 200h
jnb short loc_E9724
lea rdi, [rbp+var_210]
add rdi, [rbp+var_230]
mov rsi, [rbp+var_220]
add rsi, [rbp+var_228]
call _stpcpy
mov rdi, [rbp+var_218]
lea rsi, [rbp+var_210]
call system_filename
mov [rbp+var_228], rax
jmp short loc_E973E
loc_E9724:
mov rdi, [rbp+var_218]
mov rsi, [rbp+var_220]
call system_filename
mov [rbp+var_228], rax
loc_E973E:
jmp short $+2
loc_E9740:
mov rax, [rbp+var_228]
mov [rbp+var_248], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_E9770
mov rax, [rbp+var_248]
add rsp, 250h
pop rbp
retn
loc_E9770:
call ___stack_chk_fail
|
long long unpack_filename(long long a1, _BYTE *a2)
{
long long v3; // [rsp+10h] [rbp-240h]
long long v4; // [rsp+18h] [rbp-238h] BYREF
long long v5; // [rsp+20h] [rbp-230h]
long long v6; // [rsp+28h] [rbp-228h]
_BYTE *v7; // [rsp+30h] [rbp-220h]
long long v8; // [rsp+38h] [rbp-218h]
_BYTE v9[520]; // [rsp+40h] [rbp-210h] BYREF
unsigned long long v10; // [rsp+248h] [rbp-8h]
v10 = __readfsqword(0x28u);
v8 = a1;
v7 = a2;
v6 = dirname_part((long long)v9, a2, &v4);
v5 = unpack_dirname((long long)v9, v9);
v3 = v5;
if ( (unsigned long long)(strlen(&v7[v6]) + v3) >= 0x200 )
return system_filename(v8, (long long)v7);
stpcpy(&v9[v5], &v7[v6]);
return system_filename(v8, (long long)v9);
}
|
unpack_filename:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x250
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x220]
LEA RDX,[RBP + -0x238]
CALL 0x001df670
MOV qword ptr [RBP + -0x228],RAX
LEA RDI,[RBP + -0x210]
LEA RSI,[RBP + -0x210]
CALL 0x001e9370
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x240],RAX
MOV RDI,qword ptr [RBP + -0x220]
ADD RDI,qword ptr [RBP + -0x228]
CALL 0x0012a350
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x240]
ADD RAX,RCX
CMP RAX,0x200
JNC 0x001e9724
LEA RDI,[RBP + -0x210]
ADD RDI,qword ptr [RBP + -0x230]
MOV RSI,qword ptr [RBP + -0x220]
ADD RSI,qword ptr [RBP + -0x228]
CALL 0x0012a730
MOV RDI,qword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x001e9620
MOV qword ptr [RBP + -0x228],RAX
JMP 0x001e973e
LAB_001e9724:
MOV RDI,qword ptr [RBP + -0x218]
MOV RSI,qword ptr [RBP + -0x220]
CALL 0x001e9620
MOV qword ptr [RBP + -0x228],RAX
LAB_001e973e:
JMP 0x001e9740
LAB_001e9740:
MOV RAX,qword ptr [RBP + -0x228]
MOV qword ptr [RBP + -0x248],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001e9770
MOV RAX,qword ptr [RBP + -0x248]
ADD RSP,0x250
POP RBP
RET
LAB_001e9770:
CALL 0x0012a270
|
int8 unpack_filename(int8 param_1,long param_2)
{
long lVar1;
size_t sVar2;
long in_FS_OFFSET;
int1 local_240 [8];
long local_238;
long local_230;
long local_228;
int8 local_220;
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_228 = param_2;
local_220 = param_1;
local_230 = dirname_part(local_218,param_2,local_240);
lVar1 = unpack_dirname(local_218,local_218);
local_238 = lVar1;
sVar2 = strlen((char *)(local_228 + local_230));
if (lVar1 + sVar2 < 0x200) {
stpcpy(local_218 + local_238,(char *)(local_228 + local_230));
local_230 = system_filename(local_220,local_218);
}
else {
local_230 = system_filename(local_220,local_228);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_230;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
14,571
|
ImageColorBrightness
|
csit-sgu[P]mit-game-2025-team-tyler/Libraries/raylib/src/rtextures.c
|
void ImageColorBrightness(Image *image, int brightness)
{
// Security check to avoid program crash
if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return;
if (brightness < -255) brightness = -255;
if (brightness > 255) brightness = 255;
Color *pixels = LoadImageColors(*image);
for (int i = 0; i < image->width*image->height; i++)
{
int cR = pixels[i].r + brightness;
int cG = pixels[i].g + brightness;
int cB = pixels[i].b + brightness;
if (cR < 0) cR = 1;
if (cR > 255) cR = 255;
if (cG < 0) cG = 1;
if (cG > 255) cG = 255;
if (cB < 0) cB = 1;
if (cB > 255) cB = 255;
pixels[i].r = (unsigned char)cR;
pixels[i].g = (unsigned char)cG;
pixels[i].b = (unsigned char)cB;
}
int format = image->format;
RL_FREE(image->data);
image->data = pixels;
image->format = PIXELFORMAT_UNCOMPRESSED_R8G8B8A8;
ImageFormat(image, format);
}
|
O1
|
c
|
ImageColorBrightness:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
cmpq $0x0, (%rdi)
je 0x9eb2c
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0x9eb2c
cmpl $0x0, 0xc(%rbx)
je 0x9eb2c
cmpl $0xffffff02, %esi # imm = 0xFFFFFF02
movl $0xffffff01, %ebp # imm = 0xFFFFFF01
cmovgel %esi, %ebp
movl $0xff, %r15d
cmpl %r15d, %ebp
cmovgel %r15d, %ebp
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rsp)
movups (%rbx), %xmm0
movups %xmm0, (%rsp)
callq 0x9818a
movq %rax, %r14
movl 0xc(%rbx), %eax
imull 0x8(%rbx), %eax
testl %eax, %eax
jle 0x9eb03
xorl %eax, %eax
movl $0x1, %ecx
movzbl (%r14,%rax,4), %edx
addl %ebp, %edx
movzbl 0x1(%r14,%rax,4), %esi
addl %ebp, %esi
movzbl 0x2(%r14,%rax,4), %edi
addl %ebp, %edi
cmpl %r15d, %edx
movl $0xff, %r8d
cmovll %edx, %r8d
cmpl %r15d, %esi
movl $0xff, %r9d
cmovll %esi, %r9d
cmpl %r15d, %edi
movl $0xff, %r10d
cmovll %edi, %r10d
testl %edx, %edx
cmovsl %ecx, %r8d
testl %esi, %esi
cmovsl %ecx, %r9d
testl %edi, %edi
movb %r8b, (%r14,%rax,4)
movb %r9b, 0x1(%r14,%rax,4)
cmovsl %ecx, %r10d
movb %r10b, 0x2(%r14,%rax,4)
incq %rax
movslq 0x8(%rbx), %rdx
movslq 0xc(%rbx), %rsi
imulq %rdx, %rsi
cmpq %rsi, %rax
jl 0x9ea91
movl 0x14(%rbx), %ebp
movq (%rbx), %rdi
callq 0x9650
movq %r14, (%rbx)
movl $0x7, 0x14(%rbx)
movq %rbx, %rdi
movl %ebp, %esi
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x99d25
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
ImageColorBrightness:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
cmp qword ptr [rdi], 0
jz loc_9EB2C
mov rbx, rdi
cmp dword ptr [rdi+8], 0
jz loc_9EB2C
cmp dword ptr [rbx+0Ch], 0
jz loc_9EB2C
cmp esi, 0FFFFFF02h
mov ebp, 0FFFFFF01h
cmovge ebp, esi
mov r15d, 0FFh
cmp ebp, r15d
cmovge ebp, r15d
mov rax, [rbx+10h]
mov [rsp+38h+var_28], rax
movups xmm0, xmmword ptr [rbx]
movups [rsp+38h+var_38], xmm0
call LoadImageColors
mov r14, rax
mov eax, [rbx+0Ch]
imul eax, [rbx+8]
test eax, eax
jle short loc_9EB03
xor eax, eax
mov ecx, 1
loc_9EA91:
movzx edx, byte ptr [r14+rax*4]
add edx, ebp
movzx esi, byte ptr [r14+rax*4+1]
add esi, ebp
movzx edi, byte ptr [r14+rax*4+2]
add edi, ebp
cmp edx, r15d
mov r8d, 0FFh
cmovl r8d, edx
cmp esi, r15d
mov r9d, 0FFh
cmovl r9d, esi
cmp edi, r15d
mov r10d, 0FFh
cmovl r10d, edi
test edx, edx
cmovs r8d, ecx
test esi, esi
cmovs r9d, ecx
test edi, edi
mov [r14+rax*4], r8b
mov [r14+rax*4+1], r9b
cmovs r10d, ecx
mov [r14+rax*4+2], r10b
inc rax
movsxd rdx, dword ptr [rbx+8]
movsxd rsi, dword ptr [rbx+0Ch]
imul rsi, rdx
cmp rax, rsi
jl short loc_9EA91
loc_9EB03:
mov ebp, [rbx+14h]
mov rdi, [rbx]
call _free
mov [rbx], r14
mov dword ptr [rbx+14h], 7
mov rdi, rbx
mov esi, ebp
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
jmp ImageFormat
loc_9EB2C:
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
|
void ImageColorBrightness(long long *a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
int v7; // ebp
long long ImageColors; // r14
long long v9; // rax
int v10; // edx
int v11; // esi
int v12; // edi
char v13; // r8
char v14; // r9
char v15; // r10
int v16; // ebp
double v17; // xmm0_8
long long v18; // rdx
__int16 v19; // cx
int v20; // r8d
int v21; // r9d
if ( *a1 && *((_DWORD *)a1 + 2) && *((_DWORD *)a1 + 3) )
{
v7 = -255;
if ( (int)a2 >= -254 )
v7 = a2;
if ( v7 >= 255 )
v7 = 255;
ImageColors = LoadImageColors(COERCE_FLOAT(*(_OWORD *)a1), (long long)a1, a2, a3, a4, a5, a6, *a1, a1[1], a1[2]);
if ( *((_DWORD *)a1 + 2) * *((_DWORD *)a1 + 3) > 0 )
{
v9 = 0LL;
do
{
v10 = v7 + *(unsigned __int8 *)(ImageColors + 4 * v9);
v11 = v7 + *(unsigned __int8 *)(ImageColors + 4 * v9 + 1);
v12 = v7 + *(unsigned __int8 *)(ImageColors + 4 * v9 + 2);
v13 = -1;
if ( v10 < 255 )
v13 = v7 + *(_BYTE *)(ImageColors + 4 * v9);
v14 = -1;
if ( v11 < 255 )
v14 = v7 + *(_BYTE *)(ImageColors + 4 * v9 + 1);
v15 = -1;
if ( v12 < 255 )
v15 = v7 + *(_BYTE *)(ImageColors + 4 * v9 + 2);
if ( v10 < 0 )
v13 = 1;
if ( v11 < 0 )
v14 = 1;
*(_BYTE *)(ImageColors + 4 * v9) = v13;
*(_BYTE *)(ImageColors + 4 * v9 + 1) = v14;
if ( v12 < 0 )
v15 = 1;
*(_BYTE *)(ImageColors + 4 * v9++ + 2) = v15;
}
while ( v9 < *((int *)a1 + 2) * (long long)*((int *)a1 + 3) );
}
v16 = *((_DWORD *)a1 + 5);
v17 = free(*a1);
*a1 = ImageColors;
*((_DWORD *)a1 + 5) = 7;
ImageFormat(a1, v16, *(float *)&v17, v18, v19, v20, v21);
}
}
|
ImageColorBrightness:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
CMP qword ptr [RDI],0x0
JZ 0x0019eb2c
MOV RBX,RDI
CMP dword ptr [RDI + 0x8],0x0
JZ 0x0019eb2c
CMP dword ptr [RBX + 0xc],0x0
JZ 0x0019eb2c
CMP ESI,0xffffff02
MOV EBP,0xffffff01
CMOVGE EBP,ESI
MOV R15D,0xff
CMP EBP,R15D
CMOVGE EBP,R15D
MOV RAX,qword ptr [RBX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0019818a
MOV R14,RAX
MOV EAX,dword ptr [RBX + 0xc]
IMUL EAX,dword ptr [RBX + 0x8]
TEST EAX,EAX
JLE 0x0019eb03
XOR EAX,EAX
MOV ECX,0x1
LAB_0019ea91:
MOVZX EDX,byte ptr [R14 + RAX*0x4]
ADD EDX,EBP
MOVZX ESI,byte ptr [R14 + RAX*0x4 + 0x1]
ADD ESI,EBP
MOVZX EDI,byte ptr [R14 + RAX*0x4 + 0x2]
ADD EDI,EBP
CMP EDX,R15D
MOV R8D,0xff
CMOVL R8D,EDX
CMP ESI,R15D
MOV R9D,0xff
CMOVL R9D,ESI
CMP EDI,R15D
MOV R10D,0xff
CMOVL R10D,EDI
TEST EDX,EDX
CMOVS R8D,ECX
TEST ESI,ESI
CMOVS R9D,ECX
TEST EDI,EDI
MOV byte ptr [R14 + RAX*0x4],R8B
MOV byte ptr [R14 + RAX*0x4 + 0x1],R9B
CMOVS R10D,ECX
MOV byte ptr [R14 + RAX*0x4 + 0x2],R10B
INC RAX
MOVSXD RDX,dword ptr [RBX + 0x8]
MOVSXD RSI,dword ptr [RBX + 0xc]
IMUL RSI,RDX
CMP RAX,RSI
JL 0x0019ea91
LAB_0019eb03:
MOV EBP,dword ptr [RBX + 0x14]
MOV RDI,qword ptr [RBX]
CALL 0x00109650
MOV qword ptr [RBX],R14
MOV dword ptr [RBX + 0x14],0x7
MOV RDI,RBX
MOV ESI,EBP
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00199d25
LAB_0019eb2c:
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
void ImageColorBrightness(long *param_1,int param_2)
{
int4 uVar1;
int1 uVar2;
long lVar3;
long lVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
int iVar9;
int iVar10;
int1 uVar11;
int iVar12;
if (((*param_1 != 0) && ((int)param_1[1] != 0)) && (*(int *)((long)param_1 + 0xc) != 0)) {
iVar6 = -0xff;
if (-0xff < param_2) {
iVar6 = param_2;
}
if (0xfe < iVar6) {
iVar6 = 0xff;
}
lVar3 = LoadImageColors();
if (0 < *(int *)((long)param_1 + 0xc) * (int)param_1[1]) {
lVar4 = 0;
do {
iVar5 = (uint)*(byte *)(lVar3 + lVar4 * 4) + iVar6;
iVar7 = (uint)*(byte *)(lVar3 + 1 + lVar4 * 4) + iVar6;
iVar8 = (uint)*(byte *)(lVar3 + 2 + lVar4 * 4) + iVar6;
iVar9 = 0xff;
if (iVar5 < 0xff) {
iVar9 = iVar5;
}
iVar10 = 0xff;
if (iVar7 < 0xff) {
iVar10 = iVar7;
}
iVar12 = 0xff;
if (iVar8 < 0xff) {
iVar12 = iVar8;
}
uVar11 = (char)iVar9;
if (iVar5 < 0) {
uVar11 = 1;
}
uVar2 = (char)iVar10;
if (iVar7 < 0) {
uVar2 = 1;
}
*(int1 *)(lVar3 + lVar4 * 4) = uVar11;
*(int1 *)(lVar3 + 1 + lVar4 * 4) = uVar2;
uVar11 = (int1)iVar12;
if (iVar8 < 0) {
uVar11 = 1;
}
*(int1 *)(lVar3 + 2 + lVar4 * 4) = uVar11;
lVar4 = lVar4 + 1;
} while (lVar4 < (long)*(int *)((long)param_1 + 0xc) * (long)(int)param_1[1]);
}
uVar1 = *(int4 *)((long)param_1 + 0x14);
free((void *)*param_1);
*param_1 = lVar3;
*(int4 *)((long)param_1 + 0x14) = 7;
ImageFormat(param_1,uVar1);
return;
}
return;
}
|
|
14,572
|
default_reporter
|
eloqsql/mysys/my_getopt.c
|
static void default_reporter(enum loglevel level, const char *format, ...)
{
va_list args;
DBUG_ENTER("default_reporter");
va_start(args, format);
if (level == WARNING_LEVEL)
fprintf(stderr, "%s", "Warning: ");
else if (level == INFORMATION_LEVEL)
fprintf(stderr, "%s", "Info: ");
vfprintf(stderr, format, args);
va_end(args);
fputc('\n', stderr);
fflush(stderr);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
default_reporter:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x32468
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 %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
cmpl $0x1, -0x4(%rbp)
jne 0x324d6
movq 0x211b1c(%rip), %rax # 0x243fd8
movq (%rax), %rdi
leaq 0xbf29c(%rip), %rsi # 0xf1762
leaq 0xbc32b(%rip), %rdx # 0xee7f8
movb $0x0, %al
callq 0x294e0
jmp 0x324fd
cmpl $0x2, -0x4(%rbp)
jne 0x324fb
movq 0x211af5(%rip), %rax # 0x243fd8
movq (%rax), %rdi
leaq 0xbf275(%rip), %rsi # 0xf1762
leaq 0xbc30e(%rip), %rdx # 0xee802
movb $0x0, %al
callq 0x294e0
jmp 0x324fd
movq 0x211ad4(%rip), %rax # 0x243fd8
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x29490
leaq -0x30(%rbp), %rax
movq 0x211ab9(%rip), %rax # 0x243fd8
movq (%rax), %rsi
movl $0xa, %edi
callq 0x29450
movq 0x211aa5(%rip), %rax # 0x243fd8
movq (%rax), %rdi
callq 0x293e0
jmp 0x3253d
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
default_reporter:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_32468
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_32468:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_E0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
cmp [rbp+var_4], 1
jnz short loc_324D6
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aAtLineDPosDS+13h; "%s"
lea rdx, aWarning_0; "Warning: "
mov al, 0
call _fprintf
jmp short loc_324FD
loc_324D6:
cmp [rbp+var_4], 2
jnz short loc_324FB
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aAtLineDPosDS+13h; "%s"
lea rdx, aInfo; "Info: "
mov al, 0
call _fprintf
loc_324FB:
jmp short $+2
loc_324FD:
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_30]
call _vfprintf
lea rax, [rbp+var_30]
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov edi, 0Ah
call _fputc
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fflush
jmp short $+2
loc_3253D:
add rsp, 0E0h
pop rbp
retn
|
long long default_reporter(int a1, long long a2, ...)
{
va_list va; // [rsp+B0h] [rbp-30h] BYREF
long long v4; // [rsp+D0h] [rbp-10h]
int v5; // [rsp+DCh] [rbp-4h]
va_start(va, a2);
v5 = a1;
v4 = a2;
if ( a1 == 1 )
{
fprintf(stderr, "%s", "Warning: ");
}
else if ( v5 == 2 )
{
fprintf(stderr, "%s", "Info: ");
}
vfprintf(stderr, v4, va);
fputc(10LL, stderr);
return fflush(stderr);
}
|
default_reporter:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x00132468
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_00132468:
MOV qword ptr [RBP + -0xb8],R9
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xd0],RDX
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0xe0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
CMP dword ptr [RBP + -0x4],0x1
JNZ 0x001324d6
MOV RAX,qword ptr [0x00343fd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1f1762]
LEA RDX,[0x1ee7f8]
MOV AL,0x0
CALL 0x001294e0
JMP 0x001324fd
LAB_001324d6:
CMP dword ptr [RBP + -0x4],0x2
JNZ 0x001324fb
MOV RAX,qword ptr [0x00343fd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1f1762]
LEA RDX,[0x1ee802]
MOV AL,0x0
CALL 0x001294e0
LAB_001324fb:
JMP 0x001324fd
LAB_001324fd:
MOV RAX,qword ptr [0x00343fd8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x30]
CALL 0x00129490
LEA RAX,[RBP + -0x30]
MOV RAX,qword ptr [0x00343fd8]
MOV RSI,qword ptr [RAX]
MOV EDI,0xa
CALL 0x00129450
MOV RAX,qword ptr [0x00343fd8]
MOV RDI,qword ptr [RAX]
CALL 0x001293e0
JMP 0x0013253d
LAB_0013253d:
ADD RSP,0xe0
POP RBP
RET
|
void default_reporter(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int param_9,char *param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 local_e8 [16];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int4 local_38;
int4 local_34;
int1 *local_30;
int1 *local_28;
char *local_18;
int local_c;
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;
local_30 = &stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
local_18 = param_10;
local_c = param_9;
if (param_9 == 1) {
fprintf(*(FILE **)PTR_stderr_00343fd8,"%s","Warning: ");
}
else if (param_9 == 2) {
fprintf(*(FILE **)PTR_stderr_00343fd8,"%s","Info: ");
}
vfprintf(*(FILE **)PTR_stderr_00343fd8,local_18,&local_38);
fputc(10,*(FILE **)PTR_stderr_00343fd8);
fflush(*(FILE **)PTR_stderr_00343fd8);
return;
}
|
|
14,573
|
translog_sync_files
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_sync_files(uint32 min, uint32 max,
my_bool sync_dir)
{
uint fn;
my_bool rc= 0;
ulonglong flush_interval;
DBUG_ENTER("translog_sync_files");
DBUG_PRINT("info", ("min: %lu max: %lu sync dir: %d",
(ulong) min, (ulong) max, (int) sync_dir));
DBUG_ASSERT(min <= max);
flush_interval= group_commit_wait;
if (flush_interval)
flush_start= microsecond_interval_timer();
for (fn= min; fn <= max; fn++)
{
TRANSLOG_FILE *file= get_logfile_by_number(fn);
DBUG_ASSERT(file != NULL);
if (!file->is_sync)
{
if (mysql_file_sync(file->handler.file, MYF(MY_WME)))
{
rc= 1;
translog_stop_writing();
DBUG_RETURN(rc);
}
translog_syncs++;
file->is_sync= 1;
}
}
if (sync_dir)
{
if (!(rc= sync_dir(log_descriptor.directory_fd,
MYF(MY_WME | MY_IGNORE_BADFD))))
translog_syncs++;
}
DBUG_RETURN(rc);
}
|
O3
|
c
|
translog_sync_files:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, -0x30(%rbp)
movl %esi, %r14d
movl %edi, %r15d
cmpl $0x0, 0xbc8551(%rip) # 0xbff264
je 0x36d36
callq 0x9e6cc
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
mulq %rcx
shrq $0x4, %rdx
movq %rdx, 0xbc851a(%rip) # 0xbff250
cmpl %r14d, %r15d
jbe 0x36d8d
cmpb $0x0, -0x30(%rbp)
je 0x36d86
movl 0x3c78e9(%rip), %ebx # 0x3fe630
leaq 0x34f2c2(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
movl $0x10, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x36e36
movl $0x30, %esi
movl %ebx, %edi
callq 0xa1614
testb %al, %al
jne 0x36e27
incq 0x3c63b2(%rip) # 0x3fd138
xorl %eax, %eax
jmp 0x36e27
leaq -0x78(%rbp), %r12
movl %r15d, %edi
callq 0x3844a
cmpb $0x0, 0x51(%rax)
jne 0x36de0
movq %rax, %r13
movl 0x18(%rax), %ebx
leaq 0x34f264(%rip), %rax # 0x386010
movq (%rax), %rax
movq %r12, %rdi
movl %ebx, %esi
movl $0x10, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x36ded
movl $0x10, %esi
movl %ebx, %edi
callq 0xa1614
testl %eax, %eax
jne 0x36e00
incq 0x3c635d(%rip) # 0x3fd138
movb $0x1, 0x51(%r13)
incl %r15d
cmpl %r14d, %r15d
jbe 0x36d91
jmp 0x36d3b
movq %rax, %rdi
movl %ebx, %esi
leaq -0x2c(%rbp), %rdx
callq 0x2bebd
movl -0x2c(%rbp), %eax
jmp 0x36dd0
xorl %eax, %eax
cmpl $0x3, 0x3c6327(%rip) # 0x3fd130
setne %al
addl %eax, %eax
movl %eax, 0x3c631c(%rip) # 0x3fd130
movb $0x1, 0xbc83f5(%rip) # 0xbff210
movl $0x0, 0x3c7527(%rip) # 0x3fe34c
movb $0x1, %al
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x2c(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x2bf16
movl (%r14), %eax
jmp 0x36d77
|
translog_sync_files:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_30], edx
mov r14d, esi
mov r15d, edi
cmp cs:group_commit_wait, 0
jz short loc_36D36
call my_interval_timer
shr rax, 3
mov rcx, 20C49BA5E353F7CFh
mul rcx
shr rdx, 4
mov cs:flush_start, rdx
loc_36D36:
cmp r15d, r14d
jbe short loc_36D8D
loc_36D3B:
cmp byte ptr [rbp+var_30], 0
jz short loc_36D86
mov ebx, cs:dword_3FE630
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
mov esi, ebx
mov edx, 10h
call qword ptr [rax+158h]
test rax, rax
jnz loc_36E36
mov esi, 30h ; '0'
mov edi, ebx
call my_sync
loc_36D77:
test al, al
jnz loc_36E27
inc cs:translog_syncs
loc_36D86:
xor eax, eax
jmp loc_36E27
loc_36D8D:
lea r12, [rbp+var_78]
loc_36D91:
mov edi, r15d
call get_logfile_by_number
cmp byte ptr [rax+51h], 0
jnz short loc_36DE0
mov r13, rax
mov ebx, [rax+18h]
lea rax, PSI_server
mov rax, [rax]
mov rdi, r12
mov esi, ebx
mov edx, 10h
call qword ptr [rax+158h]
test rax, rax
jnz short loc_36DED
mov esi, 10h
mov edi, ebx
call my_sync
loc_36DD0:
test eax, eax
jnz short loc_36E00
inc cs:translog_syncs
mov byte ptr [r13+51h], 1
loc_36DE0:
inc r15d
cmp r15d, r14d
jbe short loc_36D91
jmp loc_36D3B
loc_36DED:
mov rdi, rax
mov esi, ebx
lea rdx, [rbp+var_2C]
call translog_sync_files_cold_1
mov eax, [rbp+var_2C]
jmp short loc_36DD0
loc_36E00:
xor eax, eax
cmp cs:translog_status, 3
setnz al
add eax, eax
mov cs:translog_status, eax
mov byte ptr cs:word_BFF210, 1
mov cs:dword_3FE34C, 0
mov al, 1
loc_36E27:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_36E36:
lea r14, [rbp+var_2C]
mov rdi, rax
mov esi, ebx
mov rdx, r14
call translog_sync_files_cold_2
mov eax, [r14]
jmp loc_36D77
|
char translog_sync_files(unsigned int a1, unsigned int a2, int a3)
{
unsigned int v3; // r15d
unsigned int v4; // ebx
long long v5; // rax
char result; // al
long long logfile_by_number; // rax
long long v8; // r13
unsigned int v9; // ebx
long long v10; // rax
int v11; // eax
_BYTE v12[72]; // [rsp+8h] [rbp-78h] BYREF
int v13; // [rsp+50h] [rbp-30h]
_DWORD v14[11]; // [rsp+54h] [rbp-2Ch] BYREF
v13 = a3;
v3 = a1;
if ( group_commit_wait )
flush_start = my_interval_timer() / 0x3E8uLL;
if ( a1 <= a2 )
{
do
{
logfile_by_number = get_logfile_by_number(v3);
if ( !*(_BYTE *)(logfile_by_number + 81) )
{
v8 = logfile_by_number;
v9 = *(_DWORD *)(logfile_by_number + 24);
v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, v9, 16LL);
if ( v10 )
{
translog_sync_files_cold_1(v10, v9, v14);
v11 = v14[0];
}
else
{
v11 = my_sync(v9, 16LL);
}
if ( v11 )
{
translog_status = 2 * (translog_status != 3);
LOBYTE(word_BFF210) = 1;
dword_3FE34C = 0;
return 1;
}
++translog_syncs;
*(_BYTE *)(v8 + 81) = 1;
}
++v3;
}
while ( v3 <= a2 );
}
if ( !(_BYTE)v13 )
return 0;
v4 = dword_3FE630;
v5 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, (unsigned int)dword_3FE630, 16LL);
if ( v5 )
{
translog_sync_files_cold_2(v5, v4, v14);
result = v14[0];
}
else
{
result = my_sync(v4, 48LL);
}
if ( !result )
{
++translog_syncs;
return 0;
}
return result;
}
|
translog_sync_files:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV dword ptr [RBP + -0x30],EDX
MOV R14D,ESI
MOV R15D,EDI
CMP dword ptr [0x00cff264],0x0
JZ 0x00136d36
CALL 0x0019e6cc
SHR RAX,0x3
MOV RCX,0x20c49ba5e353f7cf
MUL RCX
SHR RDX,0x4
MOV qword ptr [0x00cff250],RDX
LAB_00136d36:
CMP R15D,R14D
JBE 0x00136d8d
LAB_00136d3b:
CMP byte ptr [RBP + -0x30],0x0
JZ 0x00136d86
MOV EBX,dword ptr [0x004fe630]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
MOV ESI,EBX
MOV EDX,0x10
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00136e36
MOV ESI,0x30
MOV EDI,EBX
CALL 0x001a1614
LAB_00136d77:
TEST AL,AL
JNZ 0x00136e27
INC qword ptr [0x004fd138]
LAB_00136d86:
XOR EAX,EAX
JMP 0x00136e27
LAB_00136d8d:
LEA R12,[RBP + -0x78]
LAB_00136d91:
MOV EDI,R15D
CALL 0x0013844a
CMP byte ptr [RAX + 0x51],0x0
JNZ 0x00136de0
MOV R13,RAX
MOV EBX,dword ptr [RAX + 0x18]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RDI,R12
MOV ESI,EBX
MOV EDX,0x10
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00136ded
MOV ESI,0x10
MOV EDI,EBX
CALL 0x001a1614
LAB_00136dd0:
TEST EAX,EAX
JNZ 0x00136e00
INC qword ptr [0x004fd138]
MOV byte ptr [R13 + 0x51],0x1
LAB_00136de0:
INC R15D
CMP R15D,R14D
JBE 0x00136d91
JMP 0x00136d3b
LAB_00136ded:
MOV RDI,RAX
MOV ESI,EBX
LEA RDX,[RBP + -0x2c]
CALL 0x0012bebd
MOV EAX,dword ptr [RBP + -0x2c]
JMP 0x00136dd0
LAB_00136e00:
XOR EAX,EAX
CMP dword ptr [0x004fd130],0x3
SETNZ AL
ADD EAX,EAX
MOV dword ptr [0x004fd130],EAX
MOV byte ptr [0x00cff210],0x1
MOV dword ptr [0x004fe34c],0x0
MOV AL,0x1
LAB_00136e27:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00136e36:
LEA R14,[RBP + -0x2c]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x0012bf16
MOV EAX,dword ptr [R14]
JMP 0x00136d77
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong translog_sync_files(uint param_1,uint param_2,int4 param_3)
{
int4 uVar1;
uint uVar2;
ulong uVar3;
long lVar4;
long lVar5;
int1 local_80 [72];
int4 local_38;
uint local_34;
local_38 = param_3;
if (group_commit_wait != 0) {
uVar3 = my_interval_timer();
flush_start = uVar3 / 1000;
}
if (param_1 <= param_2) {
do {
lVar4 = get_logfile_by_number(param_1);
if (*(char *)(lVar4 + 0x51) == '\0') {
uVar1 = *(int4 *)(lVar4 + 0x18);
lVar5 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,0x10);
if (lVar5 == 0) {
uVar2 = my_sync(uVar1,0x10);
}
else {
translog_sync_files_cold_1(lVar5,uVar1,&local_34);
uVar2 = local_34;
}
if (uVar2 != 0) {
translog_status = (uint)(translog_status != 3) * 2;
_DAT_004fe34c = 0;
DAT_00cff210 = 1;
return 1;
}
translog_syncs = translog_syncs + 1;
*(int1 *)(lVar4 + 0x51) = 1;
}
param_1 = param_1 + 1;
} while (param_1 <= param_2);
}
uVar1 = DAT_004fe630;
if ((char)local_38 != '\0') {
lVar4 = (**(code **)(PSI_server + 0x158))(local_80,DAT_004fe630,0x10);
if (lVar4 == 0) {
uVar3 = my_sync(uVar1,0x30);
}
else {
translog_sync_files_cold_2(lVar4,uVar1,&local_34);
uVar3 = (ulong)local_34;
}
if ((char)uVar3 != '\0') {
return uVar3;
}
translog_syncs = translog_syncs + 1;
}
return 0;
}
|
|
14,574
|
queue_remove
|
eloqsql/mysys/queues.c
|
uchar *queue_remove(QUEUE *queue, uint idx)
{
uchar *element;
DBUG_ASSERT(idx >= 1);
DBUG_ASSERT(idx <= queue->elements);
element= queue->root[idx];
queue->root[idx]= queue->root[queue->elements--];
queue_replace(queue, idx);
return element;
}
|
O0
|
c
|
queue_remove:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0x87411
jmp 0x87413
jmp 0x87415
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rdx
movl 0x10(%rdx), %ecx
movl %ecx, %esi
addl $-0x1, %esi
movl %esi, 0x10(%rdx)
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0xc(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x87470
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
queue_remove:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_87411:
jmp short $+2
loc_87413:
jmp short $+2
loc_87415:
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_C]
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov rdx, [rbp+var_8]
mov ecx, [rdx+10h]
mov esi, ecx
add esi, 0FFFFFFFFh
mov [rdx+10h], esi
mov ecx, ecx
mov rdx, [rax+rcx*8]
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_C]
mov [rax+rcx*8], rdx
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
call queue_replace
mov rax, [rbp+var_18]
add rsp, 20h
pop rbp
retn
|
long long queue_remove(long long *a1, unsigned int a2)
{
long long v2; // rax
unsigned int v3; // ecx
long long v5; // [rsp+8h] [rbp-18h]
v5 = *(_QWORD *)(*a1 + 8LL * a2);
v2 = *a1;
v3 = *((_DWORD *)a1 + 4);
*((_DWORD *)a1 + 4) = v3 - 1;
*(_QWORD *)(*a1 + 8LL * a2) = *(_QWORD *)(v2 + 8LL * v3);
queue_replace(a1, a2);
return v5;
}
|
queue_remove:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
JMP 0x00187411
LAB_00187411:
JMP 0x00187413
LAB_00187413:
JMP 0x00187415
LAB_00187415:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RDX + 0x10]
MOV ESI,ECX
ADD ESI,-0x1
MOV dword ptr [RDX + 0x10],ESI
MOV ECX,ECX
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x00187470
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x20
POP RBP
RET
|
int8 queue_remove(long *param_1,uint param_2)
{
uint uVar1;
int8 uVar2;
uVar2 = *(int8 *)(*param_1 + (ulong)param_2 * 8);
uVar1 = *(uint *)(param_1 + 2);
*(uint *)(param_1 + 2) = uVar1 - 1;
*(int8 *)(*param_1 + (ulong)param_2 * 8) = *(int8 *)(*param_1 + (ulong)uVar1 * 8);
queue_replace(param_1,param_2);
return uVar2;
}
|
|
14,575
|
queue_remove
|
eloqsql/mysys/queues.c
|
uchar *queue_remove(QUEUE *queue, uint idx)
{
uchar *element;
DBUG_ASSERT(idx >= 1);
DBUG_ASSERT(idx <= queue->elements);
element= queue->root[idx];
queue->root[idx]= queue->root[queue->elements--];
queue_replace(queue, idx);
return element;
}
|
O3
|
c
|
queue_remove:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rbx
movl 0x10(%rdi), %edx
leal -0x1(%rdx), %r8d
movl %r8d, 0x10(%rdi)
movq (%rax,%rdx,8), %rdx
movq %rdx, (%rax,%rcx,8)
callq 0x5f4af
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
queue_remove:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi]
mov ecx, esi
mov rbx, [rax+rcx*8]
mov edx, [rdi+10h]
lea r8d, [rdx-1]
mov [rdi+10h], r8d
mov rdx, [rax+rdx*8]
mov [rax+rcx*8], rdx
call queue_replace
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
retn
|
long long queue_remove(long long *a1, unsigned int a2)
{
long long v2; // rax
long long v3; // rbx
long long v4; // rdx
v2 = *a1;
v3 = *(_QWORD *)(*a1 + 8LL * a2);
v4 = *((unsigned int *)a1 + 4);
*((_DWORD *)a1 + 4) = v4 - 1;
*(_QWORD *)(v2 + 8LL * a2) = *(_QWORD *)(v2 + 8 * v4);
queue_replace(a1);
return v3;
}
|
queue_remove:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV ECX,ESI
MOV RBX,qword ptr [RAX + RCX*0x8]
MOV EDX,dword ptr [RDI + 0x10]
LEA R8D,[RDX + -0x1]
MOV dword ptr [RDI + 0x10],R8D
MOV RDX,qword ptr [RAX + RDX*0x8]
MOV qword ptr [RAX + RCX*0x8],RDX
CALL 0x0015f4af
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 queue_remove(long *param_1,uint param_2)
{
uint uVar1;
long lVar2;
int8 uVar3;
lVar2 = *param_1;
uVar3 = *(int8 *)(lVar2 + (ulong)param_2 * 8);
uVar1 = *(uint *)(param_1 + 2);
*(uint *)(param_1 + 2) = uVar1 - 1;
*(int8 *)(lVar2 + (ulong)param_2 * 8) = *(int8 *)(lVar2 + (ulong)uVar1 * 8);
queue_replace();
return uVar3;
}
|
|
14,576
|
void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<unsigned char, 0>(unsigned char)
|
monkey531[P]llama/common/./json.hpp
|
void dump_integer(NumberType x)
{
static constexpr std::array<std::array<char, 2>, 100> digits_to_99
{
{
{{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}},
{{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}},
{{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}},
{{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}},
{{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}},
{{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}},
{{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}},
{{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}},
{{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}},
{{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}},
}
};
// special case for "0"
if (x == 0)
{
o->write_character('0');
return;
}
// use a pointer to fill the buffer
auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)
number_unsigned_t abs_value;
unsigned int n_chars{};
if (is_negative_number(x))
{
*buffer_ptr = '-';
abs_value = remove_sign(static_cast<number_integer_t>(x));
// account one more byte for the minus sign
n_chars = 1 + count_digits(abs_value);
}
else
{
abs_value = static_cast<number_unsigned_t>(x);
n_chars = count_digits(abs_value);
}
// spare 1 byte for '\0'
JSON_ASSERT(n_chars < number_buffer.size() - 1);
// jump to the end to generate the string from backward,
// so we later avoid reversing the result
buffer_ptr += n_chars;
// Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu
// See: https://www.youtube.com/watch?v=o4-CwDo2zpg
while (abs_value >= 100)
{
const auto digits_index = static_cast<unsigned>((abs_value % 100));
abs_value /= 100;
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
if (abs_value >= 10)
{
const auto digits_index = static_cast<unsigned>(abs_value);
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
else
{
*(--buffer_ptr) = static_cast<char>('0' + abs_value);
}
o->write_characters(number_buffer.data(), n_chars);
}
|
O0
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<unsigned char, 0>(unsigned char):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x11813c
movq 0x10(%rsp), %rdi
callq 0x116c30
movq %rax, %rdi
movq (%rdi), %rax
movl $0x30, %esi
callq *(%rax)
jmp 0x118386
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
callq 0x118bc0
movq 0x10(%rsp), %rdi
movq %rax, 0x30(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x38(%rsp), %rsi
callq 0x118e90
testb $0x1, %al
jne 0x11816c
jmp 0x1181a0
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rax
movb $0x2d, (%rax)
movq 0x38(%rsp), %rsi
callq 0x118bf0
movq 0x10(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x118c70
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x1181bd
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x118c70
movl %eax, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movq %rax, 0x8(%rsp)
addq $0x10, %rdi
callq 0x118d00
movq %rax, %rcx
movq 0x8(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1181e7
jmp 0x118206
leaq 0xbc02b(%rip), %rdi # 0x1d4219
leaq 0xb4727(%rip), %rsi # 0x1cc91c
movl $0x4952, %edx # imm = 0x4952
leaq 0xbc2b6(%rip), %rcx # 0x1d44b7
callq 0x50230
movl 0x24(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
cmpq $0x64, 0x28(%rsp)
jb 0x1182bc
movq 0x28(%rsp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, 0x28(%rsp)
movl 0x20(%rsp), %eax
movl %eax, %esi
leaq 0xc05b9(%rip), %rdi # 0x1d8814
callq 0x118d10
movq %rax, %rdi
movl $0x1, %esi
callq 0x118d40
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
movl 0x20(%rsp), %eax
movl %eax, %esi
leaq 0xc0584(%rip), %rdi # 0x1d8814
callq 0x118d10
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x118d40
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
jmp 0x118219
cmpq $0xa, 0x28(%rsp)
jb 0x118338
movq 0x28(%rsp), %rax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, %esi
leaq 0xc053a(%rip), %rdi # 0x1d8814
callq 0x118d10
movq %rax, %rdi
movl $0x1, %esi
callq 0x118d40
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
movl 0x1c(%rsp), %eax
movl %eax, %esi
leaq 0xc0505(%rip), %rdi # 0x1d8814
callq 0x118d10
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x118d40
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
jmp 0x118357
movq 0x28(%rsp), %rax
addq $0x30, %rax
movb %al, %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
movq 0x10(%rsp), %rdi
callq 0x116c30
movq 0x10(%rsp), %rdi
movq %rax, (%rsp)
addq $0x10, %rdi
callq 0x118d70
movq (%rsp), %rdi
movq %rax, %rsi
movl 0x24(%rsp), %eax
movl %eax, %edx
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x48, %rsp
retq
nopl (%rax,%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rax, [rsp+48h+var_8]
mov [rsp+48h+var_38], rax
cmp [rsp+48h+var_10], 0
jnz short loc_11813C
mov rdi, [rsp+48h+var_38]
call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rax, [rdi]
mov esi, 30h ; '0'
call qword ptr [rax]
jmp loc_118386
loc_11813C:
mov rdi, [rsp+48h+var_38]
add rdi, 10h
call _ZNSt5arrayIcLm64EE5beginEv; std::array<char,64ul>::begin(void)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_18], rax
mov [rsp+48h+var_24], 0
mov rsi, [rsp+48h+var_10]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE18is_negative_numberIlTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueEiE4typeELi0EEEbSJ_
test al, 1
jnz short loc_11816C
jmp short loc_1181A0
loc_11816C:
mov rdi, [rsp+48h+var_38]
mov rax, [rsp+48h+var_18]
mov byte ptr [rax], 2Dh ; '-'
mov rsi, [rsp+48h+var_10]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11remove_signEl; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::remove_sign(long)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_20], rax
mov rsi, [rsp+48h+var_20]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12count_digitsEm; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(ulong)
add eax, 1
mov [rsp+48h+var_24], eax
jmp short loc_1181BD
loc_1181A0:
mov rdi, [rsp+48h+var_38]
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_20], rax
mov rsi, [rsp+48h+var_20]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12count_digitsEm; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(ulong)
mov [rsp+48h+var_24], eax
loc_1181BD:
mov rdi, [rsp+48h+var_38]
mov eax, [rsp+48h+var_24]
mov [rsp+48h+var_40], rax
add rdi, 10h
call _ZNKSt5arrayIcLm64EE4sizeEv; std::array<char,64ul>::size(void)
mov rcx, rax
mov rax, [rsp+48h+var_40]
sub rcx, 1
cmp rax, rcx
jnb short loc_1181E7
jmp short loc_118206
loc_1181E7:
lea rdi, aNCharsNumberBu; "n_chars < number_buffer.size() - 1"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 4952h
lea rcx, aVoidNlohmannDe_8; "void nlohmann::detail::serializer<nlohm"...
call ___assert_fail
loc_118206:
mov ecx, [rsp+48h+var_24]
mov rax, [rsp+48h+var_18]
mov ecx, ecx
add rax, rcx
mov [rsp+48h+var_18], rax
loc_118219:
cmp [rsp+48h+var_20], 64h ; 'd'
jb loc_1182BC
mov rax, [rsp+48h+var_20]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov eax, edx
mov [rsp+48h+var_28], eax
mov rax, [rsp+48h+var_20]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov [rsp+48h+var_20], rax
mov eax, [rsp+48h+var_28]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
mov esi, 1
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
mov eax, [rsp+48h+var_28]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
xor eax, eax
mov esi, eax
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
jmp loc_118219
loc_1182BC:
cmp [rsp+48h+var_20], 0Ah
jb short loc_118338
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_2C], eax
mov eax, [rsp+48h+var_2C]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
mov esi, 1
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
mov eax, [rsp+48h+var_2C]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
xor eax, eax
mov esi, eax
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
jmp short loc_118357
loc_118338:
mov rax, [rsp+48h+var_20]
add rax, 30h ; '0'
mov cl, al
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
loc_118357:
mov rdi, [rsp+48h+var_38]
call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_48], rax
add rdi, 10h
call _ZNSt5arrayIcLm64EE4dataEv; std::array<char,64ul>::data(void)
mov rdi, [rsp+48h+var_48]
mov rsi, rax
mov eax, [rsp+48h+var_24]
mov edx, eax
mov rax, [rdi]
call qword ptr [rax+8]
loc_118386:
add rsp, 48h
retn
|
long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_(
long long a1,
unsigned long long a2)
{
long long ( ***v2)(_QWORD, long long); // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // [rsp+0h] [rbp-48h]
unsigned int v10; // [rsp+20h] [rbp-28h]
unsigned int v11; // [rsp+24h] [rbp-24h]
unsigned long long v12; // [rsp+28h] [rbp-20h]
_BYTE *v13; // [rsp+30h] [rbp-18h]
_BYTE *v14; // [rsp+30h] [rbp-18h]
if ( a2 )
{
v13 = (_BYTE *)std::array<char,64ul>::begin(a1 + 16);
if ( (ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE18is_negative_numberIlTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueEiE4typeELi0EEEbSJ_(
a1,
a2) & 1) != 0 )
{
*v13 = 45;
v12 = nlohmann::json_abi_v3_11_3::detail::serializer<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>>::remove_sign(
a1,
a2);
v11 = nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(
a1,
v12)
+ 1;
}
else
{
v12 = a2;
v11 = nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(
a1,
a2);
}
if ( v11 >= (unsigned long long)(std::array<char,64ul>::size(a1 + 16) - 1) )
__assert_fail(
"n_chars < number_buffer.size() - 1",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
18770LL,
"void nlohmann::detail::serializer<nlohmann::basic_json<nlohmann::ordered_map>>::dump_integer(NumberType) [BasicJ"
"sonType = nlohmann::basic_json<nlohmann::ordered_map>, NumberType = long]");
v14 = &v13[v11];
while ( v12 >= 0x64 )
{
v10 = v12 % 0x64;
v12 /= 0x64uLL;
v4 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
v10);
*(v14 - 1) = *(_BYTE *)std::array<char,2ul>::operator[](v4, 1LL);
v5 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
v10);
v14 -= 2;
*v14 = *(_BYTE *)std::array<char,2ul>::operator[](v5, 0LL);
}
if ( v12 < 0xA )
{
*(v14 - 1) = v12 + 48;
}
else
{
v6 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
(unsigned int)v12);
*(v14 - 1) = *(_BYTE *)std::array<char,2ul>::operator[](v6, 1LL);
v7 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
(unsigned int)v12);
*(v14 - 2) = *(_BYTE *)std::array<char,2ul>::operator[](v7, 0LL);
}
v9 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1);
v8 = std::array<char,64ul>::data(a1 + 16);
return (*(long long ( **)(long long, long long, _QWORD))(*(_QWORD *)v9 + 8LL))(v9, v8, v11);
}
else
{
v2 = (long long ( ***)(_QWORD, long long))std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1);
return (**v2)(v2, 48LL);
}
}
| |||
14,577
|
void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<unsigned char, 0>(unsigned char)
|
monkey531[P]llama/common/./json.hpp
|
void dump_integer(NumberType x)
{
static constexpr std::array<std::array<char, 2>, 100> digits_to_99
{
{
{{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}},
{{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}},
{{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}},
{{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}},
{{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}},
{{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}},
{{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}},
{{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}},
{{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}},
{{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}},
}
};
// special case for "0"
if (x == 0)
{
o->write_character('0');
return;
}
// use a pointer to fill the buffer
auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)
number_unsigned_t abs_value;
unsigned int n_chars{};
if (is_negative_number(x))
{
*buffer_ptr = '-';
abs_value = remove_sign(static_cast<number_integer_t>(x));
// account one more byte for the minus sign
n_chars = 1 + count_digits(abs_value);
}
else
{
abs_value = static_cast<number_unsigned_t>(x);
n_chars = count_digits(abs_value);
}
// spare 1 byte for '\0'
JSON_ASSERT(n_chars < number_buffer.size() - 1);
// jump to the end to generate the string from backward,
// so we later avoid reversing the result
buffer_ptr += n_chars;
// Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu
// See: https://www.youtube.com/watch?v=o4-CwDo2zpg
while (abs_value >= 100)
{
const auto digits_index = static_cast<unsigned>((abs_value % 100));
abs_value /= 100;
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
if (abs_value >= 10)
{
const auto digits_index = static_cast<unsigned>(abs_value);
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
else
{
*(--buffer_ptr) = static_cast<char>('0' + abs_value);
}
o->write_characters(number_buffer.data(), n_chars);
}
|
O3
|
cpp
|
void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<unsigned char, 0>(unsigned char):
testl %esi, %esi
je 0x66c1c
movl %esi, %eax
leaq 0x10(%rdi), %rsi
movzbl %al, %ecx
movl $0x1, %edx
cmpb $0xa, %cl
jb 0x66c02
movl $0x2, %edx
cmpb $0x64, %al
jae 0x66c2c
leaq (%rsi,%rdx), %r8
cmpb $0xa, %al
jb 0x66c57
leaq 0x58711(%rip), %rax # 0xbf322
movzwl (%rax,%rcx,2), %eax
movw %ax, -0x2(%r8)
jmp 0x66c5d
movq (%rdi), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movl $0x30, %esi
jmpq *%rax
leal (%rcx,%rcx,4), %edx
leal (%rcx,%rdx,8), %ecx
shrl $0xc, %ecx
imull $0x64, %ecx, %edx
subb %dl, %al
movzbl %al, %eax
leaq 0x586de(%rip), %rdx # 0xbf322
movzwl (%rdx,%rax,2), %eax
leaq 0x11(%rdi), %r8
movw %ax, 0x11(%rdi)
movl $0x3, %edx
movl %ecx, %eax
orb $0x30, %al
movb %al, -0x1(%r8)
movq (%rdi), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
jmpq *%rax
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
test esi, esi
jz short loc_66C1C
mov eax, esi
lea rsi, [rdi+10h]
movzx ecx, al
mov edx, 1
cmp cl, 0Ah
jb short loc_66C02
mov edx, 2
cmp al, 64h ; 'd'
jnb short loc_66C2C
loc_66C02:
lea r8, [rsi+rdx]
cmp al, 0Ah
jb short loc_66C57
lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
movzx eax, word ptr [rax+rcx*2]
mov [r8-2], ax
jmp short loc_66C5D
loc_66C1C:
mov rdi, [rdi]
mov rax, [rdi]
mov rax, [rax]
mov esi, 30h ; '0'
jmp rax
loc_66C2C:
lea edx, [rcx+rcx*4]
lea ecx, [rcx+rdx*8]
shr ecx, 0Ch
imul edx, ecx, 64h ; 'd'
sub al, dl
movzx eax, al
lea rdx, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
movzx eax, word ptr [rdx+rax*2]
lea r8, [rdi+11h]
mov [rdi+11h], ax
mov edx, 3
mov eax, ecx
loc_66C57:
or al, 30h
mov [r8-1], al
loc_66C5D:
mov rdi, [rdi]
mov rax, [rdi]
mov rax, [rax+8]
jmp rax
|
long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_(
_QWORD *a1,
int a2)
{
char v2; // al
long long v3; // rdx
char *v4; // r8
if ( !a2 )
return (**(long long ( ***)(_QWORD, long long))*a1)(*a1, 48LL);
v2 = a2;
v3 = 1LL;
if ( (unsigned __int8)a2 >= 0xAu )
{
v3 = 2LL;
if ( (unsigned __int8)a2 >= 0x64u )
{
v4 = (char *)a1 + 17;
*(_WORD *)((char *)a1 + 17) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[(unsigned __int8)a2 % 0x64u];
v2 = (unsigned __int8)a2 / 0x64u;
goto LABEL_8;
}
}
v4 = (char *)a1 + v3 + 16;
if ( (unsigned __int8)a2 < 0xAu )
{
LABEL_8:
*(v4 - 1) = v2 | 0x30;
return (*(long long ( **)(_QWORD))(*(_QWORD *)*a1 + 8LL))(*a1);
}
*((_WORD *)v4 - 1) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[(unsigned __int8)a2];
return (*(long long ( **)(_QWORD))(*(_QWORD *)*a1 + 8LL))(*a1);
}
|
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
TEST ESI,ESI
JZ 0x00166c1c
MOV EAX,ESI
LEA RSI,[RDI + 0x10]
MOVZX ECX,AL
MOV EDX,0x1
CMP CL,0xa
JC 0x00166c02
MOV EDX,0x2
CMP AL,0x64
JNC 0x00166c2c
LAB_00166c02:
LEA R8,[RSI + RDX*0x1]
CMP AL,0xa
JC 0x00166c57
LEA RAX,[0x1bf322]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV word ptr [R8 + -0x2],AX
JMP 0x00166c5d
LAB_00166c1c:
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX]
MOV ESI,0x30
JMP RAX
LAB_00166c2c:
LEA EDX,[RCX + RCX*0x4]
LEA ECX,[RCX + RDX*0x8]
SHR ECX,0xc
IMUL EDX,ECX,0x64
SUB AL,DL
MOVZX EAX,AL
LEA RDX,[0x1bf322]
MOVZX EAX,word ptr [RDX + RAX*0x2]
LEA R8,[RDI + 0x11]
MOV word ptr [RDI + 0x11],AX
MOV EDX,0x3
MOV EAX,ECX
LAB_00166c57:
OR AL,0x30
MOV byte ptr [R8 + -0x1],AL
LAB_00166c5d:
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
JMP RAX
|
void _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_
(int8 *param_1,uint param_2)
{
byte bVar1;
byte bVar2;
long lVar3;
long lVar4;
if (param_2 == 0) {
/* WARNING: Could not recover jumptable at 0x00166c2a. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)**(int8 **)*param_1)((int8 *)*param_1,0x30);
return;
}
bVar1 = (byte)param_2;
lVar3 = 1;
if ((bVar1 < 10) || (lVar3 = 2, bVar1 < 100)) {
lVar4 = (long)(param_1 + 2) + lVar3;
bVar2 = bVar1;
if (9 < bVar1) {
*(int2 *)(lVar4 + -2) =
*(int2 *)
(
_ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
+ (ulong)bVar1 * 2);
goto LAB_00166c5d;
}
}
else {
bVar2 = (byte)((param_2 & 0xff) + ((param_2 & 0xff) + (param_2 & 0xff) * 4) * 8 >> 0xc);
lVar4 = (long)param_1 + 0x11;
*(int2 *)((long)param_1 + 0x11) =
*(int2 *)
(
_ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
+ (ulong)(byte)(bVar1 + bVar2 * -100) * 2);
lVar3 = 3;
}
*(byte *)(lVar4 + -1) = bVar2 | 0x30;
LAB_00166c5d:
/* WARNING: Could not recover jumptable at 0x00166c67. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(long *)*param_1 + 8))((long *)*param_1,param_1 + 2,lVar3);
return;
}
|
|
14,578
|
my_strnncoll_latin1_de
|
eloqsql/strings/ctype-latin1.c
|
static int my_strnncoll_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
const uchar *a, size_t a_length,
const uchar *b, size_t b_length,
my_bool b_is_prefix)
{
const uchar *a_end= a + a_length;
const uchar *b_end= b + b_length;
uchar a_char, a_extend= 0, b_char, b_extend= 0;
while ((a < a_end || a_extend) && (b < b_end || b_extend))
{
if (a_extend)
{
a_char=a_extend; a_extend=0;
}
else
{
a_extend=combo2map[*a];
a_char=combo1map[*a++];
}
if (b_extend)
{
b_char=b_extend; b_extend=0;
}
else
{
b_extend=combo2map[*b];
b_char=combo1map[*b++];
}
if (a_char != b_char)
return (int) a_char - (int) b_char;
}
/*
A simple test of string lengths won't work -- we test to see
which string ran out first
*/
return ((a < a_end || a_extend) ? (b_is_prefix ? 0 : 1) :
(b < b_end || b_extend) ? -1 : 0);
}
|
O3
|
c
|
my_strnncoll_latin1_de:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
addq %rsi, %rdx
addq %rcx, %r8
xorl %r10d, %r10d
leaq 0x16fa70(%rip), %rax # 0x1df470
leaq 0x16f969(%rip), %rdi # 0x1df370
xorl %r11d, %r11d
cmpq %r8, %rcx
setb %r14b
testb %r11b, %r11b
setne %bl
orb %r14b, %bl
cmpq %rdx, %rsi
jb 0x6fa24
testb %r10b, %r10b
je 0x6fa6e
testb %bl, %bl
je 0x6fa75
testb %r10b, %r10b
je 0x6fa35
movl %r10d, %ebx
xorl %r10d, %r10d
jmp 0x6fa42
movzbl (%rsi), %ebx
movb (%rbx,%rax), %r10b
incq %rsi
movb (%rbx,%rdi), %bl
testb %r11b, %r11b
je 0x6fa4f
movl %r11d, %r14d
xorl %r11d, %r11d
jmp 0x6fa5e
movzbl (%rcx), %r14d
movb (%r14,%rax), %r11b
incq %rcx
movb (%r14,%rdi), %r14b
cmpb %r14b, %bl
je 0x6fa0a
movzbl %r14b, %ecx
movzbl %bl, %eax
subl %ecx, %eax
jmp 0x6fa7d
movzbl %bl, %eax
negl %eax
jmp 0x6fa7d
xorl %eax, %eax
testb %r9b, %r9b
sete %al
popq %rbx
popq %r14
popq %rbp
retq
|
my_strnncoll_latin1_de:
push rbp
mov rbp, rsp
push r14
push rbx
add rdx, rsi
add r8, rcx
xor r10d, r10d
lea rax, combo2map
lea rdi, combo1map
xor r11d, r11d
loc_6FA0A:
cmp rcx, r8
setb r14b
test r11b, r11b
setnz bl
or bl, r14b
cmp rsi, rdx
jb short loc_6FA24
test r10b, r10b
jz short loc_6FA6E
loc_6FA24:
test bl, bl
jz short loc_6FA75
test r10b, r10b
jz short loc_6FA35
mov ebx, r10d
xor r10d, r10d
jmp short loc_6FA42
loc_6FA35:
movzx ebx, byte ptr [rsi]
mov r10b, [rbx+rax]
inc rsi
mov bl, [rbx+rdi]
loc_6FA42:
test r11b, r11b
jz short loc_6FA4F
mov r14d, r11d
xor r11d, r11d
jmp short loc_6FA5E
loc_6FA4F:
movzx r14d, byte ptr [rcx]
mov r11b, [r14+rax]
inc rcx
mov r14b, [r14+rdi]
loc_6FA5E:
cmp bl, r14b
jz short loc_6FA0A
movzx ecx, r14b
movzx eax, bl
sub eax, ecx
jmp short loc_6FA7D
loc_6FA6E:
movzx eax, bl
neg eax
jmp short loc_6FA7D
loc_6FA75:
xor eax, eax
test r9b, r9b
setz al
loc_6FA7D:
pop rbx
pop r14
pop rbp
retn
|
long long my_strnncoll_latin1_de(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 *a4,
long long a5,
char a6)
{
unsigned __int8 *v6; // rdx
unsigned __int8 *v7; // r8
unsigned __int8 v8; // r10
unsigned __int8 v9; // r11
bool v10; // bl
unsigned __int8 v11; // bl
long long v12; // rbx
unsigned __int8 v13; // r14
long long v14; // r14
v6 = &a2[a3];
v7 = &a4[a5];
v8 = 0;
v9 = 0;
while ( 1 )
{
v10 = a4 < v7 || v9 != 0;
if ( a2 >= v6 && !v8 )
return (unsigned int)-v10;
if ( !v10 )
break;
if ( v8 )
{
v11 = v8;
v8 = 0;
}
else
{
v12 = *a2;
v8 = combo2map[v12];
++a2;
v11 = combo1map[v12];
}
if ( v9 )
{
v13 = v9;
v9 = 0;
}
else
{
v14 = *a4;
v9 = combo2map[v14];
++a4;
v13 = combo1map[v14];
}
if ( v11 != v13 )
return v11 - (unsigned int)v13;
}
return a6 == 0;
}
|
my_strnncoll_latin1_de:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
ADD RDX,RSI
ADD R8,RCX
XOR R10D,R10D
LEA RAX,[0x2df470]
LEA RDI,[0x2df370]
XOR R11D,R11D
LAB_0016fa0a:
CMP RCX,R8
SETC R14B
TEST R11B,R11B
SETNZ BL
OR BL,R14B
CMP RSI,RDX
JC 0x0016fa24
TEST R10B,R10B
JZ 0x0016fa6e
LAB_0016fa24:
TEST BL,BL
JZ 0x0016fa75
TEST R10B,R10B
JZ 0x0016fa35
MOV EBX,R10D
XOR R10D,R10D
JMP 0x0016fa42
LAB_0016fa35:
MOVZX EBX,byte ptr [RSI]
MOV R10B,byte ptr [RBX + RAX*0x1]
INC RSI
MOV BL,byte ptr [RBX + RDI*0x1]
LAB_0016fa42:
TEST R11B,R11B
JZ 0x0016fa4f
MOV R14D,R11D
XOR R11D,R11D
JMP 0x0016fa5e
LAB_0016fa4f:
MOVZX R14D,byte ptr [RCX]
MOV R11B,byte ptr [R14 + RAX*0x1]
INC RCX
MOV R14B,byte ptr [R14 + RDI*0x1]
LAB_0016fa5e:
CMP BL,R14B
JZ 0x0016fa0a
MOVZX ECX,R14B
MOVZX EAX,BL
SUB EAX,ECX
JMP 0x0016fa7d
LAB_0016fa6e:
MOVZX EAX,BL
NEG EAX
JMP 0x0016fa7d
LAB_0016fa75:
XOR EAX,EAX
TEST R9B,R9B
SETZ AL
LAB_0016fa7d:
POP RBX
POP R14
POP RBP
RET
|
uint my_strnncoll_latin1_de
(int8 param_1,byte *param_2,long param_3,byte *param_4,long param_5,
char param_6)
{
byte *pbVar1;
byte bVar2;
byte *pbVar3;
byte bVar4;
byte bVar5;
byte bVar6;
pbVar1 = param_2 + param_3;
pbVar3 = param_4 + param_5;
bVar4 = 0;
bVar5 = 0;
do {
if ((pbVar1 <= param_2) && (bVar4 == 0)) {
return -(uint)(bVar5 != 0 || param_4 < pbVar3);
}
if (bVar5 == 0 && param_4 >= pbVar3) {
return (uint)(param_6 == '\0');
}
if (bVar4 == 0) {
bVar2 = *param_2;
bVar4 = combo2map[bVar2];
param_2 = param_2 + 1;
bVar2 = combo1map[bVar2];
}
else {
bVar2 = bVar4;
bVar4 = 0;
}
if (bVar5 == 0) {
bVar6 = *param_4;
bVar5 = combo2map[bVar6];
param_4 = param_4 + 1;
bVar6 = combo1map[bVar6];
}
else {
bVar6 = bVar5;
bVar5 = 0;
}
} while (bVar2 == bVar6);
return (uint)bVar2 - (uint)bVar6;
}
|
|
14,579
|
my_stat
|
eloqsql/mysys/my_lib.c
|
MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags)
{
int m_used;
DBUG_ENTER("my_stat");
DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path,
stat_area, my_flags));
if ((m_used= (stat_area == NULL)))
if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT),
my_flags)))
goto error;
#ifndef _WIN32
if (!stat((char *) path, (struct stat *) stat_area))
{
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(stat_area);
}
#else
if (!my_win_stat(path, stat_area))
DBUG_RETURN(stat_area);
#endif
DBUG_PRINT("error",("Got errno: %d from stat", errno));
my_errno= errno;
if (m_used) /* Free if new area */
my_free(stat_area);
error:
if (my_flags & (MY_FAE+MY_WME))
{
my_error(EE_STAT, MYF(ME_BELL), path, my_errno);
DBUG_RETURN((MY_STAT *) NULL);
}
DBUG_RETURN((MY_STAT *) NULL);
}
|
O3
|
c
|
my_stat:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %r14
testq %rsi, %rsi
jne 0x2b450
leaq 0x33b22f(%rip), %rax # 0x366668
movl (%rax), %edi
movl $0x90, %esi
movq %r15, %rdx
callq 0x2b4f5
movq %rax, %r14
testq %rax, %rax
je 0x2b47c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24710
testl %eax, %eax
je 0x2b4a5
callq 0x24060
movl (%rax), %r13d
callq 0x26caa
movl %r13d, (%rax)
testq %r12, %r12
jne 0x2b47c
movq %r14, %rdi
callq 0x2b722
testb $0x18, %r15b
je 0x2b4a2
callq 0x26caa
movl (%rax), %ecx
xorl %r14d, %r14d
movl $0x4, %esi
movl $0xd, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2aaeb
jmp 0x2b4a5
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_stat:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov r14, rsi
test rsi, rsi
jnz short loc_2B450
lea rax, key_memory_MY_STAT
mov edi, [rax]
mov esi, 90h
mov rdx, r15
call my_malloc
mov r14, rax
test rax, rax
jz short loc_2B47C
loc_2B450:
mov rdi, rbx
mov rsi, r14
call _stat64
test eax, eax
jz short loc_2B4A5
call ___errno_location
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r12, r12
jnz short loc_2B47C
mov rdi, r14
call my_free
loc_2B47C:
test r15b, 18h
jz short loc_2B4A2
call _my_thread_var
mov ecx, [rax]
xor r14d, r14d
mov esi, 4
mov edi, 0Dh
mov rdx, rbx
xor eax, eax
call my_error
jmp short loc_2B4A5
loc_2B4A2:
xor r14d, r14d
loc_2B4A5:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_stat(long long a1, long long a2, long long a3)
{
char v3; // r15
long long v4; // r14
int v5; // r13d
unsigned int *v6; // rax
v3 = a3;
v4 = a2;
if ( a2 || (v4 = my_malloc(key_memory_MY_STAT, 144LL, a3)) != 0 )
{
if ( !(unsigned int)stat64(a1, v4) )
return v4;
v5 = *(_DWORD *)__errno_location(a1);
*(_DWORD *)my_thread_var() = v5;
if ( !a2 )
my_free(v4);
}
if ( (v3 & 0x18) == 0 )
return 0LL;
v6 = (unsigned int *)my_thread_var();
v4 = 0LL;
my_error(0xDu, 4, a1, *v6);
return v4;
}
|
my_stat:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R14,RSI
TEST RSI,RSI
JNZ 0x0012b450
LEA RAX,[0x466668]
MOV EDI,dword ptr [RAX]
MOV ESI,0x90
MOV RDX,R15
CALL 0x0012b4f5
MOV R14,RAX
TEST RAX,RAX
JZ 0x0012b47c
LAB_0012b450:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00124710
TEST EAX,EAX
JZ 0x0012b4a5
CALL 0x00124060
MOV R13D,dword ptr [RAX]
CALL 0x00126caa
MOV dword ptr [RAX],R13D
TEST R12,R12
JNZ 0x0012b47c
MOV RDI,R14
CALL 0x0012b722
LAB_0012b47c:
TEST R15B,0x18
JZ 0x0012b4a2
CALL 0x00126caa
MOV ECX,dword ptr [RAX]
XOR R14D,R14D
MOV ESI,0x4
MOV EDI,0xd
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0012aaeb
JMP 0x0012b4a5
LAB_0012b4a2:
XOR R14D,R14D
LAB_0012b4a5:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3)
{
int iVar1;
stat64 *__buf;
int *piVar2;
int4 *puVar3;
__buf = param_2;
if ((param_2 != (stat64 *)0x0) ||
(__buf = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), __buf != (stat64 *)0x0)) {
iVar1 = stat64(param_1,__buf);
if (iVar1 == 0) {
return __buf;
}
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if (param_2 == (stat64 *)0x0) {
my_free(__buf);
}
}
if ((param_3 & 0x18) != 0) {
puVar3 = (int4 *)_my_thread_var();
my_error(0xd,4,param_1,*puVar3);
}
return (stat64 *)0x0;
}
|
|
14,580
|
testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(testing::TestPartResult const&)
|
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
|
void DefaultGlobalTestPartResultReporter::ReportTestPartResult(
const TestPartResult& result) {
unit_test_->current_test_result()->AddTestPartResult(result);
unit_test_->listeners()->repeater()->OnTestPartResult(result);
}
|
O1
|
cpp
|
testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(testing::TestPartResult const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq 0x1e0(%rax), %rdi
testq %rdi, %rdi
je 0x1c6b7
addq $0x90, %rdi
jmp 0x1c6d5
movq 0x1d8(%rax), %rdi
testq %rdi, %rdi
je 0x1c6cc
addq $0x88, %rdi
jmp 0x1c6d5
addq $0x1e8, %rax # imm = 0x1E8
movq %rax, %rdi
addq $0x38, %rdi
movq %rbx, %rsi
callq 0x32dc0
movq 0x8(%r14), %rax
movq 0x268(%rax), %rdi
movq (%rdi), %rax
movq 0x50(%rax), %rax
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
nop
|
_ZN7testing8internal35DefaultGlobalTestPartResultReporter20ReportTestPartResultERKNS_14TestPartResultE:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov rax, [rdi+8]
mov rdi, [rax+1E0h]
test rdi, rdi
jz short loc_1C6B7
add rdi, 90h
jmp short loc_1C6D5
loc_1C6B7:
mov rdi, [rax+1D8h]
test rdi, rdi
jz short loc_1C6CC
add rdi, 88h
jmp short loc_1C6D5
loc_1C6CC:
add rax, 1E8h
mov rdi, rax
loc_1C6D5:
add rdi, 38h ; '8'
mov rsi, rbx
call _ZNSt6vectorIN7testing14TestPartResultESaIS1_EE9push_backERKS1_; std::vector<testing::TestPartResult>::push_back(testing::TestPartResult const&)
mov rax, [r14+8]
mov rdi, [rax+268h]
mov rax, [rdi]
mov rax, [rax+50h]
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp rax
|
long long testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(
testing::internal::DefaultGlobalTestPartResultReporter *this,
const testing::TestPartResult *a2)
{
long long v3; // rax
long long v4; // rdi
long long v5; // rdi
long long v6; // rdi
v3 = *((_QWORD *)this + 1);
v4 = *(_QWORD *)(v3 + 480);
if ( v4 )
{
v5 = v4 + 144;
}
else
{
v6 = *(_QWORD *)(v3 + 472);
if ( v6 )
v5 = v6 + 136;
else
v5 = v3 + 488;
}
std::vector<testing::TestPartResult>::push_back((testing::TestPartResultArray *)(v5 + 56), a2);
return (*(long long ( **)(_QWORD, const testing::TestPartResult *))(**(_QWORD **)(*((_QWORD *)this + 1) + 616LL)
+ 80LL))(
*(_QWORD *)(*((_QWORD *)this + 1) + 616LL),
a2);
}
|
ReportTestPartResult:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RAX + 0x1e0]
TEST RDI,RDI
JZ 0x0011c6b7
ADD RDI,0x90
JMP 0x0011c6d5
LAB_0011c6b7:
MOV RDI,qword ptr [RAX + 0x1d8]
TEST RDI,RDI
JZ 0x0011c6cc
ADD RDI,0x88
JMP 0x0011c6d5
LAB_0011c6cc:
ADD RAX,0x1e8
MOV RDI,RAX
LAB_0011c6d5:
ADD RDI,0x38
MOV RSI,RBX
CALL 0x00132dc0
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [RAX + 0x268]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x50]
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP RAX
|
/* testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult(testing::TestPartResult
const&) */
void __thiscall
testing::internal::DefaultGlobalTestPartResultReporter::ReportTestPartResult
(DefaultGlobalTestPartResultReporter *this,TestPartResult *param_1)
{
long lVar1;
lVar1 = *(long *)(this + 8);
if (*(long *)(lVar1 + 0x1e0) == 0) {
if (*(long *)(lVar1 + 0x1d8) == 0) {
lVar1 = lVar1 + 0x1e8;
}
else {
lVar1 = *(long *)(lVar1 + 0x1d8) + 0x88;
}
}
else {
lVar1 = *(long *)(lVar1 + 0x1e0) + 0x90;
}
std::vector<testing::TestPartResult,std::allocator<testing::TestPartResult>>::push_back
((vector<testing::TestPartResult,std::allocator<testing::TestPartResult>> *)
(lVar1 + 0x38),param_1);
/* WARNING: Could not recover jumptable at 0x0011c6fd. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(long **)(*(long *)(this + 8) + 0x268) + 0x50))
(*(long **)(*(long *)(this + 8) + 0x268),param_1);
return;
}
|
|
14,581
|
fmt::v10::detail::dragonbox::cache_accessor<double>::compute_right_endpoint_for_shorter_interval_case(fmt::v10::detail::uint128_fallback const&, int)
|
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format-inl.h
|
static auto compute_right_endpoint_for_shorter_interval_case(
const cache_entry_type& cache, int beta) noexcept -> carrier_uint {
return (cache.high() +
(cache.high() >> (num_significand_bits<double>() + 1))) >>
(64 - num_significand_bits<double>() - 1 - beta);
}
|
O0
|
c
|
fmt::v10::detail::dragonbox::cache_accessor<double>::compute_right_endpoint_for_shorter_interval_case(fmt::v10::detail::uint128_fallback const&, int):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rdi
callq 0xb04d0
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0xb04d0
movq %rax, (%rsp)
callq 0xafdc0
movq (%rsp), %rdx
movl %eax, %ecx
movq 0x8(%rsp), %rax
addl $0x1, %ecx
movl %ecx, %ecx
shrq %cl, %rdx
movq %rdx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
callq 0xafdc0
movl %eax, %edx
movq 0x10(%rsp), %rax
movl $0x40, %ecx
subl %edx, %ecx
subl $0x1, %ecx
subl 0x1c(%rsp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_ZN3fmt3v106detail9dragonbox14cache_accessorIdE48compute_right_endpoint_for_shorter_interval_caseERKNS1_16uint128_fallbackEi:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_C], esi
mov rdi, [rsp+28h+var_8]; this
call _ZNK3fmt3v106detail16uint128_fallback4highEv; fmt::v10::detail::uint128_fallback::high(void)
mov [rsp+28h+var_20], rax
mov rdi, [rsp+28h+var_8]; this
call _ZNK3fmt3v106detail16uint128_fallback4highEv; fmt::v10::detail::uint128_fallback::high(void)
mov [rsp+28h+var_28], rax
call _ZN3fmt3v106detail20num_significand_bitsIdEEiv; fmt::v10::detail::num_significand_bits<double>(void)
mov rdx, [rsp+28h+var_28]
mov ecx, eax
mov rax, [rsp+28h+var_20]
add ecx, 1
mov ecx, ecx
shr rdx, cl
mov rcx, rdx
add rax, rcx
mov [rsp+28h+var_18], rax
call _ZN3fmt3v106detail20num_significand_bitsIdEEiv; fmt::v10::detail::num_significand_bits<double>(void)
mov edx, eax
mov rax, [rsp+28h+var_18]
mov ecx, 40h ; '@'
sub ecx, edx
sub ecx, 1
sub ecx, [rsp+28h+var_C]
mov ecx, ecx
shr rax, cl
add rsp, 28h
retn
|
unsigned long long fmt::v10::detail::dragonbox::cache_accessor<double>::compute_right_endpoint_for_shorter_interval_case(
fmt::v10::detail::uint128_fallback *a1,
char a2)
{
unsigned long long v3; // [rsp+0h] [rbp-28h]
long long v4; // [rsp+8h] [rbp-20h]
unsigned long long v5; // [rsp+10h] [rbp-18h]
v4 = fmt::v10::detail::uint128_fallback::high(a1);
v3 = fmt::v10::detail::uint128_fallback::high(a1);
v5 = (v3 >> ((unsigned __int8)fmt::v10::detail::num_significand_bits<double>() + 1)) + v4;
return v5 >> (64 - (unsigned __int8)fmt::v10::detail::num_significand_bits<double>() - 1 - a2);
}
|
compute_right_endpoint_for_shorter_interval_case:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ESI
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x001b04d0
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x001b04d0
MOV qword ptr [RSP],RAX
CALL 0x001afdc0
MOV RDX,qword ptr [RSP]
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x8]
ADD ECX,0x1
MOV ECX,ECX
SHR RDX,CL
MOV RCX,RDX
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001afdc0
MOV EDX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,0x40
SUB ECX,EDX
SUB ECX,0x1
SUB ECX,dword ptr [RSP + 0x1c]
MOV ECX,ECX
SHR RAX,CL
ADD RSP,0x28
RET
|
/* fmt::v10::detail::dragonbox::cache_accessor<double>::compute_right_endpoint_for_shorter_interval_case(fmt::v10::detail::uint128_fallback
const&, int) */
ulong fmt::v10::detail::dragonbox::cache_accessor<double>::
compute_right_endpoint_for_shorter_interval_case(uint128_fallback *param_1,int param_2)
{
int iVar1;
int iVar2;
long lVar3;
ulong uVar4;
lVar3 = uint128_fallback::high(param_1);
uVar4 = uint128_fallback::high(param_1);
iVar1 = num_significand_bits<double>();
iVar2 = num_significand_bits<double>();
return lVar3 + (uVar4 >> ((char)iVar1 + 1U & 0x3f)) >>
(('?' - (char)iVar2) - (char)param_2 & 0x3fU);
}
|
|
14,582
|
JS_DefinePropertyGetSet
|
bluesky950520[P]quickjs/quickjs.c
|
int JS_DefinePropertyGetSet(JSContext *ctx, JSValue this_obj,
JSAtom prop, JSValue getter, JSValue setter,
int flags)
{
int ret;
ret = JS_DefineProperty(ctx, this_obj, prop, JS_UNDEFINED, getter, setter,
flags | JS_PROP_HAS_GET | JS_PROP_HAS_SET |
JS_PROP_HAS_CONFIGURABLE | JS_PROP_HAS_ENUMERABLE);
JS_FreeValue(ctx, getter);
JS_FreeValue(ctx, setter);
return ret;
}
|
O1
|
c
|
JS_DefinePropertyGetSet:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq %r8, 0x28(%rsp)
movq %r9, 0x30(%rsp)
movl $0x1d00, %eax # imm = 0x1D00
orl 0x60(%rsp), %eax
movaps 0x50(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %eax, 0x20(%rsp)
movl $0x3, %r9d
xorl %r8d, %r8d
callq 0x29515
movl %eax, %ebp
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x21922
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x21922
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
|
JS_DefinePropertyGetSet:
push rbp
push rbx
sub rsp, 38h
mov rbx, rdi
mov qword ptr [rsp+48h+var_20], r8
mov qword ptr [rsp+48h+var_20+8], r9
mov eax, 1D00h
or eax, [rsp+48h+arg_10]
movaps xmm0, [rsp+48h+arg_0]
movups [rsp+48h+var_38], xmm0
movups xmm0, [rsp+48h+var_20]
movups [rsp+48h+var_48], xmm0
mov [rsp+48h+var_28], eax
mov r9d, 3
xor r8d, r8d
call JS_DefineProperty
mov ebp, eax
mov rsi, qword ptr [rsp+48h+var_20]
mov rdx, qword ptr [rsp+48h+var_20+8]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rsi, qword ptr [rsp+48h+arg_0]
mov rdx, qword ptr [rsp+48h+arg_0+8]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov eax, ebp
add rsp, 38h
pop rbx
pop rbp
retn
|
long long JS_DefinePropertyGetSet(
long long a1,
unsigned long long a2,
long long a3,
long long a4,
_DWORD *a5,
long long a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
__int128 a15,
int a16)
{
unsigned int v16; // ebp
__m128 v18; // [rsp+28h] [rbp-20h]
v18.m128_u64[0] = (unsigned long long)a5;
v18.m128_u64[1] = a6;
v16 = JS_DefineProperty(
a1,
a2,
a3,
a4,
0LL,
3LL,
v18,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
a5,
a6,
(_DWORD *)a15,
*((long long *)&a15 + 1),
a16 | 0x1D00u);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v18.m128_u64[0], v18.m128_i64[1]);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)a15, *((long long *)&a15 + 1));
return v16;
}
|
JS_DefinePropertyGetSet:
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV qword ptr [RSP + 0x28],R8
MOV qword ptr [RSP + 0x30],R9
MOV EAX,0x1d00
OR EAX,dword ptr [RSP + 0x60]
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [RSP + 0x28]
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x20],EAX
MOV R9D,0x3
XOR R8D,R8D
CALL 0x00129515
MOV EBP,EAX
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x00121922
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x00121922
MOV EAX,EBP
ADD RSP,0x38
POP RBX
POP RBP
RET
|
int4 JS_DefinePropertyGetSet(long param_1)
{
int4 uVar1;
int8 in_R8;
int8 in_R9;
int8 in_stack_00000008;
int8 in_stack_00000010;
uVar1 = JS_DefineProperty();
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),in_R8,in_R9);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),in_stack_00000008,in_stack_00000010);
return uVar1;
}
|
|
14,583
|
JS_DefinePropertyGetSet
|
bluesky950520[P]quickjs/quickjs.c
|
int JS_DefinePropertyGetSet(JSContext *ctx, JSValue this_obj,
JSAtom prop, JSValue getter, JSValue setter,
int flags)
{
int ret;
ret = JS_DefineProperty(ctx, this_obj, prop, JS_UNDEFINED, getter, setter,
flags | JS_PROP_HAS_GET | JS_PROP_HAS_SET |
JS_PROP_HAS_CONFIGURABLE | JS_PROP_HAS_ENUMERABLE);
JS_FreeValue(ctx, getter);
JS_FreeValue(ctx, setter);
return ret;
}
|
O2
|
c
|
JS_DefinePropertyGetSet:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq %r8, 0x28(%rsp)
movq %r9, 0x30(%rsp)
movl $0x1d00, %eax # imm = 0x1D00
orl 0x60(%rsp), %eax
movaps 0x50(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %eax, 0x20(%rsp)
pushq $0x3
popq %r9
xorl %r8d, %r8d
callq 0x22d8e
movl %eax, %ebp
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x1bbce
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq %rbx, %rdi
callq 0x1bbce
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
|
JS_DefinePropertyGetSet:
push rbp
push rbx
sub rsp, 38h
mov rbx, rdi
mov qword ptr [rsp+48h+var_20], r8
mov qword ptr [rsp+48h+var_20+8], r9
mov eax, 1D00h
or eax, [rsp+48h+arg_10]
movaps xmm0, [rsp+48h+arg_0]
movups [rsp+48h+var_38], xmm0
movups xmm0, [rsp+48h+var_20]
movups [rsp+48h+var_48], xmm0
mov [rsp+48h+var_28], eax
push 3
pop r9
xor r8d, r8d
call JS_DefineProperty
mov ebp, eax
mov rsi, qword ptr [rsp+48h+var_20]
mov rdx, qword ptr [rsp+48h+var_20+8]
mov rdi, rbx
call JS_FreeValue
mov rsi, qword ptr [rsp+48h+arg_0]
mov rdx, qword ptr [rsp+48h+arg_0+8]
mov rdi, rbx
call JS_FreeValue
mov eax, ebp
add rsp, 38h
pop rbx
pop rbp
retn
|
long long JS_DefinePropertyGetSet(
long long a1,
long long a2,
long long a3,
long long a4,
_DWORD *a5,
unsigned long long a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
__int128 a15,
int a16)
{
unsigned int v16; // ebp
__m128 v18; // [rsp+28h] [rbp-20h]
v18.m128_u64[0] = (unsigned long long)a5;
v18.m128_u64[1] = a6;
v16 = JS_DefineProperty(
a1,
a2,
a3,
a4,
0LL,
3LL,
v18,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
a5,
a6,
(_DWORD *)a15,
DWORD2(a15),
a16 | 0x1D00u);
JS_FreeValue(a1, v18.m128_i64[0], v18.m128_i64[1]);
JS_FreeValue(a1, a15, *((long long *)&a15 + 1));
return v16;
}
|
JS_DefinePropertyGetSet:
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV qword ptr [RSP + 0x28],R8
MOV qword ptr [RSP + 0x30],R9
MOV EAX,0x1d00
OR EAX,dword ptr [RSP + 0x60]
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [RSP + 0x28]
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x20],EAX
PUSH 0x3
POP R9
XOR R8D,R8D
CALL 0x00122d8e
MOV EBP,EAX
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
MOV RDI,RBX
CALL 0x0011bbce
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
MOV RDI,RBX
CALL 0x0011bbce
MOV EAX,EBP
ADD RSP,0x38
POP RBX
POP RBP
RET
|
int4 JS_DefinePropertyGetSet(int8 param_1)
{
int4 uVar1;
int8 in_R8;
int8 in_R9;
int8 in_stack_00000008;
int8 in_stack_00000010;
uVar1 = JS_DefineProperty();
JS_FreeValue(param_1,in_R8,in_R9);
JS_FreeValue(param_1,in_stack_00000008,in_stack_00000010);
return uVar1;
}
|
|
14,584
|
saveHistory(Shell*)
|
isaiah76[P]linux-shell/src/History.cpp
|
void saveHistory(Shell* shell) {
const char* home = getenv("HOME");
std::string filename = std::string(home) + "/.linux_shell_history";
std::ofstream file(filename);
if(file.is_open()){
for(const auto& cmd : shell->getHistory()){
file << cmd << std::endl;
}
file.close();
}
}
|
O0
|
cpp
|
saveHistory(Shell*):
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp # imm = 0x2B0
movq %rdi, -0x8(%rbp)
leaq 0x27a6(%rip), %rdi # 0x905c
callq 0x3360
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x298(%rbp)
leaq -0x51(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x3510
movq -0x298(%rbp), %rsi
movq -0x290(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x3410
jmp 0x68f3
leaq 0x2805(%rip), %rdx # 0x90ff
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x6ab0
jmp 0x6909
leaq -0x50(%rbp), %rdi
callq 0x31d0
leaq -0x51(%rbp), %rdi
callq 0x3310
leaq -0x268(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0x10, %edx
callq 0x3530
jmp 0x6932
leaq -0x268(%rbp), %rdi
callq 0x3230
movb %al, -0x299(%rbp)
jmp 0x6946
movb -0x299(%rbp), %al
testb $0x1, %al
jne 0x6955
jmp 0x6a71
movq -0x8(%rbp), %rdi
callq 0x4160
movq %rax, -0x2a8(%rbp)
jmp 0x6967
movq -0x2a8(%rbp), %rax
movq %rax, -0x270(%rbp)
movq -0x270(%rbp), %rdi
callq 0x4850
movq %rax, -0x278(%rbp)
movq -0x270(%rbp), %rdi
callq 0x5260
movq %rax, -0x280(%rbp)
leaq -0x278(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x5b90
testb $0x1, %al
jne 0x69b7
jmp 0x6a61
leaq -0x278(%rbp), %rdi
callq 0x59b0
movq %rax, -0x288(%rbp)
movq -0x288(%rbp), %rsi
leaq -0x268(%rbp), %rdi
callq 0x3280
movq %rax, -0x2b0(%rbp)
jmp 0x69e6
movq -0x2b0(%rbp), %rdi
movq 0x65c4(%rip), %rsi # 0xcfb8
callq 0x3300
jmp 0x69fb
jmp 0x69fd
leaq -0x278(%rbp), %rdi
callq 0x6b00
jmp 0x699b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x6a2e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x31d0
leaq -0x51(%rbp), %rdi
callq 0x3310
jmp 0x6a98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x6a8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x3470
jmp 0x6a8f
leaq -0x268(%rbp), %rdi
callq 0x3430
jmp 0x6a6f
jmp 0x6a71
leaq -0x268(%rbp), %rdi
callq 0x3470
leaq -0x30(%rbp), %rdi
callq 0x31d0
addq $0x2b0, %rsp # imm = 0x2B0
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x31d0
movq -0x60(%rbp), %rdi
callq 0x3500
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
_Z11saveHistoryP5Shell:
push rbp
mov rbp, rsp
sub rsp, 2B0h
mov [rbp+var_8], rdi
lea rdi, aHome; "HOME"
call _getenv
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov [rbp+var_298], rax
lea rdi, [rbp+var_51]
mov [rbp+var_290], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_298]
mov rdx, [rbp+var_290]
lea rdi, [rbp+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
jmp short $+2
loc_68F3:
lea rdx, aLinuxShellHist; "/.linux_shell_history"
lea rdi, [rbp+var_30]
lea rsi, [rbp+var_50]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_6909:
lea rdi, [rbp+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_51]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rbp+var_268]
lea rsi, [rbp+var_30]
mov edx, 10h
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode)
jmp short $+2
loc_6932:
lea rdi, [rbp+var_268]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv; std::ofstream::is_open(void)
mov [rbp+var_299], al
jmp short $+2
loc_6946:
mov al, [rbp+var_299]
test al, 1
jnz short loc_6955
jmp loc_6A71
loc_6955:
mov rdi, [rbp+var_8]
call _ZN5Shell10getHistoryB5cxx11Ev; Shell::getHistory(void)
mov [rbp+var_2A8], rax
jmp short $+2
loc_6967:
mov rax, [rbp+var_2A8]
mov [rbp+var_270], rax
mov rdi, [rbp+var_270]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov [rbp+var_278], rax
mov rdi, [rbp+var_270]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rbp+var_280], rax
loc_699B:
lea rdi, [rbp+var_278]
lea rsi, [rbp+var_280]
call _ZN9__gnu_cxxneIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&)
test al, 1
jnz short loc_69B7
jmp loc_6A61
loc_69B7:
lea rdi, [rbp+var_278]
call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void)
mov [rbp+var_288], rax
mov rsi, [rbp+var_288]
lea rdi, [rbp+var_268]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_2B0], rax
jmp short $+2
loc_69E6:
mov rdi, [rbp+var_2B0]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_69FB:
jmp short $+2
loc_69FD:
lea rdi, [rbp+var_278]
call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void)
jmp short loc_699B
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
jmp short loc_6A2E
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
lea rdi, [rbp+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_6A2E:
lea rdi, [rbp+var_51]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_6A98
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
jmp short loc_6A8F
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
lea rdi, [rbp+var_268]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
jmp short loc_6A8F
loc_6A61:
lea rdi, [rbp+var_268]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void)
jmp short $+2
loc_6A6F:
jmp short $+2
loc_6A71:
lea rdi, [rbp+var_268]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
lea rdi, [rbp+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
add rsp, 2B0h
pop rbp
retn
loc_6A8F:
lea rdi, [rbp+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_6A98:
mov rdi, [rbp+var_60]
call __Unwind_Resume
|
long long saveHistory(Shell *a1)
{
long long v2; // [rsp+0h] [rbp-2B0h]
long long v3; // [rsp+18h] [rbp-298h]
long long v4; // [rsp+28h] [rbp-288h]
long long v5; // [rsp+30h] [rbp-280h] BYREF
long long v6; // [rsp+38h] [rbp-278h] BYREF
long long v7; // [rsp+40h] [rbp-270h]
_BYTE v8[516]; // [rsp+48h] [rbp-268h] BYREF
char v9; // [rsp+25Fh] [rbp-51h] BYREF
_BYTE v10[32]; // [rsp+260h] [rbp-50h] BYREF
_BYTE v11[32]; // [rsp+280h] [rbp-30h] BYREF
long long v12; // [rsp+2A0h] [rbp-10h]
Shell *v13; // [rsp+2A8h] [rbp-8h]
v13 = a1;
v12 = getenv("HOME");
v3 = v12;
std::allocator<char>::allocator();
std::string::basic_string(v10, v3, &v9);
std::operator+<char>(v11, v10, "/.linux_shell_history");
std::string::~string(v10);
std::allocator<char>::~allocator(&v9);
std::ofstream::basic_ofstream(v8, v11, 16LL);
if ( (std::ofstream::is_open(v8) & 1) != 0 )
{
v7 = Shell::getHistory[abi:cxx11]((long long)v13);
v6 = std::vector<std::string>::begin(v7);
v5 = std::vector<std::string>::end(v7);
while ( __gnu_cxx::operator!=<std::string *,std::vector<std::string>>((long long)&v6, (long long)&v5) )
{
v4 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*((long long)&v6);
v2 = std::operator<<<char>(v8, v4);
std::ostream::operator<<(v2, &std::endl<char,std::char_traits<char>>);
__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(&v6);
}
std::ofstream::close(v8);
}
std::ofstream::~ofstream(v8);
return std::string::~string(v11);
}
|
saveHistory:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2b0
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[0x10905c]
CALL 0x00103360
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x298],RAX
LEA RDI,[RBP + -0x51]
MOV qword ptr [RBP + -0x290],RDI
CALL 0x00103510
MOV RSI,qword ptr [RBP + -0x298]
MOV RDX,qword ptr [RBP + -0x290]
LAB_001068e8:
LEA RDI,[RBP + -0x50]
CALL 0x00103410
JMP 0x001068f3
LAB_001068f3:
LEA RDX,[0x1090ff]
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x50]
CALL 0x00106ab0
JMP 0x00106909
LAB_00106909:
LEA RDI,[RBP + -0x50]
CALL 0x001031d0
LEA RDI,[RBP + -0x51]
CALL 0x00103310
LAB_0010691b:
LEA RDI,[RBP + -0x268]
LEA RSI,[RBP + -0x30]
MOV EDX,0x10
CALL 0x00103530
JMP 0x00106932
LAB_00106932:
LEA RDI,[RBP + -0x268]
CALL 0x00103230
MOV byte ptr [RBP + -0x299],AL
JMP 0x00106946
LAB_00106946:
MOV AL,byte ptr [RBP + -0x299]
TEST AL,0x1
JNZ 0x00106955
JMP 0x00106a71
LAB_00106955:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00104160
MOV qword ptr [RBP + -0x2a8],RAX
JMP 0x00106967
LAB_00106967:
MOV RAX,qword ptr [RBP + -0x2a8]
MOV qword ptr [RBP + -0x270],RAX
MOV RDI,qword ptr [RBP + -0x270]
CALL 0x00104850
MOV qword ptr [RBP + -0x278],RAX
MOV RDI,qword ptr [RBP + -0x270]
CALL 0x00105260
MOV qword ptr [RBP + -0x280],RAX
LAB_0010699b:
LEA RDI,[RBP + -0x278]
LEA RSI,[RBP + -0x280]
CALL 0x00105b90
TEST AL,0x1
JNZ 0x001069b7
JMP 0x00106a61
LAB_001069b7:
LEA RDI,[RBP + -0x278]
CALL 0x001059b0
MOV qword ptr [RBP + -0x288],RAX
MOV RSI,qword ptr [RBP + -0x288]
LEA RDI,[RBP + -0x268]
CALL 0x00103280
MOV qword ptr [RBP + -0x2b0],RAX
JMP 0x001069e6
LAB_001069e6:
MOV RDI,qword ptr [RBP + -0x2b0]
MOV RSI,qword ptr [0x0010cfb8]
CALL 0x00103300
JMP 0x001069fb
LAB_001069fb:
JMP 0x001069fd
LAB_001069fd:
LEA RDI,[RBP + -0x278]
CALL 0x00106b00
JMP 0x0010699b
LAB_00106a61:
LEA RDI,[RBP + -0x268]
CALL 0x00103430
LAB_00106a6d:
JMP 0x00106a6f
LAB_00106a6f:
JMP 0x00106a71
LAB_00106a71:
LEA RDI,[RBP + -0x268]
CALL 0x00103470
LEA RDI,[RBP + -0x30]
CALL 0x001031d0
ADD RSP,0x2b0
POP RBP
RET
|
/* saveHistory(Shell*) */
void saveHistory(Shell *param_1)
{
byte bVar1;
bool bVar2;
char *pcVar3;
string *psVar4;
ostream *this;
int8 local_288;
int8 local_280;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_278;
ofstream local_270 [535];
allocator local_59;
string local_58 [32];
string local_38 [32];
char *local_18;
Shell *local_10;
local_10 = param_1;
pcVar3 = getenv("HOME");
local_18 = pcVar3;
std::allocator<char>::allocator();
/* try { // try from 001068e8 to 001068f0 has its CatchHandler @ 00106a0b */
std::__cxx11::string::string(local_58,pcVar3,&local_59);
/* try { // try from 001068f3 to 00106906 has its CatchHandler @ 00106a19 */
std::operator+(local_38,(char *)local_58);
std::__cxx11::string::~string(local_58);
std::allocator<char>::~allocator((allocator<char> *)&local_59);
/* try { // try from 0010691b to 0010692f has its CatchHandler @ 00106a39 */
std::ofstream::ofstream(local_270,local_38,0x10);
/* try { // try from 00106932 to 00106a6c has its CatchHandler @ 00106a47 */
bVar1 = std::ofstream::is_open();
if ((bVar1 & 1) != 0) {
local_278 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
Shell::getHistory_abi_cxx11_(local_10);
local_280 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin
(local_278);
local_288 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end
(local_278);
while (bVar2 = __gnu_cxx::operator!=
((__normal_iterator *)&local_280,(__normal_iterator *)&local_288),
bVar2) {
psVar4 = (string *)
__gnu_cxx::
__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_280);
this = std::operator<<((ostream *)local_270,psVar4);
std::ostream::operator<<
(this,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_0010cfb8
);
__gnu_cxx::
__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_280);
}
std::ofstream::close();
}
std::ofstream::~ofstream(local_270);
std::__cxx11::string::~string(local_38);
return;
}
|
|
14,585
|
unlock_lock_and_free_resource
|
eloqsql/mysys/waiting_threads.c
|
static int unlock_lock_and_free_resource(WT_THD *thd, WT_RESOURCE *rc)
{
uint keylen;
const void *key;
DBUG_ENTER("unlock_lock_and_free_resource");
DBUG_ASSERT(rc->state == ACTIVE);
if (rc->owners.elements || rc->waiter_count)
{
DBUG_PRINT("wt", ("nothing to do, %u owners, %u waiters",
rc->owners.elements, rc->waiter_count));
rc_unlock(rc);
DBUG_RETURN(0);
}
if (fix_thd_pins(thd))
{
rc_unlock(rc);
DBUG_RETURN(1);
}
/* XXX if (rc->id.type->make_key) key= rc->id.type->make_key(&rc->id, &keylen); else */
{
key= &rc->id;
keylen= sizeof_WT_RESOURCE_ID;
}
/*
To free the element correctly we need to:
1. take its lock (already done).
2. set the state to FREE
3. release the lock
4. remove from the hash
*/
rc->state= FREE;
rc_unlock(rc);
DBUG_RETURN(lf_hash_delete(&reshash, thd->pins, key, keylen) == -1);
}
|
O3
|
c
|
unlock_lock_and_free_resource:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpl $0x0, 0xe8(%rsi)
jne 0xa81ba
cmpl $0x0, 0x10(%rbx)
je 0xa81cd
addq $0x18, %rbx
movq %rbx, %rdi
callq 0xa53c2
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rdi, %r14
cmpq $0x0, 0x30(%rdi)
je 0xa820b
movl $0x1, 0x14(%rbx)
leaq 0x18(%rbx), %rdi
callq 0xa53c2
movq 0x30(%r14), %rsi
leaq 0xb62b8e(%rip), %rdi # 0xc0ad80
movq %rbx, %rdx
movl $0x10, %ecx
callq 0x2f731
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
sete %al
jmp 0xa81c8
leaq 0xb62b96(%rip), %rdi # 0xc0ada8
callq 0x2f225
movq %rax, 0x30(%r14)
testq %rax, %rax
jne 0xa81d7
addq $0x18, %rbx
movq %rbx, %rdi
callq 0xa53c2
movl $0x1, %eax
jmp 0xa81c8
|
unlock_lock_and_free_resource:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
cmp dword ptr [rsi+0E8h], 0
jnz short loc_A81BA
cmp dword ptr [rbx+10h], 0
jz short loc_A81CD
loc_A81BA:
add rbx, 18h
mov rdi, rbx
call my_rw_unlock
xor eax, eax
loc_A81C8:
pop rbx
pop r14
pop rbp
retn
loc_A81CD:
mov r14, rdi
cmp qword ptr [rdi+30h], 0
jz short loc_A820B
loc_A81D7:
mov dword ptr [rbx+14h], 1
lea rdi, [rbx+18h]
call my_rw_unlock
mov rsi, [r14+30h]
lea rdi, reshash
mov rdx, rbx
mov ecx, 10h
call lf_hash_delete
mov ecx, eax
xor eax, eax
cmp ecx, 0FFFFFFFFh
setz al
jmp short loc_A81C8
loc_A820B:
lea rdi, unk_C0ADA8
call lf_pinbox_get_pins
mov [r14+30h], rax
test rax, rax
jnz short loc_A81D7
add rbx, 18h
mov rdi, rbx
call my_rw_unlock
mov eax, 1
jmp short loc_A81C8
|
_BOOL8 unlock_lock_and_free_resource(long long a1, _DWORD *a2)
{
long long pins; // rax
if ( a2[58] || a2[4] )
{
my_rw_unlock((long long)(a2 + 6));
return 0LL;
}
else if ( *(_QWORD *)(a1 + 48)
|| (pins = lf_pinbox_get_pins((long long)&unk_C0ADA8), (*(_QWORD *)(a1 + 48) = pins) != 0LL) )
{
a2[5] = 1;
my_rw_unlock((long long)(a2 + 6));
return (unsigned int)lf_hash_delete((long long)&reshash, *(volatile long long **)(a1 + 48), (long long)a2, 0x10u) == -1;
}
else
{
my_rw_unlock((long long)(a2 + 6));
return 1LL;
}
}
|
unlock_lock_and_free_resource:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
CMP dword ptr [RSI + 0xe8],0x0
JNZ 0x001a81ba
CMP dword ptr [RBX + 0x10],0x0
JZ 0x001a81cd
LAB_001a81ba:
ADD RBX,0x18
MOV RDI,RBX
CALL 0x001a53c2
XOR EAX,EAX
LAB_001a81c8:
POP RBX
POP R14
POP RBP
RET
LAB_001a81cd:
MOV R14,RDI
CMP qword ptr [RDI + 0x30],0x0
JZ 0x001a820b
LAB_001a81d7:
MOV dword ptr [RBX + 0x14],0x1
LEA RDI,[RBX + 0x18]
CALL 0x001a53c2
MOV RSI,qword ptr [R14 + 0x30]
LEA RDI,[0xd0ad80]
MOV RDX,RBX
MOV ECX,0x10
CALL 0x0012f731
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,-0x1
SETZ AL
JMP 0x001a81c8
LAB_001a820b:
LEA RDI,[0xd0ada8]
CALL 0x0012f225
MOV qword ptr [R14 + 0x30],RAX
TEST RAX,RAX
JNZ 0x001a81d7
ADD RBX,0x18
MOV RDI,RBX
CALL 0x001a53c2
MOV EAX,0x1
JMP 0x001a81c8
|
bool unlock_lock_and_free_resource(long param_1,long param_2)
{
int iVar1;
long lVar2;
bool bVar3;
if ((*(int *)(param_2 + 0xe8) == 0) && (*(int *)(param_2 + 0x10) == 0)) {
if (*(long *)(param_1 + 0x30) == 0) {
lVar2 = lf_pinbox_get_pins(0xd0ada8);
*(long *)(param_1 + 0x30) = lVar2;
if (lVar2 == 0) {
my_rw_unlock(param_2 + 0x18);
return true;
}
}
*(int4 *)(param_2 + 0x14) = 1;
my_rw_unlock(param_2 + 0x18);
iVar1 = lf_hash_delete(reshash,*(int8 *)(param_1 + 0x30),param_2,0x10);
bVar3 = iVar1 == -1;
}
else {
my_rw_unlock(param_2 + 0x18);
bVar3 = false;
}
return bVar3;
}
|
|
14,586
|
Simulator::dumpHistory()
|
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Simulator.cpp
|
void Simulator::dumpHistory() {
std::ofstream ofile("dump.txt");
ofile << "================== Excecution History =================="
<< std::endl;
for (uint32_t i = 0; i < this->history.instRecord.size(); ++i) {
ofile << this->history.instRecord[i];
ofile << this->history.regRecord[i];
}
ofile << "========================================================"
<< std::endl;
ofile << std::endl;
ofile << "====================== Memory Dump ======================"
<< std::endl;
ofile << this->memory->dumpMemory();
ofile << "========================================================="
<< std::endl;
ofile << std::endl;
ofile.close();
}
|
O0
|
cpp
|
Simulator::dumpHistory():
subq $0x278, %rsp # imm = 0x278
movq %rdi, 0x270(%rsp)
movq 0x270(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x648f(%rip), %rsi # 0x2a0c2
leaq 0x70(%rsp), %rdi
movq %rdi, 0x30(%rsp)
movl $0x10, %edx
callq 0x15220
movq 0x30(%rsp), %rdi
leaq 0x6478(%rip), %rsi # 0x2a0cb
callq 0x151e0
movq %rax, 0x38(%rsp)
jmp 0x23c5f
movq 0x38(%rsp), %rdi
movq 0xf35d(%rip), %rsi # 0x32fc8
callq 0x15200
jmp 0x23c72
movl $0x0, 0x60(%rsp)
movq 0x28(%rsp), %rdi
movl 0x60(%rsp), %eax
movq %rax, 0x20(%rsp)
addq $0x318, %rdi # imm = 0x318
addq $0x20, %rdi
callq 0x24260
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x23d16
movq 0x28(%rsp), %rdi
addq $0x338, %rdi # imm = 0x338
movl 0x60(%rsp), %eax
movl %eax, %esi
callq 0x24760
movq %rax, %rsi
leaq 0x70(%rsp), %rdi
callq 0x151b0
jmp 0x23ccb
movq 0x28(%rsp), %rdi
addq $0x350, %rdi # imm = 0x350
movl 0x60(%rsp), %eax
movl %eax, %esi
callq 0x24760
movq %rax, %rsi
leaq 0x70(%rsp), %rdi
callq 0x151b0
jmp 0x23cf1
jmp 0x23cf3
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x23c7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
jmp 0x23e26
leaq 0x6422(%rip), %rsi # 0x2a13f
leaq 0x70(%rsp), %rdi
callq 0x151e0
movq %rax, 0x18(%rsp)
jmp 0x23d2e
movq 0x18(%rsp), %rdi
movq 0xf28e(%rip), %rsi # 0x32fc8
callq 0x15200
jmp 0x23d41
movq 0xf280(%rip), %rsi # 0x32fc8
leaq 0x70(%rsp), %rdi
callq 0x15200
jmp 0x23d54
leaq 0x63a9(%rip), %rsi # 0x2a104
leaq 0x70(%rsp), %rdi
callq 0x151e0
movq %rax, 0x10(%rsp)
jmp 0x23d6c
movq 0x10(%rsp), %rdi
movq 0xf250(%rip), %rsi # 0x32fc8
callq 0x15200
jmp 0x23d7f
movq 0x28(%rsp), %rax
movq 0x118(%rax), %rsi
leaq 0x40(%rsp), %rdi
callq 0x1f030
jmp 0x23d97
leaq 0x70(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x151b0
jmp 0x23da8
leaq 0x40(%rsp), %rdi
callq 0x15140
leaq 0x6385(%rip), %rsi # 0x2a13e
leaq 0x70(%rsp), %rdi
callq 0x151e0
movq %rax, 0x8(%rsp)
jmp 0x23dca
movq 0x8(%rsp), %rdi
movq 0xf1f2(%rip), %rsi # 0x32fc8
callq 0x15200
jmp 0x23ddd
movq 0xf1e4(%rip), %rsi # 0x32fc8
leaq 0x70(%rsp), %rdi
callq 0x15200
jmp 0x23df0
leaq 0x70(%rsp), %rdi
callq 0x15310
jmp 0x23dfc
leaq 0x70(%rsp), %rdi
callq 0x15340
addq $0x278, %rsp # imm = 0x278
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x15140
leaq 0x70(%rsp), %rdi
callq 0x15340
movq 0x68(%rsp), %rdi
callq 0x153a0
nopw (%rax,%rax)
|
_ZN9Simulator11dumpHistoryEv:
sub rsp, 278h
mov [rsp+278h+var_8], rdi
mov rax, [rsp+278h+var_8]
mov [rsp+278h+var_250], rax
lea rsi, aDumpTxt; "dump.txt"
lea rdi, [rsp+278h+var_208]
mov [rsp+278h+var_248], rdi
mov edx, 10h
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ofstream::basic_ofstream(char const*,std::_Ios_Openmode)
mov rdi, [rsp+278h+var_248]
lea rsi, aExcecutionHist; "================== Excecution History ="...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+278h+var_240], rax
jmp short $+2
loc_23C5F:
mov rdi, [rsp+278h+var_240]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_23C72:
mov [rsp+278h+var_218], 0
loc_23C7A:
mov rdi, [rsp+278h+var_250]
mov eax, [rsp+278h+var_218]
mov [rsp+278h+var_258], rax
add rdi, 318h
add rdi, 20h ; ' '
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
mov rcx, rax
mov rax, [rsp+278h+var_258]
cmp rax, rcx
jnb short loc_23D16
mov rdi, [rsp+278h+var_250]
add rdi, 338h
mov eax, [rsp+278h+var_218]
mov esi, eax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong)
mov rsi, rax
lea rdi, [rsp+278h+var_208]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_23CCB:
mov rdi, [rsp+278h+var_250]
add rdi, 350h
mov eax, [rsp+278h+var_218]
mov esi, eax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong)
mov rsi, rax
lea rdi, [rsp+278h+var_208]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_23CF1:
jmp short $+2
loc_23CF3:
mov eax, [rsp+278h+var_218]
add eax, 1
mov [rsp+278h+var_218], eax
jmp loc_23C7A
mov rcx, rax
mov eax, edx
mov [rsp+arg_60], rcx
mov [rsp+arg_5C], eax
jmp loc_23E26
loc_23D16:
lea rsi, asc_2A13E+1; "======================================="...
lea rdi, [rsp+278h+var_208]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+278h+var_260], rax
jmp short $+2
loc_23D2E:
mov rdi, [rsp+278h+var_260]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_23D41:
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
lea rdi, [rsp+278h+var_208]
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_23D54:
lea rsi, aMemoryDump_0; "====================== Memory Dump ===="...
lea rdi, [rsp+278h+var_208]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+278h+var_268], rax
jmp short $+2
loc_23D6C:
mov rdi, [rsp+278h+var_268]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_23D7F:
mov rax, [rsp+278h+var_250]
mov rsi, [rax+118h]
lea rdi, [rsp+278h+var_238]
call _ZN13MemoryManager10dumpMemoryB5cxx11Ev; MemoryManager::dumpMemory(void)
jmp short $+2
loc_23D97:
lea rdi, [rsp+278h+var_208]
lea rsi, [rsp+278h+var_238]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_23DA8:
lea rdi, [rsp+278h+var_238]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rsi, asc_2A13E; "======================================="...
lea rdi, [rsp+278h+var_208]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+278h+var_270], rax
jmp short $+2
loc_23DCA:
mov rdi, [rsp+278h+var_270]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_23DDD:
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
lea rdi, [rsp+278h+var_208]
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_23DF0:
lea rdi, [rsp+278h+var_208]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void)
jmp short $+2
loc_23DFC:
lea rdi, [rsp+278h+var_208]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
add rsp, 278h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_60], rcx
mov [rsp+arg_5C], eax
lea rdi, [rsp+arg_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_23E26:
lea rdi, [rsp+arg_68]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
mov rdi, [rsp+arg_60]
call __Unwind_Resume
|
long long Simulator::dumpHistory(Simulator *this)
{
long long v1; // rax
long long v2; // rax
long long v4; // [rsp+8h] [rbp-270h]
long long v5; // [rsp+10h] [rbp-268h]
long long v6; // [rsp+18h] [rbp-260h]
long long v7; // [rsp+38h] [rbp-240h]
_BYTE v8[32]; // [rsp+40h] [rbp-238h] BYREF
unsigned int i; // [rsp+60h] [rbp-218h]
_BYTE v10[512]; // [rsp+70h] [rbp-208h] BYREF
Simulator *v11; // [rsp+270h] [rbp-8h]
v11 = this;
std::ofstream::basic_ofstream(v10, "dump.txt", 16LL);
v7 = std::operator<<<std::char_traits<char>>(v10, "================== Excecution History ==================");
std::ostream::operator<<(v7, &std::endl<char,std::char_traits<char>>);
for ( i = 0; i < (unsigned long long)std::vector<std::string>::size((char *)this + 824); ++i )
{
v1 = std::vector<std::string>::operator[]((char *)this + 824, i);
std::operator<<<char>(v10, v1);
v2 = std::vector<std::string>::operator[]((char *)this + 848, i);
std::operator<<<char>(v10, v2);
}
v6 = std::operator<<<std::char_traits<char>>(v10, "========================================================");
std::ostream::operator<<(v6, &std::endl<char,std::char_traits<char>>);
std::ostream::operator<<(v10, &std::endl<char,std::char_traits<char>>);
v5 = std::operator<<<std::char_traits<char>>(v10, "====================== Memory Dump ======================");
std::ostream::operator<<(v5, &std::endl<char,std::char_traits<char>>);
MemoryManager::dumpMemory[abi:cxx11]((long long)v8, *((_QWORD **)this + 35));
std::operator<<<char>(v10, v8);
std::string::~string(v8);
v4 = std::operator<<<std::char_traits<char>>(v10, "=========================================================");
std::ostream::operator<<(v4, &std::endl<char,std::char_traits<char>>);
std::ostream::operator<<(v10, &std::endl<char,std::char_traits<char>>);
std::ofstream::close(v10);
return std::ofstream::~ofstream(v10);
}
|
dumpHistory:
SUB RSP,0x278
MOV qword ptr [RSP + 0x270],RDI
MOV RAX,qword ptr [RSP + 0x270]
MOV qword ptr [RSP + 0x28],RAX
LEA RSI,[0x12a0c2]
LEA RDI,[RSP + 0x70]
MOV qword ptr [RSP + 0x30],RDI
MOV EDX,0x10
CALL 0x00115220
MOV RDI,qword ptr [RSP + 0x30]
LAB_00123c4c:
LEA RSI,[0x12a0cb]
CALL 0x001151e0
MOV qword ptr [RSP + 0x38],RAX
JMP 0x00123c5f
LAB_00123c5f:
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [0x00132fc8]
CALL 0x00115200
JMP 0x00123c72
LAB_00123c72:
MOV dword ptr [RSP + 0x60],0x0
LAB_00123c7a:
MOV RDI,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x20],RAX
ADD RDI,0x318
ADD RDI,0x20
CALL 0x00124260
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,RCX
JNC 0x00123d16
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x338
MOV EAX,dword ptr [RSP + 0x60]
MOV ESI,EAX
CALL 0x00124760
MOV RSI,RAX
LEA RDI,[RSP + 0x70]
CALL 0x001151b0
JMP 0x00123ccb
LAB_00123ccb:
MOV RDI,qword ptr [RSP + 0x28]
ADD RDI,0x350
MOV EAX,dword ptr [RSP + 0x60]
MOV ESI,EAX
CALL 0x00124760
MOV RSI,RAX
LEA RDI,[RSP + 0x70]
CALL 0x001151b0
JMP 0x00123cf1
LAB_00123cf1:
JMP 0x00123cf3
LAB_00123cf3:
MOV EAX,dword ptr [RSP + 0x60]
ADD EAX,0x1
MOV dword ptr [RSP + 0x60],EAX
JMP 0x00123c7a
LAB_00123d16:
LEA RSI,[0x12a13f]
LEA RDI,[RSP + 0x70]
CALL 0x001151e0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00123d2e
LAB_00123d2e:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [0x00132fc8]
CALL 0x00115200
JMP 0x00123d41
LAB_00123d41:
MOV RSI,qword ptr [0x00132fc8]
LEA RDI,[RSP + 0x70]
CALL 0x00115200
JMP 0x00123d54
LAB_00123d54:
LEA RSI,[0x12a104]
LEA RDI,[RSP + 0x70]
CALL 0x001151e0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00123d6c
LAB_00123d6c:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [0x00132fc8]
CALL 0x00115200
JMP 0x00123d7f
LAB_00123d7f:
MOV RAX,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RAX + 0x118]
LEA RDI,[RSP + 0x40]
CALL 0x0011f030
JMP 0x00123d97
LAB_00123d97:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x40]
CALL 0x001151b0
JMP 0x00123da8
LAB_00123da8:
LEA RDI,[RSP + 0x40]
CALL 0x00115140
LAB_00123db2:
LEA RSI,[0x12a13e]
LEA RDI,[RSP + 0x70]
CALL 0x001151e0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00123dca
LAB_00123dca:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [0x00132fc8]
CALL 0x00115200
JMP 0x00123ddd
LAB_00123ddd:
MOV RSI,qword ptr [0x00132fc8]
LEA RDI,[RSP + 0x70]
CALL 0x00115200
JMP 0x00123df0
LAB_00123df0:
LEA RDI,[RSP + 0x70]
CALL 0x00115310
LAB_00123dfa:
JMP 0x00123dfc
LAB_00123dfc:
LEA RDI,[RSP + 0x70]
CALL 0x00115340
ADD RSP,0x278
RET
|
/* Simulator::dumpHistory() */
void __thiscall Simulator::dumpHistory(Simulator *this)
{
ostream *poVar1;
ulong uVar2;
ulong uVar3;
string *psVar4;
string local_238 [32];
uint local_218;
ofstream local_208 [512];
Simulator *local_8;
local_8 = this;
std::ofstream::ofstream(local_208,"dump.txt",0x10);
/* try { // try from 00123c4c to 00123d94 has its CatchHandler @ 00123d03 */
poVar1 = std::operator<<((ostream *)local_208,
"================== Excecution History ==================");
std::ostream::operator<<
(poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00132fc8);
local_218 = 0;
while( true ) {
uVar2 = (ulong)local_218;
uVar3 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
(this + 0x338));
if (uVar3 <= uVar2) break;
psVar4 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[]
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
(this + 0x338),(ulong)local_218);
std::operator<<((ostream *)local_208,psVar4);
psVar4 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[]
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
(this + 0x350),(ulong)local_218);
std::operator<<((ostream *)local_208,psVar4);
local_218 = local_218 + 1;
}
poVar1 = std::operator<<((ostream *)local_208,
"========================================================");
std::ostream::operator<<
(poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00132fc8);
std::ostream::operator<<
((ostream *)local_208,
(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00132fc8);
poVar1 = std::operator<<((ostream *)local_208,
"====================== Memory Dump ======================");
std::ostream::operator<<
(poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00132fc8);
MemoryManager::dumpMemory_abi_cxx11_();
/* try { // try from 00123d97 to 00123da5 has its CatchHandler @ 00123e0e */
std::operator<<((ostream *)local_208,local_238);
std::__cxx11::string::~string(local_238);
/* try { // try from 00123db2 to 00123df9 has its CatchHandler @ 00123d03 */
poVar1 = std::operator<<((ostream *)local_208,
"=========================================================");
std::ostream::operator<<
(poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00132fc8);
std::ostream::operator<<
((ostream *)local_208,
(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00132fc8);
std::ofstream::close();
std::ofstream::~ofstream(local_208);
return;
}
|
|
14,587
|
Simulator::dumpHistory()
|
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Simulator.cpp
|
void Simulator::dumpHistory() {
std::ofstream ofile("dump.txt");
ofile << "================== Excecution History =================="
<< std::endl;
for (uint32_t i = 0; i < this->history.instRecord.size(); ++i) {
ofile << this->history.instRecord[i];
ofile << this->history.regRecord[i];
}
ofile << "========================================================"
<< std::endl;
ofile << std::endl;
ofile << "====================== Memory Dump ======================"
<< std::endl;
ofile << this->memory->dumpMemory();
ofile << "========================================================="
<< std::endl;
ofile << std::endl;
ofile.close();
}
|
O2
|
cpp
|
Simulator::dumpHistory():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rdi, %rbx
leaq 0x28d6(%rip), %rsi # 0x15210
leaq 0x28(%rsp), %r14
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0xc1b0
leaq 0x34c9(%rip), %rsi # 0x15e1a
movq %r14, %rdi
callq 0xc190
movq %rax, %rdi
callq 0xc0f0
xorl %r12d, %r12d
leaq 0x28(%rsp), %r14
movl %r12d, %r12d
movq 0x338(%rbx), %rsi
movq 0x340(%rbx), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %r12, %rax
jbe 0x129af
movq %r12, %r15
shlq $0x5, %r15
addq %r15, %rsi
movq %r14, %rdi
callq 0xc170
addq 0x350(%rbx), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xc170
incl %r12d
jmp 0x12969
leaq 0x34d8(%rip), %rsi # 0x15e8e
leaq 0x28(%rsp), %rdi
callq 0xc190
movq %rax, %rdi
callq 0xc0f0
leaq 0x28(%rsp), %rdi
callq 0xc0f0
leaq 0x347a(%rip), %rsi # 0x15e53
leaq 0x28(%rsp), %rdi
callq 0xc190
movq %rax, %rdi
callq 0xc0f0
movq 0x118(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0xfb98
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xc170
leaq 0x8(%rsp), %rdi
callq 0xc0d0
leaq 0x3471(%rip), %rsi # 0x15e8d
leaq 0x28(%rsp), %rdi
callq 0xc190
movq %rax, %rdi
callq 0xc0f0
leaq 0x28(%rsp), %rdi
callq 0xc0f0
leaq 0x28(%rsp), %rdi
callq 0xc2c0
leaq 0x28(%rsp), %rdi
callq 0xc2e0
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xc0d0
jmp 0x12a71
jmp 0x12a6e
jmp 0x12a6e
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xc2e0
movq %rbx, %rdi
callq 0xc340
nop
|
_ZN9Simulator11dumpHistoryEv:
push r15
push r14
push r12
push rbx
sub rsp, 228h
mov rbx, rdi
lea rsi, aDDumpMemoryAnd+28h; "dump.txt"
lea r14, [rsp+248h+var_220]
push 10h
pop rdx
mov rdi, r14
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ofstream::basic_ofstream(char const*,std::_Ios_Openmode)
lea rsi, aExcecutionHist; "================== Excecution History ="...
mov rdi, r14
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
xor r12d, r12d
lea r14, [rsp+248h+var_220]
loc_12969:
mov r12d, r12d
mov rsi, [rbx+338h]
mov rax, [rbx+340h]
sub rax, rsi
sar rax, 5
cmp rax, r12
jbe short loc_129AF
mov r15, r12
shl r15, 5
add rsi, r15
mov rdi, r14
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
add r15, [rbx+350h]
mov rdi, r14
mov rsi, r15
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
inc r12d
jmp short loc_12969
loc_129AF:
lea rsi, asc_15E8D+1; "======================================="...
lea rdi, [rsp+248h+var_220]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
lea rdi, [rsp+248h+var_220]
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
lea rsi, aMemoryDump_0; "====================== Memory Dump ===="...
lea rdi, [rsp+248h+var_220]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
mov rsi, [rbx+118h]
lea rdi, [rsp+248h+var_240]
call _ZN13MemoryManager10dumpMemoryB5cxx11Ev; MemoryManager::dumpMemory(void)
lea rdi, [rsp+248h+var_220]
lea rsi, [rsp+248h+var_240]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rdi, [rsp+248h+var_240]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rsi, asc_15E8D; "======================================="...
lea rdi, [rsp+248h+var_220]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
lea rdi, [rsp+248h+var_220]
call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &)
lea rdi, [rsp+248h+var_220]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void)
lea rdi, [rsp+248h+var_220]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
add rsp, 228h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_12A71
jmp short loc_12A6E
jmp short $+2
loc_12A6E:
mov rbx, rax
loc_12A71:
lea rdi, [rsp+arg_20]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
mov rdi, rbx
call __Unwind_Resume
|
void __noreturn Simulator::dumpHistory(Simulator *this)
{
long long v1; // rax
unsigned int i; // r12d
long long v3; // rsi
long long v4; // rax
long long v5; // rax
_BYTE v6[32]; // [rsp+8h] [rbp-240h] BYREF
_BYTE v7[544]; // [rsp+28h] [rbp-220h] BYREF
std::ofstream::basic_ofstream(v7, "dump.txt", 16LL);
v1 = std::operator<<<std::char_traits<char>>(v7, "================== Excecution History ==================");
std::endl<char,std::char_traits<char>>(v1);
for ( i = 0; ; ++i )
{
v3 = *((_QWORD *)this + 103);
if ( (*((_QWORD *)this + 104) - v3) >> 5 <= (unsigned long long)i )
break;
std::operator<<<char>(v7, 32LL * i + v3);
std::operator<<<char>(v7, *((_QWORD *)this + 106) + 32LL * i);
}
v4 = std::operator<<<std::char_traits<char>>(v7, "========================================================");
std::endl<char,std::char_traits<char>>(v4);
std::endl<char,std::char_traits<char>>(v7);
v5 = std::operator<<<std::char_traits<char>>(v7, "====================== Memory Dump ======================");
std::endl<char,std::char_traits<char>>(v5);
MemoryManager::dumpMemory[abi:cxx11]((long long)v6, *((_QWORD **)this + 35));
}
|
dumpHistory:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV RBX,RDI
LEA RSI,[0x115210]
LEA R14,[RSP + 0x28]
PUSH 0x10
POP RDX
MOV RDI,R14
CALL 0x0010c1b0
LAB_0011294a:
LEA RSI,[0x115e1a]
MOV RDI,R14
CALL 0x0010c190
MOV RDI,RAX
CALL 0x0010c0f0
XOR R12D,R12D
LEA R14,[RSP + 0x28]
LAB_00112969:
MOV R12D,R12D
MOV RSI,qword ptr [RBX + 0x338]
MOV RAX,qword ptr [RBX + 0x340]
SUB RAX,RSI
SAR RAX,0x5
CMP RAX,R12
JBE 0x001129af
MOV R15,R12
SHL R15,0x5
ADD RSI,R15
LAB_00112990:
MOV RDI,R14
CALL 0x0010c170
ADD R15,qword ptr [RBX + 0x350]
MOV RDI,R14
MOV RSI,R15
CALL 0x0010c170
INC R12D
JMP 0x00112969
LAB_001129af:
LEA RSI,[0x115e8e]
LEA RDI,[RSP + 0x28]
CALL 0x0010c190
MOV RDI,RAX
CALL 0x0010c0f0
LEA RDI,[RSP + 0x28]
CALL 0x0010c0f0
LEA RSI,[0x115e53]
LEA RDI,[RSP + 0x28]
CALL 0x0010c190
MOV RDI,RAX
CALL 0x0010c0f0
MOV RSI,qword ptr [RBX + 0x118]
LAB_001129f2:
LEA RDI,[RSP + 0x8]
CALL 0x0010fb98
LAB_001129fc:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
CALL 0x0010c170
LEA RDI,[RSP + 0x8]
CALL 0x0010c0d0
LAB_00112a15:
LEA RSI,[0x115e8d]
LEA RDI,[RSP + 0x28]
CALL 0x0010c190
MOV RDI,RAX
CALL 0x0010c0f0
LEA RDI,[RSP + 0x28]
CALL 0x0010c0f0
LEA RDI,[RSP + 0x28]
CALL 0x0010c2c0
LAB_00112a42:
LEA RDI,[RSP + 0x28]
CALL 0x0010c2e0
ADD RSP,0x228
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Simulator::dumpHistory() */
void __thiscall Simulator::dumpHistory(Simulator *this)
{
ostream *poVar1;
uint uVar2;
long lVar3;
string local_240 [32];
ostream local_220 [512];
std::ofstream::ofstream((ofstream *)local_220,"dump.txt",0x10);
/* try { // try from 0011294a to 00112960 has its CatchHandler @ 00112a6c */
poVar1 = std::operator<<(local_220,"================== Excecution History ==================");
std::endl<char,std::char_traits<char>>(poVar1);
uVar2 = 0;
while( true ) {
if ((ulong)(*(long *)(this + 0x340) - *(long *)(this + 0x338) >> 5) <= (ulong)uVar2) break;
lVar3 = (ulong)uVar2 * 0x20;
/* try { // try from 00112990 to 001129a9 has its CatchHandler @ 00112a6e */
std::operator<<(local_220,(string *)(*(long *)(this + 0x338) + lVar3));
std::operator<<(local_220,(string *)(lVar3 + *(long *)(this + 0x350)));
uVar2 = uVar2 + 1;
}
/* try { // try from 001129af to 001129ea has its CatchHandler @ 00112a6c */
poVar1 = std::operator<<(local_220,"========================================================");
std::endl<char,std::char_traits<char>>(poVar1);
std::endl<char,std::char_traits<char>>(local_220);
poVar1 = std::operator<<(local_220,"====================== Memory Dump ======================");
std::endl<char,std::char_traits<char>>(poVar1);
/* try { // try from 001129f2 to 001129fb has its CatchHandler @ 00112a6a */
MemoryManager::dumpMemory_abi_cxx11_();
/* try { // try from 001129fc to 00112a0a has its CatchHandler @ 00112a5b */
std::operator<<(local_220,local_240);
std::__cxx11::string::~string(local_240);
/* try { // try from 00112a15 to 00112a41 has its CatchHandler @ 00112a6c */
poVar1 = std::operator<<(local_220,"=========================================================");
std::endl<char,std::char_traits<char>>(poVar1);
std::endl<char,std::char_traits<char>>(local_220);
std::ofstream::close();
std::ofstream::~ofstream((ofstream *)local_220);
return;
}
|
|
14,588
|
Simulator::dumpHistory()
|
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Simulator.cpp
|
void Simulator::dumpHistory() {
std::ofstream ofile("dump.txt");
ofile << "================== Excecution History =================="
<< std::endl;
for (uint32_t i = 0; i < this->history.instRecord.size(); ++i) {
ofile << this->history.instRecord[i];
ofile << this->history.regRecord[i];
}
ofile << "========================================================"
<< std::endl;
ofile << std::endl;
ofile << "====================== Memory Dump ======================"
<< std::endl;
ofile << this->memory->dumpMemory();
ofile << "========================================================="
<< std::endl;
ofile << std::endl;
ofile.close();
}
|
O3
|
cpp
|
Simulator::dumpHistory():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rdi, %rbx
leaq 0x2aa7(%rip), %rsi # 0x1523a
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movl $0x10, %edx
callq 0xb1d0
leaq 0x369a(%rip), %rsi # 0x15e46
movl $0x38, %edx
movq %r14, %rdi
callq 0xb200
movq 0x28(%rsp), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0xb1b0
movsbl %al, %esi
leaq 0x28(%rsp), %rdi
callq 0xb040
movq %rax, %rdi
callq 0xb140
movq 0x338(%rbx), %rax
cmpq %rax, 0x340(%rbx)
je 0x1284d
movl $0x1, %ebp
xorl %r15d, %r15d
leaq 0x28(%rsp), %r14
shlq $0x5, %r15
movq (%rax,%r15), %rsi
movq 0x8(%rax,%r15), %rdx
movq %r14, %rdi
callq 0xb200
movq 0x350(%rbx), %rax
movq (%rax,%r15), %rsi
movq 0x8(%rax,%r15), %rdx
movq %r14, %rdi
callq 0xb200
movl %ebp, %r15d
movq 0x338(%rbx), %rax
movq 0x340(%rbx), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incl %ebp
cmpq %r15, %rcx
ja 0x12801
leaq 0x3666(%rip), %rsi # 0x15eba
leaq 0x28(%rsp), %r14
movl $0x38, %edx
movq %r14, %rdi
callq 0xb200
movq 0x28(%rsp), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0xb1b0
movsbl %al, %esi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0xb040
movq %rax, %rdi
callq 0xb140
movq 0x28(%rsp), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0xb1b0
movsbl %al, %esi
leaq 0x28(%rsp), %rdi
callq 0xb040
movq %rax, %rdi
callq 0xb140
leaq 0x35b9(%rip), %rsi # 0x15e7f
leaq 0x28(%rsp), %r14
movl $0x39, %edx
movq %r14, %rdi
callq 0xb200
movq 0x28(%rsp), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0xb1b0
movsbl %al, %esi
leaq 0x28(%rsp), %rdi
callq 0xb040
movq %rax, %rdi
callq 0xb140
movq 0x118(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0xef8c
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0xb200
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1293b
callq 0xb1a0
leaq 0x3577(%rip), %rsi # 0x15eb9
leaq 0x28(%rsp), %rbx
movl $0x39, %edx
movq %rbx, %rdi
callq 0xb200
movq 0x28(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0xb1b0
movsbl %al, %esi
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0xb040
movq %rax, %rdi
callq 0xb140
movq 0x28(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0xb1b0
movsbl %al, %esi
leaq 0x28(%rsp), %rdi
callq 0xb040
movq %rax, %rdi
callq 0xb140
leaq 0x28(%rsp), %rdi
callq 0xb2e0
movq 0x9612(%rip), %rax # 0x1bfd0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x30(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x28(%rsp,%rcx)
callq 0xb180
leaq 0x120(%rsp), %rdi
callq 0xb0a0
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12a16
callq 0xb1a0
jmp 0x12a16
jmp 0x12a13
jmp 0x12a13
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xb300
movq %rbx, %rdi
callq 0xb360
|
_ZN9Simulator11dumpHistoryEv:
push rbp
push r15
push r14
push rbx
sub rsp, 228h
mov rbx, rdi
lea rsi, aDDumpMemoryAnd+28h; "dump.txt"
lea r14, [rsp+248h+var_220]
mov rdi, r14
mov edx, 10h
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ofstream::basic_ofstream(char const*,std::_Ios_Openmode)
lea rsi, aExcecutionHist; "================== Excecution History ="...
mov edx, 38h ; '8'
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rsp+248h+var_220]
add r14, [rax-18h]
mov rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
lea rdi, [rsp+248h+var_220]; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rax, [rbx+338h]
cmp [rbx+340h], rax
jz short loc_1284D
mov ebp, 1
xor r15d, r15d
lea r14, [rsp+248h+var_220]
loc_12801:
shl r15, 5
mov rsi, [rax+r15]
mov rdx, [rax+r15+8]
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx+350h]
mov rsi, [rax+r15]
mov rdx, [rax+r15+8]
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r15d, ebp
mov rax, [rbx+338h]
mov rcx, [rbx+340h]
sub rcx, rax
sar rcx, 5
inc ebp
cmp rcx, r15
ja short loc_12801
loc_1284D:
lea rsi, asc_15EB9+1; "======================================="...
lea r14, [rsp+248h+var_220]
mov edx, 38h ; '8'
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rsp+248h+var_220]
add r14, [rax-18h]
mov rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
lea r14, [rsp+248h+var_220]
mov rdi, r14; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rax, [rsp+248h+var_220]
add r14, [rax-18h]
mov rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
lea rdi, [rsp+248h+var_220]; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rsi, aMemoryDump_0; "====================== Memory Dump ===="...
lea r14, [rsp+248h+var_220]
mov edx, 39h ; '9'
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rsp+248h+var_220]
add r14, [rax-18h]
mov rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
lea rdi, [rsp+248h+var_220]; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rsi, [rbx+118h]
lea rdi, [rsp+248h+var_240]
call _ZN13MemoryManager10dumpMemoryB5cxx11Ev; MemoryManager::dumpMemory(void)
mov rsi, [rsp+248h+var_240]
mov rdx, [rsp+248h+var_238]
lea rdi, [rsp+248h+var_220]
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, [rsp+248h+var_230]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_1293B
call __ZdlPv; operator delete(void *)
loc_1293B:
lea rsi, asc_15EB9; "======================================="...
lea rbx, [rsp+248h+var_220]
mov edx, 39h ; '9'
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rsp+248h+var_220]
add rbx, [rax-18h]
mov rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
lea rbx, [rsp+248h+var_220]
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rax, [rsp+248h+var_220]
add rbx, [rax-18h]
mov rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
lea rdi, [rsp+248h+var_220]; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rdi, [rsp+248h+var_220]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void)
mov rax, cs:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE_ptr
mov rcx, [rax]
mov rax, [rax+18h]
lea rdi, [rsp+248h+var_218]
mov [rdi-8], rcx
mov rcx, [rcx-18h]
mov [rsp+rcx+248h+var_220], rax
call __ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev; std::filebuf::~filebuf()
lea rdi, [rsp+248h+var_128]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
add rsp, 228h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_12A16
call __ZdlPv; operator delete(void *)
jmp short loc_12A16
jmp short loc_12A13
jmp short $+2
loc_12A13:
mov rbx, rax
loc_12A16:
lea rdi, [rsp+arg_20]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
mov rdi, rbx
call __Unwind_Resume
|
void __noreturn Simulator::dumpHistory(Simulator *this)
{
char v1; // al
std::ostream *v2; // rax
long long v3; // rax
unsigned int v4; // ebp
unsigned long long v5; // r15
long long v6; // r15
char v7; // al
std::ostream *v8; // rax
char v9; // al
std::ostream *v10; // rax
char v11; // al
std::ostream *v12; // rax
long long v13; // rdx
long long v14; // rcx
long long v15; // r8
long long v16; // r9
long long v17; // [rsp+0h] [rbp-248h]
long long v18; // [rsp+8h] [rbp-240h] BYREF
long long v19; // [rsp+28h] [rbp-220h] BYREF
std::ofstream::basic_ofstream(&v19, "dump.txt", 16LL);
std::__ostream_insert<char,std::char_traits<char>>(
&v19,
"================== Excecution History ==================",
56LL);
v1 = std::ios::widen((char *)&v19 + *(_QWORD *)(v19 - 24), 10LL);
v2 = (std::ostream *)std::ostream::put((std::ostream *)&v19, v1);
std::ostream::flush(v2);
v3 = *((_QWORD *)this + 103);
if ( *((_QWORD *)this + 104) != v3 )
{
v4 = 1;
v5 = 0LL;
do
{
v6 = 32 * v5;
std::__ostream_insert<char,std::char_traits<char>>(&v19, *(_QWORD *)(v3 + v6), *(_QWORD *)(v3 + v6 + 8));
std::__ostream_insert<char,std::char_traits<char>>(
&v19,
*(_QWORD *)(*((_QWORD *)this + 106) + v6),
*(_QWORD *)(*((_QWORD *)this + 106) + v6 + 8));
v5 = v4;
v3 = *((_QWORD *)this + 103);
++v4;
}
while ( (*((_QWORD *)this + 104) - v3) >> 5 > v5 );
}
std::__ostream_insert<char,std::char_traits<char>>(
&v19,
"========================================================",
56LL);
v7 = std::ios::widen((char *)&v19 + *(_QWORD *)(v19 - 24), 10LL);
v8 = (std::ostream *)std::ostream::put((std::ostream *)&v19, v7);
std::ostream::flush(v8);
v9 = std::ios::widen((char *)&v19 + *(_QWORD *)(v19 - 24), 10LL);
v10 = (std::ostream *)std::ostream::put((std::ostream *)&v19, v9);
std::ostream::flush(v10);
std::__ostream_insert<char,std::char_traits<char>>(
&v19,
"====================== Memory Dump ======================",
57LL);
v11 = std::ios::widen((char *)&v19 + *(_QWORD *)(v19 - 24), 10LL);
v12 = (std::ostream *)std::ostream::put((std::ostream *)&v19, v11);
std::ostream::flush(v12);
MemoryManager::dumpMemory[abi:cxx11]((long long)&v18, *((_QWORD **)this + 35), v13, v14, v15, v16, v17);
}
|
dumpHistory:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x228
MOV RBX,RDI
LEA RSI,[0x11523a]
LEA R14,[RSP + 0x28]
MOV RDI,R14
MOV EDX,0x10
CALL 0x0010b1d0
LAB_001127a5:
LEA RSI,[0x115e46]
MOV EDX,0x38
MOV RDI,R14
CALL 0x0010b200
MOV RAX,qword ptr [RSP + 0x28]
ADD R14,qword ptr [RAX + -0x18]
MOV RDI,R14
MOV ESI,0xa
CALL 0x0010b1b0
MOVSX ESI,AL
LEA RDI,[RSP + 0x28]
CALL 0x0010b040
MOV RDI,RAX
CALL 0x0010b140
MOV RAX,qword ptr [RBX + 0x338]
CMP qword ptr [RBX + 0x340],RAX
JZ 0x0011284d
MOV EBP,0x1
XOR R15D,R15D
LEA R14,[RSP + 0x28]
LAB_00112801:
SHL R15,0x5
MOV RSI,qword ptr [RAX + R15*0x1]
MOV RDX,qword ptr [RAX + R15*0x1 + 0x8]
LAB_0011280e:
MOV RDI,R14
CALL 0x0010b200
MOV RAX,qword ptr [RBX + 0x350]
MOV RSI,qword ptr [RAX + R15*0x1]
MOV RDX,qword ptr [RAX + R15*0x1 + 0x8]
MOV RDI,R14
CALL 0x0010b200
MOV R15D,EBP
MOV RAX,qword ptr [RBX + 0x338]
MOV RCX,qword ptr [RBX + 0x340]
SUB RCX,RAX
SAR RCX,0x5
INC EBP
CMP RCX,R15
JA 0x00112801
LAB_0011284d:
LEA RSI,[0x115eba]
LEA R14,[RSP + 0x28]
MOV EDX,0x38
MOV RDI,R14
CALL 0x0010b200
MOV RAX,qword ptr [RSP + 0x28]
ADD R14,qword ptr [RAX + -0x18]
MOV RDI,R14
MOV ESI,0xa
CALL 0x0010b1b0
MOVSX ESI,AL
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x0010b040
MOV RDI,RAX
CALL 0x0010b140
MOV RAX,qword ptr [RSP + 0x28]
ADD R14,qword ptr [RAX + -0x18]
MOV RDI,R14
MOV ESI,0xa
CALL 0x0010b1b0
MOVSX ESI,AL
LEA RDI,[RSP + 0x28]
CALL 0x0010b040
MOV RDI,RAX
CALL 0x0010b140
LEA RSI,[0x115e7f]
LEA R14,[RSP + 0x28]
MOV EDX,0x39
MOV RDI,R14
CALL 0x0010b200
MOV RAX,qword ptr [RSP + 0x28]
ADD R14,qword ptr [RAX + -0x18]
MOV RDI,R14
MOV ESI,0xa
CALL 0x0010b1b0
MOVSX ESI,AL
LEA RDI,[RSP + 0x28]
CALL 0x0010b040
MOV RDI,RAX
CALL 0x0010b140
MOV RSI,qword ptr [RBX + 0x118]
LAB_0011290a:
LEA RDI,[RSP + 0x8]
CALL 0x0010ef8c
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0011291e:
LEA RDI,[RSP + 0x28]
CALL 0x0010b200
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0011293b
CALL 0x0010b1a0
LAB_0011293b:
LEA RSI,[0x115eb9]
LEA RBX,[RSP + 0x28]
MOV EDX,0x39
MOV RDI,RBX
CALL 0x0010b200
MOV RAX,qword ptr [RSP + 0x28]
ADD RBX,qword ptr [RAX + -0x18]
MOV RDI,RBX
MOV ESI,0xa
CALL 0x0010b1b0
MOVSX ESI,AL
LEA RBX,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0010b040
MOV RDI,RAX
CALL 0x0010b140
MOV RAX,qword ptr [RSP + 0x28]
ADD RBX,qword ptr [RAX + -0x18]
MOV RDI,RBX
MOV ESI,0xa
CALL 0x0010b1b0
MOVSX ESI,AL
LEA RDI,[RSP + 0x28]
CALL 0x0010b040
MOV RDI,RAX
CALL 0x0010b140
LEA RDI,[RSP + 0x28]
CALL 0x0010b2e0
LAB_001129b7:
MOV RAX,qword ptr [0x0011bfd0]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
LEA RDI,[RSP + 0x30]
MOV qword ptr [RDI + -0x8],RCX
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RSP + RCX*0x1 + 0x28],RAX
CALL 0x0010b180
LEA RDI,[RSP + 0x120]
CALL 0x0010b0a0
ADD RSP,0x228
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* Simulator::dumpHistory() */
void __thiscall Simulator::dumpHistory(Simulator *this)
{
long lVar1;
uint uVar2;
ulong uVar3;
long lVar4;
char *local_240;
long local_238;
char local_230 [16];
long local_220;
filebuf local_218 [240];
ios_base local_128 [264];
std::ofstream::ofstream((ofstream *)&local_220,"dump.txt",0x10);
/* try { // try from 001127a5 to 001127e3 has its CatchHandler @ 00112a11 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_220,"================== Excecution History ==================",0x38);
std::ios::widen((char)(ostream *)&local_220 + (char)*(int8 *)(local_220 + -0x18));
std::ostream::put((char)&local_220);
std::ostream::flush();
lVar1 = *(long *)(this + 0x338);
if (*(long *)(this + 0x340) != lVar1) {
uVar2 = 1;
uVar3 = 0;
do {
lVar4 = uVar3 * 0x20;
/* try { // try from 0011280e to 0011282d has its CatchHandler @ 00112a13 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_220,*(char **)(lVar1 + lVar4),*(long *)(lVar1 + 8 + lVar4));
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_220,*(char **)(*(long *)(this + 0x350) + lVar4),
*(long *)(*(long *)(this + 0x350) + 8 + lVar4));
uVar3 = (ulong)uVar2;
lVar1 = *(long *)(this + 0x338);
uVar2 = uVar2 + 1;
} while (uVar3 < (ulong)(*(long *)(this + 0x340) - lVar1 >> 5));
}
/* try { // try from 0011284d to 00112902 has its CatchHandler @ 00112a11 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_220,"========================================================",0x38);
std::ios::widen((char)(ostream *)&local_220 + (char)*(int8 *)(local_220 + -0x18));
std::ostream::put((char)&local_220);
std::ostream::flush();
std::ios::widen((char)&local_220 + (char)*(int8 *)(local_220 + -0x18));
std::ostream::put((char)&local_220);
std::ostream::flush();
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_220,"====================== Memory Dump ======================",0x39)
;
std::ios::widen((char)(ostream *)&local_220 + (char)*(int8 *)(local_220 + -0x18));
std::ostream::put((char)&local_220);
std::ostream::flush();
/* try { // try from 0011290a to 00112913 has its CatchHandler @ 00112a0f */
MemoryManager::dumpMemory_abi_cxx11_();
/* try { // try from 0011291e to 00112927 has its CatchHandler @ 001129f7 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)&local_220,local_240,local_238);
if (local_240 != local_230) {
operator_delete(local_240);
}
/* try { // try from 0011293b to 001129b6 has its CatchHandler @ 00112a11 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_220,"=========================================================",0x39)
;
std::ios::widen((char)(ostream *)&local_220 + (char)*(int8 *)(local_220 + -0x18));
std::ostream::put((char)&local_220);
std::ostream::flush();
std::ios::widen((char)&local_220 + (char)*(int8 *)(local_220 + -0x18));
std::ostream::put((char)&local_220);
std::ostream::flush();
std::ofstream::close();
local_220 = *(long *)PTR_VTT_0011bfd0;
*(int8 *)(local_218 + *(long *)(local_220 + -0x18) + -8) =
*(int8 *)(PTR_VTT_0011bfd0 + 0x18);
std::filebuf::~filebuf(local_218);
std::ios_base::~ios_base(local_128);
return;
}
|
|
14,589
|
Settings::clearShips()
|
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
|
void Settings::clearShips() {
std::lock_guard<std::mutex> lock(settings_mutex);
masterShips.clear();
slaveShips.clear();
}
|
O1
|
cpp
|
Settings::clearShips():
pushq %rbx
movq %rdi, %rbx
callq 0x5500
testl %eax, %eax
jne 0x731c
leaq 0x90(%rbx), %rdi
movq 0x90(%rbx), %rsi
callq 0x15150
leaq 0xa8(%rbx), %rdi
movq 0xa8(%rbx), %rsi
callq 0x15150
movq %rbx, %rdi
popq %rbx
jmp 0x52d0
movl %eax, %edi
callq 0x5260
nop
|
_ZN8Settings10clearShipsEv:
push rbx
mov rbx, rdi
call _pthread_mutex_lock
test eax, eax
jnz short loc_731C
lea rdi, [rbx+90h]
mov rsi, [rbx+90h]
call _ZNSt6vectorI4ShipSaIS0_EE15_M_erase_at_endEPS0_; std::vector<Ship>::_M_erase_at_end(Ship*)
lea rdi, [rbx+0A8h]
mov rsi, [rbx+0A8h]
call _ZNSt6vectorI4ShipSaIS0_EE15_M_erase_at_endEPS0_; std::vector<Ship>::_M_erase_at_end(Ship*)
mov rdi, rbx
pop rbx
jmp _pthread_mutex_unlock
loc_731C:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
|
long long Settings::clearShips(Settings *this)
{
int v1; // eax
v1 = pthread_mutex_lock(this);
if ( v1 )
std::__throw_system_error(v1);
std::vector<Ship>::_M_erase_at_end((char *)this + 144, *((_QWORD *)this + 18));
std::vector<Ship>::_M_erase_at_end((char *)this + 168, *((_QWORD *)this + 21));
return pthread_mutex_unlock(this);
}
|
clearShips:
PUSH RBX
MOV RBX,RDI
CALL 0x00105500
TEST EAX,EAX
JNZ 0x0010731c
LEA RDI,[RBX + 0x90]
MOV RSI,qword ptr [RBX + 0x90]
CALL 0x00115150
LEA RDI,[RBX + 0xa8]
MOV RSI,qword ptr [RBX + 0xa8]
CALL 0x00115150
MOV RDI,RBX
POP RBX
JMP 0x001052d0
LAB_0010731c:
MOV EDI,EAX
CALL 0x00105260
|
/* Settings::clearShips() */
void __thiscall Settings::clearShips(Settings *this)
{
int iVar1;
iVar1 = pthread_mutex_lock((pthread_mutex_t *)this);
if (iVar1 == 0) {
std::vector<Ship,std::allocator<Ship>>::_M_erase_at_end
((vector<Ship,std::allocator<Ship>> *)(this + 0x90),*(Ship **)(this + 0x90));
std::vector<Ship,std::allocator<Ship>>::_M_erase_at_end
((vector<Ship,std::allocator<Ship>> *)(this + 0xa8),*(Ship **)(this + 0xa8));
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar1);
}
|
|
14,590
|
Settings::clearShips()
|
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
|
void Settings::clearShips() {
std::lock_guard<std::mutex> lock(settings_mutex);
masterShips.clear();
slaveShips.clear();
}
|
O3
|
cpp
|
Settings::clearShips():
pushq %rbx
movq %rdi, %rbx
callq 0x5500
testl %eax, %eax
jne 0x72c8
leaq 0x90(%rbx), %rdi
movq 0x90(%rbx), %rsi
callq 0x1510a
leaq 0xa8(%rbx), %rdi
movq 0xa8(%rbx), %rsi
callq 0x1510a
movq %rbx, %rdi
popq %rbx
jmp 0x52d0
movl %eax, %edi
callq 0x5260
nop
|
_ZN8Settings10clearShipsEv:
push rbx
mov rbx, rdi
call _pthread_mutex_lock
test eax, eax
jnz short loc_72C8
lea rdi, [rbx+90h]
mov rsi, [rbx+90h]
call _ZNSt6vectorI4ShipSaIS0_EE15_M_erase_at_endEPS0_; std::vector<Ship>::_M_erase_at_end(Ship*)
lea rdi, [rbx+0A8h]
mov rsi, [rbx+0A8h]
call _ZNSt6vectorI4ShipSaIS0_EE15_M_erase_at_endEPS0_; std::vector<Ship>::_M_erase_at_end(Ship*)
mov rdi, rbx
pop rbx
jmp _pthread_mutex_unlock
loc_72C8:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
|
long long Settings::clearShips(Settings *this)
{
int v1; // eax
v1 = pthread_mutex_lock(this);
if ( v1 )
std::__throw_system_error(v1);
std::vector<Ship>::_M_erase_at_end((char *)this + 144, *((_QWORD *)this + 18));
std::vector<Ship>::_M_erase_at_end((char *)this + 168, *((_QWORD *)this + 21));
return pthread_mutex_unlock(this);
}
|
clearShips:
PUSH RBX
MOV RBX,RDI
CALL 0x00105500
TEST EAX,EAX
JNZ 0x001072c8
LEA RDI,[RBX + 0x90]
MOV RSI,qword ptr [RBX + 0x90]
CALL 0x0011510a
LEA RDI,[RBX + 0xa8]
MOV RSI,qword ptr [RBX + 0xa8]
CALL 0x0011510a
MOV RDI,RBX
POP RBX
JMP 0x001052d0
LAB_001072c8:
MOV EDI,EAX
CALL 0x00105260
|
/* Settings::clearShips() */
void __thiscall Settings::clearShips(Settings *this)
{
int iVar1;
iVar1 = pthread_mutex_lock((pthread_mutex_t *)this);
if (iVar1 == 0) {
std::vector<Ship,std::allocator<Ship>>::_M_erase_at_end
((vector<Ship,std::allocator<Ship>> *)(this + 0x90),*(Ship **)(this + 0x90));
std::vector<Ship,std::allocator<Ship>>::_M_erase_at_end
((vector<Ship,std::allocator<Ship>> *)(this + 0xa8),*(Ship **)(this + 0xa8));
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar1);
}
|
|
14,591
|
glfwPlatformSetWindowFloating
|
untodesu[P]riteg/build_O0/_deps/glfw-src/src/x11_window.c
|
void _glfwPlatformSetWindowFloating(_GLFWwindow* window, GLFWbool enabled)
{
if (!_glfw.x11.NET_WM_STATE || !_glfw.x11.NET_WM_STATE_ABOVE)
return;
if (_glfwPlatformWindowVisible(window))
{
const Atom action = enabled ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE;
sendEventToWM(window,
_glfw.x11.NET_WM_STATE,
action,
_glfw.x11.NET_WM_STATE_ABOVE,
0, 1, 0);
}
else
{
Atom* states;
unsigned long i, count;
count = _glfwGetWindowPropertyX11(window->x11.handle,
_glfw.x11.NET_WM_STATE,
XA_ATOM,
(unsigned char**) &states);
if (!states)
return;
if (enabled)
{
for (i = 0; i < count; i++)
{
if (states[i] == _glfw.x11.NET_WM_STATE_ABOVE)
break;
}
if (i == count)
{
XChangeProperty(_glfw.x11.display, window->x11.handle,
_glfw.x11.NET_WM_STATE, XA_ATOM, 32,
PropModeAppend,
(unsigned char*) &_glfw.x11.NET_WM_STATE_ABOVE,
1);
}
}
else
{
for (i = 0; i < count; i++)
{
if (states[i] == _glfw.x11.NET_WM_STATE_ABOVE)
{
states[i] = states[count - 1];
count--;
}
}
XChangeProperty(_glfw.x11.display, window->x11.handle,
_glfw.x11.NET_WM_STATE, XA_ATOM, 32,
PropModeReplace, (unsigned char*) &states, count);
}
XFree(states);
}
XFlush(_glfw.x11.display);
}
|
O0
|
c
|
glfwPlatformSetWindowFloating:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0xadf42(%rip), %rax # 0xe0c68
cmpq $0x0, 0x20440(%rax)
je 0x32d41
leaq 0xadf31(%rip), %rax # 0xe0c68
cmpq $0x0, 0x20448(%rax)
jne 0x32d46
jmp 0x32f63
movq -0x8(%rbp), %rdi
callq 0x31c60
cmpl $0x0, %eax
je 0x32dab
movl -0xc(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
cltq
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xadef3(%rip), %rax # 0xe0c68
movq 0x20440(%rax), %rsi
movq -0x18(%rbp), %rdx
leaq 0xadee1(%rip), %rax # 0xe0c68
movq 0x20448(%rax), %rcx
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
movq $0x0, (%rsp)
callq 0x321e0
jmp 0x32f50
movq -0x8(%rbp), %rax
movq 0x348(%rax), %rdi
leaq 0xadeab(%rip), %rax # 0xe0c68
movq 0x20440(%rax), %rsi
movl $0x4, %edx
leaq -0x20(%rbp), %rcx
callq 0x2ff50
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x32de2
jmp 0x32f63
cmpl $0x0, -0xc(%rbp)
je 0x32e97
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x32e2c
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
leaq 0xade57(%rip), %rcx # 0xe0c68
cmpq 0x20448(%rcx), %rax
jne 0x32e1c
jmp 0x32e2c
jmp 0x32e1e
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x32df4
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x32e92
leaq 0xade2b(%rip), %rax # 0xe0c68
movq 0x1fec0(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x348(%rax), %rsi
leaq 0xade12(%rip), %rax # 0xe0c68
movq 0x20440(%rax), %rdx
movl $0x4, %ecx
movl $0x20, %r8d
movl $0x2, %r9d
leaq 0xaddf3(%rip), %rax # 0xe0c68
addq $0x1fec0, %rax # imm = 0x1FEC0
addq $0x588, %rax # imm = 0x588
movq %rax, (%rsp)
movl $0x1, 0x8(%rsp)
callq 0xc7b0
jmp 0x32f47
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x32efd
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
leaq 0xaddac(%rip), %rcx # 0xe0c68
cmpq 0x20448(%rcx), %rax
jne 0x32eed
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x32eef
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x32e9f
leaq 0xadd64(%rip), %rax # 0xe0c68
movq 0x1fec0(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x348(%rax), %rsi
leaq 0xadd4b(%rip), %rax # 0xe0c68
movq 0x20440(%rax), %rdx
movq -0x30(%rbp), %rax
movl $0x4, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
leaq -0x20(%rbp), %r10
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0xc7b0
movq -0x20(%rbp), %rdi
callq 0xcb90
leaq 0xadd11(%rip), %rax # 0xe0c68
movq 0x1fec0(%rax), %rdi
callq 0xce10
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
_glfwPlatformSetWindowFloating:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
lea rax, _glfw
cmp qword ptr ds:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_[rax], 0; std::string::basic_string<std::allocator<char>>(ulong,char,std::allocator<char> const&)
jz short loc_32D41
lea rax, _glfw
cmp qword ptr ds:loc_20448[rax], 0
jnz short loc_32D46
loc_32D41:
jmp loc_32F63
loc_32D46:
mov rdi, [rbp+var_8]
call _glfwPlatformWindowVisible
cmp eax, 0
jz short loc_32DAB
mov edx, [rbp+var_C]
xor eax, eax
mov ecx, 1
cmp edx, 0
cmovnz eax, ecx
cdqe
mov [rbp+var_18], rax
mov rdi, [rbp+var_8]
lea rax, _glfw
mov rsi, qword ptr ds:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_[rax]; std::string::basic_string<std::allocator<char>>(ulong,char,std::allocator<char> const&)
mov rdx, [rbp+var_18]
lea rax, _glfw
mov rcx, qword ptr ds:loc_20448[rax]
xor eax, eax
mov r8d, eax
mov r9d, 1
mov [rsp+40h+var_40], 0
call sendEventToWM
jmp loc_32F50
loc_32DAB:
mov rax, [rbp+var_8]
mov rdi, [rax+348h]
lea rax, _glfw
mov rsi, qword ptr ds:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_[rax]; std::string::basic_string<std::allocator<char>>(ulong,char,std::allocator<char> const&)
mov edx, 4
lea rcx, [rbp+var_20]
call _glfwGetWindowPropertyX11
mov [rbp+var_30], rax
cmp [rbp+var_20], 0
jnz short loc_32DE2
jmp loc_32F63
loc_32DE2:
cmp [rbp+var_C], 0
jz loc_32E97
mov [rbp+var_28], 0
loc_32DF4:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb short loc_32E2C
mov rax, [rbp+var_20]
mov rcx, [rbp+var_28]
mov rax, [rax+rcx*8]
lea rcx, _glfw
cmp rax, qword ptr ds:loc_20448[rcx]
jnz short loc_32E1C
jmp short loc_32E2C
loc_32E1C:
jmp short $+2
loc_32E1E:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_32DF4
loc_32E2C:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnz short loc_32E92
lea rax, _glfw
mov rdi, qword ptr ds:loc_1FEC0[rax]
mov rax, [rbp+var_8]
mov rsi, [rax+348h]
lea rax, _glfw
mov rdx, qword ptr ds:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_[rax]; std::string::basic_string<std::allocator<char>>(ulong,char,std::allocator<char> const&)
mov ecx, 4
mov r8d, 20h ; ' '
mov r9d, 2
lea rax, _glfw
add rax, 1FEC0h
add rax, 588h
mov [rsp+40h+var_40], rax
mov [rsp+40h+var_38], 1
call _XChangeProperty
loc_32E92:
jmp loc_32F47
loc_32E97:
mov [rbp+var_28], 0
loc_32E9F:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb short loc_32EFD
mov rax, [rbp+var_20]
mov rcx, [rbp+var_28]
mov rax, [rax+rcx*8]
lea rcx, _glfw
cmp rax, qword ptr ds:loc_20448[rcx]
jnz short loc_32EED
mov rax, [rbp+var_20]
mov rcx, [rbp+var_30]
sub rcx, 1
mov rdx, [rax+rcx*8]
mov rax, [rbp+var_20]
mov rcx, [rbp+var_28]
mov [rax+rcx*8], rdx
mov rax, [rbp+var_30]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], rax
loc_32EED:
jmp short $+2
loc_32EEF:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_32E9F
loc_32EFD:
lea rax, _glfw
mov rdi, qword ptr ds:loc_1FEC0[rax]
mov rax, [rbp+var_8]
mov rsi, [rax+348h]
lea rax, _glfw
mov rdx, qword ptr ds:_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_[rax]; std::string::basic_string<std::allocator<char>>(ulong,char,std::allocator<char> const&)
mov rax, [rbp+var_30]
mov ecx, 4
mov r8d, 20h ; ' '
xor r9d, r9d
lea r10, [rbp+var_20]
mov [rsp+40h+var_40], r10
mov [rsp+40h+var_38], eax
call _XChangeProperty
loc_32F47:
mov rdi, [rbp+var_20]
call _XFree
loc_32F50:
lea rax, _glfw
mov rdi, qword ptr ds:loc_1FEC0[rax]
call _XFlush
loc_32F63:
add rsp, 40h
pop rbp
retn
|
_DWORD * glfwPlatformSetWindowFloating(long long a1, int a2)
{
_DWORD *result; // rax
_DWORD *v3; // [rsp+10h] [rbp-30h]
unsigned long long i; // [rsp+18h] [rbp-28h]
unsigned long long j; // [rsp+18h] [rbp-28h]
long long v6; // [rsp+20h] [rbp-20h] BYREF
_BOOL8 v7; // [rsp+28h] [rbp-18h]
int v8; // [rsp+34h] [rbp-Ch]
long long v9; // [rsp+38h] [rbp-8h]
v9 = a1;
v8 = a2;
result = glfw;
if ( *(_QWORD *)((char *)std::string::basic_string<std::allocator<char>> + (_QWORD)glfw) )
{
result = glfw;
if ( *(_QWORD *)((char *)&loc_20448 + (_QWORD)glfw) )
{
if ( glfwPlatformWindowVisible(v9) )
{
v7 = v8 != 0;
sendEventToWM(
v9,
*(_QWORD *)((char *)std::string::basic_string<std::allocator<char>> + (_QWORD)glfw),
v7,
*(_QWORD *)((char *)&loc_20448 + (_QWORD)glfw),
0LL,
1LL,
0LL);
}
else
{
result = (_DWORD *)glfwGetWindowPropertyX11(
*(_QWORD *)(v9 + 840),
*(_QWORD *)((char *)std::string::basic_string<std::allocator<char>> + (_QWORD)glfw),
4LL,
(long long)&v6);
v3 = result;
if ( !v6 )
return result;
if ( v8 )
{
for ( i = 0LL;
i < (unsigned long long)result
&& *(_QWORD *)(v6 + 8 * i) != *(_QWORD *)((char *)&loc_20448 + (_QWORD)glfw);
++i )
{
;
}
if ( (_DWORD *)i == result )
XChangeProperty(
*(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw),
*(_QWORD *)(v9 + 840),
*(_QWORD *)((char *)std::string::basic_string<std::allocator<char>> + (_QWORD)glfw),
4LL,
32LL,
2LL,
&glfw[33042],
1);
}
else
{
for ( j = 0LL; j < (unsigned long long)v3; ++j )
{
if ( *(_QWORD *)(v6 + 8 * j) == *(_QWORD *)((char *)&loc_20448 + (_QWORD)glfw) )
{
*(_QWORD *)(v6 + 8 * j) = *(_QWORD *)(v6 + 8LL * ((_QWORD)v3 - 1));
v3 = (_DWORD *)((char *)v3 - 1);
}
}
XChangeProperty(
*(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw),
*(_QWORD *)(v9 + 840),
*(_QWORD *)((char *)std::string::basic_string<std::allocator<char>> + (_QWORD)glfw),
4LL,
32LL,
0LL,
&v6,
(_DWORD)v3);
}
XFree(v6);
}
return (_DWORD *)XFlush(*(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw));
}
}
return result;
}
|
_glfwPlatformSetWindowFloating:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
LEA RAX,[0x1e0c68]
CMP qword ptr [RAX + 0x20440],0x0
JZ 0x00132d41
LEA RAX,[0x1e0c68]
CMP qword ptr [RAX + 0x20448],0x0
JNZ 0x00132d46
LAB_00132d41:
JMP 0x00132f63
LAB_00132d46:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00131c60
CMP EAX,0x0
JZ 0x00132dab
MOV EDX,dword ptr [RBP + -0xc]
XOR EAX,EAX
MOV ECX,0x1
CMP EDX,0x0
CMOVNZ EAX,ECX
CDQE
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x8]
LEA RAX,[0x1e0c68]
MOV RSI,qword ptr [RAX + 0x20440]
MOV RDX,qword ptr [RBP + -0x18]
LEA RAX,[0x1e0c68]
MOV RCX,qword ptr [RAX + 0x20448]
XOR EAX,EAX
MOV R8D,EAX
MOV R9D,0x1
MOV qword ptr [RSP],0x0
CALL 0x001321e0
JMP 0x00132f50
LAB_00132dab:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x348]
LEA RAX,[0x1e0c68]
MOV RSI,qword ptr [RAX + 0x20440]
MOV EDX,0x4
LEA RCX,[RBP + -0x20]
CALL 0x0012ff50
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x00132de2
JMP 0x00132f63
LAB_00132de2:
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00132e97
MOV qword ptr [RBP + -0x28],0x0
LAB_00132df4:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x00132e2c
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + RCX*0x8]
LEA RCX,[0x1e0c68]
CMP RAX,qword ptr [RCX + 0x20448]
JNZ 0x00132e1c
JMP 0x00132e2c
LAB_00132e1c:
JMP 0x00132e1e
LAB_00132e1e:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00132df4
LAB_00132e2c:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00132e92
LEA RAX,[0x1e0c68]
MOV RDI,qword ptr [RAX + 0x1fec0]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x348]
LEA RAX,[0x1e0c68]
MOV RDX,qword ptr [RAX + 0x20440]
MOV ECX,0x4
MOV R8D,0x20
MOV R9D,0x2
LEA RAX,[0x1e0c68]
ADD RAX,0x1fec0
ADD RAX,0x588
MOV qword ptr [RSP],RAX
MOV dword ptr [RSP + 0x8],0x1
CALL 0x0010c7b0
LAB_00132e92:
JMP 0x00132f47
LAB_00132e97:
MOV qword ptr [RBP + -0x28],0x0
LAB_00132e9f:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x00132efd
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + RCX*0x8]
LEA RCX,[0x1e0c68]
CMP RAX,qword ptr [RCX + 0x20448]
JNZ 0x00132eed
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x30]
SUB RCX,0x1
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_00132eed:
JMP 0x00132eef
LAB_00132eef:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00132e9f
LAB_00132efd:
LEA RAX,[0x1e0c68]
MOV RDI,qword ptr [RAX + 0x1fec0]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x348]
LEA RAX,[0x1e0c68]
MOV RDX,qword ptr [RAX + 0x20440]
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,0x4
MOV R8D,0x20
XOR R9D,R9D
LEA R10,[RBP + -0x20]
MOV qword ptr [RSP],R10
MOV dword ptr [RSP + 0x8],EAX
CALL 0x0010c7b0
LAB_00132f47:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0010cb90
LAB_00132f50:
LEA RAX,[0x1e0c68]
MOV RDI,qword ptr [RAX + 0x1fec0]
CALL 0x0010ce10
LAB_00132f63:
ADD RSP,0x40
POP RBP
RET
|
void _glfwPlatformSetWindowFloating(long param_1,int param_2)
{
int iVar1;
ulong local_38;
ulong local_30;
long local_28;
long local_20;
int local_14;
long local_10;
if ((DAT_002010a8 != 0) && (DAT_002010b0 != 0)) {
local_14 = param_2;
local_10 = param_1;
iVar1 = _glfwPlatformWindowVisible(param_1);
if (iVar1 == 0) {
local_38 = _glfwGetWindowPropertyX11
(*(int8 *)(local_10 + 0x348),DAT_002010a8,4,&local_28);
if (local_28 == 0) {
return;
}
if (local_14 == 0) {
for (local_30 = 0; local_30 < local_38; local_30 = local_30 + 1) {
if (*(long *)(local_28 + local_30 * 8) == DAT_002010b0) {
*(int8 *)(local_28 + local_30 * 8) =
*(int8 *)(local_28 + (local_38 - 1) * 8);
local_38 = local_38 - 1;
}
}
XChangeProperty(DAT_00200b28,*(int8 *)(local_10 + 0x348),DAT_002010a8,4,0x20,0,
&local_28,(int)local_38);
}
else {
for (local_30 = 0;
(local_30 < local_38 && (*(long *)(local_28 + local_30 * 8) != DAT_002010b0));
local_30 = local_30 + 1) {
}
if (local_30 == local_38) {
XChangeProperty(DAT_00200b28,*(int8 *)(local_10 + 0x348),DAT_002010a8,4,0x20,2,
&DAT_002010b0,1);
}
}
XFree(local_28);
}
else {
local_20 = (long)(int)(uint)(local_14 != 0);
sendEventToWM(local_10,DAT_002010a8,local_20,DAT_002010b0,0,1,0);
}
XFlush(DAT_00200b28);
}
return;
}
|
|
14,592
|
hi0bits
|
eloqsql/strings/dtoa.c
|
static int hi0bits(register ULong x)
{
register int k= 0;
if (!(x & 0xffff0000))
{
k= 16;
x<<= 16;
}
if (!(x & 0xff000000))
{
k+= 8;
x<<= 8;
}
if (!(x & 0xf0000000))
{
k+= 4;
x<<= 4;
}
if (!(x & 0xc0000000))
{
k+= 2;
x<<= 2;
}
if (!(x & 0x80000000))
{
k++;
if (!(x & 0x40000000))
return 32;
}
return k;
}
|
O0
|
c
|
hi0bits:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0xffff0000, %eax # imm = 0xFFFF0000
cmpl $0x0, %eax
jne 0x71c2b
movl $0x10, -0xc(%rbp)
movl -0x8(%rbp), %eax
shll $0x10, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0xff000000, %eax # imm = 0xFF000000
cmpl $0x0, %eax
jne 0x71c4a
movl -0xc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0xf0000000, %eax # imm = 0xF0000000
cmpl $0x0, %eax
jne 0x71c69
movl -0xc(%rbp), %eax
addl $0x4, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shll $0x4, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0xc0000000, %eax # imm = 0xC0000000
cmpl $0x0, %eax
jne 0x71c88
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
jne 0x71cb6
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
andl $0x40000000, %eax # imm = 0x40000000
cmpl $0x0, %eax
jne 0x71cb4
movl $0x20, -0x4(%rbp)
jmp 0x71cbc
jmp 0x71cb6
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
hi0bits:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
mov [rbp+var_C], 0
mov eax, [rbp+var_8]
and eax, 0FFFF0000h
cmp eax, 0
jnz short loc_71C2B
mov [rbp+var_C], 10h
mov eax, [rbp+var_8]
shl eax, 10h
mov [rbp+var_8], eax
loc_71C2B:
mov eax, [rbp+var_8]
and eax, 0FF000000h
cmp eax, 0
jnz short loc_71C4A
mov eax, [rbp+var_C]
add eax, 8
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
shl eax, 8
mov [rbp+var_8], eax
loc_71C4A:
mov eax, [rbp+var_8]
and eax, 0F0000000h
cmp eax, 0
jnz short loc_71C69
mov eax, [rbp+var_C]
add eax, 4
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
shl eax, 4
mov [rbp+var_8], eax
loc_71C69:
mov eax, [rbp+var_8]
and eax, 0C0000000h
cmp eax, 0
jnz short loc_71C88
mov eax, [rbp+var_C]
add eax, 2
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
shl eax, 2
mov [rbp+var_8], eax
loc_71C88:
mov eax, [rbp+var_8]
and eax, 80000000h
cmp eax, 0
jnz short loc_71CB6
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
mov eax, [rbp+var_8]
and eax, 40000000h
cmp eax, 0
jnz short loc_71CB4
mov [rbp+var_4], 20h ; ' '
jmp short loc_71CBC
loc_71CB4:
jmp short $+2
loc_71CB6:
mov eax, [rbp+var_C]
mov [rbp+var_4], eax
loc_71CBC:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long hi0bits(int a1)
{
unsigned int v2; // [rsp+0h] [rbp-Ch]
int v3; // [rsp+4h] [rbp-8h]
v3 = a1;
v2 = 0;
if ( (a1 & 0xFFFF0000) == 0 )
{
v2 = 16;
v3 = a1 << 16;
}
if ( (v3 & 0xFF000000) == 0 )
{
v2 += 8;
v3 <<= 8;
}
if ( (v3 & 0xF0000000) == 0 )
{
v2 += 4;
v3 *= 16;
}
if ( (v3 & 0xC0000000) == 0 )
{
v2 += 2;
v3 *= 4;
}
if ( v3 < 0 )
return v2;
++v2;
if ( (v3 & 0x40000000) != 0 )
return v2;
else
return 32;
}
|
hi0bits:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
MOV dword ptr [RBP + -0xc],0x0
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0xffff0000
CMP EAX,0x0
JNZ 0x00171c2b
MOV dword ptr [RBP + -0xc],0x10
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x10
MOV dword ptr [RBP + -0x8],EAX
LAB_00171c2b:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0xff000000
CMP EAX,0x0
JNZ 0x00171c4a
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x8
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x8
MOV dword ptr [RBP + -0x8],EAX
LAB_00171c4a:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0xf0000000
CMP EAX,0x0
JNZ 0x00171c69
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x4
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x4
MOV dword ptr [RBP + -0x8],EAX
LAB_00171c69:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0xc0000000
CMP EAX,0x0
JNZ 0x00171c88
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x2
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x2
MOV dword ptr [RBP + -0x8],EAX
LAB_00171c88:
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0x80000000
CMP EAX,0x0
JNZ 0x00171cb6
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0x40000000
CMP EAX,0x0
JNZ 0x00171cb4
MOV dword ptr [RBP + -0x4],0x20
JMP 0x00171cbc
LAB_00171cb4:
JMP 0x00171cb6
LAB_00171cb6:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x4],EAX
LAB_00171cbc:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int hi0bits(uint param_1)
{
int local_14;
uint local_10;
int local_c;
local_14 = 0;
local_10 = param_1;
if ((param_1 & 0xffff0000) == 0) {
local_14 = 0x10;
local_10 = param_1 << 0x10;
}
if ((local_10 & 0xff000000) == 0) {
local_14 = local_14 + 8;
local_10 = local_10 << 8;
}
if ((local_10 & 0xf0000000) == 0) {
local_14 = local_14 + 4;
local_10 = local_10 << 4;
}
if ((local_10 & 0xc0000000) == 0) {
local_14 = local_14 + 2;
local_10 = local_10 << 2;
}
if (((local_10 & 0x80000000) == 0) && (local_14 = local_14 + 1, (local_10 & 0x40000000) == 0)) {
local_c = 0x20;
}
else {
local_c = local_14;
}
return local_c;
}
|
|
14,593
|
std::hash<minja::Value>::operator()(minja::Value const&) const
|
monkey531[P]llama/common/minja.hpp
|
size_t operator()(const minja::Value & v) const {
if (!v.is_hashable())
throw std::runtime_error("Unsupported type for hashing: " + v.dump());
return std::hash<json>()(v.get<json>());
}
|
O3
|
cpp
|
std::hash<minja::Value>::operator()(minja::Value const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
cmpq $0x0, 0x10(%rsi)
jne 0x7815a
cmpq $0x0, 0x20(%r14)
jne 0x7815a
cmpq $0x0, 0x30(%r14)
jne 0x7815a
movq %rsp, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x78242
movq %rbx, %rdi
callq 0x7875f
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x40bf2
movq %r14, %rdi
callq 0x4d7e0
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x18380
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x40f28
leaq 0x37b22(%rip), %rsi # 0xafca4
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x282b5
movb $0x1, %bpl
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x18b00
xorl %ebp, %ebp
movq 0x68e4a(%rip), %rsi # 0xe0ff0
movq 0x68dc3(%rip), %rdx # 0xe0f70
movq %rbx, %rdi
callq 0x18bb0
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x781d3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186e0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x781ee
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186e0
testb %bpl, %bpl
jne 0x78218
jmp 0x7823a
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x78218
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186e0
jmp 0x78218
movq %rax, %r14
movq %rbx, %rdi
callq 0x18520
jmp 0x7823a
movq %rax, %r14
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x40bf2
movq %rbx, %rdi
callq 0x4d7e0
movq %r14, %rdi
callq 0x18c10
|
_ZNKSt4hashIN5minja5ValueEEclERKS1_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rsi
cmp qword ptr [rsi+10h], 0
jnz short loc_7815A
cmp qword ptr [r14+20h], 0
jnz short loc_7815A
cmp qword ptr [r14+30h], 0
jnz short loc_7815A
mov rbx, rsp
mov rdi, rbx
mov rsi, r14
call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<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>>(void)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rbx, rax
mov r14, rsp
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_7815A:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+58h+var_38]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnsupportedTyp; "Unsupported type for hashing: "
mov rdi, rsp
lea rdx, [rsp+58h+var_38]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
mov rsi, rsp
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_781D3
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_781D3:
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_781EE
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_781EE:
test bpl, bpl
jnz short loc_78218
jmp short loc_7823A
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_78218
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_78218
mov r14, rax
loc_78218:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_7823A
mov r14, rax
mov rbx, rsp
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_7823A:
mov rdi, r14
call __Unwind_Resume
|
long long std::hash<minja::Value>::operator()(long long a1, _QWORD *a2)
{
long long result; // rax
void *exception; // rbx
void **v4[2]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v5[16]; // [rsp+20h] [rbp-38h] BYREF
if ( a2[2] || a2[4] || a2[6] )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v5, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v4, (long long)"Unsupported type for hashing: ", (long long)v5);
std::runtime_error::runtime_error(exception, v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Value::get<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>>(
v4,
a2);
result = nlohmann::json_abi_v3_11_3::detail::hash<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>>(v4);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v4);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v4);
return result;
}
|
operator():
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
CMP qword ptr [RSI + 0x10],0x0
JNZ 0x0017815a
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x0017815a
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x0017815a
MOV RBX,RSP
MOV RDI,RBX
MOV RSI,R14
CALL 0x00178242
LAB_0017812e:
MOV RDI,RBX
CALL 0x0017875f
LAB_00178136:
MOV RBX,RAX
MOV R14,RSP
MOV RDI,R14
XOR ESI,ESI
CALL 0x00140bf2
MOV RDI,R14
CALL 0x0014d7e0
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_0017815a:
MOV EDI,0x10
CALL 0x00118380
MOV RBX,RAX
LAB_00178167:
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00140f28
LAB_0017817b:
LEA RSI,[0x1afca4]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001282b5
MOV BPL,0x1
LAB_00178192:
MOV RSI,RSP
MOV RDI,RBX
CALL 0x00118b00
XOR EBP,EBP
MOV RSI,qword ptr [0x001e0ff0]
MOV RDX,qword ptr [0x001e0f70]
MOV RDI,RBX
CALL 0x00118bb0
|
/* std::hash<minja::Value>::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
ulong __thiscall std::hash<minja::Value>::operator()(hash<minja::Value> *this,Value *param_1)
{
ulong uVar1;
runtime_error *this_00;
basic_json abStack_58 [32];
int1 local_38 [32];
if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) &&
(*(long *)(param_1 + 0x30) == 0)) {
minja::Value::
get<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>>
();
/* try { // try from 0017812e to 00178135 has its CatchHandler @ 00178222 */
uVar1 = nlohmann::json_abi_v3_11_3::detail::
hash<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>>
(abStack_58);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(abStack_58,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)abStack_58);
return uVar1;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00178167 to 0017817a has its CatchHandler @ 00178215 */
minja::Value::dump_abi_cxx11_((int)local_38,SUB81(param_1,0));
/* try { // try from 0017817b to 0017818e has its CatchHandler @ 001781f5 */
operator+((char *)abStack_58,(string *)"Unsupported type for hashing: ");
/* try { // try from 00178192 to 001781b4 has its CatchHandler @ 001781b5 */
std::runtime_error::runtime_error(this_00,(string *)abStack_58);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001e0ff0,PTR__runtime_error_001e0f70);
}
|
|
14,594
|
my_thread_destory_thr_mutex
|
eloqsql/mysys/my_thr_init.c
|
static void my_thread_destory_thr_mutex(struct st_my_thread_var *var)
{
mysql_mutex_destroy(&var->mutex);
mysql_cond_destroy(&var->suspend);
}
|
O3
|
c
|
my_thread_destory_thr_mutex:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x40(%rdi), %r14
movq 0x80(%rdi), %rdi
testq %rdi, %rdi
je 0x2ec77
leaq 0x2cb1f2(%rip), %rax # 0x2f9e58
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x80(%rbx)
movq %r14, %rdi
callq 0x243d0
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
jne 0x2ec98
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x24670
leaq 0x2cb1b9(%rip), %rax # 0x2f9e58
movq (%rax), %rax
callq *0x68(%rax)
movq $0x0, 0x38(%rbx)
jmp 0x2ec88
|
my_thread_destory_thr_mutex:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
lea r14, [rdi+40h]
mov rdi, [rdi+80h]
test rdi, rdi
jz short loc_2EC77
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+80h], 0
loc_2EC77:
mov rdi, r14
call _pthread_mutex_destroy
mov rdi, [rbx+38h]
test rdi, rdi
jnz short loc_2EC98
loc_2EC88:
add rbx, 8
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp _pthread_cond_destroy
loc_2EC98:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+68h]
mov qword ptr [rbx+38h], 0
jmp short loc_2EC88
|
long long my_thread_destory_thr_mutex(long long a1)
{
if ( *(_QWORD *)(a1 + 128) )
{
(*((void (**)(void))PSI_server + 9))();
*(_QWORD *)(a1 + 128) = 0LL;
}
pthread_mutex_destroy(a1 + 64);
if ( *(_QWORD *)(a1 + 56) )
{
(*((void (**)(void))PSI_server + 13))();
*(_QWORD *)(a1 + 56) = 0LL;
}
return pthread_cond_destroy(a1 + 8);
}
|
my_thread_destory_thr_mutex:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R14,[RDI + 0x40]
MOV RDI,qword ptr [RDI + 0x80]
TEST RDI,RDI
JZ 0x0012ec77
LEA RAX,[0x3f9e58]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x80],0x0
LAB_0012ec77:
MOV RDI,R14
CALL 0x001243d0
MOV RDI,qword ptr [RBX + 0x38]
TEST RDI,RDI
JNZ 0x0012ec98
LAB_0012ec88:
ADD RBX,0x8
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x00124670
LAB_0012ec98:
LEA RAX,[0x3f9e58]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x68]
MOV qword ptr [RBX + 0x38],0x0
JMP 0x0012ec88
|
void my_thread_destory_thr_mutex(long param_1)
{
if (*(long *)(param_1 + 0x80) != 0) {
(**(code **)(PSI_server + 0x48))();
*(int8 *)(param_1 + 0x80) = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x40));
if (*(long *)(param_1 + 0x38) != 0) {
(**(code **)(PSI_server + 0x68))();
*(int8 *)(param_1 + 0x38) = 0;
}
pthread_cond_destroy((pthread_cond_t *)(param_1 + 8));
return;
}
|
|
14,595
|
my_strnncoll_tis620
|
eloqsql/strings/ctype-tis620.c
|
static
int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s1, size_t len1,
const uchar *s2, size_t len2,
my_bool s2_is_prefix)
{
uchar buf[80] ;
uchar *tc1, *tc2;
int i;
if (s2_is_prefix && len1 > len2)
len1= len2;
tc1= buf;
if ((len1 + len2 +2) > (int) sizeof(buf))
tc1= (uchar*) my_malloc(PSI_INSTRUMENT_ME, len1+len2+2, MYF(MY_FAE));
tc2= tc1 + len1+1;
memcpy((char*) tc1, (char*) s1, len1);
tc1[len1]= 0; /* if length(s1)> len1, need to put 'end of string' */
memcpy((char *)tc2, (char *)s2, len2);
tc2[len2]= 0; /* put end of string */
thai2sortable(tc1, len1);
thai2sortable(tc2, len2);
i= strcmp((char*)tc1, (char*)tc2);
if (tc1 != buf)
my_free(tc1);
return i;
}
|
O0
|
c
|
my_strnncoll_tis620:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb %r9b, %al
movq %fs:0x28, %r9
movq %r9, -0x8(%rbp)
movq %rdi, -0x68(%rbp)
movq %rsi, -0x70(%rbp)
movq %rdx, -0x78(%rbp)
movq %rcx, -0x80(%rbp)
movq %r8, -0x88(%rbp)
movb %al, -0x89(%rbp)
movsbl -0x89(%rbp), %eax
cmpl $0x0, %eax
je 0x5c93c
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jbe 0x5c93c
movq -0x88(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x78(%rbp), %rax
addq -0x88(%rbp), %rax
addq $0x2, %rax
cmpq $0x50, %rax
jbe 0x5c97e
movq -0x78(%rbp), %rsi
addq -0x88(%rbp), %rsi
addq $0x2, %rsi
xorl %edi, %edi
movl $0x8, %edx
callq 0x30b00
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
addq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0x252a0
movq -0x98(%rbp), %rax
movq -0x78(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0xa0(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x252a0
movq -0xa0(%rbp), %rax
movq -0x88(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x98(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x5ce60
movq -0xa0(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x5ce60
movq -0x98(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0x25530
movl %eax, -0xa4(%rbp)
movq -0x98(%rbp), %rax
leaq -0x60(%rbp), %rcx
cmpq %rcx, %rax
je 0x5ca38
movq -0x98(%rbp), %rdi
callq 0x30e80
movl -0xa4(%rbp), %eax
movl %eax, -0xa8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5ca65
movl -0xa8(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
callq 0x25410
nopw (%rax,%rax)
|
my_strnncoll_tis620:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov al, r9b
mov r9, fs:28h
mov [rbp+var_8], r9
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov [rbp+var_78], rdx
mov [rbp+var_80], rcx
mov [rbp+var_88], r8
mov [rbp+var_89], al
movsx eax, [rbp+var_89]
cmp eax, 0
jz short loc_5C93C
mov rax, [rbp+var_78]
cmp rax, [rbp+var_88]
jbe short loc_5C93C
mov rax, [rbp+var_88]
mov [rbp+var_78], rax
loc_5C93C:
lea rax, [rbp+var_60]
mov [rbp+var_98], rax
mov rax, [rbp+var_78]
add rax, [rbp+var_88]
add rax, 2
cmp rax, 50h ; 'P'
jbe short loc_5C97E
mov rsi, [rbp+var_78]
add rsi, [rbp+var_88]
add rsi, 2
xor edi, edi
mov edx, 8
call my_malloc
mov [rbp+var_98], rax
loc_5C97E:
mov rax, [rbp+var_98]
add rax, [rbp+var_78]
add rax, 1
mov [rbp+var_A0], rax
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_70]
mov rdx, [rbp+var_78]
call _memcpy
mov rax, [rbp+var_98]
mov rcx, [rbp+var_78]
mov byte ptr [rax+rcx], 0
mov rdi, [rbp+var_A0]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_88]
call _memcpy
mov rax, [rbp+var_A0]
mov rcx, [rbp+var_88]
mov byte ptr [rax+rcx], 0
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_78]
call thai2sortable
mov rdi, [rbp+var_A0]
mov rsi, [rbp+var_88]
call thai2sortable
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_A0]
call _strcmp
mov [rbp+var_A4], eax
mov rax, [rbp+var_98]
lea rcx, [rbp+var_60]
cmp rax, rcx
jz short loc_5CA38
mov rdi, [rbp+var_98]
call my_free
loc_5CA38:
mov eax, [rbp+var_A4]
mov [rbp+var_A8], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5CA65
mov eax, [rbp+var_A8]
add rsp, 0B0h
pop rbp
retn
loc_5CA65:
call ___stack_chk_fail
|
long long my_strnncoll_tis620(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
unsigned int v7; // [rsp+Ch] [rbp-A4h]
long long v8; // [rsp+10h] [rbp-A0h]
_BYTE *v9; // [rsp+18h] [rbp-98h]
unsigned long long v12; // [rsp+38h] [rbp-78h]
_BYTE v13[88]; // [rsp+50h] [rbp-60h] BYREF
unsigned long long v14; // [rsp+A8h] [rbp-8h]
v14 = __readfsqword(0x28u);
v12 = a3;
if ( a6 && a3 > a5 )
v12 = a5;
v9 = v13;
if ( a5 + v12 + 2 > 0x50 )
v9 = (_BYTE *)my_malloc(0, a5 + v12 + 2, 8);
v8 = (long long)&v9[v12 + 1];
memcpy(v9, a2, v12);
v9[v12] = 0;
memcpy(v8, a4, a5);
*(_BYTE *)(v8 + a5) = 0;
thai2sortable(v9, v12);
thai2sortable(v8, a5);
v7 = strcmp(v9, v8);
if ( v9 != v13 )
my_free((long long)v9);
return v7;
}
|
my_strnncoll_tis620:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV AL,R9B
MOV R9,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],R9
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV qword ptr [RBP + -0x78],RDX
MOV qword ptr [RBP + -0x80],RCX
MOV qword ptr [RBP + -0x88],R8
MOV byte ptr [RBP + -0x89],AL
MOVSX EAX,byte ptr [RBP + -0x89]
CMP EAX,0x0
JZ 0x0015c93c
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,qword ptr [RBP + -0x88]
JBE 0x0015c93c
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x78],RAX
LAB_0015c93c:
LEA RAX,[RBP + -0x60]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,qword ptr [RBP + -0x88]
ADD RAX,0x2
CMP RAX,0x50
JBE 0x0015c97e
MOV RSI,qword ptr [RBP + -0x78]
ADD RSI,qword ptr [RBP + -0x88]
ADD RSI,0x2
XOR EDI,EDI
MOV EDX,0x8
CALL 0x00130b00
MOV qword ptr [RBP + -0x98],RAX
LAB_0015c97e:
MOV RAX,qword ptr [RBP + -0x98]
ADD RAX,qword ptr [RBP + -0x78]
ADD RAX,0x1
MOV qword ptr [RBP + -0xa0],RAX
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RBP + -0x78]
CALL 0x001252a0
MOV RAX,qword ptr [RBP + -0x98]
MOV RCX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x88]
CALL 0x001252a0
MOV RAX,qword ptr [RBP + -0xa0]
MOV RCX,qword ptr [RBP + -0x88]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x78]
CALL 0x0015ce60
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x88]
CALL 0x0015ce60
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0xa0]
CALL 0x00125530
MOV dword ptr [RBP + -0xa4],EAX
MOV RAX,qword ptr [RBP + -0x98]
LEA RCX,[RBP + -0x60]
CMP RAX,RCX
JZ 0x0015ca38
MOV RDI,qword ptr [RBP + -0x98]
CALL 0x00130e80
LAB_0015ca38:
MOV EAX,dword ptr [RBP + -0xa4]
MOV dword ptr [RBP + -0xa8],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015ca65
MOV EAX,dword ptr [RBP + -0xa8]
ADD RSP,0xb0
POP RBP
RET
LAB_0015ca65:
CALL 0x00125410
|
int my_strnncoll_tis620(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
char param_6)
{
int iVar1;
char *__s2;
long in_FS_OFFSET;
char *local_a0;
size_t local_80;
char local_68 [88];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_80 = param_3;
if ((param_6 != '\0') && (param_5 < param_3)) {
local_80 = param_5;
}
local_a0 = local_68;
if (0x50 < local_80 + param_5 + 2) {
local_a0 = (char *)my_malloc(0,local_80 + param_5 + 2,8);
}
__s2 = local_a0 + local_80 + 1;
memcpy(local_a0,param_2,local_80);
local_a0[local_80] = '\0';
memcpy(__s2,param_4,param_5);
__s2[param_5] = '\0';
thai2sortable(local_a0,local_80);
thai2sortable(__s2,param_5);
iVar1 = strcmp(local_a0,__s2);
if (local_a0 != local_68) {
my_free(local_a0);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return iVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
14,596
|
sessions::create(_ENetPeer*, char const*)
|
untodesu[P]voxelius/game/server/sessions.cc
|
Session *sessions::create(ENetPeer *peer, const char *client_username)
{
for(unsigned int i = 0U; i < sessions::max_players.get_value(); ++i) {
if(!sessions_vector[i].peer) {
std::uint64_t client_identity = crc64::get(client_username);
sessions_vector[i].client_index = i;
sessions_vector[i].client_identity = client_identity;
sessions_vector[i].client_username = client_username;
sessions_vector[i].player_entity = entt::null;
sessions_vector[i].peer = peer;
username_map[client_username] = &sessions_vector[i];
identity_map[client_identity] = &sessions_vector[i];
peer->data = &sessions_vector[i];
sessions::num_players += 1U;
return &sessions_vector[i];
}
}
return nullptr;
}
|
O2
|
cpp
|
sessions::create(_ENetPeer*, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0xe6bf0(%rip), %eax # 0x10db78
movq 0xe6c99(%rip), %rcx # 0x10dc28
imulq $0x48, %rax, %rdx
xorl %eax, %eax
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpq %r13, %rdx
je 0x2707b
cmpq $0x0, 0x40(%rcx,%r13)
je 0x26fb3
incl %ebp
addq $0x48, %r13
jmp 0x26f9a
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x190fa
movq %r15, %rdi
xorl %esi, %esi
callq 0x4f387
movq %rax, %r12
leaq 0x10(%rsp), %rdi
callq 0x17ec8
leaq 0x30(%rsp), %r15
movq %r12, (%r15)
movq 0xe6c3a(%rip), %rax # 0x10dc28
leaq (%rax,%r13), %rdi
addq $0x10, %rdi
movw %bp, -0x10(%rdi)
movq %r12, -0x8(%rdi)
movq %r14, %rsi
callq 0x17df0
movq 0xe6c1b(%rip), %rax # 0x10dc28
leaq (%rax,%r13), %rbp
orl $-0x1, 0x30(%rax,%r13)
movq %rbx, 0x40(%rax,%r13)
leaq 0x10(%rsp), %r12
leaq 0xf(%rsp), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x190fa
leaq 0xe6b78(%rip), %rdi # 0x10dbb0
movq %r12, %rsi
callq 0x28088
movq %rbp, (%rax)
movq %r12, %rdi
callq 0x17ec8
movq 0xe6bd6(%rip), %r14 # 0x10dc28
addq %r13, %r14
leaq 0xe6b84(%rip), %rdi # 0x10dbe0
movq %r15, %rsi
callq 0x28140
movq %r14, (%rax)
addq 0xe6bba(%rip), %r13 # 0x10dc28
movq %r13, 0x30(%rbx)
incl 0xe6b30(%rip) # 0x10dba8
movq %r13, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x17ec8
movq %rbx, %rdi
callq 0x17cd0
|
_ZN8sessions6createEP9_ENetPeerPKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
mov eax, cs:dword_10DB78
mov rcx, qword ptr cs:_ZL15sessions_vector; sessions_vector
imul rdx, rax, 48h ; 'H'
xor eax, eax
xor r13d, r13d
xor ebp, ebp
loc_26F9A:
cmp rdx, r13
jz loc_2707B
cmp qword ptr [rcx+r13+40h], 0
jz short loc_26FB3
inc ebp
add r13, 48h ; 'H'
jmp short loc_26F9A
loc_26FB3:
lea r15, [rsp+68h+var_58]
lea rdx, [rsp+68h+var_59]
mov rdi, r15
mov rsi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, r15
xor esi, esi
call _ZN5crc643getERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; crc64::get(std::string const&,ulong)
mov r12, rax
lea rdi, [rsp+68h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea r15, [rsp+68h+var_38]
mov [r15], r12
mov rax, qword ptr cs:_ZL15sessions_vector; sessions_vector
lea rdi, [rax+r13]
add rdi, 10h
mov [rdi-10h], bp
mov [rdi-8], r12
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
mov rax, qword ptr cs:_ZL15sessions_vector; sessions_vector
lea rbp, [rax+r13]
or dword ptr [rax+r13+30h], 0FFFFFFFFh
mov [rax+r13+40h], rbx
lea r12, [rsp+68h+var_58]
lea rdx, [rsp+68h+var_59]
mov rdi, r12
mov rsi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, _ZL12username_mapB5cxx11; username_map
mov rsi, r12
call _ZN7emhash87HashMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7SessionSt4hashIS6_ESt8equal_toIS6_EEixEOS6_; emhash8::HashMap<std::string,Session *,std::hash<std::string>,std::equal_to<std::string>>::operator[](std::string&&)
mov [rax], rbp
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov r14, qword ptr cs:_ZL15sessions_vector; sessions_vector
add r14, r13
lea rdi, _ZL12identity_map; identity_map
mov rsi, r15
call _ZN7emhash87HashMapImP7SessionSt4hashImESt8equal_toImEEixERKm; emhash8::HashMap<ulong,Session *,std::hash<ulong>,std::equal_to<ulong>>::operator[](ulong const&)
mov [rax], r14
add r13, qword ptr cs:_ZL15sessions_vector; sessions_vector
mov [rbx+30h], r13
inc cs:_ZN8sessions11num_playersE; sessions::num_players
mov rax, r13
loc_2707B:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
long long sessions::create(long long a1, long long a2)
{
long long result; // rax
long long v4; // r13
__int16 v5; // bp
long long v6; // r12
long long v7; // rdi
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
long long v12; // rbp
long long v13; // r14
long long v14; // r13
_QWORD v15[4]; // [rsp+10h] [rbp-58h] BYREF
long long v16[7]; // [rsp+30h] [rbp-38h] BYREF
result = 0LL;
v4 = 0LL;
v5 = 0;
while ( 72LL * (unsigned int)dword_10DB78 != v4 )
{
if ( !*(_QWORD *)(sessions_vector + v4 + 64) )
{
std::string::basic_string<std::allocator<char>>(v15, a2);
v6 = crc64::get(v15, 0LL);
std::string::~string(v15);
v16[0] = v6;
v7 = sessions_vector + v4 + 16;
*(_WORD *)(v7 - 16) = v5;
*(_QWORD *)(v7 - 8) = v6;
std::string::assign(v7, a2, v8, v9, v10, v11);
v12 = sessions_vector + v4;
*(_DWORD *)(v12 + 48) = -1;
*(_QWORD *)(v12 + 64) = a1;
std::string::basic_string<std::allocator<char>>(v15, a2);
*(_QWORD *)emhash8::HashMap<std::string,Session *,std::hash<std::string>,std::equal_to<std::string>>::operator[](
&username_map[abi:cxx11],
v15) = v12;
std::string::~string(v15);
v13 = v4 + sessions_vector;
*(_QWORD *)emhash8::HashMap<unsigned long,Session *,std::hash<unsigned long>,std::equal_to<unsigned long>>::operator[](
&identity_map,
v16) = v13;
v14 = sessions_vector + v4;
*(_QWORD *)(a1 + 48) = v14;
++sessions::num_players;
return v14;
}
++v5;
v4 += 72LL;
}
return result;
}
|
create:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
MOV EAX,dword ptr [0x0020db78]
MOV RCX,qword ptr [0x0020dc28]
IMUL RDX,RAX,0x48
XOR EAX,EAX
XOR R13D,R13D
XOR EBP,EBP
LAB_00126f9a:
CMP RDX,R13
JZ 0x0012707b
CMP qword ptr [RCX + R13*0x1 + 0x40],0x0
JZ 0x00126fb3
INC EBP
ADD R13,0x48
JMP 0x00126f9a
LAB_00126fb3:
LEA R15,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RDI,R15
MOV RSI,R14
CALL 0x001190fa
LAB_00126fc8:
MOV RDI,R15
XOR ESI,ESI
CALL 0x0014f387
LAB_00126fd2:
MOV R12,RAX
LEA RDI,[RSP + 0x10]
CALL 0x00117ec8
LEA R15,[RSP + 0x30]
MOV qword ptr [R15],R12
MOV RAX,qword ptr [0x0020dc28]
LEA RDI,[RAX + R13*0x1]
ADD RDI,0x10
MOV word ptr [RDI + -0x10],BP
MOV qword ptr [RDI + -0x8],R12
MOV RSI,R14
CALL 0x00117df0
MOV RAX,qword ptr [0x0020dc28]
LEA RBP,[RAX + R13*0x1]
OR dword ptr [RAX + R13*0x1 + 0x30],0xffffffff
MOV qword ptr [RAX + R13*0x1 + 0x40],RBX
LEA R12,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RDI,R12
MOV RSI,R14
CALL 0x001190fa
LEA RDI,[0x20dbb0]
MOV RSI,R12
CALL 0x00128088
MOV qword ptr [RAX],RBP
MOV RDI,R12
CALL 0x00117ec8
MOV R14,qword ptr [0x0020dc28]
ADD R14,R13
LEA RDI,[0x20dbe0]
MOV RSI,R15
CALL 0x00128140
MOV qword ptr [RAX],R14
ADD R13,qword ptr [0x0020dc28]
MOV qword ptr [RBX + 0x30],R13
INC dword ptr [0x0020dba8]
MOV RAX,R13
LAB_0012707b:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* sessions::create(_ENetPeer*, char const*) */
long sessions::create(_ENetPeer *param_1,char *param_2)
{
short *psVar1;
long lVar2;
ulong uVar3;
long *plVar4;
short sVar5;
long lVar6;
long lVar7;
allocator local_59;
string local_58 [32];
ulong local_38;
lVar6 = 0;
sVar5 = 0;
while( true ) {
if ((ulong)(uint)max_players._8_4_ * 0x48 - lVar6 == 0) {
return 0;
}
if (*(long *)(sessions_vector + 0x40 + lVar6) == 0) break;
sVar5 = sVar5 + 1;
lVar6 = lVar6 + 0x48;
}
std::__cxx11::string::string<std::allocator<char>>(local_58,param_2,&local_59);
/* try { // try from 00126fc8 to 00126fd1 has its CatchHandler @ 0012708a */
uVar3 = crc64::get(local_58,0);
std::__cxx11::string::~string(local_58);
psVar1 = (short *)(sessions_vector + lVar6);
*psVar1 = sVar5;
*(ulong *)(psVar1 + 4) = uVar3;
local_38 = uVar3;
std::__cxx11::string::assign((char *)(psVar1 + 8));
lVar2 = sessions_vector;
lVar7 = sessions_vector + lVar6;
*(int4 *)(sessions_vector + 0x30 + lVar6) = 0xffffffff;
*(_ENetPeer **)(lVar2 + 0x40 + lVar6) = param_1;
std::__cxx11::string::string<std::allocator<char>>(local_58,param_2,&local_59);
plVar4 = (long *)emhash8::
HashMap<std::__cxx11::string,Session*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
::operator[]((HashMap<std::__cxx11::string,Session*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
*)username_map_abi_cxx11_,local_58);
*plVar4 = lVar7;
std::__cxx11::string::~string(local_58);
lVar7 = sessions_vector + lVar6;
plVar4 = (long *)emhash8::
HashMap<unsigned_long,Session*,std::hash<unsigned_long>,std::equal_to<unsigned_long>>
::operator[]((HashMap<unsigned_long,Session*,std::hash<unsigned_long>,std::equal_to<unsigned_long>>
*)identity_map,&local_38);
*plVar4 = lVar7;
lVar6 = lVar6 + sessions_vector;
*(long *)(param_1 + 0x30) = lVar6;
_num_players = _num_players + 1;
return lVar6;
}
|
|
14,597
|
sessions::create(_ENetPeer*, char const*)
|
untodesu[P]voxelius/game/server/sessions.cc
|
Session *sessions::create(ENetPeer *peer, const char *client_username)
{
for(unsigned int i = 0U; i < sessions::max_players.get_value(); ++i) {
if(!sessions_vector[i].peer) {
std::uint64_t client_identity = crc64::get(client_username);
sessions_vector[i].client_index = i;
sessions_vector[i].client_identity = client_identity;
sessions_vector[i].client_username = client_username;
sessions_vector[i].player_entity = entt::null;
sessions_vector[i].peer = peer;
username_map[client_username] = &sessions_vector[i];
identity_map[client_identity] = &sessions_vector[i];
peer->data = &sessions_vector[i];
sessions::num_players += 1U;
return &sessions_vector[i];
}
}
return nullptr;
}
|
O3
|
cpp
|
sessions::create(_ENetPeer*, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl 0xdf442(%rip), %ecx # 0x108b38
testq %rcx, %rcx
je 0x29728
movq %rsi, %r15
movq %rdi, %rbx
movq 0xdf4e0(%rip), %rax # 0x108be8
shlq $0x3, %rcx
leaq (%rcx,%rcx,8), %rcx
xorl %r14d, %r14d
xorl %ebp, %ebp
cmpq $0x0, 0x40(%rax,%r14)
je 0x29730
incl %ebp
addq $0x48, %r14
cmpq %r14, %rcx
jne 0x29715
xorl %r14d, %r14d
jmp 0x29833
leaq 0x10(%rsp), %r12
leaq 0xf(%rsp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1b480
movq %r12, %rdi
xorl %esi, %esi
callq 0x51f05
movq %rax, %r12
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2976d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x166c0
movq %r12, 0x30(%rsp)
movq 0xdf46f(%rip), %rax # 0x108be8
leaq (%rax,%r14), %r13
addq $0x10, %r13
movw %bp, -0x10(%r13)
movq %r12, -0x8(%r13)
movq 0x8(%r13), %r12
movq %r15, %rdi
callq 0x16280
movq %r13, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x16ab0
movq 0xdf438(%rip), %rax # 0x108be8
leaq (%rax,%r14), %r13
movl $0xffffffff, 0x30(%rax,%r14) # imm = 0xFFFFFFFF
movq %rbx, 0x40(%rax,%r14)
leaq 0x10(%rsp), %r12
leaq 0xf(%rsp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1b480
leaq 0xdf392(%rip), %rdi # 0x108b70
movq %r12, %rsi
callq 0x2a9f8
movq %r13, (%rax)
movq (%r12), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x29804
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x166c0
movq 0xdf3dd(%rip), %r15 # 0x108be8
addq %r14, %r15
leaq 0xdf38b(%rip), %rdi # 0x108ba0
leaq 0x30(%rsp), %rsi
callq 0x2aaee
movq %r15, (%rax)
addq 0xdf3bf(%rip), %r14 # 0x108be8
movq %r14, 0x30(%rbx)
incl 0xdf335(%rip) # 0x108b68
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29863
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x166c0
movq %rbx, %rdi
callq 0x16c90
|
_ZN8sessions6createEP9_ENetPeerPKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov ecx, dword ptr cs:qword_108B38
test rcx, rcx
jz short loc_29728
mov r15, rsi
mov rbx, rdi
mov rax, qword ptr cs:_ZL15sessions_vector; sessions_vector
shl rcx, 3
lea rcx, [rcx+rcx*8]
xor r14d, r14d
xor ebp, ebp
loc_29715:
cmp qword ptr [rax+r14+40h], 0
jz short loc_29730
inc ebp
add r14, 48h ; 'H'
cmp rcx, r14
jnz short loc_29715
loc_29728:
xor r14d, r14d
jmp loc_29833
loc_29730:
lea r12, [rsp+68h+var_58]
lea rdx, [rsp+68h+var_59]
mov rdi, r12
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, r12
xor esi, esi
call _ZN5crc643getERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; crc64::get(std::string const&,ulong)
mov r12, rax
lea rax, [rsp+68h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_2976D
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2976D:
mov [rsp+68h+var_38], r12
mov rax, qword ptr cs:_ZL15sessions_vector; sessions_vector
lea r13, [rax+r14]
add r13, 10h
mov [r13-10h], bp
mov [r13-8], r12
mov r12, [r13+8]
mov rdi, r15
call _strlen
mov rdi, r13
xor esi, esi
mov rdx, r12
mov rcx, r15
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov rax, qword ptr cs:_ZL15sessions_vector; sessions_vector
lea r13, [rax+r14]
mov dword ptr [rax+r14+30h], 0FFFFFFFFh
mov [rax+r14+40h], rbx
lea r12, [rsp+68h+var_58]
lea rdx, [rsp+68h+var_59]
mov rdi, r12
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, _ZL12username_mapB5cxx11; username_map
mov rsi, r12
call _ZN7emhash87HashMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7SessionSt4hashIS6_ESt8equal_toIS6_EEixEOS6_; emhash8::HashMap<std::string,Session *,std::hash<std::string>,std::equal_to<std::string>>::operator[](std::string&&)
mov [rax], r13
mov rdi, [r12]; void *
lea rax, [rsp+68h+var_48]
cmp rdi, rax
jz short loc_29804
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29804:
mov r15, qword ptr cs:_ZL15sessions_vector; sessions_vector
add r15, r14
lea rdi, _ZL12identity_map; identity_map
lea rsi, [rsp+68h+var_38]
call _ZN7emhash87HashMapImP7SessionSt4hashImESt8equal_toImEEixERKm; emhash8::HashMap<ulong,Session *,std::hash<ulong>,std::equal_to<ulong>>::operator[](ulong const&)
mov [rax], r15
add r14, qword ptr cs:_ZL15sessions_vector; sessions_vector
mov [rbx+30h], r14
inc cs:_ZN8sessions11num_playersE; sessions::num_players
loc_29833:
mov rax, r14
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_29863
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29863:
mov rdi, rbx
call __Unwind_Resume
|
long long sessions::create(long long a1, long long a2)
{
long long v2; // r14
__int16 v3; // bp
long long v4; // r14
long long v5; // r12
long long v6; // r13
long long v7; // r12
long long v8; // rax
long long v9; // r9
long long v10; // r13
long long v11; // r15
void *v13[2]; // [rsp+10h] [rbp-58h] BYREF
_QWORD v14[2]; // [rsp+20h] [rbp-48h] BYREF
long long v15[7]; // [rsp+30h] [rbp-38h] BYREF
if ( !(_DWORD)qword_108B38 )
return 0LL;
v2 = 0LL;
v3 = 0;
while ( *(_QWORD *)(sessions_vector + v2 + 64) )
{
++v3;
v2 += 72LL;
if ( 72LL * (unsigned int)qword_108B38 == v2 )
return 0LL;
}
std::string::basic_string<std::allocator<char>>(v13, a2);
v5 = crc64::get(v13, 0LL);
if ( v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
v15[0] = v5;
v6 = sessions_vector + v2 + 16;
*(_WORD *)(v6 - 16) = v3;
*(_QWORD *)(v6 - 8) = v5;
v7 = *(_QWORD *)(v6 + 8);
v8 = strlen(a2);
std::string::_M_replace(v6, 0LL, v7, a2, v8, v9);
v10 = sessions_vector + v2;
*(_DWORD *)(v10 + 48) = -1;
*(_QWORD *)(v10 + 64) = a1;
std::string::basic_string<std::allocator<char>>(v13, a2);
*(_QWORD *)emhash8::HashMap<std::string,Session *,std::hash<std::string>,std::equal_to<std::string>>::operator[](
&username_map[abi:cxx11],
v13) = v10;
if ( v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
v11 = v2 + sessions_vector;
*(_QWORD *)emhash8::HashMap<unsigned long,Session *,std::hash<unsigned long>,std::equal_to<unsigned long>>::operator[](
&identity_map,
v15) = v11;
v4 = sessions_vector + v2;
*(_QWORD *)(a1 + 48) = v4;
++sessions::num_players;
return v4;
}
|
create:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV ECX,dword ptr [0x00208b38]
TEST RCX,RCX
JZ 0x00129728
MOV R15,RSI
MOV RBX,RDI
MOV RAX,qword ptr [0x00208be8]
SHL RCX,0x3
LEA RCX,[RCX + RCX*0x8]
XOR R14D,R14D
XOR EBP,EBP
LAB_00129715:
CMP qword ptr [RAX + R14*0x1 + 0x40],0x0
JZ 0x00129730
INC EBP
ADD R14,0x48
CMP RCX,R14
JNZ 0x00129715
LAB_00129728:
XOR R14D,R14D
JMP 0x00129833
LAB_00129730:
LEA R12,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RDI,R12
MOV RSI,R15
CALL 0x0011b480
LAB_00129745:
MOV RDI,R12
XOR ESI,ESI
CALL 0x00151f05
LAB_0012974f:
MOV R12,RAX
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0012976d
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001166c0
LAB_0012976d:
MOV qword ptr [RSP + 0x30],R12
MOV RAX,qword ptr [0x00208be8]
LEA R13,[RAX + R14*0x1]
ADD R13,0x10
MOV word ptr [R13 + -0x10],BP
MOV qword ptr [R13 + -0x8],R12
MOV R12,qword ptr [R13 + 0x8]
MOV RDI,R15
CALL 0x00116280
MOV RDI,R13
XOR ESI,ESI
MOV RDX,R12
MOV RCX,R15
MOV R8,RAX
CALL 0x00116ab0
MOV RAX,qword ptr [0x00208be8]
LEA R13,[RAX + R14*0x1]
MOV dword ptr [RAX + R14*0x1 + 0x30],0xffffffff
MOV qword ptr [RAX + R14*0x1 + 0x40],RBX
LEA R12,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RDI,R12
MOV RSI,R15
CALL 0x0011b480
LEA RDI,[0x208b70]
MOV RSI,R12
CALL 0x0012a9f8
MOV qword ptr [RAX],R13
MOV RDI,qword ptr [R12]
LEA RAX,[RSP + 0x20]
CMP RDI,RAX
JZ 0x00129804
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001166c0
LAB_00129804:
MOV R15,qword ptr [0x00208be8]
ADD R15,R14
LEA RDI,[0x208ba0]
LEA RSI,[RSP + 0x30]
CALL 0x0012aaee
MOV qword ptr [RAX],R15
ADD R14,qword ptr [0x00208be8]
MOV qword ptr [RBX + 0x30],R14
INC dword ptr [0x00208b68]
LAB_00129833:
MOV RAX,R14
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* sessions::create(_ENetPeer*, char const*) */
long sessions::create(_ENetPeer *param_1,char *param_2)
{
short *psVar1;
char *pcVar2;
long lVar3;
long *plVar4;
short sVar5;
long lVar6;
long lVar7;
allocator local_59;
long *local_58 [2];
long local_48 [2];
ulong local_38;
if ((ulong)(uint)max_players._8_4_ != 0) {
lVar6 = 0;
sVar5 = 0;
do {
if (*(long *)(sessions_vector + 0x40 + lVar6) == 0) {
std::__cxx11::string::string<std::allocator<char>>((string *)local_58,param_2,&local_59);
/* try { // try from 00129745 to 0012974e has its CatchHandler @ 00129845 */
local_38 = crc64::get((string *)local_58,0);
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
psVar1 = (short *)(sessions_vector + lVar6);
*psVar1 = sVar5;
*(ulong *)(psVar1 + 4) = local_38;
pcVar2 = *(char **)(psVar1 + 0xc);
strlen(param_2);
std::__cxx11::string::_M_replace((ulong)(psVar1 + 8),0,pcVar2,(ulong)param_2);
lVar3 = sessions_vector;
lVar7 = sessions_vector + lVar6;
*(int4 *)(sessions_vector + 0x30 + lVar6) = 0xffffffff;
*(_ENetPeer **)(lVar3 + 0x40 + lVar6) = param_1;
std::__cxx11::string::string<std::allocator<char>>((string *)local_58,param_2,&local_59);
plVar4 = (long *)emhash8::
HashMap<std::__cxx11::string,Session*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
::operator[]((HashMap<std::__cxx11::string,Session*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
*)username_map_abi_cxx11_,(string *)local_58);
*plVar4 = lVar7;
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
lVar7 = sessions_vector + lVar6;
plVar4 = (long *)emhash8::
HashMap<unsigned_long,Session*,std::hash<unsigned_long>,std::equal_to<unsigned_long>>
::operator[]((HashMap<unsigned_long,Session*,std::hash<unsigned_long>,std::equal_to<unsigned_long>>
*)&identity_map,&local_38);
*plVar4 = lVar7;
lVar6 = lVar6 + sessions_vector;
*(long *)(param_1 + 0x30) = lVar6;
_num_players = _num_players + 1;
return lVar6;
}
sVar5 = sVar5 + 1;
lVar6 = lVar6 + 0x48;
} while ((ulong)(uint)max_players._8_4_ * 0x48 != lVar6);
}
return 0;
}
|
|
14,598
|
my_once_free
|
eloqsql/mysys/my_once.c
|
void my_once_free(void)
{
reg1 USED_MEM *next,*old;
DBUG_ENTER("my_once_free");
for (next=my_once_root_block ; next ; )
{
old=next; next= next->next ;
free((uchar*) old);
}
my_once_root_block=0;
DBUG_VOID_RETURN;
}
|
O3
|
c
|
my_once_free:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0xb97dfa(%rip), %rbx # 0xc5bed0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xc40ee
movq (%rdi), %r14
callq 0x2b190
movq %r14, %rdi
testq %r14, %r14
jne 0xc40de
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
|
my_once_free:
push rbp
mov rbp, rsp
push r14
push rbx
lea rbx, my_once_root_block
mov rdi, [rbx]
test rdi, rdi
jz short loc_C40EE
loc_C40DE:
mov r14, [rdi]
call _free
mov rdi, r14
test r14, r14
jnz short loc_C40DE
loc_C40EE:
mov qword ptr [rbx], 0
pop rbx
pop r14
pop rbp
retn
|
long long my_once_free()
{
_QWORD *v0; // rdi
_QWORD *v1; // r14
long long result; // rax
v0 = (_QWORD *)my_once_root_block;
if ( my_once_root_block )
{
do
{
v1 = (_QWORD *)*v0;
result = free(v0);
v0 = v1;
}
while ( v1 );
}
my_once_root_block = 0LL;
return result;
}
|
my_once_free:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA RBX,[0xd5bed0]
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x001c40ee
LAB_001c40de:
MOV R14,qword ptr [RDI]
CALL 0x0012b190
MOV RDI,R14
TEST R14,R14
JNZ 0x001c40de
LAB_001c40ee:
MOV qword ptr [RBX],0x0
POP RBX
POP R14
POP RBP
RET
|
void my_once_free(void)
{
long *plVar1;
long *__ptr;
__ptr = my_once_root_block;
if (my_once_root_block != (long *)0x0) {
do {
plVar1 = (long *)*__ptr;
free(__ptr);
__ptr = plVar1;
} while (plVar1 != (long *)0x0);
}
my_once_root_block = (long *)0x0;
return;
}
|
|
14,599
|
lock_io_cache
|
eloqsql/mysys/mf_iocache.c
|
static int lock_io_cache(IO_CACHE *cache, my_off_t pos)
{
IO_CACHE_SHARE *cshare= cache->share;
DBUG_ENTER("lock_io_cache");
/* Enter the lock. */
mysql_mutex_lock(&cshare->mutex);
cshare->running_threads--;
DBUG_PRINT("io_cache_share", ("%s: %p pos: %lu running: %u",
(cache == cshare->source_cache) ?
"writer" : "reader", cache, (ulong) pos,
cshare->running_threads));
if (cshare->source_cache)
{
/* A write cache is synchronized to the read caches. */
if (cache == cshare->source_cache)
{
/* The writer waits until all readers are here. */
while (cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("writer waits in lock"));
mysql_cond_wait(&cshare->cond_writer, &cshare->mutex);
}
DBUG_PRINT("io_cache_share", ("writer awoke, going to copy"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/* The last thread wakes the writer. */
if (!cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("waking writer"));
mysql_cond_signal(&cshare->cond_writer);
}
/*
Readers wait until the data is copied from the writer. Another
reason to stop waiting is the removal of the write thread. If this
happens, we leave the lock with old data in the buffer.
*/
while ((!cshare->read_end || (cshare->pos_in_file < pos)) &&
cshare->source_cache)
{
DBUG_PRINT("io_cache_share", ("reader waits in lock"));
mysql_cond_wait(&cshare->cond, &cshare->mutex);
}
/*
If the writer was removed from the share while this thread was
asleep, we need to simulate an EOF condition. The writer cannot
reset the share variables as they might still be in use by readers
of the last block. When we awake here then because the last
joining thread signalled us. If the writer is not the last, it
will not signal. So it is safe to clear the buffer here.
*/
if (!cshare->read_end || (cshare->pos_in_file < pos))
{
DBUG_PRINT("io_cache_share", ("reader found writer removed. EOF"));
cshare->read_end= cshare->buffer; /* Empty buffer. */
cshare->error= 0; /* EOF is not an error. */
}
}
else
{
/*
There are read caches only. The last thread arriving in
lock_io_cache() continues with a locked cache and reads the block.
*/
if (!cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("last thread joined, going to read"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/*
All other threads wait until the requested block is read by the
last thread arriving. Another reason to stop waiting is the
removal of a thread. If this leads to all threads being in the
lock, we have to continue also. The first of the awaken threads
will then do the read.
*/
while ((!cshare->read_end || (cshare->pos_in_file < pos)) &&
cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("reader waits in lock"));
mysql_cond_wait(&cshare->cond, &cshare->mutex);
}
/* If the block is not yet read, continue with a locked cache and read. */
if (!cshare->read_end || (cshare->pos_in_file < pos))
{
DBUG_PRINT("io_cache_share", ("reader awoke, going to read"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/* Another thread did read the block already. */
}
DBUG_PRINT("io_cache_share", ("reader awoke, going to process %u bytes",
(uint) (cshare->read_end ? (size_t)
(cshare->read_end - cshare->buffer) :
0)));
/*
Leave the lock. Do not call unlock_io_cache() later. The thread that
filled the buffer did this and marked all threads as running.
*/
mysql_mutex_unlock(&cshare->mutex);
DBUG_RETURN(0);
}
|
O3
|
c
|
lock_io_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq 0x98(%rdi), %rbx
cmpq $0x0, 0x40(%rbx)
jne 0x5257c
movq %rbx, %rdi
callq 0x28530
movl 0xd8(%rbx), %eax
decl %eax
movl %eax, 0xd8(%rbx)
movq 0xc0(%rbx), %rcx
testq %rcx, %rcx
je 0x5248f
cmpq %r15, %rcx
je 0x5252f
testl %eax, %eax
jne 0x52436
leaq 0x80(%rbx), %r15
movq 0xb0(%rbx), %rdi
testq %rdi, %rdi
jne 0x525aa
movq %r15, %rdi
callq 0x28040
leaq 0x48(%rbx), %r15
leaq 0x405ae(%rip), %r12 # 0x929ef
cmpq $0x0, 0xd0(%rbx)
je 0x52458
cmpq %r14, 0xb8(%rbx)
jae 0x52505
cmpq $0x0, 0xc0(%rbx)
je 0x524ed
cmpq $0x0, 0x78(%rbx)
jne 0x5247a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x285b0
jmp 0x52441
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x406, %ecx # imm = 0x406
callq 0x2a19d
jmp 0x52441
movl $0x1, %r15d
testl %eax, %eax
je 0x5251d
leaq 0x48(%rbx), %r12
leaq 0x40547(%rip), %r13 # 0x929ef
cmpq $0x0, 0xd0(%rbx)
je 0x524bb
cmpq %r14, 0xb8(%rbx)
jae 0x52505
cmpl $0x0, 0xd8(%rbx)
je 0x5251d
cmpq $0x0, 0x78(%rbx)
jne 0x524d8
movq %r12, %rdi
movq %rbx, %rsi
callq 0x285b0
jmp 0x524a8
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl $0x430, %ecx # imm = 0x430
callq 0x2a19d
jmp 0x524a8
movq 0xc8(%rbx), %rax
movq %rax, 0xd0(%rbx)
movl $0x0, 0xe0(%rbx)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0x52595
movq %rbx, %rdi
callq 0x28260
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %r15d
testl %eax, %eax
je 0x5251d
leaq 0x80(%rbx), %r14
leaq 0x404a8(%rip), %r12 # 0x929ef
cmpq $0x0, 0xb0(%rbx)
jne 0x52567
movq %r14, %rdi
movq %rbx, %rsi
callq 0x285b0
cmpl $0x0, 0xd8(%rbx)
jne 0x52547
jmp 0x5251d
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x3ee, %ecx # imm = 0x3EE
callq 0x2a19d
jmp 0x5255c
leaq 0x4046c(%rip), %rsi # 0x929ef
movq %rbx, %rdi
movl $0x3dd, %edx # imm = 0x3DD
callq 0x29e8c
jmp 0x523ec
leaq 0x2dddb4(%rip), %rax # 0x330350
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x52512
leaq 0x2ddd9f(%rip), %rax # 0x330350
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x5242e
|
lock_io_cache:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov r15, rdi
mov rbx, [rdi+98h]
cmp qword ptr [rbx+40h], 0
jnz loc_5257C
mov rdi, rbx
call _pthread_mutex_lock
loc_523EC:
mov eax, [rbx+0D8h]
dec eax
mov [rbx+0D8h], eax
mov rcx, [rbx+0C0h]
test rcx, rcx
jz loc_5248F
cmp rcx, r15
jz loc_5252F
test eax, eax
jnz short loc_52436
lea r15, [rbx+80h]
mov rdi, [rbx+0B0h]
test rdi, rdi
jnz loc_525AA
loc_5242E:
mov rdi, r15
call _pthread_cond_signal
loc_52436:
lea r15, [rbx+48h]
lea r12, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
loc_52441:
cmp qword ptr [rbx+0D0h], 0
jz short loc_52458
cmp [rbx+0B8h], r14
jnb loc_52505
loc_52458:
cmp qword ptr [rbx+0C0h], 0
jz loc_524ED
cmp qword ptr [rbx+78h], 0
jnz short loc_5247A
mov rdi, r15
mov rsi, rbx
call _pthread_cond_wait
jmp short loc_52441
loc_5247A:
mov rdi, r15
mov rsi, rbx
mov rdx, r12
mov ecx, 406h
call psi_cond_wait
jmp short loc_52441
loc_5248F:
mov r15d, 1
test eax, eax
jz loc_5251D
lea r12, [rbx+48h]
lea r13, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
loc_524A8:
cmp qword ptr [rbx+0D0h], 0
jz short loc_524BB
cmp [rbx+0B8h], r14
jnb short loc_52505
loc_524BB:
cmp dword ptr [rbx+0D8h], 0
jz short loc_5251D
cmp qword ptr [rbx+78h], 0
jnz short loc_524D8
mov rdi, r12
mov rsi, rbx
call _pthread_cond_wait
jmp short loc_524A8
loc_524D8:
mov rdi, r12
mov rsi, rbx
mov rdx, r13
mov ecx, 430h
call psi_cond_wait
jmp short loc_524A8
loc_524ED:
mov rax, [rbx+0C8h]
mov [rbx+0D0h], rax
mov dword ptr [rbx+0E0h], 0
loc_52505:
mov rdi, [rbx+40h]
test rdi, rdi
jnz loc_52595
loc_52512:
mov rdi, rbx
call _pthread_mutex_unlock
xor r15d, r15d
loc_5251D:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5252F:
mov r15d, 1
test eax, eax
jz short loc_5251D
lea r14, [rbx+80h]
lea r12, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
loc_52547:
cmp qword ptr [rbx+0B0h], 0
jnz short loc_52567
mov rdi, r14
mov rsi, rbx
call _pthread_cond_wait
loc_5255C:
cmp dword ptr [rbx+0D8h], 0
jnz short loc_52547
jmp short loc_5251D
loc_52567:
mov rdi, r14
mov rsi, rbx
mov rdx, r12
mov ecx, 3EEh
call psi_cond_wait
jmp short loc_5255C
loc_5257C:
lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 3DDh
call psi_mutex_lock
jmp loc_523EC
loc_52595:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_52512
loc_525AA:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp loc_5242E
|
long long lock_io_cache(long long a1, unsigned long long a2)
{
long long v2; // rbx
int v3; // eax
long long v4; // rcx
long long v5; // rdi
unsigned int v6; // r15d
long long v7; // rdi
v2 = *(_QWORD *)(a1 + 152);
if ( *(_QWORD *)(v2 + 64) )
psi_mutex_lock(
*(_QWORD *)(a1 + 152),
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x3DDu);
else
pthread_mutex_lock(*(_QWORD *)(a1 + 152));
v3 = *(_DWORD *)(v2 + 216) - 1;
*(_DWORD *)(v2 + 216) = v3;
v4 = *(_QWORD *)(v2 + 192);
if ( !v4 )
{
v6 = 1;
if ( !v3 )
return v6;
while ( !*(_QWORD *)(v2 + 208) || *(_QWORD *)(v2 + 184) < a2 )
{
if ( !*(_DWORD *)(v2 + 216) )
return v6;
if ( *(_QWORD *)(v2 + 120) )
psi_cond_wait(v2 + 72, v2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x430u);
else
pthread_cond_wait(v2 + 72, v2);
}
goto LABEL_23;
}
if ( v4 != a1 )
{
if ( !v3 )
{
v5 = *(_QWORD *)(v2 + 176);
if ( v5 )
((void ( *)(long long))PSI_server[46])(v5);
pthread_cond_signal(v2 + 128);
}
while ( !*(_QWORD *)(v2 + 208) || *(_QWORD *)(v2 + 184) < a2 )
{
if ( !*(_QWORD *)(v2 + 192) )
{
*(_QWORD *)(v2 + 208) = *(_QWORD *)(v2 + 200);
*(_DWORD *)(v2 + 224) = 0;
break;
}
if ( *(_QWORD *)(v2 + 120) )
psi_cond_wait(v2 + 72, v2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x406u);
else
pthread_cond_wait(v2 + 72, v2);
}
LABEL_23:
v7 = *(_QWORD *)(v2 + 64);
if ( v7 )
((void ( *)(long long))PSI_server[44])(v7);
pthread_mutex_unlock(v2);
return 0;
}
v6 = 1;
if ( v3 )
{
do
{
if ( *(_QWORD *)(v2 + 176) )
psi_cond_wait(v2 + 128, v2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x3EEu);
else
pthread_cond_wait(v2 + 128, v2);
}
while ( *(_DWORD *)(v2 + 216) );
}
return v6;
}
|
lock_io_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV R15,RDI
MOV RBX,qword ptr [RDI + 0x98]
CMP qword ptr [RBX + 0x40],0x0
JNZ 0x0015257c
MOV RDI,RBX
CALL 0x00128530
LAB_001523ec:
MOV EAX,dword ptr [RBX + 0xd8]
DEC EAX
MOV dword ptr [RBX + 0xd8],EAX
MOV RCX,qword ptr [RBX + 0xc0]
TEST RCX,RCX
JZ 0x0015248f
CMP RCX,R15
JZ 0x0015252f
TEST EAX,EAX
JNZ 0x00152436
LEA R15,[RBX + 0x80]
MOV RDI,qword ptr [RBX + 0xb0]
TEST RDI,RDI
JNZ 0x001525aa
LAB_0015242e:
MOV RDI,R15
CALL 0x00128040
LAB_00152436:
LEA R15,[RBX + 0x48]
LEA R12,[0x1929ef]
LAB_00152441:
CMP qword ptr [RBX + 0xd0],0x0
JZ 0x00152458
CMP qword ptr [RBX + 0xb8],R14
JNC 0x00152505
LAB_00152458:
CMP qword ptr [RBX + 0xc0],0x0
JZ 0x001524ed
CMP qword ptr [RBX + 0x78],0x0
JNZ 0x0015247a
MOV RDI,R15
MOV RSI,RBX
CALL 0x001285b0
JMP 0x00152441
LAB_0015247a:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0x406
CALL 0x0012a19d
JMP 0x00152441
LAB_0015248f:
MOV R15D,0x1
TEST EAX,EAX
JZ 0x0015251d
LEA R12,[RBX + 0x48]
LEA R13,[0x1929ef]
LAB_001524a8:
CMP qword ptr [RBX + 0xd0],0x0
JZ 0x001524bb
CMP qword ptr [RBX + 0xb8],R14
JNC 0x00152505
LAB_001524bb:
CMP dword ptr [RBX + 0xd8],0x0
JZ 0x0015251d
CMP qword ptr [RBX + 0x78],0x0
JNZ 0x001524d8
MOV RDI,R12
MOV RSI,RBX
CALL 0x001285b0
JMP 0x001524a8
LAB_001524d8:
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R13
MOV ECX,0x430
CALL 0x0012a19d
JMP 0x001524a8
LAB_001524ed:
MOV RAX,qword ptr [RBX + 0xc8]
MOV qword ptr [RBX + 0xd0],RAX
MOV dword ptr [RBX + 0xe0],0x0
LAB_00152505:
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x00152595
LAB_00152512:
MOV RDI,RBX
CALL 0x00128260
XOR R15D,R15D
LAB_0015251d:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015252f:
MOV R15D,0x1
TEST EAX,EAX
JZ 0x0015251d
LEA R14,[RBX + 0x80]
LEA R12,[0x1929ef]
LAB_00152547:
CMP qword ptr [RBX + 0xb0],0x0
JNZ 0x00152567
MOV RDI,R14
MOV RSI,RBX
CALL 0x001285b0
LAB_0015255c:
CMP dword ptr [RBX + 0xd8],0x0
JNZ 0x00152547
JMP 0x0015251d
LAB_00152567:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
MOV ECX,0x3ee
CALL 0x0012a19d
JMP 0x0015255c
LAB_0015257c:
LEA RSI,[0x1929ef]
MOV RDI,RBX
MOV EDX,0x3dd
CALL 0x00129e8c
JMP 0x001523ec
LAB_00152595:
LEA RAX,[0x430350]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00152512
LAB_001525aa:
LEA RAX,[0x430350]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x0015242e
|
int8 lock_io_cache(long param_1,ulong param_2)
{
pthread_mutex_t *__mutex;
int iVar1;
int8 uVar2;
__mutex = *(pthread_mutex_t **)(param_1 + 0x98);
if (*(long *)((long)__mutex + 0x40) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x3dd);
}
iVar1 = *(int *)((long)__mutex + 0xd8) + -1;
*(int *)((long)__mutex + 0xd8) = iVar1;
if (*(long *)((long)__mutex + 0xc0) == 0) {
uVar2 = 1;
if (iVar1 != 0) {
while( true ) {
if ((*(long *)((long)__mutex + 0xd0) != 0) && (param_2 <= *(ulong *)((long)__mutex + 0xb8)))
goto LAB_00152505;
if (*(int *)((long)__mutex + 0xd8) == 0) break;
if (__mutex[3].__align == 0) {
pthread_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex);
}
else {
psi_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x430);
}
}
}
}
else if (*(long *)((long)__mutex + 0xc0) == param_1) {
uVar2 = 1;
if (iVar1 != 0) {
do {
if (*(long *)((long)__mutex + 0xb0) == 0) {
pthread_cond_wait((pthread_cond_t *)((long)__mutex + 0x80),__mutex);
}
else {
psi_cond_wait((pthread_cond_t *)((long)__mutex + 0x80),__mutex,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x3ee);
}
} while (*(int *)((long)__mutex + 0xd8) != 0);
}
}
else {
if (iVar1 == 0) {
if (*(long *)((long)__mutex + 0xb0) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)((long)__mutex + 0x80));
}
while( true ) {
if ((*(long *)((long)__mutex + 0xd0) != 0) && (param_2 <= *(ulong *)((long)__mutex + 0xb8)))
goto LAB_00152505;
if (*(long *)((long)__mutex + 0xc0) == 0) break;
if (__mutex[3].__align == 0) {
pthread_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex);
}
else {
psi_cond_wait((pthread_cond_t *)((long)__mutex + 0x48),__mutex,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x406);
}
}
*(long *)((long)__mutex + 0xd0) = __mutex[5].__align;
*(int4 *)((long)__mutex + 0xe0) = 0;
LAB_00152505:
if (*(long *)((long)__mutex + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
uVar2 = 0;
}
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.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.