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
|
---|---|---|---|---|---|---|---|---|---|---|---|
5,700 | translog_write_variable_record_1chunk | eloqsql/storage/maria/ma_loghandler.c | static my_bool
translog_write_variable_record_1chunk(LSN *lsn,
enum translog_record_type type,
MARIA_HA *tbl_info,
SHORT_TRANSACTION_ID short_trid,
struct st_translog_parts *parts,
struct st_translog_buffer
*buffer_to_flush, uint16 header_length,
TRN *trn, void *hook_arg)
{
int rc;
uchar chunk0_header[1 + 2 + 5 + 2];
DBUG_ENTER("translog_write_variable_record_1chunk");
translog_lock_assert_owner();
if (buffer_to_flush)
translog_buffer_lock_assert_owner(buffer_to_flush);
translog_write_variable_record_1group_header(parts, type, short_trid,
header_length, chunk0_header);
set_lsn(lsn, log_descriptor.horizon);
if (translog_set_lsn_for_files(LSN_FILE_NO(*lsn), LSN_FILE_NO(*lsn),
*lsn, TRUE) ||
(log_record_type_descriptor[type].inwrite_hook &&
(*log_record_type_descriptor[type].inwrite_hook)(type, trn, tbl_info,
lsn, hook_arg)))
{
translog_unlock();
rc= 1;
goto err;
}
rc= translog_write_parts_on_page(&log_descriptor.horizon,
&log_descriptor.bc,
parts->total_record_length, parts);
log_descriptor.bc.buffer->last_lsn= *lsn;
DBUG_PRINT("info", ("last_lsn set to " LSN_FMT " buffer: %p",
LSN_IN_PARTS(log_descriptor.bc.buffer->last_lsn),
log_descriptor.bc.buffer));
translog_unlock();
/*
check if we switched buffer and need process it (current buffer is
unlocked already => we will not delay other threads
*/
err:
if (buffer_to_flush != NULL)
{
if (!rc)
rc= translog_buffer_flush(buffer_to_flush);
translog_buffer_unlock(buffer_to_flush);
}
DBUG_RETURN(rc);
} | O0 | c | translog_write_variable_record_1chunk:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movw %cx, %ax
movq 0x20(%rbp), %rcx
movq 0x18(%rbp), %rcx
movw 0x10(%rbp), %cx
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movq %rdx, -0x30(%rbp)
movw %ax, -0x32(%rbp)
movq %r8, -0x40(%rbp)
movq %r9, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x4fa14
jmp 0x4fa14
movq -0x40(%rbp), %rdi
movl -0x24(%rbp), %esi
movw -0x32(%rbp), %cx
movw 0x10(%rbp), %ax
leaq -0x12(%rbp), %r8
movzwl %cx, %edx
movzwl %ax, %ecx
callq 0x50e70
movq -0x20(%rbp), %rdi
movq 0xc5f94b(%rip), %rsi # 0xcaf388
callq 0x50f40
movq -0x20(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %edi
movq -0x20(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %esi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movl $0x1, %ecx
callq 0x50f70
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x4fac3
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x45dabf(%rip), %rax # 0x4ad540
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x4fad1
movl -0x24(%rbp), %eax
movl %eax, %ecx
leaq 0x45daa5(%rip), %rax # 0x4ad540
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x24(%rbp), %edi
movq 0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq 0x20(%rbp), %r8
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x4fad1
callq 0x45d30
movl $0x1, -0x4c(%rbp)
jmp 0x4fb1b
movq -0x40(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x40(%rbp), %rcx
leaq 0x45ec5d(%rip), %rsi # 0x4ae740
movq %rsi, %rdi
addq $0x800c48, %rdi # imm = 0x800C48
addq $0x800c50, %rsi # imm = 0x800C50
callq 0x51110
movsbl %al, %eax
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq 0xc5f8ab(%rip), %rax # 0xcaf3b8
movq %rcx, 0x100000(%rax)
jmp 0x4fb16
callq 0x45d30
cmpq $0x0, -0x48(%rbp)
je 0x4fb40
cmpl $0x0, -0x4c(%rbp)
jne 0x4fb37
movq -0x48(%rbp), %rdi
callq 0x4bef0
movsbl %al, %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rdi
callq 0x45d00
jmp 0x4fb42
movl -0x4c(%rbp), %eax
movb %al, -0x4d(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4fb63
movb -0x4d(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
callq 0x2a290
nopl (%rax,%rax)
| translog_write_variable_record_1chunk:
push rbp
mov rbp, rsp
sub rsp, 50h
mov ax, cx
mov rcx, [rbp+arg_10]
mov rcx, [rbp+arg_8]
mov cx, [rbp+arg_0]
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_20], rdi
mov [rbp+var_24], esi
mov [rbp+var_30], rdx
mov [rbp+var_32], ax
mov [rbp+var_40], r8
mov [rbp+var_48], r9
cmp [rbp+var_48], 0
jz short loc_4FA14
jmp short $+2
loc_4FA14:
mov rdi, [rbp+var_40]
mov esi, [rbp+var_24]
mov cx, [rbp+var_32]
mov ax, [rbp+arg_0]
lea r8, [rbp+var_12]
movzx edx, cx
movzx ecx, ax
call translog_write_variable_record_1group_header
mov rdi, [rbp+var_20]
mov rsi, cs:qword_CAF388
call set_lsn
mov rax, [rbp+var_20]
mov rax, [rax]
sar rax, 20h
mov edi, eax
mov rax, [rbp+var_20]
mov rax, [rax]
sar rax, 20h
mov esi, eax
mov rax, [rbp+var_20]
mov rdx, [rax]
mov ecx, 1
call translog_set_lsn_for_files
movsx eax, al
cmp eax, 0
jnz short loc_4FAC3
mov eax, [rbp+var_24]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
cmp qword ptr [rax+10h], 0
jz short loc_4FAD1
mov eax, [rbp+var_24]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
mov rax, [rax+10h]
mov edi, [rbp+var_24]
mov rsi, [rbp+arg_8]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_20]
mov r8, [rbp+arg_10]
call rax
movsx eax, al
cmp eax, 0
jz short loc_4FAD1
loc_4FAC3:
call translog_unlock
mov [rbp+var_4C], 1
jmp short loc_4FB1B
loc_4FAD1:
mov rax, [rbp+var_40]
mov edx, [rax+4]
mov rcx, [rbp+var_40]
lea rsi, log_descriptor
mov rdi, rsi
add rdi, 800C48h
add rsi, 800C50h
call translog_write_parts_on_page
movsx eax, al
mov [rbp+var_4C], eax
mov rax, [rbp+var_20]
mov rcx, [rax]
mov rax, cs:qword_CAF3B8
mov qword ptr ds:loc_100000[rax], rcx
jmp short $+2
loc_4FB16:
call translog_unlock
loc_4FB1B:
cmp [rbp+var_48], 0
jz short loc_4FB40
cmp [rbp+var_4C], 0
jnz short loc_4FB37
mov rdi, [rbp+var_48]
call translog_buffer_flush
movsx eax, al
mov [rbp+var_4C], eax
loc_4FB37:
mov rdi, [rbp+var_48]
call translog_buffer_unlock
loc_4FB40:
jmp short $+2
loc_4FB42:
mov eax, [rbp+var_4C]
mov [rbp+var_4D], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_4FB63
mov al, [rbp+var_4D]
add rsp, 50h
pop rbp
retn
loc_4FB63:
call ___stack_chk_fail
| char translog_write_variable_record_1chunk(
_QWORD *a1,
unsigned int a2,
long long a3,
unsigned __int16 a4,
long long a5,
long long a6,
unsigned __int16 a7,
long long a8,
long long a9)
{
int v10; // [rsp+4h] [rbp-4Ch]
_BYTE v14[10]; // [rsp+3Eh] [rbp-12h] BYREF
unsigned long long v15; // [rsp+48h] [rbp-8h]
v15 = __readfsqword(0x28u);
translog_write_variable_record_1group_header(a5, a2, a4, a7, v14);
set_lsn(a1, qword_CAF388);
if ( (unsigned __int8)translog_set_lsn_for_files((unsigned int)HIDWORD(*a1), (unsigned int)HIDWORD(*a1), *a1, 1LL)
|| *(_QWORD *)&log_record_type_descriptor[18 * a2 + 4]
&& (*(unsigned __int8 ( **)(_QWORD, long long, long long, _QWORD *, long long))&log_record_type_descriptor[18 * a2 + 4])(
a2,
a8,
a3,
a1,
a9) )
{
translog_unlock();
v10 = 1;
}
else
{
v10 = (char)translog_write_parts_on_page(
&log_descriptor[1048969],
&log_descriptor[1048970],
*(unsigned int *)(a5 + 4),
a5);
*(_QWORD *)((char *)&loc_100000 + qword_CAF3B8) = *a1;
translog_unlock();
}
if ( a6 )
{
if ( !v10 )
LOBYTE(v10) = translog_buffer_flush(a6);
translog_buffer_unlock(a6);
}
return v10;
}
| translog_write_variable_record_1chunk:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV AX,CX
MOV RCX,qword ptr [RBP + 0x20]
MOV RCX,qword ptr [RBP + 0x18]
MOV CX,word ptr [RBP + 0x10]
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x20],RDI
MOV dword ptr [RBP + -0x24],ESI
MOV qword ptr [RBP + -0x30],RDX
MOV word ptr [RBP + -0x32],AX
MOV qword ptr [RBP + -0x40],R8
MOV qword ptr [RBP + -0x48],R9
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0014fa14
JMP 0x0014fa14
LAB_0014fa14:
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x24]
MOV CX,word ptr [RBP + -0x32]
MOV AX,word ptr [RBP + 0x10]
LEA R8,[RBP + -0x12]
MOVZX EDX,CX
MOVZX ECX,AX
CALL 0x00150e70
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [0x00daf388]
CALL 0x00150f40
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX]
MOV ECX,0x1
CALL 0x00150f70
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x0014fac3
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
LEA RAX,[0x5ad540]
IMUL RCX,RCX,0x48
ADD RAX,RCX
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0014fad1
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,EAX
LEA RAX,[0x5ad540]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + 0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + 0x20]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0014fad1
LAB_0014fac3:
CALL 0x00145d30
MOV dword ptr [RBP + -0x4c],0x1
JMP 0x0014fb1b
LAB_0014fad1:
MOV RAX,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[0x5ae740]
MOV RDI,RSI
ADD RDI,0x800c48
ADD RSI,0x800c50
CALL 0x00151110
MOVSX EAX,AL
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [0x00daf3b8]
MOV qword ptr [RAX + 0x100000],RCX
JMP 0x0014fb16
LAB_0014fb16:
CALL 0x00145d30
LAB_0014fb1b:
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0014fb40
CMP dword ptr [RBP + -0x4c],0x0
JNZ 0x0014fb37
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0014bef0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x4c],EAX
LAB_0014fb37:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00145d00
LAB_0014fb40:
JMP 0x0014fb42
LAB_0014fb42:
MOV EAX,dword ptr [RBP + -0x4c]
MOV byte ptr [RBP + -0x4d],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0014fb63
MOV AL,byte ptr [RBP + -0x4d]
ADD RSP,0x50
POP RBP
RET
LAB_0014fb63:
CALL 0x0012a290
|
int8
translog_write_variable_record_1chunk
(long *param_1,uint param_2,int8 param_3,int2 param_4,long param_5,
long param_6,int2 param_7,int8 param_8,int8 param_9)
{
char cVar1;
long in_FS_OFFSET;
int1 local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
translog_write_variable_record_1group_header(param_5,param_2,param_4,param_7,local_1a);
set_lsn(param_1,DAT_00daf388);
cVar1 = translog_set_lsn_for_files
(*param_1 >> 0x20 & 0xffffffff,*param_1 >> 0x20 & 0xffffffff,*param_1,1);
if ((cVar1 == '\0') &&
((*(long *)(log_record_type_descriptor + (ulong)param_2 * 0x48 + 0x10) == 0 ||
(cVar1 = (**(code **)(log_record_type_descriptor + (ulong)param_2 * 0x48 + 0x10))
(param_2,param_8,param_3,param_1,param_9), cVar1 == '\0')))) {
cVar1 = translog_write_parts_on_page
(&DAT_00daf388,&DAT_00daf390,*(int4 *)(param_5 + 4),param_5);
*(long *)(DAT_00daf3b8 + 0x100000) = *param_1;
translog_unlock();
}
else {
translog_unlock();
cVar1 = '\x01';
}
if (param_6 != 0) {
if (cVar1 == '\0') {
cVar1 = translog_buffer_flush(param_6);
}
translog_buffer_unlock(param_6);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),cVar1);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
5,701 | my_wc_mb_eucjpms | eloqsql/strings/ctype-eucjpms.c | static int
my_wc_mb_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int jp;
if ((int) wc < 0x80) /* ASCII [00-7F] */
{
if (s >= e)
return MY_CS_TOOSMALL;
*s= (uchar) wc;
return 1;
}
if (wc > 0xFFFF)
return MY_CS_ILUNI;
if ((jp= unicode_to_jisx0208_eucjpms[wc])) /* JIS-X-0208 MS */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, jp);
return 2;
}
if ((jp= unicode_to_jisx0212_eucjpms[wc])) /* JIS-X-0212 MS */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
s[0]= 0x8F;
MY_PUT_MB2(s + 1, jp);
return 3;
}
if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
s[0]= 0x8E;
s[1]= (uchar) (wc - 0xFEC0);
return 2;
}
return MY_CS_ILUNI;
} | O0 | c | my_wc_mb_eucjpms:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jge 0x32bfd
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x32be5
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x32d25
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x32d25
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jbe 0x32c13
movl $0x0, -0x4(%rbp)
jmp 0x32d25
movq -0x18(%rbp), %rcx
leaq 0x200bf2(%rip), %rax # 0x233810
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x32c6f
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x32c44
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x32d25
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x32d25
movq -0x18(%rbp), %rcx
leaq 0x220b96(%rip), %rax # 0x253810
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x32cd0
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0x32ca0
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x32d25
movq -0x20(%rbp), %rax
movb $-0x71, (%rax)
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x2(%rax)
movl $0x3, -0x4(%rbp)
jmp 0x32d25
cmpq $0xff61, -0x18(%rbp) # imm = 0xFF61
jb 0x32d1e
cmpq $0xff9f, -0x18(%rbp) # imm = 0xFF9F
ja 0x32d1e
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x32cfb
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x32d25
movq -0x20(%rbp), %rax
movb $-0x72, (%rax)
movq -0x18(%rbp), %rax
subq $0xfec0, %rax # imm = 0xFEC0
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x32d25
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| my_wc_mb_eucjpms:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
cmp eax, 80h
jge short loc_32BFD
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_32BE5
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_32D25
loc_32BE5:
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp loc_32D25
loc_32BFD:
cmp [rbp+var_18], 0FFFFh
jbe short loc_32C13
mov [rbp+var_4], 0
jmp loc_32D25
loc_32C13:
mov rcx, [rbp+var_18]
lea rax, unicode_to_jisx0208_eucjpms
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jz short loc_32C6F
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_32C44
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_32D25
loc_32C44:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
jmp loc_32D25
loc_32C6F:
mov rcx, [rbp+var_18]
lea rax, unicode_to_jisx0212_eucjpms
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jz short loc_32CD0
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_32CA0
mov [rbp+var_4], 0FFFFFF99h
jmp loc_32D25
loc_32CA0:
mov rax, [rbp+var_20]
mov byte ptr [rax], 8Fh
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+2], cl
mov [rbp+var_4], 3
jmp short loc_32D25
loc_32CD0:
cmp [rbp+var_18], 0FF61h
jb short loc_32D1E
cmp [rbp+var_18], 0FF9Fh
ja short loc_32D1E
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_32CFB
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_32D25
loc_32CFB:
mov rax, [rbp+var_20]
mov byte ptr [rax], 8Eh
mov rax, [rbp+var_18]
sub rax, 0FEC0h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
jmp short loc_32D25
loc_32D1E:
mov [rbp+var_4], 0
loc_32D25:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_eucjpms(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
__int16 v5; // [rsp+0h] [rbp-2Ch]
__int16 v6; // [rsp+0h] [rbp-2Ch]
if ( (int)a2 >= 128 )
{
if ( a2 <= 0xFFFF )
{
v5 = unicode_to_jisx0208_eucjpms[a2];
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = HIBYTE(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
v6 = unicode_to_jisx0212_eucjpms[a2];
if ( v6 )
{
if ( (unsigned long long)(a3 + 3) <= a4 )
{
*a3 = -113;
a3[1] = HIBYTE(v6);
a3[2] = v6;
return 3;
}
else
{
return (unsigned int)-103;
}
}
else if ( a2 < 0xFF61 || a2 > 0xFF9F )
{
return 0;
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = -114;
a3[1] = a2 + 64;
return 2;
}
else
{
return (unsigned int)-102;
}
}
}
else
{
return 0;
}
}
else if ( (unsigned long long)a3 < a4 )
{
*a3 = a2;
return 1;
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_eucjpms:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JGE 0x00132bfd
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00132be5
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00132d25
LAB_00132be5:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00132d25
LAB_00132bfd:
CMP qword ptr [RBP + -0x18],0xffff
JBE 0x00132c13
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00132d25
LAB_00132c13:
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x333810]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JZ 0x00132c6f
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00132c44
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00132d25
LAB_00132c44:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00132d25
LAB_00132c6f:
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x353810]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JZ 0x00132cd0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00132ca0
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x00132d25
LAB_00132ca0:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x8f
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2],CL
MOV dword ptr [RBP + -0x4],0x3
JMP 0x00132d25
LAB_00132cd0:
CMP qword ptr [RBP + -0x18],0xff61
JC 0x00132d1e
CMP qword ptr [RBP + -0x18],0xff9f
JA 0x00132d1e
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00132cfb
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00132d25
LAB_00132cfb:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x8e
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0xfec0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00132d25
LAB_00132d1e:
MOV dword ptr [RBP + -0x4],0x0
LAB_00132d25:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_wc_mb_eucjpms(int8 param_1,ulong param_2,char *param_3,char *param_4)
{
short sVar1;
int4 local_c;
if ((int)param_2 < 0x80) {
if (param_3 < param_4) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
local_c = 0xffffff9b;
}
}
else if (param_2 < 0x10000) {
sVar1 = *(short *)(unicode_to_jisx0208_eucjpms + param_2 * 2);
if (sVar1 == 0) {
sVar1 = *(short *)(unicode_to_jisx0212_eucjpms + param_2 * 2);
if (sVar1 == 0) {
if ((param_2 < 0xff61) || (0xff9f < param_2)) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = -0x72;
param_3[1] = (char)param_2 + '@';
local_c = 2;
}
}
else if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
*param_3 = -0x71;
param_3[1] = (char)((ushort)sVar1 >> 8);
param_3[2] = (char)sVar1;
local_c = 3;
}
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((ushort)sVar1 >> 8);
param_3[1] = (char)sVar1;
local_c = 2;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
5,702 | find_collation_data_inheritance_source | eloqsql/mysys/charset.c | static CHARSET_INFO *find_collation_data_inheritance_source(CHARSET_INFO *cs, myf flags)
{
const char *beg, *end;
if (cs->tailoring &&
!strncmp(cs->tailoring, "[import ", 8) &&
(end= strchr(cs->tailoring + 8, ']')) &&
(beg= cs->tailoring + 8) + MY_CS_NAME_SIZE > end)
{
char name[MY_CS_NAME_SIZE + 1];
memcpy(name, beg, end - beg);
name[end - beg]= '\0';
return inheritance_source_by_id(cs, get_collation_number(name,MYF(flags)));
}
return NULL;
} | O0 | c | find_collation_data_inheritance_source:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x40(%rbp)
movq %rsi, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x6fd56
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rdi
leaq 0x5c7c6(%rip), %rsi # 0xcc481
movl $0x8, %edx
callq 0x36230
cmpl $0x0, %eax
jne 0x6fd56
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x8, %rdi
movl $0x5d, %esi
callq 0x364f0
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x6fd56
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x8, %rax
movq %rax, -0x50(%rbp)
addq $0x20, %rax
cmpq -0x58(%rbp), %rax
jbe 0x6fd56
leaq -0x30(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x50(%rbp), %rax
subq %rax, %rdx
callq 0x360b0
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
movb $0x0, -0x30(%rbp,%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x30(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x6da90
movq -0x60(%rbp), %rdi
movl %eax, %esi
callq 0x6fed0
movq %rax, -0x38(%rbp)
jmp 0x6fd5e
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x6fd82
movq -0x68(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
callq 0x362b0
nopw (%rax,%rax)
| find_collation_data_inheritance_source:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_40], rdi
mov [rbp+var_48], rsi
mov rax, [rbp+var_40]
cmp qword ptr [rax+38h], 0
jz loc_6FD56
mov rax, [rbp+var_40]
mov rdi, [rax+38h]
lea rsi, aImport; "[import "
mov edx, 8
call _strncmp
cmp eax, 0
jnz loc_6FD56
mov rax, [rbp+var_40]
mov rdi, [rax+38h]
add rdi, 8
mov esi, 5Dh ; ']'
call _strchr
mov [rbp+var_58], rax
cmp rax, 0
jz short loc_6FD56
mov rax, [rbp+var_40]
mov rax, [rax+38h]
add rax, 8
mov [rbp+var_50], rax
add rax, 20h ; ' '
cmp rax, [rbp+var_58]
jbe short loc_6FD56
lea rdi, [rbp+var_30]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_58]
mov rax, [rbp+var_50]
sub rdx, rax
call _memcpy
mov rax, [rbp+var_58]
mov rcx, [rbp+var_50]
sub rax, rcx
mov [rbp+rax+var_30], 0
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
lea rdi, [rbp+var_30]
mov rsi, [rbp+var_48]
call get_collation_number
mov rdi, [rbp+var_60]
mov esi, eax
call inheritance_source_by_id
mov [rbp+var_38], rax
jmp short loc_6FD5E
loc_6FD56:
mov [rbp+var_38], 0
loc_6FD5E:
mov rax, [rbp+var_38]
mov [rbp+var_68], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_6FD82
mov rax, [rbp+var_68]
add rsp, 70h
pop rbp
retn
loc_6FD82:
call ___stack_chk_fail
| long long find_collation_data_inheritance_source(long long a1, long long a2)
{
unsigned int collation_number; // eax
unsigned long long v4; // [rsp+18h] [rbp-58h]
long long v5; // [rsp+20h] [rbp-50h]
_BYTE v7[40]; // [rsp+40h] [rbp-30h] BYREF
unsigned long long v8; // [rsp+68h] [rbp-8h]
v8 = __readfsqword(0x28u);
if ( !*(_QWORD *)(a1 + 56) )
return 0LL;
if ( (unsigned int)strncmp(*(_QWORD *)(a1 + 56), "[import ", 8LL) )
return 0LL;
v4 = strchr(*(_QWORD *)(a1 + 56) + 8LL, 93LL);
if ( !v4 )
return 0LL;
v5 = *(_QWORD *)(a1 + 56) + 8LL;
if ( *(_QWORD *)(a1 + 56) + 40LL <= v4 )
return 0LL;
memcpy(v7, v5, v4 - v5);
v7[v4 - v5] = 0;
collation_number = get_collation_number((long long)v7, a2);
return inheritance_source_by_id(a1, collation_number);
}
| find_collation_data_inheritance_source:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x40],RDI
MOV qword ptr [RBP + -0x48],RSI
MOV RAX,qword ptr [RBP + -0x40]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x0016fd56
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x38]
LEA RSI,[0x1cc481]
MOV EDX,0x8
CALL 0x00136230
CMP EAX,0x0
JNZ 0x0016fd56
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x8
MOV ESI,0x5d
CALL 0x001364f0
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,0x0
JZ 0x0016fd56
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x8
MOV qword ptr [RBP + -0x50],RAX
ADD RAX,0x20
CMP RAX,qword ptr [RBP + -0x58]
JBE 0x0016fd56
LEA RDI,[RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x50]
SUB RDX,RAX
CALL 0x001360b0
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
MOV byte ptr [RBP + RAX*0x1 + -0x30],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x60],RAX
LEA RDI,[RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x48]
CALL 0x0016da90
MOV RDI,qword ptr [RBP + -0x60]
MOV ESI,EAX
CALL 0x0016fed0
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0016fd5e
LAB_0016fd56:
MOV qword ptr [RBP + -0x38],0x0
LAB_0016fd5e:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0016fd82
MOV RAX,qword ptr [RBP + -0x68]
ADD RSP,0x70
POP RBP
RET
LAB_0016fd82:
CALL 0x001362b0
|
int8 find_collation_data_inheritance_source(long param_1,int8 param_2)
{
int iVar1;
int4 uVar2;
char *pcVar3;
void *__src;
long in_FS_OFFSET;
int8 local_40;
char local_38 [40];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (*(long *)(param_1 + 0x38) != 0) {
iVar1 = strncmp(*(char **)(param_1 + 0x38),"[import ",8);
if (iVar1 == 0) {
pcVar3 = strchr((char *)(*(long *)(param_1 + 0x38) + 8),0x5d);
if ((pcVar3 != (char *)0x0) &&
(__src = (void *)(*(long *)(param_1 + 0x38) + 8),
pcVar3 < (char *)(*(long *)(param_1 + 0x38) + 0x28))) {
memcpy(local_38,__src,(long)pcVar3 - (long)__src);
pcVar3[(long)(local_38 + -(long)__src)] = '\0';
uVar2 = get_collation_number(local_38,param_2);
local_40 = inheritance_source_by_id(param_1,uVar2);
goto LAB_0016fd5e;
}
}
}
local_40 = 0;
LAB_0016fd5e:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_40;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
5,703 | js_promise_resolve_function_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_promise_resolve_function_finalizer(JSRuntime *rt, JSValue val)
{
JSPromiseFunctionData *s = JS_VALUE_GET_OBJ(val)->u.promise_function_data;
if (s) {
js_promise_resolve_function_free_resolved(rt, s->presolved);
JS_FreeValueRT(rt, s->promise);
js_free_rt(rt, s);
}
} | O1 | c | js_promise_resolve_function_finalizer:
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rsi), %rbx
testq %rbx, %rbx
je 0x51cb4
movq %rdi, %r14
movq 0x10(%rbx), %rsi
callq 0x51f3a
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x1ccb2
decq 0x28(%r14)
movq %rbx, %rdi
callq *0x20(%r14)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%r14)
movq 0x40(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| js_promise_resolve_function_finalizer:
push r14
push rbx
push rax
mov rbx, [rsi+30h]
test rbx, rbx
jz short loc_51CB4
mov r14, rdi
mov rsi, [rbx+10h]
call js_promise_resolve_function_free_resolved
mov rsi, [rbx]
mov rdx, [rbx+8]
mov rdi, r14
call JS_FreeValueRT
dec qword ptr [r14+28h]
mov rdi, rbx
call qword ptr [r14+20h]
mov rcx, [r14+10h]
mov rdx, [r14+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rdx
mov rdi, [r14+40h]
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp rcx
loc_51CB4:
add rsp, 8
pop rbx
pop r14
retn
| long long js_promise_resolve_function_finalizer(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long ( *v4)(_QWORD, long long); // rcx
long long result; // rax
v2 = *(_QWORD *)(a2 + 48);
if ( v2 )
{
js_promise_resolve_function_free_resolved(a1, *(_QWORD *)(v2 + 16));
JS_FreeValueRT(a1, *(_DWORD **)v2, *(_QWORD *)(v2 + 8));
--*(_QWORD *)(a1 + 40);
v3 = (*(long long ( **)(long long))(a1 + 32))(v2);
v4 = *(long long ( **)(_QWORD, long long))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v3 - 8;
return v4(*(_QWORD *)(a1 + 64), v2);
}
return result;
}
| js_promise_resolve_function_finalizer:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,qword ptr [RSI + 0x30]
TEST RBX,RBX
JZ 0x00151cb4
MOV R14,RDI
MOV RSI,qword ptr [RBX + 0x10]
CALL 0x00151f3a
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RDI,R14
CALL 0x0011ccb2
DEC qword ptr [R14 + 0x28]
MOV RDI,RBX
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [R14 + 0x30],RDX
MOV RDI,qword ptr [R14 + 0x40]
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
LAB_00151cb4:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void js_promise_resolve_function_finalizer(long param_1,long param_2)
{
int8 *puVar1;
long lVar2;
puVar1 = *(int8 **)(param_2 + 0x30);
if (puVar1 != (int8 *)0x0) {
js_promise_resolve_function_free_resolved(param_1,puVar1[2]);
JS_FreeValueRT(param_1,*puVar1,puVar1[1]);
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar2 = (**(code **)(param_1 + 0x20))(puVar1);
lVar2 = (*(long *)(param_1 + 0x30) - lVar2) + -8;
*(long *)(param_1 + 0x30) = lVar2;
/* WARNING: Could not recover jumptable at 0x00151cb2. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),puVar1,lVar2,*(code **)(param_1 + 0x10));
return;
}
return;
}
|
|
5,704 | js_promise_resolve_function_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_promise_resolve_function_finalizer(JSRuntime *rt, JSValue val)
{
JSPromiseFunctionData *s = JS_VALUE_GET_OBJ(val)->u.promise_function_data;
if (s) {
js_promise_resolve_function_free_resolved(rt, s->presolved);
JS_FreeValueRT(rt, s->promise);
js_free_rt(rt, s);
}
} | O3 | c | js_promise_resolve_function_finalizer:
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rsi), %rbx
testq %rbx, %rbx
je 0x5472d
movq %rdi, %r14
movq 0x10(%rbx), %rsi
callq 0x54962
movq 0x8(%rbx), %rdx
cmpl $-0x9, %edx
jb 0x546ff
movq (%rbx), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x546ff
movq %r14, %rdi
callq 0x20d90
decq 0x28(%r14)
movq %rbx, %rdi
callq *0x20(%r14)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%r14)
movq 0x40(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| js_promise_resolve_function_finalizer:
push r14
push rbx
push rax
mov rbx, [rsi+30h]
test rbx, rbx
jz short loc_5472D
mov r14, rdi
mov rsi, [rbx+10h]
call js_promise_resolve_function_free_resolved
mov rdx, [rbx+8]
cmp edx, 0FFFFFFF7h
jb short loc_546FF
mov rsi, [rbx]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_546FF
mov rdi, r14
call js_free_value_rt
loc_546FF:
dec qword ptr [r14+28h]
mov rdi, rbx
call qword ptr [r14+20h]
mov rcx, [r14+10h]
mov rdx, [r14+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rdx
mov rdi, [r14+40h]
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp rcx
loc_5472D:
add rsp, 8
pop rbx
pop r14
retn
| long long js_promise_resolve_function_finalizer(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // r8
long long v4; // r9
long long v5; // rdx
int *v6; // rsi
int v7; // eax
long long v8; // rcx
long long v9; // rax
long long ( *v10)(_QWORD, long long); // rcx
long long result; // rax
v2 = *(_QWORD *)(a2 + 48);
if ( v2 )
{
js_promise_resolve_function_free_resolved(a1, *(_QWORD *)(v2 + 16));
v5 = *(_QWORD *)(v2 + 8);
if ( (unsigned int)v5 >= 0xFFFFFFF7 )
{
v6 = *(int **)v2;
v7 = **(_DWORD **)v2;
v8 = (unsigned int)(v7 - 1);
**(_DWORD **)v2 = v8;
if ( v7 <= 1 )
js_free_value_rt(a1, v6, v5, v8, v3, v4);
}
--*(_QWORD *)(a1 + 40);
v9 = (*(long long ( **)(long long))(a1 + 32))(v2);
v10 = *(long long ( **)(_QWORD, long long))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v9 - 8;
return v10(*(_QWORD *)(a1 + 64), v2);
}
return result;
}
| js_promise_resolve_function_finalizer:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,qword ptr [RSI + 0x30]
TEST RBX,RBX
JZ 0x0015472d
MOV R14,RDI
MOV RSI,qword ptr [RBX + 0x10]
CALL 0x00154962
MOV RDX,qword ptr [RBX + 0x8]
CMP EDX,-0x9
JC 0x001546ff
MOV RSI,qword ptr [RBX]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x001546ff
MOV RDI,R14
CALL 0x00120d90
LAB_001546ff:
DEC qword ptr [R14 + 0x28]
MOV RDI,RBX
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [R14 + 0x30],RDX
MOV RDI,qword ptr [R14 + 0x40]
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
LAB_0015472d:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void js_promise_resolve_function_finalizer(long param_1,long param_2)
{
int iVar1;
int8 *puVar2;
long lVar3;
puVar2 = *(int8 **)(param_2 + 0x30);
if (puVar2 != (int8 *)0x0) {
js_promise_resolve_function_free_resolved(param_1,puVar2[2]);
if (0xfffffff6 < (uint)puVar2[1]) {
iVar1 = *(int *)*puVar2;
*(int *)*puVar2 = iVar1 + -1;
if (iVar1 < 2) {
js_free_value_rt(param_1);
}
}
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar3 = (**(code **)(param_1 + 0x20))(puVar2);
lVar3 = (*(long *)(param_1 + 0x30) - lVar3) + -8;
*(long *)(param_1 + 0x30) = lVar3;
/* WARNING: Could not recover jumptable at 0x0015472b. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),puVar2,lVar3,*(code **)(param_1 + 0x10));
return;
}
return;
}
|
|
5,705 | verify_heap_integrity | seiftnesse[P]memoryallocator/src/custom_alloc_util.c | int verify_heap_integrity(int repair, int *segments_verified, int *segments_repaired) {
if (!heap_initialized) {
HEAP_LOG("Cannot verify heap integrity - heap not initialized\n");
return -1;
}
int total_errors = 0;
int verified = 0;
int repaired = 0;
segment_t *s = segments;
while (s) {
int errors = verify_segment_integrity(s, repair);
total_errors += errors;
verified++;
if (errors > 0 && repair) {
repaired++;
}
s = s->next;
}
HEAP_LOG("Heap integrity verification complete: %d segments checked, %d errors found, %d segments repaired\n",
verified, total_errors, repaired);
if (segments_verified) *segments_verified = verified;
if (segments_repaired) *segments_repaired = repaired;
return total_errors;
} | O1 | c | verify_heap_integrity:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x424c(%rip), %rax # 0x8130
cmpl $0x0, (%rax)
je 0x3f3c
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
leaq 0x4226(%rip), %rax # 0x8120
movq (%rax), %r12
testq %r12, %r12
je 0x3f43
movl %edi, %r15d
xorl %r13d, %r13d
xorl %ebx, %ebx
xorl %ebp, %ebp
testl %r15d, %r15d
setne %r14b
movq %r12, %rdi
movl %r15d, %esi
callq 0x3d11
addl %eax, %ebp
incl %ebx
testl %eax, %eax
setg %al
andb %r14b, %al
movzbl %al, %eax
addl %eax, %r13d
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x3f0c
jmp 0x3f4a
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
jmp 0x3f63
xorl %ebp, %ebp
xorl %ebx, %ebx
xorl %r13d, %r13d
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x3f56
movl %ebx, (%rax)
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3f63
movl %r13d, (%rax)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| verify_heap_integrity:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
lea rax, heap_initialized
cmp dword ptr [rax], 0
jz short loc_3F3C
mov [rsp+48h+var_40], rsi
mov [rsp+48h+var_38], rdx
lea rax, segments
mov r12, [rax]
test r12, r12
jz short loc_3F43
mov r15d, edi
xor r13d, r13d
xor ebx, ebx
xor ebp, ebp
loc_3F0C:
test r15d, r15d
setnz r14b
mov rdi, r12
mov esi, r15d
call verify_segment_integrity
add ebp, eax
inc ebx
test eax, eax
setnle al
and al, r14b
movzx eax, al
add r13d, eax
mov r12, [r12+8]
test r12, r12
jnz short loc_3F0C
jmp short loc_3F4A
loc_3F3C:
mov ebp, 0FFFFFFFFh
jmp short loc_3F63
loc_3F43:
xor ebp, ebp
xor ebx, ebx
xor r13d, r13d
loc_3F4A:
mov rax, [rsp+48h+var_40]
test rax, rax
jz short loc_3F56
mov [rax], ebx
loc_3F56:
mov rax, [rsp+48h+var_38]
test rax, rax
jz short loc_3F63
mov [rax], r13d
loc_3F63:
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long verify_heap_integrity(int a1, _DWORD *a2, _DWORD *a3)
{
unsigned long long v3; // r12
int v4; // r13d
int v5; // ebx
unsigned int v6; // ebp
int v7; // eax
if ( heap_initialized )
{
v3 = segments;
if ( segments )
{
v4 = 0;
v5 = 0;
v6 = 0;
do
{
v7 = verify_segment_integrity(v3, a1);
v6 += v7;
++v5;
v4 += a1 != 0 && v7 > 0;
v3 = *(_QWORD *)(v3 + 8);
}
while ( v3 );
}
else
{
v6 = 0;
v5 = 0;
v4 = 0;
}
if ( a2 )
*a2 = v5;
if ( a3 )
*a3 = v4;
}
else
{
return (unsigned int)-1;
}
return v6;
}
| verify_heap_integrity:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
LEA RAX,[0x108130]
CMP dword ptr [RAX],0x0
JZ 0x00103f3c
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x10],RDX
LEA RAX,[0x108120]
MOV R12,qword ptr [RAX]
TEST R12,R12
JZ 0x00103f43
MOV R15D,EDI
XOR R13D,R13D
XOR EBX,EBX
XOR EBP,EBP
LAB_00103f0c:
TEST R15D,R15D
SETNZ R14B
MOV RDI,R12
MOV ESI,R15D
CALL 0x00103d11
ADD EBP,EAX
INC EBX
TEST EAX,EAX
SETG AL
AND AL,R14B
MOVZX EAX,AL
ADD R13D,EAX
MOV R12,qword ptr [R12 + 0x8]
TEST R12,R12
JNZ 0x00103f0c
JMP 0x00103f4a
LAB_00103f3c:
MOV EBP,0xffffffff
JMP 0x00103f63
LAB_00103f43:
XOR EBP,EBP
XOR EBX,EBX
XOR R13D,R13D
LAB_00103f4a:
MOV RAX,qword ptr [RSP + 0x8]
TEST RAX,RAX
JZ 0x00103f56
MOV dword ptr [RAX],EBX
LAB_00103f56:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00103f63
MOV dword ptr [RAX],R13D
LAB_00103f63:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int verify_heap_integrity(int param_1,int *param_2,int *param_3)
{
int iVar1;
int iVar2;
int iVar3;
long lVar4;
int iVar5;
if (heap_initialized == 0) {
iVar3 = -1;
}
else {
if (segments == 0) {
iVar3 = 0;
iVar2 = 0;
iVar5 = 0;
}
else {
iVar5 = 0;
iVar2 = 0;
iVar3 = 0;
lVar4 = segments;
do {
iVar1 = verify_segment_integrity(lVar4,param_1);
iVar3 = iVar3 + iVar1;
iVar2 = iVar2 + 1;
iVar5 = iVar5 + (uint)(0 < iVar1 && param_1 != 0);
lVar4 = *(long *)(lVar4 + 8);
} while (lVar4 != 0);
}
if (param_2 != (int *)0x0) {
*param_2 = iVar2;
}
if (param_3 != (int *)0x0) {
*param_3 = iVar5;
}
}
return iVar3;
}
|
|
5,706 | settings::add_gamepad_axis(int, ConfigGamepadAxis&, settings_location, char const*) | untodesu[P]voxelius/game/client/settings.cc | void settings::add_gamepad_axis(int priority, ConfigGamepadAxis &value, settings_location location, const char *name)
{
auto setting_value = new SettingValue_GamepadAxis;
setting_value->type = setting_type::GAMEPAD_AXIS;
setting_value->priority = priority;
setting_value->has_tooltip = false;
setting_value->value = &value;
setting_value->name = name;
setting_value->refresh_wids();
values[static_cast<unsigned int>(location)].push_back(setting_value);
values_all.push_back(setting_value);
} | O1 | cpp | settings::add_gamepad_axis(int, ConfigGamepadAxis&, settings_location, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movl %edi, %r12d
movl $0xe0, %edi
callq 0x268b0
movq %rax, %rbx
addq $0x20, %rax
movq %rax, 0x10(%rbx)
xorl %eax, %eax
movq %rax, 0x18(%rbx)
movb %al, 0x20(%rbx)
leaq 0x40(%rbx), %rcx
movq %rcx, 0x30(%rbx)
movq %rax, 0x38(%rbx)
movb %al, 0x40(%rbx)
leaq 0x50(%rbx), %r13
leaq 0x60(%rbx), %rcx
movq %rcx, 0x50(%rbx)
movq %rax, 0x58(%rbx)
movb %al, 0x60(%rbx)
leaq 0x1ea845(%rip), %rax # 0x2553b8
movq %rax, (%rbx)
movl $0x88, %eax
leaq (%rbx,%rax), %rcx
movq %rcx, -0x10(%rbx,%rax)
movq $0x0, -0x8(%rbx,%rax)
movb $0x0, (%rbx,%rax)
addq $0x20, %rax
cmpq $0xc8, %rax
jne 0x6ab7b
movq %rbx, %rax
addq $0xc8, %rax
movq %rax, 0xb8(%rbx)
movq $0x0, 0xc0(%rbx)
xorl %eax, %eax
movb %al, 0xc8(%rbx)
movl $0xb, 0x8(%rbx)
movl %r12d, 0x74(%rbx)
movb %al, 0x70(%rbx)
movq %r15, 0xd8(%rbx)
movq 0x58(%rbx), %r15
movq %r14, %rdi
callq 0x26330
movq %r13, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x26db0
movq %rbx, %rdi
callq 0x69340
movl %ebp, %eax
leaq (%rax,%rax,2), %rax
leaq 0x1f4bf7(%rip), %rcx # 0x25f800
leaq (%rcx,%rax,8), %rdi
movq %rsp, %r14
movq %rbx, (%r14)
movq %r14, %rsi
callq 0x6bf28
movq %rbx, (%r14)
leaq 0x1f4bc3(%rip), %rdi # 0x25f7e8
movq %rsp, %rsi
callq 0x6bf28
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN8settings16add_gamepad_axisEiR17ConfigGamepadAxis17settings_locationPKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rcx
mov ebp, edx
mov r15, rsi
mov r12d, edi
mov edi, 0E0h; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
add rax, 20h ; ' '
mov [rbx+10h], rax
xor eax, eax
mov [rbx+18h], rax
mov [rbx+20h], al
lea rcx, [rbx+40h]
mov [rbx+30h], rcx
mov [rbx+38h], rax
mov [rbx+40h], al
lea r13, [rbx+50h]
lea rcx, [rbx+60h]
mov [rbx+50h], rcx
mov [rbx+58h], rax
mov [rbx+60h], al
lea rax, off_2553B8
mov [rbx], rax
mov eax, 88h
loc_6AB7B:
lea rcx, [rbx+rax]
mov [rbx+rax-10h], rcx
mov qword ptr [rbx+rax-8], 0
mov byte ptr [rbx+rax], 0
add rax, 20h ; ' '
cmp rax, 0C8h
jnz short loc_6AB7B
mov rax, rbx
add rax, 0C8h
mov [rbx+0B8h], rax
mov qword ptr [rbx+0C0h], 0
xor eax, eax
mov [rbx+0C8h], al
mov dword ptr [rbx+8], 0Bh
mov [rbx+74h], r12d
mov [rbx+70h], al
mov [rbx+0D8h], r15
mov r15, [rbx+58h]
mov rdi, r14
call _strlen
mov rdi, r13
xor esi, esi
mov rdx, r15
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov rdi, rbx; this
call _ZN24SettingValue_GamepadAxis12refresh_widsEv; SettingValue_GamepadAxis::refresh_wids(void)
mov eax, ebp
lea rax, [rax+rax*2]
lea rcx, _ZL6values; values
lea rdi, [rcx+rax*8]
mov r14, rsp
mov [r14], rbx
mov rsi, r14
call _ZNSt6vectorIP12SettingValueSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SettingValue *>::emplace_back<SettingValue *>(SettingValue * &&)
mov [r14], rbx
lea rdi, _ZL10values_all; values_all
mov rsi, rsp
call _ZNSt6vectorIP12SettingValueSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SettingValue *>::emplace_back<SettingValue *>(SettingValue * &&)
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long settings::add_gamepad_axis(int a1, long long a2, unsigned int a3, long long a4, double a5)
{
long long v5; // rax
long long v8; // rbx
long long i; // rax
long long v10; // r15
long long v11; // rax
long long v12; // r9
long long v13; // rdx
long long v14; // rcx
long long v15; // r8
int v16; // r9d
_QWORD v18[7]; // [rsp-8h] [rbp-38h] BYREF
v18[0] = v5;
v8 = operator new(0xE0uLL);
*(_QWORD *)(v8 + 16) = v8 + 32;
*(_QWORD *)(v8 + 24) = 0LL;
*(_BYTE *)(v8 + 32) = 0;
*(_QWORD *)(v8 + 48) = v8 + 64;
*(_QWORD *)(v8 + 56) = 0LL;
*(_BYTE *)(v8 + 64) = 0;
*(_QWORD *)(v8 + 80) = v8 + 96;
*(_QWORD *)(v8 + 88) = 0LL;
*(_BYTE *)(v8 + 96) = 0;
*(_QWORD *)v8 = off_2553B8;
for ( i = 136LL; i != 200; i += 32LL )
{
*(_QWORD *)(v8 + i - 16) = v8 + i;
*(_QWORD *)(v8 + i - 8) = 0LL;
*(_BYTE *)(v8 + i) = 0;
}
*(_QWORD *)(v8 + 184) = v8 + 200;
*(_QWORD *)(v8 + 192) = 0LL;
*(_BYTE *)(v8 + 200) = 0;
*(_DWORD *)(v8 + 8) = 11;
*(_DWORD *)(v8 + 116) = a1;
*(_BYTE *)(v8 + 112) = 0;
*(_QWORD *)(v8 + 216) = a2;
v10 = *(_QWORD *)(v8 + 88);
v11 = strlen(a4);
std::string::_M_replace(v8 + 80, 0LL, v10, a4, v11, v12);
SettingValue_GamepadAxis::refresh_wids((SettingValue_GamepadAxis *)v8, a5, 0LL, v13, v14, v15, v16);
v18[0] = v8;
std::vector<SettingValue *>::emplace_back<SettingValue *>(&values[3 * a3], v18);
v18[0] = v8;
return std::vector<SettingValue *>::emplace_back<SettingValue *>(&values_all, v18);
}
| add_gamepad_axis:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV EBP,EDX
MOV R15,RSI
MOV R12D,EDI
MOV EDI,0xe0
CALL 0x001268b0
MOV RBX,RAX
ADD RAX,0x20
MOV qword ptr [RBX + 0x10],RAX
XOR EAX,EAX
MOV qword ptr [RBX + 0x18],RAX
MOV byte ptr [RBX + 0x20],AL
LEA RCX,[RBX + 0x40]
MOV qword ptr [RBX + 0x30],RCX
MOV qword ptr [RBX + 0x38],RAX
MOV byte ptr [RBX + 0x40],AL
LEA R13,[RBX + 0x50]
LEA RCX,[RBX + 0x60]
MOV qword ptr [RBX + 0x50],RCX
MOV qword ptr [RBX + 0x58],RAX
MOV byte ptr [RBX + 0x60],AL
LEA RAX,[0x3553b8]
MOV qword ptr [RBX],RAX
MOV EAX,0x88
LAB_0016ab7b:
LEA RCX,[RBX + RAX*0x1]
MOV qword ptr [RBX + RAX*0x1 + -0x10],RCX
MOV qword ptr [RBX + RAX*0x1 + -0x8],0x0
MOV byte ptr [RBX + RAX*0x1],0x0
ADD RAX,0x20
CMP RAX,0xc8
JNZ 0x0016ab7b
MOV RAX,RBX
ADD RAX,0xc8
MOV qword ptr [RBX + 0xb8],RAX
MOV qword ptr [RBX + 0xc0],0x0
XOR EAX,EAX
MOV byte ptr [RBX + 0xc8],AL
MOV dword ptr [RBX + 0x8],0xb
MOV dword ptr [RBX + 0x74],R12D
MOV byte ptr [RBX + 0x70],AL
MOV qword ptr [RBX + 0xd8],R15
MOV R15,qword ptr [RBX + 0x58]
MOV RDI,R14
CALL 0x00126330
MOV RDI,R13
XOR ESI,ESI
MOV RDX,R15
MOV RCX,R14
MOV R8,RAX
CALL 0x00126db0
MOV RDI,RBX
CALL 0x00169340
MOV EAX,EBP
LEA RAX,[RAX + RAX*0x2]
LEA RCX,[0x35f800]
LEA RDI,[RCX + RAX*0x8]
MOV R14,RSP
MOV qword ptr [R14],RBX
MOV RSI,R14
CALL 0x0016bf28
MOV qword ptr [R14],RBX
LEA RDI,[0x35f7e8]
MOV RSI,RSP
CALL 0x0016bf28
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* settings::add_gamepad_axis(int, ConfigGamepadAxis&, settings_location, char const*) */
void settings::add_gamepad_axis(int4 param_1,int8 param_2,uint param_3,char *param_4)
{
char *pcVar1;
SettingValue_GamepadAxis *this;
long lVar2;
SettingValue_GamepadAxis *local_38;
this = (SettingValue_GamepadAxis *)operator_new(0xe0);
*(SettingValue_GamepadAxis **)(this + 0x10) = this + 0x20;
*(int8 *)(this + 0x18) = 0;
this[0x20] = (SettingValue_GamepadAxis)0x0;
*(SettingValue_GamepadAxis **)(this + 0x30) = this + 0x40;
*(int8 *)(this + 0x38) = 0;
this[0x40] = (SettingValue_GamepadAxis)0x0;
*(SettingValue_GamepadAxis **)(this + 0x50) = this + 0x60;
*(int8 *)(this + 0x58) = 0;
this[0x60] = (SettingValue_GamepadAxis)0x0;
*(int ***)this = &PTR__SettingValue_GamepadAxis_003553b8;
lVar2 = 0x88;
do {
*(SettingValue_GamepadAxis **)(this + lVar2 + -0x10) = this + lVar2;
*(int8 *)(this + lVar2 + -8) = 0;
this[lVar2] = (SettingValue_GamepadAxis)0x0;
lVar2 = lVar2 + 0x20;
} while (lVar2 != 200);
*(SettingValue_GamepadAxis **)(this + 0xb8) = this + 200;
*(int8 *)(this + 0xc0) = 0;
this[200] = (SettingValue_GamepadAxis)0x0;
*(int4 *)(this + 8) = 0xb;
*(int4 *)(this + 0x74) = param_1;
this[0x70] = (SettingValue_GamepadAxis)0x0;
*(int8 *)(this + 0xd8) = param_2;
pcVar1 = *(char **)(this + 0x58);
strlen(param_4);
std::__cxx11::string::_M_replace((ulong)(this + 0x50),0,pcVar1,(ulong)param_4);
SettingValue_GamepadAxis::refresh_wids(this);
local_38 = this;
std::vector<SettingValue*,std::allocator<SettingValue*>>::emplace_back<SettingValue*>
((vector<SettingValue*,std::allocator<SettingValue*>> *)(&values + (ulong)param_3 * 3),
(SettingValue **)&local_38);
local_38 = this;
std::vector<SettingValue*,std::allocator<SettingValue*>>::emplace_back<SettingValue*>
((vector<SettingValue*,std::allocator<SettingValue*>> *)&values_all,
(SettingValue **)&local_38);
return;
}
|
|
5,707 | settings::add_gamepad_axis(int, ConfigGamepadAxis&, settings_location, char const*) | untodesu[P]voxelius/game/client/settings.cc | void settings::add_gamepad_axis(int priority, ConfigGamepadAxis &value, settings_location location, const char *name)
{
auto setting_value = new SettingValue_GamepadAxis;
setting_value->type = setting_type::GAMEPAD_AXIS;
setting_value->priority = priority;
setting_value->has_tooltip = false;
setting_value->value = &value;
setting_value->name = name;
setting_value->refresh_wids();
values[static_cast<unsigned int>(location)].push_back(setting_value);
values_all.push_back(setting_value);
} | O2 | cpp | settings::add_gamepad_axis(int, ConfigGamepadAxis&, settings_location, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movl %edi, %r12d
movl $0xe0, %edi
callq 0x26940
movq %rax, %rbx
movq %rax, %rdi
callq 0x66066
movl $0xb, 0x8(%rbx)
movl %r12d, 0x74(%rbx)
movb $0x0, 0x70(%rbx)
movq %r15, 0xd8(%rbx)
leaq 0x50(%rbx), %rdi
movq %r14, %rsi
callq 0x271c0
movq %rbx, %rdi
callq 0x641c8
movl %ebp, %eax
imulq $0x18, %rax, %rax
leaq 0x1f1565(%rip), %rdi # 0x256860
addq %rax, %rdi
leaq 0x8(%rsp), %r14
movq %rbx, (%r14)
movq %r14, %rsi
callq 0x6667a
movq %rbx, (%r14)
leaq 0x1f1530(%rip), %rdi # 0x256848
leaq 0x8(%rsp), %rsi
callq 0x6667a
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZN8settings16add_gamepad_axisEiR17ConfigGamepadAxis17settings_locationPKc:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r14, rcx
mov ebp, edx
mov r15, rsi
mov r12d, edi
mov edi, 0E0h; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov rdi, rax; this
call _ZN24SettingValue_GamepadAxisC2Ev; SettingValue_GamepadAxis::SettingValue_GamepadAxis(void)
mov dword ptr [rbx+8], 0Bh
mov [rbx+74h], r12d
mov byte ptr [rbx+70h], 0
mov [rbx+0D8h], r15
lea rdi, [rbx+50h]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
mov rdi, rbx; this
call _ZN24SettingValue_GamepadAxis12refresh_widsEv; SettingValue_GamepadAxis::refresh_wids(void)
mov eax, ebp
imul rax, 18h
lea rdi, _ZL6values; values
add rdi, rax
lea r14, [rsp+38h+var_30]
mov [r14], rbx
mov rsi, r14
call _ZNSt6vectorIP12SettingValueSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SettingValue *>::emplace_back<SettingValue *>(SettingValue * &&)
mov [r14], rbx
lea rdi, _ZL10values_all; values_all
lea rsi, [rsp+38h+var_30]
call _ZNSt6vectorIP12SettingValueSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SettingValue *>::emplace_back<SettingValue *>(SettingValue * &&)
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long settings::add_gamepad_axis(int a1, long long a2, unsigned int a3, long long a4)
{
long long v6; // rbx
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
long long v10; // r9
_QWORD v12[6]; // [rsp+8h] [rbp-30h] BYREF
v6 = operator new(0xE0uLL);
SettingValue_GamepadAxis::SettingValue_GamepadAxis((SettingValue_GamepadAxis *)v6);
*(_DWORD *)(v6 + 8) = 11;
*(_DWORD *)(v6 + 116) = a1;
*(_BYTE *)(v6 + 112) = 0;
*(_QWORD *)(v6 + 216) = a2;
std::string::assign(v6 + 80, a4, v7, v8, v9, v10);
SettingValue_GamepadAxis::refresh_wids((SettingValue_GamepadAxis *)v6);
v12[0] = v6;
std::vector<SettingValue *>::emplace_back<SettingValue *>(&values[3 * a3], v12);
v12[0] = v6;
return std::vector<SettingValue *>::emplace_back<SettingValue *>(&values_all, v12);
}
| add_gamepad_axis:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R14,RCX
MOV EBP,EDX
MOV R15,RSI
MOV R12D,EDI
MOV EDI,0xe0
CALL 0x00126940
MOV RBX,RAX
MOV RDI,RAX
CALL 0x00166066
MOV dword ptr [RBX + 0x8],0xb
MOV dword ptr [RBX + 0x74],R12D
MOV byte ptr [RBX + 0x70],0x0
MOV qword ptr [RBX + 0xd8],R15
LEA RDI,[RBX + 0x50]
MOV RSI,R14
CALL 0x001271c0
MOV RDI,RBX
CALL 0x001641c8
MOV EAX,EBP
IMUL RAX,RAX,0x18
LEA RDI,[0x356860]
ADD RDI,RAX
LEA R14,[RSP + 0x8]
MOV qword ptr [R14],RBX
MOV RSI,R14
CALL 0x0016667a
MOV qword ptr [R14],RBX
LEA RDI,[0x356848]
LEA RSI,[RSP + 0x8]
CALL 0x0016667a
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* settings::add_gamepad_axis(int, ConfigGamepadAxis&, settings_location, char const*) */
void settings::add_gamepad_axis(int4 param_1,int8 param_2,uint param_3)
{
SettingValue_GamepadAxis *this;
SettingValue_GamepadAxis *local_30;
this = (SettingValue_GamepadAxis *)operator_new(0xe0);
SettingValue_GamepadAxis::SettingValue_GamepadAxis(this);
*(int4 *)(this + 8) = 0xb;
*(int4 *)(this + 0x74) = param_1;
this[0x70] = (SettingValue_GamepadAxis)0x0;
*(int8 *)(this + 0xd8) = param_2;
std::__cxx11::string::assign((char *)(this + 0x50));
SettingValue_GamepadAxis::refresh_wids(this);
local_30 = this;
std::vector<SettingValue*,std::allocator<SettingValue*>>::emplace_back<SettingValue*>
((vector<SettingValue*,std::allocator<SettingValue*>> *)(&values + (ulong)param_3 * 3),
(SettingValue **)&local_30);
local_30 = this;
std::vector<SettingValue*,std::allocator<SettingValue*>>::emplace_back<SettingValue*>
((vector<SettingValue*,std::allocator<SettingValue*>> *)&values_all,
(SettingValue **)&local_30);
return;
}
|
|
5,708 | httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::ci, std::allocator<std::pair<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>>>>>&) | nickolajgrishuk[P]metricz-cpp/build_O1/_deps/httplib-src/httplib.h | inline bool read_headers(Stream &strm, Headers &headers) {
const auto bufsiz = 2048;
char buf[bufsiz];
stream_line_reader line_reader(strm, buf, bufsiz);
for (;;) {
if (!line_reader.getline()) { return false; }
// Check if the line ends with CRLF.
auto line_terminator_len = 2;
if (line_reader.end_with_crlf()) {
// Blank line indicates end of headers.
if (line_reader.size() == 2) { break; }
#ifdef CPPHTTPLIB_ALLOW_LF_AS_LINE_TERMINATOR
} else {
// Blank line indicates end of headers.
if (line_reader.size() == 1) { break; }
line_terminator_len = 1;
}
#else
} else {
continue; // Skip invalid line.
} | O1 | c | httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::ci, std::allocator<std::pair<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>>>>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x858, %rsp # imm = 0x858
movq %rsi, 0x48(%rsp)
leaq 0x28(%rsp), %r14
movq %rdi, -0x20(%r14)
leaq 0x50(%rsp), %rax
movq %rax, -0x18(%r14)
movq $0x800, -0x10(%r14) # imm = 0x800
xorl %r13d, %r13d
movq %r13, -0x8(%r14)
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r13, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x7(%rsp), %r15
leaq 0x13b6c(%rip), %rbx # 0x2d0a8
movq %r13, 0x20(%rsp)
movq %r13, 0x30(%rsp)
movq 0x28(%rsp), %rax
movb $0x0, (%rax)
xorl %r12d, %r12d
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movl $0x1, %edx
movq %r15, %rsi
callq *0x20(%rax)
testq %rax, %rax
js 0x195a4
je 0x195aa
movb 0x7(%rsp), %bpl
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %r8
decq %rax
cmpq %rax, %r8
jae 0x195b4
movq 0x10(%rsp), %rax
leaq 0x1(%r8), %rcx
movq %rcx, 0x20(%rsp)
movb %bpl, (%rax,%r8)
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x195e4
xorl %ecx, %ecx
xorl %eax, %eax
jmp 0x195ee
testq %r12, %r12
setne %al
xorl %ecx, %ecx
jmp 0x195ee
movq 0x30(%rsp), %rdx
testq %rdx, %rdx
jne 0x195d8
movq 0x10(%rsp), %rcx
cmpb $0x0, (%rcx,%r8)
jne 0x1969b
movq %r14, %rdi
xorl %esi, %esi
callq 0x8870
movsbl %bpl, %esi
movq %r14, %rdi
callq 0x8480
cmpb $0xa, 0x7(%rsp)
setne %cl
movb $0x1, %al
decq %r12
testb %cl, %cl
jne 0x19551
testb %al, %al
je 0x1966d
movq 0x30(%rsp), %rax
testq %rax, %rax
movq %r14, %rcx
cmoveq 0x20(%rsp), %rax
leaq 0x10(%rsp), %rdx
cmoveq %rdx, %rcx
movl $0x3, %r12d
cmpq $0x2, %rax
jb 0x19661
movq (%rcx), %rdi
leaq (%rdi,%rax), %rsi
cmpb $0xd, -0x2(%rsi)
jne 0x19661
cmpb $0xa, -0x1(%rsi)
jne 0x19661
movl $0x2, %r12d
cmpq $0x2, %rax
je 0x19661
movl $0x1, %r12d
cmpq $0x2000, %rax # imm = 0x2000
ja 0x19661
addq $-0x2, %rsi
xorl %r12d, %r12d
movq 0x48(%rsp), %rdx
callq 0x1b117
movl %r12d, %eax
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmpq *%rax
xorl %ebx, %ebx
jmp 0x19673
movb $0x1, %bl
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x19687
callq 0x8520
movl %ebx, %eax
addq $0x858, %rsp # imm = 0x858
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x14ad1(%rip), %rdi # 0x2e173
leaq 0x13db3(%rip), %rsi # 0x2d45c
leaq 0x14af2(%rip), %rcx # 0x2e1a2
movl $0x8f8, %edx # imm = 0x8F8
callq 0x8380
jmp 0x196bc
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x196d3
callq 0x8520
movq %rbx, %rdi
callq 0x8990
nop
| _ZN7httplib6detail12read_headersERNS_6StreamERSt8multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_NS0_2ciESaISt4pairIKS9_S9_EEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 858h
mov qword ptr [rsp+888h+var_840], rsi; int
lea r14, [rsp+888h+var_860]
mov [r14-20h], rdi
lea rax, [rsp+888h+var_838]
mov [r14-18h], rax
mov qword ptr [r14-10h], 800h
xor r13d, r13d
mov [r14-8], r13
lea rax, [rsp+888h+var_850]
mov [rax-10h], rax
mov [rax-8], r13
mov byte ptr [rax], 0
lea r15, [rsp+888h+var_881]
lea rbx, jpt_1966B
loc_1953C:
mov [rsp+888h+var_868], r13; jumptable 000000000001966B cases 0,3
mov qword ptr [rsp+888h+var_858], r13; int
mov rax, [rsp+888h+var_860]
mov byte ptr [rax], 0
xor r12d, r12d
loc_19551:
mov rdi, [rsp+888h+var_880]
mov rax, [rdi]
mov edx, 1
mov rsi, r15
call qword ptr [rax+20h]
test rax, rax
js short loc_195A4
jz short loc_195AA
mov bpl, [rsp+888h+var_881]
mov rax, [rsp+888h+var_870]
mov r8, [rsp+888h+var_868]
dec rax
cmp r8, rax
jnb short loc_195B4
mov rax, qword ptr [rsp+888h+var_878]
lea rcx, [r8+1]
mov [rsp+888h+var_868], rcx
mov [rax+r8], bpl
mov rax, qword ptr [rsp+888h+var_878]
mov rcx, [rsp+888h+var_868]
mov byte ptr [rax+rcx], 0
jmp short loc_195E4
loc_195A4:
xor ecx, ecx
xor eax, eax
jmp short loc_195EE
loc_195AA:
test r12, r12
setnz al
xor ecx, ecx
jmp short loc_195EE
loc_195B4:
mov rdx, qword ptr [rsp+888h+var_858]
test rdx, rdx
jnz short loc_195D8
mov rcx, qword ptr [rsp+888h+var_878]
cmp byte ptr [rcx+r8], 0
jnz loc_1969B
mov rdi, r14
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
loc_195D8:
movsx esi, bpl
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
loc_195E4:
cmp [rsp+888h+var_881], 0Ah
setnz cl
mov al, 1
loc_195EE:
dec r12
test cl, cl
jnz loc_19551
test al, al
jz short loc_1966D; jumptable 000000000001966B case 1
mov rax, qword ptr [rsp+888h+var_858]
test rax, rax
mov rcx, r14
cmovz rax, [rsp+888h+var_868]
lea rdx, [rsp+888h+var_878]
cmovz rcx, rdx; int
mov r12d, 3
cmp rax, 2
jb short loc_19661
mov rdi, [rcx]; int
lea rsi, [rdi+rax]
cmp byte ptr [rsi-2], 0Dh
jnz short loc_19661
cmp byte ptr [rsi-1], 0Ah
jnz short loc_19661
mov r12d, 2
cmp rax, 2
jz short loc_19661
mov r12d, 1
cmp rax, 2000h
ja short loc_19661
add rsi, 0FFFFFFFFFFFFFFFEh; int
xor r12d, r12d
mov rdx, qword ptr [rsp+888h+var_840]; int
call _ZN7httplib6detail12parse_headerIZNS0_12read_headersERNS_6StreamERSt8multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_NS0_2ciESaISt4pairIKSA_SA_EEEEUlOSA_SI_E_EEbPKcSL_T_; httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream &,std::multimap<std::string,std::string,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>> &)::{lambda(std::string&&,std::string&)#1}>(char const*,char const,httplib::detail::read_headers(httplib::Stream &,std::multimap<std::string,std::string,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>> &)::{lambda(std::string&&,std::string&)#1})
loc_19661:
mov eax, r12d
movsxd rax, ds:(jpt_1966B - 2D0A8h)[rbx+rax*4]; switch 4 cases
add rax, rbx
jmp rax; switch jump
loc_1966D:
xor ebx, ebx; jumptable 000000000001966B case 1
jmp short loc_19673
loc_19671:
mov bl, 1; jumptable 000000000001966B case 2
loc_19673:
mov rdi, [rsp+888h+var_860]; void *
lea rax, [rsp+888h+var_850]
cmp rdi, rax
jz short loc_19687
call __ZdlPv; operator delete(void *)
loc_19687:
mov eax, ebx
add rsp, 858h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1969B:
lea rdi, aFixedBufferFix; "fixed_buffer_[fixed_buffer_used_size_] "...
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidHttplibDet; "void httplib::detail::stream_line_reade"...
mov edx, 8F8h
call ___assert_fail
jmp short $+2
loc_196BC:
mov rbx, rax
mov rdi, [rsp+888h+var_860]; void *
lea rax, [rsp+888h+var_850]
cmp rdi, rax
jz short loc_196D3
call __ZdlPv; operator delete(void *)
loc_196D3:
mov rdi, rbx
call __Unwind_Resume
| long long httplib::detail::read_headers(long long a1, long long a2)
{
unsigned int v2; // ebx
long long v3; // r12
long long v4; // rax
_BYTE *v5; // r8
int v6; // r9d
char v7; // bp
bool v8; // cl
bool v9; // al
char *v10; // rax
_QWORD *v11; // rcx
int v12; // r12d
char *v13; // rsi
void *v15; // [rsp+0h] [rbp-888h] BYREF
long long v16; // [rsp+8h] [rbp-880h]
int v17[2]; // [rsp+10h] [rbp-878h] BYREF
long long v18; // [rsp+18h] [rbp-870h]
void *v19; // [rsp+20h] [rbp-868h]
void *v20; // [rsp+28h] [rbp-860h] BYREF
int v21[2]; // [rsp+30h] [rbp-858h]
int v22[4]; // [rsp+38h] [rbp-850h] BYREF
int v23[2]; // [rsp+48h] [rbp-840h]
char v24; // [rsp+50h] [rbp-838h] BYREF
*(_QWORD *)v23 = a2;
v16 = a1;
*(_QWORD *)v17 = &v24;
v18 = 2048LL;
v19 = 0LL;
v20 = v22;
*(_QWORD *)v21 = 0LL;
LOBYTE(v22[0]) = 0;
while ( 2 )
{
v19 = 0LL;
*(_QWORD *)v21 = 0LL;
*(_BYTE *)v20 = 0;
v3 = 0LL;
do
{
v4 = (*(long long ( **)(long long, char *, long long))(*(_QWORD *)v16 + 32LL))(v16, (char *)&v15 + 7, 1LL);
if ( v4 < 0 )
{
v8 = 0;
v9 = 0;
}
else if ( v4 )
{
v7 = HIBYTE(v15);
v5 = v19;
if ( (unsigned long long)v19 >= v18 - 1 )
{
if ( !*(_QWORD *)v21 )
{
if ( *((_BYTE *)v19 + *(_QWORD *)v17) )
__assert_fail(
"fixed_buffer_[fixed_buffer_used_size_] == '\\0'",
"/workspace/llm4binary/github/2025_star3/nickolajgrishuk[P]metricz-cpp/build_O1/_deps/httplib-src/httplib.h",
2296LL,
"void httplib::detail::stream_line_reader::append(char)");
std::string::_M_replace(&v20, 0LL, 0LL, *(_QWORD *)v17, v19);
}
std::string::push_back(&v20, (unsigned int)v7);
}
else
{
v19 = (char *)v19 + 1;
v5[*(_QWORD *)v17] = HIBYTE(v15);
*((_BYTE *)v19 + *(_QWORD *)v17) = 0;
}
v8 = HIBYTE(v15) != 10;
v9 = 1;
}
else
{
v9 = v3 != 0;
v8 = 0;
}
--v3;
}
while ( v8 );
if ( v9 )
{
v10 = *(char **)v21;
v11 = &v20;
if ( !*(_QWORD *)v21 )
{
v10 = (char *)v19;
v11 = v17;
}
v12 = 3;
if ( (unsigned long long)v10 >= 2 )
{
v13 = &v10[*v11];
if ( *(v13 - 2) == 13 && *(v13 - 1) == 10 )
{
v12 = 2;
if ( v10 != (_BYTE *)&dword_0 + 2 )
{
v12 = 1;
if ( (unsigned long long)v10 <= 0x2000 )
{
v12 = 0;
httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream &,std::multimap<std::string,std::string,httplib::detail::ci,std::allocator<std::pair<std::string const,std::string>>> &)::{lambda(std::string&&,std::string&)#1}>(
*v11,
(_DWORD)v13 - 2,
v23[0],
(int)v11,
(int)v5,
v6,
v15,
v16,
v17[0],
v18,
v19,
(int)v20,
v21[0],
v22[0],
v22[2],
v23[0],
v24);
}
}
}
}
switch ( v12 )
{
case 0:
case 3:
continue;
case 1:
goto LABEL_25;
case 2:
LOBYTE(v2) = 1;
goto LABEL_27;
}
}
break;
}
LABEL_25:
v2 = 0;
LABEL_27:
if ( v20 != v22 )
operator delete(v20);
return v2;
}
| read_headers:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x858
MOV qword ptr [RSP + 0x48],RSI
LEA R14,[RSP + 0x28]
MOV qword ptr [R14 + -0x20],RDI
LEA RAX,[RSP + 0x50]
MOV qword ptr [R14 + -0x18],RAX
MOV qword ptr [R14 + -0x10],0x800
XOR R13D,R13D
MOV qword ptr [R14 + -0x8],R13
LEA RAX,[RSP + 0x38]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],R13
MOV byte ptr [RAX],0x0
LEA R15,[RSP + 0x7]
LEA RBX,[0x12d0a8]
LAB_0011953c:
MOV qword ptr [RSP + 0x20],R13
MOV qword ptr [RSP + 0x30],R13
MOV RAX,qword ptr [RSP + 0x28]
MOV byte ptr [RAX],0x0
XOR R12D,R12D
LAB_00119551:
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RDI]
LAB_00119559:
MOV EDX,0x1
MOV RSI,R15
CALL qword ptr [RAX + 0x20]
TEST RAX,RAX
JS 0x001195a4
JZ 0x001195aa
MOV BPL,byte ptr [RSP + 0x7]
MOV RAX,qword ptr [RSP + 0x18]
MOV R8,qword ptr [RSP + 0x20]
DEC RAX
CMP R8,RAX
JNC 0x001195b4
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[R8 + 0x1]
MOV qword ptr [RSP + 0x20],RCX
MOV byte ptr [RAX + R8*0x1],BPL
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x20]
MOV byte ptr [RAX + RCX*0x1],0x0
JMP 0x001195e4
LAB_001195a4:
XOR ECX,ECX
XOR EAX,EAX
JMP 0x001195ee
LAB_001195aa:
TEST R12,R12
SETNZ AL
XOR ECX,ECX
JMP 0x001195ee
LAB_001195b4:
MOV RDX,qword ptr [RSP + 0x30]
TEST RDX,RDX
JNZ 0x001195d8
MOV RCX,qword ptr [RSP + 0x10]
CMP byte ptr [RCX + R8*0x1],0x0
JNZ 0x0011969b
MOV RDI,R14
XOR ESI,ESI
CALL 0x00108870
LAB_001195d8:
MOVSX ESI,BPL
MOV RDI,R14
CALL 0x00108480
LAB_001195e4:
CMP byte ptr [RSP + 0x7],0xa
SETNZ CL
MOV AL,0x1
LAB_001195ee:
DEC R12
TEST CL,CL
JNZ 0x00119551
TEST AL,AL
JZ 0x0011966d
MOV RAX,qword ptr [RSP + 0x30]
TEST RAX,RAX
MOV RCX,R14
CMOVZ RAX,qword ptr [RSP + 0x20]
LEA RDX,[RSP + 0x10]
CMOVZ RCX,RDX
MOV R12D,0x3
CMP RAX,0x2
JC 0x00119661
MOV RDI,qword ptr [RCX]
LEA RSI,[RDI + RAX*0x1]
CMP byte ptr [RSI + -0x2],0xd
JNZ 0x00119661
CMP byte ptr [RSI + -0x1],0xa
JNZ 0x00119661
MOV R12D,0x2
CMP RAX,0x2
JZ 0x00119661
MOV R12D,0x1
CMP RAX,0x2000
JA 0x00119661
ADD RSI,-0x2
XOR R12D,R12D
LAB_00119657:
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x0011b117
LAB_00119661:
MOV EAX,R12D
MOVSXD RAX,dword ptr [RBX + RAX*0x4]
ADD RAX,RBX
JMP RAX
LAB_0011966d:
XOR EBX,EBX
JMP 0x00119673
LAB_00119673:
MOV RDI,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x38]
CMP RDI,RAX
JZ 0x00119687
CALL 0x00108520
LAB_00119687:
MOV EAX,EBX
ADD RSP,0x858
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011969b:
LEA RDI,[0x12e173]
LEA RSI,[0x12d45c]
LEA RCX,[0x12e1a2]
MOV EDX,0x8f8
CALL 0x00108380
|
/* httplib::detail::read_headers(httplib::Stream&, std::multimap<std::__cxx11::string,
std::__cxx11::string, httplib::detail::ci, std::allocator<std::pair<std::__cxx11::string const,
std::__cxx11::string > > >&) */
int8 httplib::detail::read_headers(Stream *param_1,multimap *param_2)
{
int1 *puVar1;
long lVar2;
ulong uVar3;
int8 uVar4;
int1 **ppuVar5;
long lVar6;
bool bVar7;
bool bVar8;
char local_881;
Stream *local_880;
int1 *local_878;
long local_870;
ulong local_868;
int1 *local_860;
ulong local_858;
int1 local_850 [16];
multimap *local_840;
int1 local_838 [2056];
local_878 = local_838;
local_870 = 0x800;
local_860 = local_850;
local_868 = 0;
local_858 = 0;
local_850[0] = 0;
lVar6 = 0;
local_880 = param_1;
local_840 = param_2;
do {
/* try { // try from 00119559 to 001195e3 has its CatchHandler @ 001196bc */
lVar2 = (**(code **)(*(long *)local_880 + 0x20))(local_880,&local_881,1);
uVar3 = local_868;
if (lVar2 < 0) {
bVar8 = false;
bVar7 = false;
}
else if (lVar2 == 0) {
bVar7 = lVar6 != 0;
bVar8 = false;
}
else {
if (local_868 < local_870 - 1U) {
local_868 = local_868 + 1;
local_878[uVar3] = local_881;
local_878[local_868] = 0;
}
else {
if (local_858 == 0) {
if (local_878[local_868] != '\0') {
/* WARNING: Subroutine does not return */
__assert_fail("fixed_buffer_[fixed_buffer_used_size_] == \'\\0\'",
"/workspace/llm4binary/github/2025_star3/nickolajgrishuk[P]metricz-cpp/build_O1/_deps/httplib-src/httplib.h"
,0x8f8,"void httplib::detail::stream_line_reader::append(char)");
}
std::__cxx11::string::_M_replace((ulong)&local_860,0,(char *)0x0,(ulong)local_878);
}
std::__cxx11::string::push_back((char)&local_860);
}
bVar8 = local_881 != '\n';
bVar7 = true;
}
lVar6 = lVar6 + -1;
} while (bVar8);
if (bVar7) {
uVar3 = local_858;
if (local_858 == 0) {
uVar3 = local_868;
}
ppuVar5 = &local_860;
if (local_858 == 0) {
ppuVar5 = &local_878;
}
lVar6 = 3;
if (1 < uVar3) {
puVar1 = *ppuVar5;
if ((((puVar1[uVar3 - 2] == '\r') && (puVar1[uVar3 - 1] == '\n')) && (lVar6 = 2, uVar3 != 2))
&& (lVar6 = 1, uVar3 < 0x2001)) {
lVar6 = 0;
/* try { // try from 00119657 to 00119660 has its CatchHandler @ 001196ba */
parse_header<httplib::detail::read_headers(httplib::Stream&,std::multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::ci,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>&)::_lambda(std::__cxx11::string&&,std::__cxx11::string&&)_1_>
(puVar1,puVar1 + (uVar3 - 2),local_840);
}
}
/* WARNING: Could not recover jumptable at 0x0011966b. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar4 = (*(code *)((long)&DAT_0012d0a8 + (long)(int)(&DAT_0012d0a8)[lVar6]))();
return uVar4;
}
if (local_860 != local_850) {
operator_delete(local_860);
}
return 0;
}
|
|
5,709 | findPeaks::_peak_heights(std::vector<double, std::allocator<double>> const&, std::vector<findPeaks::lmr_peak_index_t, std::allocator<findPeaks::lmr_peak_index_t>> const&) | giladroyz[P]FindPeaks/src/cpp/find_peaks.cpp | std::vector<double> _peak_heights(const std::vector<double> &x,
const std::vector<lmr_peak_index_t> &peaks) {
std::vector<double> heights;
for (size_t p = 0; p < peaks.size(); p++)
heights.push_back(x[peaks[p].mid_point]);
return heights;
} | O1 | cpp | findPeaks::_peak_heights(std::vector<double, std::allocator<double>> const&, std::vector<findPeaks::lmr_peak_index_t, std::allocator<findPeaks::lmr_peak_index_t>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rax
cmpq %rax, 0x8(%rdx)
je 0x3d56f
movq %rdx, %r14
movq %rsi, %r15
movl $0x8, %r12d
xorl %r13d, %r13d
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
movq (%rax,%r12), %rdx
shlq $0x3, %rdx
addq (%r15), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3d549
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3d551
movq %rbx, %rdi
callq 0x3f79a
incq %r13
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %rbp, %rcx
addq $0x18, %r12
cmpq %rcx, %r13
jb 0x3d522
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3d591
callq 0x8470
movq %r14, %rdi
callq 0x8990
| _ZN9findPeaks13_peak_heightsERKSt6vectorIdSaIdEERKS0_INS_16lmr_peak_index_tESaIS5_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rax, [rdx]
cmp [rdx+8], rax
jz short loc_3D56F
mov r14, rdx
mov r15, rsi
mov r12d, 8
xor r13d, r13d
mov rbp, 0AAAAAAAAAAAAAAABh
loc_3D522:
mov rdx, [rax+r12]
shl rdx, 3
add rdx, [r15]
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_3D549
movsd xmm0, qword ptr [rdx]
movsd qword ptr [rsi], xmm0
add rsi, 8
mov [rbx+8], rsi
jmp short loc_3D551
loc_3D549:
mov rdi, rbx
call _ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_; std::vector<double>::_M_realloc_insert<double const&>(__gnu_cxx::__normal_iterator<double *,std::vector<double>>,double const&)
loc_3D551:
inc r13
mov rax, [r14]
mov rcx, [r14+8]
sub rcx, rax
sar rcx, 3
imul rcx, rbp
add r12, 18h
cmp r13, rcx
jb short loc_3D522
loc_3D56F:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_3D591
call __ZdlPv; operator delete(void *)
loc_3D591:
mov rdi, r14
call __Unwind_Resume
| long long findPeaks::_peak_heights(long long a1, _QWORD *a2, long long *a3)
{
long long v3; // rax
long long v6; // r12
unsigned long long v7; // r13
_QWORD *v8; // rdx
_QWORD *v9; // rsi
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v3 = *a3;
if ( a3[1] != *a3 )
{
v6 = 8LL;
v7 = 0LL;
do
{
v8 = (_QWORD *)(*a2 + 8LL * *(_QWORD *)(v3 + v6));
v9 = *(_QWORD **)(a1 + 8);
if ( v9 == *(_QWORD **)(a1 + 16) )
{
std::vector<double>::_M_realloc_insert<double const&>(a1, v9, v8);
}
else
{
*v9 = *v8;
*(_QWORD *)(a1 + 8) = v9 + 1;
}
++v7;
v3 = *a3;
v6 += 24LL;
}
while ( v7 < 0xAAAAAAAAAAAAAAABLL * ((a3[1] - *a3) >> 3) );
}
return a1;
}
| _peak_heights:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RDX]
CMP qword ptr [RDX + 0x8],RAX
JZ 0x0013d56f
MOV R14,RDX
MOV R15,RSI
MOV R12D,0x8
XOR R13D,R13D
MOV RBP,-0x5555555555555555
LAB_0013d522:
MOV RDX,qword ptr [RAX + R12*0x1]
SHL RDX,0x3
ADD RDX,qword ptr [R15]
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x0013d549
MOVSD XMM0,qword ptr [RDX]
MOVSD qword ptr [RSI],XMM0
ADD RSI,0x8
MOV qword ptr [RBX + 0x8],RSI
JMP 0x0013d551
LAB_0013d549:
MOV RDI,RBX
CALL 0x0013f79a
LAB_0013d551:
INC R13
MOV RAX,qword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
SUB RCX,RAX
SAR RCX,0x3
IMUL RCX,RBP
ADD R12,0x18
CMP R13,RCX
JC 0x0013d522
LAB_0013d56f:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* findPeaks::_peak_heights(std::vector<double, std::allocator<double> > const&,
std::vector<findPeaks::lmr_peak_index_t, std::allocator<findPeaks::lmr_peak_index_t> > const&) */
findPeaks * __thiscall findPeaks::_peak_heights(findPeaks *this,vector *param_1,vector *param_2)
{
int8 *puVar1;
long lVar2;
long lVar3;
ulong uVar4;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
lVar2 = *(long *)param_2;
if (*(long *)(param_2 + 8) != lVar2) {
lVar3 = 8;
uVar4 = 0;
do {
puVar1 = *(int8 **)(this + 8);
if (puVar1 == *(int8 **)(this + 0x10)) {
/* try { // try from 0013d549 to 0013d550 has its CatchHandler @ 0013d581 */
std::vector<double,std::allocator<double>>::_M_realloc_insert<double_const&>
((vector<double,std::allocator<double>> *)this);
}
else {
*puVar1 = *(int8 *)(*(long *)(lVar2 + lVar3) * 8 + *(long *)param_1);
*(int8 **)(this + 8) = puVar1 + 1;
}
uVar4 = uVar4 + 1;
lVar2 = *(long *)param_2;
lVar3 = lVar3 + 0x18;
} while (uVar4 < (ulong)((*(long *)(param_2 + 8) - lVar2 >> 3) * -0x5555555555555555));
}
return this;
}
|
|
5,710 | mi_search_first | eloqsql/storage/myisam/mi_search.c | int _mi_search_first(register MI_INFO *info, register MI_KEYDEF *keyinfo,
register my_off_t pos)
{
uint nod_flag;
uchar *page;
DBUG_ENTER("_mi_search_first");
if (pos == HA_OFFSET_ERROR)
{
my_errno=HA_ERR_KEY_NOT_FOUND;
info->lastpos= HA_OFFSET_ERROR;
DBUG_RETURN(-1);
}
do
{
if (!_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff,0))
{
info->lastpos= HA_OFFSET_ERROR;
DBUG_RETURN(-1);
}
nod_flag=mi_test_if_nod(info->buff);
page=info->buff+2+nod_flag;
} while ((pos=_mi_kpos(nod_flag,page)) != HA_OFFSET_ERROR);
if (!(info->lastkey_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,
info->lastkey)))
DBUG_RETURN(-1); /* Crashed */
info->int_keypos=page; info->int_maxpos=info->buff+mi_getint(info->buff)-1;
info->int_nod_flag=nod_flag;
info->int_keytree_version=keyinfo->version;
info->last_search_keypage=info->last_keypage;
info->page_changed=info->buff_used=0;
info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length);
DBUG_PRINT("exit",("found key at %lu", (ulong) info->lastpos));
DBUG_RETURN(0);
} | O0 | c | mi_search_first:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
jne 0xc72b1
callq 0xfea30
movl $0x78, (%rax)
movq -0x10(%rbp), %rax
movq $-0x1, 0x170(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc7483
jmp 0xc72b3
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x100(%rax), %r8
movl $0x3, %ecx
xorl %r9d, %r9d
callq 0xc2fa0
cmpq $0x0, %rax
jne 0xc72f8
movq -0x10(%rbp), %rax
movq $-0x1, 0x170(%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc7483
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xc7322
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0xc7329
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0xc7329
movl -0x34(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rax
addq $0x2, %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %edi
movq -0x30(%rbp), %rsi
callq 0xc3f10
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rax
jne 0xc72b3
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x10(%rbp), %rcx
movq 0x108(%rcx), %rcx
leaq -0x30(%rbp), %rdx
callq *%rax
movq -0x10(%rbp), %rcx
movl %eax, 0x1d8(%rcx)
cmpl $0x0, %eax
jne 0xc739f
jmp 0xc7393
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc7483
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x128(%rax)
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x100(%rax), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x10(%rbp), %rdx
movq 0x100(%rdx), %rdx
movzbl (%rdx), %edx
movzwl %dx, %edx
shll $0x8, %edx
orl %edx, %eax
movzwl %ax, %eax
andl $0x7fff, %eax # imm = 0x7FFF
movl %eax, %eax
addq %rax, %rcx
addq $-0x1, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x130(%rax)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x138(%rax)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x13c(%rax)
movq -0x10(%rbp), %rax
movq 0x190(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x198(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x33d(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x33c(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdx
movq -0x10(%rbp), %rax
movl 0x1d8(%rax), %eax
addq %rax, %rdx
xorl %esi, %esi
callq 0xc4190
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x170(%rax)
jmp 0xc747a
jmp 0xc747c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _mi_search_first:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jnz short loc_C72B1
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
mov rax, [rbp+var_10]
mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_C7483
loc_C72B1:
jmp short $+2
loc_C72B3:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_10]
mov r8, [rax+100h]
mov ecx, 3
xor r9d, r9d
call _mi_fetch_keypage
cmp rax, 0
jnz short loc_C72F8
mov rax, [rbp+var_10]
mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_C7483
loc_C72F8:
mov rax, [rbp+var_10]
mov rax, [rax+100h]
movzx eax, byte ptr [rax]
and eax, 80h
cmp eax, 0
jz short loc_C7322
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+17Ch]
mov [rbp+var_34], eax
jmp short loc_C7329
loc_C7322:
xor eax, eax
mov [rbp+var_34], eax
jmp short $+2
loc_C7329:
mov eax, [rbp+var_34]
mov [rbp+var_24], eax
mov rax, [rbp+var_10]
mov rax, [rax+100h]
add rax, 2
mov ecx, [rbp+var_24]
add rax, rcx
mov [rbp+var_30], rax
mov edi, [rbp+var_24]
mov rsi, [rbp+var_30]
call _mi_kpos
mov [rbp+var_20], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz loc_C72B3
mov rax, [rbp+var_18]
mov rax, [rax+48h]
mov rdi, [rbp+var_18]
mov esi, [rbp+var_24]
mov rcx, [rbp+var_10]
mov rcx, [rcx+108h]
lea rdx, [rbp+var_30]
call rax
mov rcx, [rbp+var_10]
mov [rcx+1D8h], eax
cmp eax, 0
jnz short loc_C739F
jmp short $+2
loc_C7393:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_C7483
loc_C739F:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax+128h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+100h]
mov rax, [rbp+var_10]
mov rax, [rax+100h]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rdx, [rbp+var_10]
mov rdx, [rdx+100h]
movzx edx, byte ptr [rdx]
movzx edx, dx
shl edx, 8
or eax, edx
movzx eax, ax
and eax, 7FFFh
mov eax, eax
add rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_10]
mov [rax+130h], rcx
mov ecx, [rbp+var_24]
mov rax, [rbp+var_10]
mov [rax+138h], ecx
mov rax, [rbp+var_18]
mov ecx, [rax+1Ch]
mov rax, [rbp+var_10]
mov [rax+13Ch], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+190h]
mov rax, [rbp+var_10]
mov [rax+198h], rcx
mov rax, [rbp+var_10]
mov byte ptr [rax+33Dh], 0
mov rax, [rbp+var_10]
mov byte ptr [rax+33Ch], 0
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rdx, [rax+108h]
mov rax, [rbp+var_10]
mov eax, [rax+1D8h]
add rdx, rax
xor esi, esi
call _mi_dpos
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+170h], rcx
jmp short $+2
loc_C747A:
jmp short $+2
loc_C747C:
mov [rbp+var_4], 0
loc_C7483:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long mi_search_first(_QWORD *a1, const char *a2, long long a3)
{
int v3; // eax
long long v4; // rax
unsigned int v6; // [rsp+Ch] [rbp-34h]
long long v7; // [rsp+10h] [rbp-30h] BYREF
unsigned int v8; // [rsp+1Ch] [rbp-24h]
long long v9; // [rsp+20h] [rbp-20h]
const char *v10; // [rsp+28h] [rbp-18h]
_QWORD *v11; // [rsp+30h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
if ( a3 == -1 )
{
*(_DWORD *)my_thread_var(a1, a2) = 120;
v11[46] = -1LL;
return (unsigned int)-1;
}
else
{
do
{
if ( !mi_fetch_keypage(v11, (long long)v10, v9, 3, v11[32], 0) )
{
v11[46] = -1LL;
return (unsigned int)-1;
}
if ( (*(_BYTE *)v11[32] & 0x80) != 0 )
v6 = *(_DWORD *)(*v11 + 380LL);
else
v6 = 0;
v8 = v6;
v7 = v6 + v11[32] + 2LL;
v9 = mi_kpos(v6, v7);
}
while ( v9 != -1 );
v3 = (*((long long ( **)(const char *, _QWORD, long long *, _QWORD))v10 + 9))(v10, v8, &v7, v11[33]);
*((_DWORD *)v11 + 118) = v3;
if ( v3 )
{
v11[37] = v7;
v11[38] = (_byteswap_ushort(*(_WORD *)v11[32]) & 0x7FFF) + v11[32] - 1LL;
*((_DWORD *)v11 + 78) = v8;
*((_DWORD *)v11 + 79) = *((_DWORD *)v10 + 7);
v11[51] = v11[50];
*((_BYTE *)v11 + 829) = 0;
*((_BYTE *)v11 + 828) = 0;
v4 = mi_dpos((long long)v11, 0, *((unsigned int *)v11 + 118) + v11[33]);
v11[46] = v4;
return 0;
}
else
{
return (unsigned int)-1;
}
}
}
| _mi_search_first:
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
CMP qword ptr [RBP + -0x20],-0x1
JNZ 0x001c72b1
CALL 0x001fea30
MOV dword ptr [RAX],0x78
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],-0x1
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c7483
LAB_001c72b1:
JMP 0x001c72b3
LAB_001c72b3:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x100]
MOV ECX,0x3
XOR R9D,R9D
CALL 0x001c2fa0
CMP RAX,0x0
JNZ 0x001c72f8
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],-0x1
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c7483
LAB_001c72f8:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001c7322
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x17c]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001c7329
LAB_001c7322:
XOR EAX,EAX
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001c7329
LAB_001c7329:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100]
ADD RAX,0x2
MOV ECX,dword ptr [RBP + -0x24]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x001c3f10
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,-0x1
JNZ 0x001c72b3
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x48]
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x108]
LEA RDX,[RBP + -0x30]
CALL RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV dword ptr [RCX + 0x1d8],EAX
CMP EAX,0x0
JNZ 0x001c739f
JMP 0x001c7393
LAB_001c7393:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001c7483
LAB_001c739f:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x128],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x100]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RDX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RDX + 0x100]
MOVZX EDX,byte ptr [RDX]
MOVZX EDX,DX
SHL EDX,0x8
OR EAX,EDX
MOVZX EAX,AX
AND EAX,0x7fff
MOV EAX,EAX
ADD RCX,RAX
ADD RCX,-0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x130],RCX
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x138],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x13c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x190]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x198],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33d],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33c],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x108]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1d8]
ADD RDX,RAX
XOR ESI,ESI
CALL 0x001c4190
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x170],RCX
JMP 0x001c747a
LAB_001c747a:
JMP 0x001c747c
LAB_001c747c:
MOV dword ptr [RBP + -0x4],0x0
LAB_001c7483:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 _mi_search_first(long *param_1,long param_2,long param_3)
{
int iVar1;
int4 *puVar2;
long lVar3;
uint local_3c;
long local_38;
uint local_2c;
long local_28;
long local_20;
long *local_18;
int4 local_c;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if (param_3 == -1) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x78;
local_18[0x2e] = -1;
local_c = 0xffffffff;
}
else {
do {
lVar3 = _mi_fetch_keypage(local_18,local_20,local_28,3,local_18[0x20],0);
if (lVar3 == 0) {
local_18[0x2e] = -1;
return 0xffffffff;
}
if ((*(byte *)local_18[0x20] & 0x80) == 0) {
local_3c = 0;
}
else {
local_3c = *(uint *)(*local_18 + 0x17c);
}
local_2c = local_3c;
local_38 = local_18[0x20] + 2 + (ulong)local_3c;
local_28 = _mi_kpos(local_3c,local_38);
} while (local_28 != -1);
iVar1 = (**(code **)(local_20 + 0x48))(local_20,local_2c,&local_38,local_18[0x21]);
*(int *)(local_18 + 0x3b) = iVar1;
if (iVar1 == 0) {
local_c = 0xffffffff;
}
else {
local_18[0x25] = local_38;
local_18[0x26] =
local_18[0x20] +
(ulong)((uint)*(byte *)(local_18[0x20] + 1) | (*(byte *)local_18[0x20] & 0x7f) << 8) + -1
;
*(uint *)(local_18 + 0x27) = local_2c;
*(int4 *)((long)local_18 + 0x13c) = *(int4 *)(local_20 + 0x1c);
local_18[0x33] = local_18[0x32];
*(int1 *)((long)local_18 + 0x33d) = 0;
*(int1 *)((long)local_18 + 0x33c) = 0;
lVar3 = _mi_dpos(local_18,0,local_18[0x21] + (ulong)*(uint *)(local_18 + 0x3b));
local_18[0x2e] = lVar3;
local_c = 0;
}
}
return local_c;
}
|
|
5,711 | mi_search_first | eloqsql/storage/myisam/mi_search.c | int _mi_search_first(register MI_INFO *info, register MI_KEYDEF *keyinfo,
register my_off_t pos)
{
uint nod_flag;
uchar *page;
DBUG_ENTER("_mi_search_first");
if (pos == HA_OFFSET_ERROR)
{
my_errno=HA_ERR_KEY_NOT_FOUND;
info->lastpos= HA_OFFSET_ERROR;
DBUG_RETURN(-1);
}
do
{
if (!_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff,0))
{
info->lastpos= HA_OFFSET_ERROR;
DBUG_RETURN(-1);
}
nod_flag=mi_test_if_nod(info->buff);
page=info->buff+2+nod_flag;
} while ((pos=_mi_kpos(nod_flag,page)) != HA_OFFSET_ERROR);
if (!(info->lastkey_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,
info->lastkey)))
DBUG_RETURN(-1); /* Crashed */
info->int_keypos=page; info->int_maxpos=info->buff+mi_getint(info->buff)-1;
info->int_nod_flag=nod_flag;
info->int_keytree_version=keyinfo->version;
info->last_search_keypage=info->last_keypage;
info->page_changed=info->buff_used=0;
info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length);
DBUG_PRINT("exit",("found key at %lu", (ulong) info->lastpos));
DBUG_RETURN(0);
} | O3 | c | mi_search_first:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpq $-0x1, %rdx
je 0x8b313
movq %rdx, %rax
movq %rsi, %r14
movq 0x100(%rbx), %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
movl $0x3, %ecx
movq %r12, %r8
xorl %r9d, %r9d
callq 0x88eb4
testq %rax, %rax
je 0x8b31e
movq 0x100(%rbx), %r12
xorl %r15d, %r15d
cmpb $0x0, (%r12)
jns 0x8b264
movq (%rbx), %rax
movl 0x17c(%rax), %r15d
movl %r15d, %eax
leaq (%r12,%rax), %rsi
addq $0x2, %rsi
movq %rsi, -0x28(%rbp)
movl %r15d, %edi
callq 0x8982e
cmpq $-0x1, %rax
jne 0x8b227
movq 0x108(%rbx), %rcx
leaq -0x28(%rbp), %rdx
movq %r14, %rdi
movl %r15d, %esi
callq *0x48(%r14)
movl %eax, 0x1d8(%rbx)
testl %eax, %eax
je 0x8b342
movq -0x28(%rbp), %rcx
movq %rcx, 0x128(%rbx)
movq 0x100(%rbx), %rcx
movq 0x190(%rbx), %rdx
movzbl 0x1(%rcx), %esi
movzbl (%rcx), %edi
andl $0x7f, %edi
shll $0x8, %edi
orq %rsi, %rdi
addq %rdi, %rcx
decq %rcx
movq %rcx, 0x130(%rbx)
movl %r15d, 0x138(%rbx)
movl 0x1c(%r14), %ecx
movl %ecx, 0x13c(%rbx)
movq %rdx, 0x198(%rbx)
movw $0x0, 0x33c(%rbx)
movl %eax, %edx
addq 0x108(%rbx), %rdx
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8990d
jmp 0x8b32b
callq 0xa8dda
movl $0x78, (%rax)
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movq $-0x1, %rax
movq %rax, 0x170(%rbx)
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x8b332
| _mi_search_first:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rdi
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz loc_8B313
mov rax, rdx
mov r14, rsi
mov r12, [rbx+100h]
loc_8B227:
mov rdi, rbx
mov rsi, r14
mov rdx, rax
mov ecx, 3
mov r8, r12
xor r9d, r9d
call _mi_fetch_keypage
test rax, rax
jz loc_8B31E
mov r12, [rbx+100h]
xor r15d, r15d
cmp byte ptr [r12], 0
jns short loc_8B264
mov rax, [rbx]
mov r15d, [rax+17Ch]
loc_8B264:
mov eax, r15d
lea rsi, [r12+rax]
add rsi, 2
mov [rbp+var_28], rsi
mov edi, r15d
call _mi_kpos
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_8B227
mov rcx, [rbx+108h]
lea rdx, [rbp+var_28]
mov rdi, r14
mov esi, r15d
call qword ptr [r14+48h]
mov [rbx+1D8h], eax
test eax, eax
jz loc_8B342
mov rcx, [rbp+var_28]
mov [rbx+128h], rcx
mov rcx, [rbx+100h]
mov rdx, [rbx+190h]
movzx esi, byte ptr [rcx+1]
movzx edi, byte ptr [rcx]
and edi, 7Fh
shl edi, 8
or rdi, rsi
add rcx, rdi
dec rcx
mov [rbx+130h], rcx
mov [rbx+138h], r15d
mov ecx, [r14+1Ch]
mov [rbx+13Ch], ecx
mov [rbx+198h], rdx
mov word ptr [rbx+33Ch], 0
mov edx, eax
add rdx, [rbx+108h]
xor r14d, r14d
mov rdi, rbx
xor esi, esi
call _mi_dpos
jmp short loc_8B32B
loc_8B313:
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
loc_8B31E:
mov r14d, 0FFFFFFFFh
mov rax, 0FFFFFFFFFFFFFFFFh
loc_8B32B:
mov [rbx+170h], rax
loc_8B332:
mov eax, r14d
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_8B342:
mov r14d, 0FFFFFFFFh
jmp short loc_8B332
| long long mi_search_first(long long *a1, long long a2, unsigned long long a3)
{
unsigned long long v3; // rax
char *v4; // r12
unsigned int v5; // r15d
unsigned int v6; // eax
long long v7; // rdx
unsigned int v8; // r14d
unsigned long long v9; // rax
char *v11; // [rsp+8h] [rbp-28h] BYREF
if ( a3 == -1LL )
{
*(_DWORD *)my_thread_var(a1, (const char *)a2) = 120;
}
else
{
v3 = a3;
while ( mi_fetch_keypage(a1, a2, v3) )
{
v4 = (char *)a1[32];
v5 = 0;
if ( *v4 < 0 )
v5 = *(_DWORD *)(*a1 + 380);
v11 = &v4[v5 + 2];
v3 = mi_kpos(v5, (long long)v11);
if ( v3 == -1LL )
{
v6 = (*(long long ( **)(long long, _QWORD, char **, long long))(a2 + 72))(a2, v5, &v11, a1[33]);
*((_DWORD *)a1 + 118) = v6;
if ( v6 )
{
a1[37] = (long long)v11;
v7 = a1[50];
a1[38] = (*(unsigned __int8 *)(a1[32] + 1) | (unsigned long long)((unsigned __int8)(*(_BYTE *)a1[32] & 0x7F) << 8))
+ a1[32]
- 1;
*((_DWORD *)a1 + 78) = v5;
*((_DWORD *)a1 + 79) = *(_DWORD *)(a2 + 28);
a1[51] = v7;
*((_WORD *)a1 + 414) = 0;
v8 = 0;
v9 = mi_dpos(a1, 0, a1[33] + v6);
goto LABEL_11;
}
return (unsigned int)-1;
}
}
}
v8 = -1;
v9 = -1LL;
LABEL_11:
a1[46] = v9;
return v8;
}
| _mi_search_first:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
CMP RDX,-0x1
JZ 0x0018b313
MOV RAX,RDX
MOV R14,RSI
MOV R12,qword ptr [RBX + 0x100]
LAB_0018b227:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RAX
MOV ECX,0x3
MOV R8,R12
XOR R9D,R9D
CALL 0x00188eb4
TEST RAX,RAX
JZ 0x0018b31e
MOV R12,qword ptr [RBX + 0x100]
XOR R15D,R15D
CMP byte ptr [R12],0x0
JNS 0x0018b264
MOV RAX,qword ptr [RBX]
MOV R15D,dword ptr [RAX + 0x17c]
LAB_0018b264:
MOV EAX,R15D
LEA RSI,[R12 + RAX*0x1]
ADD RSI,0x2
MOV qword ptr [RBP + -0x28],RSI
MOV EDI,R15D
CALL 0x0018982e
CMP RAX,-0x1
JNZ 0x0018b227
MOV RCX,qword ptr [RBX + 0x108]
LEA RDX,[RBP + -0x28]
MOV RDI,R14
MOV ESI,R15D
CALL qword ptr [R14 + 0x48]
MOV dword ptr [RBX + 0x1d8],EAX
TEST EAX,EAX
JZ 0x0018b342
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RBX + 0x128],RCX
MOV RCX,qword ptr [RBX + 0x100]
MOV RDX,qword ptr [RBX + 0x190]
MOVZX ESI,byte ptr [RCX + 0x1]
MOVZX EDI,byte ptr [RCX]
AND EDI,0x7f
SHL EDI,0x8
OR RDI,RSI
ADD RCX,RDI
DEC RCX
MOV qword ptr [RBX + 0x130],RCX
MOV dword ptr [RBX + 0x138],R15D
MOV ECX,dword ptr [R14 + 0x1c]
MOV dword ptr [RBX + 0x13c],ECX
MOV qword ptr [RBX + 0x198],RDX
MOV word ptr [RBX + 0x33c],0x0
MOV EDX,EAX
ADD RDX,qword ptr [RBX + 0x108]
XOR R14D,R14D
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0018990d
JMP 0x0018b32b
LAB_0018b313:
CALL 0x001a8dda
MOV dword ptr [RAX],0x78
LAB_0018b31e:
MOV R14D,0xffffffff
MOV RAX,-0x1
LAB_0018b32b:
MOV qword ptr [RBX + 0x170],RAX
LAB_0018b332:
MOV EAX,R14D
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0018b342:
MOV R14D,0xffffffff
JMP 0x0018b332
|
int8 _mi_search_first(long *param_1,long param_2,long param_3)
{
byte *pbVar1;
uint uVar2;
long lVar3;
int4 *puVar4;
char *pcVar5;
int8 uVar6;
ulong uVar7;
char *local_30;
if (param_3 == -1) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x78;
LAB_0018b31e:
uVar6 = 0xffffffff;
lVar3 = -1;
}
else {
pcVar5 = (char *)param_1[0x20];
do {
lVar3 = _mi_fetch_keypage(param_1,param_2,param_3,3,pcVar5,0);
if (lVar3 == 0) goto LAB_0018b31e;
pcVar5 = (char *)param_1[0x20];
uVar7 = 0;
if (*pcVar5 < '\0') {
uVar7 = (ulong)*(uint *)(*param_1 + 0x17c);
}
local_30 = pcVar5 + uVar7 + 2;
param_3 = _mi_kpos(uVar7);
} while (param_3 != -1);
uVar2 = (**(code **)(param_2 + 0x48))(param_2,uVar7,&local_30,param_1[0x21]);
*(uint *)(param_1 + 0x3b) = uVar2;
if (uVar2 == 0) {
return 0xffffffff;
}
param_1[0x25] = (long)local_30;
pbVar1 = (byte *)param_1[0x20];
param_1[0x26] = (long)(pbVar1 + (((ulong)((*pbVar1 & 0x7f) << 8) | (ulong)pbVar1[1]) - 1));
*(int *)(param_1 + 0x27) = (int)uVar7;
*(int4 *)((long)param_1 + 0x13c) = *(int4 *)(param_2 + 0x1c);
param_1[0x33] = param_1[0x32];
*(int2 *)((long)param_1 + 0x33c) = 0;
uVar6 = 0;
lVar3 = _mi_dpos(param_1,0,(ulong)uVar2 + param_1[0x21]);
}
param_1[0x2e] = lVar3;
return uVar6;
}
|
|
5,712 | my_longlong10_to_str_8bit | eloqsql/strings/ctype-simple.c | size_t my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
char *dst, size_t len, int radix,
longlong val)
{
char buffer[65];
register char *p, *e;
long long_val;
uint sign= 0;
ulonglong uval = (ulonglong)val;
if (radix < 0)
{
if (val < 0)
{
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (ulonglong)0 - uval;
*dst++= '-';
len--;
sign= 1;
}
}
e = p = &buffer[sizeof(buffer)-1];
*p= 0;
if (uval == 0)
{
*--p= '0';
len= 1;
goto cnv;
}
while (uval > (ulonglong) LONG_MAX)
{
ulonglong quo= uval/(uint) 10;
uint rem= (uint) (uval- quo* (uint) 10);
*--p = '0' + rem;
uval= quo;
}
long_val= (long) uval;
while (long_val != 0)
{
long quo= long_val/10;
*--p = (char) ('0' + (long_val - quo*10));
long_val= quo;
}
len= MY_MIN(len, (size_t) (e-p));
cnv:
memcpy(dst, p, len);
return len+sign;
} | O0 | c | my_longlong10_to_str_8bit:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x58(%rbp)
movq %rsi, -0x60(%rbp)
movq %rdx, -0x68(%rbp)
movl %ecx, -0x6c(%rbp)
movq %r8, -0x78(%rbp)
movl $0x0, -0x94(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0xa0(%rbp)
cmpl $0x0, -0x6c(%rbp)
jge 0x439b7
cmpq $0x0, -0x78(%rbp)
jge 0x439b5
xorl %eax, %eax
subq -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x2d, (%rax)
movq -0x68(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x68(%rbp)
movl $0x1, -0x94(%rbp)
jmp 0x439b7
leaq -0x50(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x80(%rbp)
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rax
movb $0x0, (%rax)
cmpq $0x0, -0xa0(%rbp)
jne 0x439fb
movq -0x80(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x80(%rbp)
movb $0x30, -0x1(%rax)
movq $0x1, -0x68(%rbp)
jmp 0x43b1b
jmp 0x439fd
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0xa0(%rbp)
jbe 0x43a6d
movq -0xa0(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rax
imulq $0xa, -0xa8(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
addl $0x30, %eax
movb %al, %cl
movq -0x80(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x80(%rbp)
movb %cl, -0x1(%rax)
movq -0xa8(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x439fd
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x90(%rbp)
je 0x43ad7
movq -0x90(%rbp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
movq %rax, -0xb8(%rbp)
movq -0x90(%rbp), %rax
imulq $0xa, -0xb8(%rbp), %rcx
subq %rcx, %rax
addq $0x30, %rax
movb %al, %cl
movq -0x80(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x80(%rbp)
movb %cl, -0x1(%rax)
movq -0xb8(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x43a7b
movq -0x68(%rbp), %rax
movq -0x88(%rbp), %rcx
movq -0x80(%rbp), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0x43afb
movq -0x68(%rbp), %rax
movq %rax, -0xc0(%rbp)
jmp 0x43b10
movq -0x88(%rbp), %rax
movq -0x80(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x24210
movq -0x68(%rbp), %rax
movl -0x94(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0xc8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x43b62
movq -0xc8(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
callq 0x24300
nopw (%rax,%rax)
| my_longlong10_to_str_8bit:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov [rbp+var_68], rdx
mov [rbp+var_6C], ecx
mov [rbp+var_78], r8
mov [rbp+var_94], 0
mov rax, [rbp+var_78]
mov [rbp+var_A0], rax
cmp [rbp+var_6C], 0
jge short loc_439B7
cmp [rbp+var_78], 0
jge short loc_439B5
xor eax, eax
sub rax, [rbp+var_A0]
mov [rbp+var_A0], rax
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 1
mov [rbp+var_60], rcx
mov byte ptr [rax], 2Dh ; '-'
mov rax, [rbp+var_68]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_68], rax
mov [rbp+var_94], 1
loc_439B5:
jmp short $+2
loc_439B7:
lea rax, [rbp+var_50]
add rax, 40h ; '@'
mov [rbp+var_80], rax
mov [rbp+var_88], rax
mov rax, [rbp+var_80]
mov byte ptr [rax], 0
cmp [rbp+var_A0], 0
jnz short loc_439FB
mov rax, [rbp+var_80]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_80], rcx
mov byte ptr [rax-1], 30h ; '0'
mov [rbp+var_68], 1
jmp loc_43B1B
loc_439FB:
jmp short $+2
loc_439FD:
mov rax, 7FFFFFFFFFFFFFFFh
cmp [rbp+var_A0], rax
jbe short loc_43A6D
mov rax, [rbp+var_A0]
mov ecx, 0Ah
xor edx, edx
div rcx
mov [rbp+var_A8], rax
mov rax, [rbp+var_A0]
imul rcx, [rbp+var_A8], 0Ah
sub rax, rcx
mov [rbp+var_AC], eax
mov eax, [rbp+var_AC]
add eax, 30h ; '0'
mov cl, al
mov rax, [rbp+var_80]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_80], rdx
mov [rax-1], cl
mov rax, [rbp+var_A8]
mov [rbp+var_A0], rax
jmp short loc_439FD
loc_43A6D:
mov rax, [rbp+var_A0]
mov [rbp+var_90], rax
loc_43A7B:
cmp [rbp+var_90], 0
jz short loc_43AD7
mov rax, [rbp+var_90]
mov ecx, 0Ah
cqo
idiv rcx
mov [rbp+var_B8], rax
mov rax, [rbp+var_90]
imul rcx, [rbp+var_B8], 0Ah
sub rax, rcx
add rax, 30h ; '0'
mov cl, al
mov rax, [rbp+var_80]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_80], rdx
mov [rax-1], cl
mov rax, [rbp+var_B8]
mov [rbp+var_90], rax
jmp short loc_43A7B
loc_43AD7:
mov rax, [rbp+var_68]
mov rcx, [rbp+var_88]
mov rdx, [rbp+var_80]
sub rcx, rdx
cmp rax, rcx
jnb short loc_43AFB
mov rax, [rbp+var_68]
mov [rbp+var_C0], rax
jmp short loc_43B10
loc_43AFB:
mov rax, [rbp+var_88]
mov rcx, [rbp+var_80]
sub rax, rcx
mov [rbp+var_C0], rax
loc_43B10:
mov rax, [rbp+var_C0]
mov [rbp+var_68], rax
loc_43B1B:
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_68]
call _memcpy
mov rax, [rbp+var_68]
mov ecx, [rbp+var_94]
add rax, rcx
mov [rbp+var_C8], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_43B62
mov rax, [rbp+var_C8]
add rsp, 0D0h
pop rbp
retn
loc_43B62:
call ___stack_chk_fail
| long long my_longlong10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, long long a5)
{
char *v5; // rax
char *v6; // rax
_BYTE *v8; // [rsp+10h] [rbp-C0h]
unsigned long long v9; // [rsp+30h] [rbp-A0h]
unsigned int v10; // [rsp+3Ch] [rbp-94h]
signed long long i; // [rsp+40h] [rbp-90h]
char *v12; // [rsp+50h] [rbp-80h]
_BYTE *v13; // [rsp+68h] [rbp-68h]
long long v14; // [rsp+68h] [rbp-68h]
_BYTE *v15; // [rsp+70h] [rbp-60h]
char v16; // [rsp+BFh] [rbp-11h] BYREF
_BYTE v17[8]; // [rsp+C0h] [rbp-10h] BYREF
unsigned long long v18; // [rsp+C8h] [rbp-8h]
v18 = __readfsqword(0x28u);
v15 = a2;
v13 = a3;
v10 = 0;
v9 = a5;
if ( a4 < 0 && a5 < 0 )
{
v9 = -a5;
v15 = a2 + 1;
*a2 = 45;
v13 = a3 - 1;
v10 = 1;
}
v12 = v17;
v17[0] = 0;
if ( v9 )
{
while ( v9 > 0x7FFFFFFFFFFFFFFFLL )
{
v5 = v12--;
*(v5 - 1) = v9 % 0xA + 48;
v9 /= 0xAuLL;
}
for ( i = v9; i; i /= 10LL )
{
v6 = v12--;
*(v6 - 1) = i % 10 + 48;
}
if ( (unsigned long long)v13 >= v17 - v12 )
v8 = (_BYTE *)(v17 - v12);
else
v8 = v13;
v14 = (long long)v8;
}
else
{
v12 = &v16;
v16 = 48;
v14 = 1LL;
}
memcpy(v15, v12, v14);
return v10 + v14;
}
| my_longlong10_to_str_8bit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x60],RSI
MOV qword ptr [RBP + -0x68],RDX
MOV dword ptr [RBP + -0x6c],ECX
MOV qword ptr [RBP + -0x78],R8
MOV dword ptr [RBP + -0x94],0x0
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0xa0],RAX
CMP dword ptr [RBP + -0x6c],0x0
JGE 0x001439b7
CMP qword ptr [RBP + -0x78],0x0
JGE 0x001439b5
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x60],RCX
MOV byte ptr [RAX],0x2d
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x68],RAX
MOV dword ptr [RBP + -0x94],0x1
LAB_001439b5:
JMP 0x001439b7
LAB_001439b7:
LEA RAX,[RBP + -0x50]
ADD RAX,0x40
MOV qword ptr [RBP + -0x80],RAX
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV byte ptr [RAX],0x0
CMP qword ptr [RBP + -0xa0],0x0
JNZ 0x001439fb
MOV RAX,qword ptr [RBP + -0x80]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x80],RCX
MOV byte ptr [RAX + -0x1],0x30
MOV qword ptr [RBP + -0x68],0x1
JMP 0x00143b1b
LAB_001439fb:
JMP 0x001439fd
LAB_001439fd:
MOV RAX,0x7fffffffffffffff
CMP qword ptr [RBP + -0xa0],RAX
JBE 0x00143a6d
MOV RAX,qword ptr [RBP + -0xa0]
MOV ECX,0xa
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0xa0]
IMUL RCX,qword ptr [RBP + -0xa8],0xa
SUB RAX,RCX
MOV dword ptr [RBP + -0xac],EAX
MOV EAX,dword ptr [RBP + -0xac]
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x80]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x80],RDX
MOV byte ptr [RAX + -0x1],CL
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x001439fd
LAB_00143a6d:
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x90],RAX
LAB_00143a7b:
CMP qword ptr [RBP + -0x90],0x0
JZ 0x00143ad7
MOV RAX,qword ptr [RBP + -0x90]
MOV ECX,0xa
CQO
IDIV RCX
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0x90]
IMUL RCX,qword ptr [RBP + -0xb8],0xa
SUB RAX,RCX
ADD RAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x80]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x80],RDX
MOV byte ptr [RAX + -0x1],CL
MOV RAX,qword ptr [RBP + -0xb8]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x00143a7b
LAB_00143ad7:
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x88]
MOV RDX,qword ptr [RBP + -0x80]
SUB RCX,RDX
CMP RAX,RCX
JNC 0x00143afb
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0xc0],RAX
JMP 0x00143b10
LAB_00143afb:
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x80]
SUB RAX,RCX
MOV qword ptr [RBP + -0xc0],RAX
LAB_00143b10:
MOV RAX,qword ptr [RBP + -0xc0]
MOV qword ptr [RBP + -0x68],RAX
LAB_00143b1b:
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x68]
CALL 0x00124210
MOV RAX,qword ptr [RBP + -0x68]
MOV ECX,dword ptr [RBP + -0x94]
ADD RAX,RCX
MOV qword ptr [RBP + -0xc8],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00143b62
MOV RAX,qword ptr [RBP + -0xc8]
ADD RSP,0xd0
POP RBP
RET
LAB_00143b62:
CALL 0x00124300
|
long my_longlong10_to_str_8bit
(int8 param_1,int1 *param_2,ulong param_3,int param_4,ulong param_5)
{
char *pcVar1;
long in_FS_OFFSET;
ulong local_c8;
ulong local_a8;
uint local_9c;
ulong local_98;
char *local_88;
size_t local_70;
int1 *local_68;
char local_19 [9];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_9c = 0;
local_a8 = param_5;
local_70 = param_3;
local_68 = param_2;
if (param_4 < 0) {
if ((long)param_5 < 0) {
local_a8 = -param_5;
local_68 = param_2 + 1;
*param_2 = 0x2d;
local_70 = param_3 - 1;
}
local_9c = (uint)((long)param_5 < 0);
}
pcVar1 = local_19 + 1;
local_19[1] = 0;
local_88 = pcVar1;
if (local_a8 == 0) {
local_88 = local_19;
local_19[0] = '0';
local_70 = 1;
}
else {
while (0x7fffffffffffffff < local_a8) {
local_88[-1] = (char)local_a8 + (char)(local_a8 / 10) * -10 + '0';
local_a8 = local_a8 / 10;
local_88 = local_88 + -1;
}
local_98 = local_a8;
while (local_98 != 0) {
local_88[-1] = (char)local_98 + (char)((long)local_98 / 10) * -10 + '0';
local_98 = (long)local_98 / 10;
local_88 = local_88 + -1;
}
if (local_70 < (ulong)((long)pcVar1 - (long)local_88)) {
local_c8 = local_70;
}
else {
local_c8 = (long)pcVar1 - (long)local_88;
}
local_70 = local_c8;
}
memcpy(local_68,local_88,local_70);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_70 + local_9c;
}
|
|
5,713 | pvio_socket_async_write | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | ssize_t pvio_socket_async_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length)
{
ssize_t r= -1;
struct st_pvio_socket *csock= NULL;
#ifndef _WIN32
int write_flags= MSG_DONTWAIT;
#ifdef MSG_NOSIGNAL
write_flags|= MSG_NOSIGNAL;
#endif
#endif
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
#ifndef WIN32
r= ma_send(csock->socket, buffer, length, write_flags);
#else
/* Windows doesn't support MSG_DONTWAIT, so we need to set
socket to non blocking */
pvio_socket_blocking(pvio, 0, 0);
r= send(csock->socket, (const char *)buffer, (int)length, 0);
#endif
return r;
} | O0 | c | pvio_socket_async_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x40, -0x34(%rbp)
movl -0x34(%rbp), %eax
orl $0x4000, %eax # imm = 0x4000
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x72e07
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x72e11
movq $-0x1, -0x8(%rbp)
jmp 0x72e3e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x34(%rbp), %ecx
callq 0x74280
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| pvio_socket_async_write:
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], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], 0
mov [rbp+var_34], 40h ; '@'
mov eax, [rbp+var_34]
or eax, 4000h
mov [rbp+var_34], eax
cmp [rbp+var_10], 0
jz short loc_72E07
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_72E11
loc_72E07:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_72E3E
loc_72E11:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_34]
call ma_send
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_72E3E:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long pvio_socket_async_write(_QWORD *a1, long long a2, long long a3)
{
if ( a1 && *a1 )
return ma_send(*(unsigned int *)*a1, a2, a3, 16448LL);
else
return -1LL;
}
| pvio_socket_async_write:
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],-0x1
MOV qword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x34],0x40
MOV EAX,dword ptr [RBP + -0x34]
OR EAX,0x4000
MOV dword ptr [RBP + -0x34],EAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00172e07
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x00172e11
LAB_00172e07:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00172e3e
LAB_00172e11:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x34]
CALL 0x00174280
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_00172e3e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 pvio_socket_async_write(long *param_1,int8 param_2,int8 param_3)
{
int8 local_10;
if ((param_1 == (long *)0x0) || (*param_1 == 0)) {
local_10 = 0xffffffffffffffff;
}
else {
local_10 = ma_send(*(int4 *)*param_1,param_2,param_3,0x4040);
}
return local_10;
}
|
|
5,714 | coro::context::context() | tinyCoroLab/src/context.cpp | context::context() noexcept
{
m_id = ginfo.context_id.fetch_add(1, std::memory_order_relaxed);
} | O0 | cpp | coro::context::context():
subq $0x38, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x6dfc0
movq (%rsp), %rdi
addq $0x20240, %rdi # imm = 0x20240
callq 0x6e0c0
leaq 0x37de2(%rip), %rax # 0xa55d0
movq %rax, 0x30(%rsp)
movl $0x1, 0x2c(%rsp)
movl $0x0, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x28(%rsp), %eax
movl 0x2c(%rsp), %ecx
movl %ecx, 0x24(%rsp)
decl %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
subl $0x4, %eax
ja 0x6d83c
movq 0x10(%rsp), %rax
leaq 0x5aed(%rip), %rcx # 0x73320
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rsp), %rcx
movl 0x24(%rsp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, 0x20(%rsp)
jmp 0x6d899
movq 0x8(%rsp), %rcx
movl 0x24(%rsp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, 0x20(%rsp)
jmp 0x6d899
movq 0x8(%rsp), %rcx
movl 0x24(%rsp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, 0x20(%rsp)
jmp 0x6d899
movq 0x8(%rsp), %rcx
movl 0x24(%rsp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, 0x20(%rsp)
jmp 0x6d899
movq 0x8(%rsp), %rcx
movl 0x24(%rsp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, 0x20(%rsp)
movq (%rsp), %rax
movl 0x20(%rsp), %ecx
movl %ecx, 0x20248(%rax)
addq $0x38, %rsp
retq
nopl (%rax)
| _ZN4coro7contextC2Ev:
sub rsp, 38h
mov [rsp+38h+var_20], rdi
mov rdi, [rsp+38h+var_20]; this
mov [rsp+38h+var_38], rdi
call _ZN4coro6detail6engineC2Ev; coro::detail::engine::engine(void)
mov rdi, [rsp+38h+var_38]
add rdi, 20240h
call _ZNSt10unique_ptrISt7jthreadSt14default_deleteIS0_EEC2IS2_vEEv; std::unique_ptr<std::jthread>::unique_ptr<std::default_delete<std::jthread>,void>(void)
lea rax, _ZN4coro6detail5ginfoE; coro::detail::ginfo
mov [rsp+38h+var_8], rax
mov [rsp+38h+var_C], 1
mov [rsp+38h+var_10], 0
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_30], rax
mov eax, [rsp+38h+var_10]
mov ecx, [rsp+38h+var_C]
mov [rsp+38h+var_14], ecx
dec eax; switch 5 cases
mov ecx, eax
mov [rsp+38h+var_28], rcx
sub eax, 4
ja short def_6D83A; jumptable 000000000006D83A default case
mov rax, [rsp+38h+var_28]
lea rcx, jpt_6D83A
movsxd rax, ds:(jpt_6D83A - 73320h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
def_6D83A:
mov rcx, [rsp+38h+var_30]; jumptable 000000000006D83A default case
mov eax, [rsp+38h+var_14]
lock xadd [rcx], eax
mov [rsp+38h+var_18], eax
jmp short loc_6D899
loc_6D84F:
mov rcx, [rsp+38h+var_30]; jumptable 000000000006D83A cases 1,2
mov eax, [rsp+38h+var_14]
lock xadd [rcx], eax
mov [rsp+38h+var_18], eax
jmp short loc_6D899
loc_6D862:
mov rcx, [rsp+38h+var_30]; jumptable 000000000006D83A case 3
mov eax, [rsp+38h+var_14]
lock xadd [rcx], eax
mov [rsp+38h+var_18], eax
jmp short loc_6D899
loc_6D875:
mov rcx, [rsp+38h+var_30]; jumptable 000000000006D83A case 4
mov eax, [rsp+38h+var_14]
lock xadd [rcx], eax
mov [rsp+38h+var_18], eax
jmp short loc_6D899
loc_6D888:
mov rcx, [rsp+38h+var_30]; jumptable 000000000006D83A case 5
mov eax, [rsp+38h+var_14]
lock xadd [rcx], eax
mov [rsp+38h+var_18], eax
loc_6D899:
mov rax, [rsp+38h+var_38]
mov ecx, [rsp+38h+var_18]
mov [rax+20248h], ecx
add rsp, 38h
retn
| coro::context * coro::context::context(coro::context *this)
{
coro::context *result; // rax
coro::detail::engine::engine(this);
std::unique_ptr<std::jthread>::unique_ptr<std::default_delete<std::jthread>,void>((char *)this + 131648);
result = this;
*((_DWORD *)this + 32914) = _InterlockedExchangeAdd(&coro::detail::ginfo, 1u);
return result;
}
| context:
SUB RSP,0x38
MOV qword ptr [RSP + 0x18],RDI
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RDI
CALL 0x0016dfc0
MOV RDI,qword ptr [RSP]
ADD RDI,0x20240
CALL 0x0016e0c0
LEA RAX,[0x1a55d0]
MOV qword ptr [RSP + 0x30],RAX
MOV dword ptr [RSP + 0x2c],0x1
MOV dword ptr [RSP + 0x28],0x0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
MOV EAX,dword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x24],ECX
DEC EAX
MOV ECX,EAX
MOV qword ptr [RSP + 0x10],RCX
SUB EAX,0x4
JA 0x0016d83c
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[0x173320]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
JMP RAX
LAB_0016d83c:
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x24]
XADD.LOCK dword ptr [RCX],EAX
MOV dword ptr [RSP + 0x20],EAX
JMP 0x0016d899
LAB_0016d899:
MOV RAX,qword ptr [RSP]
MOV ECX,dword ptr [RSP + 0x20]
MOV dword ptr [RAX + 0x20248],ECX
ADD RSP,0x38
RET
|
/* WARNING: Removing unreachable block (ram,0x0016d827) */
/* coro::context::context() */
void __thiscall coro::context::context(context *this)
{
int iVar1;
detail::engine::engine((engine *)this);
std::unique_ptr<std::jthread,std::default_delete<std::jthread>>::
unique_ptr<std::default_delete<std::jthread>,void>
((unique_ptr<std::jthread,std::default_delete<std::jthread>> *)(this + 0x20240));
LOCK();
UNLOCK();
iVar1 = detail::ginfo + 1;
*(int *)(this + 0x20248) = detail::ginfo;
detail::ginfo = iVar1;
return;
}
|
|
5,715 | translog_read_record_header | eloqsql/storage/maria/ma_loghandler.c | int translog_read_record_header(LSN lsn, TRANSLOG_HEADER_BUFFER *buff)
{
TRANSLOG_PAGE_SIZE_BUFF psize_buff;
uchar *page;
translog_size_t res, page_offset= LSN_OFFSET(lsn) % TRANSLOG_PAGE_SIZE;
PAGECACHE_BLOCK_LINK *direct_link;
TRANSLOG_ADDRESS addr;
TRANSLOG_VALIDATOR_DATA data;
DBUG_ENTER("translog_read_record_header");
DBUG_PRINT("enter", ("LSN: " LSN_FMT, LSN_IN_PARTS(lsn)));
DBUG_ASSERT(LSN_OFFSET(lsn) % TRANSLOG_PAGE_SIZE != 0);
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
buff->lsn= lsn;
buff->groups_no= 0;
data.addr= &addr;
data.was_recovered= 0;
addr= lsn;
addr-= page_offset; /* offset decreasing */
res= (!(page= translog_get_page(&data, psize_buff.buffer, &direct_link))) ?
RECHEADER_READ_ERROR :
translog_read_record_header_from_buffer(page, page_offset, buff, 0);
translog_free_link(direct_link);
DBUG_RETURN(res);
} | O3 | c | translog_read_record_header:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x2030, %rsp # imm = 0x2030
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movq %rdi, (%rsi)
movl $0x0, 0x418(%rsi)
leaq -0x2028(%rbp), %rax
leaq -0x2038(%rbp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
movq %r14, %rcx
andq $-0x2000, %rcx # imm = 0xE000
movq %rcx, (%rax)
leaq -0x2018(%rbp), %rsi
leaq -0x2020(%rbp), %rdx
callq 0x4a54c
testq %rax, %rax
je 0x4aefd
andl $0x1fff, %r14d # imm = 0x1FFF
movq %rax, %rdi
movl %r14d, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x4c040
movl %eax, %ebx
jmp 0x4af02
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
movq -0x2020(%rbp), %rdi
callq 0x4c00e
movq %fs:0x28, %rax
cmpq -0x18(%rbp), %rax
jne 0x4af2b
movl %ebx, %eax
addq $0x2030, %rsp # imm = 0x2030
popq %rbx
popq %r14
popq %rbp
retq
callq 0x29270
| translog_read_record_header:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 2030h
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
mov [rsi], rdi
mov dword ptr [rsi+418h], 0
lea rax, [rbp+var_2028]
lea rdi, [rbp+var_2038]
mov [rdi], rax
mov byte ptr [rdi+8], 0
mov rcx, r14
and rcx, 0FFFFFFFFFFFFE000h
mov [rax], rcx
lea rsi, [rbp+var_2018]
lea rdx, [rbp+var_2020]
call translog_get_page
test rax, rax
jz short loc_4AEFD
and r14d, 1FFFh
mov rdi, rax
mov esi, r14d
mov rdx, rbx
xor ecx, ecx
call translog_read_record_header_from_buffer
mov ebx, eax
jmp short loc_4AF02
loc_4AEFD:
mov ebx, 0FFFFFFFFh
loc_4AF02:
mov rdi, [rbp+var_2020]
call translog_free_link
mov rax, fs:28h
cmp rax, [rbp+var_18]
jnz short loc_4AF2B
mov eax, ebx
add rsp, 2030h
pop rbx
pop r14
pop rbp
retn
loc_4AF2B:
call ___stack_chk_fail
| long long translog_read_record_header(long long a1, long long a2)
{
long long page; // rax
unsigned int record_header_from_buffer; // ebx
unsigned long long *v5; // [rsp+8h] [rbp-2038h] BYREF
char v6; // [rsp+10h] [rbp-2030h]
unsigned long long v7; // [rsp+18h] [rbp-2028h] BYREF
long long v8; // [rsp+20h] [rbp-2020h] BYREF
_BYTE v9[8192]; // [rsp+28h] [rbp-2018h] BYREF
unsigned long long v10; // [rsp+2028h] [rbp-18h]
v10 = __readfsqword(0x28u);
*(_QWORD *)a2 = a1;
*(_DWORD *)(a2 + 1048) = 0;
v5 = &v7;
v6 = 0;
v7 = a1 & 0xFFFFFFFFFFFFE000LL;
page = translog_get_page((long long **)&v5, (long long)v9, &v8);
if ( page )
record_header_from_buffer = translog_read_record_header_from_buffer(page, a1 & 0x1FFF, a2, 0LL);
else
record_header_from_buffer = -1;
translog_free_link(v8);
return record_header_from_buffer;
}
| translog_read_record_header:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x2030
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV qword ptr [RSI],RDI
MOV dword ptr [RSI + 0x418],0x0
LEA RAX,[RBP + -0x2028]
LEA RDI,[RBP + -0x2038]
MOV qword ptr [RDI],RAX
MOV byte ptr [RDI + 0x8],0x0
MOV RCX,R14
AND RCX,-0x2000
MOV qword ptr [RAX],RCX
LEA RSI,[RBP + -0x2018]
LEA RDX,[RBP + -0x2020]
CALL 0x0014a54c
TEST RAX,RAX
JZ 0x0014aefd
AND R14D,0x1fff
MOV RDI,RAX
MOV ESI,R14D
MOV RDX,RBX
XOR ECX,ECX
CALL 0x0014c040
MOV EBX,EAX
JMP 0x0014af02
LAB_0014aefd:
MOV EBX,0xffffffff
LAB_0014af02:
MOV RDI,qword ptr [RBP + -0x2020]
CALL 0x0014c00e
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x0014af2b
MOV EAX,EBX
ADD RSP,0x2030
POP RBX
POP R14
POP RBP
RET
LAB_0014af2b:
CALL 0x00129270
|
int4 translog_read_record_header(ulong param_1,ulong *param_2)
{
int4 uVar1;
long lVar2;
long in_FS_OFFSET;
ulong *local_2040;
int1 local_2038;
ulong local_2030;
int8 local_2028;
int1 local_2020 [8192];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
*param_2 = param_1;
*(int4 *)(param_2 + 0x83) = 0;
local_2040 = &local_2030;
local_2038 = 0;
local_2030 = param_1 & 0xffffffffffffe000;
lVar2 = translog_get_page(&local_2040,local_2020,&local_2028);
if (lVar2 == 0) {
uVar1 = 0xffffffff;
}
else {
uVar1 = translog_read_record_header_from_buffer(lVar2,(uint)param_1 & 0x1fff,param_2,0);
}
translog_free_link(local_2028);
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return uVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
5,716 | ma_apply_redo_index_free_page | eloqsql/storage/maria/ma_key_recover.c | uint _ma_apply_redo_index_free_page(MARIA_HA *info,
LSN lsn,
const uchar *header)
{
pgcache_page_no_t page= page_korr(header);
pgcache_page_no_t free_page= page_korr(header + PAGE_STORE_SIZE);
my_off_t old_link;
MARIA_PINNED_PAGE page_link;
MARIA_SHARE *share= info->s;
uchar *buff;
int result;
DBUG_ENTER("_ma_apply_redo_index_free_page");
DBUG_PRINT("enter", ("page: %lu free_page: %lu",
(ulong) page, (ulong) free_page));
share->state.changed|= (STATE_CHANGED | STATE_NOT_OPTIMIZED_KEYS |
STATE_NOT_SORTED_PAGES | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
if (cmp_translog_addr(lsn, share->state.is_of_horizon) >= 0)
share->state.key_del= (my_off_t) page * share->block_size;
old_link= ((free_page != IMPOSSIBLE_PAGE_NO) ?
(my_off_t) free_page * share->block_size :
HA_OFFSET_ERROR);
if (!(buff= pagecache_read(share->pagecache, &share->kfile,
page, 0, 0,
PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE,
&page_link.link)))
{
result= (uint) my_errno;
_ma_set_fatal_error(info, my_errno);
goto err;
}
if (lsn_korr(buff) >= lsn)
{
/* Already applied */
check_skipped_lsn(info, lsn_korr(buff), 0, page);
result= 0;
goto err;
}
/* Free page */
bzero(buff + LSN_STORE_SIZE, share->keypage_header - LSN_STORE_SIZE);
_ma_store_keynr(share, buff, (uchar) MARIA_DELETE_KEY_NR);
_ma_store_page_used(share, buff, share->keypage_header + 8);
mi_sizestore(buff + share->keypage_header, old_link);
#ifdef IDENTICAL_PAGES_AFTER_RECOVERY
{
bzero(buff + share->keypage_header + 8,
share->block_size - share->keypage_header - 8 -
KEYPAGE_CHECKSUM_SIZE);
}
#endif
/* Mark page to be unlocked and written at _ma_unpin_all_pages() */
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= 1;
push_dynamic(&info->pinned_pages, (void*) &page_link);
DBUG_RETURN(0);
err:
pagecache_unlock_by_link(share->pagecache, page_link.link,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
LSN_IMPOSSIBLE, 0, FALSE);
DBUG_RETURN(result);
} | O3 | c | ma_apply_redo_index_free_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r15
movl (%rdx), %eax
movl 0x5(%rdx), %ecx
movzbl 0x4(%rdx), %r12d
shlq $0x20, %r12
orq %rax, %r12
movzbl 0x9(%rdx), %eax
movq (%rdi), %r13
orl $0x1b1, 0x170(%r13) # imm = 0x1B1
shlq $0x20, %rax
orq %rcx, %rax
cmpq %rsi, 0x180(%r13)
jg 0x5a32b
movl 0x7bc(%r13), %ecx
imulq %r12, %rcx
movq %rcx, 0x120(%r13)
movq $-0x1, %rdx
movabsq $0xffffffffff, %rcx # imm = 0xFFFFFFFFFF
cmpq %rcx, %rax
je 0x5a34f
movl 0x7bc(%r13), %ecx
imulq %rcx, %rax
movq %rax, %rdx
movq %rdx, -0x30(%rbp)
movq 0x600(%r13), %rdi
leaq 0x750(%r13), %rsi
leaq -0x48(%rbp), %rax
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq $0x4
callq 0x32612
addq $0x10, %rsp
testq %rax, %rax
je 0x5a48d
movq %rax, %rbx
movzwl (%rax), %eax
shlq $0x20, %rax
movzbl 0x2(%rbx), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x3(%rbx), %esi
orq %rcx, %rsi
cmpq %r14, %rsi
jge 0x5a4a6
movq %rbx, %rdi
addq $0x7, %rdi
movl 0x744(%r13), %edx
addl $-0x7, %edx
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x292c0
movl 0x744(%r13), %eax
addl $-0x4, %eax
movb $-0x1, (%rbx,%rax)
movl 0x744(%r13), %eax
leal 0x8(%rax), %ecx
movb %cl, -0x1(%rbx,%rax)
movl 0x744(%r13), %eax
movb %ch, -0x2(%rbx,%rax)
movq -0x30(%rbp), %rdx
movq %rdx, %rax
shrq $0x20, %rax
movl 0x744(%r13), %ecx
movb %al, 0x3(%rbx,%rcx)
movq %rdx, %rax
shrq $0x28, %rax
movl 0x744(%r13), %ecx
movb %al, 0x2(%rbx,%rcx)
movq %rdx, %rax
shrq $0x30, %rax
movl 0x744(%r13), %ecx
movb %al, 0x1(%rbx,%rcx)
movq %rdx, %rax
shrq $0x38, %rax
movl 0x744(%r13), %ecx
movb %al, (%rbx,%rcx)
movl 0x744(%r13), %eax
movb %dl, 0x7(%rbx,%rax)
movl 0x744(%r13), %eax
movb %dh, 0x6(%rbx,%rax)
movl %edx, %eax
shrl $0x10, %eax
movl 0x744(%r13), %ecx
movb %al, 0x5(%rbx,%rcx)
shrl $0x18, %edx
movl 0x744(%r13), %eax
movb %dl, 0x4(%rbx,%rax)
leaq -0x48(%rbp), %rsi
movl $0x6, 0x8(%rsi)
movb $0x1, 0x10(%rsi)
addq $0x2e8, %r15 # imm = 0x2E8
movq %r15, %rdi
callq 0x91b9e
jmp 0x5a4de
callq 0xa1afa
movl (%rax), %r14d
callq 0xa1afa
movl (%rax), %esi
movq %r15, %rdi
callq 0x36a24
jmp 0x5a4b6
xorl %r14d, %r14d
movq %r15, %rdi
xorl %edx, %edx
movq %r12, %rcx
callq 0x4c7d5
movq 0x600(%r13), %rdi
movq -0x48(%rbp), %rsi
xorl %eax, %eax
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
callq 0x3232d
addq $0x10, %rsp
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_apply_redo_index_free_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov r15, rdi
mov eax, [rdx]
mov ecx, [rdx+5]
movzx r12d, byte ptr [rdx+4]
shl r12, 20h
or r12, rax
movzx eax, byte ptr [rdx+9]
mov r13, [rdi]
or dword ptr [r13+170h], 1B1h
shl rax, 20h
or rax, rcx
cmp [r13+180h], rsi
jg short loc_5A32B
mov ecx, [r13+7BCh]
imul rcx, r12
mov [r13+120h], rcx
loc_5A32B:
mov rdx, 0FFFFFFFFFFFFFFFFh
mov rcx, 0FFFFFFFFFFh
cmp rax, rcx
jz short loc_5A34F
mov ecx, [r13+7BCh]
imul rax, rcx
mov rdx, rax
loc_5A34F:
mov [rbp+var_30], rdx
mov rdi, [r13+600h]
lea rsi, [r13+750h]
lea rax, [rbp+var_48]
mov rdx, r12
xor ecx, ecx
xor r8d, r8d
mov r9d, 1
push rax
push 4
call pagecache_read
add rsp, 10h
test rax, rax
jz loc_5A48D
mov rbx, rax
movzx eax, word ptr [rax]
shl rax, 20h
movzx ecx, byte ptr [rbx+2]
shl rcx, 30h
or rcx, rax
mov esi, [rbx+3]
or rsi, rcx
cmp rsi, r14
jge loc_5A4A6
mov rdi, rbx
add rdi, 7
mov edx, [r13+744h]
add edx, 0FFFFFFF9h
xor r14d, r14d
xor esi, esi
call _memset
mov eax, [r13+744h]
add eax, 0FFFFFFFCh
mov byte ptr [rbx+rax], 0FFh
mov eax, [r13+744h]
lea ecx, [rax+8]
mov [rbx+rax-1], cl
mov eax, [r13+744h]
mov [rbx+rax-2], ch
mov rdx, [rbp+var_30]
mov rax, rdx
shr rax, 20h
mov ecx, [r13+744h]
mov [rbx+rcx+3], al
mov rax, rdx
shr rax, 28h
mov ecx, [r13+744h]
mov [rbx+rcx+2], al
mov rax, rdx
shr rax, 30h
mov ecx, [r13+744h]
mov [rbx+rcx+1], al
mov rax, rdx
shr rax, 38h
mov ecx, [r13+744h]
mov [rbx+rcx], al
mov eax, [r13+744h]
mov [rbx+rax+7], dl
mov eax, [r13+744h]
mov [rbx+rax+6], dh
mov eax, edx
shr eax, 10h
mov ecx, [r13+744h]
mov [rbx+rcx+5], al
shr edx, 18h
mov eax, [r13+744h]
mov [rbx+rax+4], dl
lea rsi, [rbp+var_48]
mov dword ptr [rsi+8], 6
mov byte ptr [rsi+10h], 1
add r15, 2E8h
mov rdi, r15
call insert_dynamic
jmp short loc_5A4DE
loc_5A48D:
call _my_thread_var
mov r14d, [rax]
call _my_thread_var
mov esi, [rax]
mov rdi, r15
call _ma_set_fatal_error
jmp short loc_5A4B6
loc_5A4A6:
xor r14d, r14d
mov rdi, r15
xor edx, edx
mov rcx, r12
call check_skipped_lsn
loc_5A4B6:
mov rdi, [r13+600h]
mov rsi, [rbp+var_48]
xor eax, eax
mov edx, 6
mov ecx, 3
xor r8d, r8d
xor r9d, r9d
push rax
push rax
call pagecache_unlock_by_link
add rsp, 10h
loc_5A4DE:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_apply_redo_index_free_page(_DWORD *a1, signed long long a2, unsigned int *a3)
{
long long v5; // rcx
unsigned long long v6; // r12
long long v7; // rax
long long v8; // r13
long long v9; // rax
long long v10; // rdx
long long v11; // rdi
const char *v12; // rsi
unsigned __int16 *v13; // rax
unsigned __int16 *v14; // rbx
signed long long v15; // rsi
unsigned int v16; // r14d
long long v17; // rax
long long v18; // rdx
unsigned int *v19; // rax
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
int v23; // r9d
long long v25; // [rsp+8h] [rbp-48h] BYREF
int v26; // [rsp+10h] [rbp-40h]
char v27; // [rsp+18h] [rbp-38h]
long long v28; // [rsp+20h] [rbp-30h]
v5 = *(unsigned int *)((char *)a3 + 5);
v6 = *a3 | ((unsigned long long)*((unsigned __int8 *)a3 + 4) << 32);
v7 = *((unsigned __int8 *)a3 + 9);
v8 = *(_QWORD *)a1;
*(_DWORD *)(v8 + 368) |= 0x1B1u;
v9 = v5 | (v7 << 32);
if ( *(_QWORD *)(v8 + 384) <= a2 )
*(_QWORD *)(v8 + 288) = v6 * *(unsigned int *)(v8 + 1980);
v10 = -1LL;
if ( v9 != 0xFFFFFFFFFFLL )
v10 = *(unsigned int *)(v8 + 1980) * v9;
v28 = v10;
v11 = *(_QWORD *)(v8 + 1536);
v12 = (const char *)(v8 + 1872);
v13 = (unsigned __int16 *)pagecache_read(v11, v8 + 1872, v6, 0, 0LL, 1, 4u, &v25);
if ( !v13 )
{
v16 = *(_DWORD *)my_thread_var(v11, v12);
v19 = (unsigned int *)my_thread_var(v11, v12);
ma_set_fatal_error(a1, *v19, v20, v21, v22, v23);
LABEL_10:
pagecache_unlock_by_link(*(_QWORD *)(v8 + 1536), v25, 6, 3, 0LL, 0LL, 0);
return v16;
}
v14 = v13;
v15 = ((unsigned long long)*v13 << 32) | ((unsigned long long)*((unsigned __int8 *)v13 + 2) << 48) | *(unsigned int *)((char *)v13 + 3);
if ( v15 >= a2 )
{
v16 = 0;
check_skipped_lsn((long long)a1, v15, 0, v6);
goto LABEL_10;
}
v16 = 0;
memset((char *)v13 + 7, 0LL, (unsigned int)(*(_DWORD *)(v8 + 1860) - 7));
*((_BYTE *)v14 + (unsigned int)(*(_DWORD *)(v8 + 1860) - 4)) = -1;
v17 = *(unsigned int *)(v8 + 1860);
*((_BYTE *)v14 + v17 - 1) = v17 + 8;
*((_BYTE *)v14 + *(unsigned int *)(v8 + 1860) - 2) = (unsigned __int16)(v17 + 8) >> 8;
v18 = v28;
*((_BYTE *)v14 + *(unsigned int *)(v8 + 1860) + 3) = BYTE4(v28);
*((_BYTE *)v14 + *(unsigned int *)(v8 + 1860) + 2) = BYTE5(v18);
*((_BYTE *)v14 + *(unsigned int *)(v8 + 1860) + 1) = BYTE6(v18);
*((_BYTE *)v14 + *(unsigned int *)(v8 + 1860)) = HIBYTE(v18);
*((_BYTE *)v14 + *(unsigned int *)(v8 + 1860) + 7) = v18;
*((_BYTE *)v14 + *(unsigned int *)(v8 + 1860) + 6) = BYTE1(v18);
*((_BYTE *)v14 + *(unsigned int *)(v8 + 1860) + 5) = BYTE2(v18);
*((_BYTE *)v14 + *(unsigned int *)(v8 + 1860) + 4) = BYTE3(v18);
v26 = 6;
v27 = 1;
insert_dynamic(a1 + 186, &v25);
return v16;
}
| _ma_apply_redo_index_free_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV R15,RDI
MOV EAX,dword ptr [RDX]
MOV ECX,dword ptr [RDX + 0x5]
MOVZX R12D,byte ptr [RDX + 0x4]
SHL R12,0x20
OR R12,RAX
MOVZX EAX,byte ptr [RDX + 0x9]
MOV R13,qword ptr [RDI]
OR dword ptr [R13 + 0x170],0x1b1
SHL RAX,0x20
OR RAX,RCX
CMP qword ptr [R13 + 0x180],RSI
JG 0x0015a32b
MOV ECX,dword ptr [R13 + 0x7bc]
IMUL RCX,R12
MOV qword ptr [R13 + 0x120],RCX
LAB_0015a32b:
MOV RDX,-0x1
MOV RCX,0xffffffffff
CMP RAX,RCX
JZ 0x0015a34f
MOV ECX,dword ptr [R13 + 0x7bc]
IMUL RAX,RCX
MOV RDX,RAX
LAB_0015a34f:
MOV qword ptr [RBP + -0x30],RDX
MOV RDI,qword ptr [R13 + 0x600]
LEA RSI,[R13 + 0x750]
LEA RAX,[RBP + -0x48]
MOV RDX,R12
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x1
PUSH RAX
PUSH 0x4
CALL 0x00132612
ADD RSP,0x10
TEST RAX,RAX
JZ 0x0015a48d
MOV RBX,RAX
MOVZX EAX,word ptr [RAX]
SHL RAX,0x20
MOVZX ECX,byte ptr [RBX + 0x2]
SHL RCX,0x30
OR RCX,RAX
MOV ESI,dword ptr [RBX + 0x3]
OR RSI,RCX
CMP RSI,R14
JGE 0x0015a4a6
MOV RDI,RBX
ADD RDI,0x7
MOV EDX,dword ptr [R13 + 0x744]
ADD EDX,-0x7
XOR R14D,R14D
XOR ESI,ESI
CALL 0x001292c0
MOV EAX,dword ptr [R13 + 0x744]
ADD EAX,-0x4
MOV byte ptr [RBX + RAX*0x1],0xff
MOV EAX,dword ptr [R13 + 0x744]
LEA ECX,[RAX + 0x8]
MOV byte ptr [RBX + RAX*0x1 + -0x1],CL
MOV EAX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RAX*0x1 + -0x2],CH
MOV RDX,qword ptr [RBP + -0x30]
MOV RAX,RDX
SHR RAX,0x20
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1 + 0x3],AL
MOV RAX,RDX
SHR RAX,0x28
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1 + 0x2],AL
MOV RAX,RDX
SHR RAX,0x30
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1 + 0x1],AL
MOV RAX,RDX
SHR RAX,0x38
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1],AL
MOV EAX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RAX*0x1 + 0x7],DL
MOV EAX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RAX*0x1 + 0x6],DH
MOV EAX,EDX
SHR EAX,0x10
MOV ECX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RCX*0x1 + 0x5],AL
SHR EDX,0x18
MOV EAX,dword ptr [R13 + 0x744]
MOV byte ptr [RBX + RAX*0x1 + 0x4],DL
LEA RSI,[RBP + -0x48]
MOV dword ptr [RSI + 0x8],0x6
MOV byte ptr [RSI + 0x10],0x1
ADD R15,0x2e8
MOV RDI,R15
CALL 0x00191b9e
JMP 0x0015a4de
LAB_0015a48d:
CALL 0x001a1afa
MOV R14D,dword ptr [RAX]
CALL 0x001a1afa
MOV ESI,dword ptr [RAX]
MOV RDI,R15
CALL 0x00136a24
JMP 0x0015a4b6
LAB_0015a4a6:
XOR R14D,R14D
MOV RDI,R15
XOR EDX,EDX
MOV RCX,R12
CALL 0x0014c7d5
LAB_0015a4b6:
MOV RDI,qword ptr [R13 + 0x600]
MOV RSI,qword ptr [RBP + -0x48]
XOR EAX,EAX
MOV EDX,0x6
MOV ECX,0x3
XOR R8D,R8D
XOR R9D,R9D
PUSH RAX
PUSH RAX
CALL 0x0013232d
ADD RSP,0x10
LAB_0015a4de:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 _ma_apply_redo_index_free_page(long *param_1,long param_2,uint5 *param_3)
{
long lVar1;
uint5 uVar2;
ushort *puVar3;
int4 *puVar4;
int iVar5;
ulong uVar6;
ulong uVar7;
int4 uVar8;
int8 local_50;
int4 local_48;
int1 local_40;
long local_38;
uVar7 = (ulong)*param_3;
uVar2 = *(uint5 *)((long)param_3 + 5);
lVar1 = *param_1;
*(uint *)(lVar1 + 0x170) = *(uint *)(lVar1 + 0x170) | 0x1b1;
if (*(long *)(lVar1 + 0x180) <= param_2) {
*(ulong *)(lVar1 + 0x120) = *(uint *)(lVar1 + 0x7bc) * uVar7;
}
local_38 = -1;
if ((ulong)uVar2 != 0xffffffffff) {
local_38 = (ulong)uVar2 * (ulong)*(uint *)(lVar1 + 0x7bc);
}
puVar3 = (ushort *)
pagecache_read(*(int8 *)(lVar1 + 0x600),lVar1 + 0x750,uVar7,0,0,1,4,&local_50);
if (puVar3 == (ushort *)0x0) {
puVar4 = (int4 *)_my_thread_var();
uVar8 = *puVar4;
puVar4 = (int4 *)_my_thread_var();
_ma_set_fatal_error(param_1,*puVar4);
}
else {
uVar6 = (ulong)*(uint *)((long)puVar3 + 3) |
(ulong)(byte)puVar3[1] << 0x30 | (ulong)*puVar3 << 0x20;
if ((long)uVar6 < param_2) {
memset((void *)((long)puVar3 + 7),0,(ulong)(*(int *)(lVar1 + 0x744) - 7));
*(int1 *)((long)puVar3 + (ulong)(*(int *)(lVar1 + 0x744) - 4)) = 0xff;
iVar5 = *(uint *)(lVar1 + 0x744) + 8;
*(char *)((long)puVar3 + ((ulong)*(uint *)(lVar1 + 0x744) - 1)) = (char)iVar5;
*(char *)((long)puVar3 + ((ulong)*(uint *)(lVar1 + 0x744) - 2)) = (char)((uint)iVar5 >> 8);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 3) =
(char)((ulong)local_38 >> 0x20);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 2) =
(char)((ulong)local_38 >> 0x28);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 1) =
(char)((ulong)local_38 >> 0x30);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744)) = (char)((ulong)local_38 >> 0x38);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 7) = (char)local_38;
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 6) = (char)((ulong)local_38 >> 8);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 5) =
(char)((ulong)local_38 >> 0x10);
*(char *)((long)puVar3 + (ulong)*(uint *)(lVar1 + 0x744) + 4) =
(char)((ulong)local_38 >> 0x18);
local_48 = 6;
local_40 = 1;
insert_dynamic(param_1 + 0x5d);
return 0;
}
uVar8 = 0;
check_skipped_lsn(param_1,uVar6,0,uVar7);
}
pagecache_unlock_by_link(*(int8 *)(lVar1 + 0x600),local_50,6,3,0,0,0,0);
return uVar8;
}
|
|
5,717 | codegen_generate_let | tsotchke[P]eshkol/src/backend/codegen/blocks.c | bool codegen_generate_let(CodegenContext* context, const AstNode* node) {
assert(context != NULL);
assert(node != NULL);
assert(node->type == AST_LET);
// Get output file
FILE* output = codegen_context_get_output(context);
// Generate code
fprintf(output, "({ ");
// Generate bindings
for (size_t i = 0; i < node->as.let.binding_count; i++) {
// Get binding
AstNode* binding = node->as.let.bindings[i];
// Get binding node (for type information)
AstNode* binding_node = node->as.let.binding_nodes[i];
// Get type context
TypeInferenceContext* type_context = codegen_context_get_type_context(context);
// Get variable type
Type* var_type = type_inference_get_type(type_context, binding);
// Generate type
if (var_type) {
fprintf(output, "%s ", codegen_type_to_c_type(var_type));
} else {
fprintf(output, "int ");
}
// Generate variable name
if (binding_node->type == AST_IDENTIFIER) {
fprintf(output, "%s = ", binding_node->as.identifier.name);
} else {
fprintf(output, "_let_var_%zu = ", i);
}
// Generate value
if (!codegen_generate_expression(context, binding)) {
return false;
}
fprintf(output, "; ");
}
// Generate body
if (!codegen_generate_expression(context, node->as.let.body)) {
return false;
}
// Close let
fprintf(output, "; })");
return true;
} | O0 | c | codegen_generate_let:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1cd39
jmp 0x1cd58
leaq 0xa05b(%rip), %rdi # 0x26d9b
leaq 0x1153c(%rip), %rsi # 0x2e283
movl $0x32, %edx
leaq 0x115c7(%rip), %rcx # 0x2e31a
callq 0x2160
cmpq $0x0, -0x18(%rbp)
je 0x1cd61
jmp 0x1cd80
leaq 0xbce2(%rip), %rdi # 0x28a4a
leaq 0x11514(%rip), %rsi # 0x2e283
movl $0x33, %edx
leaq 0x1159f(%rip), %rcx # 0x2e31a
callq 0x2160
movq -0x18(%rbp), %rax
cmpl $0xd, (%rax)
jne 0x1cd8b
jmp 0x1cdaa
leaq 0xca1a(%rip), %rdi # 0x297ac
leaq 0x114ea(%rip), %rsi # 0x2e283
movl $0x34, %edx
leaq 0x11575(%rip), %rcx # 0x2e31a
callq 0x2160
movq -0x10(%rbp), %rdi
callq 0x11730
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0xfcac(%rip), %rsi # 0x2ca6e
movb $0x0, %al
callq 0x21d0
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jae 0x1cedf
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x116e0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xc620
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x1ce58
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x1e590
movq -0x50(%rbp), %rdi
movq %rax, %rdx
leaq 0xe0ce(%rip), %rsi # 0x2af1d
movb $0x0, %al
callq 0x21d0
jmp 0x1ce6a
movq -0x20(%rbp), %rdi
leaq 0x114f5(%rip), %rsi # 0x2e358
movb $0x0, %al
callq 0x21d0
movq -0x38(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x1ce8f
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x48(%rax), %rdx
leaq 0xe28f(%rip), %rsi # 0x2b115
movb $0x0, %al
callq 0x21d0
jmp 0x1cea5
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x114bf(%rip), %rsi # 0x2e35d
movb $0x0, %al
callq 0x21d0
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x18cf0
testb $0x1, %al
jne 0x1cebc
movb $0x0, -0x1(%rbp)
jmp 0x1cf10
movq -0x20(%rbp), %rdi
leaq 0x10dce(%rip), %rsi # 0x2dc95
movb $0x0, %al
callq 0x21d0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x1cdd1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rsi
callq 0x18cf0
testb $0x1, %al
jne 0x1cefa
movb $0x0, -0x1(%rbp)
jmp 0x1cf10
movq -0x20(%rbp), %rdi
leaq 0x10f18(%rip), %rsi # 0x2de1d
movb $0x0, %al
callq 0x21d0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| codegen_generate_let:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_10], 0
jz short loc_1CD39
jmp short loc_1CD58
loc_1CD39:
lea rdi, aContextNull; "context != NULL"
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"...
mov edx, 32h ; '2'
lea rcx, aBoolCodegenGen_22; "_Bool codegen_generate_let(CodegenConte"...
call ___assert_fail
loc_1CD58:
cmp [rbp+var_18], 0
jz short loc_1CD61
jmp short loc_1CD80
loc_1CD61:
lea rdi, aNodeNull; "node != NULL"
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"...
mov edx, 33h ; '3'
lea rcx, aBoolCodegenGen_22; "_Bool codegen_generate_let(CodegenConte"...
call ___assert_fail
loc_1CD80:
mov rax, [rbp+var_18]
cmp dword ptr [rax], 0Dh
jnz short loc_1CD8B
jmp short loc_1CDAA
loc_1CD8B:
lea rdi, aNodeTypeAstLet; "node->type == AST_LET"
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"...
mov edx, 34h ; '4'
lea rcx, aBoolCodegenGen_22; "_Bool codegen_generate_let(CodegenConte"...
call ___assert_fail
loc_1CDAA:
mov rdi, [rbp+var_10]
call codegen_context_get_output
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
lea rsi, asc_2CA6E; "({ "
mov al, 0
call _fprintf
mov [rbp+var_28], 0
loc_1CDD1:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
cmp rax, [rcx+58h]
jnb loc_1CEDF
mov rax, [rbp+var_18]
mov rax, [rax+48h]
mov rcx, [rbp+var_28]
mov rax, [rax+rcx*8]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax+50h]
mov rcx, [rbp+var_28]
mov rax, [rax+rcx*8]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
call codegen_context_get_type_context
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_30]
call type_inference_get_type
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
jz short loc_1CE58
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
mov rdi, [rbp+var_48]
call codegen_type_to_c_type
mov rdi, [rbp+var_50]
mov rdx, rax
lea rsi, aS_1; "%s "
mov al, 0
call _fprintf
jmp short loc_1CE6A
loc_1CE58:
mov rdi, [rbp+var_20]
lea rsi, aInt_0; "int "
mov al, 0
call _fprintf
loc_1CE6A:
mov rax, [rbp+var_38]
cmp dword ptr [rax], 6
jnz short loc_1CE8F
mov rdi, [rbp+var_20]
mov rax, [rbp+var_38]
mov rdx, [rax+48h]
lea rsi, aS_2+4; "%s = "
mov al, 0
call _fprintf
jmp short loc_1CEA5
loc_1CE8F:
mov rdi, [rbp+var_20]
mov rdx, [rbp+var_28]
lea rsi, aLetVarZu; "_let_var_%zu = "
mov al, 0
call _fprintf
loc_1CEA5:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
call codegen_generate_expression
test al, 1
jnz short loc_1CEBC
mov [rbp+var_1], 0
jmp short loc_1CF10
loc_1CEBC:
mov rdi, [rbp+var_20]
lea rsi, aCharBuffer1024+19h; "; "
mov al, 0
call _fprintf
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp loc_1CDD1
loc_1CEDF:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+60h]
call codegen_generate_expression
test al, 1
jnz short loc_1CEFA
mov [rbp+var_1], 0
jmp short loc_1CF10
loc_1CEFA:
mov rdi, [rbp+var_20]
lea rsi, aVectorFGetComp_0+4Eh; "; })"
mov al, 0
call _fprintf
mov [rbp+var_1], 1
loc_1CF10:
mov al, [rbp+var_1]
and al, 1
add rsp, 50h
pop rbp
retn
| char codegen_generate_let(long long a1, long long a2)
{
const char *v2; // rax
long long type; // [rsp+8h] [rbp-48h]
_QWORD *type_context; // [rsp+10h] [rbp-40h]
long long v6; // [rsp+18h] [rbp-38h]
_DWORD *v7; // [rsp+20h] [rbp-30h]
unsigned long long i; // [rsp+28h] [rbp-28h]
long long output; // [rsp+30h] [rbp-20h]
if ( !a1 )
__assert_fail(
"context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/blocks.c",
50LL,
"_Bool codegen_generate_let(CodegenContext *, const AstNode *)");
if ( !a2 )
__assert_fail(
"node != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/blocks.c",
51LL,
"_Bool codegen_generate_let(CodegenContext *, const AstNode *)");
if ( *(_DWORD *)a2 != 13 )
__assert_fail(
"node->type == AST_LET",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/blocks.c",
52LL,
"_Bool codegen_generate_let(CodegenContext *, const AstNode *)");
output = codegen_context_get_output(a1);
fprintf(output, "({ ");
for ( i = 0LL; i < *(_QWORD *)(a2 + 88); ++i )
{
v7 = *(_DWORD **)(*(_QWORD *)(a2 + 72) + 8 * i);
v6 = *(_QWORD *)(*(_QWORD *)(a2 + 80) + 8 * i);
type_context = (_QWORD *)codegen_context_get_type_context(a1);
type = type_inference_get_type(type_context, (long long)v7);
if ( type )
{
v2 = (const char *)codegen_type_to_c_type(type);
fprintf(output, "%s ", v2);
}
else
{
fprintf(output, "int ");
}
if ( *(_DWORD *)v6 == 6 )
fprintf(output, "%s = ", *(const char **)(v6 + 72));
else
fprintf(output, "_let_var_%zu = ", i);
if ( (codegen_generate_expression(a1, v7) & 1) == 0 )
return 0;
fprintf(output, "; ");
}
if ( (codegen_generate_expression(a1, *(_DWORD **)(a2 + 96)) & 1) == 0 )
return 0;
fprintf(output, "; })");
return 1;
}
| codegen_generate_let:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0011cd39
JMP 0x0011cd58
LAB_0011cd39:
LEA RDI,[0x126d9b]
LEA RSI,[0x12e283]
MOV EDX,0x32
LEA RCX,[0x12e31a]
CALL 0x00102160
LAB_0011cd58:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0011cd61
JMP 0x0011cd80
LAB_0011cd61:
LEA RDI,[0x128a4a]
LEA RSI,[0x12e283]
MOV EDX,0x33
LEA RCX,[0x12e31a]
CALL 0x00102160
LAB_0011cd80:
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0xd
JNZ 0x0011cd8b
JMP 0x0011cdaa
LAB_0011cd8b:
LEA RDI,[0x1297ac]
LEA RSI,[0x12e283]
MOV EDX,0x34
LEA RCX,[0x12e31a]
CALL 0x00102160
LAB_0011cdaa:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00111730
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x12ca6e]
MOV AL,0x0
CALL 0x001021d0
MOV qword ptr [RBP + -0x28],0x0
LAB_0011cdd1:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x58]
JNC 0x0011cedf
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x48]
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x50]
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001116e0
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x0010c620
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0011ce58
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0011e590
MOV RDI,qword ptr [RBP + -0x50]
MOV RDX,RAX
LEA RSI,[0x12af1d]
MOV AL,0x0
CALL 0x001021d0
JMP 0x0011ce6a
LAB_0011ce58:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x12e358]
MOV AL,0x0
CALL 0x001021d0
LAB_0011ce6a:
MOV RAX,qword ptr [RBP + -0x38]
CMP dword ptr [RAX],0x6
JNZ 0x0011ce8f
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RAX + 0x48]
LEA RSI,[0x12b115]
MOV AL,0x0
CALL 0x001021d0
JMP 0x0011cea5
LAB_0011ce8f:
MOV RDI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
LEA RSI,[0x12e35d]
MOV AL,0x0
CALL 0x001021d0
LAB_0011cea5:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00118cf0
TEST AL,0x1
JNZ 0x0011cebc
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0011cf10
LAB_0011cebc:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x12dc95]
MOV AL,0x0
CALL 0x001021d0
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0011cdd1
LAB_0011cedf:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x60]
CALL 0x00118cf0
TEST AL,0x1
JNZ 0x0011cefa
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0011cf10
LAB_0011cefa:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x12de1d]
MOV AL,0x0
CALL 0x001021d0
MOV byte ptr [RBP + -0x1],0x1
LAB_0011cf10:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x50
POP RBP
RET
|
bool codegen_generate_let(long param_1,int *param_2)
{
int8 uVar1;
int *piVar2;
FILE *__stream;
int8 uVar3;
long lVar4;
ulong uVar5;
bool bVar6;
ulong local_30;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/blocks.c"
,0x32,"_Bool codegen_generate_let(CodegenContext *, const AstNode *)");
}
if (param_2 == (int *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("node != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/blocks.c"
,0x33,"_Bool codegen_generate_let(CodegenContext *, const AstNode *)");
}
if (*param_2 != 0xd) {
/* WARNING: Subroutine does not return */
__assert_fail("node->type == AST_LET",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/blocks.c"
,0x34,"_Bool codegen_generate_let(CodegenContext *, const AstNode *)");
}
__stream = (FILE *)codegen_context_get_output(param_1);
fprintf(__stream,"({ ");
local_30 = 0;
while( true ) {
if (*(ulong *)(param_2 + 0x16) <= local_30) {
uVar5 = codegen_generate_expression(param_1,*(int8 *)(param_2 + 0x18));
bVar6 = (uVar5 & 1) != 0;
if (bVar6) {
fprintf(__stream,"; })");
}
return bVar6;
}
uVar1 = *(int8 *)(*(long *)(param_2 + 0x12) + local_30 * 8);
piVar2 = *(int **)(*(long *)(param_2 + 0x14) + local_30 * 8);
uVar3 = codegen_context_get_type_context(param_1);
lVar4 = type_inference_get_type(uVar3,uVar1);
if (lVar4 == 0) {
fprintf(__stream,"int ");
}
else {
uVar3 = codegen_type_to_c_type(lVar4);
fprintf(__stream,"%s ",uVar3);
}
if (*piVar2 == 6) {
fprintf(__stream,"%s = ",*(int8 *)(piVar2 + 0x12));
}
else {
fprintf(__stream,"_let_var_%zu = ",local_30);
}
uVar5 = codegen_generate_expression(param_1,uVar1);
if ((uVar5 & 1) == 0) break;
fprintf(__stream,"; ");
local_30 = local_30 + 1;
}
return false;
}
|
|
5,718 | codegen_generate_let | tsotchke[P]eshkol/src/backend/codegen/blocks.c | bool codegen_generate_let(CodegenContext* context, const AstNode* node) {
assert(context != NULL);
assert(node != NULL);
assert(node->type == AST_LET);
// Get output file
FILE* output = codegen_context_get_output(context);
// Generate code
fprintf(output, "({ ");
// Generate bindings
for (size_t i = 0; i < node->as.let.binding_count; i++) {
// Get binding
AstNode* binding = node->as.let.bindings[i];
// Get binding node (for type information)
AstNode* binding_node = node->as.let.binding_nodes[i];
// Get type context
TypeInferenceContext* type_context = codegen_context_get_type_context(context);
// Get variable type
Type* var_type = type_inference_get_type(type_context, binding);
// Generate type
if (var_type) {
fprintf(output, "%s ", codegen_type_to_c_type(var_type));
} else {
fprintf(output, "int ");
}
// Generate variable name
if (binding_node->type == AST_IDENTIFIER) {
fprintf(output, "%s = ", binding_node->as.identifier.name);
} else {
fprintf(output, "_let_var_%zu = ", i);
}
// Generate value
if (!codegen_generate_expression(context, binding)) {
return false;
}
fprintf(output, "; ");
}
// Generate body
if (!codegen_generate_expression(context, node->as.let.body)) {
return false;
}
// Close let
fprintf(output, "; })");
return true;
} | O3 | c | codegen_generate_let:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x13bd1
movq %rsi, %r14
testq %rsi, %rsi
je 0x13bf0
cmpl $0xd, (%r14)
jne 0x13c0f
movq %rdi, %rbx
callq 0xb394
movq %rax, %r15
leaq 0xb5f4(%rip), %rdi # 0x1f0a9
movl $0x3, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x22c0
cmpq $0x0, 0x58(%r14)
je 0x13b93
xorl %r12d, %r12d
movq 0x48(%r14), %rax
movq 0x50(%r14), %rcx
movq (%rax,%r12,8), %r13
movq (%rcx,%r12,8), %rbp
movq %rbx, %rdi
callq 0xb36a
movq %rax, %rdi
movq %r13, %rsi
callq 0x8c5e
testq %rax, %rax
je 0x13b1b
movq %rax, %rdi
callq 0x14cec
movq %r15, %rdi
leaq 0x9c5c(%rip), %rsi # 0x1d76b
movq %rax, %rdx
xorl %eax, %eax
callq 0x2200
jmp 0x13b34
movl $0x4, %esi
movl $0x1, %edx
leaq 0xcfa9(%rip), %rdi # 0x20ad5
movq %r15, %rcx
callq 0x22c0
cmpl $0x6, (%rbp)
jne 0x13b4a
movq 0x48(%rbp), %rdx
movq %r15, %rdi
leaq 0x9e1b(%rip), %rsi # 0x1d963
jmp 0x13b57
movq %r15, %rdi
leaq 0xcf86(%rip), %rsi # 0x20ada
movq %r12, %rdx
xorl %eax, %eax
callq 0x2200
movq %rbx, %rdi
movq %r13, %rsi
callq 0x10f0c
testb %al, %al
je 0x13bc0
movl $0x2, %esi
movl $0x1, %edx
leaq 0xc851(%rip), %rdi # 0x203cf
movq %r15, %rcx
callq 0x22c0
incq %r12
cmpq 0x58(%r14), %r12
jb 0x13ad5
movq 0x60(%r14), %rsi
movq %rbx, %rdi
callq 0x10f0c
testb %al, %al
je 0x13bc0
leaq 0xc9ad(%rip), %rdi # 0x20557
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x22c0
movb $0x1, %al
jmp 0x13bc2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6187(%rip), %rdi # 0x19d5f
leaq 0xcdf3(%rip), %rsi # 0x209d2
leaq 0xce9b(%rip), %rcx # 0x20a81
movl $0x32, %edx
callq 0x2180
leaq 0x7cd8(%rip), %rdi # 0x1b8cf
leaq 0xcdd4(%rip), %rsi # 0x209d2
leaq 0xce7c(%rip), %rcx # 0x20a81
movl $0x33, %edx
callq 0x2180
leaq 0xcea9(%rip), %rdi # 0x20abf
leaq 0xcdb5(%rip), %rsi # 0x209d2
leaq 0xce5d(%rip), %rcx # 0x20a81
movl $0x34, %edx
callq 0x2180
| codegen_generate_let:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test rdi, rdi
jz loc_13BD1
mov r14, rsi
test rsi, rsi
jz loc_13BF0
cmp dword ptr [r14], 0Dh
jnz loc_13C0F
mov rbx, rdi
call codegen_context_get_output
mov r15, rax
lea rdi, asc_1F0A9; "({ "
mov esi, 3
mov edx, 1
mov rcx, rax
call _fwrite
cmp qword ptr [r14+58h], 0
jz loc_13B93
xor r12d, r12d
loc_13AD5:
mov rax, [r14+48h]
mov rcx, [r14+50h]
mov r13, [rax+r12*8]
mov rbp, [rcx+r12*8]
mov rdi, rbx
call codegen_context_get_type_context
mov rdi, rax
mov rsi, r13
call type_inference_get_type
test rax, rax
jz short loc_13B1B
mov rdi, rax
call codegen_type_to_c_type
mov rdi, r15
lea rsi, aS_1; "%s "
mov rdx, rax
xor eax, eax
call _fprintf
jmp short loc_13B34
loc_13B1B:
mov esi, 4
mov edx, 1
lea rdi, aInt_0; "int "
mov rcx, r15
call _fwrite
loc_13B34:
cmp dword ptr [rbp+0], 6
jnz short loc_13B4A
mov rdx, [rbp+48h]
mov rdi, r15
lea rsi, aS_2+4; "%s = "
jmp short loc_13B57
loc_13B4A:
mov rdi, r15
lea rsi, aLetVarZu; "_let_var_%zu = "
mov rdx, r12
loc_13B57:
xor eax, eax
call _fprintf
mov rdi, rbx
mov rsi, r13
call codegen_generate_expression
test al, al
jz short loc_13BC0
mov esi, 2
mov edx, 1
lea rdi, aCharBuffer1024+19h; "; "
mov rcx, r15
call _fwrite
inc r12
cmp r12, [r14+58h]
jb loc_13AD5
loc_13B93:
mov rsi, [r14+60h]
mov rdi, rbx
call codegen_generate_expression
test al, al
jz short loc_13BC0
lea rdi, aVectorFGetComp_0+4Eh; "; })"
mov esi, 4
mov edx, 1
mov rcx, r15
call _fwrite
mov al, 1
jmp short loc_13BC2
loc_13BC0:
xor eax, eax
loc_13BC2:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_13BD1:
lea rdi, aContextNull; "context != NULL"
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolCodegenGen_22; "_Bool codegen_generate_let(CodegenConte"...
mov edx, 32h ; '2'
call ___assert_fail
loc_13BF0:
lea rdi, aNodeNull; "node != NULL"
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolCodegenGen_22; "_Bool codegen_generate_let(CodegenConte"...
mov edx, 33h ; '3'
call ___assert_fail
loc_13C0F:
lea rdi, aNodeTypeAstLet; "node->type == AST_LET"
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolCodegenGen_22; "_Bool codegen_generate_let(CodegenConte"...
mov edx, 34h ; '4'
call ___assert_fail
| char codegen_generate_let(long long a1, long long a2)
{
long long output; // r15
long long v3; // r12
_DWORD *v4; // r13
long long v5; // rbp
_QWORD *type_context; // rax
long long type; // rax
long long v8; // rdx
const char *v9; // rax
if ( !a1 )
__assert_fail(
"context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/blocks.c",
50LL,
"_Bool codegen_generate_let(CodegenContext *, const AstNode *)");
if ( !a2 )
__assert_fail(
"node != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/blocks.c",
51LL,
"_Bool codegen_generate_let(CodegenContext *, const AstNode *)");
if ( *(_DWORD *)a2 != 13 )
__assert_fail(
"node->type == AST_LET",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/blocks.c",
52LL,
"_Bool codegen_generate_let(CodegenContext *, const AstNode *)");
output = codegen_context_get_output(a1);
fwrite("({ ", 3LL, 1LL, output);
if ( *(_QWORD *)(a2 + 88) )
{
v3 = 0LL;
while ( 1 )
{
v4 = *(_DWORD **)(*(_QWORD *)(a2 + 72) + 8 * v3);
v5 = *(_QWORD *)(*(_QWORD *)(a2 + 80) + 8 * v3);
type_context = (_QWORD *)codegen_context_get_type_context(a1);
type = type_inference_get_type(type_context, (long long)v4);
if ( type )
{
v9 = (const char *)codegen_type_to_c_type(type, v4, v8);
fprintf(output, "%s ", v9);
}
else
{
fwrite("int ", 4LL, 1LL, output);
}
if ( *(_DWORD *)v5 == 6 )
fprintf(output, "%s = ", *(_QWORD *)(v5 + 72));
else
fprintf(output, "_let_var_%zu = ", v3);
if ( !(unsigned __int8)codegen_generate_expression(a1, v4) )
break;
fwrite("; ", 2LL, 1LL, output);
if ( (unsigned long long)++v3 >= *(_QWORD *)(a2 + 88) )
goto LABEL_14;
}
}
else
{
LABEL_14:
if ( (unsigned __int8)codegen_generate_expression(a1, *(_DWORD **)(a2 + 96)) )
{
fwrite("; })", 4LL, 1LL, output);
return 1;
}
}
return 0;
}
| codegen_generate_let:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x00113bd1
MOV R14,RSI
TEST RSI,RSI
JZ 0x00113bf0
CMP dword ptr [R14],0xd
JNZ 0x00113c0f
MOV RBX,RDI
CALL 0x0010b394
MOV R15,RAX
LEA RDI,[0x11f0a9]
MOV ESI,0x3
MOV EDX,0x1
MOV RCX,RAX
CALL 0x001022c0
CMP qword ptr [R14 + 0x58],0x0
JZ 0x00113b93
XOR R12D,R12D
LAB_00113ad5:
MOV RAX,qword ptr [R14 + 0x48]
MOV RCX,qword ptr [R14 + 0x50]
MOV R13,qword ptr [RAX + R12*0x8]
MOV RBP,qword ptr [RCX + R12*0x8]
MOV RDI,RBX
CALL 0x0010b36a
MOV RDI,RAX
MOV RSI,R13
CALL 0x00108c5e
TEST RAX,RAX
JZ 0x00113b1b
MOV RDI,RAX
CALL 0x00114cec
MOV RDI,R15
LEA RSI,[0x11d76b]
MOV RDX,RAX
XOR EAX,EAX
CALL 0x00102200
JMP 0x00113b34
LAB_00113b1b:
MOV ESI,0x4
MOV EDX,0x1
LEA RDI,[0x120ad5]
MOV RCX,R15
CALL 0x001022c0
LAB_00113b34:
CMP dword ptr [RBP],0x6
JNZ 0x00113b4a
MOV RDX,qword ptr [RBP + 0x48]
MOV RDI,R15
LEA RSI,[0x11d963]
JMP 0x00113b57
LAB_00113b4a:
MOV RDI,R15
LEA RSI,[0x120ada]
MOV RDX,R12
LAB_00113b57:
XOR EAX,EAX
CALL 0x00102200
MOV RDI,RBX
MOV RSI,R13
CALL 0x00110f0c
TEST AL,AL
JZ 0x00113bc0
MOV ESI,0x2
MOV EDX,0x1
LEA RDI,[0x1203cf]
MOV RCX,R15
CALL 0x001022c0
INC R12
CMP R12,qword ptr [R14 + 0x58]
JC 0x00113ad5
LAB_00113b93:
MOV RSI,qword ptr [R14 + 0x60]
MOV RDI,RBX
CALL 0x00110f0c
TEST AL,AL
JZ 0x00113bc0
LEA RDI,[0x120557]
MOV ESI,0x4
MOV EDX,0x1
MOV RCX,R15
CALL 0x001022c0
MOV AL,0x1
JMP 0x00113bc2
LAB_00113bc0:
XOR EAX,EAX
LAB_00113bc2:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00113bd1:
LEA RDI,[0x119d5f]
LEA RSI,[0x1209d2]
LEA RCX,[0x120a81]
MOV EDX,0x32
CALL 0x00102180
LAB_00113bf0:
LEA RDI,[0x11b8cf]
LEA RSI,[0x1209d2]
LEA RCX,[0x120a81]
MOV EDX,0x33
CALL 0x00102180
LAB_00113c0f:
LEA RDI,[0x120abf]
LEA RSI,[0x1209d2]
LEA RCX,[0x120a81]
MOV EDX,0x34
CALL 0x00102180
|
int8 codegen_generate_let(long param_1,int *param_2)
{
int *piVar1;
char cVar2;
FILE *__s;
int8 uVar3;
long lVar4;
int8 uVar5;
ulong uVar6;
char *__format;
ulong uVar7;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/blocks.c"
,0x32,"_Bool codegen_generate_let(CodegenContext *, const AstNode *)");
}
if (param_2 == (int *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("node != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/blocks.c"
,0x33,"_Bool codegen_generate_let(CodegenContext *, const AstNode *)");
}
if (*param_2 != 0xd) {
/* WARNING: Subroutine does not return */
__assert_fail("node->type == AST_LET",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/blocks.c"
,0x34,"_Bool codegen_generate_let(CodegenContext *, const AstNode *)");
}
__s = (FILE *)codegen_context_get_output();
fwrite(&DAT_0011f0a9,3,1,__s);
if (*(long *)(param_2 + 0x16) != 0) {
uVar7 = 0;
do {
uVar5 = *(int8 *)(*(long *)(param_2 + 0x12) + uVar7 * 8);
piVar1 = *(int **)(*(long *)(param_2 + 0x14) + uVar7 * 8);
uVar3 = codegen_context_get_type_context(param_1);
lVar4 = type_inference_get_type(uVar3,uVar5);
if (lVar4 == 0) {
fwrite(&DAT_00120ad5,4,1,__s);
}
else {
uVar3 = codegen_type_to_c_type(lVar4);
fprintf(__s,"%s ",uVar3);
}
if (*piVar1 == 6) {
__format = "%s = ";
uVar6 = *(ulong *)(piVar1 + 0x12);
}
else {
__format = "_let_var_%zu = ";
uVar6 = uVar7;
}
fprintf(__s,__format,uVar6);
cVar2 = codegen_generate_expression(param_1,uVar5);
if (cVar2 == '\0') goto LAB_00113bc0;
fwrite("; ",2,1,__s);
uVar7 = uVar7 + 1;
} while (uVar7 < *(ulong *)(param_2 + 0x16));
}
cVar2 = codegen_generate_expression(param_1,*(int8 *)(param_2 + 0x18));
if (cVar2 == '\0') {
LAB_00113bc0:
uVar5 = 0;
}
else {
fwrite("; })",4,1,__s);
uVar5 = 1;
}
return uVar5;
}
|
|
5,719 | get_simple_collation_handler_by_flags | eloqsql/mysys/charset.c | static MY_COLLATION_HANDLER *get_simple_collation_handler_by_flags(uint flags)
{
return flags & MY_CS_BINSORT ?
(flags & MY_CS_NOPAD ?
&my_collation_8bit_nopad_bin_handler :
&my_collation_8bit_bin_handler) :
(flags & MY_CS_NOPAD ?
&my_collation_8bit_simple_nopad_ci_handler :
&my_collation_8bit_simple_ci_handler);
} | O0 | c | get_simple_collation_handler_by_flags:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x65586
movl -0x4(%rbp), %edx
andl $0x20000, %edx # imm = 0x20000
leaq 0x16923e(%rip), %rax # 0x1ce7b0
leaq 0x1692a7(%rip), %rcx # 0x1ce820
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x655a8
movl -0x4(%rbp), %edx
andl $0x20000, %edx # imm = 0x20000
leaq 0x167092(%rip), %rax # 0x1cc628
leaq 0x1670fb(%rip), %rcx # 0x1cc698
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nop
| get_simple_collation_handler_by_flags:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
and eax, 10h
cmp eax, 0
jz short loc_65586
mov edx, [rbp+var_4]
and edx, 20000h
lea rax, my_collation_8bit_bin_handler
lea rcx, my_collation_8bit_nopad_bin_handler
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_10], rax
jmp short loc_655A8
loc_65586:
mov edx, [rbp+var_4]
and edx, 20000h
lea rax, my_collation_8bit_simple_ci_handler
lea rcx, my_collation_8bit_simple_nopad_ci_handler
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_10], rax
loc_655A8:
mov rax, [rbp+var_10]
pop rbp
retn
| long long ( ** get_simple_collation_handler_by_flags(int a1))()
{
long long ( **v1)(); // rax
long long ( **v2)(); // rax
if ( (a1 & 0x10) != 0 )
{
v1 = my_collation_8bit_bin_handler;
if ( (a1 & 0x20000) != 0 )
return my_collation_8bit_nopad_bin_handler;
return v1;
}
else
{
v2 = my_collation_8bit_simple_ci_handler;
if ( (a1 & 0x20000) != 0 )
return my_collation_8bit_simple_nopad_ci_handler;
return v2;
}
}
| get_simple_collation_handler_by_flags:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x10
CMP EAX,0x0
JZ 0x00165586
MOV EDX,dword ptr [RBP + -0x4]
AND EDX,0x20000
LEA RAX,[0x2ce7b0]
LEA RCX,[0x2ce820]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001655a8
LAB_00165586:
MOV EDX,dword ptr [RBP + -0x4]
AND EDX,0x20000
LEA RAX,[0x2cc628]
LEA RCX,[0x2cc698]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
LAB_001655a8:
MOV RAX,qword ptr [RBP + -0x10]
POP RBP
RET
|
int1 * get_simple_collation_handler_by_flags(uint param_1)
{
int1 *local_18;
if ((param_1 & 0x10) == 0) {
local_18 = my_collation_8bit_simple_ci_handler;
if ((param_1 & 0x20000) != 0) {
local_18 = my_collation_8bit_simple_nopad_ci_handler;
}
}
else {
local_18 = my_collation_8bit_bin_handler;
if ((param_1 & 0x20000) != 0) {
local_18 = my_collation_8bit_nopad_bin_handler;
}
}
return local_18;
}
|
|
5,720 | httplib::detail::make_content_range_header_field[abi:cxx11](unsigned long, unsigned long, unsigned long) | nickolajgrishuk[P]metricz-cpp/build_O2/_deps/httplib-src/httplib.h | inline std::string make_content_range_header_field(size_t offset, size_t length,
size_t content_length) {
std::string field = "bytes ";
field += std::to_string(offset);
field += "-";
field += std::to_string(offset + length - 1);
field += "/";
field += std::to_string(content_length);
return field;
} | O2 | c | httplib::detail::make_content_range_header_field[abi:cxx11](unsigned long, unsigned long, unsigned long):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10103(%rip), %rsi # 0x292ef
leaq 0x8(%rsp), %rdx
callq 0x8220
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x192e5
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8a70
leaq 0x8(%rsp), %rdi
callq 0x8ac8
leaq 0x100d6(%rip), %rsi # 0x292f7
movq %rbx, %rdi
callq 0x8a50
leaq (%r12,%r15), %rsi
decq %rsi
leaq 0x8(%rsp), %rdi
callq 0x192e5
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8a70
leaq 0x8(%rsp), %rdi
callq 0x8ac8
leaq 0xf1d6(%rip), %rsi # 0x2842e
movq %rbx, %rdi
callq 0x8a50
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x192e5
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8a70
leaq 0x8(%rsp), %rdi
callq 0x8ac8
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x1929b
jmp 0x192ac
jmp 0x1929b
jmp 0x192ac
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x8ac8
jmp 0x192af
jmp 0x192ac
movq %rax, %r14
movq %rbx, %rdi
callq 0x8ac8
movq %r14, %rdi
callq 0x89d0
| _ZN7httplib6detail31make_content_range_header_fieldB5cxx11Emmm:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
lea rsi, aBytes_0; "bytes "
lea rdx, [rsp+48h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
lea rdi, [rsp+48h+var_40]; this
mov rsi, r12; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+48h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rsi, asc_292F6+1; "-"
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rsi, [r12+r15]
dec rsi; unsigned __int64
lea rdi, [rsp+48h+var_40]; this
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+48h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rsi, aHttpHttp+10h; "/"
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rsp+48h+var_40]; this
mov rsi, r14; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rsi, [rsp+48h+var_40]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
lea rdi, [rsp+48h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short loc_1929B
jmp short loc_192AC
jmp short loc_1929B
jmp short loc_192AC
loc_1929B:
mov r14, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_192AF
jmp short $+2
loc_192AC:
mov r14, rax
loc_192AF:
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| long long httplib::detail::make_content_range_header_field[abi:cxx11](
long long a1,
unsigned long long a2,
long long a3,
unsigned long long a4)
{
_BYTE v7[64]; // [rsp+8h] [rbp-40h] BYREF
std::string::basic_string(a1, "bytes ", v7);
std::to_string((std::__cxx11 *)v7, a2);
std::string::append(a1, v7);
std::string::~string(v7);
std::string::append(a1, "-");
std::to_string((std::__cxx11 *)v7, a2 + a3 - 1);
std::string::append(a1, v7);
std::string::~string(v7);
std::string::append(a1, "/");
std::to_string((std::__cxx11 *)v7, a4);
std::string::append(a1, v7);
std::string::~string(v7);
return a1;
}
| make_content_range_header_field[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
LEA RSI,[0x1292ef]
LEA RDX,[RSP + 0x8]
CALL 0x00108220
LAB_001191f6:
LEA RDI,[RSP + 0x8]
MOV RSI,R12
CALL 0x001192e5
LAB_00119203:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00108a70
LEA RDI,[RSP + 0x8]
CALL 0x00108ac8
LAB_0011921a:
LEA RSI,[0x1292f7]
MOV RDI,RBX
CALL 0x00108a50
LEA RSI,[R12 + R15*0x1]
DEC RSI
LAB_00119230:
LEA RDI,[RSP + 0x8]
CALL 0x001192e5
LAB_0011923a:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00108a70
LEA RDI,[RSP + 0x8]
CALL 0x00108ac8
LAB_00119251:
LEA RSI,[0x12842e]
MOV RDI,RBX
CALL 0x00108a50
LAB_00119260:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x001192e5
LAB_0011926d:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00108a70
LAB_0011927a:
LEA RDI,[RSP + 0x8]
CALL 0x00108ac8
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* httplib::detail::make_content_range_header_field[abi:cxx11](unsigned long, unsigned long,
unsigned long) */
detail * __thiscall
httplib::detail::make_content_range_header_field_abi_cxx11_
(detail *this,ulong param_1,ulong param_2,ulong param_3)
{
allocator local_40 [32];
std::__cxx11::string::string((string *)this,"bytes ",local_40);
/* try { // try from 001191f6 to 00119202 has its CatchHandler @ 001192aa */
std::__cxx11::to_string((__cxx11 *)local_40,param_1);
/* try { // try from 00119203 to 0011920f has its CatchHandler @ 0011929b */
std::__cxx11::string::append((string *)this);
std::__cxx11::string::~string((string *)local_40);
/* try { // try from 0011921a to 00119228 has its CatchHandler @ 001192ac */
std::__cxx11::string::append((char *)this);
/* try { // try from 00119230 to 00119239 has its CatchHandler @ 00119299 */
std::__cxx11::to_string((__cxx11 *)local_40,(param_1 + param_2) - 1);
/* try { // try from 0011923a to 00119246 has its CatchHandler @ 00119297 */
std::__cxx11::string::append((string *)this);
std::__cxx11::string::~string((string *)local_40);
/* try { // try from 00119251 to 0011925f has its CatchHandler @ 001192ac */
std::__cxx11::string::append((char *)this);
/* try { // try from 00119260 to 0011926c has its CatchHandler @ 00119295 */
std::__cxx11::to_string((__cxx11 *)local_40,param_3);
/* try { // try from 0011926d to 00119279 has its CatchHandler @ 00119293 */
std::__cxx11::string::append((string *)this);
std::__cxx11::string::~string((string *)local_40);
return this;
}
|
|
5,721 | escape_quotes_for_mysql | eloqsql/mysys/charset.c | size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length,
const char *from, size_t length,
my_bool *overflow)
{
const char *to_start= to;
const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);
#ifdef USE_MB
my_bool use_mb_flag= my_ci_use_mb(charset_info);
#endif
*overflow= FALSE;
for (end= from + length; from < end; from++)
{
#ifdef USE_MB
int tmp_length;
if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end)))
{
if (to + tmp_length > to_end)
{
*overflow= TRUE;
break;
}
while (tmp_length--)
*to++= *from++;
from--;
continue;
}
/*
We don't have the same issue here with a non-multi-byte character being
turned into a multi-byte character by the addition of an escaping
character, because we are only escaping the ' character with itself.
*/
#endif
if (*from == '\'')
{
if (to + 2 > to_end)
{
*overflow= TRUE;
break;
}
*to++= '\'';
*to++= '\'';
}
else
{
if (to + 1 > to_end)
{
*overflow= TRUE;
break;
}
*to++= *from;
}
}
*to= 0;
return (size_t) (to - to_start);
} | O0 | c | escape_quotes_for_mysql:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xa95d5
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0xa95e0
movq -0x28(%rbp), %rax
shlq %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa9750
movb %al, -0x49(%rbp)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0xa9729
movsbl -0x49(%rbp), %eax
cmpl $0x0, %eax
je 0xa969f
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0xa9780
movl %eax, -0x50(%rbp)
cmpl $0x0, %eax
je 0xa969f
movq -0x10(%rbp), %rax
movslq -0x50(%rbp), %rcx
addq %rcx, %rax
cmpq -0x48(%rbp), %rax
jbe 0xa965b
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0xa9729
jmp 0xa965d
movl -0x50(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x50(%rbp)
cmpl $0x0, %eax
je 0xa9691
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0xa965d
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xa9718
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0xa96e8
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x48(%rbp), %rax
jbe 0xa96c2
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0xa9729
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x27, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x27, (%rax)
jmp 0xa9716
movq -0x10(%rbp), %rax
addq $0x1, %rax
cmpq -0x48(%rbp), %rax
jbe 0xa96ff
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0xa9729
movq -0x20(%rbp), %rax
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0xa9718
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xa960e
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| escape_quotes_for_mysql:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
cmp [rbp+var_18], 0
jz short loc_A95D5
mov rax, [rbp+var_18]
sub rax, 1
mov [rbp+var_60], rax
jmp short loc_A95E0
loc_A95D5:
mov rax, [rbp+var_28]
shl rax, 1
mov [rbp+var_60], rax
loc_A95E0:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_60]
add rax, rcx
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
call my_ci_use_mb
mov [rbp+var_49], al
mov rax, [rbp+var_30]
mov byte ptr [rax], 0
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_40], rax
loc_A960E:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
jnb loc_A9729
movsx eax, [rbp+var_49]
cmp eax, 0
jz short loc_A969F
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_40]
call my_ismbchar
mov [rbp+var_50], eax
cmp eax, 0
jz short loc_A969F
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_50]
add rax, rcx
cmp rax, [rbp+var_48]
jbe short loc_A965B
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp loc_A9729
loc_A965B:
jmp short $+2
loc_A965D:
mov eax, [rbp+var_50]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_50], ecx
cmp eax, 0
jz short loc_A9691
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_A965D
loc_A9691:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp short loc_A9718
loc_A969F:
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jnz short loc_A96E8
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_48]
jbe short loc_A96C2
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_A9729
loc_A96C2:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 27h ; '''
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 27h ; '''
jmp short loc_A9716
loc_A96E8:
mov rax, [rbp+var_10]
add rax, 1
cmp rax, [rbp+var_48]
jbe short loc_A96FF
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_A9729
loc_A96FF:
mov rax, [rbp+var_20]
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
loc_A9716:
jmp short $+2
loc_A9718:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_A960E
loc_A9729:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
sub rax, rcx
add rsp, 60h
pop rbp
retn
| _BYTE * escape_quotes_for_mysql(long long a1, char *a2, long long a3, char *a4, long long a5, _BYTE *a6)
{
char *v7; // rax
char v8; // cl
char *v9; // rax
_BYTE *v10; // rax
char *v11; // rax
long long v13; // [rsp+0h] [rbp-60h]
int v14; // [rsp+10h] [rbp-50h]
char v15; // [rsp+17h] [rbp-49h]
unsigned long long v16; // [rsp+18h] [rbp-48h]
char *v17; // [rsp+20h] [rbp-40h]
char *v21; // [rsp+50h] [rbp-10h]
v21 = a2;
if ( a3 )
v13 = a3 - 1;
else
v13 = 2 * a5;
v16 = (unsigned long long)&a2[v13];
v15 = my_ci_use_mb(a1);
*a6 = 0;
v17 = &a4[a5];
while ( a4 < v17 )
{
if ( v15 && (v14 = my_ismbchar(a1, a4, v17)) != 0 )
{
if ( (unsigned long long)&v21[v14] > v16 )
{
*a6 = 1;
break;
}
while ( v14-- )
{
v7 = a4++;
v8 = *v7;
v9 = v21++;
*v9 = v8;
}
--a4;
}
else if ( *a4 == 39 )
{
if ( (unsigned long long)(v21 + 2) > v16 )
{
*a6 = 1;
break;
}
*v21 = 39;
v10 = v21 + 1;
v21 += 2;
*v10 = 39;
}
else
{
if ( (unsigned long long)(v21 + 1) > v16 )
{
*a6 = 1;
break;
}
v11 = v21++;
*v11 = *a4;
}
++a4;
}
*v21 = 0;
return (_BYTE *)(v21 - a2);
}
| escape_quotes_for_mysql:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001a95d5
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001a95e0
LAB_001a95d5:
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
LAB_001a95e0:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x60]
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001a9750
MOV byte ptr [RBP + -0x49],AL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
LAB_001a960e:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001a9729
MOVSX EAX,byte ptr [RBP + -0x49]
CMP EAX,0x0
JZ 0x001a969f
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x001a9780
MOV dword ptr [RBP + -0x50],EAX
CMP EAX,0x0
JZ 0x001a969f
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x50]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x001a965b
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x001a9729
LAB_001a965b:
JMP 0x001a965d
LAB_001a965d:
MOV EAX,dword ptr [RBP + -0x50]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x50],ECX
CMP EAX,0x0
JZ 0x001a9691
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x001a965d
LAB_001a9691:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001a9718
LAB_001a969f:
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JNZ 0x001a96e8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x001a96c2
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x001a9729
LAB_001a96c2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x27
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x27
JMP 0x001a9716
LAB_001a96e8:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x001a96ff
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x001a9729
LAB_001a96ff:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
LAB_001a9716:
JMP 0x001a9718
LAB_001a9718:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001a960e
LAB_001a9729:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long escape_quotes_for_mysql
(int8 param_1,char *param_2,long param_3,char *param_4,long param_5,
int1 *param_6)
{
char cVar1;
char *pcVar2;
long local_68;
int local_58;
char *local_28;
char *local_18;
if (param_3 == 0) {
local_68 = param_5 << 1;
}
else {
local_68 = param_3 + -1;
}
pcVar2 = param_2 + local_68;
cVar1 = my_ci_use_mb(param_1);
*param_6 = 0;
local_28 = param_4;
local_18 = param_2;
do {
if (param_4 + param_5 <= local_28) {
LAB_001a9729:
*local_18 = '\0';
return (long)local_18 - (long)param_2;
}
if ((cVar1 == '\0') ||
(local_58 = my_ismbchar(param_1,local_28,param_4 + param_5), local_58 == 0)) {
if (*local_28 == '\'') {
if (pcVar2 < local_18 + 2) {
*param_6 = 1;
goto LAB_001a9729;
}
*local_18 = '\'';
local_18[1] = '\'';
local_18 = local_18 + 2;
}
else {
if (pcVar2 < local_18 + 1) {
*param_6 = 1;
goto LAB_001a9729;
}
*local_18 = *local_28;
local_18 = local_18 + 1;
}
}
else {
if (pcVar2 < local_18 + local_58) {
*param_6 = 1;
goto LAB_001a9729;
}
while (local_58 != 0) {
*local_18 = *local_28;
local_58 = local_58 + -1;
local_28 = local_28 + 1;
local_18 = local_18 + 1;
}
local_28 = local_28 + -1;
}
local_28 = local_28 + 1;
} while( true );
}
|
|
5,722 | release_rdlock | eloqsql/storage/maria/ma_pagecache.c | static void release_rdlock(PAGECACHE_BLOCK_LINK *block)
{
DBUG_ENTER("release_wrlock");
PCBLOCK_INFO(block);
if (block->wlocks)
{
DBUG_ASSERT(pthread_equal(block->write_locker, pthread_self()));
DBUG_ASSERT(block->rlocks == 0);
DBUG_ASSERT(block->rlocks_queue > 0);
block->rlocks_queue--;
DBUG_PRINT("info", ("RD lock queue decreased, block %p", block));
DBUG_VOID_RETURN;
}
DBUG_ASSERT(block->rlocks > 0);
DBUG_ASSERT(block->rlocks_queue == 0);
block->rlocks--;
DBUG_PRINT("info", ("RD lock decreased, block %p", block));
if (block->rlocks > 0)
DBUG_VOID_RETURN; /* Multiple write locked */
DBUG_PRINT("info", ("RD lock reset, block %p", block));
/* release all threads waiting for read lock or one waiting for write */
if (block->wqueue[COND_FOR_WRLOCK].last_thread)
wqueue_release_one_locktype_from_queue(&block->wqueue[COND_FOR_WRLOCK]);
PCBLOCK_INFO(block);
DBUG_VOID_RETURN;
} | O0 | c | release_rdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x3ecbe
movq -0x8(%rbp), %rax
cmpl $0x0, 0x68(%rax)
je 0x3ece7
jmp 0x3ecca
jmp 0x3eccc
jmp 0x3ecce
jmp 0x3ecd0
jmp 0x3ecd2
jmp 0x3ecd4
movq -0x8(%rbp), %rax
movl 0x70(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x70(%rax)
jmp 0x3ece3
jmp 0x3ece5
jmp 0x3ed34
jmp 0x3ece9
jmp 0x3eceb
jmp 0x3eced
jmp 0x3ecef
movq -0x8(%rbp), %rax
movl 0x6c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x6c(%rax)
jmp 0x3ecfe
movq -0x8(%rbp), %rax
cmpl $0x0, 0x6c(%rax)
jbe 0x3ed0c
jmp 0x3ed0a
jmp 0x3ed34
jmp 0x3ed0e
jmp 0x3ed10
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x3ed2c
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
addq $0x10, %rdi
callq 0x1061d0
jmp 0x3ed2e
jmp 0x3ed30
jmp 0x3ed32
jmp 0x3ed34
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| release_rdlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_3ECBE:
mov rax, [rbp+var_8]
cmp dword ptr [rax+68h], 0
jz short loc_3ECE7
jmp short $+2
loc_3ECCA:
jmp short $+2
loc_3ECCC:
jmp short $+2
loc_3ECCE:
jmp short $+2
loc_3ECD0:
jmp short $+2
loc_3ECD2:
jmp short $+2
loc_3ECD4:
mov rax, [rbp+var_8]
mov ecx, [rax+70h]
add ecx, 0FFFFFFFFh
mov [rax+70h], ecx
jmp short $+2
loc_3ECE3:
jmp short $+2
loc_3ECE5:
jmp short loc_3ED34
loc_3ECE7:
jmp short $+2
loc_3ECE9:
jmp short $+2
loc_3ECEB:
jmp short $+2
loc_3ECED:
jmp short $+2
loc_3ECEF:
mov rax, [rbp+var_8]
mov ecx, [rax+6Ch]
add ecx, 0FFFFFFFFh
mov [rax+6Ch], ecx
jmp short $+2
loc_3ECFE:
mov rax, [rbp+var_8]
cmp dword ptr [rax+6Ch], 0
jbe short loc_3ED0C
jmp short $+2
loc_3ED0A:
jmp short loc_3ED34
loc_3ED0C:
jmp short $+2
loc_3ED0E:
jmp short $+2
loc_3ED10:
mov rax, [rbp+var_8]
cmp qword ptr [rax+58h], 0
jz short loc_3ED2C
mov rdi, [rbp+var_8]
add rdi, 48h ; 'H'
add rdi, 10h
call wqueue_release_one_locktype_from_queue
loc_3ED2C:
jmp short $+2
loc_3ED2E:
jmp short $+2
loc_3ED30:
jmp short $+2
loc_3ED32:
jmp short $+2
loc_3ED34:
add rsp, 10h
pop rbp
retn
| long long release_rdlock(long long a1)
{
long long result; // rax
if ( *(_DWORD *)(a1 + 104) )
{
result = a1;
--*(_DWORD *)(a1 + 112);
}
else
{
--*(_DWORD *)(a1 + 108);
result = a1;
if ( !*(_DWORD *)(a1 + 108) )
{
result = a1;
if ( *(_QWORD *)(a1 + 88) )
return wqueue_release_one_locktype_from_queue(a1 + 88);
}
}
return result;
}
| release_rdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0013ecbe
LAB_0013ecbe:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x68],0x0
JZ 0x0013ece7
JMP 0x0013ecca
LAB_0013ecca:
JMP 0x0013eccc
LAB_0013eccc:
JMP 0x0013ecce
LAB_0013ecce:
JMP 0x0013ecd0
LAB_0013ecd0:
JMP 0x0013ecd2
LAB_0013ecd2:
JMP 0x0013ecd4
LAB_0013ecd4:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x70]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x70],ECX
JMP 0x0013ece3
LAB_0013ece3:
JMP 0x0013ece5
LAB_0013ece5:
JMP 0x0013ed34
LAB_0013ece7:
JMP 0x0013ece9
LAB_0013ece9:
JMP 0x0013eceb
LAB_0013eceb:
JMP 0x0013eced
LAB_0013eced:
JMP 0x0013ecef
LAB_0013ecef:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x6c]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x6c],ECX
JMP 0x0013ecfe
LAB_0013ecfe:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x6c],0x0
JBE 0x0013ed0c
JMP 0x0013ed0a
LAB_0013ed0a:
JMP 0x0013ed34
LAB_0013ed0c:
JMP 0x0013ed0e
LAB_0013ed0e:
JMP 0x0013ed10
LAB_0013ed10:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x58],0x0
JZ 0x0013ed2c
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x48
ADD RDI,0x10
CALL 0x002061d0
LAB_0013ed2c:
JMP 0x0013ed2e
LAB_0013ed2e:
JMP 0x0013ed30
LAB_0013ed30:
JMP 0x0013ed32
LAB_0013ed32:
JMP 0x0013ed34
LAB_0013ed34:
ADD RSP,0x10
POP RBP
RET
|
void release_rdlock(long param_1)
{
if (*(int *)(param_1 + 0x68) == 0) {
*(int *)(param_1 + 0x6c) = *(int *)(param_1 + 0x6c) + -1;
if ((*(int *)(param_1 + 0x6c) == 0) && (*(long *)(param_1 + 0x58) != 0)) {
wqueue_release_one_locktype_from_queue(param_1 + 0x58);
}
}
else {
*(int *)(param_1 + 0x70) = *(int *)(param_1 + 0x70) + -1;
}
return;
}
|
|
5,723 | my_fprintf | eloqsql/strings/my_vsnprintf.c | int my_fprintf(FILE *stream, const char* format, ...)
{
int result;
va_list args;
va_start(args, format);
result= my_vfprintf(stream, format, args);
va_end(args);
return result;
} | O0 | c | my_fprintf:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x7fcc8
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)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x30, -0x2c(%rbp)
movl $0x10, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x7fae0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
| my_fprintf:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_7FCC8
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_7FCC8:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, [rbp+var_E0]
mov [rbp+var_20], rax
lea rax, [rbp+arg_0]
mov [rbp+var_28], rax
mov [rbp+var_2C], 30h ; '0'
mov [rbp+var_30], 10h
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_30]
call my_vfprintf
mov [rbp+var_14], eax
mov eax, [rbp+var_14]
add rsp, 0E0h
pop rbp
retn
| long long my_fprintf(
long long a1,
char *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-E0h] BYREF
long long v17; // [rsp+10h] [rbp-D0h]
long long v18; // [rsp+18h] [rbp-C8h]
long long v19; // [rsp+20h] [rbp-C0h]
long long v20; // [rsp+28h] [rbp-B8h]
__m128 v21; // [rsp+30h] [rbp-B0h]
__m128 v22; // [rsp+40h] [rbp-A0h]
__m128 v23; // [rsp+50h] [rbp-90h]
__m128 v24; // [rsp+60h] [rbp-80h]
__m128 v25; // [rsp+70h] [rbp-70h]
__m128 v26; // [rsp+80h] [rbp-60h]
__m128 v27; // [rsp+90h] [rbp-50h]
__m128 v28; // [rsp+A0h] [rbp-40h]
int v29[2]; // [rsp+B0h] [rbp-30h] BYREF
char *v30; // [rsp+B8h] [rbp-28h]
char *v31; // [rsp+C0h] [rbp-20h]
char *v32; // [rsp+D0h] [rbp-10h]
long long v33; // [rsp+D8h] [rbp-8h]
v21 = a7;
v22 = a8;
v23 = a9;
v24 = a10;
v25 = a11;
v26 = a12;
v27 = a13;
v28 = a14;
v20 = a6;
v19 = a5;
v18 = a4;
v17 = a3;
v33 = a1;
v32 = a2;
v31 = &v16;
v30 = &a15;
v29[1] = 48;
v29[0] = 16;
return (unsigned int)my_vfprintf(a1, a2, v29);
}
| my_fprintf:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x0017fcc8
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_0017fcc8:
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 qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0xe0]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0x2c],0x30
MOV dword ptr [RBP + -0x30],0x10
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x30]
CALL 0x0017fae0
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0xe0
POP RBP
RET
|
int4
my_fprintf(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int4 uVar1;
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;
int8 local_18;
int8 local_10;
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_10 = param_9;
uVar1 = my_vfprintf(param_9,param_10,&local_38);
return uVar1;
}
|
|
5,724 | my_hash_free | eloqsql/mysys/hash.c | void my_hash_free(HASH *hash)
{
DBUG_ENTER("my_hash_free");
DBUG_PRINT("enter",("hash:%p elements: %ld",
hash, hash->records));
my_hash_free_elements(hash);
hash->free= 0;
delete_dynamic(&hash->array);
hash->blength= 0;
DBUG_VOID_RETURN;
} | O3 | c | my_hash_free:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x18(%rdi), %r14d
testq %r14, %r14
je 0x93c09
movq $0x0, 0x18(%rbx)
cmpq $0x0, 0x60(%rbx)
je 0x93c09
movq 0x28(%rbx), %r15
shlq $0x4, %r14
addq %r15, %r14
movq 0x8(%r15), %rdi
addq $0x10, %r15
callq *0x60(%rbx)
cmpq %r14, %r15
jb 0x93bf9
xorl %r14d, %r14d
movq %r14, 0x60(%rbx)
leaq 0x28(%rbx), %rdi
callq 0x91df8
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_hash_free:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14d, [rdi+18h]
test r14, r14
jz short loc_93C09
mov qword ptr [rbx+18h], 0
cmp qword ptr [rbx+60h], 0
jz short loc_93C09
mov r15, [rbx+28h]
shl r14, 4
add r14, r15
loc_93BF9:
mov rdi, [r15+8]
add r15, 10h
call qword ptr [rbx+60h]
cmp r15, r14
jb short loc_93BF9
loc_93C09:
xor r14d, r14d
mov [rbx+60h], r14
lea rdi, [rbx+28h]
call delete_dynamic
mov [rbx+10h], r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_hash_free(long long a1)
{
long long v2; // r14
unsigned long long v3; // r15
unsigned long long v4; // r14
long long v5; // rdi
long long result; // rax
v2 = *(unsigned int *)(a1 + 24);
if ( *(_DWORD *)(a1 + 24) )
{
*(_QWORD *)(a1 + 24) = 0LL;
if ( *(_QWORD *)(a1 + 96) )
{
v3 = *(_QWORD *)(a1 + 40);
v4 = v3 + 16 * v2;
do
{
v5 = *(_QWORD *)(v3 + 8);
v3 += 16LL;
(*(void ( **)(long long))(a1 + 96))(v5);
}
while ( v3 < v4 );
}
}
*(_QWORD *)(a1 + 96) = 0LL;
result = delete_dynamic((long long *)(a1 + 40));
*(_QWORD *)(a1 + 16) = 0LL;
return result;
}
| my_hash_free:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14D,dword ptr [RDI + 0x18]
TEST R14,R14
JZ 0x00193c09
MOV qword ptr [RBX + 0x18],0x0
CMP qword ptr [RBX + 0x60],0x0
JZ 0x00193c09
MOV R15,qword ptr [RBX + 0x28]
SHL R14,0x4
ADD R14,R15
LAB_00193bf9:
MOV RDI,qword ptr [R15 + 0x8]
ADD R15,0x10
CALL qword ptr [RBX + 0x60]
CMP R15,R14
JC 0x00193bf9
LAB_00193c09:
XOR R14D,R14D
MOV qword ptr [RBX + 0x60],R14
LEA RDI,[RBX + 0x28]
CALL 0x00191df8
MOV qword ptr [RBX + 0x10],R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void my_hash_free(long param_1)
{
int8 *puVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
uVar2 = *(uint *)(param_1 + 0x18);
if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0))
{
uVar4 = *(ulong *)(param_1 + 0x28);
uVar3 = (ulong)uVar2 * 0x10 + uVar4;
do {
puVar1 = (int8 *)(uVar4 + 8);
uVar4 = uVar4 + 0x10;
(**(code **)(param_1 + 0x60))(*puVar1);
} while (uVar4 < uVar3);
}
*(int8 *)(param_1 + 0x60) = 0;
delete_dynamic(param_1 + 0x28);
*(int8 *)(param_1 + 0x10) = 0;
return;
}
|
|
5,725 | my_suspend_hook | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void
my_suspend_hook(my_bool suspend, void *data)
{
struct my_hook_data *hook_data= (struct my_hook_data *)data;
if (suspend)
{
hook_data->orig_pvio= hook_data->orig_mysql->net.pvio;
hook_data->orig_mysql->net.pvio= hook_data->new_mysql->net.pvio;
}
else
hook_data->orig_mysql->net.pvio= hook_data->orig_pvio;
} | O0 | c | my_suspend_hook:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpb $0x0, -0x1(%rbp)
je 0x219b5
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
jmp 0x219c7
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopl (%rax)
| my_suspend_hook:
push rbp
mov rbp, rsp
mov al, dil
mov [rbp+var_1], al
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
cmp [rbp+var_1], 0
jz short loc_219B5
mov rax, [rbp+var_18]
mov rax, [rax]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov [rax+10h], rcx
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rax], rcx
jmp short loc_219C7
loc_219B5:
mov rax, [rbp+var_18]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rax], rcx
loc_219C7:
pop rbp
retn
| _QWORD * my_suspend_hook(char a1, long long a2)
{
long long v2; // rcx
_QWORD *result; // rax
if ( a1 )
{
*(_QWORD *)(a2 + 16) = **(_QWORD **)a2;
v2 = **(_QWORD **)(a2 + 8);
}
else
{
v2 = *(_QWORD *)(a2 + 16);
}
result = *(_QWORD **)a2;
**(_QWORD **)a2 = v2;
return result;
}
| my_suspend_hook:
PUSH RBP
MOV RBP,RSP
MOV AL,DIL
MOV byte ptr [RBP + -0x1],AL
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
CMP byte ptr [RBP + -0x1],0x0
JZ 0x001219b5
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
JMP 0x001219c7
LAB_001219b5:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
LAB_001219c7:
POP RBP
RET
|
void my_suspend_hook(char param_1,int8 *param_2)
{
if (param_1 == '\0') {
*(int8 *)*param_2 = param_2[2];
}
else {
param_2[2] = *(int8 *)*param_2;
*(int8 *)*param_2 = *(int8 *)param_2[1];
}
return;
}
|
|
5,726 | blst_scalar_from_uint32 | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/exports.c | void blst_scalar_from_uint32(pow256 ret, const unsigned int a[8])
{
const union {
long one;
char little;
} is_endian = { 1 };
size_t i;
if ((uptr_t)ret==(uptr_t)a && is_endian.little)
return;
for(i = 0; i < 8; i++) {
unsigned int w = a[i];
*ret++ = (byte)w;
*ret++ = (byte)(w >> 8);
*ret++ = (byte)(w >> 16);
*ret++ = (byte)(w >> 24);
}
} | O1 | c | blst_scalar_from_uint32:
pushq %rbp
movq %rsp, %rbp
cmpq %rsi, %rdi
je 0x2579c
xorl %eax, %eax
movl (%rsi,%rax,4), %ecx
movl %ecx, (%rdi,%rax,4)
incq %rax
cmpq $0x8, %rax
jne 0x2578d
popq %rbp
retq
| blst_scalar_from_uint32:
push rbp
mov rbp, rsp
cmp rdi, rsi
jz short loc_2579C
xor eax, eax
loc_2578D:
mov ecx, [rsi+rax*4]
mov [rdi+rax*4], ecx
inc rax
cmp rax, 8
jnz short loc_2578D
loc_2579C:
pop rbp
retn
| void blst_scalar_from_uint32(long long a1, long long a2)
{
long long i; // rax
if ( a1 != a2 )
{
for ( i = 0LL; i != 8; ++i )
*(_DWORD *)(a1 + 4 * i) = *(_DWORD *)(a2 + 4 * i);
}
}
| blst_scalar_from_uint32:
PUSH RBP
MOV RBP,RSP
CMP RDI,RSI
JZ 0x0012579c
XOR EAX,EAX
LAB_0012578d:
MOV ECX,dword ptr [RSI + RAX*0x4]
MOV dword ptr [RDI + RAX*0x4],ECX
INC RAX
CMP RAX,0x8
JNZ 0x0012578d
LAB_0012579c:
POP RBP
RET
|
void blst_scalar_from_uint32(long param_1,long param_2)
{
long lVar1;
if (param_1 != param_2) {
lVar1 = 0;
do {
*(int4 *)(param_1 + lVar1 * 4) = *(int4 *)(param_2 + lVar1 * 4);
lVar1 = lVar1 + 1;
} while (lVar1 != 8);
}
return;
}
|
|
5,727 | reset_root_defaults | eloqsql/mysys/my_alloc.c | void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
size_t pre_alloc_size __attribute__((unused)))
{
DBUG_ENTER("reset_root_defaults");
DBUG_ASSERT(alloc_root_inited(mem_root));
mem_root->block_size= (((block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1) |
(mem_root->block_size & 1));
#if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG))
if (pre_alloc_size)
{
size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM));
if (!mem_root->pre_alloc || mem_root->pre_alloc->size != size)
{
USED_MEM *mem, **prev= &mem_root->free;
/*
Free unused blocks, so that consequent calls
to reset_root_defaults won't eat away memory.
*/
while (*prev)
{
mem= *prev;
if (mem->size == size)
{
/* We found a suitable block, no need to do anything else */
mem_root->pre_alloc= mem;
DBUG_VOID_RETURN;
}
if (mem->left + ALIGN_SIZE(sizeof(USED_MEM)) == mem->size)
{
/* remove block from the list and free it */
*prev= mem->next;
my_free(mem);
}
else
prev= &mem->next;
}
/* Allocate new prealloc block and add it to the end of free list */
if ((mem= (USED_MEM *) my_malloc(mem_root->m_psi_key, size,
MYF(MALLOC_FLAG(mem_root->
block_size)))))
{
mem->size= size;
mem->left= pre_alloc_size;
mem->next= *prev;
*prev= mem_root->pre_alloc= mem;
TRASH_MEM(mem);
}
else
{
mem_root->pre_alloc= 0;
}
}
}
else
#endif
mem_root->pre_alloc= 0;
DBUG_VOID_RETURN;
} | O3 | c | reset_root_defaults:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
andq $-0x2, %rsi
movq 0x20(%rdi), %rax
andl $0x1, %eax
leaq (%rsi,%rax), %rdx
addq $-0x28, %rdx
movq %rdx, 0x20(%rdi)
testq %r14, %r14
je 0x9f968
leaq 0x18(%r14), %r15
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x9f8f7
cmpq %r15, 0x10(%rax)
je 0x9f976
movq (%rbx), %rdi
movq %rbx, %r12
testq %rdi, %rdi
je 0x9f939
movq %rbx, %r12
movq 0x10(%rdi), %rax
cmpq %r15, %rax
je 0x9f972
movq 0x8(%rdi), %rcx
addq $0x18, %rcx
cmpq %rax, %rcx
jne 0x9f929
movq (%rdi), %rax
movq %rax, (%r12)
callq 0xa2cc2
jmp 0x9f92c
movq %rdi, %r12
movq (%r12), %rdi
testq %rdi, %rdi
jne 0x9f905
movq 0x20(%rbx), %rdx
movl 0x38(%rbx), %edi
andl $0x1, %edx
shll $0x10, %edx
movq %r15, %rsi
callq 0xa2a95
testq %rax, %rax
je 0x9f968
movq %r15, 0x10(%rax)
movq %r14, 0x8(%rax)
movq (%r12), %rcx
movq %rcx, (%rax)
movq %rax, 0x10(%rbx)
movq %rax, (%r12)
jmp 0x9f976
movq $0x0, 0x10(%rbx)
jmp 0x9f976
movq %rdi, 0x10(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| reset_root_defaults:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14, rdx
mov rbx, rdi
and rsi, 0FFFFFFFFFFFFFFFEh
mov rax, [rdi+20h]
and eax, 1
lea rdx, [rsi+rax]
add rdx, 0FFFFFFFFFFFFFFD8h
mov [rdi+20h], rdx
test r14, r14
jz loc_9F968
lea r15, [r14+18h]
mov rax, [rbx+10h]
test rax, rax
jz short loc_9F8F7
cmp [rax+10h], r15
jz short loc_9F976
loc_9F8F7:
mov rdi, [rbx]
mov r12, rbx
test rdi, rdi
jz short loc_9F939
mov r12, rbx
loc_9F905:
mov rax, [rdi+10h]
cmp rax, r15
jz short loc_9F972
mov rcx, [rdi+8]
add rcx, 18h
cmp rcx, rax
jnz short loc_9F929
mov rax, [rdi]
mov [r12], rax
call my_free
jmp short loc_9F92C
loc_9F929:
mov r12, rdi
loc_9F92C:
mov rdi, [r12]
test rdi, rdi
jnz short loc_9F905
mov rdx, [rbx+20h]
loc_9F939:
mov edi, [rbx+38h]
and edx, 1
shl edx, 10h
mov rsi, r15
call my_malloc
test rax, rax
jz short loc_9F968
mov [rax+10h], r15
mov [rax+8], r14
mov rcx, [r12]
mov [rax], rcx
mov [rbx+10h], rax
mov [r12], rax
jmp short loc_9F976
loc_9F968:
mov qword ptr [rbx+10h], 0
jmp short loc_9F976
loc_9F972:
mov [rbx+10h], rdi
loc_9F976:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| _QWORD * reset_root_defaults(long long a1, long long a2, long long a3)
{
_QWORD *result; // rax
unsigned long long v6; // rdx
_QWORD *v7; // r15
_QWORD *v8; // rdi
_QWORD *v9; // r12
result = (_QWORD *)(*(_QWORD *)(a1 + 32) & 1LL);
v6 = (unsigned long long)result + (a2 & 0xFFFFFFFFFFFFFFFELL) - 40;
*(_QWORD *)(a1 + 32) = v6;
if ( !a3 )
{
LABEL_14:
*(_QWORD *)(a1 + 16) = 0LL;
return result;
}
v7 = (_QWORD *)(a3 + 24);
result = *(_QWORD **)(a1 + 16);
if ( result && (_QWORD *)result[2] == v7 )
return result;
v8 = *(_QWORD **)a1;
v9 = (_QWORD *)a1;
if ( !*(_QWORD *)a1 )
{
LABEL_12:
result = (_QWORD *)my_malloc(*(unsigned int *)(a1 + 56), a3 + 24, (unsigned __int8)(v6 & 1) << 16);
if ( result )
{
result[2] = v7;
result[1] = a3;
*result = *v9;
*(_QWORD *)(a1 + 16) = result;
*v9 = result;
return result;
}
goto LABEL_14;
}
v9 = (_QWORD *)a1;
while ( 1 )
{
result = (_QWORD *)v8[2];
if ( result == v7 )
break;
if ( (_QWORD *)(v8[1] + 24LL) == result )
{
*v9 = *v8;
my_free(v8);
}
else
{
v9 = v8;
}
v8 = (_QWORD *)*v9;
if ( !*v9 )
{
v6 = *(_QWORD *)(a1 + 32);
goto LABEL_12;
}
}
*(_QWORD *)(a1 + 16) = v8;
return result;
}
| reset_root_defaults:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RDX
MOV RBX,RDI
AND RSI,-0x2
MOV RAX,qword ptr [RDI + 0x20]
AND EAX,0x1
LEA RDX,[RSI + RAX*0x1]
ADD RDX,-0x28
MOV qword ptr [RDI + 0x20],RDX
TEST R14,R14
JZ 0x0019f968
LEA R15,[R14 + 0x18]
MOV RAX,qword ptr [RBX + 0x10]
TEST RAX,RAX
JZ 0x0019f8f7
CMP qword ptr [RAX + 0x10],R15
JZ 0x0019f976
LAB_0019f8f7:
MOV RDI,qword ptr [RBX]
MOV R12,RBX
TEST RDI,RDI
JZ 0x0019f939
MOV R12,RBX
LAB_0019f905:
MOV RAX,qword ptr [RDI + 0x10]
CMP RAX,R15
JZ 0x0019f972
MOV RCX,qword ptr [RDI + 0x8]
ADD RCX,0x18
CMP RCX,RAX
JNZ 0x0019f929
MOV RAX,qword ptr [RDI]
MOV qword ptr [R12],RAX
CALL 0x001a2cc2
JMP 0x0019f92c
LAB_0019f929:
MOV R12,RDI
LAB_0019f92c:
MOV RDI,qword ptr [R12]
TEST RDI,RDI
JNZ 0x0019f905
MOV RDX,qword ptr [RBX + 0x20]
LAB_0019f939:
MOV EDI,dword ptr [RBX + 0x38]
AND EDX,0x1
SHL EDX,0x10
MOV RSI,R15
CALL 0x001a2a95
TEST RAX,RAX
JZ 0x0019f968
MOV qword ptr [RAX + 0x10],R15
MOV qword ptr [RAX + 0x8],R14
MOV RCX,qword ptr [R12]
MOV qword ptr [RAX],RCX
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [R12],RAX
JMP 0x0019f976
LAB_0019f968:
MOV qword ptr [RBX + 0x10],0x0
JMP 0x0019f976
LAB_0019f972:
MOV qword ptr [RBX + 0x10],RDI
LAB_0019f976:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void reset_root_defaults(long *param_1,ulong param_2,long param_3)
{
long lVar1;
long *plVar2;
long lVar3;
long *plVar4;
long *plVar5;
lVar3 = (param_2 & 0xfffffffffffffffe) + (ulong)((uint)param_1[4] & 1) + -0x28;
param_1[4] = lVar3;
if (param_3 != 0) {
lVar1 = param_3 + 0x18;
if ((param_1[2] != 0) && (*(long *)(param_1[2] + 0x10) == lVar1)) {
return;
}
plVar2 = (long *)*param_1;
plVar4 = param_1;
plVar5 = param_1;
if (plVar2 != (long *)0x0) {
do {
if (plVar2[2] == lVar1) {
param_1[2] = (long)plVar2;
return;
}
plVar5 = plVar2;
if (plVar2[1] + 0x18 == plVar2[2]) {
*plVar4 = *plVar2;
my_free();
plVar5 = plVar4;
}
plVar2 = (long *)*plVar5;
plVar4 = plVar5;
} while (plVar2 != (long *)0x0);
lVar3 = param_1[4];
}
plVar2 = (long *)my_malloc((int)param_1[7],lVar1,((uint)lVar3 & 1) << 0x10);
if (plVar2 != (long *)0x0) {
plVar2[2] = lVar1;
plVar2[1] = param_3;
*plVar2 = *plVar5;
param_1[2] = (long)plVar2;
*plVar5 = (long)plVar2;
return;
}
}
param_1[2] = 0;
return;
}
|
|
5,728 | my_convert_using_func | eloqsql/strings/ctype.c | uint32
my_convert_using_func(char *to, size_t to_length,
CHARSET_INFO *to_cs, my_charset_conv_wc_mb wc_mb,
const char *from, size_t from_length,
CHARSET_INFO *from_cs, my_charset_conv_mb_wc mb_wc,
uint *errors)
{
int cnvres;
my_wc_t wc;
const uchar *from_end= (const uchar*) from + from_length;
char *to_start= to;
uchar *to_end= (uchar*) to + to_length;
uint error_count= 0;
while (1)
{
if ((cnvres= (*mb_wc)(from_cs, &wc, (uchar*) from, from_end)) > 0)
from+= cnvres;
else if (cnvres == MY_CS_ILSEQ)
{
error_count++;
from++;
wc= '?';
}
else if (cnvres > MY_CS_TOOSMALL)
{
/*
A correct multibyte sequence detected
But it doesn't have Unicode mapping.
*/
error_count++;
from+= (-cnvres);
wc= '?';
}
else
{
if ((uchar *) from >= from_end)
break; /* End of line */
/* Incomplete byte sequence */
error_count++;
from++;
wc= '?';
}
outp:
if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0)
to+= cnvres;
else if (cnvres == MY_CS_ILUNI && wc != '?')
{
error_count++;
wc= '?';
goto outp;
}
else
break;
}
*errors= error_count;
return (uint32) (to - to_start);
} | O0 | c | my_convert_using_func:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
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 -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x48(%rbp), %rcx
leaq -0x40(%rbp), %rsi
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x75f24
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x75fa2
cmpl $0x0, -0x34(%rbp)
jne 0x75f49
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq $0x3f, -0x40(%rbp)
jmp 0x75fa0
cmpl $-0x65, -0x34(%rbp)
jle 0x75f75
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
xorl %ecx, %ecx
subl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq $0x3f, -0x40(%rbp)
jmp 0x75f9e
movq -0x28(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0x75f81
jmp 0x75ffc
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq $0x3f, -0x40(%rbp)
jmp 0x75fa0
jmp 0x75fa2
jmp 0x75fa4
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x58(%rbp), %rcx
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x75fd5
movl -0x34(%rbp), %ecx
movq -0x8(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x75ff7
cmpl $0x0, -0x34(%rbp)
jne 0x75ff5
cmpq $0x3f, -0x40(%rbp)
je 0x75ff5
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movq $0x3f, -0x40(%rbp)
jmp 0x75fa4
jmp 0x75ffc
jmp 0x75ef3
movl -0x5c(%rbp), %ecx
movq 0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_convert_using_func:
push rbp
mov rbp, rsp
sub rsp, 60h
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
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_28]
add rax, [rbp+var_30]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov [rbp+var_50], rax
mov rax, [rbp+var_8]
add rax, [rbp+var_10]
mov [rbp+var_58], rax
mov [rbp+var_5C], 0
loc_75EF3:
mov rax, [rbp+arg_8]
mov rdi, [rbp+arg_0]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_48]
lea rsi, [rbp+var_40]
call rax
mov [rbp+var_34], eax
cmp eax, 0
jle short loc_75F24
mov ecx, [rbp+var_34]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp short loc_75FA2
loc_75F24:
cmp [rbp+var_34], 0
jnz short loc_75F49
mov eax, [rbp+var_5C]
add eax, 1
mov [rbp+var_5C], eax
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov [rbp+var_40], 3Fh ; '?'
jmp short loc_75FA0
loc_75F49:
cmp [rbp+var_34], 0FFFFFF9Bh
jle short loc_75F75
mov eax, [rbp+var_5C]
add eax, 1
mov [rbp+var_5C], eax
xor ecx, ecx
sub ecx, [rbp+var_34]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov [rbp+var_40], 3Fh ; '?'
jmp short loc_75F9E
loc_75F75:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_48]
jb short loc_75F81
jmp short loc_75FFC
loc_75F81:
mov eax, [rbp+var_5C]
add eax, 1
mov [rbp+var_5C], eax
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov [rbp+var_40], 3Fh ; '?'
loc_75F9E:
jmp short $+2
loc_75FA0:
jmp short $+2
loc_75FA2:
jmp short $+2
loc_75FA4:
mov rax, [rbp+var_20]
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_8]
mov rcx, [rbp+var_58]
call rax
mov [rbp+var_34], eax
cmp eax, 0
jle short loc_75FD5
mov ecx, [rbp+var_34]
mov rax, [rbp+var_8]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_8], rax
jmp short loc_75FF7
loc_75FD5:
cmp [rbp+var_34], 0
jnz short loc_75FF5
cmp [rbp+var_40], 3Fh ; '?'
jz short loc_75FF5
mov eax, [rbp+var_5C]
add eax, 1
mov [rbp+var_5C], eax
mov [rbp+var_40], 3Fh ; '?'
jmp short loc_75FA4
loc_75FF5:
jmp short loc_75FFC
loc_75FF7:
jmp loc_75EF3
loc_75FFC:
mov ecx, [rbp+var_5C]
mov rax, [rbp+arg_10]
mov [rax], ecx
mov rax, [rbp+var_8]
mov rcx, [rbp+var_50]
sub rax, rcx
add rsp, 60h
pop rbp
retn
| long long my_convert_using_func(
long long a1,
long long a2,
long long a3,
long long ( *a4)(long long, long long, long long, long long),
unsigned long long a5,
long long a6,
long long a7,
long long ( *a8)(long long, long long *, unsigned long long, unsigned long long),
_DWORD *a9)
{
int v10; // [rsp+4h] [rbp-5Ch]
unsigned long long v11; // [rsp+18h] [rbp-48h]
long long v12; // [rsp+20h] [rbp-40h] BYREF
int v13; // [rsp+2Ch] [rbp-34h]
long long v14; // [rsp+30h] [rbp-30h]
unsigned long long v15; // [rsp+38h] [rbp-28h]
long long ( *v16)(long long, long long, long long, long long); // [rsp+40h] [rbp-20h]
long long v17; // [rsp+48h] [rbp-18h]
long long v18; // [rsp+50h] [rbp-10h]
long long v19; // [rsp+58h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = a5;
v14 = a6;
v11 = a6 + a5;
v10 = 0;
while ( 1 )
{
v13 = a8(a7, &v12, v15, v11);
if ( v13 > 0 )
{
v15 += v13;
goto LABEL_10;
}
if ( !v13 )
{
++v10;
++v15;
v12 = 63LL;
goto LABEL_10;
}
if ( v13 > -101 )
{
++v10;
v15 += -v13;
v12 = 63LL;
goto LABEL_10;
}
if ( v15 >= v11 )
break;
++v10;
++v15;
v12 = 63LL;
LABEL_10:
while ( 1 )
{
v13 = v16(v17, v12, v19, a2 + a1);
if ( v13 > 0 )
break;
if ( v13 || v12 == 63 )
goto LABEL_15;
++v10;
v12 = 63LL;
}
v19 += v13;
}
LABEL_15:
*a9 = v10;
return v19 - a1;
}
| my_convert_using_func:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
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 + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x58],RAX
MOV dword ptr [RBP + -0x5c],0x0
LAB_00175ef3:
MOV RAX,qword ptr [RBP + 0x18]
MOV RDI,qword ptr [RBP + 0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x48]
LEA RSI,[RBP + -0x40]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x00175f24
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00175fa2
LAB_00175f24:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x00175f49
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x40],0x3f
JMP 0x00175fa0
LAB_00175f49:
CMP dword ptr [RBP + -0x34],-0x65
JLE 0x00175f75
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x5c],EAX
XOR ECX,ECX
SUB ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x40],0x3f
JMP 0x00175f9e
LAB_00175f75:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x00175f81
JMP 0x00175ffc
LAB_00175f81:
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x40],0x3f
LAB_00175f9e:
JMP 0x00175fa0
LAB_00175fa0:
JMP 0x00175fa2
LAB_00175fa2:
JMP 0x00175fa4
LAB_00175fa4:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x58]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x00175fd5
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00175ff7
LAB_00175fd5:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x00175ff5
CMP qword ptr [RBP + -0x40],0x3f
JZ 0x00175ff5
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x5c],EAX
MOV qword ptr [RBP + -0x40],0x3f
JMP 0x00175fa4
LAB_00175ff5:
JMP 0x00175ffc
LAB_00175ff7:
JMP 0x00175ef3
LAB_00175ffc:
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + 0x20]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long my_convert_using_func
(long param_1,long param_2,int8 param_3,code *param_4,ulong param_5,
long param_6,int8 param_7,code *param_8,int *param_9)
{
int local_64;
long local_48;
int local_3c;
long local_38;
ulong local_30;
code *local_28;
int8 local_20;
long local_18;
long local_10;
local_64 = 0;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
do {
local_3c = (*param_8)(param_7,&local_48,local_30);
if (local_3c < 1) {
if (local_3c == 0) {
local_30 = local_30 + 1;
}
else if (local_3c < -100) {
if (param_5 + param_6 <= local_30) {
LAB_00175ffc:
*param_9 = local_64;
return local_10 - param_1;
}
local_30 = local_30 + 1;
}
else {
local_30 = local_30 + (long)-local_3c;
}
local_64 = local_64 + 1;
local_48 = 0x3f;
}
else {
local_30 = local_30 + (long)local_3c;
}
while (local_3c = (*local_28)(local_20,local_48,local_10,param_1 + param_2), local_3c < 1) {
if ((local_3c != 0) || (local_48 == 0x3f)) goto LAB_00175ffc;
local_64 = local_64 + 1;
local_48 = 0x3f;
local_3c = 0;
}
local_10 = local_10 + local_3c;
} while( true );
}
|
|
5,729 | fct_reset_status_by_thread(PFS_thread*) | eloqsql/storage/perfschema/pfs_status.cc | static void fct_reset_status_by_thread(PFS_thread *thread)
{
PFS_account *account;
PFS_user *user;
PFS_host *host;
if (thread->m_lock.is_populated())
{
account= sanitize_account(thread->m_account);
user= sanitize_user(thread->m_user);
host= sanitize_host(thread->m_host);
aggregate_thread_status(thread, account, user, host);
}
} | O0 | cpp | fct_reset_status_by_thread(PFS_thread*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x800, %rdi # imm = 0x800
callq 0x32dd0
testb $0x1, %al
jne 0x46192
jmp 0x461e3
movq -0x8(%rbp), %rax
movq 0x1620(%rax), %rdi
callq 0x533f0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x1618(%rax), %rdi
callq 0x46de0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x1610(%rax), %rdi
callq 0x59180
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x3c730
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| _ZL26fct_reset_status_by_threadP10PFS_thread:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
add rdi, 800h; this
call _ZN8pfs_lock12is_populatedEv; pfs_lock::is_populated(void)
test al, 1
jnz short loc_46192
jmp short loc_461E3
loc_46192:
mov rax, [rbp+var_8]
mov rdi, [rax+1620h]; PFS_account *
call _Z16sanitize_accountP11PFS_account; sanitize_account(PFS_account *)
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rdi, [rax+1618h]; PFS_user *
call _Z13sanitize_userP8PFS_user; sanitize_user(PFS_user *)
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rdi, [rax+1610h]; PFS_host *
call _Z13sanitize_hostP8PFS_host; sanitize_host(PFS_host *)
mov [rbp+var_20], rax
mov rdi, [rbp+var_8]; PFS_thread *
mov rsi, [rbp+var_10]; PFS_account *
mov rdx, [rbp+var_18]; PFS_user *
mov rcx, [rbp+var_20]; PFS_host *
call _Z23aggregate_thread_statusP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host; aggregate_thread_status(PFS_thread *,PFS_account *,PFS_user *,PFS_host *)
loc_461E3:
add rsp, 20h
pop rbp
retn
| char fct_reset_status_by_thread(PFS_account **a1, unsigned int *a2)
{
char result; // al
PFS_host *v3; // [rsp+0h] [rbp-20h]
PFS_user *v4; // [rsp+8h] [rbp-18h]
PFS_account *v5; // [rsp+10h] [rbp-10h]
result = pfs_lock::is_populated((pfs_lock *)(a1 + 256), a2);
if ( (result & 1) != 0 )
{
v5 = (PFS_account *)sanitize_account(a1[708]);
v4 = (PFS_user *)sanitize_user(a1[707]);
v3 = (PFS_host *)sanitize_host(a1[706]);
return aggregate_thread_status((PFS_thread *)a1, v5, v4, v3);
}
return result;
}
| fct_reset_status_by_thread:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x800
CALL 0x00132dd0
TEST AL,0x1
JNZ 0x00146192
JMP 0x001461e3
LAB_00146192:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x1620]
CALL 0x001533f0
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x1618]
CALL 0x00146de0
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x1610]
CALL 0x00159180
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x0013c730
LAB_001461e3:
ADD RSP,0x20
POP RBP
RET
|
/* fct_reset_status_by_thread(PFS_thread*) */
void fct_reset_status_by_thread(PFS_thread *param_1)
{
ulong uVar1;
PFS_account *pPVar2;
PFS_user *pPVar3;
PFS_host *pPVar4;
uVar1 = pfs_lock::is_populated((pfs_lock *)(param_1 + 0x800));
if ((uVar1 & 1) != 0) {
pPVar2 = (PFS_account *)sanitize_account(*(PFS_account **)(param_1 + 0x1620));
pPVar3 = (PFS_user *)sanitize_user(*(PFS_user **)(param_1 + 0x1618));
pPVar4 = (PFS_host *)sanitize_host(*(PFS_host **)(param_1 + 0x1610));
aggregate_thread_status(param_1,pPVar2,pPVar3,pPVar4);
}
return;
}
|
|
5,730 | atoi_octal | eloqsql/mysys/my_init.c | static ulong atoi_octal(const char *str)
{
long int tmp;
while (*str && my_isspace(&my_charset_latin1, *str))
str++;
str2int(str,
(*str == '0' ? 8 : 10), /* Octalt or decimalt */
0, INT_MAX, &tmp);
return (ulong) tmp;
} | O0 | c | atoi_octal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0x586f0
leaq 0x261b8c(%rip), %rax # 0x2ba260
movq 0x40(%rax), %rax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x586f9
jmp 0x58707
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x586bc
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movsbl (%rax), %ecx
movl $0xa, %esi
movl $0x8, %eax
cmpl $0x30, %ecx
cmovel %eax, %esi
xorl %eax, %eax
movl %eax, %edx
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
leaq -0x10(%rbp), %r8
callq 0xab890
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
| atoi_octal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
loc_586BC:
mov rax, [rbp+var_8]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_11], al
jz short loc_586F0
lea rax, my_charset_latin1
mov rax, [rax+40h]
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
setnz al
mov [rbp+var_11], al
loc_586F0:
mov al, [rbp+var_11]
test al, 1
jnz short loc_586F9
jmp short loc_58707
loc_586F9:
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
jmp short loc_586BC
loc_58707:
mov rdi, [rbp+var_8]
mov rax, [rbp+var_8]
movsx ecx, byte ptr [rax]
mov esi, 0Ah
mov eax, 8
cmp ecx, 30h ; '0'
cmovz esi, eax
xor eax, eax
mov edx, eax
mov ecx, 7FFFFFFFh
lea r8, [rbp+var_10]
call str2int
mov rax, [rbp+var_10]
add rsp, 20h
pop rbp
retn
| long long atoi_octal(_BYTE *a1)
{
long long v1; // rsi
bool v3; // [rsp+Fh] [rbp-11h]
long long v4; // [rsp+10h] [rbp-10h] BYREF
_BYTE *i; // [rsp+18h] [rbp-8h]
for ( i = a1; ; ++i )
{
v3 = 0;
if ( *i )
v3 = (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + (unsigned __int8)*i + 1LL) & 8) != 0;
if ( !v3 )
break;
}
v1 = 10LL;
if ( *i == 48 )
v1 = 8LL;
str2int(i, v1, 0LL, 0x7FFFFFFFLL, &v4);
return v4;
}
| atoi_octal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
LAB_001586bc:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x001586f0
LEA RAX,[0x3ba260]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x11],AL
LAB_001586f0:
MOV AL,byte ptr [RBP + -0x11]
TEST AL,0x1
JNZ 0x001586f9
JMP 0x00158707
LAB_001586f9:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001586bc
LAB_00158707:
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOVSX ECX,byte ptr [RAX]
MOV ESI,0xa
MOV EAX,0x8
CMP ECX,0x30
CMOVZ ESI,EAX
XOR EAX,EAX
MOV EDX,EAX
MOV ECX,0x7fffffff
LEA R8,[RBP + -0x10]
CALL 0x001ab890
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x20
POP RBP
RET
|
int8 atoi_octal(byte *param_1)
{
int8 uVar1;
bool bVar2;
int8 local_18;
byte *local_10;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (*local_10 != 0) {
bVar2 = (PTR_ctype_latin1_003ba2a0[(ulong)*local_10 + 1] & 8) != 0;
}
if (!bVar2) break;
local_10 = local_10 + 1;
}
uVar1 = 10;
if (*local_10 == 0x30) {
uVar1 = 8;
}
str2int(local_10,uVar1,0,0x7fffffff,&local_18);
return local_18;
}
|
|
5,731 | OpenSubdiv::v3_6_0::Bfr::Surface<float>::Evaluate(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*) 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[]) const {
REAL * derivatives[6] = { P, 0, 0, 0, 0, 0 };
evaluateDerivs(uv, patchPoints, pointDesc, derivatives);
} | O1 | c | OpenSubdiv::v3_6_0::Bfr::Surface<float>::Evaluate(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*) const:
subq $0x38, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %r8, (%rsp)
movb 0x6c(%rdi), %al
movq %rsp, %r8
testb $0x4, %al
jne 0x97a4e
testb $0x8, %al
jne 0x97a55
callq 0x398e0
jmp 0x97a5a
callq 0x3a550
jmp 0x97a5a
callq 0x3a060
addq $0x38, %rsp
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE8EvaluateEPKdS5_RKNS3_15PointDescriptorEPd:
sub rsp, 38h
xorps xmm0, xmm0
movaps [rsp+38h+var_38], xmm0
movaps [rsp+38h+var_18], xmm0
movaps [rsp+38h+var_28], xmm0
mov qword ptr [rsp+38h+var_38], r8
mov al, [rdi+6Ch]
mov r8, rsp
test al, 4
jnz short loc_97A4E
test al, 8
jnz short loc_97A55
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_97A5A
loc_97A4E:
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_97A5A
loc_97A55:
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_97A5A:
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,
unsigned long long a5,
long long a6)
{
char v6; // al
__int128 v8; // [rsp+0h] [rbp-38h] BYREF
__int128 v9; // [rsp+10h] [rbp-28h]
__int128 v10; // [rsp+20h] [rbp-18h]
v10 = 0LL;
v9 = 0LL;
v8 = a5;
v6 = *(_BYTE *)(a1 + 108);
if ( (v6 & 4) != 0 )
return OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularDerivs(
a1,
a2,
a3,
a4,
&v8,
a6,
v8,
*((_QWORD *)&v8 + 1),
v9,
*((_QWORD *)&v9 + 1),
v10,
*((_QWORD *)&v10 + 1));
if ( (v6 & 8) != 0 )
return OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalMultiLinearDerivs(
a1,
a2,
a3,
a4,
&v8,
a6,
v8,
*((_QWORD *)&v8 + 1),
v9,
*((_QWORD *)&v9 + 1),
v10,
*((_QWORD *)&v10 + 1));
return OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs(
a1,
a2,
a3,
a4,
&v8,
a6,
v8,
*((_QWORD *)&v8 + 1),
v9,
*((_QWORD *)&v9 + 1),
v10,
*((_QWORD *)&v10 + 1));
}
| Evaluate:
SUB RSP,0x38
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP],R8
MOV AL,byte ptr [RDI + 0x6c]
MOV R8,RSP
TEST AL,0x4
JNZ 0x00197a4e
TEST AL,0x8
JNZ 0x00197a55
CALL 0x001398e0
JMP 0x00197a5a
LAB_00197a4e:
CALL 0x0013a550
JMP 0x00197a5a
LAB_00197a55:
CALL 0x0013a060
LAB_00197a5a:
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*) 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 *local_38;
int8 uStack_30;
int8 local_28;
int8 uStack_20;
int8 local_18;
int8 uStack_10;
uStack_30 = 0;
local_18 = 0;
uStack_10 = 0;
local_28 = 0;
uStack_20 = 0;
local_38 = param_4;
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;
}
|
|
5,732 | OpenSubdiv::v3_6_0::Bfr::Surface<float>::Evaluate(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*) 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[]) const {
REAL * derivatives[6] = { P, 0, 0, 0, 0, 0 };
evaluateDerivs(uv, patchPoints, pointDesc, derivatives);
} | O3 | c | OpenSubdiv::v3_6_0::Bfr::Surface<float>::Evaluate(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*) const:
subq $0x38, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %r8, (%rsp)
movb 0x6c(%rdi), %al
movq %rsp, %r8
testb $0x4, %al
jne 0x9a6e4
testb $0x8, %al
jne 0x9a6eb
callq 0x398c0
jmp 0x9a6f0
callq 0x3a530
jmp 0x9a6f0
callq 0x3a040
addq $0x38, %rsp
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE8EvaluateEPKdS5_RKNS3_15PointDescriptorEPd:
sub rsp, 38h
xorps xmm0, xmm0
movaps [rsp+38h+var_38], xmm0
movaps [rsp+38h+var_18], xmm0
movaps [rsp+38h+var_28], xmm0
mov qword ptr [rsp+38h+var_38], r8
mov al, [rdi+6Ch]
mov r8, rsp
test al, 4
jnz short loc_9A6E4
test al, 8
jnz short loc_9A6EB
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_9A6F0
loc_9A6E4:
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_9A6F0
loc_9A6EB:
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_9A6F0:
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,
unsigned long long a5,
long long a6)
{
char v6; // al
__int128 v8; // [rsp+0h] [rbp-38h] BYREF
__int128 v9; // [rsp+10h] [rbp-28h]
__int128 v10; // [rsp+20h] [rbp-18h]
v10 = 0LL;
v9 = 0LL;
v8 = a5;
v6 = *(_BYTE *)(a1 + 108);
if ( (v6 & 4) != 0 )
return OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalRegularDerivs(
a1,
a2,
a3,
a4,
&v8,
a6,
v8,
*((_QWORD *)&v8 + 1),
v9,
*((_QWORD *)&v9 + 1),
v10,
*((_QWORD *)&v10 + 1));
if ( (v6 & 8) != 0 )
return OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalMultiLinearDerivs(
a1,
a2,
a3,
a4,
&v8,
a6,
v8,
*((_QWORD *)&v8 + 1),
v9,
*((_QWORD *)&v9 + 1),
v10,
*((_QWORD *)&v10 + 1));
return OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs(
a1,
a2,
a3,
a4,
&v8,
a6,
v8,
*((_QWORD *)&v8 + 1),
v9,
*((_QWORD *)&v9 + 1),
v10,
*((_QWORD *)&v10 + 1));
}
| Evaluate:
SUB RSP,0x38
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP],R8
MOV AL,byte ptr [RDI + 0x6c]
MOV R8,RSP
TEST AL,0x4
JNZ 0x0019a6e4
TEST AL,0x8
JNZ 0x0019a6eb
CALL 0x001398c0
JMP 0x0019a6f0
LAB_0019a6e4:
CALL 0x0013a530
JMP 0x0019a6f0
LAB_0019a6eb:
CALL 0x0013a040
LAB_0019a6f0:
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*) 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 *local_38;
int8 uStack_30;
int8 local_28;
int8 uStack_20;
int8 local_18;
int8 uStack_10;
uStack_30 = 0;
local_18 = 0;
uStack_10 = 0;
local_28 = 0;
uStack_20 = 0;
local_38 = param_4;
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;
}
|
|
5,733 | google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(google::protobuf::Descriptor const*, google::protobuf::Message const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/message.cc | void MessageFactory::InternalRegisterGeneratedMessage(
const Descriptor* descriptor, const Message* prototype) {
GeneratedMessageFactory::singleton()->RegisterType(descriptor, prototype);
} | O3 | cpp | google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(google::protobuf::Descriptor const*, google::protobuf::Message const*):
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x9f3a2
leaq 0x68(%rax), %rdi
leaq 0x10(%rsp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
leaq 0x8(%rsp), %rdx
movq %rdi, (%rdx)
callq 0xa018c
testb $0x1, %dl
jne 0x9f5ba
leaq 0xca2df(%rip), %rdx # 0x16984c
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x2, %esi
movl $0x111, %ecx # imm = 0x111
callq 0x857c2
leaq 0xca582(%rip), %rsi # 0x169b0d
movq %r14, %rdi
callq 0x852c0
movq 0x8(%rbx), %rsi
addq $0x20, %rsi
movq %rax, %rdi
callq 0x852d2
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x8539a
leaq 0x10(%rsp), %rdi
callq 0x857e0
addq $0x48, %rsp
popq %rbx
popq %r14
retq
jmp 0x9f5c4
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x857e0
movq %rbx, %rdi
callq 0x2e220
nop
| _ZN6google8protobuf14MessageFactory32InternalRegisterGeneratedMessageEPKNS0_10DescriptorEPKNS0_7MessageE:
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
call _ZN6google8protobuf12_GLOBAL__N_123GeneratedMessageFactory9singletonEv; google::protobuf::`anonymous namespace'::GeneratedMessageFactory::singleton(void)
lea rdi, [rax+68h]
lea rsi, [rsp+58h+var_48]
mov [rsi], rbx
mov [rsi+8], r14
lea rdx, [rsp+58h+var_50]
mov [rdx], rdi
call _ZNSt10_HashtableIPKN6google8protobuf10DescriptorESt4pairIKS4_PKNS1_7MessageEESaISA_ENSt8__detail10_Select1stESt8equal_toIS4_ESt4hashIS4_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb0ELb0ELb1EEEE9_M_insertIRKSA_NSC_10_AllocNodeISaINSC_10_Hash_nodeISA_Lb0EEEEEEEES5_INSC_14_Node_iteratorISA_Lb0ELb0EEEbEOT_RKT0_St17integral_constantIbLb1EE; std::_Hashtable<google::protobuf::Descriptor const*,std::pair<google::protobuf::Descriptor const* const,google::protobuf::Message const*>,std::allocator<std::pair<google::protobuf::Descriptor const* const,google::protobuf::Message const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::Descriptor const*>,std::hash<google::protobuf::Descriptor const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_insert<std::pair<google::protobuf::Descriptor const* const,google::protobuf::Message const*> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<google::protobuf::Descriptor const* const,google::protobuf::Message const*>,false>>>>(std::pair<google::protobuf::Descriptor const* const,google::protobuf::Message const*> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<google::protobuf::Descriptor const* const,google::protobuf::Message const*>,false>>> const&,std::integral_constant<bool,true>)
test dl, 1
jnz short loc_9F5BA
lea rdx, aWorkspaceLlm4b_24; "/workspace/llm4binary/github2025/aimrt_"...
lea r14, [rsp+58h+var_48]
mov rdi, r14
mov esi, 2
mov ecx, 111h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aTypeIsAlreadyR; "Type is already registered: "
mov rdi, r14
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov rsi, [rbx+8]
add rsi, 20h ; ' '
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::LogMessage::operator<<(std::string const&)
lea rdi, [rsp+58h+var_50]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+58h+var_48]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_9F5BA:
add rsp, 48h
pop rbx
pop r14
retn
jmp short $+2
loc_9F5C4:
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
| void google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
google::protobuf::MessageFactory *this,
const google::protobuf::Descriptor *a2,
const google::protobuf::Message *a3)
{
char v3; // dl
long long v4; // rax
google::protobuf::internal::LogMessage *v5; // rax
long long v6; // [rsp+8h] [rbp-50h] BYREF
_QWORD v7[9]; // [rsp+10h] [rbp-48h] BYREF
v7[0] = this;
v7[1] = a2;
v6 = google::protobuf::`anonymous namespace'::GeneratedMessageFactory::singleton(this) + 104;
std::_Hashtable<google::protobuf::Descriptor const*,std::pair<google::protobuf::Descriptor const* const,google::protobuf::Message const*>,std::allocator<std::pair<google::protobuf::Descriptor const* const,google::protobuf::Message const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::Descriptor const*>,std::hash<google::protobuf::Descriptor const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_insert<std::pair<google::protobuf::Descriptor const* const,google::protobuf::Message const*> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<google::protobuf::Descriptor const* const,google::protobuf::Message const*>,false>>>>();
if ( (v3 & 1) == 0 )
{
google::protobuf::internal::LogMessage::LogMessage(
(long long)v7,
2,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/message.cc",
273);
v4 = google::protobuf::internal::LogMessage::operator<<((long long)v7, (long long)"Type is already registered: ");
v5 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
v4,
(_QWORD *)(*((_QWORD *)this + 1) + 32LL));
google::protobuf::internal::LogFinisher::operator=((long long)&v6, v5);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v7);
}
}
| InternalRegisterGeneratedMessage:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
CALL 0x0019f3a2
LEA RDI,[RAX + 0x68]
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RBX
MOV qword ptr [RSI + 0x8],R14
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RDI
CALL 0x001a018c
TEST DL,0x1
JNZ 0x0019f5ba
LEA RDX,[0x26984c]
LEA R14,[RSP + 0x10]
MOV RDI,R14
MOV ESI,0x2
MOV ECX,0x111
CALL 0x001857c2
LAB_0019f584:
LEA RSI,[0x269b0d]
MOV RDI,R14
CALL 0x001852c0
MOV RSI,qword ptr [RBX + 0x8]
ADD RSI,0x20
MOV RDI,RAX
CALL 0x001852d2
LAB_0019f5a3:
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
CALL 0x0018539a
LAB_0019f5b0:
LEA RDI,[RSP + 0x10]
CALL 0x001857e0
LAB_0019f5ba:
ADD RSP,0x48
POP RBX
POP R14
RET
|
/* google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(google::protobuf::Descriptor
const*, google::protobuf::Message const*) */
void google::protobuf::MessageFactory::InternalRegisterGeneratedMessage
(Descriptor *param_1,Message *param_2)
{
LogMessage *pLVar1;
ulong extraout_RDX;
long local_50;
Descriptor *local_48;
Message *local_40;
local_50 = (anonymous_namespace)::GeneratedMessageFactory::singleton();
local_50 = local_50 + 0x68;
local_48 = param_1;
local_40 = param_2;
std::
_Hashtable<google::protobuf::Descriptor_const*,std::pair<google::protobuf::Descriptor_const*const,google::protobuf::Message_const*>,std::allocator<std::pair<google::protobuf::Descriptor_const*const,google::protobuf::Message_const*>>,std::__detail::_Select1st,std::equal_to<google::protobuf::Descriptor_const*>,std::hash<google::protobuf::Descriptor_const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::
_M_insert<std::pair<google::protobuf::Descriptor_const*const,google::protobuf::Message_const*>const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<google::protobuf::Descriptor_const*const,google::protobuf::Message_const*>,false>>>>
();
if ((extraout_RDX & 1) == 0) {
internal::LogMessage::LogMessage
((LogMessage *)&local_48,2,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/message.cc"
,0x111);
/* try { // try from 0019f584 to 0019f5a2 has its CatchHandler @ 0019f5c4 */
pLVar1 = (LogMessage *)
internal::LogMessage::operator<<
((LogMessage *)&local_48,"Type is already registered: ");
pLVar1 = (LogMessage *)
internal::LogMessage::operator<<(pLVar1,(string *)(*(long *)(param_1 + 8) + 0x20));
/* try { // try from 0019f5a3 to 0019f5af has its CatchHandler @ 0019f5c2 */
internal::LogFinisher::operator=((LogFinisher *)&local_50,pLVar1);
internal::LogMessage::~LogMessage((LogMessage *)&local_48);
}
return;
}
|
|
5,734 | ma_pvio_start_ssl | eloqsql/libmariadb/libmariadb/ma_pvio.c | my_bool ma_pvio_start_ssl(MARIADB_PVIO *pvio)
{
if (!pvio || !pvio->mysql)
return 1;
CLEAR_CLIENT_ERROR(pvio->mysql);
if (!(pvio->ctls= ma_pvio_tls_init(pvio->mysql)))
{
return 1;
}
if (ma_pvio_tls_connect(pvio->ctls))
{
free(pvio->ctls);
pvio->ctls= NULL;
return 1;
}
/* default behaviour:
1. peer certificate verification
2. verify CN (requires option ssl_verify_check)
3. verrify finger print
*/
if ((pvio->mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) &&
ma_pvio_tls_verify_server_cert(pvio->ctls))
return 1;
if (pvio->mysql->options.extension &&
((pvio->mysql->options.extension->tls_fp && pvio->mysql->options.extension->tls_fp[0]) ||
(pvio->mysql->options.extension->tls_fp_list && pvio->mysql->options.extension->tls_fp_list[0])))
{
if (ma_pvio_tls_check_fp(pvio->ctls,
pvio->mysql->options.extension->tls_fp,
pvio->mysql->options.extension->tls_fp_list))
return 1;
}
return 0;
} | O0 | c | ma_pvio_start_ssl:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2d91e
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x2d927
movb $0x1, -0x1(%rbp)
jmp 0x2dae9
jmp 0x2d929
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl $0x0, 0x90(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x28776(%rip), %rsi # 0x560c7
callq 0x133d0
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movb $0x0, 0x97(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x2a0(%rax)
je 0x2d98d
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x2a0(%rax), %rax
movl $0x0, 0x4(%rax)
jmp 0x2d98f
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x2dbc0
movq -0x10(%rbp), %rcx
movq %rax, 0x38(%rcx)
cmpq $0x0, %rax
jne 0x2d9b3
movb $0x1, -0x1(%rbp)
jmp 0x2dae9
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x2dc70
cmpb $0x0, %al
je 0x2d9e6
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x13540
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x2dae9
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x368(%rax), %rax
andq $0x40000000, %rax # imm = 0x40000000
cmpq $0x0, %rax
je 0x2da1c
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x2dd20
cmpl $0x0, %eax
je 0x2da1c
movb $0x1, -0x1(%rbp)
jmp 0x2dae9
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x480(%rax)
je 0x2dae5
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x90(%rax)
je 0x2da69
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
movq 0x90(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x2daa0
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x98(%rax)
je 0x2dae5
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
movq 0x98(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x2dae5
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
movq 0x90(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
movq 0x98(%rax), %rdx
callq 0x2ddf0
cmpb $0x0, %al
je 0x2dae3
movb $0x1, -0x1(%rbp)
jmp 0x2dae9
jmp 0x2dae5
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_pvio_start_ssl:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jz short loc_2D91E
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jnz short loc_2D927
loc_2D91E:
mov [rbp+var_1], 1
jmp loc_2DAE9
loc_2D927:
jmp short $+2
loc_2D929:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov dword ptr [rax+90h], 0
mov rax, [rbp+var_10]
mov rdi, [rax+40h]
add rdi, 297h
lea rsi, a00000; "00000"
call _strcpy
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov byte ptr [rax+97h], 0
mov rax, [rbp+var_10]
mov rax, [rax+40h]
cmp qword ptr [rax+2A0h], 0
jz short loc_2D98D
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+2A0h]
mov dword ptr [rax+4], 0
loc_2D98D:
jmp short $+2
loc_2D98F:
mov rax, [rbp+var_10]
mov rdi, [rax+40h]
call ma_pvio_tls_init
mov rcx, [rbp+var_10]
mov [rcx+38h], rax
cmp rax, 0
jnz short loc_2D9B3
mov [rbp+var_1], 1
jmp loc_2DAE9
loc_2D9B3:
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call ma_pvio_tls_connect
cmp al, 0
jz short loc_2D9E6
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call _free
mov rax, [rbp+var_10]
mov qword ptr [rax+38h], 0
mov [rbp+var_1], 1
jmp loc_2DAE9
loc_2D9E6:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+368h]
and rax, 40000000h
cmp rax, 0
jz short loc_2DA1C
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call ma_pvio_tls_verify_server_cert
cmp eax, 0
jz short loc_2DA1C
mov [rbp+var_1], 1
jmp loc_2DAE9
loc_2DA1C:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
cmp qword ptr [rax+480h], 0
jz loc_2DAE5
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
cmp qword ptr [rax+90h], 0
jz short loc_2DA69
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
mov rax, [rax+90h]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_2DAA0
loc_2DA69:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
cmp qword ptr [rax+98h], 0
jz short loc_2DAE5
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
mov rax, [rax+98h]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_2DAE5
loc_2DAA0:
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
mov rsi, [rax+90h]
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
mov rdx, [rax+98h]
call ma_pvio_tls_check_fp
cmp al, 0
jz short loc_2DAE3
mov [rbp+var_1], 1
jmp short loc_2DAE9
loc_2DAE3:
jmp short $+2
loc_2DAE5:
mov [rbp+var_1], 0
loc_2DAE9:
mov al, [rbp+var_1]
add rsp, 10h
pop rbp
retn
| bool ma_pvio_start_ssl(long long a1)
{
long long v1; // rax
if ( !a1 || !*(_QWORD *)(a1 + 64) )
return 1;
*(_DWORD *)(*(_QWORD *)(a1 + 64) + 144LL) = 0;
strcpy(*(_QWORD *)(a1 + 64) + 663LL, "00000");
*(_BYTE *)(*(_QWORD *)(a1 + 64) + 151LL) = 0;
if ( *(_QWORD *)(*(_QWORD *)(a1 + 64) + 672LL) )
*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 672LL) + 4LL) = 0;
v1 = ma_pvio_tls_init(*(_QWORD *)(a1 + 64));
*(_QWORD *)(a1 + 56) = v1;
if ( !v1 )
return 1;
if ( !(unsigned __int8)ma_pvio_tls_connect(*(_QWORD *)(a1 + 56)) )
return (*(_QWORD *)(*(_QWORD *)(a1 + 64) + 872LL) & 0x40000000LL) != 0
&& (unsigned int)ma_pvio_tls_verify_server_cert(*(_QWORD *)(a1 + 56))
|| *(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL)
&& (*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 144LL)
&& **(_BYTE **)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 144LL)
|| *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 152LL)
&& **(_BYTE **)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 152LL))
&& (unsigned __int8)ma_pvio_tls_check_fp(
*(_QWORD *)(a1 + 56),
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 144LL),
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 152LL));
free(*(_QWORD *)(a1 + 56));
*(_QWORD *)(a1 + 56) = 0LL;
return 1;
}
| ma_pvio_start_ssl:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0012d91e
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JNZ 0x0012d927
LAB_0012d91e:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012dae9
LAB_0012d927:
JMP 0x0012d929
LAB_0012d929:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV dword ptr [RAX + 0x90],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x40]
ADD RDI,0x297
LEA RSI,[0x1560c7]
CALL 0x001133d0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV byte ptr [RAX + 0x97],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
CMP qword ptr [RAX + 0x2a0],0x0
JZ 0x0012d98d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x2a0]
MOV dword ptr [RAX + 0x4],0x0
LAB_0012d98d:
JMP 0x0012d98f
LAB_0012d98f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x40]
CALL 0x0012dbc0
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x38],RAX
CMP RAX,0x0
JNZ 0x0012d9b3
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012dae9
LAB_0012d9b3:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x0012dc70
CMP AL,0x0
JZ 0x0012d9e6
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x00113540
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x38],0x0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012dae9
LAB_0012d9e6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x368]
AND RAX,0x40000000
CMP RAX,0x0
JZ 0x0012da1c
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x0012dd20
CMP EAX,0x0
JZ 0x0012da1c
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012dae9
LAB_0012da1c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0012dae5
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x90],0x0
JZ 0x0012da69
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x90]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x0012daa0
LAB_0012da69:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x98],0x0
JZ 0x0012dae5
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x98]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0012dae5
LAB_0012daa0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV RSI,qword ptr [RAX + 0x90]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV RDX,qword ptr [RAX + 0x98]
CALL 0x0012ddf0
CMP AL,0x0
JZ 0x0012dae3
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012dae9
LAB_0012dae3:
JMP 0x0012dae5
LAB_0012dae5:
MOV byte ptr [RBP + -0x1],0x0
LAB_0012dae9:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x10
POP RBP
RET
|
int1 ma_pvio_start_ssl(long param_1)
{
char cVar1;
int iVar2;
long lVar3;
int1 local_9;
if ((param_1 == 0) || (*(long *)(param_1 + 0x40) == 0)) {
local_9 = 1;
}
else {
*(int4 *)(*(long *)(param_1 + 0x40) + 0x90) = 0;
strcpy((char *)(*(long *)(param_1 + 0x40) + 0x297),"00000");
*(int1 *)(*(long *)(param_1 + 0x40) + 0x97) = 0;
if (*(long *)(*(long *)(param_1 + 0x40) + 0x2a0) != 0) {
*(int4 *)(*(long *)(*(long *)(param_1 + 0x40) + 0x2a0) + 4) = 0;
}
lVar3 = ma_pvio_tls_init(*(int8 *)(param_1 + 0x40));
*(long *)(param_1 + 0x38) = lVar3;
if (lVar3 == 0) {
local_9 = 1;
}
else {
cVar1 = ma_pvio_tls_connect(*(int8 *)(param_1 + 0x38));
if (cVar1 == '\0') {
if (((*(ulong *)(*(long *)(param_1 + 0x40) + 0x368) & 0x40000000) == 0) ||
(iVar2 = ma_pvio_tls_verify_server_cert(*(int8 *)(param_1 + 0x38)), iVar2 == 0)) {
if (((*(long *)(*(long *)(param_1 + 0x40) + 0x480) == 0) ||
(((*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x90) == 0 ||
(**(char **)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x90) == '\0')) &&
((*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x98) == 0 ||
(**(char **)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x98) == '\0')))))) ||
(cVar1 = ma_pvio_tls_check_fp
(*(int8 *)(param_1 + 0x38),
*(int8 *)
(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x90),
*(int8 *)
(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x98)),
cVar1 == '\0')) {
local_9 = 0;
}
else {
local_9 = 1;
}
}
else {
local_9 = 1;
}
}
else {
free(*(void **)(param_1 + 0x38));
*(int8 *)(param_1 + 0x38) = 0;
local_9 = 1;
}
}
}
return local_9;
}
|
|
5,735 | set_setup_object_key(PFS_setup_object_key*, enum_object_type, char const*, unsigned int, char const*, unsigned int) | eloqsql/storage/perfschema/pfs_setup_object.cc | static void set_setup_object_key(PFS_setup_object_key *key,
enum_object_type object_type,
const char *schema, uint schema_length,
const char *object, uint object_length)
{
assert(schema_length <= NAME_LEN);
assert(object_length <= NAME_LEN);
char *ptr= &key->m_hash_key[0];
ptr[0]= (char) object_type;
ptr++;
if (schema_length)
{
memcpy(ptr, schema, schema_length);
ptr+= schema_length;
}
ptr[0]= 0;
ptr++;
if (object_length)
{
memcpy(ptr, object, object_length);
ptr+= object_length;
}
ptr[0]= 0;
ptr++;
key->m_key_length= (uint)(ptr - &key->m_hash_key[0]);
} | O3 | cpp | set_setup_object_key(PFS_setup_object_key*, enum_object_type, char const*, unsigned int, char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r12d
movq %r8, %r15
movq %rdi, %rbx
movb %sil, (%rdi)
leaq 0x1(%rdi), %r14
testl %ecx, %ecx
je 0x33407
movl %ecx, %r13d
movq %r14, %rdi
movq %rdx, %rsi
movq %r13, %rdx
callq 0x26290
addq %r13, %r14
movb $0x0, (%r14)
incq %r14
testl %r12d, %r12d
je 0x33427
movl %r12d, %r12d
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x26290
addq %r12, %r14
movb $0x0, (%r14)
subl %ebx, %r14d
incl %r14d
movl %r14d, 0x184(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZL20set_setup_object_keyP20PFS_setup_object_key16enum_object_typePKcjS3_j:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12d, r9d
mov r15, r8
mov rbx, rdi
mov [rdi], sil
lea r14, [rdi+1]
test ecx, ecx
jz short loc_33407
mov r13d, ecx
mov rdi, r14
mov rsi, rdx
mov rdx, r13
call _memcpy
add r14, r13
loc_33407:
mov byte ptr [r14], 0
inc r14
test r12d, r12d
jz short loc_33427
mov r12d, r12d
mov rdi, r14
mov rsi, r15
mov rdx, r12
call _memcpy
add r14, r12
loc_33427:
mov byte ptr [r14], 0
sub r14d, ebx
inc r14d
mov [rbx+184h], r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long set_setup_object_key(long long a1, char a2, long long a3, unsigned int a4, long long a5, unsigned int a6)
{
_BYTE *v8; // r14
long long v9; // r13
long long result; // rax
_BYTE *v11; // r14
*(_BYTE *)a1 = a2;
v8 = (_BYTE *)(a1 + 1);
if ( a4 )
{
v9 = a4;
result = memcpy(a1 + 1, a3, a4);
v8 += v9;
}
*v8 = 0;
v11 = v8 + 1;
if ( a6 )
{
result = memcpy(v11, a5, a6);
v11 += a6;
}
*v11 = 0;
*(_DWORD *)(a1 + 388) = (_DWORD)v11 - a1 + 1;
return result;
}
| set_setup_object_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12D,R9D
MOV R15,R8
MOV RBX,RDI
MOV byte ptr [RDI],SIL
LEA R14,[RDI + 0x1]
TEST ECX,ECX
JZ 0x00133407
MOV R13D,ECX
MOV RDI,R14
MOV RSI,RDX
MOV RDX,R13
CALL 0x00126290
ADD R14,R13
LAB_00133407:
MOV byte ptr [R14],0x0
INC R14
TEST R12D,R12D
JZ 0x00133427
MOV R12D,R12D
MOV RDI,R14
MOV RSI,R15
MOV RDX,R12
CALL 0x00126290
ADD R14,R12
LAB_00133427:
MOV byte ptr [R14],0x0
SUB R14D,EBX
INC R14D
MOV dword ptr [RBX + 0x184],R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* set_setup_object_key(PFS_setup_object_key*, enum_object_type, char const*, unsigned int, char
const*, unsigned int) */
void set_setup_object_key
(int1 *param_1,int1 param_2,void *param_3,uint param_4,void *param_5,
uint param_6)
{
int1 *puVar1;
*param_1 = param_2;
puVar1 = param_1 + 1;
if (param_4 != 0) {
memcpy(puVar1,param_3,(ulong)param_4);
puVar1 = puVar1 + param_4;
}
*puVar1 = 0;
puVar1 = puVar1 + 1;
if (param_6 != 0) {
memcpy(puVar1,param_5,(ulong)param_6);
puVar1 = puVar1 + param_6;
}
*puVar1 = 0;
*(int *)(param_1 + 0x184) = ((int)puVar1 - (int)param_1) + 1;
return;
}
|
|
5,736 | set_object_name | bluesky950520[P]quickjs/quickjs.c | static void set_object_name(JSParseState *s, JSAtom name)
{
JSFunctionDef *fd = s->cur_func;
int opcode;
opcode = get_prev_opcode(fd);
if (opcode == OP_set_name) {
/* XXX: should free atom after OP_set_name? */
fd->byte_code.size = fd->last_opcode_pos;
fd->last_opcode_pos = -1;
emit_op(s, OP_set_name);
emit_atom(s, name);
} else if (opcode == OP_set_class_name) {
int define_class_pos;
JSAtom atom;
define_class_pos = fd->last_opcode_pos + 1 -
get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1);
assert(fd->byte_code.buf[define_class_pos] == OP_define_class);
/* for consistency we free the previous atom which is
JS_ATOM_empty_string */
atom = get_u32(fd->byte_code.buf + define_class_pos + 1);
JS_FreeAtom(s->ctx, atom);
put_u32(fd->byte_code.buf + define_class_pos + 1,
JS_DupAtom(s->ctx, name));
fd->last_opcode_pos = -1;
}
} | O2 | c | set_object_name:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x90(%rdi), %r15
movslq 0x168(%r15), %rax
testq %rax, %rax
js 0x59d20
movl %esi, %ebx
movq %rdi, %r14
movq 0x138(%r15), %rcx
movzbl (%rcx,%rax), %edx
cmpl $0xc3, %edx
je 0x59cd9
cmpl $0x4d, %edx
jne 0x59d20
movq %rax, 0x140(%r15)
orl $-0x1, 0x168(%r15)
pushq $0x4d
popq %rsi
movq %r14, %rdi
callq 0x535cb
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x54cac
movl 0x1(%rcx,%rax), %edx
subl %edx, %eax
incl %eax
movslq %eax, %r12
movl 0x1(%rcx,%r12), %esi
movq (%r14), %rdi
callq 0x1e545
movq 0x138(%r15), %rax
cmpl $0xe0, %ebx
jl 0x59d13
movq (%r14), %rcx
movq 0x18(%rcx), %rcx
movq 0x68(%rcx), %rcx
movl %ebx, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
movl %ebx, 0x1(%rax,%r12)
orl $-0x1, 0x168(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| set_object_name:
push r15
push r14
push r12
push rbx
push rax
mov r15, [rdi+90h]
movsxd rax, dword ptr [r15+168h]
test rax, rax
js loc_59D20
mov ebx, esi
mov r14, rdi
mov rcx, [r15+138h]
movzx edx, byte ptr [rcx+rax]
cmp edx, 0C3h
jz short loc_59CD9
cmp edx, 4Dh ; 'M'
jnz short loc_59D20
mov [r15+140h], rax
or dword ptr [r15+168h], 0FFFFFFFFh
push 4Dh ; 'M'
pop rsi
mov rdi, r14
call emit_op
mov rdi, r14
mov esi, ebx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp emit_atom
loc_59CD9:
mov edx, [rcx+rax+1]
sub eax, edx
inc eax
movsxd r12, eax
mov esi, [rcx+r12+1]
mov rdi, [r14]
call JS_FreeAtom
mov rax, [r15+138h]
cmp ebx, 0E0h
jl short loc_59D13
mov rcx, [r14]
mov rcx, [rcx+18h]
mov rcx, [rcx+68h]
mov edx, ebx
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
loc_59D13:
mov [rax+r12+1], ebx
or dword ptr [r15+168h], 0FFFFFFFFh
loc_59D20:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long set_object_name(long long *a1, int a2)
{
long long v2; // r15
long long result; // rax
long long v4; // rcx
int v5; // edx
long long v6; // r12
_DWORD *v7; // rcx
v2 = a1[18];
result = *(int *)(v2 + 360);
if ( result >= 0 )
{
v4 = *(_QWORD *)(v2 + 312);
v5 = *(unsigned __int8 *)(v4 + result);
if ( v5 == 195 )
{
v6 = (int)result - *(_DWORD *)(v4 + result + 1) + 1;
JS_FreeAtom(*a1, *(_DWORD *)(v4 + v6 + 1));
result = *(_QWORD *)(v2 + 312);
if ( a2 >= 224 )
{
v7 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 24) + 104LL) + 8LL * (unsigned int)a2);
++*v7;
}
*(_DWORD *)(result + v6 + 1) = a2;
*(_DWORD *)(v2 + 360) = -1;
}
else if ( v5 == 77 )
{
*(_QWORD *)(v2 + 320) = result;
*(_DWORD *)(v2 + 360) = -1;
emit_op((long long)a1, 77);
return emit_atom((long long)a1, (unsigned int)a2);
}
}
return result;
}
| set_object_name:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,qword ptr [RDI + 0x90]
MOVSXD RAX,dword ptr [R15 + 0x168]
TEST RAX,RAX
JS 0x00159d20
MOV EBX,ESI
MOV R14,RDI
MOV RCX,qword ptr [R15 + 0x138]
MOVZX EDX,byte ptr [RCX + RAX*0x1]
CMP EDX,0xc3
JZ 0x00159cd9
CMP EDX,0x4d
JNZ 0x00159d20
MOV qword ptr [R15 + 0x140],RAX
OR dword ptr [R15 + 0x168],0xffffffff
PUSH 0x4d
POP RSI
MOV RDI,R14
CALL 0x001535cb
MOV RDI,R14
MOV ESI,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00154cac
LAB_00159cd9:
MOV EDX,dword ptr [RCX + RAX*0x1 + 0x1]
SUB EAX,EDX
INC EAX
MOVSXD R12,EAX
MOV ESI,dword ptr [RCX + R12*0x1 + 0x1]
MOV RDI,qword ptr [R14]
CALL 0x0011e545
MOV RAX,qword ptr [R15 + 0x138]
CMP EBX,0xe0
JL 0x00159d13
MOV RCX,qword ptr [R14]
MOV RCX,qword ptr [RCX + 0x18]
MOV RCX,qword ptr [RCX + 0x68]
MOV EDX,EBX
MOV RCX,qword ptr [RCX + RDX*0x8]
INC dword ptr [RCX]
LAB_00159d13:
MOV dword ptr [RAX + R12*0x1 + 0x1],EBX
OR dword ptr [R15 + 0x168],0xffffffff
LAB_00159d20:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void set_object_name(long *param_1,uint param_2)
{
long lVar1;
long lVar2;
int *piVar3;
long lVar4;
long lVar5;
lVar1 = param_1[0x12];
lVar4 = (long)*(int *)(lVar1 + 0x168);
if (-1 < lVar4) {
lVar2 = *(long *)(lVar1 + 0x138);
if (*(char *)(lVar2 + lVar4) == -0x3d) {
lVar5 = (long)((*(int *)(lVar1 + 0x168) - *(int *)(lVar2 + 1 + lVar4)) + 1);
JS_FreeAtom(*param_1,*(int4 *)(lVar2 + 1 + lVar5));
lVar4 = *(long *)(lVar1 + 0x138);
if (0xdf < (int)param_2) {
piVar3 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + (ulong)param_2 * 8);
*piVar3 = *piVar3 + 1;
}
*(uint *)(lVar4 + 1 + lVar5) = param_2;
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
}
else if (*(char *)(lVar2 + lVar4) == 'M') {
*(long *)(lVar1 + 0x140) = lVar4;
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
emit_op(param_1,0x4d);
emit_atom(param_1,param_2);
return;
}
}
return;
}
|
|
5,737 | trnman_exists_active_transactions | eloqsql/storage/maria/trnman.c | my_bool trnman_exists_active_transactions(TrID min_id, TrID max_id,
my_bool trnman_is_locked)
{
TRN *trn;
my_bool ret= 0;
if (!trnman_is_locked)
mysql_mutex_lock(&LOCK_trn_list);
mysql_mutex_assert_owner(&LOCK_trn_list);
for (trn= active_list_min.next; trn != &active_list_max; trn= trn->next)
{
/*
We use <= for max_id as max_id is a commit_trid and trn->trid
is transaction id. When calculating commit_trid we use the
current value of global_trid_generator. global_trid_generator is
incremented for each new transaction.
For example, assuming we have
min_id = 5
max_id = 10
A trid of value 5 can't see the history event between 5 & 10
at it vas started before min_id 5 was committed.
A trid of value 10 can't see the next history event (max_id = 10)
as it started before this was committed. In this case it must use
the this event.
*/
if (trn->trid > min_id && trn->trid <= max_id)
{
ret= 1;
break;
}
}
if (!trnman_is_locked)
mysql_mutex_unlock(&LOCK_trn_list);
return ret;
} | O0 | c | trnman_exists_active_transactions:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movb $0x0, -0x21(%rbp)
cmpb $0x0, -0x11(%rbp)
jne 0x4a677
leaq 0x438a32(%rip), %rdi # 0x483098
leaq 0x10fe93(%rip), %rsi # 0x15a500
movl $0x3a8, %edx # imm = 0x3A8
callq 0x49630
jmp 0x4a679
jmp 0x4a67b
movq 0x4386d6(%rip), %rax # 0x482d58
movq %rax, -0x20(%rbp)
leaq 0x438713(%rip), %rax # 0x482da0
cmpq %rax, -0x20(%rbp)
je 0x4a6c5
movq -0x20(%rbp), %rax
movq 0x78(%rax), %rax
cmpq -0x8(%rbp), %rax
jbe 0x4a6b5
movq -0x20(%rbp), %rax
movq 0x78(%rax), %rax
cmpq -0x10(%rbp), %rax
ja 0x4a6b5
movb $0x1, -0x21(%rbp)
jmp 0x4a6c5
jmp 0x4a6b7
movq -0x20(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x4a686
cmpb $0x0, -0x11(%rbp)
jne 0x4a6d7
leaq 0x4389c6(%rip), %rdi # 0x483098
callq 0x496a0
movb -0x21(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
| trnman_exists_active_transactions:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_11], al
mov [rbp+var_21], 0
cmp [rbp+var_11], 0
jnz short loc_4A677
lea rdi, LOCK_trn_list
lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3A8h
call inline_mysql_mutex_lock_6
loc_4A677:
jmp short $+2
loc_4A679:
jmp short $+2
loc_4A67B:
mov rax, cs:qword_482D58
mov [rbp+var_20], rax
loc_4A686:
lea rax, active_list_max
cmp [rbp+var_20], rax
jz short loc_4A6C5
mov rax, [rbp+var_20]
mov rax, [rax+78h]
cmp rax, [rbp+var_8]
jbe short loc_4A6B5
mov rax, [rbp+var_20]
mov rax, [rax+78h]
cmp rax, [rbp+var_10]
ja short loc_4A6B5
mov [rbp+var_21], 1
jmp short loc_4A6C5
loc_4A6B5:
jmp short $+2
loc_4A6B7:
mov rax, [rbp+var_20]
mov rax, [rax+68h]
mov [rbp+var_20], rax
jmp short loc_4A686
loc_4A6C5:
cmp [rbp+var_11], 0
jnz short loc_4A6D7
lea rdi, LOCK_trn_list
call inline_mysql_mutex_unlock_6
loc_4A6D7:
mov al, [rbp+var_21]
add rsp, 30h
pop rbp
retn
| char trnman_exists_active_transactions(unsigned long long a1, unsigned long long a2, char a3)
{
char v4; // [rsp+Fh] [rbp-21h]
long long i; // [rsp+10h] [rbp-20h]
v4 = 0;
if ( !a3 )
inline_mysql_mutex_lock_6(
(long long)&LOCK_trn_list,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",
0x3A8u);
for ( i = qword_482D58; (_UNKNOWN *)i != &active_list_max; i = *(_QWORD *)(i + 104) )
{
if ( *(_QWORD *)(i + 120) > a1 && *(_QWORD *)(i + 120) <= a2 )
{
v4 = 1;
break;
}
}
if ( !a3 )
inline_mysql_mutex_unlock_6((long long)&LOCK_trn_list);
return v4;
}
| trnman_exists_active_transactions:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV byte ptr [RBP + -0x11],AL
MOV byte ptr [RBP + -0x21],0x0
CMP byte ptr [RBP + -0x11],0x0
JNZ 0x0014a677
LEA RDI,[0x583098]
LEA RSI,[0x25a500]
MOV EDX,0x3a8
CALL 0x00149630
LAB_0014a677:
JMP 0x0014a679
LAB_0014a679:
JMP 0x0014a67b
LAB_0014a67b:
MOV RAX,qword ptr [0x00582d58]
MOV qword ptr [RBP + -0x20],RAX
LAB_0014a686:
LEA RAX,[0x582da0]
CMP qword ptr [RBP + -0x20],RAX
JZ 0x0014a6c5
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x78]
CMP RAX,qword ptr [RBP + -0x8]
JBE 0x0014a6b5
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x78]
CMP RAX,qword ptr [RBP + -0x10]
JA 0x0014a6b5
MOV byte ptr [RBP + -0x21],0x1
JMP 0x0014a6c5
LAB_0014a6b5:
JMP 0x0014a6b7
LAB_0014a6b7:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x68]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0014a686
LAB_0014a6c5:
CMP byte ptr [RBP + -0x11],0x0
JNZ 0x0014a6d7
LEA RDI,[0x583098]
CALL 0x001496a0
LAB_0014a6d7:
MOV AL,byte ptr [RBP + -0x21]
ADD RSP,0x30
POP RBP
RET
|
int1 trnman_exists_active_transactions(ulong param_1,ulong param_2,char param_3)
{
int1 local_29;
int1 *local_28;
local_29 = 0;
if (param_3 == '\0') {
inline_mysql_mutex_lock
(LOCK_trn_list,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x3a8
);
}
local_28 = (int1 *)active_list_min._104_8_;
do {
if (local_28 == active_list_max) {
LAB_0014a6c5:
if (param_3 == '\0') {
inline_mysql_mutex_unlock(LOCK_trn_list);
}
return local_29;
}
if ((param_1 < *(ulong *)(local_28 + 0x78)) && (*(ulong *)(local_28 + 0x78) <= param_2)) {
local_29 = 1;
goto LAB_0014a6c5;
}
local_28 = *(int1 **)(local_28 + 0x68);
} while( true );
}
|
|
5,738 | testing::internal::DeathTestImpl::ReadAndInterpretStatusByte() | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc | void DeathTestImpl::ReadAndInterpretStatusByte() {
char flag;
int bytes_read;
// The read() here blocks until data is available (signifying the
// failure of the death test) or until the pipe is closed (signifying
// its success), so it's okay to call this in the parent before
// the child process has exited.
do {
bytes_read = posix::Read(read_fd(), &flag, 1);
} while (bytes_read == -1 && errno == EINTR);
if (bytes_read == 0) {
set_outcome(DIED);
} else if (bytes_read == 1) {
switch (flag) {
case kDeathTestReturned:
set_outcome(RETURNED);
break;
case kDeathTestThrew:
set_outcome(THREW);
break;
case kDeathTestLived:
set_outcome(LIVED);
break;
case kDeathTestInternalError:
FailFromInternalError(read_fd()); // Does not return.
break;
default:
GTEST_LOG_(FATAL) << "Death test child process reported "
<< "unexpected status byte ("
<< static_cast<unsigned int>(flag) << ")";
}
} else {
GTEST_LOG_(FATAL) << "Read from death test child process failed: "
<< GetLastErrnoDescription();
}
GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(read_fd()));
set_read_fd(-1);
} | O0 | cpp | testing::internal::DeathTestImpl::ReadAndInterpretStatusByte():
subq $0x1c8, %rsp # imm = 0x1C8
movq %rdi, 0x1c0(%rsp)
movq 0x1c0(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
callq 0xeaf80
movl %eax, %edi
leaq 0x1bf(%rsp), %rsi
movl $0x1, %edx
callq 0xeaf50
movl %eax, 0x1b8(%rsp)
xorl %eax, %eax
cmpl $-0x1, 0x1b8(%rsp)
movb %al, 0x5f(%rsp)
jne 0xb9860
callq 0x16050
cmpl $0x4, (%rax)
sete %al
movb %al, 0x5f(%rsp)
movb 0x5f(%rsp), %al
testb $0x1, %al
jne 0xb981c
cmpl $0x0, 0x1b8(%rsp)
jne 0xb9886
movq 0x60(%rsp), %rdi
movl $0x1, %esi
callq 0xeaf90
jmp 0xb9ab0
cmpl $0x1, 0x1b8(%rsp)
jne 0xb99da
movsbl 0x1bf(%rsp), %eax
addl $-0x49, %eax
movl %eax, %ecx
movq %rcx, 0x50(%rsp)
subl $0xb, %eax
ja 0xb9912
movq 0x50(%rsp), %rax
leaq 0x614c9(%rip), %rcx # 0x11ad80
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x60(%rsp), %rdi
movl $0x3, %esi
callq 0xeaf90
jmp 0xb99af
movq 0x60(%rsp), %rdi
movl $0x4, %esi
callq 0xeaf90
jmp 0xb99af
movq 0x60(%rsp), %rdi
movl $0x2, %esi
callq 0xeaf90
jmp 0xb99af
movq 0x60(%rsp), %rdi
callq 0xeaf80
movl %eax, %edi
callq 0xb9d80
jmp 0xb99af
leaq 0x62c59(%rip), %rdx # 0x11c572
leaq 0x1b4(%rsp), %rdi
movq %rdi, 0x40(%rsp)
movl $0x3, %esi
movl $0x1f3, %ecx # imm = 0x1F3
callq 0xc17d0
movq 0x40(%rsp), %rdi
callq 0x20a90
movq %rax, 0x48(%rsp)
jmp 0xb9946
movq 0x48(%rsp), %rdi
leaq 0x62c8c(%rip), %rsi # 0x11c5de
callq 0x166e0
movq %rax, 0x38(%rsp)
jmp 0xb995e
movq 0x38(%rsp), %rdi
leaq 0x62c97(%rip), %rsi # 0x11c601
callq 0x166e0
movq %rax, 0x30(%rsp)
jmp 0xb9976
movq 0x30(%rsp), %rdi
movsbl 0x1bf(%rsp), %esi
callq 0x169e0
movq %rax, 0x28(%rsp)
jmp 0xb998f
movq 0x28(%rsp), %rdi
leaq 0x63d40(%rip), %rsi # 0x11d6db
callq 0x166e0
jmp 0xb99a2
leaq 0x1b4(%rsp), %rdi
callq 0xc1940
jmp 0xb9aae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
leaq 0x1b4(%rsp), %rdi
callq 0xc1940
jmp 0xb9d73
leaq 0x62b91(%rip), %rdx # 0x11c572
leaq 0x1a0(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movl $0x3, %esi
movl $0x1f8, %ecx # imm = 0x1F8
callq 0xc17d0
movq 0x18(%rsp), %rdi
callq 0x20a90
movq %rax, 0x20(%rsp)
jmp 0xb9a0e
movq 0x20(%rsp), %rdi
leaq 0x62c00(%rip), %rsi # 0x11c61a
callq 0x166e0
movq %rax, 0x10(%rsp)
jmp 0xb9a26
leaq 0x180(%rsp), %rdi
callq 0xb94e0
jmp 0xb9a35
movq 0x10(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x16620
jmp 0xb9a49
leaq 0x180(%rsp), %rdi
callq 0x1dfd0
leaq 0x1a0(%rsp), %rdi
callq 0xc1940
jmp 0xb9aae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
jmp 0xb9a9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
leaq 0x180(%rsp), %rdi
callq 0x1dfd0
leaq 0x1a0(%rsp), %rdi
callq 0xc1940
jmp 0xb9d73
jmp 0xb9ab0
jmp 0xb9ab2
jmp 0xb9ab4
movq 0x60(%rsp), %rdi
callq 0xeaf80
movl %eax, %edi
callq 0xeafb0
movl %eax, 0x17c(%rsp)
xorl %eax, %eax
cmpl $-0x1, 0x17c(%rsp)
movb %al, 0xf(%rsp)
jne 0xb9aeb
callq 0x16050
cmpl $0x4, (%rax)
sete %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0xb9ab4
cmpl $-0x1, 0x17c(%rsp)
jne 0xb9d4d
leaq 0x97(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x16d00
movq (%rsp), %rdx
leaq 0x62b29(%rip), %rsi # 0x11c646
leaq 0x98(%rsp), %rdi
callq 0x1dbb0
jmp 0xb9b2c
leaq 0x62a3f(%rip), %rdx # 0x11c572
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x42350
jmp 0xb9b4a
leaq 0x62b09(%rip), %rdx # 0x11c65a
leaq 0xd8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x42350
jmp 0xb9b68
movl $0x1fb, 0x6c(%rsp) # imm = 0x1FB
leaq 0x70(%rsp), %rdi
leaq 0x6c(%rsp), %rsi
callq 0xeafc0
jmp 0xb9b81
leaq 0xf8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x945a0
jmp 0xb9b9d
leaq 0x640b0(%rip), %rdx # 0x11dc54
leaq 0x118(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x42350
jmp 0xb9bbb
leaq 0x62aa0(%rip), %rdx # 0x11c662
leaq 0x138(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x42350
jmp 0xb9bd9
leaq 0x62c8a(%rip), %rdx # 0x11c86a
leaq 0x158(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x42350
jmp 0xb9bf7
leaq 0x158(%rsp), %rdi
callq 0xb9640
jmp 0xb9c06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
jmp 0xb9d3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
jmp 0xb9d31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
jmp 0xb9d24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
jmp 0xb9d17
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
jmp 0xb9d0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
jmp 0xb9d00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
jmp 0xb9cf3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
jmp 0xb9ce6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x1dfd0
leaq 0x138(%rsp), %rdi
callq 0x1dfd0
leaq 0x118(%rsp), %rdi
callq 0x1dfd0
leaq 0xf8(%rsp), %rdi
callq 0x1dfd0
leaq 0x70(%rsp), %rdi
callq 0x1dfd0
leaq 0xd8(%rsp), %rdi
callq 0x1dfd0
leaq 0xb8(%rsp), %rdi
callq 0x1dfd0
leaq 0x98(%rsp), %rdi
callq 0x1dfd0
leaq 0x97(%rsp), %rdi
callq 0x16790
jmp 0xb9d73
jmp 0xb9d4f
callq 0xeb050
testb $0x1, %al
jne 0xb9ab2
movq 0x60(%rsp), %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0xeb060
addq $0x1c8, %rsp # imm = 0x1C8
retq
movq 0x1a8(%rsp), %rdi
callq 0x16cf0
| _ZN7testing8internal13DeathTestImpl26ReadAndInterpretStatusByteEv:
sub rsp, 1C8h
mov qword ptr [rsp+1C8h+var_9+1], rdi
mov rax, qword ptr [rsp+1C8h+var_9+1]
mov [rsp+1C8h+var_168], rax
loc_B981C:
mov rdi, [rsp+1C8h+var_168]; this
call _ZNK7testing8internal13DeathTestImpl7read_fdEv; testing::internal::DeathTestImpl::read_fd(void)
mov edi, eax; this
lea rsi, [rsp+1C8h+var_9]; int
mov edx, (offset dword_0+1); void *
call _ZN7testing8internal5posix4ReadEiPvj; testing::internal::posix::Read(int,void *,uint)
mov dword ptr [rsp+1C8h+var_14+4], eax
xor eax, eax
cmp dword ptr [rsp+1C8h+var_14+4], 0FFFFFFFFh
mov [rsp+1C8h+var_169], al
jnz short loc_B9860
call ___errno_location
cmp dword ptr [rax], 4
setz al
mov [rsp+1C8h+var_169], al
loc_B9860:
mov al, [rsp+1C8h+var_169]
test al, 1
jnz short loc_B981C
cmp dword ptr [rsp+1C8h+var_14+4], 0
jnz short loc_B9886
mov rdi, [rsp+1C8h+var_168]
mov esi, 1; int
call _ZN7testing8internal13DeathTestImpl11set_outcomeENS0_16DeathTestOutcomeE; testing::internal::DeathTestImpl::set_outcome(testing::internal::DeathTestOutcome)
jmp loc_B9AB0
loc_B9886:
cmp dword ptr [rsp+1C8h+var_14+4], 1
jnz loc_B99DA
movsx eax, byte ptr [rsp+1C8h+var_9]
add eax, 0FFFFFFB7h; switch 12 cases
mov ecx, eax
mov [rsp+1C8h+var_178], rcx
sub eax, 0Bh
ja short def_B98BE; jumptable 00000000000B98BE default case, cases 74,75,77-81,83
mov rax, [rsp+1C8h+var_178]
lea rcx, jpt_B98BE
movsxd rax, ds:(jpt_B98BE - 11AD80h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_B98C0:
mov rdi, [rsp+1C8h+var_168]; jumptable 00000000000B98BE case 82
mov esi, 3
call _ZN7testing8internal13DeathTestImpl11set_outcomeENS0_16DeathTestOutcomeE; testing::internal::DeathTestImpl::set_outcome(testing::internal::DeathTestOutcome)
jmp loc_B99AF
loc_B98D4:
mov rdi, [rsp+1C8h+var_168]; jumptable 00000000000B98BE case 84
mov esi, 4
call _ZN7testing8internal13DeathTestImpl11set_outcomeENS0_16DeathTestOutcomeE; testing::internal::DeathTestImpl::set_outcome(testing::internal::DeathTestOutcome)
jmp loc_B99AF
loc_B98E8:
mov rdi, [rsp+1C8h+var_168]; jumptable 00000000000B98BE case 76
mov esi, 2
call _ZN7testing8internal13DeathTestImpl11set_outcomeENS0_16DeathTestOutcomeE; testing::internal::DeathTestImpl::set_outcome(testing::internal::DeathTestOutcome)
jmp loc_B99AF
loc_B98FC:
mov rdi, [rsp+1C8h+var_168]; jumptable 00000000000B98BE case 73
call _ZNK7testing8internal13DeathTestImpl7read_fdEv; testing::internal::DeathTestImpl::read_fd(void)
mov edi, eax; this
call _ZN7testing8internalL21FailFromInternalErrorEi; testing::internal::FailFromInternalError(int)
jmp loc_B99AF
def_B98BE:
lea rdx, aWorkspaceLlm4b_9; jumptable 00000000000B98BE default case, cases 74,75,77-81,83
lea rdi, [rsp+1C8h+var_14]; int
mov [rsp+1C8h+var_188], rdi; __int64
mov esi, 3
mov ecx, 1F3h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, [rsp+1C8h+var_188]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov [rsp+1C8h+var_180], rax
jmp short $+2
loc_B9946:
mov rdi, [rsp+1C8h+var_180]
lea rsi, aDeathTestChild; "Death test child process reported "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+1C8h+var_190], rax
jmp short $+2
loc_B995E:
mov rdi, [rsp+1C8h+var_190]
lea rsi, aUnexpectedStat; "unexpected status byte ("
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+1C8h+var_198], rax
jmp short $+2
loc_B9976:
mov rdi, [rsp+1C8h+var_198]
movsx esi, byte ptr [rsp+1C8h+var_9]
call __ZNSolsEj; std::ostream::operator<<(uint)
mov [rsp+1C8h+var_1A0], rax
jmp short $+2
loc_B998F:
mov rdi, [rsp+1C8h+var_1A0]
lea rsi, aTeardowntestsu+12h; ")"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_B99A2:
lea rdi, [rsp+1C8h+var_14]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
loc_B99AF:
jmp loc_B9AAE
mov rcx, rax
mov eax, edx
mov [rsp+1C8h+var_20], rcx
mov [rsp+1C8h+var_24], eax
lea rdi, [rsp+1C8h+var_14]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp loc_B9D73
loc_B99DA:
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+1C8h+var_28]; int
mov [rsp+1C8h+var_1B0], rdi; int
mov esi, 3
mov ecx, 1F8h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, [rsp+1C8h+var_1B0]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov [rsp+1C8h+var_1A8], rax
jmp short $+2
loc_B9A0E:
mov rdi, [rsp+1C8h+var_1A8]
lea rsi, aReadFromDeathT; "Read from death test child process fail"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+1C8h+var_1B8], rax
jmp short $+2
loc_B9A26:
lea rdi, [rsp+1C8h+var_48]
call _ZN7testing8internal23GetLastErrnoDescriptionB5cxx11Ev; testing::internal::GetLastErrnoDescription(void)
jmp short $+2
loc_B9A35:
mov rdi, [rsp+1C8h+var_1B8]
lea rsi, [rsp+1C8h+var_48]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_B9A49:
lea rdi, [rsp+1C8h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+1C8h+var_28]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_B9AAE
mov rcx, rax
mov eax, edx
mov [rsp+1C8h+var_20], rcx
mov [rsp+1C8h+var_24], eax
jmp short loc_B9A9C
mov rcx, rax
mov eax, edx
mov [rsp+1C8h+var_20], rcx
mov [rsp+1C8h+var_24], eax
lea rdi, [rsp+1C8h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_B9A9C:
lea rdi, [rsp+1C8h+var_28]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp loc_B9D73
loc_B9AAE:
jmp short $+2
loc_B9AB0:
jmp short $+2
loc_B9AB2:
jmp short $+2
loc_B9AB4:
mov rdi, [rsp+1C8h+var_168]; this
call _ZNK7testing8internal13DeathTestImpl7read_fdEv; testing::internal::DeathTestImpl::read_fd(void)
mov edi, eax; this
call _ZN7testing8internal5posix5CloseEi; testing::internal::posix::Close(int)
mov [rsp+1C8h+var_4C], eax
xor eax, eax
cmp [rsp+1C8h+var_4C], 0FFFFFFFFh
mov [rsp+1C8h+var_1B9], al
jnz short loc_B9AEB
call ___errno_location
cmp dword ptr [rax], 4
setz al
mov [rsp+1C8h+var_1B9], al
loc_B9AEB:
mov al, [rsp+1C8h+var_1B9]
test al, 1
jnz short loc_B9AB4
cmp [rsp+1C8h+var_4C], 0FFFFFFFFh
jnz loc_B9D4D
lea rdi, [rsp+1C8h+var_131]
mov [rsp+1C8h+var_1C8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+1C8h+var_1C8]
lea rsi, aCheckFailedFil; "CHECK failed: File "
lea rdi, [rsp+1C8h+var_130]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_B9B2C:
lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+1C8h+var_110]
lea rsi, [rsp+1C8h+var_130]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_B9B4A:
lea rdx, aLine; ", line "
lea rdi, [rsp+1C8h+var_F0]
lea rsi, [rsp+1C8h+var_110]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_B9B68:
mov [rsp+1C8h+var_15C], 1FBh
lea rdi, [rsp+1C8h+var_158]
lea rsi, [rsp+1C8h+var_15C]
call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&)
jmp short $+2
loc_B9B81:
lea rdi, [rsp+1C8h+var_D0]
lea rsi, [rsp+1C8h+var_F0]
lea rdx, [rsp+1C8h+var_158]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_B9B9D:
lea rdx, asc_11DC53+1; ": "
lea rdi, [rsp+1C8h+var_B0]
lea rsi, [rsp+1C8h+var_D0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_B9BBB:
lea rdx, aPosixCloseRead; "posix::Close(read_fd())"
lea rdi, [rsp+1C8h+var_90]
lea rsi, [rsp+1C8h+var_B0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_B9BD9:
lea rdx, aFcntlPipeFd1FS+1Dh; " != -1"
lea rdi, [rsp+1C8h+var_70]
lea rsi, [rsp+1C8h+var_90]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_B9BF7:
lea rdi, [rsp+1C8h+var_70]
call _ZN7testing8internalL14DeathTestAbortERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::DeathTestAbort(std::string const&)
jmp short $+2
loc_B9C06:
mov rcx, rax
mov eax, edx
mov [rsp+1C8h+var_20], rcx
mov [rsp+1C8h+var_24], eax
jmp loc_B9D3E
mov rcx, rax
mov eax, edx
mov [rsp+1C8h+var_20], rcx
mov [rsp+1C8h+var_24], eax
jmp loc_B9D31
mov rcx, rax
mov eax, edx
mov [rsp+1C8h+var_20], rcx
mov [rsp+1C8h+var_24], eax
jmp loc_B9D24
mov rcx, rax
mov eax, edx
mov [rsp+1C8h+var_20], rcx
mov [rsp+1C8h+var_24], eax
jmp loc_B9D17
mov rcx, rax
mov eax, edx
mov [rsp+1C8h+var_20], rcx
mov [rsp+1C8h+var_24], eax
jmp loc_B9D0D
mov rcx, rax
mov eax, edx
mov [rsp+1C8h+var_20], rcx
mov [rsp+1C8h+var_24], eax
jmp short loc_B9D00
mov rcx, rax
mov eax, edx
mov [rsp+1C8h+var_20], rcx
mov [rsp+1C8h+var_24], eax
jmp short loc_B9CF3
mov rcx, rax
mov eax, edx
mov [rsp+1C8h+var_20], rcx
mov [rsp+1C8h+var_24], eax
jmp short loc_B9CE6
mov rcx, rax
mov eax, edx
mov [rsp+1C8h+var_20], rcx
mov [rsp+1C8h+var_24], eax
lea rdi, [rsp+1C8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_B9CE6:
lea rdi, [rsp+1C8h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_B9CF3:
lea rdi, [rsp+1C8h+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_B9D00:
lea rdi, [rsp+1C8h+var_D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_B9D0D:
lea rdi, [rsp+1C8h+var_158]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_B9D17:
lea rdi, [rsp+1C8h+var_F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_B9D24:
lea rdi, [rsp+1C8h+var_110]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_B9D31:
lea rdi, [rsp+1C8h+var_130]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_B9D3E:
lea rdi, [rsp+1C8h+var_131]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_B9D73
loc_B9D4D:
jmp short $+2
loc_B9D4F:
call _ZN7testing8internal11AlwaysFalseEv; testing::internal::AlwaysFalse(void)
test al, 1
jnz loc_B9AB2
mov rdi, [rsp+1C8h+var_168]; this
mov esi, 0FFFFFFFFh; int
call _ZN7testing8internal13DeathTestImpl11set_read_fdEi; testing::internal::DeathTestImpl::set_read_fd(int)
add rsp, 1C8h
retn
loc_B9D73:
mov rdi, [rsp+1C8h+var_20]
call __Unwind_Resume
| long long testing::internal::DeathTestImpl::ReadAndInterpretStatusByte(testing::internal::DeathTestImpl *this)
{
testing::internal::posix *fd; // rdi
char *v2; // rsi
unsigned int v3; // ecx
unsigned int v4; // eax
testing::internal::posix *v5; // rdi
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v11; // [rsp+0h] [rbp-1C8h]
int v12; // [rsp+8h] [rbp-1C0h]
bool v13; // [rsp+Fh] [rbp-1B9h]
long long v14; // [rsp+10h] [rbp-1B8h]
testing::internal::GTestLog *v15; // [rsp+18h] [rbp-1B0h]
void *v16; // [rsp+20h] [rbp-1A8h]
long long v17; // [rsp+28h] [rbp-1A0h]
int v18; // [rsp+30h] [rbp-198h]
long long v19; // [rsp+30h] [rbp-198h]
int v20; // [rsp+38h] [rbp-190h]
long long v21; // [rsp+38h] [rbp-190h]
testing::internal::GTestLog *v22; // [rsp+40h] [rbp-188h]
testing::internal::GTestLog *v23; // [rsp+40h] [rbp-188h]
char v24; // [rsp+48h] [rbp-180h]
void *Stream; // [rsp+48h] [rbp-180h]
bool v26; // [rsp+5Fh] [rbp-169h]
int v28; // [rsp+6Ch] [rbp-15Ch] BYREF
_BYTE v29[39]; // [rsp+70h] [rbp-158h] BYREF
char v30; // [rsp+97h] [rbp-131h] BYREF
_BYTE v31[32]; // [rsp+98h] [rbp-130h] BYREF
_BYTE v32[32]; // [rsp+B8h] [rbp-110h] BYREF
_QWORD v33[4]; // [rsp+D8h] [rbp-F0h] BYREF
_BYTE v34[32]; // [rsp+F8h] [rbp-D0h] BYREF
_BYTE v35[32]; // [rsp+118h] [rbp-B0h] BYREF
_BYTE v36[32]; // [rsp+138h] [rbp-90h] BYREF
_BYTE v37[36]; // [rsp+158h] [rbp-70h] BYREF
int v38; // [rsp+17Ch] [rbp-4Ch]
_BYTE v39[32]; // [rsp+180h] [rbp-48h] BYREF
int v40; // [rsp+1A0h] [rbp-28h] BYREF
long long v41; // [rsp+1B4h] [rbp-14h] BYREF
_BYTE v42[9]; // [rsp+1BFh] [rbp-9h] BYREF
*(_QWORD *)&v42[1] = this;
do
{
fd = (testing::internal::posix *)(unsigned int)testing::internal::DeathTestImpl::read_fd(this);
v2 = v42;
HIDWORD(v41) = testing::internal::posix::Read(fd, (int)v42, (char *)&dword_0 + 1, v3);
v26 = 0;
if ( HIDWORD(v41) == -1 )
v26 = *(_DWORD *)__errno_location() == 4;
}
while ( v26 );
if ( HIDWORD(v41) )
{
if ( HIDWORD(v41) == 1 )
{
switch ( v42[0] )
{
case 'I':
v4 = testing::internal::DeathTestImpl::read_fd(this);
testing::internal::FailFromInternalError((testing::internal *)v4, (int)v42);
break;
case 'L':
LODWORD(v2) = 2;
testing::internal::DeathTestImpl::set_outcome(this, 2LL);
break;
case 'R':
LODWORD(v2) = 3;
testing::internal::DeathTestImpl::set_outcome(this, 3LL);
break;
case 'T':
LODWORD(v2) = 4;
testing::internal::DeathTestImpl::set_outcome(this, 4LL);
break;
default:
testing::internal::GTestLog::GTestLog(
(int)&v41,
v11,
v12,
v14,
(int)v15,
(int)v16,
v17,
v18,
v20,
(long long)&v41,
v24);
Stream = testing::internal::GTestLog::GetStream(v23);
v21 = std::operator<<<std::char_traits<char>>(Stream, "Death test child process reported ");
v19 = std::operator<<<std::char_traits<char>>(v21, "unexpected status byte (");
v17 = std::ostream::operator<<(v19, v42[0]);
v2 = ")";
std::operator<<<std::char_traits<char>>(v17, ")");
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v41);
break;
}
}
else
{
testing::internal::GTestLog::GTestLog(
(int)&v40,
v11,
v12,
v14,
(int)&v40,
(int)v16,
v17,
v18,
v20,
(long long)v22,
v24);
v16 = testing::internal::GTestLog::GetStream(v15);
v14 = std::operator<<<std::char_traits<char>>(v16, "Read from death test child process failed: ");
testing::internal::GetLastErrnoDescription[abi:cxx11](
(long long)v39,
(int)"Read from death test child process failed: ");
v2 = v39;
std::operator<<<char>(v14, v39);
std::string::~string(v39);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v40);
}
}
else
{
LODWORD(v2) = 1;
testing::internal::DeathTestImpl::set_outcome(this, 1LL);
}
while ( 1 )
{
v5 = (testing::internal::posix *)(unsigned int)testing::internal::DeathTestImpl::read_fd(this);
v38 = testing::internal::posix::Close(v5, (int)v2);
v13 = 0;
if ( v38 == -1 )
v13 = *(_DWORD *)__errno_location() == 4;
if ( !v13 )
{
if ( v38 == -1 )
{
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v31, (long long)"CHECK failed: File ", (long long)&v30);
std::operator+<char>(
(long long)v32,
(long long)v31,
(long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc");
std::operator+<char>((long long)v33, (long long)v32, (long long)", line ");
v28 = 507;
testing::internal::StreamableToString<int>(
(unsigned int)v29,
(unsigned int)&v28,
v6,
v7,
v8,
v9,
(unsigned int)&v30,
v12,
v14,
(_DWORD)v15,
(long long)v16,
v17);
std::operator+<char>((long long)v34, v33, (long long)v29);
std::operator+<char>((long long)v35, (long long)v34, (long long)": ");
std::operator+<char>((long long)v36, (long long)v35, (long long)"posix::Close(read_fd())");
std::operator+<char>((long long)v37, (long long)v36, (long long)" != -1");
testing::internal::DeathTestAbort((testing::internal *)v37);
}
if ( (testing::internal::AlwaysFalse(v5) & 1) == 0 )
break;
}
}
return testing::internal::DeathTestImpl::set_read_fd(this, -1);
}
| ReadAndInterpretStatusByte:
SUB RSP,0x1c8
MOV qword ptr [RSP + 0x1c0],RDI
MOV RAX,qword ptr [RSP + 0x1c0]
MOV qword ptr [RSP + 0x60],RAX
LAB_001b981c:
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x001eaf80
MOV EDI,EAX
LEA RSI,[RSP + 0x1bf]
MOV EDX,0x1
CALL 0x001eaf50
MOV dword ptr [RSP + 0x1b8],EAX
XOR EAX,EAX
CMP dword ptr [RSP + 0x1b8],-0x1
MOV byte ptr [RSP + 0x5f],AL
JNZ 0x001b9860
CALL 0x00116050
CMP dword ptr [RAX],0x4
SETZ AL
MOV byte ptr [RSP + 0x5f],AL
LAB_001b9860:
MOV AL,byte ptr [RSP + 0x5f]
TEST AL,0x1
JNZ 0x001b981c
CMP dword ptr [RSP + 0x1b8],0x0
JNZ 0x001b9886
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,0x1
CALL 0x001eaf90
JMP 0x001b9ab0
LAB_001b9886:
CMP dword ptr [RSP + 0x1b8],0x1
JNZ 0x001b99da
MOVSX EAX,byte ptr [RSP + 0x1bf]
ADD EAX,-0x49
MOV ECX,EAX
MOV qword ptr [RSP + 0x50],RCX
SUB EAX,0xb
JA 0x001b9912
MOV RAX,qword ptr [RSP + 0x50]
LEA RCX,[0x21ad80]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_52:
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,0x3
CALL 0x001eaf90
JMP 0x001b99af
caseD_54:
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,0x4
CALL 0x001eaf90
JMP 0x001b99af
caseD_4c:
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,0x2
CALL 0x001eaf90
JMP 0x001b99af
caseD_49:
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x001eaf80
MOV EDI,EAX
CALL 0x001b9d80
JMP 0x001b99af
caseD_4a:
LEA RDX,[0x21c572]
LEA RDI,[RSP + 0x1b4]
MOV qword ptr [RSP + 0x40],RDI
MOV ESI,0x3
MOV ECX,0x1f3
CALL 0x001c17d0
MOV RDI,qword ptr [RSP + 0x40]
LAB_001b993a:
CALL 0x00120a90
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001b9946
LAB_001b9946:
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[0x21c5de]
CALL 0x001166e0
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001b995e
LAB_001b995e:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[0x21c601]
CALL 0x001166e0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001b9976
LAB_001b9976:
MOV RDI,qword ptr [RSP + 0x30]
MOVSX ESI,byte ptr [RSP + 0x1bf]
CALL 0x001169e0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001b998f
LAB_001b998f:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[0x21d6db]
CALL 0x001166e0
LAB_001b99a0:
JMP 0x001b99a2
LAB_001b99a2:
LEA RDI,[RSP + 0x1b4]
CALL 0x001c1940
LAB_001b99af:
JMP 0x001b9aae
LAB_001b99da:
LEA RDX,[0x21c572]
LEA RDI,[RSP + 0x1a0]
MOV qword ptr [RSP + 0x18],RDI
MOV ESI,0x3
MOV ECX,0x1f8
CALL 0x001c17d0
MOV RDI,qword ptr [RSP + 0x18]
LAB_001b9a02:
CALL 0x00120a90
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001b9a0e
LAB_001b9a0e:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x21c61a]
CALL 0x001166e0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001b9a26
LAB_001b9a26:
LEA RDI,[RSP + 0x180]
CALL 0x001b94e0
JMP 0x001b9a35
LAB_001b9a35:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x180]
CALL 0x00116620
LAB_001b9a47:
JMP 0x001b9a49
LAB_001b9a49:
LEA RDI,[RSP + 0x180]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x1a0]
CALL 0x001c1940
JMP 0x001b9aae
LAB_001b9aae:
JMP 0x001b9ab0
LAB_001b9ab0:
JMP 0x001b9ab2
LAB_001b9ab2:
JMP 0x001b9ab4
LAB_001b9ab4:
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x001eaf80
MOV EDI,EAX
CALL 0x001eafb0
MOV dword ptr [RSP + 0x17c],EAX
XOR EAX,EAX
CMP dword ptr [RSP + 0x17c],-0x1
MOV byte ptr [RSP + 0xf],AL
JNZ 0x001b9aeb
CALL 0x00116050
CMP dword ptr [RAX],0x4
SETZ AL
MOV byte ptr [RSP + 0xf],AL
LAB_001b9aeb:
MOV AL,byte ptr [RSP + 0xf]
TEST AL,0x1
JNZ 0x001b9ab4
CMP dword ptr [RSP + 0x17c],-0x1
JNZ 0x001b9d4d
LEA RDI,[RSP + 0x97]
MOV qword ptr [RSP],RDI
CALL 0x00116d00
MOV RDX,qword ptr [RSP]
LAB_001b9b16:
LEA RSI,[0x21c646]
LEA RDI,[RSP + 0x98]
CALL 0x0011dbb0
JMP 0x001b9b2c
LAB_001b9b2c:
LEA RDX,[0x21c572]
LEA RDI,[RSP + 0xb8]
LEA RSI,[RSP + 0x98]
CALL 0x00142350
JMP 0x001b9b4a
LAB_001b9b4a:
LEA RDX,[0x21c65a]
LEA RDI,[RSP + 0xd8]
LEA RSI,[RSP + 0xb8]
CALL 0x00142350
JMP 0x001b9b68
LAB_001b9b68:
MOV dword ptr [RSP + 0x6c],0x1fb
LAB_001b9b70:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x6c]
CALL 0x001eafc0
JMP 0x001b9b81
LAB_001b9b81:
LEA RDI,[RSP + 0xf8]
LEA RSI,[RSP + 0xd8]
LEA RDX,[RSP + 0x70]
CALL 0x001945a0
JMP 0x001b9b9d
LAB_001b9b9d:
LEA RDX,[0x21dc54]
LEA RDI,[RSP + 0x118]
LEA RSI,[RSP + 0xf8]
CALL 0x00142350
JMP 0x001b9bbb
LAB_001b9bbb:
LEA RDX,[0x21c662]
LEA RDI,[RSP + 0x138]
LEA RSI,[RSP + 0x118]
CALL 0x00142350
JMP 0x001b9bd9
LAB_001b9bd9:
LEA RDX,[0x21c86a]
LEA RDI,[RSP + 0x158]
LEA RSI,[RSP + 0x138]
CALL 0x00142350
JMP 0x001b9bf7
LAB_001b9bf7:
LEA RDI,[RSP + 0x158]
CALL 0x001b9640
LAB_001b9c04:
JMP 0x001b9c06
LAB_001b9c06:
MOV RCX,RAX
MOV EAX,EDX
MOV qword ptr [RSP + 0x1a8],RCX
MOV dword ptr [RSP + 0x1a4],EAX
JMP 0x001b9d3e
LAB_001b9d3e:
LEA RDI,[RSP + 0x97]
CALL 0x00116790
JMP 0x001b9d73
LAB_001b9d4d:
JMP 0x001b9d4f
LAB_001b9d4f:
CALL 0x001eb050
TEST AL,0x1
JNZ 0x001b9ab2
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,0xffffffff
CALL 0x001eb060
ADD RSP,0x1c8
RET
LAB_001b9d73:
MOV RDI,qword ptr [RSP + 0x1a8]
CALL 0x00116cf0
|
/* testing::internal::DeathTestImpl::ReadAndInterpretStatusByte() */
void __thiscall testing::internal::DeathTestImpl::ReadAndInterpretStatusByte(DeathTestImpl *this)
{
int iVar1;
int *piVar2;
ostream *poVar3;
ulong uVar4;
bool bVar5;
int1 auVar6 [12];
int local_15c;
internal local_158 [39];
allocator local_131;
string local_130 [32];
string local_110 [32];
string local_f0 [32];
string local_d0 [32];
string local_b0 [32];
string local_90 [32];
string local_70 [36];
int local_4c;
internal local_48 [32];
GTestLog local_28 [4];
int4 local_24;
int8 local_20;
GTestLog local_14 [4];
int local_10;
char local_9;
DeathTestImpl *local_8;
local_8 = this;
do {
iVar1 = read_fd(this);
local_10 = posix::Read(iVar1,&local_9,1);
bVar5 = false;
if (local_10 == -1) {
piVar2 = __errno_location();
bVar5 = *piVar2 == 4;
}
} while (bVar5);
if (local_10 == 0) {
set_outcome(this,1);
}
else if (local_10 == 1) {
switch(local_9) {
case 'I':
iVar1 = read_fd(this);
FailFromInternalError(iVar1);
break;
default:
GTestLog::GTestLog(local_14,3,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc"
,499);
/* try { // try from 001b993a to 001b999f has its CatchHandler @ 001b99b4 */
poVar3 = (ostream *)GTestLog::GetStream();
poVar3 = std::operator<<(poVar3,"Death test child process reported ");
poVar3 = std::operator<<(poVar3,"unexpected status byte (");
poVar3 = (ostream *)std::ostream::operator<<(poVar3,(int)local_9);
std::operator<<(poVar3,")");
GTestLog::~GTestLog(local_14);
break;
case 'L':
set_outcome(this,2);
break;
case 'R':
set_outcome(this,3);
break;
case 'T':
set_outcome(this,4);
}
}
else {
GTestLog::GTestLog(local_28,3,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc"
,0x1f8);
/* try { // try from 001b9a02 to 001b9a32 has its CatchHandler @ 001b9a65 */
poVar3 = (ostream *)GTestLog::GetStream();
poVar3 = std::operator<<(poVar3,"Read from death test child process failed: ");
GetLastErrnoDescription_abi_cxx11_(local_48);
/* try { // try from 001b9a35 to 001b9a46 has its CatchHandler @ 001b9a7b */
std::operator<<(poVar3,(string *)local_48);
std::__cxx11::string::~string((string *)local_48);
GTestLog::~GTestLog(local_28);
}
while( true ) {
do {
iVar1 = read_fd(this);
local_4c = posix::Close(iVar1);
bVar5 = false;
if (local_4c == -1) {
piVar2 = __errno_location();
bVar5 = *piVar2 == 4;
}
} while (bVar5);
if (local_4c == -1) break;
uVar4 = AlwaysFalse();
if ((uVar4 & 1) == 0) {
set_read_fd(this,-1);
return;
}
}
std::allocator<char>::allocator();
/* try { // try from 001b9b16 to 001b9b29 has its CatchHandler @ 001b9c06 */
std::__cxx11::string::string<std::allocator<char>>(local_130,"CHECK failed: File ",&local_131);
/* try { // try from 001b9b2c to 001b9b47 has its CatchHandler @ 001b9c1f */
std::operator+(local_110,(char *)local_130);
/* try { // try from 001b9b4a to 001b9b65 has its CatchHandler @ 001b9c38 */
std::operator+(local_f0,(char *)local_110);
local_15c = 0x1fb;
/* try { // try from 001b9b70 to 001b9b7e has its CatchHandler @ 001b9c51 */
StreamableToString<int>(local_158,&local_15c);
/* try { // try from 001b9b81 to 001b9b9a has its CatchHandler @ 001b9c6a */
std::operator+(local_d0,local_f0);
/* try { // try from 001b9b9d to 001b9bb8 has its CatchHandler @ 001b9c83 */
std::operator+(local_b0,(char *)local_d0);
/* try { // try from 001b9bbb to 001b9bd6 has its CatchHandler @ 001b9c99 */
std::operator+(local_90,(char *)local_b0);
/* try { // try from 001b9bd9 to 001b9bf4 has its CatchHandler @ 001b9caf */
std::operator+(local_70,(char *)local_90);
/* try { // try from 001b9bf7 to 001b9c03 has its CatchHandler @ 001b9cc5 */
auVar6 = DeathTestAbort(local_70);
local_24 = auVar6._8_4_;
local_20 = auVar6._0_8_;
/* catch() { ... } // from try @ 001b9b16 with catch @ 001b9c06 */
std::allocator<char>::~allocator((allocator<char> *)&local_131);
/* WARNING: Subroutine does not return */
_Unwind_Resume(local_20);
}
|
|
5,739 | reset_pagecache_counters | eloqsql/storage/maria/ma_pagecache.c | int reset_pagecache_counters(const char *name __attribute__((unused)),
PAGECACHE *pagecache)
{
DBUG_ENTER("reset_pagecache_counters");
if (!pagecache->inited)
{
DBUG_PRINT("info", ("Key cache %s not initialized.", name));
DBUG_RETURN(0);
}
DBUG_PRINT("info", ("Resetting counters for key cache %s.", name));
pagecache->global_blocks_changed= 0; /* Key_blocks_not_flushed */
pagecache->global_cache_r_requests= 0; /* Key_read_requests */
pagecache->global_cache_read= 0; /* Key_reads */
pagecache->global_cache_w_requests= 0; /* Key_write_requests */
pagecache->global_cache_write= 0; /* Key_writes */
DBUG_RETURN(0);
} | O3 | c | reset_pagecache_counters:
pushq %rbp
movq %rsp, %rbp
cmpb $0x0, 0x1a8(%rsi)
je 0x34779
xorps %xmm0, %xmm0
movups %xmm0, 0x178(%rsi)
movups %xmm0, 0x168(%rsi)
movq $0x0, 0x188(%rsi)
xorl %eax, %eax
popq %rbp
retq
| reset_pagecache_counters:
push rbp
mov rbp, rsp
cmp byte ptr [rsi+1A8h], 0
jz short loc_34779
xorps xmm0, xmm0
movups xmmword ptr [rsi+178h], xmm0
movups xmmword ptr [rsi+168h], xmm0
mov qword ptr [rsi+188h], 0
loc_34779:
xor eax, eax
pop rbp
retn
| long long reset_pagecache_counters(long long a1, long long a2)
{
if ( *(_BYTE *)(a2 + 424) )
{
*(_OWORD *)(a2 + 376) = 0LL;
*(_OWORD *)(a2 + 360) = 0LL;
*(_QWORD *)(a2 + 392) = 0LL;
}
return 0LL;
}
| reset_pagecache_counters:
PUSH RBP
MOV RBP,RSP
CMP byte ptr [RSI + 0x1a8],0x0
JZ 0x00134779
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x178],XMM0
MOVUPS xmmword ptr [RSI + 0x168],XMM0
MOV qword ptr [RSI + 0x188],0x0
LAB_00134779:
XOR EAX,EAX
POP RBP
RET
|
int8 reset_pagecache_counters(int8 param_1,long param_2)
{
if (*(char *)(param_2 + 0x1a8) != '\0') {
*(int8 *)(param_2 + 0x178) = 0;
*(int8 *)(param_2 + 0x180) = 0;
*(int8 *)(param_2 + 0x168) = 0;
*(int8 *)(param_2 + 0x170) = 0;
*(int8 *)(param_2 + 0x188) = 0;
}
return 0;
}
|
|
5,740 | my_strerror | eloqsql/strings/my_vsnprintf.c | const char* my_strerror(char *buf, size_t len, int nr)
{
char *msg= NULL;
buf[0]= '\0'; /* failsafe */
if (nr <= 0)
{
strmake(buf, (nr == 0 ?
"Internal error/check (Not system error)" :
"Internal error < 0 (Not system error)"),
len-1);
return buf;
}
/*
These (handler-) error messages are shared by perror, as required
by the principle of least surprise.
*/
if ((nr >= HA_ERR_FIRST) && (nr <= HA_ERR_LAST))
{
msg= (char *) handler_error_messages[nr - HA_ERR_FIRST];
strmake(buf, msg, len - 1);
}
else
{
/*
On Windows, do things the Windows way. On a system that supports both
the GNU and the XSI variant, use whichever was configured (GNU); if
this choice is not advertised, use the default (POSIX/XSI). Testing
for __GNUC__ is not sufficient to determine whether this choice exists.
*/
#if defined(_WIN32)
strerror_s(buf, len, nr);
#elif ((defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE >= 200112L)) || \
(defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \
! defined _GNU_SOURCE
strerror_r(nr, buf, len); /* I can build with or without GNU */
#elif defined(__GLIBC__) && defined (_GNU_SOURCE)
char *r= strerror_r(nr, buf, len);
if (r != buf) /* Want to help, GNU? */
strmake(buf, r, len - 1); /* Then don't. */
#else
strerror_r(nr, buf, len);
#endif
}
/*
strerror() return values are implementation-dependent, so let's
be pragmatic.
*/
if (!buf[0])
strmake(buf, "unknown error", len - 1);
return buf;
} | O0 | c | my_strerror:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
cmpl $0x0, -0x1c(%rbp)
jg 0x77ffe
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %ecx
leaq 0x6dbd(%rip), %rsi # 0x7ed93
leaq 0x6d8e(%rip), %rax # 0x7ed6b
cmpl $0x0, %ecx
cmoveq %rax, %rsi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
callq 0x78c20
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7809a
cmpl $0x78, -0x1c(%rbp)
jl 0x7803c
cmpl $0xc6, -0x1c(%rbp)
jg 0x7803c
movl -0x1c(%rbp), %eax
subl $0x78, %eax
movslq %eax, %rcx
leaq 0x30f5a3(%rip), %rax # 0x3875c0
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
callq 0x78c20
jmp 0x78071
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x240c0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x7806f
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
callq 0x78c20
jmp 0x78071
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x78092
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
leaq 0x6d2c(%rip), %rsi # 0x7edb9
callq 0x78c20
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strerror:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], 0
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
cmp [rbp+var_1C], 0
jg short loc_77FFE
mov rdi, [rbp+var_10]
mov ecx, [rbp+var_1C]
lea rsi, aInternalError0; "Internal error < 0 (Not system error)"
lea rax, aInternalErrorC; "Internal error/check (Not system error)"
cmp ecx, 0
cmovz rsi, rax
mov rdx, [rbp+var_18]
sub rdx, 1
call strmake
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
jmp loc_7809A
loc_77FFE:
cmp [rbp+var_1C], 78h ; 'x'
jl short loc_7803C
cmp [rbp+var_1C], 0C6h
jg short loc_7803C
mov eax, [rbp+var_1C]
sub eax, 78h ; 'x'
movsxd rcx, eax
lea rax, handler_error_messages
mov rax, [rax+rcx*8]
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_18]
sub rdx, 1
call strmake
jmp short loc_78071
loc_7803C:
mov edi, [rbp+var_1C]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _strerror_r
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_10]
jz short loc_7806F
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_18]
sub rdx, 1
call strmake
loc_7806F:
jmp short $+2
loc_78071:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jnz short loc_78092
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
sub rdx, 1
lea rsi, aUnknownError; "unknown error"
call strmake
loc_78092:
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_7809A:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| _BYTE * my_strerror(_BYTE *a1, long long a2, int a3)
{
const char *v3; // rsi
long long v5; // [rsp+0h] [rbp-30h]
*a1 = 0;
if ( a3 > 0 )
{
if ( a3 < 120 || a3 > 198 )
{
v5 = strerror_r((unsigned int)a3, a1, a2);
if ( (_BYTE *)v5 != a1 )
strmake(a1, v5, a2 - 1);
}
else
{
strmake(a1, handler_error_messages[a3 - 120], a2 - 1);
}
if ( !*a1 )
strmake(a1, "unknown error", a2 - 1);
return a1;
}
else
{
v3 = "Internal error < 0 (Not system error)";
if ( !a3 )
v3 = "Internal error/check (Not system error)";
strmake(a1, v3, a2 - 1);
return a1;
}
}
| my_strerror:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
CMP dword ptr [RBP + -0x1c],0x0
JG 0x00177ffe
MOV RDI,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
LEA RSI,[0x17ed93]
LEA RAX,[0x17ed6b]
CMP ECX,0x0
CMOVZ RSI,RAX
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
CALL 0x00178c20
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0017809a
LAB_00177ffe:
CMP dword ptr [RBP + -0x1c],0x78
JL 0x0017803c
CMP dword ptr [RBP + -0x1c],0xc6
JG 0x0017803c
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x78
MOVSXD RCX,EAX
LEA RAX,[0x4875c0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
CALL 0x00178c20
JMP 0x00178071
LAB_0017803c:
MOV EDI,dword ptr [RBP + -0x1c]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001240c0
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x10]
JZ 0x0017806f
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
CALL 0x00178c20
LAB_0017806f:
JMP 0x00178071
LAB_00178071:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JNZ 0x00178092
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
LEA RSI,[0x17edb9]
CALL 0x00178c20
LAB_00178092:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_0017809a:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
char * my_strerror(char *param_1,size_t param_2,int param_3)
{
char *pcVar1;
*param_1 = '\0';
if (param_3 < 1) {
pcVar1 = "Internal error < 0 (Not system error)";
if (param_3 == 0) {
pcVar1 = "Internal error/check (Not system error)";
}
strmake(param_1,pcVar1,param_2 - 1);
}
else {
if ((param_3 < 0x78) || (0xc6 < param_3)) {
pcVar1 = strerror_r(param_3,param_1,param_2);
if (pcVar1 != param_1) {
strmake(param_1,pcVar1,param_2 - 1);
}
}
else {
strmake(param_1,*(int8 *)(handler_error_messages + (long)(param_3 + -0x78) * 8),
param_2 - 1);
}
if (*param_1 == '\0') {
strmake(param_1,"unknown error",param_2 - 1);
}
}
return param_1;
}
|
|
5,741 | my_cset_init_8bit | eloqsql/strings/ctype-simple.c | static my_bool
my_cset_init_8bit(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
cs->state|= my_8bit_charset_flags_from_data(cs);
cs->caseup_multiply= 1;
cs->casedn_multiply= 1;
cs->pad_char= ' ';
if (!cs->to_lower || !cs->to_upper || !cs->m_ctype || !cs->tab_to_uni)
return TRUE;
return create_fromuni(cs, loader);
} | O3 | c | my_cset_init_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1808, %rsp # imm = 0x1808
movq %rsi, -0x30(%rbp)
movq %rdi, %rbx
movq 0x68(%rdi), %r15
xorl %eax, %eax
testq %r15, %r15
je 0x38f25
xorl %ecx, %ecx
cmpw $0x80, (%r15,%rcx,2)
jae 0x38f06
incq %rcx
cmpq $0x100, %rcx # imm = 0x100
jne 0x38eec
movl $0x1000, %eax # imm = 0x1000
xorl %ecx, %ecx
movzwl (%r15,%rcx,2), %edx
cmpq %rdx, %rcx
jne 0x38f20
incq %rcx
cmpq $0x80, %rcx
jne 0x38f08
jmp 0x38f25
orl $0x2000, %eax # imm = 0x2000
orl %eax, 0xc(%rbx)
movw $0x101, 0x94(%rbx) # imm = 0x101
movb $0x20, 0xb0(%rbx)
movb $0x1, %al
cmpq $0x0, 0x48(%rbx)
je 0x39115
cmpq $0x0, 0x50(%rbx)
je 0x39115
testq %r15, %r15
je 0x39115
cmpq $0x0, 0x40(%rbx)
je 0x39115
leaq -0x1830(%rbp), %rdi
xorl %r12d, %r12d
movl $0x1800, %edx # imm = 0x1800
xorl %esi, %esi
callq 0x24160
movzwl (%r15,%r12,2), %eax
testq %rax, %rax
sete %cl
testq %r12, %r12
setne %dl
testb %cl, %dl
jne 0x38fd2
movl %eax, %ecx
shrl $0x8, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq -0x1830(,%rcx,8), %rcx
addq %rbp, %rcx
movl (%rcx), %edx
testl %edx, %edx
je 0x38fc6
movl 0x8(%rcx), %esi
movl %eax, %edi
cmpw %si, %ax
jb 0x38fb5
movl %esi, %edi
movw %di, 0x8(%rcx)
movzwl 0xa(%rcx), %esi
cmpw %si, %ax
ja 0x38fca
movl %esi, %eax
jmp 0x38fca
movw %ax, 0x8(%rcx)
movw %ax, 0xa(%rcx)
incl %edx
movl %edx, (%rcx)
incq %r12
cmpq $0x100, %r12 # imm = 0x100
jne 0x38f7a
leaq 0x1b0(%rip), %rcx # 0x39195
leaq -0x1830(%rbp), %rdi
movl $0x100, %esi # imm = 0x100
movl $0x18, %edx
callq 0x24620
xorl %r13d, %r13d
leaq (,%r13,2), %rax
addq %r13, %rax
cmpl $0x0, -0x1830(%rbp,%rax,8)
je 0x390ac
leaq -0x1830(,%rax,8), %r14
addq %rbp, %r14
movzwl 0xa(%r14), %r12d
movzwl 0x8(%r14), %eax
subq %rax, %r12
incq %r12
movq %r12, %rdi
movq -0x30(%rbp), %rax
callq *0x80(%rax)
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x39100
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x24160
movl $0x1, %eax
movq 0x68(%rbx), %rcx
movzwl (%rcx,%rax,2), %ecx
movzwl 0x8(%r14), %edx
cmpw %dx, %cx
jb 0x3908b
leal -0x1(%rcx), %esi
cmpw 0xa(%r14), %si
jae 0x3908b
subq %rdx, %rcx
cmpb $0x0, (%r15,%rcx)
jg 0x3908b
movb %al, (%r15,%rcx)
incq %rax
cmpq $0x100, %rax # imm = 0x100
jne 0x39061
incq %r13
cmpq $0x100, %r13 # imm = 0x100
jne 0x38ffe
movl $0x100, %r13d # imm = 0x100
movl %r13d, %r14d
movq %r14, %rdi
shlq $0x4, %rdi
addq $0x10, %rdi
movq -0x30(%rbp), %rax
callq *0x80(%rax)
movq %rax, 0x70(%rbx)
testq %rax, %rax
je 0x39100
testl %r13d, %r13d
je 0x39104
movq %r14, %rax
shlq $0x4, %rax
leaq -0x1828(%rbp), %rcx
xorl %edx, %edx
movq 0x70(%rbx), %rsi
movups (%rcx), %xmm0
movups %xmm0, (%rsi,%rdx)
addq $0x10, %rdx
addq $0x18, %rcx
cmpq %rdx, %rax
jne 0x390e2
movq 0x70(%rbx), %rax
jmp 0x39107
movb $0x1, %al
jmp 0x39115
xorl %r14d, %r14d
shlq $0x4, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rax,%r14)
xorl %eax, %eax
addq $0x1808, %rsp # imm = 0x1808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_cset_init_8bit:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1808h
mov [rbp+var_30], rsi
mov rbx, rdi
mov r15, [rdi+68h]
xor eax, eax
test r15, r15
jz short loc_38F25
xor ecx, ecx
loc_38EEC:
cmp word ptr [r15+rcx*2], 80h
jnb short loc_38F06
inc rcx
cmp rcx, 100h
jnz short loc_38EEC
mov eax, 1000h
loc_38F06:
xor ecx, ecx
loc_38F08:
movzx edx, word ptr [r15+rcx*2]
cmp rcx, rdx
jnz short loc_38F20
inc rcx
cmp rcx, 80h
jnz short loc_38F08
jmp short loc_38F25
loc_38F20:
or eax, 2000h
loc_38F25:
or [rbx+0Ch], eax
mov word ptr [rbx+94h], 101h
mov byte ptr [rbx+0B0h], 20h ; ' '
mov al, 1
cmp qword ptr [rbx+48h], 0
jz loc_39115
cmp qword ptr [rbx+50h], 0
jz loc_39115
test r15, r15
jz loc_39115
cmp qword ptr [rbx+40h], 0
jz loc_39115
lea rdi, [rbp+var_1830]
xor r12d, r12d
mov edx, 1800h
xor esi, esi
call _memset
loc_38F7A:
movzx eax, word ptr [r15+r12*2]
test rax, rax
setz cl
test r12, r12
setnz dl
test dl, cl
jnz short loc_38FD2
mov ecx, eax
shr ecx, 8
lea rcx, [rcx+rcx*2]
lea rcx, ds:0FFFFFFFFFFFFE7D0h[rcx*8]
add rcx, rbp
mov edx, [rcx]
test edx, edx
jz short loc_38FC6
mov esi, [rcx+8]
mov edi, eax
cmp ax, si
jb short loc_38FB5
mov edi, esi
loc_38FB5:
mov [rcx+8], di
movzx esi, word ptr [rcx+0Ah]
cmp ax, si
ja short loc_38FCA
mov eax, esi
jmp short loc_38FCA
loc_38FC6:
mov [rcx+8], ax
loc_38FCA:
mov [rcx+0Ah], ax
inc edx
mov [rcx], edx
loc_38FD2:
inc r12
cmp r12, 100h
jnz short loc_38F7A
lea rcx, pcmp
lea rdi, [rbp+var_1830]
mov esi, 100h
mov edx, 18h
call _qsort
xor r13d, r13d
loc_38FFE:
lea rax, ds:0[r13*2]
add rax, r13
cmp [rbp+rax*8+var_1830], 0
jz loc_390AC
lea r14, ds:0FFFFFFFFFFFFE7D0h[rax*8]
add r14, rbp
movzx r12d, word ptr [r14+0Ah]
movzx eax, word ptr [r14+8]
sub r12, rax
inc r12
mov rdi, r12
mov rax, [rbp+var_30]
call qword ptr [rax+80h]
mov [r14+10h], rax
test rax, rax
jz loc_39100
mov r15, rax
mov rdi, rax
xor esi, esi
mov rdx, r12
call _memset
mov eax, 1
loc_39061:
mov rcx, [rbx+68h]
movzx ecx, word ptr [rcx+rax*2]
movzx edx, word ptr [r14+8]
cmp cx, dx
jb short loc_3908B
lea esi, [rcx-1]
cmp si, [r14+0Ah]
jnb short loc_3908B
sub rcx, rdx
cmp byte ptr [r15+rcx], 0
jg short loc_3908B
mov [r15+rcx], al
loc_3908B:
inc rax
cmp rax, 100h
jnz short loc_39061
inc r13
cmp r13, 100h
jnz loc_38FFE
mov r13d, 100h
loc_390AC:
mov r14d, r13d
mov rdi, r14
shl rdi, 4
add rdi, 10h
mov rax, [rbp+var_30]
call qword ptr [rax+80h]
mov [rbx+70h], rax
test rax, rax
jz short loc_39100
test r13d, r13d
jz short loc_39104
mov rax, r14
shl rax, 4
lea rcx, [rbp+var_1828]
xor edx, edx
loc_390E2:
mov rsi, [rbx+70h]
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rsi+rdx], xmm0
add rdx, 10h
add rcx, 18h
cmp rax, rdx
jnz short loc_390E2
mov rax, [rbx+70h]
jmp short loc_39107
loc_39100:
mov al, 1
jmp short loc_39115
loc_39104:
xor r14d, r14d
loc_39107:
shl r14, 4
xorps xmm0, xmm0
movups xmmword ptr [rax+r14], xmm0
xor eax, eax
loc_39115:
add rsp, 1808h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char my_cset_init_8bit(long long a1, long long a2)
{
long long v3; // r15
int v4; // eax
long long v5; // rcx
long long v6; // rcx
char result; // al
long long v8; // r12
long long v9; // rax
long long *v10; // rcx
int v11; // edx
__int16 v12; // di
long long v13; // r13
long long *v14; // r14
unsigned long long v15; // r12
long long v16; // rax
long long v17; // r15
long long i; // rax
long long v19; // rcx
long long v20; // rdx
long long v21; // rcx
long long v22; // r14
long long v23; // rax
char *v24; // rcx
long long v25; // rdx
_DWORD v26[2]; // [rsp+0h] [rbp-1830h] BYREF
char v27; // [rsp+8h] [rbp-1828h] BYREF
long long v28; // [rsp+1800h] [rbp-30h]
long long savedregs; // [rsp+1830h] [rbp+0h] BYREF
_UNKNOWN *retaddr; // [rsp+1838h] [rbp+8h]
v28 = a2;
v3 = *(_QWORD *)(a1 + 104);
v4 = 0;
if ( v3 )
{
v5 = 0LL;
while ( *(_WORD *)(v3 + 2 * v5) < 0x80u )
{
if ( ++v5 == 256 )
{
v4 = 4096;
break;
}
}
v6 = 0LL;
while ( v6 == *(unsigned __int16 *)(v3 + 2 * v6) )
{
if ( ++v6 == 128 )
goto LABEL_11;
}
v4 |= 0x2000u;
}
LABEL_11:
*(_DWORD *)(a1 + 12) |= v4;
*(_WORD *)(a1 + 148) = 257;
*(_BYTE *)(a1 + 176) = 32;
result = 1;
if ( *(_QWORD *)(a1 + 72) && *(_QWORD *)(a1 + 80) && v3 && *(_QWORD *)(a1 + 64) )
{
v8 = 0LL;
memset(v26, 0LL, 6144LL);
do
{
v9 = *(unsigned __int16 *)(v3 + 2 * v8);
if ( v9 != 0 || v8 == 0 )
{
v10 = &savedregs + 3 * ((unsigned int)v9 >> 8) - 774;
v11 = *(_DWORD *)v10;
if ( *(_DWORD *)v10 )
{
v12 = *(_WORD *)(v3 + 2 * v8);
if ( (unsigned __int16)v9 >= (unsigned __int16)*((_DWORD *)v10 + 2) )
v12 = *((_DWORD *)v10 + 2);
*((_WORD *)v10 + 4) = v12;
if ( (unsigned __int16)v9 <= *((_WORD *)v10 + 5) )
LOWORD(v9) = *((_WORD *)v10 + 5);
}
else
{
*((_WORD *)v10 + 4) = v9;
}
*((_WORD *)v10 + 5) = v9;
*(_DWORD *)v10 = v11 + 1;
}
++v8;
}
while ( v8 != 256 );
qsort(v26, 256LL, 24LL, pcmp);
v13 = 0LL;
while ( v26[6 * v13] )
{
v14 = &savedregs + 3 * v13 - 774;
v15 = *((unsigned __int16 *)&retaddr + 12 * v13 - 3095)
- (unsigned long long)*((unsigned __int16 *)&retaddr + 12 * v13 - 3096)
+ 1;
v16 = (*(long long ( **)(unsigned long long))(v28 + 128))(v15);
v14[2] = v16;
if ( !v16 )
return 1;
v17 = v16;
memset(v16, 0LL, v15);
for ( i = 1LL; i != 256; ++i )
{
v19 = *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 2 * i);
v20 = *((unsigned __int16 *)v14 + 4);
if ( (unsigned __int16)v19 >= (unsigned __int16)v20 && (unsigned __int16)(v19 - 1) < *((_WORD *)v14 + 5) )
{
v21 = v19 - v20;
if ( *(char *)(v17 + v21) <= 0 )
*(_BYTE *)(v17 + v21) = i;
}
}
if ( ++v13 == 256 )
{
LODWORD(v13) = 256;
break;
}
}
v22 = (unsigned int)v13;
v23 = (*(long long ( **)(long long))(v28 + 128))(16LL * (unsigned int)v13 + 16);
*(_QWORD *)(a1 + 112) = v23;
if ( !v23 )
return 1;
if ( (_DWORD)v13 )
{
v24 = &v27;
v25 = 0LL;
do
{
*(_OWORD *)(*(_QWORD *)(a1 + 112) + v25) = *(_OWORD *)v24;
v25 += 16LL;
v24 += 24;
}
while ( 16LL * (unsigned int)v13 != v25 );
v23 = *(_QWORD *)(a1 + 112);
}
else
{
v22 = 0LL;
}
*(_OWORD *)(v23 + 16 * v22) = 0LL;
return 0;
}
return result;
}
| my_cset_init_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1808
MOV qword ptr [RBP + -0x30],RSI
MOV RBX,RDI
MOV R15,qword ptr [RDI + 0x68]
XOR EAX,EAX
TEST R15,R15
JZ 0x00138f25
XOR ECX,ECX
LAB_00138eec:
CMP word ptr [R15 + RCX*0x2],0x80
JNC 0x00138f06
INC RCX
CMP RCX,0x100
JNZ 0x00138eec
MOV EAX,0x1000
LAB_00138f06:
XOR ECX,ECX
LAB_00138f08:
MOVZX EDX,word ptr [R15 + RCX*0x2]
CMP RCX,RDX
JNZ 0x00138f20
INC RCX
CMP RCX,0x80
JNZ 0x00138f08
JMP 0x00138f25
LAB_00138f20:
OR EAX,0x2000
LAB_00138f25:
OR dword ptr [RBX + 0xc],EAX
MOV word ptr [RBX + 0x94],0x101
MOV byte ptr [RBX + 0xb0],0x20
MOV AL,0x1
CMP qword ptr [RBX + 0x48],0x0
JZ 0x00139115
CMP qword ptr [RBX + 0x50],0x0
JZ 0x00139115
TEST R15,R15
JZ 0x00139115
CMP qword ptr [RBX + 0x40],0x0
JZ 0x00139115
LEA RDI,[RBP + -0x1830]
XOR R12D,R12D
MOV EDX,0x1800
XOR ESI,ESI
CALL 0x00124160
LAB_00138f7a:
MOVZX EAX,word ptr [R15 + R12*0x2]
TEST RAX,RAX
SETZ CL
TEST R12,R12
SETNZ DL
TEST DL,CL
JNZ 0x00138fd2
MOV ECX,EAX
SHR ECX,0x8
LEA RCX,[RCX + RCX*0x2]
LEA RCX,[-0x1830 + RCX*0x8]
ADD RCX,RBP
MOV EDX,dword ptr [RCX]
TEST EDX,EDX
JZ 0x00138fc6
MOV ESI,dword ptr [RCX + 0x8]
MOV EDI,EAX
CMP AX,SI
JC 0x00138fb5
MOV EDI,ESI
LAB_00138fb5:
MOV word ptr [RCX + 0x8],DI
MOVZX ESI,word ptr [RCX + 0xa]
CMP AX,SI
JA 0x00138fca
MOV EAX,ESI
JMP 0x00138fca
LAB_00138fc6:
MOV word ptr [RCX + 0x8],AX
LAB_00138fca:
MOV word ptr [RCX + 0xa],AX
INC EDX
MOV dword ptr [RCX],EDX
LAB_00138fd2:
INC R12
CMP R12,0x100
JNZ 0x00138f7a
LEA RCX,[0x139195]
LEA RDI,[RBP + -0x1830]
MOV ESI,0x100
MOV EDX,0x18
CALL 0x00124620
XOR R13D,R13D
LAB_00138ffe:
LEA RAX,[R13*0x2]
ADD RAX,R13
CMP dword ptr [RBP + RAX*0x8 + -0x1830],0x0
JZ 0x001390ac
LEA R14,[-0x1830 + RAX*0x8]
ADD R14,RBP
MOVZX R12D,word ptr [R14 + 0xa]
MOVZX EAX,word ptr [R14 + 0x8]
SUB R12,RAX
INC R12
MOV RDI,R12
MOV RAX,qword ptr [RBP + -0x30]
CALL qword ptr [RAX + 0x80]
MOV qword ptr [R14 + 0x10],RAX
TEST RAX,RAX
JZ 0x00139100
MOV R15,RAX
MOV RDI,RAX
XOR ESI,ESI
MOV RDX,R12
CALL 0x00124160
MOV EAX,0x1
LAB_00139061:
MOV RCX,qword ptr [RBX + 0x68]
MOVZX ECX,word ptr [RCX + RAX*0x2]
MOVZX EDX,word ptr [R14 + 0x8]
CMP CX,DX
JC 0x0013908b
LEA ESI,[RCX + -0x1]
CMP SI,word ptr [R14 + 0xa]
JNC 0x0013908b
SUB RCX,RDX
CMP byte ptr [R15 + RCX*0x1],0x0
JG 0x0013908b
MOV byte ptr [R15 + RCX*0x1],AL
LAB_0013908b:
INC RAX
CMP RAX,0x100
JNZ 0x00139061
INC R13
CMP R13,0x100
JNZ 0x00138ffe
MOV R13D,0x100
LAB_001390ac:
MOV R14D,R13D
MOV RDI,R14
SHL RDI,0x4
ADD RDI,0x10
MOV RAX,qword ptr [RBP + -0x30]
CALL qword ptr [RAX + 0x80]
MOV qword ptr [RBX + 0x70],RAX
TEST RAX,RAX
JZ 0x00139100
TEST R13D,R13D
JZ 0x00139104
MOV RAX,R14
SHL RAX,0x4
LEA RCX,[RBP + -0x1828]
XOR EDX,EDX
LAB_001390e2:
MOV RSI,qword ptr [RBX + 0x70]
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RSI + RDX*0x1],XMM0
ADD RDX,0x10
ADD RCX,0x18
CMP RAX,RDX
JNZ 0x001390e2
MOV RAX,qword ptr [RBX + 0x70]
JMP 0x00139107
LAB_00139100:
MOV AL,0x1
JMP 0x00139115
LAB_00139104:
XOR R14D,R14D
LAB_00139107:
SHL R14,0x4
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + R14*0x1],XMM0
XOR EAX,EAX
LAB_00139115:
ADD RSP,0x1808
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 my_cset_init_8bit(long param_1,long param_2)
{
int8 *puVar1;
int iVar2;
ushort uVar3;
uint uVar4;
int8 uVar5;
void *__s;
long lVar6;
long lVar7;
ulong uVar8;
ushort *puVar9;
ushort uVar10;
size_t __n;
ulong uVar11;
int local_1838 [2];
ushort local_1830 [4];
int8 auStack_1828 [766];
long local_38;
lVar6 = *(long *)(param_1 + 0x68);
uVar4 = 0;
if (lVar6 != 0) {
lVar7 = 0;
do {
if (0x7f < *(ushort *)(lVar6 + lVar7 * 2)) goto LAB_00138f06;
lVar7 = lVar7 + 1;
} while (lVar7 != 0x100);
uVar4 = 0x1000;
LAB_00138f06:
uVar8 = 0;
do {
if (uVar8 != *(ushort *)(lVar6 + uVar8 * 2)) {
uVar4 = uVar4 | 0x2000;
break;
}
uVar8 = uVar8 + 1;
} while (uVar8 != 0x80);
}
*(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | uVar4;
*(int2 *)(param_1 + 0x94) = 0x101;
*(int1 *)(param_1 + 0xb0) = 0x20;
uVar5 = 1;
if ((((*(long *)(param_1 + 0x48) != 0) && (*(long *)(param_1 + 0x50) != 0)) && (lVar6 != 0)) &&
(*(long *)(param_1 + 0x40) != 0)) {
lVar7 = 0;
local_38 = param_2;
memset(local_1838,0,0x1800);
do {
uVar3 = *(ushort *)(lVar6 + lVar7 * 2);
if (lVar7 == 0 || uVar3 != 0) {
uVar8 = (ulong)(uVar3 >> 8);
iVar2 = local_1838[uVar8 * 6];
if (iVar2 == 0) {
local_1830[uVar8 * 0xc] = uVar3;
}
else {
uVar10 = uVar3;
if ((ushort)*(int4 *)(local_1830 + uVar8 * 0xc) <= uVar3) {
uVar10 = (ushort)*(int4 *)(local_1830 + uVar8 * 0xc);
}
local_1830[uVar8 * 0xc] = uVar10;
if (uVar3 <= local_1830[uVar8 * 0xc + 1]) {
uVar3 = local_1830[uVar8 * 0xc + 1];
}
}
local_1830[uVar8 * 0xc + 1] = uVar3;
local_1838[uVar8 * 6] = iVar2 + 1;
}
lVar7 = lVar7 + 1;
} while (lVar7 != 0x100);
qsort(local_1838,0x100,0x18,pcmp);
uVar8 = 0;
do {
if (local_1838[uVar8 * 6] == 0) goto LAB_001390ac;
__n = ((ulong)local_1830[uVar8 * 0xc + 1] - (ulong)local_1830[uVar8 * 0xc]) + 1;
__s = (void *)(**(code **)(local_38 + 0x80))(__n);
auStack_1828[uVar8 * 3] = __s;
if (__s == (void *)0x0) goto LAB_00139100;
memset(__s,0,__n);
lVar6 = 1;
do {
uVar3 = *(ushort *)(*(long *)(param_1 + 0x68) + lVar6 * 2);
if (((local_1830[uVar8 * 0xc] <= uVar3) &&
((ushort)(uVar3 - 1) < local_1830[uVar8 * 0xc + 1])) &&
(lVar7 = (ulong)uVar3 - (ulong)local_1830[uVar8 * 0xc],
*(char *)((long)__s + lVar7) < '\x01')) {
*(char *)((long)__s + lVar7) = (char)lVar6;
}
lVar6 = lVar6 + 1;
} while (lVar6 != 0x100);
uVar8 = uVar8 + 1;
} while (uVar8 != 0x100);
uVar8 = 0x100;
LAB_001390ac:
uVar11 = uVar8 & 0xffffffff;
lVar6 = (**(code **)(local_38 + 0x80))(uVar11 * 0x10 + 0x10);
*(long *)(param_1 + 0x70) = lVar6;
if (lVar6 == 0) {
LAB_00139100:
uVar5 = 1;
}
else {
if ((int)uVar8 == 0) {
uVar11 = 0;
}
else {
puVar9 = local_1830;
lVar6 = 0;
do {
uVar5 = *(int8 *)(puVar9 + 4);
puVar1 = (int8 *)(*(long *)(param_1 + 0x70) + lVar6);
*puVar1 = *(int8 *)puVar9;
puVar1[1] = uVar5;
lVar6 = lVar6 + 0x10;
puVar9 = puVar9 + 0xc;
} while (uVar11 << 4 != lVar6);
lVar6 = *(long *)(param_1 + 0x70);
}
puVar1 = (int8 *)(lVar6 + uVar11 * 0x10);
*puVar1 = 0;
puVar1[1] = 0;
uVar5 = 0;
}
}
return uVar5;
}
|
|
5,742 | safe_lexcstrdup_root | eloqsql/mysys/my_alloc.c | LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
{
LEX_CSTRING res;
if (str.length)
res.str= strmake_root(root, str.str, str.length);
else
res.str= (const char *)"";
res.length= str.length;
return res;
} | O3 | c | safe_lexcstrdup_root:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdx, %rdx
je 0xa0ba4
movq %rbx, %rdx
callq 0xa0b09
jmp 0xa0bab
leaq 0x47537(%rip), %rax # 0xe80e2
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
| safe_lexcstrdup_root:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
test rdx, rdx
jz short loc_A0BA4
mov rdx, rbx
call strmake_root
jmp short loc_A0BAB
loc_A0BA4:
lea rax, asc_E80DE+4; ""
loc_A0BAB:
mov rdx, rbx
add rsp, 8
pop rbx
pop rbp
retn
| char * safe_lexcstrdup_root(long long a1, long long a2, long long a3)
{
if ( a3 )
return strmake_root(a1, a2, a3);
else
return "";
}
| safe_lexcstrdup_root:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
TEST RDX,RDX
JZ 0x001a0ba4
MOV RDX,RBX
CALL 0x001a0b09
JMP 0x001a0bab
LAB_001a0ba4:
LEA RAX,[0x1e80e2]
LAB_001a0bab:
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3)
{
int *puVar1;
int1 auVar2 [16];
if (param_3 == 0) {
puVar1 = &DAT_001e80e2;
}
else {
puVar1 = (int *)strmake_root(param_1,param_2,param_3);
}
auVar2._8_8_ = param_3;
auVar2._0_8_ = puVar1;
return auVar2;
}
|
|
5,743 | mp_mul_basecase_dec | bluesky950520[P]quickjs/libbf.c | void mp_mul_basecase_dec(limb_t *result,
const limb_t *op1, mp_size_t op1_size,
const limb_t *op2, mp_size_t op2_size)
{
mp_size_t i;
limb_t r;
result[op1_size] = mp_mul1_dec(result, op1, op1_size, op2[0], 0);
for(i=1;i<op2_size;i++) {
r = mp_add_mul1_dec(result + i, op1, op1_size, op2[i]);
result[i + op1_size] = r;
}
} | O2 | c | mp_mul_basecase_dec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq (%rcx), %rcx
xorl %r8d, %r8d
callq 0x763f6
movq %rax, (%r13,%r15,8)
addq $0x8, %r13
pushq $0x1
popq %rbp
cmpq %rbx, %rbp
jge 0x76679
movq (%r14,%rbp,8), %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x764a4
movq %rax, (%r13,%r15,8)
incq %rbp
addq $0x8, %r13
jmp 0x76654
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mp_mul_basecase_dec:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov r13, rdi
mov rcx, [rcx]
xor r8d, r8d
call mp_mul1_dec
mov [r13+r15*8+0], rax
add r13, 8
push 1
pop rbp
loc_76654:
cmp rbp, rbx
jge short loc_76679
mov rcx, [r14+rbp*8]
mov rdi, r13
mov rsi, r12
mov rdx, r15
call mp_add_mul1_dec
mov [r13+r15*8+0], rax
inc rbp
add r13, 8
jmp short loc_76654
loc_76679:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mp_mul_basecase_dec(long long a1, long long a2, long long a3, unsigned long long *a4, long long a5)
{
long long result; // rax
long long v9; // r13
long long i; // rbp
result = mp_mul1_dec(a1, a2, a3, *a4, 0LL);
*(_QWORD *)(a1 + 8 * a3) = result;
v9 = a1 + 8;
for ( i = 1LL; i < a5; ++i )
{
result = mp_add_mul1_dec(v9, a2, a3, a4[i]);
*(_QWORD *)(v9 + 8 * a3) = result;
v9 += 8LL;
}
return result;
}
| mp_mul_basecase_dec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV R13,RDI
MOV RCX,qword ptr [RCX]
XOR R8D,R8D
CALL 0x001763f6
MOV qword ptr [R13 + R15*0x8],RAX
ADD R13,0x8
PUSH 0x1
POP RBP
LAB_00176654:
CMP RBP,RBX
JGE 0x00176679
MOV RCX,qword ptr [R14 + RBP*0x8]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
CALL 0x001764a4
MOV qword ptr [R13 + R15*0x8],RAX
INC RBP
ADD R13,0x8
JMP 0x00176654
LAB_00176679:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void mp_mul_basecase_dec(long param_1,int8 param_2,long param_3,long param_4,long param_5)
{
int8 uVar1;
long lVar2;
uVar1 = mp_mul1_dec();
*(int8 *)(param_1 + param_3 * 8) = uVar1;
param_1 = param_1 + 8;
for (lVar2 = 1; lVar2 < param_5; lVar2 = lVar2 + 1) {
uVar1 = mp_add_mul1_dec(param_1,param_2,param_3,*(int8 *)(param_4 + lVar2 * 8));
*(int8 *)(param_1 + param_3 * 8) = uVar1;
param_1 = param_1 + 8;
}
return;
}
|
|
5,744 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array() | llama.cpp/common/json.hpp | bool end_array()
{
bool keep = true;
if (ref_stack.back())
{
keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back());
if (keep)
{
ref_stack.back()->set_parents();
}
else
{
// discard array
*ref_stack.back() = discarded;
}
}
JSON_ASSERT(!ref_stack.empty());
JSON_ASSERT(!keep_stack.empty());
ref_stack.pop_back();
keep_stack.pop_back();
// remove discarded value
if (!keep && !ref_stack.empty() && ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->pop_back();
}
return true;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array():
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq -0x8(%rax), %rcx
movb $0x1, %bpl
testq %rcx, %rcx
je 0x783d5
subq 0x8(%rbx), %rax
shrq $0x3, %rax
decl %eax
movl %eax, 0xc(%rsp)
movb $0x3, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x7849d
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
callq *0x98(%rbx)
testb %al, %al
jne 0x783d5
leaq 0xa8(%rbx), %rsi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x7921e
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rdi
movq %r14, %rsi
callq 0x76982
xorl %ebp, %ebp
movq %r14, %rdi
xorl %esi, %esi
callq 0x73bb0
movq %r14, %rdi
callq 0x796fe
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq %rax, %rcx
je 0x78460
movq 0x30(%rbx), %rdx
movl 0x38(%rbx), %esi
cmpq %rdx, 0x20(%rbx)
sete %dil
testl %esi, %esi
sete %r8b
andb %dil, %r8b
cmpb $0x1, %r8b
je 0x7847c
leaq -0x8(%rax), %rdi
movq %rdi, 0x10(%rbx)
subl $0x1, %esi
movl %esi, 0x38(%rbx)
jae 0x7841f
movl $0x3f, 0x38(%rbx)
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
cmpq %rdi, %rcx
sete %cl
orb %cl, %bpl
jne 0x78455
movq -0x10(%rax), %rax
cmpb $0x2, (%rax)
jne 0x78455
movq 0x8(%rax), %rax
movq 0x8(%rax), %rbx
addq $-0x10, %rbx
movq %rbx, 0x8(%rax)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x73bb0
movq %rbx, %rdi
callq 0x796fe
movb $0x1, %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xa1a31(%rip), %rdi # 0x119e98
leaq 0xa1a65(%rip), %rdx # 0x119ed3
leaq 0xa2a16(%rip), %rcx # 0x11ae8b
movl $0x1bf5, %esi # imm = 0x1BF5
jmp 0x78496
leaq 0xa1a15(%rip), %rdi # 0x119e98
leaq 0xa1a49(%rip), %rdx # 0x119ed3
leaq 0xa2974(%rip), %rcx # 0x11ae05
movl $0x1bf6, %esi # imm = 0x1BF6
xorl %eax, %eax
callq 0x20e70
callq 0x212d0
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv:
push rbp
push r14
push rbx
sub rsp, 20h
mov rbx, rdi
mov rax, [rdi+10h]
mov rcx, [rax-8]
mov bpl, 1
test rcx, rcx
jz short loc_783D5
sub rax, [rbx+8]
shr rax, 3
dec eax
mov [rsp+38h+var_2C], eax
mov [rsp+38h+var_2D], 3
cmp qword ptr [rbx+90h], 0
jz loc_7849D
lea rdi, [rbx+80h]
lea rsi, [rsp+38h+var_2C]
lea rdx, [rsp+38h+var_2D]
call qword ptr [rbx+98h]
test al, al
jnz short loc_783D5
lea rsi, [rbx+0A8h]
lea r14, [rsp+38h+var_28]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [rbx+10h]
mov rdi, [rax-8]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
xor ebp, ebp
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_783D5:
mov rcx, [rbx+8]
mov rax, [rbx+10h]
cmp rcx, rax
jz short loc_78460
mov rdx, [rbx+30h]
mov esi, [rbx+38h]
cmp [rbx+20h], rdx
setz dil
test esi, esi
setz r8b
and r8b, dil
cmp r8b, 1
jz short loc_7847C
lea rdi, [rax-8]
mov [rbx+10h], rdi
sub esi, 1
mov [rbx+38h], esi
jnb short loc_7841F
mov dword ptr [rbx+38h], 3Fh ; '?'
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
loc_7841F:
cmp rcx, rdi
setz cl
or bpl, cl
jnz short loc_78455
mov rax, [rax-10h]
cmp byte ptr [rax], 2
jnz short loc_78455
mov rax, [rax+8]
mov rbx, [rax+8]
add rbx, 0FFFFFFFFFFFFFFF0h
mov [rax+8], rbx
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_78455:
mov al, 1
add rsp, 20h
pop rbx
pop r14
pop rbp
retn
loc_78460:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackEmpty; "!ref_stack.empty()"
mov esi, 1BF5h
jmp short loc_78496
loc_7847C:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1BF6h
loc_78496:
xor eax, eax
call _ggml_abort
loc_7849D:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_array(
long long a1)
{
long long v1; // rax
char v2; // bp
long long v3; // rcx
long long v4; // rax
long long v5; // rdx
int v6; // esi
long long v7; // rax
long long v8; // rax
char *v9; // rbx
char v11; // [rsp+Bh] [rbp-2Dh] BYREF
int v12; // [rsp+Ch] [rbp-2Ch] BYREF
char v13[40]; // [rsp+10h] [rbp-28h] BYREF
v1 = *(_QWORD *)(a1 + 16);
v2 = 1;
if ( *(_QWORD *)(v1 - 8) )
{
v12 = ((unsigned long long)(v1 - *(_QWORD *)(a1 + 8)) >> 3) - 1;
v11 = 3;
if ( !*(_QWORD *)(a1 + 144) )
goto LABEL_15;
if ( !(*(unsigned __int8 ( **)(long long, int *, char *))(a1 + 152))(a1 + 128, &v12, &v11) )
{
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v13,
a1 + 168);
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL),
(long long)v13);
v2 = 0;
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v13);
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v13);
}
}
v3 = *(_QWORD *)(a1 + 8);
v4 = *(_QWORD *)(a1 + 16);
if ( v3 == v4 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7157LL,
"GGML_ASSERT(%s) failed",
"!ref_stack.empty()");
goto LABEL_15;
}
v5 = *(_QWORD *)(a1 + 48);
v6 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7158LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
LABEL_15:
std::__throw_bad_function_call();
}
*(_QWORD *)(a1 + 16) = v4 - 8;
*(_DWORD *)(a1 + 56) = v6 - 1;
if ( !v6 )
{
*(_DWORD *)(a1 + 56) = 63;
*(_QWORD *)(a1 + 48) = v5 - 8;
}
if ( !((v3 == v4 - 8) | (unsigned __int8)v2) )
{
v7 = *(_QWORD *)(v4 - 16);
if ( *(_BYTE *)v7 == 2 )
{
v8 = *(_QWORD *)(v7 + 8);
v9 = (char *)(*(_QWORD *)(v8 + 8) - 16LL);
*(_QWORD *)(v8 + 8) = v9;
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v9);
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v9);
}
}
return 1;
}
| end_array:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RAX + -0x8]
MOV BPL,0x1
TEST RCX,RCX
JZ 0x001783d5
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
DEC EAX
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x3
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0017849d
LEA RDI,[RBX + 0x80]
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JNZ 0x001783d5
LEA RSI,[RBX + 0xa8]
LEA R14,[RSP + 0x10]
MOV RDI,R14
CALL 0x0017921e
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX + -0x8]
MOV RSI,R14
CALL 0x00176982
XOR EBP,EBP
MOV RDI,R14
XOR ESI,ESI
CALL 0x00173bb0
MOV RDI,R14
CALL 0x001796fe
LAB_001783d5:
MOV RCX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
CMP RCX,RAX
JZ 0x00178460
MOV RDX,qword ptr [RBX + 0x30]
MOV ESI,dword ptr [RBX + 0x38]
CMP qword ptr [RBX + 0x20],RDX
SETZ DIL
TEST ESI,ESI
SETZ R8B
AND R8B,DIL
CMP R8B,0x1
JZ 0x0017847c
LEA RDI,[RAX + -0x8]
MOV qword ptr [RBX + 0x10],RDI
SUB ESI,0x1
MOV dword ptr [RBX + 0x38],ESI
JNC 0x0017841f
MOV dword ptr [RBX + 0x38],0x3f
ADD RDX,-0x8
MOV qword ptr [RBX + 0x30],RDX
LAB_0017841f:
CMP RCX,RDI
SETZ CL
OR BPL,CL
JNZ 0x00178455
MOV RAX,qword ptr [RAX + -0x10]
CMP byte ptr [RAX],0x2
JNZ 0x00178455
MOV RAX,qword ptr [RAX + 0x8]
MOV RBX,qword ptr [RAX + 0x8]
ADD RBX,-0x10
MOV qword ptr [RAX + 0x8],RBX
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00173bb0
MOV RDI,RBX
CALL 0x001796fe
LAB_00178455:
MOV AL,0x1
ADD RSP,0x20
POP RBX
POP R14
POP RBP
RET
LAB_00178460:
LEA RDI,[0x219e98]
LEA RDX,[0x219ed3]
LEA RCX,[0x21ae8b]
MOV ESI,0x1bf5
JMP 0x00178496
LAB_0017847c:
LEA RDI,[0x219e98]
LEA RDX,[0x219ed3]
LEA RCX,[0x21ae05]
MOV ESI,0x1bf6
LAB_00178496:
XOR EAX,EAX
CALL 0x00120e70
LAB_0017849d:
CALL 0x001212d0
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::end_array() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::end_array(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
int iVar1;
long lVar2;
byte bVar3;
char cVar4;
char *pcVar5;
data *this_00;
int8 uVar6;
int1 local_2d;
int local_2c;
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_28 [16];
bVar3 = 1;
if (*(long *)(*(long *)(this + 0x10) + -8) != 0) {
local_2c = (int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) + -1;
local_2d = 3;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
cVar4 = (**(code **)(this + 0x98))(this + 0x80,&local_2c,&local_2d);
if (cVar4 == '\0') {
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_28,(basic_json *)(this + 0xa8));
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(*(long *)(this + 0x10) + -8),local_28);
bVar3 = 0;
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_28,0));
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_28);
}
}
lVar2 = *(long *)(this + 0x10);
if (*(long *)(this + 8) == lVar2) {
pcVar5 = "!ref_stack.empty()";
uVar6 = 0x1bf5;
}
else {
iVar1 = *(int *)(this + 0x38);
if (iVar1 != 0 || *(long *)(this + 0x20) != *(long *)(this + 0x30)) {
*(long *)(this + 0x10) = lVar2 + -8;
*(int *)(this + 0x38) = iVar1 + -1;
if (iVar1 == 0) {
*(int4 *)(this + 0x38) = 0x3f;
*(long *)(this + 0x30) = *(long *)(this + 0x30) + -8;
}
if ((!(bool)(bVar3 | *(long *)(this + 8) == lVar2 + -8)) &&
(**(char **)(lVar2 + -0x10) == '\x02')) {
lVar2 = *(long *)(*(char **)(lVar2 + -0x10) + 8);
this_00 = (data *)(*(long *)(lVar2 + 8) + -0x10);
*(data **)(lVar2 + 8) = this_00;
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(this_00,0));
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(this_00);
}
return 1;
}
pcVar5 = "!keep_stack.empty()";
uVar6 = 0x1bf6;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar6,
"GGML_ASSERT(%s) failed",pcVar5);
}
|
|
5,745 | coro::shared_scoped_lock<coro::thread_pool>::unlock() | AlayaLite/build_O3/_deps/libcoro-src/include/coro/shared_mutex.hpp | auto unlock() -> void
{
if (m_shared_mutex != nullptr)
{
if (m_exclusive)
{
m_shared_mutex->unlock();
}
else
{
m_shared_mutex->unlock_shared();
}
m_shared_mutex = nullptr;
}
} | O3 | cpp | coro::shared_scoped_lock<coro::thread_pool>::unlock():
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3425
cmpb $0x1, 0x8(%rbx)
jne 0x3419
callq 0x3428
jmp 0x341e
callq 0x3494
movq $0x0, (%rbx)
popq %rbx
retq
nop
| _ZN4coro18shared_scoped_lockINS_11thread_poolEE6unlockEv:
push rbx
mov rbx, rdi
mov rdi, [rdi]
test rdi, rdi
jz short loc_3425
cmp byte ptr [rbx+8], 1
jnz short loc_3419
call _ZN4coro12shared_mutexINS_11thread_poolEE6unlockEv; coro::shared_mutex<coro::thread_pool>::unlock(void)
jmp short loc_341E
loc_3419:
call _ZN4coro12shared_mutexINS_11thread_poolEE13unlock_sharedEv; coro::shared_mutex<coro::thread_pool>::unlock_shared(void)
loc_341E:
mov qword ptr [rbx], 0
loc_3425:
pop rbx
retn
| long long coro::shared_scoped_lock<coro::thread_pool>::unlock(
long long *a1,
int a2,
int a3,
int a4,
int a5,
int a6)
{
long long v7; // rdi
long long result; // rax
v7 = *a1;
if ( v7 )
{
if ( *((_BYTE *)a1 + 8) == 1 )
result = coro::shared_mutex<coro::thread_pool>::unlock(v7, a2, a3, a4, a5, a6);
else
result = coro::shared_mutex<coro::thread_pool>::unlock_shared(v7, a2, a3, a4, a5, a6);
*a1 = 0LL;
}
return result;
}
| unlock:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
TEST RDI,RDI
JZ 0x00103425
CMP byte ptr [RBX + 0x8],0x1
JNZ 0x00103419
CALL 0x00103428
JMP 0x0010341e
LAB_00103419:
CALL 0x00103494
LAB_0010341e:
MOV qword ptr [RBX],0x0
LAB_00103425:
POP RBX
RET
|
/* coro::shared_scoped_lock<coro::thread_pool>::unlock() */
void __thiscall
coro::shared_scoped_lock<coro::thread_pool>::unlock(shared_scoped_lock<coro::thread_pool> *this)
{
shared_mutex<coro::thread_pool> *this_00;
this_00 = *(shared_mutex<coro::thread_pool> **)this;
if (this_00 != (shared_mutex<coro::thread_pool> *)0x0) {
if (this[8] == (shared_scoped_lock<coro::thread_pool>)0x1) {
shared_mutex<coro::thread_pool>::unlock(this_00);
}
else {
shared_mutex<coro::thread_pool>::unlock_shared(this_00);
}
*(int8 *)this = 0;
}
return;
}
|
|
5,746 | FTB_WORD_cmp_list | eloqsql/storage/myisam/ft_boolean_search.c | static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b)
{
/* ORDER BY word, ndepth */
int i= ha_compare_text(cs, (uchar*) (*a)->word + 1, (*a)->len - 1,
(uchar*) (*b)->word + 1, (*b)->len - 1, 0);
if (!i)
i= CMP_NUM((*a)->ndepth, (*b)->ndepth);
return i;
} | O0 | c | FTB_WORD_cmp_list:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
addq $0x4d, %rsi
addq $0x1, %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x48(%rax), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x4d, %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x48(%rax), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0xf1360
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x9f593
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x44(%rax), %eax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x44(%rcx), %eax
jae 0x9f56a
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, -0x20(%rbp)
jmp 0x9f58d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x44(%rax), %edx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl 0x44(%rax), %esi
movl $0x1, %eax
xorl %ecx, %ecx
cmpl %esi, %edx
cmovel %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| FTB_WORD_cmp_list:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
mov rsi, [rax]
add rsi, 4Dh ; 'M'
add rsi, 1
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+48h]
sub eax, 1
mov eax, eax
mov edx, eax
mov rax, [rbp+var_18]
mov rcx, [rax]
add rcx, 4Dh ; 'M'
add rcx, 1
mov rax, [rbp+var_18]
mov rax, [rax]
mov eax, [rax+48h]
sub eax, 1
mov eax, eax
mov r8d, eax
xor r9d, r9d
call ha_compare_text
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jnz short loc_9F593
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+44h]
mov rcx, [rbp+var_18]
mov rcx, [rcx]
cmp eax, [rcx+44h]
jnb short loc_9F56A
mov eax, 0FFFFFFFFh
mov [rbp+var_20], eax
jmp short loc_9F58D
loc_9F56A:
mov rax, [rbp+var_10]
mov rax, [rax]
mov edx, [rax+44h]
mov rax, [rbp+var_18]
mov rax, [rax]
mov esi, [rax+44h]
mov eax, 1
xor ecx, ecx
cmp edx, esi
cmovz eax, ecx
mov [rbp+var_20], eax
loc_9F58D:
mov eax, [rbp+var_20]
mov [rbp+var_1C], eax
loc_9F593:
mov eax, [rbp+var_1C]
add rsp, 20h
pop rbp
retn
| long long FTB_WORD_cmp_list(long long a1, long long a2, long long a3)
{
unsigned int v5; // [rsp+4h] [rbp-1Ch]
v5 = ha_compare_text(
a1,
*(_QWORD *)a2 + 78LL,
(unsigned int)(*(_DWORD *)(*(_QWORD *)a2 + 72LL) - 1),
*(_QWORD *)a3 + 78LL,
(unsigned int)(*(_DWORD *)(*(_QWORD *)a3 + 72LL) - 1),
0LL);
if ( !v5 )
{
if ( *(_DWORD *)(*(_QWORD *)a2 + 68LL) >= *(_DWORD *)(*(_QWORD *)a3 + 68LL) )
return *(_DWORD *)(*(_QWORD *)a2 + 68LL) != *(_DWORD *)(*(_QWORD *)a3 + 68LL);
else
return (unsigned int)-1;
}
return v5;
}
| FTB_WORD_cmp_list:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
ADD RSI,0x4d
ADD RSI,0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x48]
SUB EAX,0x1
MOV EAX,EAX
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
ADD RCX,0x4d
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x48]
SUB EAX,0x1
MOV EAX,EAX
MOV R8D,EAX
XOR R9D,R9D
CALL 0x001f1360
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x0019f593
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x44]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX]
CMP EAX,dword ptr [RCX + 0x44]
JNC 0x0019f56a
MOV EAX,0xffffffff
MOV dword ptr [RBP + -0x20],EAX
JMP 0x0019f58d
LAB_0019f56a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EDX,dword ptr [RAX + 0x44]
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV ESI,dword ptr [RAX + 0x44]
MOV EAX,0x1
XOR ECX,ECX
CMP EDX,ESI
CMOVZ EAX,ECX
MOV dword ptr [RBP + -0x20],EAX
LAB_0019f58d:
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0019f593:
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x20
POP RBP
RET
|
uint FTB_WORD_cmp_list(int8 param_1,long *param_2,long *param_3)
{
uint local_28;
uint local_24;
local_24 = ha_compare_text(param_1,*param_2 + 0x4e,*(int *)(*param_2 + 0x48) + -1,*param_3 + 0x4e,
*(int *)(*param_3 + 0x48) + -1,0);
if (local_24 == 0) {
if (*(uint *)(*param_2 + 0x44) < *(uint *)(*param_3 + 0x44)) {
local_28 = 0xffffffff;
}
else {
local_28 = (uint)(*(int *)(*param_2 + 0x44) != *(int *)(*param_3 + 0x44));
}
local_24 = local_28;
}
return local_24;
}
|
|
5,747 | minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/./minja.hpp | void render(std::ostringstream & out, const std::shared_ptr<Context> & context) const {
try {
do_render(out, context);
} catch (const LoopControlException & e) {
// TODO: make stack creation lazy. Only needed if it was thrown outside of a loop.
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw LoopControlException(err.str(), e.control_type);
} catch (const std::exception & e) {
std::ostringstream err;
err << e.what();
if (location_.source) err << error_location_suffix(*location_.source, location_.pos);
throw std::runtime_error(err.str());
}
} | O0 | cpp | minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
subq $0x3d8, %rsp # imm = 0x3D8
movq %rdi, 0x3d0(%rsp)
movq %rsi, 0x3c8(%rsp)
movq %rdx, 0x3c0(%rsp)
movq 0x3d0(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq 0x3c8(%rsp), %rsi
movq 0x3c0(%rsp), %rdx
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0xfa876
jmp 0xfac37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
movl 0x3b4(%rsp), %eax
movl %eax, 0x14(%rsp)
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0xfa945
movq 0x3b8(%rsp), %rdi
callq 0x500b0
movq %rax, 0x1e0(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x50d30
jmp 0xfa8c8
movq 0x1e0(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
leaq 0x68(%rsp), %rdi
callq 0x50840
jmp 0xfa8e8
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
callq 0x768a0
testb $0x1, %al
jne 0xfa8ff
jmp 0xfab7f
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
callq 0x7a730
movq %rax, %rsi
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rdx
leaq 0x48(%rsp), %rdi
callq 0x5f630
jmp 0xfa925
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x50410
jmp 0xfa936
leaq 0x48(%rsp), %rdi
callq 0x510c0
jmp 0xfab7f
movl 0x14(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0xfac3f
movq 0x3b8(%rsp), %rdi
callq 0x500b0
movq %rax, 0x3a8(%rsp)
leaq 0x230(%rsp), %rdi
callq 0x50d30
jmp 0xfa97a
movq 0x3a8(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
leaq 0x230(%rsp), %rdi
callq 0x50840
jmp 0xfa99d
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
callq 0x768a0
testb $0x1, %al
jne 0xfa9b4
jmp 0xfaa5b
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
callq 0x7a730
movq %rax, %rsi
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rdx
leaq 0x210(%rsp), %rdi
callq 0x5f630
jmp 0xfa9dd
leaq 0x230(%rsp), %rdi
leaq 0x210(%rsp), %rsi
callq 0x50410
jmp 0xfa9f4
leaq 0x210(%rsp), %rdi
callq 0x510c0
jmp 0xfaa5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0xfab1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0xfab11
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x210(%rsp), %rdi
callq 0x510c0
jmp 0xfab11
movb $0x1, 0x1ef(%rsp)
movl $0x10, %edi
callq 0x50540
movq %rax, 0x8(%rsp)
leaq 0x1f0(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x51000
jmp 0xfaa89
movq 0x8(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x50390
jmp 0xfaa9d
movq 0x8(%rsp), %rdi
movb $0x0, 0x1ef(%rsp)
movq 0x1594ff(%rip), %rsi # 0x253fb0
movq 0x1594c0(%rip), %rdx # 0x253f78
callq 0x508f0
jmp 0xfac54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0xfaaf9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x510c0
testb $0x1, 0x1ef(%rsp)
jne 0xfab05
jmp 0xfab0f
movq 0x8(%rsp), %rdi
callq 0x50c40
jmp 0xfab11
leaq 0x230(%rsp), %rdi
callq 0x50c80
callq 0x50ac0
jmp 0xfab25
jmp 0xfac3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0xfac2e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0xfac24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x510c0
jmp 0xfac24
movb $0x1, 0x27(%rsp)
movl $0x18, %edi
callq 0x50540
movq %rax, (%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x51000
jmp 0xfaba3
movq (%rsp), %rdi
movq 0x1e0(%rsp), %rax
movl 0x10(%rax), %edx
leaq 0x28(%rsp), %rsi
callq 0xfacb0
jmp 0xfabbe
movq (%rsp), %rdi
movb $0x0, 0x27(%rsp)
leaq 0x1582b2(%rip), %rsi # 0x252e80
leaq 0x12b(%rip), %rdx # 0xfad00
callq 0x508f0
jmp 0xfac54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
jmp 0xfac10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x3b8(%rsp)
movl %eax, 0x3b4(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x510c0
testb $0x1, 0x27(%rsp)
jne 0xfac19
jmp 0xfac22
movq (%rsp), %rdi
callq 0x50c40
jmp 0xfac24
leaq 0x68(%rsp), %rdi
callq 0x50c80
callq 0x50ac0
jmp 0xfac35
jmp 0xfac3f
addq $0x3d8, %rsp # imm = 0x3D8
retq
movq 0x3b8(%rsp), %rdi
callq 0x50940
movq %rax, %rdi
callq 0x6e170
nopw %cs:(%rax,%rax)
nop
| _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
sub rsp, 3D8h
mov [rsp+3D8h+var_8], rdi
mov [rsp+3D8h+var_10], rsi
mov [rsp+3D8h+var_18], rdx
mov rdi, [rsp+3D8h+var_8]
mov [rsp+3D8h+var_3C0], rdi
mov rsi, [rsp+3D8h+var_10]
mov rdx, [rsp+3D8h+var_18]
mov rax, [rdi]
mov rax, [rax]
call rax
jmp short $+2
loc_FA876:
jmp loc_FAC37
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
mov eax, [rsp+3D8h+var_24]
mov [rsp+3D8h+var_3C4], eax
mov ecx, 2
cmp eax, ecx
jnz loc_FA945
mov rdi, [rsp+3D8h+var_20]; void *
call ___cxa_begin_catch
mov [rsp+3D8h+var_1F8], rax
lea rdi, [rsp+3D8h+var_370]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
jmp short $+2
loc_FA8C8:
mov rdi, [rsp+3D8h+var_1F8]
mov rax, [rdi]
mov rax, [rax+10h]
call rax
mov rsi, rax
lea rdi, [rsp+3D8h+var_370]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_FA8E8:
mov rdi, [rsp+3D8h+var_3C0]
add rdi, 8
call _ZNKSt12__shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<std::string,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_FA8FF
jmp loc_FAB7F
loc_FA8FF:
mov rdi, [rsp+3D8h+var_3C0]
add rdi, 8
call _ZNKSt19__shared_ptr_accessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<std::string,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void)
mov rsi, rax
mov rax, [rsp+3D8h+var_3C0]
mov rdx, [rax+18h]
lea rdi, [rsp+3D8h+var_390]
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
jmp short $+2
loc_FA925:
lea rdi, [rsp+3D8h+var_370]
lea rsi, [rsp+3D8h+var_390]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_FA936:
lea rdi, [rsp+3D8h+var_390]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_FAB7F
loc_FA945:
mov eax, [rsp+3D8h+var_3C4]
mov ecx, 1
cmp eax, ecx
jnz loc_FAC3F
mov rdi, [rsp+3D8h+var_20]; void *
call ___cxa_begin_catch
mov [rsp+3D8h+var_30], rax
lea rdi, [rsp+3D8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
jmp short $+2
loc_FA97A:
mov rdi, [rsp+3D8h+var_30]
mov rax, [rdi]
mov rax, [rax+10h]
call rax
mov rsi, rax
lea rdi, [rsp+3D8h+var_1A8]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_FA99D:
mov rdi, [rsp+3D8h+var_3C0]
add rdi, 8
call _ZNKSt12__shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<std::string,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_FA9B4
jmp loc_FAA5B
loc_FA9B4:
mov rdi, [rsp+3D8h+var_3C0]
add rdi, 8
call _ZNKSt19__shared_ptr_accessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<std::string,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void)
mov rsi, rax
mov rax, [rsp+3D8h+var_3C0]
mov rdx, [rax+18h]
lea rdi, [rsp+3D8h+var_1C8]
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
jmp short $+2
loc_FA9DD:
lea rdi, [rsp+3D8h+var_1A8]
lea rsi, [rsp+3D8h+var_1C8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_FA9F4:
lea rdi, [rsp+3D8h+var_1C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_FAA5B
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
jmp loc_FAB1E
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
jmp loc_FAB11
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
lea rdi, [rsp+3D8h+var_1C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_FAB11
loc_FAA5B:
mov [rsp+3D8h+var_1E9], 1
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov [rsp+3D8h+var_3D0], rax
lea rdi, [rsp+3D8h+var_1E8]
lea rsi, [rsp+3D8h+var_1A8]
call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void)
jmp short $+2
loc_FAA89:
mov rdi, [rsp+3D8h+var_3D0]
lea rsi, [rsp+3D8h+var_1E8]
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
jmp short $+2
loc_FAA9D:
mov rdi, [rsp+3D8h+var_3D0]; void *
mov [rsp+3D8h+var_1E9], 0
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_FAC54
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
jmp short loc_FAAF9
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
lea rdi, [rsp+3D8h+var_1E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_FAAF9:
test [rsp+3D8h+var_1E9], 1
jnz short loc_FAB05
jmp short loc_FAB0F
loc_FAB05:
mov rdi, [rsp+3D8h+var_3D0]; void *
call ___cxa_free_exception
loc_FAB0F:
jmp short $+2
loc_FAB11:
lea rdi, [rsp+3D8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
loc_FAB1E:
call ___cxa_end_catch
jmp short $+2
loc_FAB25:
jmp loc_FAC3F
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
jmp loc_FAC2E
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
jmp loc_FAC24
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
lea rdi, [rsp+3D8h+var_390]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_FAC24
loc_FAB7F:
mov [rsp+3D8h+var_3B1], 1
mov edi, 18h; thrown_size
call ___cxa_allocate_exception
mov [rsp+3D8h+var_3D8], rax
lea rdi, [rsp+3D8h+var_3B0]
lea rsi, [rsp+3D8h+var_370]
call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void)
jmp short $+2
loc_FABA3:
mov rdi, [rsp+3D8h+var_3D8]
mov rax, [rsp+3D8h+var_1F8]
mov edx, [rax+10h]
lea rsi, [rsp+3D8h+var_3B0]
call _ZN5minja20LoopControlExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_15LoopControlTypeE; minja::LoopControlException::LoopControlException(std::string const&,minja::LoopControlType)
jmp short $+2
loc_FABBE:
mov rdi, [rsp+3D8h+var_3D8]; void *
mov [rsp+3D8h+var_3B1], 0
lea rsi, _ZTIN5minja20LoopControlExceptionE; lptinfo
lea rdx, _ZN5minja20LoopControlExceptionD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_FAC54
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
jmp short loc_FAC10
mov rcx, rax
mov eax, edx
mov [rsp+3D8h+var_20], rcx
mov [rsp+3D8h+var_24], eax
lea rdi, [rsp+3D8h+var_3B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_FAC10:
test [rsp+3D8h+var_3B1], 1
jnz short loc_FAC19
jmp short loc_FAC22
loc_FAC19:
mov rdi, [rsp+3D8h+var_3D8]; void *
call ___cxa_free_exception
loc_FAC22:
jmp short $+2
loc_FAC24:
lea rdi, [rsp+3D8h+var_370]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
loc_FAC2E:
call ___cxa_end_catch
jmp short $+2
loc_FAC35:
jmp short loc_FAC3F
loc_FAC37:
add rsp, 3D8h
retn
loc_FAC3F:
mov rdi, [rsp+3D8h+var_20]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
loc_FAC54:
nop word ptr [rax+rax+00000000h]
xchg ax, ax
| long long minja::TemplateNode::render(long long ( ***a1)(_QWORD))
{
return (**a1)(a1);
}
| allocator:
PUSH RAX
MOV qword ptr [RSP],RDI
MOV RDI,qword ptr [RSP]
CALL 0x001fa870
POP RAX
RET
|
/* std::allocator<std::pair<std::shared_ptr<minja::Expression>, std::shared_ptr<minja::TemplateNode>
> >::allocator() */
allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>> *
__thiscall
std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>::
allocator(allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>
*this)
{
__gnu_cxx::
new_allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>
::new_allocator();
return this;
}
|
|
5,748 | CLI::Option::run_callback() | MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/Option_inl.hpp | CLI11_INLINE void Option::run_callback() {
if(force_callback_ && results_.empty()) {
add_result(default_str_);
}
if(current_option_state_ == option_state::parsing) {
_validate_results(results_);
current_option_state_ = option_state::validated;
}
if(current_option_state_ < option_state::reduced) {
_reduce_results(proc_results_, results_);
current_option_state_ = option_state::reduced;
}
if(current_option_state_ >= option_state::reduced) {
current_option_state_ = option_state::callback_run;
if(!(callback_)) {
return;
}
const results_t &send_results = proc_results_.empty() ? results_ : proc_results_;
bool local_result = callback_(send_results);
if(!local_result)
throw ConversionError(get_name(), results_);
}
} | O2 | cpp | CLI::Option::run_callback():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r14
cmpb $0x1, 0x24e(%rdi)
jne 0x1acbf
movq 0x218(%r14), %rax
cmpq 0x220(%r14), %rax
jne 0x1acbf
leaq 0xe8(%r14), %rsi
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x75e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1aa6a
leaq 0x38(%rsp), %rdi
callq 0x7860
movb 0x248(%r14), %al
testb %al, %al
je 0x1acd0
cmpb $0x3, %al
jle 0x1ace7
jmp 0x1ad05
leaq 0x218(%r14), %rsi
movq %r14, %rdi
callq 0xe8b4
movb $0x2, 0x248(%r14)
leaq 0x230(%r14), %rsi
leaq 0x218(%r14), %rdx
movq %r14, %rdi
callq 0xeb16
movb $0x4, 0x248(%r14)
movb $0x6, 0x248(%r14)
cmpq $0x0, 0x208(%r14)
je 0x1ad47
leaq 0x1f8(%r14), %rdi
leaq 0x230(%r14), %rsi
movq 0x230(%r14), %rax
leaq 0x218(%r14), %r15
cmpq 0x238(%r14), %rax
cmoveq %r15, %rsi
callq 0x1adea
testb %al, %al
je 0x1ad52
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x38
popq %rdi
callq 0x7210
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf2c4
movq %rsp, %rdi
movq %r15, %rsi
callq 0xe796
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x1adfe
xorl %ebp, %ebp
leaq 0x2486b(%rip), %rsi # 0x3f600
leaq 0x2ec8(%rip), %rdx # 0x1dc64
movq %rbx, %rdi
callq 0x7750
movq %rax, %r14
movq %rsp, %rdi
callq 0x99ca
jmp 0x1adb7
movq %rax, %r14
movb $0x1, %bpl
leaq 0x18(%rsp), %rdi
callq 0x7860
testb %bpl, %bpl
jne 0x1adda
jmp 0x1ade2
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x7860
jmp 0x1ade2
movq %rax, %r14
movq %rbx, %rdi
callq 0x7360
movq %r14, %rdi
callq 0x7770
| _ZN3CLI6Option12run_callbackEv:
push rbp
push r15
push r14
push rbx
sub rsp, 58h
mov r14, rdi
cmp byte ptr [rdi+24Eh], 1
jnz short loc_1ACBF
mov rax, [r14+218h]
cmp rax, [r14+220h]
jnz short loc_1ACBF
lea rsi, [r14+0E8h]
lea rbx, [rsp+78h+var_40]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov rdi, r14
mov rsi, rbx
call _ZN3CLI6Option10add_resultENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::Option::add_result(std::string)
lea rdi, [rsp+78h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_1ACBF:
mov al, [r14+248h]
test al, al
jz short loc_1ACD0
cmp al, 3
jle short loc_1ACE7
jmp short loc_1AD05
loc_1ACD0:
lea rsi, [r14+218h]
mov rdi, r14; this
call _ZNK3CLI6Option17_validate_resultsERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE; CLI::Option::_validate_results(std::vector<std::string> &)
mov byte ptr [r14+248h], 2
loc_1ACE7:
lea rsi, [r14+230h]
lea rdx, [r14+218h]
mov rdi, r14; this
call _ZNK3CLI6Option15_reduce_resultsERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKS9_; CLI::Option::_reduce_results(std::vector<std::string> &,std::vector<std::string> const&)
mov byte ptr [r14+248h], 4
loc_1AD05:
mov byte ptr [r14+248h], 6
cmp qword ptr [r14+208h], 0
jz short loc_1AD47
lea rdi, [r14+1F8h]
lea rsi, [r14+230h]
mov rax, [r14+230h]
lea r15, [r14+218h]
cmp rax, [r14+238h]
cmovz rsi, r15
call _ZNKSt8functionIFbRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEEclESA_; std::function<bool ()(std::vector<std::string> const&)>::operator()(std::vector<std::string> const&)
test al, al
jz short loc_1AD52
loc_1AD47:
add rsp, 58h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_1AD52:
push 38h ; '8'
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+78h+var_60]
mov rsi, r14
xor edx, edx
xor ecx, ecx
call _ZNK3CLI6Option8get_nameB5cxx11Ebb; CLI::Option::get_name(bool,bool)
mov rdi, rsp
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
mov bpl, 1
lea rsi, [rsp+78h+var_60]
mov rdx, rsp
mov rdi, rbx
call _ZN3CLI15ConversionErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EE; CLI::ConversionError::ConversionError(std::string,std::vector<std::string>)
xor ebp, ebp
lea rsi, _ZTIN3CLI15ConversionErrorE; lptinfo
lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_1ADB7
mov r14, rax
mov bpl, 1
loc_1ADB7:
lea rdi, [rsp+78h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_1ADDA
jmp short loc_1ADE2
mov r14, rax
lea rdi, [rsp+78h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_1ADE2
mov r14, rax
loc_1ADDA:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_1ADE2:
mov rdi, r14
call __Unwind_Resume
| run_callback:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x58
MOV R14,RDI
CMP byte ptr [RDI + 0x24e],0x1
JNZ 0x0011acbf
MOV RAX,qword ptr [R14 + 0x218]
CMP RAX,qword ptr [R14 + 0x220]
JNZ 0x0011acbf
LEA RSI,[R14 + 0xe8]
LEA RBX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x001075e0
LAB_0011acaa:
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011aa6a
LAB_0011acb5:
LEA RDI,[RSP + 0x38]
CALL 0x00107860
LAB_0011acbf:
MOV AL,byte ptr [R14 + 0x248]
TEST AL,AL
JZ 0x0011acd0
CMP AL,0x3
JLE 0x0011ace7
JMP 0x0011ad05
LAB_0011acd0:
LEA RSI,[R14 + 0x218]
MOV RDI,R14
CALL 0x0010e8b4
MOV byte ptr [R14 + 0x248],0x2
LAB_0011ace7:
LEA RSI,[R14 + 0x230]
LEA RDX,[R14 + 0x218]
MOV RDI,R14
CALL 0x0010eb16
MOV byte ptr [R14 + 0x248],0x4
LAB_0011ad05:
MOV byte ptr [R14 + 0x248],0x6
CMP qword ptr [R14 + 0x208],0x0
JZ 0x0011ad47
LEA RDI,[R14 + 0x1f8]
LEA RSI,[R14 + 0x230]
MOV RAX,qword ptr [R14 + 0x230]
LEA R15,[R14 + 0x218]
CMP RAX,qword ptr [R14 + 0x238]
CMOVZ RSI,R15
CALL 0x0011adea
TEST AL,AL
JZ 0x0011ad52
LAB_0011ad47:
ADD RSP,0x58
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0011ad52:
PUSH 0x38
POP RDI
CALL 0x00107210
MOV RBX,RAX
LAB_0011ad5d:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f2c4
LAB_0011ad6e:
MOV RDI,RSP
MOV RSI,R15
CALL 0x0010e796
MOV BPL,0x1
LAB_0011ad7c:
LEA RSI,[RSP + 0x18]
MOV RDX,RSP
MOV RDI,RBX
CALL 0x0011adfe
XOR EBP,EBP
LEA RSI,[0x13f600]
LEA RDX,[0x11dc64]
MOV RDI,RBX
CALL 0x00107750
|
/* CLI::Option::run_callback() */
void __thiscall CLI::Option::run_callback(Option *this)
{
char cVar1;
ConversionError *pCVar2;
vector *pvVar3;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> avStack_78 [24];
int1 local_60 [32];
string local_40 [32];
if ((this[0x24e] == (Option)0x1) && (*(long *)(this + 0x218) == *(long *)(this + 0x220))) {
std::__cxx11::string::string(local_40,(string *)(this + 0xe8));
/* try { // try from 0011acaa to 0011acb4 has its CatchHandler @ 0011adc8 */
add_result(this,local_40);
std::__cxx11::string::~string(local_40);
}
if (this[0x248] == (Option)0x0) {
_validate_results(this,(vector *)(this + 0x218));
this[0x248] = (Option)0x2;
}
else if ('\x03' < (char)this[0x248]) goto LAB_0011ad05;
_reduce_results(this,(vector *)(this + 0x230),(vector *)(this + 0x218));
this[0x248] = (Option)0x4;
LAB_0011ad05:
this[0x248] = (Option)0x6;
if (*(long *)(this + 0x208) != 0) {
pvVar3 = (vector *)(this + 0x230);
if (*(long *)(this + 0x230) == *(long *)(this + 0x238)) {
pvVar3 = (vector *)(this + 0x218);
}
cVar1 = std::
function<bool(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)>
::operator()((function<bool(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)>
*)(this + 0x1f8),pvVar3);
if (cVar1 == '\0') {
pCVar2 = (ConversionError *)__cxa_allocate_exception(0x38);
/* try { // try from 0011ad5d to 0011ad6d has its CatchHandler @ 0011add7 */
get_name_abi_cxx11_(SUB81(local_60,0),SUB81(this,0));
/* try { // try from 0011ad6e to 0011ad78 has its CatchHandler @ 0011adb1 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
(avStack_78,(vector *)(this + 0x218));
/* try { // try from 0011ad7c to 0011ada3 has its CatchHandler @ 0011ada4 */
ConversionError::ConversionError(pCVar2,local_60,avStack_78);
/* WARNING: Subroutine does not return */
__cxa_throw(pCVar2,&ConversionError::typeinfo,Error::~Error);
}
}
return;
}
|
||
5,749 | reset_file_instance_io() | eloqsql/storage/perfschema/pfs_instr.cc | void reset_file_instance_io(void)
{
global_file_container.apply_all(fct_reset_file_io);
} | O3 | cpp | reset_file_instance_io():
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
leaq 0x35c2ea(%rip), %rcx # 0x394888
xorps %xmm0, %xmm0
movq $-0x1, %rdx
movq 0xa8(%rcx,%rax,8), %rsi
testq %rsi, %rsi
je 0x38617
movq 0x50(%rsi), %rdi
testq %rdi, %rdi
jle 0x38617
movq 0x48(%rsi), %rsi
imulq $0x2c0, %rdi, %rdi # imm = 0x2C0
addq %rsi, %rdi
movups %xmm0, 0x230(%rsi)
movq %rdx, 0x240(%rsi)
movups %xmm0, 0x248(%rsi)
movups %xmm0, 0x258(%rsi)
movq %rdx, 0x268(%rsi)
movups %xmm0, 0x270(%rsi)
movups %xmm0, 0x280(%rsi)
movq %rdx, 0x290(%rsi)
movups %xmm0, 0x298(%rsi)
addq $0x2c0, %rsi # imm = 0x2C0
cmpq %rdi, %rsi
jb 0x385cc
incq %rax
cmpq $0x1000, %rax # imm = 0x1000
jne 0x385a8
popq %rbp
retq
| _Z22reset_file_instance_iov:
push rbp
mov rbp, rsp
xor eax, eax
lea rcx, global_file_container
xorps xmm0, xmm0
mov rdx, 0FFFFFFFFFFFFFFFFh
loc_385A8:
mov rsi, [rcx+rax*8+0A8h]
test rsi, rsi
jz short loc_38617
mov rdi, [rsi+50h]
test rdi, rdi
jle short loc_38617
mov rsi, [rsi+48h]
imul rdi, 2C0h
add rdi, rsi
loc_385CC:
movups xmmword ptr [rsi+230h], xmm0
mov [rsi+240h], rdx
movups xmmword ptr [rsi+248h], xmm0
movups xmmword ptr [rsi+258h], xmm0
mov [rsi+268h], rdx
movups xmmword ptr [rsi+270h], xmm0
movups xmmword ptr [rsi+280h], xmm0
mov [rsi+290h], rdx
movups xmmword ptr [rsi+298h], xmm0
add rsi, 2C0h
cmp rsi, rdi
jb short loc_385CC
loc_38617:
inc rax
cmp rax, 1000h
jnz short loc_385A8
pop rbp
retn
| long long reset_file_instance_io(void)
{
long long result; // rax
long long v1; // rsi
long long v2; // rdi
unsigned long long v3; // rsi
unsigned long long v4; // rdi
for ( result = 0LL; result != 4096; ++result )
{
v1 = global_file_container[result + 21];
if ( v1 )
{
v2 = *(_QWORD *)(v1 + 80);
if ( v2 > 0 )
{
v3 = *(_QWORD *)(v1 + 72);
v4 = v3 + 704 * v2;
do
{
*(_OWORD *)(v3 + 560) = 0LL;
*(_QWORD *)(v3 + 576) = -1LL;
*(_OWORD *)(v3 + 584) = 0LL;
*(_OWORD *)(v3 + 600) = 0LL;
*(_QWORD *)(v3 + 616) = -1LL;
*(_OWORD *)(v3 + 624) = 0LL;
*(_OWORD *)(v3 + 640) = 0LL;
*(_QWORD *)(v3 + 656) = -1LL;
*(_OWORD *)(v3 + 664) = 0LL;
v3 += 704LL;
}
while ( v3 < v4 );
}
}
}
return result;
}
| reset_file_instance_io:
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LEA RCX,[0x494888]
XORPS XMM0,XMM0
MOV RDX,-0x1
LAB_001385a8:
MOV RSI,qword ptr [RCX + RAX*0x8 + 0xa8]
TEST RSI,RSI
JZ 0x00138617
MOV RDI,qword ptr [RSI + 0x50]
TEST RDI,RDI
JLE 0x00138617
MOV RSI,qword ptr [RSI + 0x48]
IMUL RDI,RDI,0x2c0
ADD RDI,RSI
LAB_001385cc:
MOVUPS xmmword ptr [RSI + 0x230],XMM0
MOV qword ptr [RSI + 0x240],RDX
MOVUPS xmmword ptr [RSI + 0x248],XMM0
MOVUPS xmmword ptr [RSI + 0x258],XMM0
MOV qword ptr [RSI + 0x268],RDX
MOVUPS xmmword ptr [RSI + 0x270],XMM0
MOVUPS xmmword ptr [RSI + 0x280],XMM0
MOV qword ptr [RSI + 0x290],RDX
MOVUPS xmmword ptr [RSI + 0x298],XMM0
ADD RSI,0x2c0
CMP RSI,RDI
JC 0x001385cc
LAB_00138617:
INC RAX
CMP RAX,0x1000
JNZ 0x001385a8
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* reset_file_instance_io() */
void reset_file_instance_io(void)
{
long lVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
lVar2 = 0;
do {
lVar1 = (&DAT_00494930)[lVar2];
if ((lVar1 != 0) && (0 < *(long *)(lVar1 + 0x50))) {
uVar3 = *(ulong *)(lVar1 + 0x48);
uVar4 = *(long *)(lVar1 + 0x50) * 0x2c0 + uVar3;
do {
*(int8 *)(uVar3 + 0x230) = 0;
*(int8 *)(uVar3 + 0x238) = 0;
*(int8 *)(uVar3 + 0x240) = 0xffffffffffffffff;
*(int8 *)(uVar3 + 0x248) = 0;
*(int8 *)(uVar3 + 0x250) = 0;
*(int8 *)(uVar3 + 600) = 0;
*(int8 *)(uVar3 + 0x260) = 0;
*(int8 *)(uVar3 + 0x268) = 0xffffffffffffffff;
*(int8 *)(uVar3 + 0x270) = 0;
*(int8 *)(uVar3 + 0x278) = 0;
*(int8 *)(uVar3 + 0x280) = 0;
*(int8 *)(uVar3 + 0x288) = 0;
*(int8 *)(uVar3 + 0x290) = 0xffffffffffffffff;
*(int8 *)(uVar3 + 0x298) = 0;
*(int8 *)(uVar3 + 0x2a0) = 0;
uVar3 = uVar3 + 0x2c0;
} while (uVar3 < uVar4);
}
lVar2 = lVar2 + 1;
} while (lVar2 != 0x1000);
return;
}
|
|
5,750 | pfs_start_cond_wait_v1 | eloqsql/storage/perfschema/pfs.cc | PSI_cond_locker*
pfs_start_cond_wait_v1(PSI_cond_locker_state *state,
PSI_cond *cond, PSI_mutex *mutex,
PSI_cond_operation op,
const char *src_file, uint src_line)
{
/*
Note about the unused PSI_mutex *mutex parameter:
In the pthread library, a call to pthread_cond_wait()
causes an unlock() + lock() on the mutex associated with the condition.
This mutex operation is not instrumented, so the mutex will still
appear as locked when a thread is waiting on a condition.
This has no impact now, as unlock_mutex() is not recording events.
When unlock_mutex() is implemented by later work logs,
this parameter here will be used to adjust the mutex state,
in start_cond_wait_v1() and end_cond_wait_v1().
*/
PFS_cond *pfs_cond= reinterpret_cast<PFS_cond*> (cond);
assert(static_cast<int> (op) >= 0);
assert(static_cast<uint> (op) < array_elements(cond_operation_map));
assert(state != NULL);
assert(pfs_cond != NULL);
assert(pfs_cond->m_class != NULL);
if (! pfs_cond->m_enabled)
return NULL;
uint flags;
ulonglong timer_start= 0;
if (flag_thread_instrumentation)
{
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
return NULL;
if (! pfs_thread->m_enabled)
return NULL;
state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread);
flags= STATE_FLAG_THREAD;
if (pfs_cond->m_timed)
{
timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
state->m_timer_start= timer_start;
flags|= STATE_FLAG_TIMED;
}
if (flag_events_waits_current)
{
if (unlikely(pfs_thread->m_events_waits_current >=
& pfs_thread->m_events_waits_stack[WAIT_STACK_SIZE]))
{
locker_lost++;
return NULL;
}
PFS_events_waits *wait= pfs_thread->m_events_waits_current;
state->m_wait= wait;
flags|= STATE_FLAG_EVENT;
PFS_events_waits *parent_event= wait - 1;
wait->m_event_type= EVENT_TYPE_WAIT;
wait->m_nesting_event_id= parent_event->m_event_id;
wait->m_nesting_event_type= parent_event->m_event_type;
wait->m_thread_internal_id= pfs_thread->m_thread_internal_id;
wait->m_class= pfs_cond->m_class;
wait->m_timer_start= timer_start;
wait->m_timer_end= 0;
wait->m_object_instance_addr= pfs_cond->m_identity;
wait->m_event_id= pfs_thread->m_event_id++;
wait->m_end_event_id= 0;
wait->m_operation= cond_operation_map[static_cast<int> (op)];
wait->m_source_file= src_file;
wait->m_source_line= src_line;
wait->m_wait_class= WAIT_CLASS_COND;
pfs_thread->m_events_waits_current++;
}
}
else
{
if (pfs_cond->m_timed)
{
timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
state->m_timer_start= timer_start;
flags= STATE_FLAG_TIMED;
}
else
{
/*
Complete shortcut.
*/
/* Aggregate to EVENTS_WAITS_SUMMARY_BY_INSTANCE (counted) */
pfs_cond->m_cond_stat.m_wait_stat.aggregate_counted();
return NULL;
}
}
state->m_flags= flags;
state->m_cond= cond;
state->m_mutex= mutex;
return reinterpret_cast<PSI_cond_locker*> (state);
} | O0 | cpp | pfs_start_cond_wait_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
testb $0x1, 0x4(%rax)
jne 0x46f5e
movq $0x0, -0x8(%rbp)
jmp 0x4720a
movq $0x0, -0x50(%rbp)
leaq 0x3c7053(%rip), %rax # 0x40dfc0
testb $0x1, (%rax)
je 0x4718f
callq 0x45700
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x46f9e
movq $0x0, -0x8(%rbp)
jmp 0x4720a
movq -0x58(%rbp), %rax
testb $0x1, 0x7e0(%rax)
jne 0x46fb8
movq $0x0, -0x8(%rbp)
jmp 0x4720a
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x2, -0x44(%rbp)
movq -0x40(%rbp), %rax
testb $0x1, 0x5(%rax)
je 0x47004
leaq 0x1cc3e0(%rip), %rax # 0x2133bc
movl (%rax), %edi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
callq 0x42d20
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x44(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x44(%rbp)
leaq 0x3c6eb5(%rip), %rax # 0x40dec0
testb $0x1, (%rax)
je 0x4718d
movq -0x58(%rbp), %rax
movq 0x7f0(%rax), %rax
movq -0x58(%rbp), %rcx
addq $0x878, %rcx # imm = 0x878
addq $0x420, %rcx # imm = 0x420
cmpq %rcx, %rax
setae %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x47066
leaq 0x3c2e00(%rip), %rax # 0x409e48
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x3c2df2(%rip), %rax # 0x409e48
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x4720a
movq -0x58(%rbp), %rax
movq 0x7f0(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movl -0x44(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x44(%rbp)
movq -0x60(%rbp), %rax
addq $-0xb0, %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movl $0x4, 0x18(%rax)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x68(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x58(%rbp), %rax
movq 0x850(%rax), %rcx
movq -0x60(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x50(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x60(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x58(%rbp), %rax
movq 0x7f8(%rax), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x7f8(%rax)
movq -0x60(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rax
movq $0x0, 0x10(%rax)
movslq -0x24(%rbp), %rcx
leaq 0x1cc2c2(%rip), %rax # 0x213408
movl (%rax,%rcx,4), %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x90(%rax)
movq -0x30(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x48(%rax)
movl -0x34(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x60(%rbp), %rax
movl $0x3, 0x58(%rax)
movq -0x58(%rbp), %rax
movq 0x7f0(%rax), %rcx
addq $0xb0, %rcx
movq %rcx, 0x7f0(%rax)
jmp 0x471e1
movq -0x40(%rbp), %rax
testb $0x1, 0x5(%rax)
je 0x471c8
leaq 0x1cc21c(%rip), %rax # 0x2133bc
movl (%rax), %edi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
callq 0x42d20
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movl $0x1, -0x44(%rbp)
jmp 0x471df
movq -0x40(%rbp), %rdi
addq $0x20, %rdi
callq 0x4e3c0
movq $0x0, -0x8(%rbp)
jmp 0x4720a
jmp 0x471e1
movl -0x44(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| pfs_start_cond_wait_v1:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
test byte ptr [rax+4], 1
jnz short loc_46F5E
mov [rbp+var_8], 0
jmp loc_4720A
loc_46F5E:
mov [rbp+var_50], 0
lea rax, flag_thread_instrumentation
test byte ptr [rax], 1
jz loc_4718F
call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void)
mov [rbp+var_58], rax
cmp [rbp+var_58], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_46F9E
mov [rbp+var_8], 0
jmp loc_4720A
loc_46F9E:
mov rax, [rbp+var_58]
test byte ptr [rax+7E0h], 1
jnz short loc_46FB8
mov [rbp+var_8], 0
jmp loc_4720A
loc_46FB8:
mov rcx, [rbp+var_58]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov [rbp+var_44], 2
mov rax, [rbp+var_40]
test byte ptr [rax+5], 1
jz short loc_47004
lea rax, wait_timer
mov edi, [rax]
mov rsi, [rbp+var_10]
add rsi, 28h ; '('
call _Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE; get_timer_raw_value_and_function(enum_timer_name,ulong long (**)(void))
mov [rbp+var_50], rax
mov rcx, [rbp+var_50]
mov rax, [rbp+var_10]
mov [rax+20h], rcx
mov eax, [rbp+var_44]
or eax, 1
mov [rbp+var_44], eax
loc_47004:
lea rax, flag_events_waits_current
test byte ptr [rax], 1
jz loc_4718D
mov rax, [rbp+var_58]
mov rax, [rax+7F0h]
mov rcx, [rbp+var_58]
add rcx, 878h
add rcx, 420h
cmp rax, rcx
setnb al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_47066
lea rax, locker_lost
mov rcx, [rax]
add rcx, 1
lea rax, locker_lost
mov [rax], rcx
mov [rbp+var_8], 0
jmp loc_4720A
loc_47066:
mov rax, [rbp+var_58]
mov rax, [rax+7F0h]
mov [rbp+var_60], rax
mov rcx, [rbp+var_60]
mov rax, [rbp+var_10]
mov [rax+30h], rcx
mov eax, [rbp+var_44]
or eax, 4
mov [rbp+var_44], eax
mov rax, [rbp+var_60]
add rax, 0FFFFFFFFFFFFFF50h
mov [rbp+var_68], rax
mov rax, [rbp+var_60]
mov dword ptr [rax+18h], 4
mov rax, [rbp+var_68]
mov rcx, [rax+8]
mov rax, [rbp+var_60]
mov [rax+20h], rcx
mov rax, [rbp+var_68]
mov ecx, [rax+18h]
mov rax, [rbp+var_60]
mov [rax+28h], ecx
mov rax, [rbp+var_58]
mov rcx, [rax+850h]
mov rax, [rbp+var_60]
mov [rax], rcx
mov rax, [rbp+var_40]
mov rcx, [rax+18h]
mov rax, [rbp+var_60]
mov [rax+30h], rcx
mov rcx, [rbp+var_50]
mov rax, [rbp+var_60]
mov [rax+38h], rcx
mov rax, [rbp+var_60]
mov qword ptr [rax+40h], 0
mov rax, [rbp+var_40]
mov rcx, [rax+10h]
mov rax, [rbp+var_60]
mov [rax+88h], rcx
mov rax, [rbp+var_58]
mov rcx, [rax+7F8h]
mov rdx, rcx
add rdx, 1
mov [rax+7F8h], rdx
mov rax, [rbp+var_60]
mov [rax+8], rcx
mov rax, [rbp+var_60]
mov qword ptr [rax+10h], 0
movsxd rcx, [rbp+var_24]
lea rax, _ZL18cond_operation_map; cond_operation_map
mov ecx, [rax+rcx*4]
mov rax, [rbp+var_60]
mov [rax+90h], ecx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_60]
mov [rax+48h], rcx
mov ecx, [rbp+var_34]
mov rax, [rbp+var_60]
mov [rax+50h], ecx
mov rax, [rbp+var_60]
mov dword ptr [rax+58h], 3
mov rax, [rbp+var_58]
mov rcx, [rax+7F0h]
add rcx, 0B0h
mov [rax+7F0h], rcx
loc_4718D:
jmp short loc_471E1
loc_4718F:
mov rax, [rbp+var_40]
test byte ptr [rax+5], 1
jz short loc_471C8
lea rax, wait_timer
mov edi, [rax]
mov rsi, [rbp+var_10]
add rsi, 28h ; '('
call _Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE; get_timer_raw_value_and_function(enum_timer_name,ulong long (**)(void))
mov [rbp+var_50], rax
mov rcx, [rbp+var_50]
mov rax, [rbp+var_10]
mov [rax+20h], rcx
mov [rbp+var_44], 1
jmp short loc_471DF
loc_471C8:
mov rdi, [rbp+var_40]
add rdi, 20h ; ' '; this
call _ZN15PFS_single_stat17aggregate_countedEv; PFS_single_stat::aggregate_counted(void)
mov [rbp+var_8], 0
jmp short loc_4720A
loc_471DF:
jmp short $+2
loc_471E1:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_10]
mov [rax], ecx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_4720A:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| long long pfs_start_cond_wait_v1(long long a1, long long a2, long long a3, int a4, long long a5, int a6)
{
long long v6; // rcx
long long v8; // [rsp+10h] [rbp-60h]
long long THR_PFS; // [rsp+18h] [rbp-58h]
unsigned long long timer_raw_value_and_function; // [rsp+20h] [rbp-50h]
int v11; // [rsp+2Ch] [rbp-44h]
if ( (*(_BYTE *)(a2 + 4) & 1) != 0 )
{
timer_raw_value_and_function = 0LL;
if ( (flag_thread_instrumentation & 1) != 0 )
{
THR_PFS = my_thread_get_THR_PFS();
if ( !THR_PFS )
return 0LL;
if ( (*(_BYTE *)(THR_PFS + 2016) & 1) == 0 )
return 0LL;
*(_QWORD *)(a1 + 24) = THR_PFS;
v11 = 2;
if ( (*(_BYTE *)(a2 + 5) & 1) != 0 )
{
timer_raw_value_and_function = get_timer_raw_value_and_function(
(unsigned int)wait_timer,
(unsigned long long (**)(void))(a1 + 40));
*(_QWORD *)(a1 + 32) = timer_raw_value_and_function;
v11 = 3;
}
if ( (flag_events_waits_current & 1) != 0 )
{
if ( *(_QWORD *)(THR_PFS + 2032) >= (unsigned long long)(THR_PFS + 3224) )
{
++locker_lost;
return 0LL;
}
v8 = *(_QWORD *)(THR_PFS + 2032);
*(_QWORD *)(a1 + 48) = v8;
v11 |= 4u;
*(_DWORD *)(v8 + 24) = 4;
*(_QWORD *)(v8 + 32) = *(_QWORD *)(v8 - 176 + 8);
*(_DWORD *)(v8 + 40) = *(_DWORD *)(v8 - 176 + 24);
*(_QWORD *)v8 = *(_QWORD *)(THR_PFS + 2128);
*(_QWORD *)(v8 + 48) = *(_QWORD *)(a2 + 24);
*(_QWORD *)(v8 + 56) = timer_raw_value_and_function;
*(_QWORD *)(v8 + 64) = 0LL;
*(_QWORD *)(v8 + 136) = *(_QWORD *)(a2 + 16);
v6 = *(_QWORD *)(THR_PFS + 2040);
*(_QWORD *)(THR_PFS + 2040) = v6 + 1;
*(_QWORD *)(v8 + 8) = v6;
*(_QWORD *)(v8 + 16) = 0LL;
*(_DWORD *)(v8 + 144) = cond_operation_map[a4];
*(_QWORD *)(v8 + 72) = a5;
*(_DWORD *)(v8 + 80) = a6;
*(_DWORD *)(v8 + 88) = 3;
*(_QWORD *)(THR_PFS + 2032) += 176LL;
}
}
else
{
if ( (*(_BYTE *)(a2 + 5) & 1) == 0 )
{
PFS_single_stat::aggregate_counted((PFS_single_stat *)(a2 + 32));
return 0LL;
}
*(_QWORD *)(a1 + 32) = get_timer_raw_value_and_function(
(unsigned int)wait_timer,
(unsigned long long (**)(void))(a1 + 40));
v11 = 1;
}
*(_DWORD *)a1 = v11;
*(_QWORD *)(a1 + 8) = a2;
*(_QWORD *)(a1 + 16) = a3;
return a1;
}
return 0LL;
}
| pfs_start_cond_wait_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
TEST byte ptr [RAX + 0x4],0x1
JNZ 0x00146f5e
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014720a
LAB_00146f5e:
MOV qword ptr [RBP + -0x50],0x0
LEA RAX,[0x50dfc0]
TEST byte ptr [RAX],0x1
JZ 0x0014718f
CALL 0x00145700
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x58],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00146f9e
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014720a
LAB_00146f9e:
MOV RAX,qword ptr [RBP + -0x58]
TEST byte ptr [RAX + 0x7e0],0x1
JNZ 0x00146fb8
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014720a
LAB_00146fb8:
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
MOV dword ptr [RBP + -0x44],0x2
MOV RAX,qword ptr [RBP + -0x40]
TEST byte ptr [RAX + 0x5],0x1
JZ 0x00147004
LEA RAX,[0x3133bc]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x28
CALL 0x00142d20
MOV qword ptr [RBP + -0x50],RAX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],RCX
MOV EAX,dword ptr [RBP + -0x44]
OR EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
LAB_00147004:
LEA RAX,[0x50dec0]
TEST byte ptr [RAX],0x1
JZ 0x0014718d
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + 0x7f0]
MOV RCX,qword ptr [RBP + -0x58]
ADD RCX,0x878
ADD RCX,0x420
CMP RAX,RCX
SETNC AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00147066
LEA RAX,[0x509e48]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x509e48]
MOV qword ptr [RAX],RCX
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014720a
LAB_00147066:
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX + 0x7f0]
MOV qword ptr [RBP + -0x60],RAX
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],RCX
MOV EAX,dword ptr [RBP + -0x44]
OR EAX,0x4
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,-0xb0
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX + 0x18],0x4
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x68]
MOV ECX,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX + 0x28],ECX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RAX + 0x850]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x30],RCX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x40],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x88],RCX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RAX + 0x7f8]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RAX + 0x7f8],RDX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x10],0x0
MOVSXD RCX,dword ptr [RBP + -0x24]
LEA RAX,[0x313408]
MOV ECX,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX + 0x90],ECX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x48],RCX
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX + 0x50],ECX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX + 0x58],0x3
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RAX + 0x7f0]
ADD RCX,0xb0
MOV qword ptr [RAX + 0x7f0],RCX
LAB_0014718d:
JMP 0x001471e1
LAB_0014718f:
MOV RAX,qword ptr [RBP + -0x40]
TEST byte ptr [RAX + 0x5],0x1
JZ 0x001471c8
LEA RAX,[0x3133bc]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x28
CALL 0x00142d20
MOV qword ptr [RBP + -0x50],RAX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],RCX
MOV dword ptr [RBP + -0x44],0x1
JMP 0x001471df
LAB_001471c8:
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x20
CALL 0x0014e3c0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0014720a
LAB_001471df:
JMP 0x001471e1
LAB_001471e1:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_0014720a:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
uint * pfs_start_cond_wait_v1
(uint *param_1,long param_2,int8 param_3,int param_4,int8 param_5,
int4 param_6)
{
int8 *puVar1;
long lVar2;
long lVar3;
int8 uVar4;
int8 local_58;
uint local_4c;
if ((*(byte *)(param_2 + 4) & 1) == 0) {
return (uint *)0x0;
}
local_58 = 0;
if ((flag_thread_instrumentation & 1) == 0) {
if ((*(byte *)(param_2 + 5) & 1) == 0) {
PFS_single_stat::aggregate_counted((PFS_single_stat *)(param_2 + 0x20));
return (uint *)0x0;
}
uVar4 = get_timer_raw_value_and_function(wait_timer,param_1 + 10);
*(int8 *)(param_1 + 8) = uVar4;
local_4c = 1;
}
else {
lVar3 = my_thread_get_THR_PFS();
if (lVar3 == 0) {
return (uint *)0x0;
}
if ((*(byte *)(lVar3 + 0x7e0) & 1) == 0) {
return (uint *)0x0;
}
*(long *)(param_1 + 6) = lVar3;
local_4c = 2;
if ((*(byte *)(param_2 + 5) & 1) != 0) {
local_58 = get_timer_raw_value_and_function(wait_timer,param_1 + 10);
*(int8 *)(param_1 + 8) = local_58;
local_4c = 3;
}
if ((flag_events_waits_current & 1) != 0) {
if (lVar3 + 0xc98U <= *(ulong *)(lVar3 + 0x7f0)) {
locker_lost = locker_lost + 1;
return (uint *)0x0;
}
puVar1 = *(int8 **)(lVar3 + 0x7f0);
*(int8 **)(param_1 + 0xc) = puVar1;
local_4c = local_4c | 4;
*(int4 *)(puVar1 + 3) = 4;
puVar1[4] = puVar1[-0x15];
*(int4 *)(puVar1 + 5) = *(int4 *)(puVar1 + -0x13);
*puVar1 = *(int8 *)(lVar3 + 0x850);
puVar1[6] = *(int8 *)(param_2 + 0x18);
puVar1[7] = local_58;
puVar1[8] = 0;
puVar1[0x11] = *(int8 *)(param_2 + 0x10);
lVar2 = *(long *)(lVar3 + 0x7f8);
*(long *)(lVar3 + 0x7f8) = lVar2 + 1;
puVar1[1] = lVar2;
puVar1[2] = 0;
*(int4 *)(puVar1 + 0x12) =
*(int4 *)((long)&cond_operation_map + (long)param_4 * 4);
puVar1[9] = param_5;
*(int4 *)(puVar1 + 10) = param_6;
*(int4 *)(puVar1 + 0xb) = 3;
*(long *)(lVar3 + 0x7f0) = *(long *)(lVar3 + 0x7f0) + 0xb0;
}
}
*param_1 = local_4c;
*(long *)(param_1 + 2) = param_2;
*(int8 *)(param_1 + 4) = param_3;
return param_1;
}
|
|
5,751 | void google::protobuf::compiler::cpp::Formatter::Set<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/helpers.h | void Set(const std::string& key, const T& value) {
vars_[key] = ToString(value);
} | O3 | c | void google::protobuf::compiler::cpp::Formatter::Set<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rdx, %rdi
callq 0x1f1f0
leaq (%rax,%r15), %rdx
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x250b2
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x2586a
addq $0x8, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2e27c
leaq 0x20(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1f5d0
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x9ae3e
callq 0x1f4a0
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x9ae4c
callq 0x1f4a0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x9ae71
callq 0x1f4a0
jmp 0x9ae71
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x9ae7f
callq 0x1f4a0
movq %rbx, %rdi
callq 0x1f860
nop
| _ZN6google8protobuf8compiler3cpp9Formatter3SetIA18_cEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 40h
mov r15, rdx
mov rbx, rsi
mov r14, rdi
lea r13, [rsp+68h+var_58]
mov [r13-10h], r13
mov rdi, rdx
call _strlen
lea rdx, [rax+r15]
mov r12, rsp
mov rdi, r12
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea r15, [rsp+68h+var_38]
mov [r15-10h], r15
mov rsi, [r12]
mov rdx, [r12+8]
add rdx, rsi
lea rdi, [rsp+68h+var_48]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
add r14, 8
mov rdi, r14
mov rsi, rbx
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixERS9_; std::map<std::string,std::string>::operator[](std::string const&)
lea rbx, [rsp+68h+var_48]
mov rdi, rax
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_9AE3E
call __ZdlPv; operator delete(void *)
loc_9AE3E:
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r13
jz short loc_9AE4C
call __ZdlPv; operator delete(void *)
loc_9AE4C:
add rsp, 40h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_18]; void *
cmp rdi, r15
jz short loc_9AE71
call __ZdlPv; operator delete(void *)
jmp short loc_9AE71
mov rbx, rax
loc_9AE71:
mov rdi, [rsp+0]; void *
cmp rdi, r13
jz short loc_9AE7F
call __ZdlPv; operator delete(void *)
loc_9AE7F:
mov rdi, rbx
call __Unwind_Resume
| void google::protobuf::compiler::cpp::Formatter::Set<char [18]>(long long a1, long long a2, _BYTE *a3)
{
long long v4; // rax
long long v5; // rax
void *v6[2]; // [rsp+0h] [rbp-68h] BYREF
_BYTE v7[16]; // [rsp+10h] [rbp-58h] BYREF
void *v8[2]; // [rsp+20h] [rbp-48h] BYREF
_BYTE v9[56]; // [rsp+30h] [rbp-38h] BYREF
v6[0] = v7;
v4 = strlen(a3);
std::string::_M_construct<char const*>((long long)v6, a3, (long long)&a3[v4]);
v8[0] = v9;
std::string::_M_construct<char *>((long long)v8, (_BYTE *)v6[0], (long long)v6[0] + (unsigned long long)v6[1]);
v5 = std::map<std::string,std::string>::operator[](a1 + 8, a2);
std::string::operator=(v5, v8);
if ( v8[0] != v9 )
operator delete(v8[0]);
if ( v6[0] != v7 )
operator delete(v6[0]);
}
| Set<char[18]>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
LEA R13,[RSP + 0x10]
MOV qword ptr [R13 + -0x10],R13
MOV RDI,RDX
CALL 0x0011f1f0
LEA RDX,[RAX + R15*0x1]
MOV R12,RSP
MOV RDI,R12
MOV RSI,R15
CALL 0x001250b2
LEA R15,[RSP + 0x30]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
ADD RDX,RSI
LAB_0019ae08:
LEA RDI,[RSP + 0x20]
CALL 0x0012586a
ADD R14,0x8
LAB_0019ae16:
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012e27c
LAB_0019ae21:
LEA RBX,[RSP + 0x20]
MOV RDI,RAX
MOV RSI,RBX
CALL 0x0011f5d0
MOV RDI,qword ptr [RBX]
CMP RDI,R15
JZ 0x0019ae3e
CALL 0x0011f4a0
LAB_0019ae3e:
MOV RDI,qword ptr [RSP]
CMP RDI,R13
JZ 0x0019ae4c
CALL 0x0011f4a0
LAB_0019ae4c:
ADD RSP,0x40
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* void google::protobuf::compiler::cpp::Formatter::Set<char [18]>(std::__cxx11::string const&, char
const (&) [18]) */
void __thiscall
google::protobuf::compiler::cpp::Formatter::Set<char[18]>
(Formatter *this,string *param_1,char *param_2)
{
size_t sVar1;
string *this_00;
int1 *local_68;
long local_60;
int1 local_58 [16];
int1 *local_48 [2];
int1 local_38 [16];
local_68 = local_58;
sVar1 = strlen(param_2);
std::__cxx11::string::_M_construct<char_const*>(&local_68,param_2,param_2 + sVar1);
/* try { // try from 0019ae08 to 0019ae11 has its CatchHandler @ 0019ae6e */
local_48[0] = local_38;
std::__cxx11::string::_M_construct<char*>(local_48,local_68,local_68 + local_60);
/* try { // try from 0019ae16 to 0019ae20 has its CatchHandler @ 0019ae5a */
this_00 = (string *)
std::
map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)(this + 8),param_1);
std::__cxx11::string::operator=(this_00,(string *)local_48);
if (local_48[0] != local_38) {
operator_delete(local_48[0]);
}
if (local_68 != local_58) {
operator_delete(local_68);
}
return;
}
|
|
5,752 | my_strnncollsp_padspace_bin | eloqsql/strings/ctype-bin.c | int my_strnncollsp_padspace_bin(const uchar *str, size_t length)
{
for ( ; length ; str++, length--)
{
if (*str < ' ')
return -1;
else if (*str > ' ')
return 1;
}
return 0;
} | O3 | c | my_strnncollsp_padspace_bin:
pushq %rbp
movq %rsp, %rbp
testq %rsi, %rsi
je 0x2f98c
xorl %eax, %eax
cmpb $0x20, (%rdi,%rax)
jb 0x2f990
jne 0x2f997
incq %rax
cmpq %rax, %rsi
jne 0x2f97c
xorl %eax, %eax
jmp 0x2f99c
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x2f99c
movl $0x1, %eax
popq %rbp
retq
| my_strnncollsp_padspace_bin:
push rbp
mov rbp, rsp
test rsi, rsi
jz short loc_2F98C
xor eax, eax
loc_2F97C:
cmp byte ptr [rdi+rax], 20h ; ' '
jb short loc_2F990
jnz short loc_2F997
inc rax
cmp rsi, rax
jnz short loc_2F97C
loc_2F98C:
xor eax, eax
jmp short loc_2F99C
loc_2F990:
mov eax, 0FFFFFFFFh
jmp short loc_2F99C
loc_2F997:
mov eax, 1
loc_2F99C:
pop rbp
retn
| long long my_strnncollsp_padspace_bin(long long a1, long long a2)
{
long long v2; // rax
if ( !a2 )
return 0LL;
v2 = 0LL;
while ( 1 )
{
if ( *(_BYTE *)(a1 + v2) < 0x20u )
return 0xFFFFFFFFLL;
if ( *(_BYTE *)(a1 + v2) != 32 )
break;
if ( a2 == ++v2 )
return 0LL;
}
return 1LL;
}
| my_strnncollsp_padspace_bin:
PUSH RBP
MOV RBP,RSP
TEST RSI,RSI
JZ 0x0012f98c
XOR EAX,EAX
LAB_0012f97c:
CMP byte ptr [RDI + RAX*0x1],0x20
JC 0x0012f990
JNZ 0x0012f997
INC RAX
CMP RSI,RAX
JNZ 0x0012f97c
LAB_0012f98c:
XOR EAX,EAX
JMP 0x0012f99c
LAB_0012f990:
MOV EAX,0xffffffff
JMP 0x0012f99c
LAB_0012f997:
MOV EAX,0x1
LAB_0012f99c:
POP RBP
RET
|
int8 my_strnncollsp_padspace_bin(long param_1,long param_2)
{
long lVar1;
if (param_2 != 0) {
lVar1 = 0;
do {
if (*(byte *)(param_1 + lVar1) < 0x20) {
return 0xffffffff;
}
if (*(byte *)(param_1 + lVar1) != 0x20) {
return 1;
}
lVar1 = lVar1 + 1;
} while (param_2 != lVar1);
}
return 0;
}
|
|
5,753 | mariadb_uncompress | eloqsql/libmariadb/libmariadb/ma_compress.c | my_bool _mariadb_uncompress (NET *net, unsigned char *packet, size_t *len, size_t *complen)
{
if (*complen) /* If compressed */
{
unsigned char *compbuf = (unsigned char *) malloc (*complen);
if (!compbuf)
return 1; /* Not enough memory */
if (compression_plugin(net)->decompress(compression_ctx(net), compbuf, complen, packet, len))
{ /* Probably wrong packet */
free(compbuf);
return 1;
}
*len = *complen;
memcpy(packet,compbuf,*len);
free(compbuf);
}
else *complen= *len;
return 0;
} | O0 | c | mariadb_uncompress:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0x89dfa
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x60aa0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x89d86
movb $0x1, -0x1(%rbp)
jmp 0x89e0c
movq -0x10(%rbp), %rax
movq 0x2a0(%rax), %rax
movq 0x10(%rax), %rax
movq 0x70(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x2a0(%rcx), %rcx
movq 0x8(%rcx), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
callq *%rax
cmpb $0x0, %al
je 0x89dcd
movq -0x30(%rbp), %rdi
callq 0x601e0
movb $0x1, -0x1(%rbp)
jmp 0x89e0c
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
callq 0x600e0
movq -0x30(%rbp), %rdi
callq 0x601e0
jmp 0x89e08
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _mariadb_uncompress:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0
jz loc_89DFA
mov rax, [rbp+var_28]
mov rdi, [rax]
call _malloc
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_89D86
mov [rbp+var_1], 1
jmp loc_89E0C
loc_89D86:
mov rax, [rbp+var_10]
mov rax, [rax+2A0h]
mov rax, [rax+10h]
mov rax, [rax+70h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+2A0h]
mov rdi, [rcx+8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_20]
call rax
cmp al, 0
jz short loc_89DCD
mov rdi, [rbp+var_30]
call _free
mov [rbp+var_1], 1
jmp short loc_89E0C
loc_89DCD:
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_30]
mov rax, [rbp+var_20]
mov rdx, [rax]
call _memcpy
mov rdi, [rbp+var_30]
call _free
jmp short loc_89E08
loc_89DFA:
mov rax, [rbp+var_20]
mov rcx, [rax]
mov rax, [rbp+var_28]
mov [rax], rcx
loc_89E08:
mov [rbp+var_1], 0
loc_89E0C:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char mariadb_uncompress(long long a1, long long a2, _QWORD *a3, _QWORD *a4)
{
long long v5; // [rsp+0h] [rbp-30h]
if ( !*a4 )
{
*a4 = *a3;
return 0;
}
v5 = malloc(*a4);
if ( v5 )
{
if ( (*(unsigned __int8 ( **)(_QWORD, long long, _QWORD *, long long, _QWORD *))(*(_QWORD *)(*(_QWORD *)(a1 + 672) + 16LL)
+ 112LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 672) + 8LL),
v5,
a4,
a2,
a3) )
{
free(v5);
return 1;
}
*a3 = *a4;
memcpy(a2, v5, *a3);
free(v5);
return 0;
}
return 1;
}
| _mariadb_uncompress:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],0x0
JZ 0x00189dfa
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX]
CALL 0x00160aa0
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00189d86
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00189e0c
LAB_00189d86:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x2a0]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x2a0]
MOV RDI,qword ptr [RCX + 0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x20]
CALL RAX
CMP AL,0x0
JZ 0x00189dcd
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001601e0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00189e0c
LAB_00189dcd:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX]
CALL 0x001600e0
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001601e0
JMP 0x00189e08
LAB_00189dfa:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
LAB_00189e08:
MOV byte ptr [RBP + -0x1],0x0
LAB_00189e0c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 _mariadb_uncompress(long param_1,void *param_2,size_t *param_3,size_t *param_4)
{
char cVar1;
void *__src;
if (*param_4 == 0) {
*param_4 = *param_3;
}
else {
__src = malloc(*param_4);
if (__src == (void *)0x0) {
return 1;
}
cVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x2a0) + 0x10) + 0x70))
(*(int8 *)(*(long *)(param_1 + 0x2a0) + 8),__src,param_4,param_2,param_3
);
if (cVar1 != '\0') {
free(__src);
return 1;
}
*param_3 = *param_4;
memcpy(param_2,__src,*param_3);
free(__src);
}
return 0;
}
|
|
5,754 | mariadb_uncompress | eloqsql/libmariadb/libmariadb/ma_compress.c | my_bool _mariadb_uncompress (NET *net, unsigned char *packet, size_t *len, size_t *complen)
{
if (*complen) /* If compressed */
{
unsigned char *compbuf = (unsigned char *) malloc (*complen);
if (!compbuf)
return 1; /* Not enough memory */
if (compression_plugin(net)->decompress(compression_ctx(net), compbuf, complen, packet, len))
{ /* Probably wrong packet */
free(compbuf);
return 1;
}
*len = *complen;
memcpy(packet,compbuf,*len);
free(compbuf);
}
else *complen= *len;
return 0;
} | O3 | c | mariadb_uncompress:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, -0x30(%rbp)
movq %rdi, %r12
movq (%rcx), %rdi
testq %rdi, %rdi
je 0x7b87c
callq 0x5faf0
movb $0x1, %bl
testq %rax, %rax
je 0x7b89f
movq %rax, %r13
movq 0x2a0(%r12), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rax
movq %r13, %rsi
movq %r14, %rdx
movq -0x30(%rbp), %r12
movq %r12, %rcx
movq %r15, %r8
callq *0x70(%rax)
testb %al, %al
je 0x7b884
movq %r13, %rdi
callq 0x5f1d0
jmp 0x7b89f
movq (%r15), %rax
movq %rax, (%r14)
jmp 0x7b89d
movq (%r14), %rdx
movq %rdx, (%r15)
movq %r12, %rdi
movq %r13, %rsi
callq 0x5f0e0
movq %r13, %rdi
callq 0x5f1d0
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mariadb_uncompress:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rcx
mov r15, rdx
mov [rbp+var_30], rsi
mov r12, rdi
mov rdi, [rcx]
test rdi, rdi
jz short loc_7B87C
call _malloc
mov bl, 1
test rax, rax
jz short loc_7B89F
mov r13, rax
mov rax, [r12+2A0h]
mov rdi, [rax+8]
mov rax, [rax+10h]
mov rsi, r13
mov rdx, r14
mov r12, [rbp+var_30]
mov rcx, r12
mov r8, r15
call qword ptr [rax+70h]
test al, al
jz short loc_7B884
mov rdi, r13
call _free
jmp short loc_7B89F
loc_7B87C:
mov rax, [r15]
mov [r14], rax
jmp short loc_7B89D
loc_7B884:
mov rdx, [r14]
mov [r15], rdx
mov rdi, r12
mov rsi, r13
call _memcpy
mov rdi, r13
call _free
loc_7B89D:
xor ebx, ebx
loc_7B89F:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mariadb_uncompress(long long a1, long long a2, _QWORD *a3, _QWORD *a4)
{
unsigned int v4; // ebx
long long v7; // rax
long long v8; // r13
long long v9; // rdx
if ( !*a4 )
{
*a4 = *a3;
return 0;
}
v7 = malloc(*a4);
LOBYTE(v4) = 1;
if ( v7 )
{
v8 = v7;
if ( (*(unsigned __int8 ( **)(_QWORD, long long, _QWORD *, long long, _QWORD *))(*(_QWORD *)(*(_QWORD *)(a1 + 672) + 16LL)
+ 112LL))(
*(_QWORD *)(*(_QWORD *)(a1 + 672) + 8LL),
v7,
a4,
a2,
a3) )
{
free(v8);
return v4;
}
v9 = *a4;
*a3 = *a4;
memcpy(a2, v8, v9);
free(v8);
return 0;
}
return v4;
}
| _mariadb_uncompress:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV R15,RDX
MOV qword ptr [RBP + -0x30],RSI
MOV R12,RDI
MOV RDI,qword ptr [RCX]
TEST RDI,RDI
JZ 0x0017b87c
CALL 0x0015faf0
MOV BL,0x1
TEST RAX,RAX
JZ 0x0017b89f
MOV R13,RAX
MOV RAX,qword ptr [R12 + 0x2a0]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RSI,R13
MOV RDX,R14
MOV R12,qword ptr [RBP + -0x30]
MOV RCX,R12
MOV R8,R15
CALL qword ptr [RAX + 0x70]
TEST AL,AL
JZ 0x0017b884
MOV RDI,R13
CALL 0x0015f1d0
JMP 0x0017b89f
LAB_0017b87c:
MOV RAX,qword ptr [R15]
MOV qword ptr [R14],RAX
JMP 0x0017b89d
LAB_0017b884:
MOV RDX,qword ptr [R14]
MOV qword ptr [R15],RDX
MOV RDI,R12
MOV RSI,R13
CALL 0x0015f0e0
MOV RDI,R13
CALL 0x0015f1d0
LAB_0017b89d:
XOR EBX,EBX
LAB_0017b89f:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong _mariadb_uncompress(long param_1,void *param_2,size_t *param_3,size_t *param_4)
{
size_t __n;
char cVar1;
void *__src;
int8 unaff_RBX;
ulong uVar2;
if (*param_4 == 0) {
*param_4 = *param_3;
}
else {
__src = malloc(*param_4);
uVar2 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if (__src == (void *)0x0) goto LAB_0017b89f;
cVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x2a0) + 0x10) + 0x70))
(*(int8 *)(*(long *)(param_1 + 0x2a0) + 8),__src,param_4,param_2,param_3
);
if (cVar1 != '\0') {
free(__src);
goto LAB_0017b89f;
}
__n = *param_4;
*param_3 = __n;
memcpy(param_2,__src,__n);
free(__src);
}
uVar2 = 0;
LAB_0017b89f:
return uVar2 & 0xffffffff;
}
|
|
5,755 | change_partitioned_key_cache_param | eloqsql/mysys/mf_keycache.c | static
void change_partitioned_key_cache_param(PARTITIONED_KEY_CACHE_CB *keycache,
uint division_limit,
uint age_threshold)
{
uint i;
uint partitions= keycache->partitions;
DBUG_ENTER("partitioned_change_key_cache_param");
for (i= 0; i < partitions; i++)
{
change_simple_key_cache_param(keycache->partition_array[i], division_limit,
age_threshold);
}
DBUG_VOID_RETURN;
} | O0 | c | change_partitioned_key_cache_param:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0xe80a0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0xe6070
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe8073
jmp 0xe80a2
jmp 0xe80a4
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| change_partitioned_key_cache_param:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov rax, [rbp+var_8]
mov eax, [rax+1Ch]
mov [rbp+var_18], eax
mov [rbp+var_14], 0
loc_E8073:
mov eax, [rbp+var_14]
cmp eax, [rbp+var_18]
jnb short loc_E80A0
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov ecx, [rbp+var_14]
mov rdi, [rax+rcx*8]
mov esi, [rbp+var_C]
mov edx, [rbp+var_10]
call change_simple_key_cache_param
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_E8073
loc_E80A0:
jmp short $+2
loc_E80A2:
jmp short $+2
loc_E80A4:
add rsp, 20h
pop rbp
retn
| long long change_partitioned_key_cache_param(long long a1, int a2, int a3)
{
long long result; // rax
unsigned int v4; // [rsp+8h] [rbp-18h]
unsigned int i; // [rsp+Ch] [rbp-14h]
v4 = *(_DWORD *)(a1 + 28);
for ( i = 0; ; ++i )
{
result = i;
if ( i >= v4 )
break;
change_simple_key_cache_param(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * i), a2, a3);
}
return result;
}
| change_partitioned_key_cache_param:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x18],EAX
MOV dword ptr [RBP + -0x14],0x0
LAB_001e8073:
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x18]
JNC 0x001e80a0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x14]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV EDX,dword ptr [RBP + -0x10]
CALL 0x001e6070
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001e8073
LAB_001e80a0:
JMP 0x001e80a2
LAB_001e80a2:
JMP 0x001e80a4
LAB_001e80a4:
ADD RSP,0x20
POP RBP
RET
|
void change_partitioned_key_cache_param(long param_1,int4 param_2,int4 param_3)
{
uint uVar1;
int4 local_1c;
uVar1 = *(uint *)(param_1 + 0x1c);
for (local_1c = 0; local_1c < uVar1; local_1c = local_1c + 1) {
change_simple_key_cache_param
(*(int8 *)(*(long *)(param_1 + 8) + (ulong)local_1c * 8),param_2,param_3);
}
return;
}
|
|
5,756 | minja::Parser::unterminated(minja::TemplateToken const&) const | monkey531[P]llama/common/minja.hpp | std::runtime_error unterminated(const TemplateToken & token) const {
return std::runtime_error("Unterminated " + TemplateToken::typeToString(token.type)
+ error_location_suffix(*template_str, token.location.pos));
} | O1 | cpp | minja::Parser::unterminated(minja::TemplateToken const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdx), %esi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x5d844
leaq 0x50a72(%rip), %rcx # 0xad7ce
movl $0xd, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x18750
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5cd96
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x5cd9e
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r15), %rsi
movq 0x20(%r14), %rdx
leaq 0x48(%rsp), %rdi
callq 0x23408
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x5cde9
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x5ce08
leaq 0x58(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x5ce03
movq 0x58(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x5ce19
movq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x181d0
jmp 0x5ce27
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x18750
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x5ce4b
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x5ce51
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x18a80
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ce96
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ceb1
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x5cec8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5cee3
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5cf18
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x5cf18
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5cf38
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x5cf38
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x5cf54
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x5cf54
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5cf6f
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rdi
callq 0x18ba0
nop
| _ZNK5minja6Parser12unterminatedERKNS_13TemplateTokenE:
push r15; int
push r14; int
push r12; int
push rbx; int
sub rsp, 88h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov esi, [rdx+8]
lea r12, [rsp+0A8h+var_40]
mov rdi, r12
call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type)
lea rcx, aUnterminated; "Unterminated "
mov r8d, 0Dh
mov rdi, r12
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r12, [rsp+0A8h+var_70]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h; int
cmp rdx, rcx
jz short loc_5CD96
mov [rsp+0A8h+var_80], rdx
mov rdx, [rcx]
mov [rsp+0A8h+var_70], rdx
jmp short loc_5CD9E
loc_5CD96:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_5CD9E:
mov rdx, [rax+8]
mov qword ptr [rsp+0A8h+var_78], rdx; int
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, [r15]; int
mov rdx, [r14+20h]; int
lea rdi, [rsp+0A8h+var_60]; int
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
mov rcx, [rsp+0A8h+var_80]
mov r8, qword ptr [rsp+0A8h+var_78]
mov rdx, [rsp+0A8h+var_58]
lea rax, [rdx+r8]
mov esi, 0Fh
cmp rcx, r12
jz short loc_5CDE9
mov rsi, [rsp+0A8h+var_70]
loc_5CDE9:
cmp rax, rsi
jbe short loc_5CE08
lea rdi, [rsp+0A8h+var_50]
mov esi, 0Fh
cmp [rdi-10h], rdi
jz short loc_5CE03
mov rsi, [rsp+0A8h+var_50]
loc_5CE03:
cmp rax, rsi
jbe short loc_5CE19
loc_5CE08:
mov rsi, qword ptr [rsp+0A8h+var_60]
lea rdi, [rsp+0A8h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_5CE27
loc_5CE19:
lea rdi, [rsp+0A8h+var_60]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_5CE27:
lea rdx, [rsp+0A8h+var_90]
mov [rdx-10h], rdx
mov rsi, [rax]
lea rcx, [rax+10h]
cmp rsi, rcx
jz short loc_5CE4B
mov [rsp+0A8h+var_A0], rsi
mov rdx, [rcx]
mov [rsp+0A8h+var_90], rdx
jmp short loc_5CE51
loc_5CE4B:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_5CE51:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+0A8h+var_98], rsi
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
lea rsi, [rsp+0A8h+var_A0]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rax, [rsp+0A8h+var_90]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5CE96
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5CE96:
lea rax, [rsp+0A8h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5CEB1
mov rsi, [rsp+0A8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5CEB1:
mov rdi, [rsp+0A8h+var_80]; void *
cmp rdi, r12
jz short loc_5CEC8
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5CEC8:
lea rax, [rsp+0A8h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5CEE3
mov rsi, [rsp+0A8h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5CEE3:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5CF18
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5CF18
mov rbx, rax
loc_5CF18:
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5CF38
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5CF38
mov rbx, rax
loc_5CF38:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_5CF54
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5CF54
mov rbx, rax
loc_5CF54:
lea rax, [rsp+arg_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5CF6F
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5CF6F:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::unterminated(minja::Parser *this, long long **a2, long long a3)
{
long long v4; // rax
__int128 *v5; // rcx
unsigned long long v6; // rax
unsigned long long v7; // rsi
unsigned long long v8; // rsi
void **v9; // rax
__int128 *v10; // rcx
void *v12[2]; // [rsp+8h] [rbp-A0h] BYREF
__int128 v13; // [rsp+18h] [rbp-90h] BYREF
void *v14; // [rsp+28h] [rbp-80h] BYREF
int v15[2]; // [rsp+30h] [rbp-78h]
__int128 v16; // [rsp+38h] [rbp-70h] BYREF
int v17[2]; // [rsp+48h] [rbp-60h] BYREF
long long v18; // [rsp+50h] [rbp-58h]
_QWORD v19[2]; // [rsp+58h] [rbp-50h] BYREF
void *v20[2]; // [rsp+68h] [rbp-40h] BYREF
long long v21; // [rsp+78h] [rbp-30h] BYREF
minja::TemplateToken::typeToString[abi:cxx11](v20, *(unsigned int *)(a3 + 8));
v4 = std::string::replace(v20, 0LL, 0LL, "Unterminated ", 13LL);
v14 = &v16;
v5 = (__int128 *)(v4 + 16);
if ( *(_QWORD *)v4 == v4 + 16 )
{
v16 = *v5;
}
else
{
v14 = *(void **)v4;
*(_QWORD *)&v16 = *(_QWORD *)v5;
}
*(_QWORD *)v15 = *(_QWORD *)(v4 + 8);
*(_QWORD *)v4 = v5;
*(_QWORD *)(v4 + 8) = 0LL;
*(_BYTE *)(v4 + 16) = 0;
minja::error_location_suffix((long long)v17, *a2, *(_QWORD *)(a3 + 32));
v6 = v18 + *(_QWORD *)v15;
v7 = 15LL;
if ( v14 != &v16 )
v7 = v16;
if ( v6 <= v7 )
goto LABEL_10;
v8 = 15LL;
if ( *(_QWORD **)v17 != v19 )
v8 = v19[0];
if ( v6 <= v8 )
v9 = (void **)std::string::replace(v17, 0LL, 0LL, v14, *(_QWORD *)v15);
else
LABEL_10:
v9 = (void **)std::string::_M_append(&v14, *(_QWORD *)v17);
v12[0] = &v13;
v10 = (__int128 *)(v9 + 2);
if ( *v9 == v9 + 2 )
{
v13 = *v10;
}
else
{
v12[0] = *v9;
*(_QWORD *)&v13 = *(_QWORD *)v10;
}
v12[1] = v9[1];
*v9 = v10;
v9[1] = 0LL;
*(_BYTE *)v10 = 0;
std::runtime_error::runtime_error(this, v12);
if ( v12[0] != &v13 )
operator delete(v12[0], v13 + 1);
if ( *(_QWORD **)v17 != v19 )
operator delete(*(void **)v17, v19[0] + 1LL);
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
if ( v20[0] != &v21 )
operator delete(v20[0], v21 + 1);
return this;
}
| unterminated:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RDX + 0x8]
LEA R12,[RSP + 0x68]
MOV RDI,R12
CALL 0x0015d844
LAB_0015cd55:
LEA RCX,[0x1ad7ce]
MOV R8D,0xd
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00118750
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0015cd96
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x0015cd9e
LAB_0015cd96:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_0015cd9e:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R14 + 0x20]
LAB_0015cdbd:
LEA RDI,[RSP + 0x48]
CALL 0x00123408
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x50]
LEA RAX,[RDX + R8*0x1]
MOV ESI,0xf
CMP RCX,R12
JZ 0x0015cde9
MOV RSI,qword ptr [RSP + 0x38]
LAB_0015cde9:
CMP RAX,RSI
JBE 0x0015ce08
LEA RDI,[RSP + 0x58]
MOV ESI,0xf
CMP qword ptr [RDI + -0x10],RDI
JZ 0x0015ce03
MOV RSI,qword ptr [RSP + 0x58]
LAB_0015ce03:
CMP RAX,RSI
JBE 0x0015ce19
LAB_0015ce08:
MOV RSI,qword ptr [RSP + 0x48]
LAB_0015ce0d:
LEA RDI,[RSP + 0x28]
CALL 0x001181d0
JMP 0x0015ce27
LAB_0015ce19:
LEA RDI,[RSP + 0x48]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00118750
LAB_0015ce27:
LEA RDX,[RSP + 0x18]
MOV qword ptr [RDX + -0x10],RDX
MOV RSI,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RSI,RCX
JZ 0x0015ce4b
MOV qword ptr [RSP + 0x8],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x0015ce51
LAB_0015ce4b:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0015ce51:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LAB_0015ce6e:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00118a80
LAB_0015ce7b:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015ce96
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186a0
LAB_0015ce96:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015ceb1
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001186a0
LAB_0015ceb1:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x0015cec8
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001186a0
LAB_0015cec8:
LEA RAX,[RSP + 0x78]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015cee3
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x001186a0
LAB_0015cee3:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Parser::unterminated(minja::TemplateToken const&) const */
TemplateToken * minja::Parser::unterminated(TemplateToken *param_1)
{
long *plVar1;
int8 *puVar2;
ulong *puVar3;
long in_RDX;
int8 *in_RSI;
ulong uVar4;
long *local_a0;
int8 local_98;
long local_90;
int8 uStack_88;
ulong *local_80;
long local_78;
ulong local_70;
long lStack_68;
ulong *local_60;
long local_58;
ulong local_50 [2];
long *local_40 [2];
long local_30 [2];
TemplateToken::typeToString_abi_cxx11_((TemplateToken *)local_40);
/* try { // try from 0015cd55 to 0015cd6d has its CatchHandler @ 0015cf51 */
plVar1 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,0x1ad7ce);
puVar3 = (ulong *)(plVar1 + 2);
if ((ulong *)*plVar1 == puVar3) {
local_70 = *puVar3;
lStack_68 = plVar1[3];
local_80 = &local_70;
}
else {
local_70 = *puVar3;
local_80 = (ulong *)*plVar1;
}
local_78 = plVar1[1];
*plVar1 = (long)puVar3;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 0015cdbd to 0015cdc6 has its CatchHandler @ 0015cf35 */
error_location_suffix((minja *)&local_60,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20));
uVar4 = 0xf;
if (local_80 != &local_70) {
uVar4 = local_70;
}
if (uVar4 < (ulong)(local_58 + local_78)) {
uVar4 = 0xf;
if (local_60 != local_50) {
uVar4 = local_50[0];
}
if ((ulong)(local_58 + local_78) <= uVar4) {
puVar2 = (int8 *)
std::__cxx11::string::replace((ulong)&local_60,0,(char *)0x0,(ulong)local_80);
goto LAB_0015ce27;
}
}
/* try { // try from 0015ce0d to 0015ce26 has its CatchHandler @ 0015cf15 */
puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_80,(ulong)local_60);
LAB_0015ce27:
local_a0 = &local_90;
plVar1 = puVar2 + 2;
if ((long *)*puVar2 == plVar1) {
local_90 = *plVar1;
uStack_88 = puVar2[3];
}
else {
local_90 = *plVar1;
local_a0 = (long *)*puVar2;
}
local_98 = puVar2[1];
*puVar2 = plVar1;
puVar2[1] = 0;
*(int1 *)plVar1 = 0;
/* try { // try from 0015ce6e to 0015ce7a has its CatchHandler @ 0015cef5 */
std::runtime_error::runtime_error((runtime_error *)param_1,(string *)&local_a0);
if (local_a0 != &local_90) {
operator_delete(local_a0,local_90 + 1);
}
if (local_60 != local_50) {
operator_delete(local_60,local_50[0] + 1);
}
if (local_80 != &local_70) {
operator_delete(local_80,local_70 + 1);
}
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return param_1;
}
|
|
5,757 | nglog::GetExistingTempDirectories(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&) | ng-log[P]ng-log/src/logging.cc | NGLOG_NO_EXPORT
void GetExistingTempDirectories(vector<string>& list) {
GetTempDirectories(list);
auto i_dir = list.begin();
while (i_dir != list.end()) {
// zero arg to access means test for existence; no constant
// defined on windows
if (access(i_dir->c_str(), 0)) {
i_dir = list.erase(i_dir);
} else {
++i_dir;
}
}
} | O0 | cpp | nglog::GetExistingTempDirectories(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x11d00
movq -0x8(%rbp), %rdi
callq 0x19070
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x190e0
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x190a0
testb $0x1, %al
jne 0x11f22
jmp 0x11f7d
leaq -0x10(%rbp), %rdi
callq 0x19110
movq %rax, %rdi
callq 0x92b0
movq %rax, %rdi
xorl %esi, %esi
callq 0x9c30
cmpl $0x0, %eax
je 0x11f72
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x191a0
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x19130
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x11f7b
leaq -0x10(%rbp), %rdi
callq 0x191e0
jmp 0x11f02
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN5nglog26GetExistingTempDirectoriesERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call _ZN5nglogL18GetTempDirectoriesERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE; nglog::GetTempDirectories(std::vector<std::string> &)
mov rdi, [rbp+var_8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov [rbp+var_10], rax
loc_11F02:
mov rdi, [rbp+var_8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rbp+var_18], rax
lea rdi, [rbp+var_10]
lea rsi, [rbp+var_18]
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_11F22
jmp short loc_11F7D
loc_11F22:
lea rdi, [rbp+var_10]
call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEptEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator->(void)
mov rdi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, rax
xor esi, esi
call _access
cmp eax, 0
jz short loc_11F72
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
lea rdi, [rbp+var_28]
lea rsi, [rbp+var_10]
call _ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEC2IPS6_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISF_SE_EE7__valueESB_E6__typeEEE
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_28]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS5_S7_EE; std::vector<std::string>::erase(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>)
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov [rbp+var_10], rax
jmp short loc_11F7B
loc_11F72:
lea rdi, [rbp+var_10]
call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void)
loc_11F7B:
jmp short loc_11F02
loc_11F7D:
add rsp, 30h
pop rbp
retn
| long long nglog::GetExistingTempDirectories(long long a1)
{
long long result; // rax
long long v2; // rax
long long v3; // rax
long long v4; // [rsp+0h] [rbp-30h]
long long v5; // [rsp+8h] [rbp-28h] BYREF
long long v6; // [rsp+10h] [rbp-20h]
long long v7; // [rsp+18h] [rbp-18h] BYREF
long long v8; // [rsp+20h] [rbp-10h] BYREF
long long v9; // [rsp+28h] [rbp-8h]
v9 = a1;
nglog::GetTempDirectories(a1);
v8 = std::vector<std::string>::begin(a1);
while ( 1 )
{
v7 = std::vector<std::string>::end(v9);
result = __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(&v8, &v7);
if ( (result & 1) == 0 )
break;
v2 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator->(&v8);
v3 = std::string::c_str(v2);
if ( (unsigned int)access(v3, 0LL) )
{
v4 = v9;
__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::__normal_iterator<std::string*>(
&v5,
&v8);
v6 = std::vector<std::string>::erase(v4, v5);
v8 = v6;
}
else
{
__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(&v8);
}
}
return result;
}
| GetExistingTempDirectories:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00111d00
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00119070
MOV qword ptr [RBP + -0x10],RAX
LAB_00111f02:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001190e0
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[RBP + -0x10]
LEA RSI,[RBP + -0x18]
CALL 0x001190a0
TEST AL,0x1
JNZ 0x00111f22
JMP 0x00111f7d
LAB_00111f22:
LEA RDI,[RBP + -0x10]
CALL 0x00119110
MOV RDI,RAX
CALL 0x001092b0
MOV RDI,RAX
XOR ESI,ESI
CALL 0x00109c30
CMP EAX,0x0
JZ 0x00111f72
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[RBP + -0x28]
LEA RSI,[RBP + -0x10]
CALL 0x001191a0
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00119130
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00111f7b
LAB_00111f72:
LEA RDI,[RBP + -0x10]
CALL 0x001191e0
LAB_00111f7b:
JMP 0x00111f02
LAB_00111f7d:
ADD RSP,0x30
POP RBP
RET
|
/* nglog::GetExistingTempDirectories(std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > >&) */
void nglog::GetExistingTempDirectories(vector *param_1)
{
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar1;
bool bVar2;
int iVar3;
char *__name;
int8 local_30;
int8 local_28;
int8 local_20;
int8 local_18;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_10;
local_10 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1;
GetTempDirectories(param_1);
local_18 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_10)
;
while( true ) {
local_20 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_10)
;
bVar2 = __gnu_cxx::operator!=((__normal_iterator *)&local_18,(__normal_iterator *)&local_20);
if (!bVar2) break;
__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_18);
__name = (char *)std::__cxx11::string::c_str();
iVar3 = access(__name,0);
pvVar1 = local_10;
if (iVar3 == 0) {
__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_18);
}
else {
__gnu_cxx::
__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::__normal_iterator<std::__cxx11::string*>
((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_30,(__normal_iterator *)&local_18);
local_28 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::erase
(pvVar1,local_30);
local_18 = local_28;
}
}
return;
}
|
|
5,758 | ma_keydef_write | eloqsql/storage/maria/ma_open.c | my_bool _ma_keydef_write(File file, MARIA_KEYDEF *keydef)
{
uchar buff[MARIA_KEYDEF_SIZE];
uchar *ptr=buff;
*ptr++= (uchar) keydef->keysegs;
*ptr++= keydef->key_alg; /* Rtree or Btree */
mi_int2store(ptr,keydef->flag); ptr+= 2;
mi_int2store(ptr,keydef->block_length); ptr+= 2;
mi_int2store(ptr,keydef->keylength); ptr+= 2;
mi_int2store(ptr,keydef->minlength); ptr+= 2;
mi_int2store(ptr,keydef->maxlength); ptr+= 2;
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
} | O3 | c | ma_keydef_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movb 0xa0(%rsi), %al
movb %al, -0x24(%rbp)
movb 0xa4(%rsi), %al
movb %al, -0x23(%rbp)
movzwl 0xa2(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x22(%rbp)
movzwl 0xa6(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x20(%rbp)
movzwl 0xaa(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x1e(%rbp)
movzwl 0xac(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x1c(%rbp)
movzwl 0xae(%rsi), %eax
rolw $0x8, %ax
movl %edi, %ebx
movw %ax, -0x1a(%rbp)
leaq 0x31b190(%rip), %rax # 0x388010
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x6cecc
leaq -0x24(%rbp), %rsi
movl $0xc, %edx
movl $0x4, %ecx
movl %ebx, %edi
callq 0x2eff4
testq %rax, %rax
setne %al
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x6cee6
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x24(%rbp), %rdx
leaq -0x30(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x2d2e5
movq (%r14), %rax
jmp 0x6ceae
callq 0x29250
| _ma_keydef_write:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 70h
mov rax, fs:28h
mov [rbp+var_18], rax
mov al, [rsi+0A0h]
mov [rbp+var_24], al
mov al, [rsi+0A4h]
mov [rbp+var_23], al
movzx eax, word ptr [rsi+0A2h]
rol ax, 8
mov [rbp+var_22], ax
movzx eax, word ptr [rsi+0A6h]
rol ax, 8
mov [rbp+var_20], ax
movzx eax, word ptr [rsi+0AAh]
rol ax, 8
mov [rbp+var_1E], ax
movzx eax, word ptr [rsi+0ACh]
rol ax, 8
mov [rbp+var_1C], ax
movzx eax, word ptr [rsi+0AEh]
rol ax, 8
mov ebx, edi
mov [rbp+var_1A], ax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_6CECC
lea rsi, [rbp+var_24]
mov edx, 0Ch
mov ecx, 4
mov edi, ebx
call my_write
loc_6CEAE:
test rax, rax
setnz al
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_6CEE6
add rsp, 70h
pop rbx
pop r14
pop rbp
retn
loc_6CECC:
lea rdx, [rbp+var_24]
lea r14, [rbp+var_30]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call _ma_keydef_write_cold_1
mov rax, [r14]
jmp short loc_6CEAE
loc_6CEE6:
call ___stack_chk_fail
| bool ma_keydef_write(unsigned int a1, long long a2)
{
long long v2; // rax
long long v3; // rax
_BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF
long long v6; // [rsp+50h] [rbp-30h] BYREF
_BYTE v7[2]; // [rsp+5Ch] [rbp-24h] BYREF
__int16 v8; // [rsp+5Eh] [rbp-22h]
__int16 v9; // [rsp+60h] [rbp-20h]
__int16 v10; // [rsp+62h] [rbp-1Eh]
__int16 v11; // [rsp+64h] [rbp-1Ch]
__int16 v12; // [rsp+66h] [rbp-1Ah]
unsigned long long v13; // [rsp+68h] [rbp-18h]
v13 = __readfsqword(0x28u);
v7[0] = *(_BYTE *)(a2 + 160);
v7[1] = *(_BYTE *)(a2 + 164);
v8 = __ROL2__(*(_WORD *)(a2 + 162), 8);
v9 = __ROL2__(*(_WORD *)(a2 + 166), 8);
v10 = __ROL2__(*(_WORD *)(a2 + 170), 8);
v11 = __ROL2__(*(_WORD *)(a2 + 172), 8);
v12 = __ROL2__(*(_WORD *)(a2 + 174), 8);
v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a1, 7LL);
if ( v2 )
{
ma_keydef_write_cold_1(v2, a1, (long long)v7, &v6);
v3 = v6;
}
else
{
v3 = my_write(a1, (long long)v7, 12LL, 4LL);
}
return v3 != 0;
}
| _ma_keydef_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV AL,byte ptr [RSI + 0xa0]
MOV byte ptr [RBP + -0x24],AL
MOV AL,byte ptr [RSI + 0xa4]
MOV byte ptr [RBP + -0x23],AL
MOVZX EAX,word ptr [RSI + 0xa2]
ROL AX,0x8
MOV word ptr [RBP + -0x22],AX
MOVZX EAX,word ptr [RSI + 0xa6]
ROL AX,0x8
MOV word ptr [RBP + -0x20],AX
MOVZX EAX,word ptr [RSI + 0xaa]
ROL AX,0x8
MOV word ptr [RBP + -0x1e],AX
MOVZX EAX,word ptr [RSI + 0xac]
ROL AX,0x8
MOV word ptr [RBP + -0x1c],AX
MOVZX EAX,word ptr [RSI + 0xae]
ROL AX,0x8
MOV EBX,EDI
MOV word ptr [RBP + -0x1a],AX
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0016cecc
LEA RSI,[RBP + -0x24]
MOV EDX,0xc
MOV ECX,0x4
MOV EDI,EBX
CALL 0x0012eff4
LAB_0016ceae:
TEST RAX,RAX
SETNZ AL
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x0016cee6
ADD RSP,0x70
POP RBX
POP R14
POP RBP
RET
LAB_0016cecc:
LEA RDX,[RBP + -0x24]
LEA R14,[RBP + -0x30]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x0012d2e5
MOV RAX,qword ptr [R14]
JMP 0x0016ceae
LAB_0016cee6:
CALL 0x00129250
|
bool _ma_keydef_write(int4 param_1,long param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_80 [72];
long local_38;
int1 local_2c;
int1 local_2b;
ushort local_2a;
ushort local_28;
ushort local_26;
ushort local_24;
ushort local_22;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_2c = *(int1 *)(param_2 + 0xa0);
local_2b = *(int1 *)(param_2 + 0xa4);
local_2a = *(ushort *)(param_2 + 0xa2) << 8 | *(ushort *)(param_2 + 0xa2) >> 8;
local_28 = *(ushort *)(param_2 + 0xa6) << 8 | *(ushort *)(param_2 + 0xa6) >> 8;
local_26 = *(ushort *)(param_2 + 0xaa) << 8 | *(ushort *)(param_2 + 0xaa) >> 8;
local_24 = *(ushort *)(param_2 + 0xac) << 8 | *(ushort *)(param_2 + 0xac) >> 8;
local_22 = *(ushort *)(param_2 + 0xae) << 8 | *(ushort *)(param_2 + 0xae) >> 8;
lVar1 = (**(code **)(PSI_server + 0x158))(local_80,param_1,7);
if (lVar1 == 0) {
local_38 = my_write(param_1,&local_2c,0xc,4);
}
else {
_ma_keydef_write_cold_1(lVar1,param_1,&local_2c,&local_38);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return local_38 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
5,759 | read_long_data | eloqsql/storage/maria/ma_blockrec.c | static inline my_bool read_long_data(MARIA_HA *info, uchar *to, ulong length,
MARIA_EXTENT_CURSOR *extent,
uchar **data, uchar **end_of_data)
{
uint left_length= (uint) (*end_of_data - *data);
if (likely(left_length >= length))
{
memcpy(to, *data, length);
(*data)+= length;
return 0;
}
return read_long_data2(info, to, length, extent, data, end_of_data);
} | O0 | c | read_long_data:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpq -0x20(%rbp), %rax
setae %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x794ee
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x2a0b0
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
jmp 0x7950e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
callq 0x81720
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| read_long_data:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_38]
mov rax, [rax]
mov rcx, [rbp+var_30]
mov rcx, [rcx]
sub rax, rcx
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
cmp rax, [rbp+var_20]
setnb al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_794EE
mov rdi, [rbp+var_18]
mov rax, [rbp+var_30]
mov rsi, [rax]
mov rdx, [rbp+var_20]
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_30]
add rcx, [rax]
mov [rax], rcx
mov [rbp+var_1], 0
jmp short loc_7950E
loc_794EE:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9, [rbp+var_38]
call read_long_data2
mov [rbp+var_1], al
loc_7950E:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char read_long_data(long long a1, long long a2, unsigned long long a3, long long a4, _QWORD *a5, _QWORD *a6)
{
if ( (unsigned int)*a6 - (unsigned int)*a5 < a3 )
return read_long_data2(a1, a2, a3, a4, a5, a6);
memcpy(a2, *a5, a3);
*a5 += a3;
return 0;
}
| read_long_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX]
SUB RAX,RCX
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
CMP RAX,qword ptr [RBP + -0x20]
SETNC AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001794ee
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0012a0b0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0017950e
LAB_001794ee:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x38]
CALL 0x00181720
MOV byte ptr [RBP + -0x1],AL
LAB_0017950e:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
read_long_data(int8 param_1,void *param_2,ulong param_3,int8 param_4,long *param_5,
int8 *param_6)
{
int1 local_9;
if ((uint)((int)*param_6 - (int)*param_5) < param_3) {
local_9 = read_long_data2(param_1,param_2,param_3,param_4,param_5,param_6);
}
else {
memcpy(param_2,(void *)*param_5,param_3);
*param_5 = param_3 + *param_5;
local_9 = 0;
}
return local_9;
}
|
|
5,760 | ma_scramble_41 | eloqsql/libmariadb/libmariadb/ma_password.c | void ma_scramble_41(const unsigned char *buffer, const char *scramble, const char *password)
{
_MA_SHA1_CTX context;
unsigned char sha1[SHA1_MAX_LENGTH];
unsigned char sha2[SHA1_MAX_LENGTH];
/* Phase 1: hash password */
ma_SHA1Init(&context);
ma_SHA1Update(&context, (unsigned char *)password, strlen((char *)password));
ma_SHA1Final(sha1, &context);
/* Phase 2: hash sha1 */
ma_SHA1Init(&context);
ma_SHA1Update(&context, (unsigned char*)sha1, SHA1_MAX_LENGTH);
ma_SHA1Final(sha2, &context);
/* Phase 3: hash scramble + sha2 */
ma_SHA1Init(&context);
ma_SHA1Update(&context, (unsigned char *)scramble, SCRAMBLE_LENGTH);
ma_SHA1Update(&context, (unsigned char*)sha2, SHA1_MAX_LENGTH);
ma_SHA1Final((unsigned char *)buffer, &context);
/* let's crypt buffer now */
my_crypt((uchar *)buffer, (const unsigned char *)buffer, (const unsigned char *)sha1, SHA1_MAX_LENGTH);
} | O0 | c | ma_scramble_41:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0xa8(%rbp)
movq %rsi, -0xb0(%rbp)
movq %rdx, -0xb8(%rbp)
leaq -0x64(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x50480
movq -0xb8(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x131a0
movq -0xe0(%rbp), %rsi
movq -0xd0(%rbp), %rdi
movq %rax, %rdx
callq 0x504e0
movq -0xd0(%rbp), %rsi
leaq -0x80(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x52250
movq -0xd0(%rbp), %rdi
callq 0x50480
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movl $0x14, %edx
movq %rdx, -0xc0(%rbp)
callq 0x504e0
movq -0xd0(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x52250
movq -0xd0(%rbp), %rdi
callq 0x50480
movq -0xd0(%rbp), %rdi
movq -0xc0(%rbp), %rdx
movq -0xb0(%rbp), %rsi
callq 0x504e0
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdi
movq -0xc0(%rbp), %rdx
callq 0x504e0
movq -0xd0(%rbp), %rsi
movq -0xa8(%rbp), %rdi
callq 0x52250
movq -0xc8(%rbp), %rdx
movq -0xc0(%rbp), %rcx
movq -0xa8(%rbp), %rsi
movq %rsi, %rdi
callq 0x4fee0
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5009d
addq $0xe0, %rsp
popq %rbp
retq
callq 0x134b0
nopw %cs:(%rax,%rax)
| ma_scramble_41:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_A8], rdi
mov [rbp+var_B0], rsi
mov [rbp+var_B8], rdx
lea rdi, [rbp+var_64]
mov [rbp+var_D0], rdi
call ma_SHA1Init
mov rdi, [rbp+var_B8]
mov [rbp+var_E0], rdi
call _strlen
mov rsi, [rbp+var_E0]
mov rdi, [rbp+var_D0]
mov rdx, rax
call ma_SHA1Update
mov rsi, [rbp+var_D0]
lea rdi, [rbp+var_80]
mov [rbp+var_C8], rdi
call ma_SHA1Final
mov rdi, [rbp+var_D0]
call ma_SHA1Init
mov rdi, [rbp+var_D0]
mov rsi, [rbp+var_C8]
mov edx, 14h
mov [rbp+var_C0], rdx
call ma_SHA1Update
mov rsi, [rbp+var_D0]
lea rdi, [rbp+var_A0]
mov [rbp+var_D8], rdi
call ma_SHA1Final
mov rdi, [rbp+var_D0]
call ma_SHA1Init
mov rdi, [rbp+var_D0]
mov rdx, [rbp+var_C0]
mov rsi, [rbp+var_B0]
call ma_SHA1Update
mov rsi, [rbp+var_D8]
mov rdi, [rbp+var_D0]
mov rdx, [rbp+var_C0]
call ma_SHA1Update
mov rsi, [rbp+var_D0]
mov rdi, [rbp+var_A8]
call ma_SHA1Final
mov rdx, [rbp+var_C8]
mov rcx, [rbp+var_C0]
mov rsi, [rbp+var_A8]
mov rdi, rsi
call my_crypt
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5009D
add rsp, 0E0h
pop rbp
retn
loc_5009D:
call ___stack_chk_fail
| unsigned long long ma_scramble_41(_BYTE *a1, long long a2, long long a3)
{
long long v3; // rax
_BYTE v6[32]; // [rsp+40h] [rbp-A0h] BYREF
_BYTE v7[28]; // [rsp+60h] [rbp-80h] BYREF
_BYTE v8[92]; // [rsp+7Ch] [rbp-64h] BYREF
unsigned long long v9; // [rsp+D8h] [rbp-8h]
v9 = __readfsqword(0x28u);
((void (*)(void))ma_SHA1Init)();
v3 = strlen(a3);
ma_SHA1Update(v8, a3, v3);
ma_SHA1Final(v7, v8);
ma_SHA1Init(v8);
ma_SHA1Update(v8, v7, 20LL);
ma_SHA1Final(v6, v8);
ma_SHA1Init(v8);
ma_SHA1Update(v8, a2, 20LL);
ma_SHA1Update(v8, v6, 20LL);
ma_SHA1Final(a1, v8);
my_crypt(a1, a1, v7, 20LL);
return __readfsqword(0x28u);
}
| ma_scramble_41:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0xa8],RDI
MOV qword ptr [RBP + -0xb0],RSI
MOV qword ptr [RBP + -0xb8],RDX
LEA RDI,[RBP + -0x64]
MOV qword ptr [RBP + -0xd0],RDI
CALL 0x00150480
MOV RDI,qword ptr [RBP + -0xb8]
MOV qword ptr [RBP + -0xe0],RDI
CALL 0x001131a0
MOV RSI,qword ptr [RBP + -0xe0]
MOV RDI,qword ptr [RBP + -0xd0]
MOV RDX,RAX
CALL 0x001504e0
MOV RSI,qword ptr [RBP + -0xd0]
LEA RDI,[RBP + -0x80]
MOV qword ptr [RBP + -0xc8],RDI
CALL 0x00152250
MOV RDI,qword ptr [RBP + -0xd0]
CALL 0x00150480
MOV RDI,qword ptr [RBP + -0xd0]
MOV RSI,qword ptr [RBP + -0xc8]
MOV EDX,0x14
MOV qword ptr [RBP + -0xc0],RDX
CALL 0x001504e0
MOV RSI,qword ptr [RBP + -0xd0]
LEA RDI,[RBP + -0xa0]
MOV qword ptr [RBP + -0xd8],RDI
CALL 0x00152250
MOV RDI,qword ptr [RBP + -0xd0]
CALL 0x00150480
MOV RDI,qword ptr [RBP + -0xd0]
MOV RDX,qword ptr [RBP + -0xc0]
MOV RSI,qword ptr [RBP + -0xb0]
CALL 0x001504e0
MOV RSI,qword ptr [RBP + -0xd8]
MOV RDI,qword ptr [RBP + -0xd0]
MOV RDX,qword ptr [RBP + -0xc0]
CALL 0x001504e0
MOV RSI,qword ptr [RBP + -0xd0]
MOV RDI,qword ptr [RBP + -0xa8]
CALL 0x00152250
MOV RDX,qword ptr [RBP + -0xc8]
MOV RCX,qword ptr [RBP + -0xc0]
MOV RSI,qword ptr [RBP + -0xa8]
MOV RDI,RSI
CALL 0x0014fee0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015009d
ADD RSP,0xe0
POP RBP
RET
LAB_0015009d:
CALL 0x001134b0
|
void ma_scramble_41(int8 param_1,int8 param_2,char *param_3)
{
size_t sVar1;
long in_FS_OFFSET;
int1 local_a8 [32];
int1 local_88 [28];
int1 local_6c [92];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
ma_SHA1Init();
sVar1 = strlen(param_3);
ma_SHA1Update(local_6c,param_3,sVar1);
ma_SHA1Final(local_88,local_6c);
ma_SHA1Init(local_6c);
ma_SHA1Update(local_6c,local_88);
ma_SHA1Final(local_a8,local_6c);
ma_SHA1Init(local_6c);
ma_SHA1Update(local_6c,param_2,0x14);
ma_SHA1Update(local_6c,local_a8,0x14);
ma_SHA1Final(param_1,local_6c);
my_crypt(param_1,param_1,local_88,0x14);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
5,761 | ftxui::xflex_shrink(std::shared_ptr<ftxui::Node>) | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/flex.cpp | Element xflex_shrink(Element child) {
return std::make_shared<Flex>(function_xflex_shrink, std::move(child));
} | O2 | cpp | ftxui::xflex_shrink(std::shared_ptr<ftxui::Node>):
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x2b(%rip), %rsi # 0x1e924
movq %rsp, %rdi
callq 0x1e621
leaq 0x8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x13452
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
| _ZN5ftxui12xflex_shrinkESt10shared_ptrINS_4NodeEE:
push rbx
sub rsp, 10h
mov rdx, rsi
mov rbx, rdi
lea rsi, _ZN5ftxui12_GLOBAL__N_121function_xflex_shrinkERNS_11RequirementE; ftxui::`anonymous namespace'::function_xflex_shrink(ftxui::Requirement &)
mov rdi, rsp
call _ZSt11make_sharedIN5ftxui12_GLOBAL__N_14FlexEJRFvRNS0_11RequirementEESt10shared_ptrINS0_4NodeEEEES7_IT_EDpOT0_; std::make_shared<ftxui::`anonymous namespace'::Flex,void (&)(ftxui::Requirement &),std::shared_ptr<ftxui::Node>>(void (&)(ftxui::Requirement &),std::shared_ptr<ftxui::Node> &&)
lea rdi, [rsp+18h+var_10]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 10h
pop rbx
retn
| _OWORD * ftxui::xflex_shrink(_OWORD *a1, __int128 *a2)
{
__int128 v2; // xmm0
__int128 v4; // [rsp+0h] [rbp-18h] BYREF
std::make_shared<ftxui::`anonymous namespace'::Flex,void (&)(ftxui::Requirement &),std::shared_ptr<ftxui::Node>>(
&v4,
(long long)ftxui::`anonymous namespace'::function_xflex_shrink,
a2);
v2 = v4;
*((_QWORD *)&v4 + 1) = 0LL;
*a1 = v2;
*(_QWORD *)&v4 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v4 + 1);
return a1;
}
| xflex_shrink:
PUSH RBX
SUB RSP,0x10
MOV RDX,RSI
MOV RBX,RDI
LEA RSI,[0x11e924]
MOV RDI,RSP
CALL 0x0011e621
LEA RDI,[RSP + 0x8]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x00113452
MOV RAX,RBX
ADD RSP,0x10
POP RBX
RET
|
/* ftxui::xflex_shrink(std::shared_ptr<ftxui::Node>) */
int8 * ftxui::xflex_shrink(int8 *param_1)
{
int8 uVar1;
int8 local_18;
int8 uStack_10;
std::
make_shared<ftxui::(anonymous_namespace)::Flex,void(&)(ftxui::Requirement&),std::shared_ptr<ftxui::Node>>
((_func_void_Requirement_ptr *)&local_18,
(shared_ptr *)(anonymous_namespace)::function_xflex_shrink);
uVar1 = uStack_10;
uStack_10 = 0;
*param_1 = local_18;
param_1[1] = uVar1;
local_18 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_10);
return param_1;
}
|
|
5,762 | pagecache_unlock_by_link | eloqsql/storage/maria/ma_pagecache.c | void pagecache_unlock_by_link(PAGECACHE *pagecache,
PAGECACHE_BLOCK_LINK *block,
enum pagecache_page_lock lock,
enum pagecache_page_pin pin,
LSN first_REDO_LSN_for_page,
LSN lsn, my_bool was_changed,
my_bool any)
{
DBUG_ENTER("pagecache_unlock_by_link");
DBUG_PRINT("enter", ("block: %p fd: %u page: %lu changed: %d %s %s",
block, (uint) block->hash_link->file.file,
(ulong) block->hash_link->pageno, was_changed,
page_cache_page_lock_str[lock],
page_cache_page_pin_str[pin]));
/*
We do not allow any lock/pin increasing here and page can't be
unpinned because we use direct link.
*/
DBUG_ASSERT(pin != PAGECACHE_PIN);
DBUG_ASSERT(pin != PAGECACHE_PIN_LEFT_UNPINNED);
DBUG_ASSERT(lock != PAGECACHE_LOCK_READ);
DBUG_ASSERT(lock != PAGECACHE_LOCK_WRITE);
pagecache_pthread_mutex_lock(&pagecache->cache_lock);
if (pin == PAGECACHE_PIN_LEFT_UNPINNED &&
lock == PAGECACHE_LOCK_READ_UNLOCK)
{
if (make_lock_and_pin(pagecache, block, lock, pin, FALSE))
DBUG_ASSERT(0); /* should not happend */
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
DBUG_VOID_RETURN;
}
/*
As soon as we keep lock cache can be used, and we have lock because want
unlock.
*/
DBUG_ASSERT(pagecache->can_be_used);
inc_counter_for_resize_op(pagecache);
if (was_changed)
{
if (first_REDO_LSN_for_page != LSN_IMPOSSIBLE)
{
/*
LOCK_READ_UNLOCK is ok here as the page may have first locked
with WRITE lock that was temporarly converted to READ lock before
it's unpinned
*/
DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE_UNLOCK ||
lock == PAGECACHE_LOCK_READ_UNLOCK);
DBUG_ASSERT(pin == PAGECACHE_UNPIN);
pagecache_set_block_rec_lsn(block, first_REDO_LSN_for_page);
}
if (lsn != LSN_IMPOSSIBLE)
check_and_set_lsn(pagecache, lsn, block);
/*
Reset error flag. Mark also that page is active; This may not have
been the case if there was an error reading the page
*/
block->status= (block->status & ~PCBLOCK_ERROR) | PCBLOCK_READ;
}
/* if we lock for write we must link the block to changed blocks */
DBUG_ASSERT((block->status & PCBLOCK_DIRECT_W) == 0 ||
(lock == PAGECACHE_LOCK_WRITE_UNLOCK ||
lock == PAGECACHE_LOCK_WRITE_TO_READ ||
lock == PAGECACHE_LOCK_LEFT_WRITELOCKED));
/*
If was_changed then status should be PCBLOCK_DIRECT_W or marked
as dirty
*/
DBUG_ASSERT(!was_changed || (block->status & PCBLOCK_DIRECT_W) ||
(block->status & PCBLOCK_CHANGED));
if ((block->status & PCBLOCK_DIRECT_W) &&
(lock == PAGECACHE_LOCK_WRITE_UNLOCK ||
lock == PAGECACHE_LOCK_WRITE_TO_READ))
{
if (!(block->status & PCBLOCK_CHANGED) && was_changed)
link_to_changed_list(pagecache, block);
block->status&= ~PCBLOCK_DIRECT_W;
DBUG_PRINT("info", ("Drop PCBLOCK_DIRECT_W for block: %p", block));
}
if (make_lock_and_pin(pagecache, block, lock, pin, any))
DBUG_ASSERT(0); /* should not happend */
/*
Link the block into the LRU chain if it's the last submitted request
for the block and block will not be pinned.
See NOTE for pagecache_unlock about registering requests.
*/
if (pin != PAGECACHE_PIN_LEFT_PINNED)
unreg_request(pagecache, block, 1);
dec_counter_for_resize_op(pagecache);
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
DBUG_VOID_RETURN;
} | O0 | c | pagecache_unlock_by_link:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb 0x18(%rbp), %al
movb 0x10(%rbp), %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
jmp 0x58766
jmp 0x58768
jmp 0x5876a
jmp 0x5876c
jmp 0x5876e
jmp 0x58770
jmp 0x58772
jmp 0x58774
jmp 0x58776
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
leaq 0xf8e3f(%rip), %rsi # 0x1515c7
movl $0xd47, %edx # imm = 0xD47
callq 0x57500
cmpl $0x1, -0x18(%rbp)
jne 0x587d3
cmpl $0x5, -0x14(%rbp)
jne 0x587d3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
xorl %r8d, %r8d
callq 0x582c0
cmpb $0x0, %al
je 0x587be
jmp 0x587ba
jmp 0x587bc
jmp 0x587be
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
callq 0x57570
jmp 0x588e5
jmp 0x587d5
jmp 0x587d7
movq -0x8(%rbp), %rdi
callq 0x578b0
cmpb $0x0, 0x10(%rbp)
je 0x58833
cmpq $0x0, -0x20(%rbp)
je 0x58802
jmp 0x587ef
jmp 0x587f1
jmp 0x587f3
jmp 0x587f5
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x580e0
cmpq $0x0, -0x28(%rbp)
je 0x5881a
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x58120
movq -0x10(%rbp), %rax
movzwl 0x74(%rax), %eax
andl $-0x2, %eax
orl $0x2, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x74(%rax)
jmp 0x58835
jmp 0x58837
jmp 0x58839
jmp 0x5883b
movq -0x10(%rbp), %rax
movzwl 0x74(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x58890
cmpl $0x6, -0x14(%rbp)
je 0x58857
cmpl $0x7, -0x14(%rbp)
jne 0x58890
movq -0x10(%rbp), %rax
movzwl 0x74(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x5887d
movsbl 0x10(%rbp), %eax
cmpl $0x0, %eax
je 0x5887d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x58230
movq -0x10(%rbp), %rax
movzwl 0x74(%rax), %ecx
andl $-0x41, %ecx
movw %cx, 0x74(%rax)
jmp 0x5888e
jmp 0x58890
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movsbl 0x18(%rbp), %r8d
callq 0x582c0
cmpb $0x0, %al
je 0x588b2
jmp 0x588ae
jmp 0x588b0
jmp 0x588b2
cmpl $0x0, -0x18(%rbp)
je 0x588ca
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x58460
movq -0x8(%rbp), %rdi
callq 0x585e0
movq -0x8(%rbp), %rdi
addq $0xc8, %rdi
callq 0x57570
jmp 0x588e5
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| pagecache_unlock_by_link:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, [rbp+arg_8]
mov al, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
mov [rbp+var_20], r8
mov [rbp+var_28], r9
jmp short $+2
loc_58766:
jmp short $+2
loc_58768:
jmp short $+2
loc_5876A:
jmp short $+2
loc_5876C:
jmp short $+2
loc_5876E:
jmp short $+2
loc_58770:
jmp short $+2
loc_58772:
jmp short $+2
loc_58774:
jmp short $+2
loc_58776:
mov rdi, [rbp+var_8]
add rdi, 0C8h
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0D47h
call inline_mysql_mutex_lock_8
cmp [rbp+var_18], 1
jnz short loc_587D3
cmp [rbp+var_14], 5
jnz short loc_587D3
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
mov ecx, [rbp+var_18]
xor r8d, r8d
call make_lock_and_pin
cmp al, 0
jz short loc_587BE
jmp short $+2
loc_587BA:
jmp short $+2
loc_587BC:
jmp short $+2
loc_587BE:
mov rdi, [rbp+var_8]
add rdi, 0C8h
call inline_mysql_mutex_unlock_8
jmp loc_588E5
loc_587D3:
jmp short $+2
loc_587D5:
jmp short $+2
loc_587D7:
mov rdi, [rbp+var_8]
call inc_counter_for_resize_op
cmp [rbp+arg_0], 0
jz short loc_58833
cmp [rbp+var_20], 0
jz short loc_58802
jmp short $+2
loc_587EF:
jmp short $+2
loc_587F1:
jmp short $+2
loc_587F3:
jmp short $+2
loc_587F5:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call pagecache_set_block_rec_lsn
loc_58802:
cmp [rbp+var_28], 0
jz short loc_5881A
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_10]
call check_and_set_lsn
loc_5881A:
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+74h]
and eax, 0FFFFFFFEh
or eax, 2
mov cx, ax
mov rax, [rbp+var_10]
mov [rax+74h], cx
loc_58833:
jmp short $+2
loc_58835:
jmp short $+2
loc_58837:
jmp short $+2
loc_58839:
jmp short $+2
loc_5883B:
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+74h]
and eax, 40h
cmp eax, 0
jz short loc_58890
cmp [rbp+var_14], 6
jz short loc_58857
cmp [rbp+var_14], 7
jnz short loc_58890
loc_58857:
mov rax, [rbp+var_10]
movzx eax, word ptr [rax+74h]
and eax, 20h
cmp eax, 0
jnz short loc_5887D
movsx eax, [rbp+arg_0]
cmp eax, 0
jz short loc_5887D
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call link_to_changed_list
loc_5887D:
mov rax, [rbp+var_10]
movzx ecx, word ptr [rax+74h]
and ecx, 0FFFFFFBFh
mov [rax+74h], cx
jmp short $+2
loc_5888E:
jmp short $+2
loc_58890:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
mov ecx, [rbp+var_18]
movsx r8d, [rbp+arg_8]
call make_lock_and_pin
cmp al, 0
jz short loc_588B2
jmp short $+2
loc_588AE:
jmp short $+2
loc_588B0:
jmp short $+2
loc_588B2:
cmp [rbp+var_18], 0
jz short loc_588CA
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, 1
call unreg_request
loc_588CA:
mov rdi, [rbp+var_8]
call dec_counter_for_resize_op
mov rdi, [rbp+var_8]
add rdi, 0C8h
call inline_mysql_mutex_unlock_8
jmp short $+2
loc_588E5:
add rsp, 30h
pop rbp
retn
| long long pagecache_unlock_by_link(
_QWORD *a1,
long long a2,
int a3,
int a4,
long long a5,
long long a6,
char a7,
char a8)
{
inline_mysql_mutex_lock_8(
(long long)(a1 + 25),
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0xD47u);
if ( a4 == 1 && a3 == 5 )
{
make_lock_and_pin((long long)a1, a2, 5, 1, 0);
return inline_mysql_mutex_unlock_8((long long)(a1 + 25));
}
else
{
inc_counter_for_resize_op((long long)a1);
if ( a7 )
{
if ( a5 )
pagecache_set_block_rec_lsn(a2, a5);
if ( a6 )
check_and_set_lsn((long long)a1, a6, a2);
*(_WORD *)(a2 + 116) = *(_WORD *)(a2 + 116) & 0xFFFC | 2;
}
if ( (*(_WORD *)(a2 + 116) & 0x40) != 0 && (a3 == 6 || a3 == 7) )
{
if ( (*(_WORD *)(a2 + 116) & 0x20) == 0 && a7 )
link_to_changed_list(a1, a2);
*(_WORD *)(a2 + 116) &= ~0x40u;
}
make_lock_and_pin((long long)a1, a2, a3, a4, a8);
if ( a4 )
unreg_request(a1, a2, 1);
dec_counter_for_resize_op((long long)a1);
return inline_mysql_mutex_unlock_8((long long)(a1 + 25));
}
}
| pagecache_unlock_by_link:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,byte ptr [RBP + 0x18]
MOV AL,byte ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],ECX
MOV qword ptr [RBP + -0x20],R8
MOV qword ptr [RBP + -0x28],R9
JMP 0x00158766
LAB_00158766:
JMP 0x00158768
LAB_00158768:
JMP 0x0015876a
LAB_0015876a:
JMP 0x0015876c
LAB_0015876c:
JMP 0x0015876e
LAB_0015876e:
JMP 0x00158770
LAB_00158770:
JMP 0x00158772
LAB_00158772:
JMP 0x00158774
LAB_00158774:
JMP 0x00158776
LAB_00158776:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc8
LEA RSI,[0x2515c7]
MOV EDX,0xd47
CALL 0x00157500
CMP dword ptr [RBP + -0x18],0x1
JNZ 0x001587d3
CMP dword ptr [RBP + -0x14],0x5
JNZ 0x001587d3
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
MOV ECX,dword ptr [RBP + -0x18]
XOR R8D,R8D
CALL 0x001582c0
CMP AL,0x0
JZ 0x001587be
JMP 0x001587ba
LAB_001587ba:
JMP 0x001587bc
LAB_001587bc:
JMP 0x001587be
LAB_001587be:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc8
CALL 0x00157570
JMP 0x001588e5
LAB_001587d3:
JMP 0x001587d5
LAB_001587d5:
JMP 0x001587d7
LAB_001587d7:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001578b0
CMP byte ptr [RBP + 0x10],0x0
JZ 0x00158833
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00158802
JMP 0x001587ef
LAB_001587ef:
JMP 0x001587f1
LAB_001587f1:
JMP 0x001587f3
LAB_001587f3:
JMP 0x001587f5
LAB_001587f5:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001580e0
LAB_00158802:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0015881a
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x10]
CALL 0x00158120
LAB_0015881a:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0x74]
AND EAX,0xfffffffe
OR EAX,0x2
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV word ptr [RAX + 0x74],CX
LAB_00158833:
JMP 0x00158835
LAB_00158835:
JMP 0x00158837
LAB_00158837:
JMP 0x00158839
LAB_00158839:
JMP 0x0015883b
LAB_0015883b:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0x74]
AND EAX,0x40
CMP EAX,0x0
JZ 0x00158890
CMP dword ptr [RBP + -0x14],0x6
JZ 0x00158857
CMP dword ptr [RBP + -0x14],0x7
JNZ 0x00158890
LAB_00158857:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0x74]
AND EAX,0x20
CMP EAX,0x0
JNZ 0x0015887d
MOVSX EAX,byte ptr [RBP + 0x10]
CMP EAX,0x0
JZ 0x0015887d
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00158230
LAB_0015887d:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RAX + 0x74]
AND ECX,0xffffffbf
MOV word ptr [RAX + 0x74],CX
JMP 0x0015888e
LAB_0015888e:
JMP 0x00158890
LAB_00158890:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
MOV ECX,dword ptr [RBP + -0x18]
MOVSX R8D,byte ptr [RBP + 0x18]
CALL 0x001582c0
CMP AL,0x0
JZ 0x001588b2
JMP 0x001588ae
LAB_001588ae:
JMP 0x001588b0
LAB_001588b0:
JMP 0x001588b2
LAB_001588b2:
CMP dword ptr [RBP + -0x18],0x0
JZ 0x001588ca
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,0x1
CALL 0x00158460
LAB_001588ca:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001585e0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc8
CALL 0x00157570
JMP 0x001588e5
LAB_001588e5:
ADD RSP,0x30
POP RBP
RET
|
void pagecache_unlock_by_link
(long param_1,long param_2,int param_3,int param_4,long param_5,long param_6,
char param_7,char param_8)
{
inline_mysql_mutex_lock
(param_1 + 200,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0xd47);
if ((param_4 == 1) && (param_3 == 5)) {
make_lock_and_pin(param_1,param_2,5,1,0);
inline_mysql_mutex_unlock(param_1 + 200);
}
else {
inc_counter_for_resize_op(param_1);
if (param_7 != '\0') {
if (param_5 != 0) {
pagecache_set_block_rec_lsn(param_2,param_5);
}
if (param_6 != 0) {
check_and_set_lsn(param_1,param_6,param_2);
}
*(ushort *)(param_2 + 0x74) = *(ushort *)(param_2 + 0x74) & 0xfffe | 2;
}
if (((*(ushort *)(param_2 + 0x74) & 0x40) != 0) && ((param_3 == 6 || (param_3 == 7)))) {
if (((*(ushort *)(param_2 + 0x74) & 0x20) == 0) && (param_7 != '\0')) {
link_to_changed_list(param_1,param_2);
}
*(ushort *)(param_2 + 0x74) = *(ushort *)(param_2 + 0x74) & 0xffbf;
}
make_lock_and_pin(param_1,param_2,param_3,param_4,(int)param_8);
if (param_4 != 0) {
unreg_request(param_1,param_2,1);
}
dec_counter_for_resize_op(param_1);
inline_mysql_mutex_unlock(param_1 + 200);
}
return;
}
|
|
5,763 | common_log::add(ggml_log_level, char const*, __va_list_tag*) | monkey531[P]llama/common/log.cpp | void add(enum ggml_log_level level, const char * fmt, va_list args) {
std::lock_guard<std::mutex> lock(mtx);
if (!running) {
// discard messages while the worker thread is paused
return;
}
auto & entry = entries[tail];
{
// cannot use args twice, so make a copy in case we need to expand the buffer
va_list args_copy;
va_copy(args_copy, args);
#if 1
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args_copy);
}
#else
// hack for bolding arguments
std::stringstream ss;
for (int i = 0; fmt[i] != 0; i++) {
if (fmt[i] == '%') {
ss << LOG_COL_BOLD;
while (fmt[i] != ' ' && fmt[i] != ')' && fmt[i] != ']' && fmt[i] != 0) ss << fmt[i++];
ss << LOG_COL_DEFAULT;
if (fmt[i] == 0) break;
}
ss << fmt[i];
}
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy);
}
#endif
va_end(args_copy);
}
entry.level = level;
entry.prefix = prefix;
entry.timestamp = 0;
if (timestamps) {
entry.timestamp = t_us() - t_start;
}
entry.is_end = false;
tail = (tail + 1) % entries.size();
if (tail == head) {
// expand the buffer
std::vector<common_log_entry> new_entries(2*entries.size());
size_t new_tail = 0;
do {
new_entries[new_tail] = std::move(entries[head]);
head = (head + 1) % entries.size();
new_tail = (new_tail + 1);
} while (head != tail);
head = 0;
tail = new_tail;
for (size_t i = tail; i < new_entries.size(); i++) {
new_entries[i].msg.resize(256);
}
entries = std::move(new_entries);
}
cv.notify_one();
} | O2 | cpp | common_log::add(ggml_log_level, char const*, __va_list_tag*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x9810a
cmpb $0x1, 0x6a(%rbx)
jne 0x97b7d
movl %ebp, 0xc(%rsp)
movq 0x78(%rbx), %r13
imulq $0x30, 0x98(%rbx), %rbp
movq %r13, %r12
addq %rbp, %r12
movq 0x10(%r15), %rax
movq %rax, 0x20(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x10(%r13,%rbp), %rdi
movq 0x18(%r13,%rbp), %rsi
subq %rdi, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x241d0
movslq %eax, %rsi
movq 0x18(%r13,%rbp), %rax
subq 0x10(%r13,%rbp), %rax
cmpq %rsi, %rax
ja 0x97a33
leaq 0x10(,%rbp), %rdi
addq %r13, %rdi
incq %rsi
callq 0x5d7b4
movq 0x10(%r12), %rdi
movq 0x18(%r12), %rsi
subq %rdi, %rsi
leaq 0x10(%rsp), %rcx
movq %r14, %rdx
callq 0x241d0
movl 0xc(%rsp), %eax
movl %eax, (%r12)
movb 0x68(%rbx), %al
movb %al, 0x4(%r12)
andq $0x0, 0x8(%r12)
cmpb $0x1, 0x69(%rbx)
jne 0x97a5d
callq 0x97842
subq 0x70(%rbx), %rax
movq %rax, 0x8(%r12)
movb $0x0, 0x28(%r12)
movq 0x80(%rbx), %rax
movq 0x98(%rbx), %rcx
incq %rcx
subq 0x78(%rbx), %rax
pushq $0x30
popq %r15
cqto
idivq %r15
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rdx, 0x98(%rbx)
cmpq 0x90(%rbx), %rdx
jne 0x97b74
addq %rsi, %rsi
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x985fa
leaq 0x78(%rbx), %r14
movq 0x78(%rbx), %rdi
movq 0x90(%rbx), %rdx
pushq $0x10
popq %r12
xorl %r13d, %r13d
imulq $0x30, %rdx, %rsi
addq %rdi, %rsi
movq 0x10(%rsp), %rax
leaq (%rax,%r12), %rdi
addq $-0x10, %rdi
callq 0x9864c
movq 0x90(%rbx), %rcx
incq %rcx
movq 0x78(%rbx), %rdi
movq 0x80(%rbx), %rax
subq %rdi, %rax
cqto
idivq %r15
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rdx, 0x90(%rbx)
incq %r13
addq $0x30, %r12
cmpq 0x98(%rbx), %rdx
jne 0x97ac8
andq $0x0, 0x90(%rbx)
movq %r13, 0x98(%rbx)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
subq %rdi, %rax
cqto
idivq %r15
cmpq %rax, %r13
jae 0x97b5c
addq %r12, %rdi
movl $0x100, %esi # imm = 0x100
callq 0x5d7b4
incq %r13
addq $0x30, %r12
jmp 0x97b2f
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x9872a
movq %r15, %rdi
callq 0x97e16
leaq 0x30(%rbx), %rdi
callq 0x23480
movq %rbx, %rdi
callq 0x236e0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x97b96
movq %rax, %r14
jmp 0x97ba8
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x97e16
movq %rbx, %rdi
callq 0x236e0
movq %r14, %rdi
callq 0x23f80
| _ZN10common_log3addE14ggml_log_levelPKcP13__va_list_tag:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
cmp byte ptr [rbx+6Ah], 1
jnz loc_97B7D
mov [rsp+58h+var_4C], ebp
mov r13, [rbx+78h]
imul rbp, [rbx+98h], 30h ; '0'
mov r12, r13
add r12, rbp
mov rax, [r15+10h]
mov [rsp+58h+var_38], rax
movups xmm0, xmmword ptr [r15]
movaps [rsp+58h+var_48], xmm0
mov rdi, [r13+rbp+10h]
mov rsi, [r13+rbp+18h]
sub rsi, rdi
mov rdx, r14
mov rcx, r15
call vsnprintf
movsxd rsi, eax
mov rax, [r13+rbp+18h]
sub rax, [r13+rbp+10h]
cmp rax, rsi
ja short loc_97A33
lea rdi, ds:10h[rbp]
add rdi, r13
inc rsi
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
mov rdi, [r12+10h]
mov rsi, [r12+18h]
sub rsi, rdi
lea rcx, [rsp+58h+var_48]
mov rdx, r14
call vsnprintf
loc_97A33:
mov eax, [rsp+58h+var_4C]
mov [r12], eax
mov al, [rbx+68h]
mov [r12+4], al
and qword ptr [r12+8], 0
cmp byte ptr [rbx+69h], 1
jnz short loc_97A5D
call _ZL4t_usv; t_us(void)
sub rax, [rbx+70h]
mov [r12+8], rax
loc_97A5D:
mov byte ptr [r12+28h], 0
mov rax, [rbx+80h]
mov rcx, [rbx+98h]
inc rcx
sub rax, [rbx+78h]
push 30h ; '0'
pop r15
cqo
idiv r15
mov rsi, rax
mov rax, rcx
xor edx, edx
div rsi
mov [rbx+98h], rdx
cmp rdx, [rbx+90h]
jnz loc_97B74
add rsi, rsi
lea rdi, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_4D]
call _ZNSt6vectorI16common_log_entrySaIS0_EEC2EmRKS1_; std::vector<common_log_entry>::vector(ulong,std::allocator<common_log_entry> const&)
lea r14, [rbx+78h]
mov rdi, [rbx+78h]
mov rdx, [rbx+90h]
push 10h
pop r12
xor r13d, r13d
loc_97AC8:
imul rsi, rdx, 30h ; '0'
add rsi, rdi
mov rax, qword ptr [rsp+58h+var_48]
lea rdi, [rax+r12]
add rdi, 0FFFFFFFFFFFFFFF0h
call _ZN16common_log_entryaSEOS_; common_log_entry::operator=(common_log_entry&&)
mov rcx, [rbx+90h]
inc rcx
mov rdi, [rbx+78h]
mov rax, [rbx+80h]
sub rax, rdi
cqo
idiv r15
mov rsi, rax
mov rax, rcx
xor edx, edx
div rsi
mov [rbx+90h], rdx
inc r13
add r12, 30h ; '0'
cmp rdx, [rbx+98h]
jnz short loc_97AC8
and qword ptr [rbx+90h], 0
mov [rbx+98h], r13
loc_97B2F:
mov rdi, qword ptr [rsp+58h+var_48]
mov rax, qword ptr [rsp+58h+var_48+8]
sub rax, rdi
cqo
idiv r15
cmp r13, rax
jnb short loc_97B5C
add rdi, r12
mov esi, 100h
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
inc r13
add r12, 30h ; '0'
jmp short loc_97B2F
loc_97B5C:
lea r15, [rsp+58h+var_48]
mov rdi, r14
mov rsi, r15
call _ZNSt6vectorI16common_log_entrySaIS0_EE14_M_move_assignEOS2_St17integral_constantIbLb1EE; std::vector<common_log_entry>::_M_move_assign(std::vector<common_log_entry>&&,std::integral_constant<bool,true>)
mov rdi, r15
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_97B74:
lea rdi, [rbx+30h]; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
loc_97B7D:
mov rdi, rbx
call _pthread_mutex_unlock
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_97B96:
mov r14, rax
jmp short loc_97BA8
mov r14, rax
lea rdi, [rsp+arg_8]
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_97BA8:
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
| long long common_log::add(long long a1, int a2, long long a3, __int128 *a4)
{
long long v7; // r13
long long v8; // rbp
long long v9; // r12
std::chrono::_V2::system_clock *v10; // rdi
unsigned long long v11; // rsi
unsigned long long v12; // rsi
unsigned long long v13; // rdx
long long v14; // rdi
unsigned long long v15; // rdx
long long v16; // r12
unsigned long long v17; // r13
char v19; // [rsp+Bh] [rbp-4Dh] BYREF
int v20; // [rsp+Ch] [rbp-4Ch]
__int128 v21; // [rsp+10h] [rbp-48h] BYREF
long long v22; // [rsp+20h] [rbp-38h]
std::mutex::lock((std::mutex *)a1);
if ( *(_BYTE *)(a1 + 106) == 1 )
{
v20 = a2;
v7 = *(_QWORD *)(a1 + 120);
v8 = 48LL * *(_QWORD *)(a1 + 152);
v9 = v8 + v7;
v22 = *((_QWORD *)a4 + 2);
v21 = *a4;
v10 = *(std::chrono::_V2::system_clock **)(v7 + v8 + 16);
v11 = (int)vsnprintf(v10, *(_QWORD *)(v7 + v8 + 24) - (_QWORD)v10, a3, a4);
if ( *(_QWORD *)(v7 + v8 + 24) - *(_QWORD *)(v7 + v8 + 16) <= v11 )
{
std::vector<char>::resize((_QWORD *)(v7 + v8 + 16), v11 + 1);
v10 = *(std::chrono::_V2::system_clock **)(v9 + 16);
vsnprintf(v10, *(_QWORD *)(v9 + 24) - (_QWORD)v10, a3, &v21);
}
*(_DWORD *)v9 = v20;
*(_BYTE *)(v9 + 4) = *(_BYTE *)(a1 + 104);
*(_QWORD *)(v9 + 8) = 0LL;
if ( *(_BYTE *)(a1 + 105) == 1 )
*(_QWORD *)(v9 + 8) = t_us(v10) - *(_QWORD *)(a1 + 112);
*(_BYTE *)(v9 + 40) = 0;
v12 = (*(_QWORD *)(a1 + 128) - *(_QWORD *)(a1 + 120)) / 48LL;
v13 = (*(_QWORD *)(a1 + 152) + 1LL) % v12;
*(_QWORD *)(a1 + 152) = v13;
if ( v13 == *(_QWORD *)(a1 + 144) )
{
std::vector<common_log_entry>::vector(&v21, 2 * v12, &v19);
v14 = *(_QWORD *)(a1 + 120);
v15 = *(_QWORD *)(a1 + 144);
v16 = 16LL;
v17 = 0LL;
do
{
common_log_entry::operator=(v21 + v16 - 16, v14 + 48 * v15);
v14 = *(_QWORD *)(a1 + 120);
v15 = (*(_QWORD *)(a1 + 144) + 1LL) % (unsigned long long)((*(_QWORD *)(a1 + 128) - v14) / 48);
*(_QWORD *)(a1 + 144) = v15;
++v17;
v16 += 48LL;
}
while ( v15 != *(_QWORD *)(a1 + 152) );
*(_QWORD *)(a1 + 144) = 0LL;
*(_QWORD *)(a1 + 152) = v17;
while ( v17 < (*((_QWORD *)&v21 + 1) - (_QWORD)v21) / 48LL )
{
std::vector<char>::resize((_QWORD *)(v16 + v21), 0x100uLL);
++v17;
v16 += 48LL;
}
std::vector<common_log_entry>::_M_move_assign(a1 + 120, &v21, (*((_QWORD *)&v21 + 1) - (_QWORD)v21) % 48LL);
std::vector<common_log_entry>::~vector(&v21);
}
std::condition_variable::notify_one((std::condition_variable *)(a1 + 48));
}
return pthread_mutex_unlock(a1);
}
| add:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x0019810a
CMP byte ptr [RBX + 0x6a],0x1
JNZ 0x00197b7d
MOV dword ptr [RSP + 0xc],EBP
MOV R13,qword ptr [RBX + 0x78]
IMUL RBP,qword ptr [RBX + 0x98],0x30
MOV R12,R13
ADD R12,RBP
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV RDI,qword ptr [R13 + RBP*0x1 + 0x10]
MOV RSI,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RSI,RDI
MOV RDX,R14
MOV RCX,R15
CALL 0x001241d0
MOVSXD RSI,EAX
MOV RAX,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RAX,qword ptr [R13 + RBP*0x1 + 0x10]
CMP RAX,RSI
JA 0x00197a33
LEA RDI,[0x10 + RBP*0x1]
ADD RDI,R13
INC RSI
LAB_00197a14:
CALL 0x0015d7b4
MOV RDI,qword ptr [R12 + 0x10]
MOV RSI,qword ptr [R12 + 0x18]
SUB RSI,RDI
LEA RCX,[RSP + 0x10]
MOV RDX,R14
CALL 0x001241d0
LAB_00197a33:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [R12],EAX
MOV AL,byte ptr [RBX + 0x68]
MOV byte ptr [R12 + 0x4],AL
AND qword ptr [R12 + 0x8],0x0
CMP byte ptr [RBX + 0x69],0x1
JNZ 0x00197a5d
CALL 0x00197842
SUB RAX,qword ptr [RBX + 0x70]
MOV qword ptr [R12 + 0x8],RAX
LAB_00197a5d:
MOV byte ptr [R12 + 0x28],0x0
MOV RAX,qword ptr [RBX + 0x80]
MOV RCX,qword ptr [RBX + 0x98]
INC RCX
SUB RAX,qword ptr [RBX + 0x78]
PUSH 0x30
POP R15
CQO
IDIV R15
MOV RSI,RAX
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBX + 0x98],RDX
CMP RDX,qword ptr [RBX + 0x90]
JNZ 0x00197b74
ADD RSI,RSI
LAB_00197aa3:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xb]
CALL 0x001985fa
LEA R14,[RBX + 0x78]
MOV RDI,qword ptr [RBX + 0x78]
MOV RDX,qword ptr [RBX + 0x90]
PUSH 0x10
POP R12
XOR R13D,R13D
LAB_00197ac8:
IMUL RSI,RDX,0x30
ADD RSI,RDI
MOV RAX,qword ptr [RSP + 0x10]
LEA RDI,[RAX + R12*0x1]
ADD RDI,-0x10
CALL 0x0019864c
MOV RCX,qword ptr [RBX + 0x90]
INC RCX
MOV RDI,qword ptr [RBX + 0x78]
MOV RAX,qword ptr [RBX + 0x80]
SUB RAX,RDI
CQO
IDIV R15
MOV RSI,RAX
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBX + 0x90],RDX
INC R13
ADD R12,0x30
CMP RDX,qword ptr [RBX + 0x98]
JNZ 0x00197ac8
AND qword ptr [RBX + 0x90],0x0
MOV qword ptr [RBX + 0x98],R13
LAB_00197b2f:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,RDI
CQO
IDIV R15
CMP R13,RAX
JNC 0x00197b5c
ADD RDI,R12
LAB_00197b49:
MOV ESI,0x100
CALL 0x0015d7b4
LAB_00197b53:
INC R13
ADD R12,0x30
JMP 0x00197b2f
LAB_00197b5c:
LEA R15,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x0019872a
MOV RDI,R15
CALL 0x00197e16
LAB_00197b74:
LEA RDI,[RBX + 0x30]
CALL 0x00123480
LAB_00197b7d:
MOV RDI,RBX
CALL 0x001236e0
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_log::add(ggml_log_level, char const*, __va_list_tag*) */
void __thiscall common_log::add(common_log *this,int4 param_2,char *param_3,long *param_4)
{
char *__s;
int iVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
int4 *puVar6;
allocator local_4d;
int4 local_4c;
long local_48;
long lStack_40;
long local_38;
std::mutex::lock((mutex *)this);
if (this[0x6a] == (common_log)0x1) {
lVar2 = *(long *)(this + 0x78);
lVar5 = *(long *)(this + 0x98) * 0x30;
puVar6 = (int4 *)(lVar2 + lVar5);
local_38 = param_4[2];
local_48 = *param_4;
lStack_40 = param_4[1];
__s = *(char **)(lVar2 + 0x10 + lVar5);
local_4c = param_2;
iVar1 = vsnprintf(__s,*(long *)(lVar2 + 0x18 + lVar5) - (long)__s,param_3,param_4);
if ((ulong)(*(long *)(lVar2 + 0x18 + lVar5) - *(long *)(lVar2 + 0x10 + lVar5)) <=
(ulong)(long)iVar1) {
/* try { // try from 00197a14 to 00197a18 has its CatchHandler @ 00197b96 */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(lVar5 + 0x10 + lVar2),(long)iVar1 + 1);
vsnprintf(*(char **)(puVar6 + 4),*(long *)(puVar6 + 6) - (long)*(char **)(puVar6 + 4),param_3,
&local_48);
}
*puVar6 = local_4c;
*(common_log *)(puVar6 + 1) = this[0x68];
*(int8 *)(puVar6 + 2) = 0;
if (this[0x69] == (common_log)0x1) {
lVar2 = t_us();
*(long *)(puVar6 + 2) = lVar2 - *(long *)(this + 0x70);
}
*(int1 *)(puVar6 + 10) = 0;
uVar3 = (*(long *)(this + 0x80) - *(long *)(this + 0x78)) / 0x30;
uVar4 = (*(long *)(this + 0x98) + 1U) % uVar3;
*(ulong *)(this + 0x98) = uVar4;
if (uVar4 == *(ulong *)(this + 0x90)) {
/* try { // try from 00197aa3 to 00197ab1 has its CatchHandler @ 00197b94 */
std::vector<common_log_entry,std::allocator<common_log_entry>>::vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48,uVar3 * 2,
&local_4d);
lVar2 = *(long *)(this + 0x78);
uVar3 = *(ulong *)(this + 0x90);
lVar5 = 0x10;
uVar4 = 0;
do {
common_log_entry::operator=
((common_log_entry *)(local_48 + lVar5 + -0x10),
(common_log_entry *)(uVar3 * 0x30 + lVar2));
lVar2 = *(long *)(this + 0x78);
uVar3 = (*(long *)(this + 0x90) + 1U) % (ulong)((*(long *)(this + 0x80) - lVar2) / 0x30);
*(ulong *)(this + 0x90) = uVar3;
uVar4 = uVar4 + 1;
lVar5 = lVar5 + 0x30;
} while (uVar3 != *(ulong *)(this + 0x98));
*(int8 *)(this + 0x90) = 0;
*(ulong *)(this + 0x98) = uVar4;
while( true ) {
if ((ulong)((lStack_40 - local_48) / 0x30) <= uVar4) break;
/* try { // try from 00197b49 to 00197b52 has its CatchHandler @ 00197b9b */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(local_48 + lVar5),0x100);
uVar4 = uVar4 + 1;
lVar5 = lVar5 + 0x30;
}
std::vector<common_log_entry,std::allocator<common_log_entry>>::_M_move_assign
(this + 0x78,(vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48,
(lStack_40 - local_48) % 0x30);
std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48);
}
std::condition_variable::notify_one();
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
|
|
5,764 | translog_get_current_group_size | eloqsql/storage/maria/ma_loghandler.c | static translog_size_t translog_get_current_group_size()
{
/* buffer rest in full pages */
translog_size_t buffer_rest= translog_get_current_buffer_rest();
DBUG_ENTER("translog_get_current_group_size");
DBUG_PRINT("info", ("buffer_rest in pages: %u", buffer_rest));
buffer_rest*= log_descriptor.page_capacity_chunk_2;
/* in case of only half of buffer free we can write this and next buffer */
if (buffer_rest < log_descriptor.half_buffer_capacity_chunk_2)
{
DBUG_PRINT("info", ("buffer_rest: %lu -> add %lu",
(ulong) buffer_rest,
(ulong) log_descriptor.buffer_capacity_chunk_2));
buffer_rest+= log_descriptor.buffer_capacity_chunk_2;
}
DBUG_PRINT("info", ("buffer_rest: %lu", (ulong) buffer_rest));
DBUG_RETURN(buffer_rest);
} | O0 | c | translog_get_current_group_size:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x396b0
movl %eax, -0x4(%rbp)
jmp 0x39672
movzwl 0x43f61d(%rip), %eax # 0x478c96
imull -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x43f607(%rip), %eax # 0x478c90
jae 0x3969b
jmp 0x3968d
jmp 0x3968f
movl 0x43f5f7(%rip), %eax # 0x478c8c
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3969d
jmp 0x3969f
jmp 0x396a1
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
| translog_get_current_group_size:
push rbp
mov rbp, rsp
sub rsp, 10h
call translog_get_current_buffer_rest
mov [rbp+var_4], eax
jmp short $+2
loc_39672:
movzx eax, cs:word_478C96
imul eax, [rbp+var_4]
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
cmp eax, cs:dword_478C90
jnb short loc_3969B
jmp short $+2
loc_3968D:
jmp short $+2
loc_3968F:
mov eax, cs:dword_478C8C
add eax, [rbp+var_4]
mov [rbp+var_4], eax
loc_3969B:
jmp short $+2
loc_3969D:
jmp short $+2
loc_3969F:
jmp short $+2
loc_396A1:
mov eax, [rbp+var_4]
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
add rsp, 10h
pop rbp
retn
| long long translog_get_current_group_size()
{
unsigned int v1; // [rsp+Ch] [rbp-4h]
v1 = translog_get_current_buffer_rest() * (unsigned __int16)word_478C96;
if ( v1 < dword_478C90 )
v1 += dword_478C8C;
return v1;
}
| translog_get_current_group_size:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
CALL 0x001396b0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00139672
LAB_00139672:
MOVZX EAX,word ptr [0x00578c96]
IMUL EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
CMP EAX,dword ptr [0x00578c90]
JNC 0x0013969b
JMP 0x0013968d
LAB_0013968d:
JMP 0x0013968f
LAB_0013968f:
MOV EAX,dword ptr [0x00578c8c]
ADD EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
LAB_0013969b:
JMP 0x0013969d
LAB_0013969d:
JMP 0x0013969f
LAB_0013969f:
JMP 0x001396a1
LAB_001396a1:
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
uint translog_get_current_group_size(void)
{
int iVar1;
int4 local_c;
iVar1 = translog_get_current_buffer_rest();
local_c = (uint)DAT_00578c96 * iVar1;
if (local_c < DAT_00578c90) {
local_c = DAT_00578c8c + local_c;
}
return local_c;
}
|
|
5,765 | LefDefParser::defwRow(char const*, char const*, int, int, int, int, int, int, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwRow(const char *rowName,
const char *rowType,
int x_orig,
int y_orig,
int orient,
int do_count,
int do_increment,
int do_x,
int do_y)
{
defwFunc = DEFW_ROW; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (!defwDidInit)
return DEFW_BAD_ORDER;
if (defwState == DEFW_ROW)
fprintf(defwFile, ";\n");// add the ; and newline for the previous row.
// required
if ((rowName == 0) || (*rowName == 0) || (rowType == 0) || (*rowType == 0))
return DEFW_BAD_DATA;
// do not have ; because the row may have properties
// do not end with newline, if there is no property, ; need to be concat.
fprintf(defwFile, "ROW %s %s %d %d %s ", rowName, rowType, x_orig, y_orig,
defwOrient(orient));
if ((do_count != 0) || (do_increment != 0)) {
fprintf(defwFile, "DO %d BY %d ", do_count, do_increment);
if ((do_x != 0) || (do_y != 0))
fprintf(defwFile, "STEP %d %d ", do_x, do_y);
}
defwLines++;
defwState = DEFW_ROW;
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwRow(char const*, char const*, int, int, int, int, int, int, int):
subq $0x58, %rsp
movl 0x70(%rsp), %eax
movl 0x68(%rsp), %eax
movl 0x60(%rsp), %eax
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movl %edx, 0x3c(%rsp)
movl %ecx, 0x38(%rsp)
movl %r8d, 0x34(%rsp)
movl %r9d, 0x30(%rsp)
leaq 0x18ef5(%rip), %rax # 0x2b168
movl $0x10, (%rax)
leaq 0x18ed8(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x12293
movl $0x1, 0x54(%rsp)
jmp 0x123f6
leaq 0x18eda(%rip), %rax # 0x2b174
cmpl $0x0, (%rax)
jne 0x122ac
movl $0x2, 0x54(%rsp)
jmp 0x123f6
leaq 0x18eb1(%rip), %rax # 0x2b164
cmpl $0x10, (%rax)
jne 0x122d0
leaq 0x18e99(%rip), %rax # 0x2b158
movq (%rax), %rdi
leaq 0x11b8a(%rip), %rsi # 0x23e53
movb $0x0, %al
callq 0x10f0
cmpq $0x0, 0x48(%rsp)
je 0x122fa
movq 0x48(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x122fa
cmpq $0x0, 0x40(%rsp)
je 0x122fa
movq 0x40(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x12307
movl $0x3, 0x54(%rsp)
jmp 0x123f6
leaq 0x18e4a(%rip), %rax # 0x2b158
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, 0x28(%rsp)
movl 0x38(%rsp), %eax
movl %eax, 0x2c(%rsp)
movl 0x34(%rsp), %edi
callq 0x12150
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl 0x28(%rsp), %r8d
movl 0x2c(%rsp), %r9d
leaq 0x11d65(%rip), %rsi # 0x240c8
movq %rax, (%rsp)
movb $0x0, %al
callq 0x10f0
cmpl $0x0, 0x30(%rsp)
jne 0x1237c
cmpl $0x0, 0x60(%rsp)
je 0x123cc
leaq 0x18dd5(%rip), %rax # 0x2b158
movq (%rax), %rdi
movl 0x30(%rsp), %edx
movl 0x60(%rsp), %ecx
leaq 0x11d47(%rip), %rsi # 0x240dc
movb $0x0, %al
callq 0x10f0
cmpl $0x0, 0x68(%rsp)
jne 0x123aa
cmpl $0x0, 0x70(%rsp)
je 0x123ca
leaq 0x18da7(%rip), %rax # 0x2b158
movq (%rax), %rdi
movl 0x68(%rsp), %edx
movl 0x70(%rsp), %ecx
leaq 0x11d26(%rip), %rsi # 0x240e9
movb $0x0, %al
callq 0x10f0
jmp 0x123cc
leaq 0x18d8d(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x18d81(%rip), %rax # 0x2b160
movl %ecx, (%rax)
leaq 0x18d7c(%rip), %rax # 0x2b164
movl $0x10, (%rax)
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nop
| _ZN12LefDefParser7defwRowEPKcS1_iiiiiii:
sub rsp, 58h
mov eax, [rsp+58h+arg_10]
mov eax, [rsp+58h+arg_8]
mov eax, [rsp+58h+arg_0]
mov [rsp+58h+var_10], rdi
mov [rsp+58h+var_18], rsi
mov [rsp+58h+var_1C], edx
mov dword ptr [rsp+58h+var_24+4], ecx
mov dword ptr [rsp+58h+var_24], r8d
mov [rsp+58h+var_28], r9d
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 10h
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_12293
mov [rsp+58h+var_4], 1
jmp loc_123F6
loc_12293:
lea rax, _ZN12LefDefParser11defwDidInitE; LefDefParser::defwDidInit
cmp dword ptr [rax], 0
jnz short loc_122AC
mov [rsp+58h+var_4], 2
jmp loc_123F6
loc_122AC:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 10h
jnz short loc_122D0
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
lea rsi, aDividercharS+11h; int
mov al, 0
call _fprintf
loc_122D0:
cmp [rsp+58h+var_10], 0
jz short loc_122FA
mov rax, [rsp+58h+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_122FA
cmp [rsp+58h+var_18], 0
jz short loc_122FA
mov rax, [rsp+58h+var_18]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_12307
loc_122FA:
mov [rsp+58h+var_4], 3
jmp loc_123F6
loc_12307:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rax, [rax]
mov [rsp+58h+var_48], rax
mov rax, [rsp+58h+var_10]
mov [rsp+58h+var_40], rax
mov rax, [rsp+58h+var_18]
mov [rsp+58h+var_38], rax
mov eax, [rsp+58h+var_1C]
mov [rsp+58h+var_30], eax
mov eax, dword ptr [rsp+58h+var_24+4]
mov [rsp+58h+var_2C], eax
mov edi, dword ptr [rsp+58h+var_24]; this
call _ZN12LefDefParser10defwOrientEi; LefDefParser::defwOrient(int)
mov rdi, [rsp+58h+var_48]
mov rdx, [rsp+58h+var_40]
mov rcx, [rsp+58h+var_38]
mov r8d, [rsp+58h+var_30]
mov r9d, [rsp+58h+var_2C]
lea rsi, aRowSSDDS; "ROW %s %s %d %d %s "
mov [rsp+58h+var_58], rax
mov al, 0
call _fprintf
cmp [rsp+58h+var_28], 0
jnz short loc_1237C
cmp [rsp+58h+arg_0], 0
jz short loc_123CC
loc_1237C:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov edx, [rsp+58h+var_28]
mov ecx, [rsp+58h+arg_0]
lea rsi, aDoDByD; "DO %d BY %d "
mov al, 0
call _fprintf
cmp [rsp+58h+arg_8], 0
jnz short loc_123AA
cmp [rsp+58h+arg_10], 0
jz short loc_123CA
loc_123AA:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov edx, [rsp+58h+arg_8]
mov ecx, [rsp+58h+arg_10]
lea rsi, aStepDD; "STEP %d %d "
mov al, 0
call _fprintf
loc_123CA:
jmp short $+2
loc_123CC:
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 10h
mov [rsp+58h+var_4], 0
loc_123F6:
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
| long long LefDefParser::defwRow(
LefDefParser *this,
const char *a2,
const char *a3,
int a4,
unsigned int a5,
int a6,
int a7,
int a8,
int a9)
{
LefDefParser *v9; // rax
long long v11; // [rsp+10h] [rbp-48h]
int v15; // [rsp+3Ch] [rbp-1Ch]
const char *v16; // [rsp+40h] [rbp-18h]
v16 = a2;
v15 = (int)a3;
LefDefParser::defwFunc = 16;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwDidInit )
{
if ( LefDefParser::defwState == 16 )
{
a2 = ";\n";
fprintf(LefDefParser::defwFile, ";\n");
}
if ( this && *(_BYTE *)this && v16 && *v16 )
{
v11 = LefDefParser::defwFile;
v9 = LefDefParser::defwOrient((LefDefParser *)a5, a2);
fprintf(v11, "ROW %s %s %d %d %s ", (const char *)this, v16, v15, a4, (const char *)v9);
if ( a6 || a7 )
{
fprintf(LefDefParser::defwFile, "DO %d BY %d ", a6, a7);
if ( a8 || a9 )
fprintf(LefDefParser::defwFile, "STEP %d %d ", a8, a9);
}
++LefDefParser::defwLines;
LefDefParser::defwState = 16;
return 0;
}
else
{
return 3;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| defwRow:
SUB RSP,0x58
MOV EAX,dword ptr [RSP + 0x70]
MOV EAX,dword ptr [RSP + 0x68]
MOV EAX,dword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
MOV dword ptr [RSP + 0x3c],EDX
MOV dword ptr [RSP + 0x38],ECX
MOV dword ptr [RSP + 0x34],R8D
MOV dword ptr [RSP + 0x30],R9D
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x10
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x00112293
MOV dword ptr [RSP + 0x54],0x1
JMP 0x001123f6
LAB_00112293:
LEA RAX,[0x12b174]
CMP dword ptr [RAX],0x0
JNZ 0x001122ac
MOV dword ptr [RSP + 0x54],0x2
JMP 0x001123f6
LAB_001122ac:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x10
JNZ 0x001122d0
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x123e53]
MOV AL,0x0
CALL 0x001010f0
LAB_001122d0:
CMP qword ptr [RSP + 0x48],0x0
JZ 0x001122fa
MOV RAX,qword ptr [RSP + 0x48]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001122fa
CMP qword ptr [RSP + 0x40],0x0
JZ 0x001122fa
MOV RAX,qword ptr [RSP + 0x40]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x00112307
LAB_001122fa:
MOV dword ptr [RSP + 0x54],0x3
JMP 0x001123f6
LAB_00112307:
LEA RAX,[0x12b158]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x20],RAX
MOV EAX,dword ptr [RSP + 0x3c]
MOV dword ptr [RSP + 0x28],EAX
MOV EAX,dword ptr [RSP + 0x38]
MOV dword ptr [RSP + 0x2c],EAX
MOV EDI,dword ptr [RSP + 0x34]
CALL 0x00112150
MOV RDI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOV R8D,dword ptr [RSP + 0x28]
MOV R9D,dword ptr [RSP + 0x2c]
LEA RSI,[0x1240c8]
MOV qword ptr [RSP],RAX
MOV AL,0x0
CALL 0x001010f0
CMP dword ptr [RSP + 0x30],0x0
JNZ 0x0011237c
CMP dword ptr [RSP + 0x60],0x0
JZ 0x001123cc
LAB_0011237c:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RSP + 0x30]
MOV ECX,dword ptr [RSP + 0x60]
LEA RSI,[0x1240dc]
MOV AL,0x0
CALL 0x001010f0
CMP dword ptr [RSP + 0x68],0x0
JNZ 0x001123aa
CMP dword ptr [RSP + 0x70],0x0
JZ 0x001123ca
LAB_001123aa:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RSP + 0x68]
MOV ECX,dword ptr [RSP + 0x70]
LEA RSI,[0x1240e9]
MOV AL,0x0
CALL 0x001010f0
LAB_001123ca:
JMP 0x001123cc
LAB_001123cc:
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x10
MOV dword ptr [RSP + 0x54],0x0
LAB_001123f6:
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
/* LefDefParser::defwRow(char const*, char const*, int, int, int, int, int, int, int) */
int4
LefDefParser::defwRow
(char *param_1,char *param_2,int param_3,int param_4,int param_5,int param_6,int param_7,
int param_8,int param_9)
{
FILE *__stream;
int8 uVar1;
int4 local_4;
defwFunc = 0x10;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else if (defwDidInit == 0) {
local_4 = 2;
}
else {
if (defwState == 0x10) {
fprintf(defwFile,";\n");
}
__stream = defwFile;
if ((((param_1 == (char *)0x0) || (*param_1 == '\0')) || (param_2 == (char *)0x0)) ||
(*param_2 == '\0')) {
local_4 = 3;
}
else {
uVar1 = defwOrient(param_5);
fprintf(__stream,"ROW %s %s %d %d %s ",param_1,param_2,(ulong)(uint)param_3,
(ulong)(uint)param_4,uVar1);
if (((param_6 != 0) || (param_7 != 0)) &&
((fprintf(defwFile,"DO %d BY %d ",(ulong)(uint)param_6,(ulong)(uint)param_7), param_8 != 0
|| (param_9 != 0)))) {
fprintf(defwFile,"STEP %d %d ",(ulong)(uint)param_8,(ulong)(uint)param_9);
}
defwLines = defwLines + 1;
defwState = 0x10;
local_4 = 0;
}
}
return local_4;
}
|
|
5,766 | LefDefParser::defwRow(char const*, char const*, int, int, int, int, int, int, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwRow(const char *rowName,
const char *rowType,
int x_orig,
int y_orig,
int orient,
int do_count,
int do_increment,
int do_x,
int do_y)
{
defwFunc = DEFW_ROW; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (!defwDidInit)
return DEFW_BAD_ORDER;
if (defwState == DEFW_ROW)
fprintf(defwFile, ";\n");// add the ; and newline for the previous row.
// required
if ((rowName == 0) || (*rowName == 0) || (rowType == 0) || (*rowType == 0))
return DEFW_BAD_DATA;
// do not have ; because the row may have properties
// do not end with newline, if there is no property, ; need to be concat.
fprintf(defwFile, "ROW %s %s %d %d %s ", rowName, rowType, x_orig, y_orig,
defwOrient(orient));
if ((do_count != 0) || (do_increment != 0)) {
fprintf(defwFile, "DO %d BY %d ", do_count, do_increment);
if ((do_x != 0) || (do_y != 0))
fprintf(defwFile, "STEP %d %d ", do_x, do_y);
}
defwLines++;
defwState = DEFW_ROW;
return DEFW_OK;
} | O3 | cpp | LefDefParser::defwRow(char const*, char const*, int, int, int, int, int, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r14d
movl %edx, %r15d
leaq 0x15e3d(%rip), %rax # 0x1e178
movl $0x10, (%rax)
leaq 0x15e20(%rip), %rdx # 0x1e168
movq (%rdx), %rcx
testq %rcx, %rcx
je 0x83e5
leaq 0x15e29(%rip), %rax # 0x1e184
cmpl $0x0, (%rax)
je 0x83ef
movl %r8d, %ebx
movq %rsi, %r12
movq %rdi, %r13
leaq 0x15e00(%rip), %rax # 0x1e174
cmpl $0x10, (%rax)
jne 0x839c
leaq 0xcc12(%rip), %rdi # 0x14f92
movl $0x2, %esi
movl $0x1, %edx
movl %r9d, %ebp
callq 0x1110
movl %ebp, %r9d
leaq 0x15dcc(%rip), %rdx # 0x1e168
movl $0x3, %ebp
testq %r13, %r13
je 0x8489
testq %r12, %r12
je 0x8489
cmpb $0x0, (%r13)
je 0x8489
cmpb $0x0, (%r12)
je 0x8489
movq (%rdx), %rdi
cmpl $0x7, %ebx
movl %r9d, 0x14(%rsp)
ja 0x83f9
movl %ebx, %eax
leaq 0x13969(%rip), %rcx # 0x1bd48
movq (%rcx,%rax,8), %rax
jmp 0x8400
movl $0x1, %ebp
jmp 0x8489
movl $0x2, %ebp
jmp 0x8489
leaq 0xce00(%rip), %rax # 0x15200
movq %rax, (%rsp)
leaq 0xcdfc(%rip), %rsi # 0x15207
xorl %ebp, %ebp
movq %r13, %rdx
movq %r12, %rcx
movl %r15d, %r8d
movl %r14d, %r9d
xorl %eax, %eax
callq 0x10e0
movl 0x50(%rsp), %ecx
movl %ecx, %eax
movl 0x14(%rsp), %edx
orl %edx, %eax
je 0x8473
movl 0x60(%rsp), %ebx
movl 0x58(%rsp), %r14d
leaq 0x15d2a(%rip), %rax # 0x1e168
movq (%rax), %rdi
leaq 0xcdd3(%rip), %rsi # 0x1521b
xorl %eax, %eax
callq 0x10e0
movl %ebx, %eax
orl %r14d, %eax
je 0x8473
leaq 0x15d0b(%rip), %rax # 0x1e168
movq (%rax), %rdi
leaq 0xcdc1(%rip), %rsi # 0x15228
movl %r14d, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x10e0
leaq 0x15cf6(%rip), %rax # 0x1e170
incl (%rax)
leaq 0x15cf1(%rip), %rax # 0x1e174
movl $0x10, (%rax)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12LefDefParser7defwRowEPKcS1_iiiiiii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14d, ecx
mov r15d, edx
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 10h
lea rdx, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rcx, [rdx]
test rcx, rcx
jz loc_83E5
lea rax, _ZN12LefDefParser11defwDidInitE; LefDefParser::defwDidInit
cmp dword ptr [rax], 0
jz loc_83EF
mov ebx, r8d
mov r12, rsi
mov r13, rdi
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 10h
jnz short loc_839C
lea rdi, aDividercharS+11h; ";\n"
mov esi, 2
mov edx, 1
mov ebp, r9d
call _fwrite
mov r9d, ebp
lea rdx, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
loc_839C:
mov ebp, 3
test r13, r13
jz loc_8489
test r12, r12
jz loc_8489
cmp byte ptr [r13+0], 0
jz loc_8489
cmp byte ptr [r12], 0
jz loc_8489
mov rdi, [rdx]
cmp ebx, 7
mov [rsp+48h+var_34], r9d
ja short loc_83F9
mov eax, ebx
lea rcx, off_1BD48; "N"
mov rax, [rcx+rax*8]
jmp short loc_8400
loc_83E5:
mov ebp, 1
jmp loc_8489
loc_83EF:
mov ebp, 2
jmp loc_8489
loc_83F9:
lea rax, aBogus; "BOGUS "
loc_8400:
mov [rsp+48h+var_48], rax
lea rsi, aRowSSDDS; "ROW %s %s %d %d %s "
xor ebp, ebp
mov rdx, r13
mov rcx, r12
mov r8d, r15d
mov r9d, r14d
xor eax, eax
call _fprintf
mov ecx, [rsp+48h+arg_0]
mov eax, ecx
mov edx, [rsp+48h+var_34]
or eax, edx
jz short loc_8473
mov ebx, [rsp+48h+arg_10]
mov r14d, [rsp+48h+arg_8]
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
lea rsi, aDoDByD; "DO %d BY %d "
xor eax, eax
call _fprintf
mov eax, ebx
or eax, r14d
jz short loc_8473
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
lea rsi, aStepDD; "STEP %d %d "
mov edx, r14d
mov ecx, ebx
xor eax, eax
call _fprintf
loc_8473:
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
inc dword ptr [rax]
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 10h
loc_8489:
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::defwRow(
LefDefParser *this,
const char *a2,
const char *a3,
int a4,
unsigned int a5,
int a6,
int a7,
int a8,
int a9)
{
int v10; // r15d
int v12; // ebp
unsigned int v13; // ebp
const char *v14; // rax
int v16; // [rsp+14h] [rbp-34h]
v10 = (int)a3;
LefDefParser::defwFunc = 16;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwDidInit )
{
if ( LefDefParser::defwState == 16 )
{
v12 = a6;
fwrite(";\n", 2LL, 1LL, LefDefParser::defwFile);
a6 = v12;
}
v13 = 3;
if ( this && a2 && *(_BYTE *)this && *a2 )
{
v16 = a6;
if ( a5 > 7 )
v14 = "BOGUS ";
else
v14 = (const char *)*(&off_1BD48 + a5);
v13 = 0;
fprintf(LefDefParser::defwFile, "ROW %s %s %d %d %s ", (const char *)this, a2, v10, a4, v14);
if ( v16 | a7 )
{
fprintf(LefDefParser::defwFile, "DO %d BY %d ", v16, a7);
if ( a8 | a9 )
fprintf(LefDefParser::defwFile, "STEP %d %d ", a8, a9);
}
++LefDefParser::defwLines;
LefDefParser::defwState = 16;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
return v13;
}
| defwRow:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14D,ECX
MOV R15D,EDX
LEA RAX,[0x11e178]
MOV dword ptr [RAX],0x10
LEA RDX,[0x11e168]
MOV RCX,qword ptr [RDX]
TEST RCX,RCX
JZ 0x001083e5
LEA RAX,[0x11e184]
CMP dword ptr [RAX],0x0
JZ 0x001083ef
MOV EBX,R8D
MOV R12,RSI
MOV R13,RDI
LEA RAX,[0x11e174]
CMP dword ptr [RAX],0x10
JNZ 0x0010839c
LEA RDI,[0x114f92]
MOV ESI,0x2
MOV EDX,0x1
MOV EBP,R9D
CALL 0x00101110
MOV R9D,EBP
LEA RDX,[0x11e168]
LAB_0010839c:
MOV EBP,0x3
TEST R13,R13
JZ 0x00108489
TEST R12,R12
JZ 0x00108489
CMP byte ptr [R13],0x0
JZ 0x00108489
CMP byte ptr [R12],0x0
JZ 0x00108489
MOV RDI,qword ptr [RDX]
CMP EBX,0x7
MOV dword ptr [RSP + 0x14],R9D
JA 0x001083f9
MOV EAX,EBX
LEA RCX,[0x11bd48]
MOV RAX,qword ptr [RCX + RAX*0x8]
JMP 0x00108400
LAB_001083e5:
MOV EBP,0x1
JMP 0x00108489
LAB_001083ef:
MOV EBP,0x2
JMP 0x00108489
LAB_001083f9:
LEA RAX,[0x115200]
LAB_00108400:
MOV qword ptr [RSP],RAX
LEA RSI,[0x115207]
XOR EBP,EBP
MOV RDX,R13
MOV RCX,R12
MOV R8D,R15D
MOV R9D,R14D
XOR EAX,EAX
CALL 0x001010e0
MOV ECX,dword ptr [RSP + 0x50]
MOV EAX,ECX
MOV EDX,dword ptr [RSP + 0x14]
OR EAX,EDX
JZ 0x00108473
MOV EBX,dword ptr [RSP + 0x60]
MOV R14D,dword ptr [RSP + 0x58]
LEA RAX,[0x11e168]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x11521b]
XOR EAX,EAX
CALL 0x001010e0
MOV EAX,EBX
OR EAX,R14D
JZ 0x00108473
LEA RAX,[0x11e168]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x115228]
MOV EDX,R14D
MOV ECX,EBX
XOR EAX,EAX
CALL 0x001010e0
LAB_00108473:
LEA RAX,[0x11e170]
INC dword ptr [RAX]
LEA RAX,[0x11e174]
MOV dword ptr [RAX],0x10
LAB_00108489:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defwRow(char const*, char const*, int, int, int, int, int, int, int) */
int8
LefDefParser::defwRow
(char *param_1,char *param_2,int param_3,int param_4,int param_5,int param_6,int param_7,
int param_8,int param_9)
{
char *pcVar1;
int8 uVar2;
defwFunc = 0x10;
if (defwFile == (FILE *)0x0) {
uVar2 = 1;
}
else if (defwDidInit == 0) {
uVar2 = 2;
}
else {
if (defwState == 0x10) {
fwrite(";\n",2,1,defwFile);
}
uVar2 = 3;
if ((((param_1 != (char *)0x0) && (param_2 != (char *)0x0)) && (*param_1 != '\0')) &&
(*param_2 != '\0')) {
if ((uint)param_5 < 8) {
pcVar1 = (&PTR_DAT_0011bd48)[(uint)param_5];
}
else {
pcVar1 = "BOGUS ";
}
uVar2 = 0;
fprintf(defwFile,"ROW %s %s %d %d %s ",param_1,param_2,(ulong)(uint)param_3,
(ulong)(uint)param_4,pcVar1);
if (param_7 != 0 || param_6 != 0) {
fprintf(defwFile,"DO %d BY %d ");
if (param_9 != 0 || param_8 != 0) {
fprintf(defwFile,"STEP %d %d ",(ulong)(uint)param_8,(ulong)(uint)param_9);
}
}
defwLines = defwLines + 1;
defwState = 0x10;
}
}
return uVar2;
}
|
|
5,767 | ma_split_page | eloqsql/storage/maria/ma_write.c | int _ma_split_page(MARIA_HA *info, MARIA_KEY *key, MARIA_PAGE *split_page,
uint org_split_length,
uchar *inserted_key_pos, uint changed_length,
int move_length,
uchar *key_buff, my_bool insert_last_key)
{
uint keynr;
uint length,a_length,key_ref_length,t_length,nod_flag,key_length;
uint page_length, split_length, page_flag;
uchar *key_pos, *pos, *UNINIT_VAR(after_key);
MARIA_KEY_PARAM s_temp;
MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link;
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *keyinfo= key->keyinfo;
MARIA_KEY tmp_key;
MARIA_PAGE new_page;
int res;
DBUG_ENTER("_ma_split_page");
DBUG_DUMP("buff", split_page->buff, split_page->size);
info->page_changed=1; /* Info->buff is used */
info->keyread_buff_used=1;
page_flag= split_page->flag;
nod_flag= split_page->node;
key_ref_length= share->keypage_header + nod_flag;
new_page.info= info;
new_page.buff= info->buff;
new_page.keyinfo= keyinfo;
tmp_key.data= key_buff;
tmp_key.keyinfo= keyinfo;
if (insert_last_key)
key_pos= _ma_find_last_pos(&tmp_key, split_page, &after_key);
else
key_pos= _ma_find_half_pos(&tmp_key, split_page, &after_key);
if (!key_pos)
DBUG_RETURN(-1);
key_length= tmp_key.data_length + tmp_key.ref_length;
split_length= (uint) (key_pos - split_page->buff);
a_length= split_page->size;
split_page->size= split_length;
page_store_size(share, split_page);
key_pos=after_key;
if (nod_flag)
{
DBUG_PRINT("test",("Splitting nod"));
pos=key_pos-nod_flag;
memcpy(new_page.buff + share->keypage_header, pos, (size_t) nod_flag);
}
/* Move middle item to key and pointer to new page */
if ((new_page.pos= _ma_new(info, PAGECACHE_PRIORITY_HIGH, &page_link)) ==
HA_OFFSET_ERROR)
DBUG_RETURN(-1);
_ma_copy_key(key, &tmp_key);
_ma_kpointer(info, key->data + key_length, new_page.pos);
/* Store new page */
if (!(*keyinfo->get_key)(&tmp_key, page_flag, nod_flag, &key_pos))
DBUG_RETURN(-1);
t_length=(*keyinfo->pack_key)(&tmp_key, nod_flag, (uchar *) 0,
(uchar*) 0, (uchar*) 0, &s_temp);
length=(uint) ((split_page->buff + a_length) - key_pos);
memcpy(new_page.buff + key_ref_length + t_length, key_pos,
(size_t) length);
(*keyinfo->store_key)(keyinfo,new_page.buff+key_ref_length,&s_temp);
page_length= length + t_length + key_ref_length;
bzero(new_page.buff, share->keypage_header);
/* Copy KEYFLAG_FLAG_ISNODE and KEYPAGE_FLAG_HAS_TRANSID from parent page */
new_page.flag= page_flag;
new_page.size= page_length;
page_store_info(share, &new_page);
/* Copy key number */
keynr= _ma_get_keynr(share, split_page->buff);
_ma_store_keynr(share, new_page.buff, keynr);
res= 2; /* Middle key up */
if (share->now_transactional && _ma_log_new(&new_page, 0))
res= -1;
/*
Clear unitialized part of page to avoid valgrind/purify warnings
and to get a clean page that is easier to compress and compare with
pages generated with redo
*/
bzero(new_page.buff + page_length, share->block_size - page_length);
if (_ma_write_keypage(&new_page, page_link->write_lock,
DFLT_INIT_HITS))
res= -1;
/* Save changes to split pages */
if (share->now_transactional &&
_ma_log_split(split_page, org_split_length, split_length,
inserted_key_pos, changed_length, move_length,
KEY_OP_NONE, (uchar*) 0, 0, 0))
res= -1;
DBUG_DUMP_KEY("middle_key", key);
DBUG_RETURN(res);
} | O3 | c | ma_split_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xaf8, %rsp # imm = 0xAF8
movl %r9d, -0xa50(%rbp)
movq %r8, -0xa98(%rbp)
movl %ecx, -0xa4c(%rbp)
movq %rdx, %r12
movq %rdi, %rdx
movq 0x18(%rbp), %rdi
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0xb20(%rbp), %rax
movq %rax, -0xa80(%rbp)
movq (%rdx), %r15
movq %rsi, -0xaa0(%rbp)
movq 0x8(%rsi), %r14
movw $0x101, 0x684(%rdx) # imm = 0x101
movl 0x28(%r12), %ecx
movl 0x2c(%r12), %r8d
movl 0x744(%r15), %eax
movq %rcx, -0xab0(%rbp)
addl %ecx, %eax
movl %eax, -0xa2c(%rbp)
movq %rdx, -0xb08(%rbp)
movq %rdx, -0xaa8(%rbp)
movq 0x378(%rdx), %rax
movq %rax, -0xa78(%rbp)
movq %rax, -0xaf8(%rbp)
movq %r14, -0xb00(%rbp)
movq %rdi, -0xa70(%rbp)
movq %r14, -0xa68(%rbp)
cmpb $0x0, 0x20(%rbp)
movq %r15, -0xa28(%rbp)
movq %r12, -0xa18(%rbp)
movl %r8d, -0xa1c(%rbp)
je 0x65f64
movq (%r12), %r13
movq (%r13), %rsi
movl 0x744(%rsi), %edx
movl 0x20(%r12), %eax
subl %edx, %eax
movq 0x10(%r12), %r15
addq %rdx, %r15
movq %r15, -0xa38(%rbp)
testb $0x2e, 0xa2(%r14)
sete %r9b
testb $0x2, %r8b
sete %cl
andb %r9b, %cl
cmpb $0x1, %cl
jne 0x65f82
movzwl 0xaa(%r14), %ecx
xorl %edx, %edx
divl %ecx
addl $-0x2, %eax
imull %ecx, %eax
movl 0x740(%rsi), %edx
movl %ecx, %esi
subl %edx, %esi
movl %esi, -0xa60(%rbp)
movq (%r13), %rdx
movl 0x740(%rdx), %edx
movl %edx, -0xa5c(%rbp)
movl $0x0, -0xa58(%rbp)
addq %rax, %r15
leaq (%r15,%rcx), %rax
movq %rax, -0xa48(%rbp)
movq %r15, %rsi
movq %rcx, %rdx
callq 0x29080
movq %r15, %rbx
jmp 0x66056
leaq -0xa70(%rbp), %rdi
leaq -0xa48(%rbp), %rdx
movq %r12, %rsi
callq 0x66387
movq %rax, %rbx
jmp 0x6608a
movl %eax, %r12d
movq %rdx, %rbx
leaq -0xa10(%rbp), %rax
leaq -0xad0(%rbp), %rdi
movq %rax, (%rdi)
movq %r14, 0x8(%rdi)
movb $0x0, (%rax)
leaq -0xa38(%rbp), %rcx
movl %r8d, %esi
xorl %edx, %edx
callq *0xe0(%r14)
testl %eax, %eax
je 0x66047
movq %r13, -0xa40(%rbp)
movq %r14, %r13
movl -0xa1c(%rbp), %r14d
movl %r12d, %r12d
addq %r15, %r12
subq %rbx, %r12
leaq -0xa38(%rbp), %rcx
movq (%rcx), %rcx
movq %r15, %rbx
movq %rcx, %r15
movq -0xac0(%rbp), %rcx
movq %rcx, -0xa60(%rbp)
movl -0xab8(%rbp), %ecx
movl %ecx, -0xa58(%rbp)
movq -0xa70(%rbp), %rdi
movl %eax, %edx
leaq -0xa10(%rbp), %rsi
callq 0x29080
leaq -0xad0(%rbp), %rdi
movl %r14d, %esi
xorl %edx, %edx
leaq -0xa38(%rbp), %rcx
callq *0xe0(%r13)
testl %eax, %eax
je 0x66066
movq -0xa38(%rbp), %rcx
cmpq %r12, %rcx
jb 0x65fdf
movq %r15, -0xa48(%rbp)
jmp 0x66079
movq %r13, %rdi
movl $0x7e, %esi
callq 0x3659c
xorl %ebx, %ebx
movq -0xa18(%rbp), %r12
movq -0xa28(%rbp), %r15
jmp 0x6608a
movq -0xa40(%rbp), %rdi
movl $0x7e, %esi
callq 0x3659c
xorl %ebx, %ebx
movq -0xa18(%rbp), %r12
movq -0xa28(%rbp), %r15
movq %r13, %r14
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x66361
movq %r14, -0xa40(%rbp)
movl -0xa5c(%rbp), %r14d
addl -0xa60(%rbp), %r14d
movq 0x10(%r12), %rax
subq %rax, %rbx
movl 0x20(%r12), %r13d
movl %ebx, 0x20(%r12)
movl 0x744(%r15), %ecx
movb %bl, -0x1(%rax,%rcx)
movq 0x10(%r12), %rax
movl 0x744(%r15), %ecx
movq %rbx, -0xa90(%rbp)
movb %bh, -0x2(%rax,%rcx)
movq -0xa48(%rbp), %rsi
movq %rsi, -0xad0(%rbp)
movq -0xab0(%rbp), %r12
testq %r12, %r12
je 0x66114
subq %r12, %rsi
movl 0x744(%r15), %edi
addq -0xa78(%rbp), %rdi
movq %r12, %rdx
callq 0x29080
leaq -0xa80(%rbp), %rdx
movq -0xaa8(%rbp), %r15
movq %r15, %rdi
movl $0x6, %esi
callq 0x58e77
movq %rax, -0xaf0(%rbp)
cmpq $-0x1, %rax
je 0x662bd
movq %rax, %rbx
movq %r13, -0xa88(%rbp)
leaq -0xa70(%rbp), %rsi
movq -0xaa0(%rbp), %r13
movq %r13, %rdi
callq 0x36edc
movl %r14d, %esi
addq (%r13), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x56b0d
leaq -0xad0(%rbp), %rcx
leaq -0xa70(%rbp), %rdi
movl -0xa1c(%rbp), %esi
movl %r12d, %edx
movq -0xa40(%rbp), %r14
callq *0xe0(%r14)
testl %eax, %eax
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
je 0x66361
leaq -0xa70(%rbp), %rdi
leaq -0xa10(%rbp), %r9
movl %r12d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq *0xf0(%r14)
movq -0xa88(%rbp), %r13
movq -0xa18(%rbp), %rcx
addq 0x10(%rcx), %r13
movl %eax, %ebx
movq -0xad0(%rbp), %rsi
subq %rsi, %r13
movl -0xa2c(%rbp), %r12d
movq -0xa78(%rbp), %r15
addq %r15, %r12
movl %eax, %edi
addq %r12, %rdi
movl %r13d, %edx
callq 0x29080
movq %r14, %rdi
movq %r12, %rsi
leaq -0xa10(%rbp), %rdx
callq *0xf8(%r14)
addl -0xa2c(%rbp), %ebx
addl %r13d, %ebx
movq -0xa28(%rbp), %r14
movl 0x744(%r14), %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x292c0
movl -0xa1c(%rbp), %ecx
movl %ecx, -0xadc(%rbp)
movl %ebx, -0xae8(%rbp)
movl 0x744(%r14), %eax
addl $-0x3, %eax
movq %r15, %rdx
movb %cl, (%r15,%rax)
movl 0x744(%r14), %eax
movb %bl, -0x1(%r15,%rax)
movl 0x744(%r14), %eax
movl %ebx, %r12d
movb %bh, -0x2(%rdx,%rax)
movq -0xa18(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x744(%r14), %ecx
addl $-0x4, %ecx
movb (%rax,%rcx), %al
movb %al, (%r15,%rcx)
cmpb $0x0, 0x7e7(%r14)
je 0x662c7
leaq -0xb08(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x64c30
negb %al
movl $0x0, %r15d
sbbl %r15d, %r15d
orl $0x2, %r15d
movq 0x10(%r14), %rbx
jmp 0x662d0
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x66361
movq %r15, %rbx
movl $0x2, %r15d
movl %r12d, %edi
addq %rbx, %rdi
movq -0xa28(%rbp), %r14
movl 0x7bc(%r14), %edx
subl %r12d, %edx
xorl %esi, %esi
callq 0x292c0
movq -0xa80(%rbp), %rax
movl 0xc(%rax), %esi
leaq -0xb08(%rbp), %rdi
movl $0x3, %edx
callq 0x58b8d
negb %al
movl $0x0, %eax
sbbl %eax, %eax
orl %r15d, %eax
cmpb $0x0, 0x7e7(%r14)
je 0x66361
movl 0x10(%rbp), %r9d
xorl %ebx, %ebx
movq -0xa18(%rbp), %rdi
movl -0xa4c(%rbp), %esi
movq -0xa90(%rbp), %rdx
movq %rax, %r14
movq -0xa98(%rbp), %rcx
movl -0xa50(%rbp), %r8d
pushq %rbx
pushq %rbx
pushq $0x0
pushq %rbx
callq 0x6649f
addq $0x20, %rsp
negb %al
sbbl %ebx, %ebx
orl %r14d, %ebx
movl %ebx, %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x66382
addq $0xaf8, %rsp # imm = 0xAF8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| _ma_split_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0AF8h
mov [rbp+var_A50], r9d
mov [rbp+var_A98], r8
mov [rbp+var_A4C], ecx
mov r12, rdx
mov rdx, rdi
mov rdi, [rbp+arg_8]
mov rax, fs:28h
mov [rbp+var_30], rax
lea rax, [rbp+var_B20]
mov [rbp+var_A80], rax
mov r15, [rdx]
mov [rbp+var_AA0], rsi
mov r14, [rsi+8]
mov word ptr [rdx+684h], 101h
mov ecx, [r12+28h]
mov r8d, [r12+2Ch]
mov eax, [r15+744h]
mov [rbp+var_AB0], rcx
add eax, ecx
mov [rbp+var_A2C], eax
mov [rbp+var_B08], rdx
mov [rbp+var_AA8], rdx
mov rax, [rdx+378h]
mov [rbp+var_A78], rax
mov [rbp+var_AF8], rax
mov [rbp+var_B00], r14
mov [rbp+var_A70], rdi
mov [rbp+var_A68], r14
cmp [rbp+arg_10], 0
mov [rbp+var_A28], r15
mov [rbp+var_A18], r12
mov [rbp+var_A1C], r8d
jz loc_65F64
mov r13, [r12]
mov rsi, [r13+0]
mov edx, [rsi+744h]
mov eax, [r12+20h]
sub eax, edx
mov r15, [r12+10h]
add r15, rdx
mov [rbp+var_A38], r15
test byte ptr [r14+0A2h], 2Eh
setz r9b
test r8b, 2
setz cl
and cl, r9b
cmp cl, 1
jnz short loc_65F82
movzx ecx, word ptr [r14+0AAh]
xor edx, edx
div ecx
add eax, 0FFFFFFFEh
imul eax, ecx
mov edx, [rsi+740h]
mov esi, ecx
sub esi, edx
mov dword ptr [rbp+var_A60], esi
mov rdx, [r13+0]
mov edx, [rdx+740h]
mov dword ptr [rbp+var_A60+4], edx
mov [rbp+var_A58], 0
add r15, rax
lea rax, [r15+rcx]
mov [rbp+var_A48], rax
mov rsi, r15
mov rdx, rcx
call _memcpy
mov rbx, r15
jmp loc_66056
loc_65F64:
lea rdi, [rbp+var_A70]
lea rdx, [rbp+var_A48]
mov rsi, r12
call _ma_find_half_pos
mov rbx, rax
jmp loc_6608A
loc_65F82:
mov r12d, eax
mov rbx, rdx
lea rax, [rbp+var_A10]
lea rdi, [rbp+var_AD0]
mov [rdi], rax
mov [rdi+8], r14
mov byte ptr [rax], 0
lea rcx, [rbp+var_A38]
mov esi, r8d
xor edx, edx
call qword ptr [r14+0E0h]
test eax, eax
jz loc_66047
mov [rbp+var_A40], r13
mov r13, r14
mov r14d, [rbp+var_A1C]
mov r12d, r12d
add r12, r15
sub r12, rbx
lea rcx, [rbp+var_A38]
mov rcx, [rcx]
loc_65FDF:
mov rbx, r15
mov r15, rcx
mov rcx, [rbp+var_AC0]
mov [rbp+var_A60], rcx
mov ecx, [rbp+var_AB8]
mov [rbp+var_A58], ecx
mov rdi, [rbp+var_A70]
mov edx, eax
lea rsi, [rbp+var_A10]
call _memcpy
lea rdi, [rbp+var_AD0]
mov esi, r14d
xor edx, edx
lea rcx, [rbp+var_A38]
call qword ptr [r13+0E0h]
test eax, eax
jz short loc_66066
mov rcx, [rbp+var_A38]
cmp rcx, r12
jb short loc_65FDF
mov [rbp+var_A48], r15
jmp short loc_66079
loc_66047:
mov rdi, r13
mov esi, 7Eh ; '~'
call _ma_set_fatal_error
xor ebx, ebx
loc_66056:
mov r12, [rbp+var_A18]
mov r15, [rbp+var_A28]
jmp short loc_6608A
loc_66066:
mov rdi, [rbp+var_A40]
mov esi, 7Eh ; '~'
call _ma_set_fatal_error
xor ebx, ebx
loc_66079:
mov r12, [rbp+var_A18]
mov r15, [rbp+var_A28]
mov r14, r13
loc_6608A:
mov eax, 0FFFFFFFFh
test rbx, rbx
jz loc_66361
mov [rbp+var_A40], r14
mov r14d, dword ptr [rbp+var_A60+4]
add r14d, dword ptr [rbp+var_A60]
mov rax, [r12+10h]
sub rbx, rax
mov r13d, [r12+20h]
mov [r12+20h], ebx
mov ecx, [r15+744h]
mov [rax+rcx-1], bl
mov rax, [r12+10h]
mov ecx, [r15+744h]
mov [rbp+var_A90], rbx
mov [rax+rcx-2], bh
mov rsi, [rbp+var_A48]
mov [rbp+var_AD0], rsi
mov r12, [rbp+var_AB0]
test r12, r12
jz short loc_66114
sub rsi, r12
mov edi, [r15+744h]
add rdi, [rbp+var_A78]
mov rdx, r12
call _memcpy
loc_66114:
lea rdx, [rbp+var_A80]
mov r15, [rbp+var_AA8]
mov rdi, r15
mov esi, 6
call _ma_new
mov [rbp+var_AF0], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_662BD
mov rbx, rax
mov [rbp+var_A88], r13
lea rsi, [rbp+var_A70]
mov r13, [rbp+var_AA0]
mov rdi, r13
call _ma_copy_key
mov esi, r14d
add rsi, [r13+0]
mov rdi, r15
mov rdx, rbx
call _ma_kpointer
lea rcx, [rbp+var_AD0]
lea rdi, [rbp+var_A70]
mov esi, [rbp+var_A1C]
mov edx, r12d
mov r14, [rbp+var_A40]
call qword ptr [r14+0E0h]
test eax, eax
mov eax, 0FFFFFFFFh
jz loc_66361
lea rdi, [rbp+var_A70]
lea r9, [rbp+var_A10]
mov esi, r12d
xor edx, edx
xor ecx, ecx
xor r8d, r8d
call qword ptr [r14+0F0h]
mov r13, [rbp+var_A88]
mov rcx, [rbp+var_A18]
add r13, [rcx+10h]
mov ebx, eax
mov rsi, [rbp+var_AD0]
sub r13, rsi
mov r12d, [rbp+var_A2C]
mov r15, [rbp+var_A78]
add r12, r15
mov edi, eax
add rdi, r12
mov edx, r13d
call _memcpy
mov rdi, r14
mov rsi, r12
lea rdx, [rbp+var_A10]
call qword ptr [r14+0F8h]
add ebx, [rbp+var_A2C]
add ebx, r13d
mov r14, [rbp+var_A28]
mov edx, [r14+744h]
mov rdi, r15
xor esi, esi
call _memset
mov ecx, [rbp+var_A1C]
mov [rbp+var_ADC], ecx
mov [rbp+var_AE8], ebx
mov eax, [r14+744h]
add eax, 0FFFFFFFDh
mov rdx, r15
mov [r15+rax], cl
mov eax, [r14+744h]
mov [r15+rax-1], bl
mov eax, [r14+744h]
mov r12d, ebx
mov [rdx+rax-2], bh
mov rax, [rbp+var_A18]
mov rax, [rax+10h]
mov ecx, [r14+744h]
add ecx, 0FFFFFFFCh
mov al, [rax+rcx]
mov [r15+rcx], al
cmp byte ptr [r14+7E7h], 0
jz short loc_662C7
lea r14, [rbp+var_B08]
mov rdi, r14
xor esi, esi
call _ma_log_new
neg al
mov r15d, 0
sbb r15d, r15d
or r15d, 2
mov rbx, [r14+10h]
jmp short loc_662D0
loc_662BD:
mov eax, 0FFFFFFFFh
jmp loc_66361
loc_662C7:
mov rbx, r15
mov r15d, 2
loc_662D0:
mov edi, r12d
add rdi, rbx
mov r14, [rbp+var_A28]
mov edx, [r14+7BCh]
sub edx, r12d
xor esi, esi
call _memset
mov rax, [rbp+var_A80]
mov esi, [rax+0Ch]
lea rdi, [rbp+var_B08]
mov edx, 3
call _ma_write_keypage
neg al
mov eax, 0
sbb eax, eax
or eax, r15d
cmp byte ptr [r14+7E7h], 0
jz short loc_66361
mov r9d, [rbp+arg_0]
xor ebx, ebx
mov rdi, [rbp+var_A18]
mov esi, [rbp+var_A4C]
mov rdx, [rbp+var_A90]
mov r14, rax
mov rcx, [rbp+var_A98]
mov r8d, [rbp+var_A50]
push rbx
push rbx
push 0
push rbx
call _ma_log_split
add rsp, 20h
neg al
sbb ebx, ebx
or ebx, r14d
mov eax, ebx
loc_66361:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_66382
add rsp, 0AF8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_66382:
call ___stack_chk_fail
| long long ma_split_page(
long long a1,
long long a2,
long long **a3,
int a4,
long long a5,
int a6,
int a7,
long long a8,
char a9)
{
long long **v9; // r12
long long v10; // r15
long long v11; // r14
unsigned int v12; // r8d
int v13; // eax
long long *v14; // r13
long long v15; // rsi
long long v16; // rdx
unsigned int v17; // eax
long long v18; // r15
long long v19; // rcx
long long v20; // rax
long long v21; // r15
long long half_pos; // rbx
unsigned int v23; // r12d
long long v24; // rbx
unsigned int v25; // eax
long long v26; // rdx
long long v27; // rcx
long long v28; // r8
int v29; // r9d
long long v30; // r13
unsigned int v31; // r14d
unsigned long long v32; // r12
long long v33; // rcx
long long v34; // rdx
long long v35; // rcx
long long v36; // r8
int v37; // r9d
long long result; // rax
unsigned int v39; // r14d
long long *v40; // rax
long long v41; // rbx
long long v42; // r13
long long *v43; // rax
long long v44; // rcx
unsigned int v45; // r12d
long long *v46; // r15
long long v47; // rax
unsigned long long v48; // rbx
_QWORD *v49; // r13
long long *v50; // r14
bool v51; // zf
long long v52; // rbx
long long v53; // r13
long long v54; // r15
long long v55; // r12
long long v56; // r14
unsigned int v57; // r12d
int v58; // r15d
long long v59; // rbx
long long v60; // r14
char v61; // [rsp+0h] [rbp-B20h] BYREF
long long *v62[2]; // [rsp+18h] [rbp-B08h] BYREF
long long v63; // [rsp+28h] [rbp-AF8h]
long long v64; // [rsp+30h] [rbp-AF0h]
int v65; // [rsp+38h] [rbp-AE8h]
unsigned int v66; // [rsp+44h] [rbp-ADCh]
_QWORD v67[3]; // [rsp+50h] [rbp-AD0h] BYREF
int v68; // [rsp+68h] [rbp-AB8h]
long long v69; // [rsp+70h] [rbp-AB0h]
long long *v70; // [rsp+78h] [rbp-AA8h]
_QWORD *v71; // [rsp+80h] [rbp-AA0h]
long long v72; // [rsp+88h] [rbp-A98h]
long long v73; // [rsp+90h] [rbp-A90h]
long long v74; // [rsp+98h] [rbp-A88h]
char *v75; // [rsp+A0h] [rbp-A80h] BYREF
long long v76; // [rsp+A8h] [rbp-A78h]
_QWORD v77[2]; // [rsp+B0h] [rbp-A70h] BYREF
long long v78; // [rsp+C0h] [rbp-A60h]
int v79; // [rsp+C8h] [rbp-A58h]
int v80; // [rsp+D0h] [rbp-A50h]
int v81; // [rsp+D4h] [rbp-A4Ch]
long long v82; // [rsp+D8h] [rbp-A48h] BYREF
long long *v83; // [rsp+E0h] [rbp-A40h]
unsigned long long v84; // [rsp+E8h] [rbp-A38h] BYREF
unsigned int v85; // [rsp+F4h] [rbp-A2Ch]
long long v86; // [rsp+F8h] [rbp-A28h]
unsigned int v87; // [rsp+104h] [rbp-A1Ch]
long long **v88; // [rsp+108h] [rbp-A18h]
_BYTE v89[2528]; // [rsp+110h] [rbp-A10h] BYREF
unsigned long long v90; // [rsp+AF0h] [rbp-30h]
v80 = a6;
v72 = a5;
v81 = a4;
v9 = a3;
v90 = __readfsqword(0x28u);
v75 = &v61;
v10 = *(_QWORD *)a1;
v71 = (_QWORD *)a2;
v11 = *(_QWORD *)(a2 + 8);
*(_WORD *)(a1 + 1668) = 257;
v12 = *((_DWORD *)a3 + 11);
v13 = *(_DWORD *)(v10 + 1860);
v69 = *((unsigned int *)a3 + 10);
v85 = v69 + v13;
v62[0] = (long long *)a1;
v70 = (long long *)a1;
v76 = *(_QWORD *)(a1 + 888);
v63 = v76;
v62[1] = (long long *)v11;
v77[0] = a8;
v77[1] = v11;
v86 = v10;
v88 = a3;
v87 = v12;
if ( !a9 )
{
half_pos = ma_find_half_pos(v77, a3, &v82);
goto LABEL_14;
}
v14 = *a3;
v15 = **a3;
v16 = *(unsigned int *)(v15 + 1860);
v17 = *((_DWORD *)v9 + 8) - v16;
v18 = (long long)v9[2] + v16;
v84 = v18;
if ( (*(_BYTE *)(v11 + 162) & 0x2E) == 0 && (v12 & 2) == 0 )
{
v19 = *(unsigned __int16 *)(v11 + 170);
v20 = (unsigned int)v19 * (v17 / *(unsigned __int16 *)(v11 + 170) - 2);
LODWORD(v78) = *(unsigned __int16 *)(v11 + 170) - *(_DWORD *)(v15 + 1856);
HIDWORD(v78) = *(_DWORD *)(*v14 + 1856);
v79 = 0;
v21 = v20 + v18;
v82 = v21 + v19;
memcpy(a8, v21, v19);
half_pos = v21;
LABEL_11:
v9 = v88;
v10 = v86;
goto LABEL_14;
}
v23 = v17;
v24 = v16;
v67[0] = v89;
v67[1] = v11;
v89[0] = 0;
v25 = (*(long long ( **)(_QWORD *, _QWORD, _QWORD, unsigned long long *))(v11 + 224))(v67, v12, 0LL, &v84);
if ( !v25 )
{
ma_set_fatal_error(v14, 126LL, v26, v27, v28, v29);
half_pos = 0LL;
goto LABEL_11;
}
v83 = v14;
v30 = v11;
v31 = v87;
v32 = v18 + v23 - v24;
v33 = v84;
while ( 1 )
{
half_pos = v18;
v18 = v33;
v78 = v67[2];
v79 = v68;
memcpy(v77[0], v89, v25);
v25 = (*(long long ( **)(_QWORD *, _QWORD, _QWORD, unsigned long long *))(v30 + 224))(v67, v31, 0LL, &v84);
if ( !v25 )
break;
v33 = v84;
if ( v84 >= v32 )
{
v82 = v18;
goto LABEL_13;
}
}
ma_set_fatal_error(v83, 126LL, v34, v35, v36, v37);
half_pos = 0LL;
LABEL_13:
v9 = v88;
v10 = v86;
v11 = v30;
LABEL_14:
result = 0xFFFFFFFFLL;
if ( half_pos )
{
v83 = (long long *)v11;
v39 = v78 + HIDWORD(v78);
v40 = v9[2];
v41 = half_pos - (_QWORD)v40;
v42 = *((unsigned int *)v9 + 8);
*((_DWORD *)v9 + 8) = v41;
*((_BYTE *)v40 + *(unsigned int *)(v10 + 1860) - 1) = v41;
v43 = v9[2];
v44 = *(unsigned int *)(v10 + 1860);
v73 = v41;
*((_BYTE *)v43 + v44 - 2) = BYTE1(v41);
v67[0] = v82;
v45 = v69;
if ( v69 )
memcpy(v76 + *(unsigned int *)(v10 + 1860), v82 - v69, v69);
v46 = v70;
v47 = ma_new(v70, 6, &v75);
v64 = v47;
if ( v47 == -1 )
{
return 0xFFFFFFFFLL;
}
else
{
v48 = v47;
v74 = v42;
v49 = v71;
ma_copy_key((long long)v71, (long long)v77);
ma_kpointer((long long)v46, *v49 + v39, v48);
v50 = v83;
v51 = ((unsigned int ( *)(_QWORD *, _QWORD, _QWORD, _QWORD *))v83[28])(v77, v87, v45, v67) == 0;
result = 0xFFFFFFFFLL;
if ( !v51 )
{
v52 = ((unsigned int ( *)(_QWORD *, _QWORD, _QWORD, _QWORD, _QWORD, _BYTE *))v50[30])(
v77,
v45,
0LL,
0LL,
0LL,
v89);
v53 = (long long)v88[2] + v74 - v67[0];
v54 = v76;
v55 = v76 + v85;
memcpy(v55 + v52, v67[0], (unsigned int)(*((_DWORD *)v88 + 4) + v74 - LODWORD(v67[0])));
((void ( *)(long long *, long long, _BYTE *))v50[31])(v50, v55, v89);
LODWORD(v52) = v53 + v85 + v52;
v56 = v86;
memset(v54, 0LL, *(unsigned int *)(v86 + 1860));
v66 = v87;
v65 = v52;
*(_BYTE *)(v54 + (unsigned int)(*(_DWORD *)(v56 + 1860) - 3)) = v87;
*(_BYTE *)(v54 + *(unsigned int *)(v56 + 1860) - 1) = v52;
v57 = v52;
*(_BYTE *)(v54 + *(unsigned int *)(v56 + 1860) - 2) = BYTE1(v52);
*(_BYTE *)(v54 + (unsigned int)(*(_DWORD *)(v56 + 1860) - 4)) = *((_BYTE *)v88[2]
+ (unsigned int)(*(_DWORD *)(v56 + 1860) - 4));
if ( *(_BYTE *)(v56 + 2023) )
{
v58 = ma_log_new(v62, 0) ? -1 : 2;
v59 = v63;
}
else
{
v59 = v54;
v58 = 2;
}
v60 = v86;
memset(v59 + v57, 0LL, *(_DWORD *)(v86 + 1980) - v57);
result = v58 | (unsigned int)-((unsigned __int8)ma_write_keypage(v62, *((_DWORD *)v75 + 3), 3) != 0);
if ( *(_BYTE *)(v60 + 2023) )
return (unsigned __int8)ma_log_split((_DWORD)v88, v81, v73, v72, v80, a7, 0, 0LL, 0, 0) != 0
? -1
: (unsigned int)result;
}
}
}
return result;
}
| _ma_split_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xaf8
MOV dword ptr [RBP + -0xa50],R9D
MOV qword ptr [RBP + -0xa98],R8
MOV dword ptr [RBP + -0xa4c],ECX
MOV R12,RDX
MOV RDX,RDI
MOV RDI,qword ptr [RBP + 0x18]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RBP + -0xb20]
MOV qword ptr [RBP + -0xa80],RAX
MOV R15,qword ptr [RDX]
MOV qword ptr [RBP + -0xaa0],RSI
MOV R14,qword ptr [RSI + 0x8]
MOV word ptr [RDX + 0x684],0x101
MOV ECX,dword ptr [R12 + 0x28]
MOV R8D,dword ptr [R12 + 0x2c]
MOV EAX,dword ptr [R15 + 0x744]
MOV qword ptr [RBP + -0xab0],RCX
ADD EAX,ECX
MOV dword ptr [RBP + -0xa2c],EAX
MOV qword ptr [RBP + -0xb08],RDX
MOV qword ptr [RBP + -0xaa8],RDX
MOV RAX,qword ptr [RDX + 0x378]
MOV qword ptr [RBP + -0xa78],RAX
MOV qword ptr [RBP + -0xaf8],RAX
MOV qword ptr [RBP + -0xb00],R14
MOV qword ptr [RBP + -0xa70],RDI
MOV qword ptr [RBP + -0xa68],R14
CMP byte ptr [RBP + 0x20],0x0
MOV qword ptr [RBP + -0xa28],R15
MOV qword ptr [RBP + -0xa18],R12
MOV dword ptr [RBP + -0xa1c],R8D
JZ 0x00165f64
MOV R13,qword ptr [R12]
MOV RSI,qword ptr [R13]
MOV EDX,dword ptr [RSI + 0x744]
MOV EAX,dword ptr [R12 + 0x20]
SUB EAX,EDX
MOV R15,qword ptr [R12 + 0x10]
ADD R15,RDX
MOV qword ptr [RBP + -0xa38],R15
TEST byte ptr [R14 + 0xa2],0x2e
SETZ R9B
TEST R8B,0x2
SETZ CL
AND CL,R9B
CMP CL,0x1
JNZ 0x00165f82
MOVZX ECX,word ptr [R14 + 0xaa]
XOR EDX,EDX
DIV ECX
ADD EAX,-0x2
IMUL EAX,ECX
MOV EDX,dword ptr [RSI + 0x740]
MOV ESI,ECX
SUB ESI,EDX
MOV dword ptr [RBP + -0xa60],ESI
MOV RDX,qword ptr [R13]
MOV EDX,dword ptr [RDX + 0x740]
MOV dword ptr [RBP + -0xa5c],EDX
MOV dword ptr [RBP + -0xa58],0x0
ADD R15,RAX
LEA RAX,[R15 + RCX*0x1]
MOV qword ptr [RBP + -0xa48],RAX
MOV RSI,R15
MOV RDX,RCX
CALL 0x00129080
MOV RBX,R15
JMP 0x00166056
LAB_00165f64:
LEA RDI,[RBP + -0xa70]
LEA RDX,[RBP + -0xa48]
MOV RSI,R12
CALL 0x00166387
MOV RBX,RAX
JMP 0x0016608a
LAB_00165f82:
MOV R12D,EAX
MOV RBX,RDX
LEA RAX,[RBP + -0xa10]
LEA RDI,[RBP + -0xad0]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],R14
MOV byte ptr [RAX],0x0
LEA RCX,[RBP + -0xa38]
MOV ESI,R8D
XOR EDX,EDX
CALL qword ptr [R14 + 0xe0]
TEST EAX,EAX
JZ 0x00166047
MOV qword ptr [RBP + -0xa40],R13
MOV R13,R14
MOV R14D,dword ptr [RBP + -0xa1c]
MOV R12D,R12D
ADD R12,R15
SUB R12,RBX
LEA RCX,[RBP + -0xa38]
MOV RCX,qword ptr [RCX]
LAB_00165fdf:
MOV RBX,R15
MOV R15,RCX
MOV RCX,qword ptr [RBP + -0xac0]
MOV qword ptr [RBP + -0xa60],RCX
MOV ECX,dword ptr [RBP + -0xab8]
MOV dword ptr [RBP + -0xa58],ECX
MOV RDI,qword ptr [RBP + -0xa70]
MOV EDX,EAX
LEA RSI,[RBP + -0xa10]
CALL 0x00129080
LEA RDI,[RBP + -0xad0]
MOV ESI,R14D
XOR EDX,EDX
LEA RCX,[RBP + -0xa38]
CALL qword ptr [R13 + 0xe0]
TEST EAX,EAX
JZ 0x00166066
MOV RCX,qword ptr [RBP + -0xa38]
CMP RCX,R12
JC 0x00165fdf
MOV qword ptr [RBP + -0xa48],R15
JMP 0x00166079
LAB_00166047:
MOV RDI,R13
MOV ESI,0x7e
CALL 0x0013659c
XOR EBX,EBX
LAB_00166056:
MOV R12,qword ptr [RBP + -0xa18]
MOV R15,qword ptr [RBP + -0xa28]
JMP 0x0016608a
LAB_00166066:
MOV RDI,qword ptr [RBP + -0xa40]
MOV ESI,0x7e
CALL 0x0013659c
XOR EBX,EBX
LAB_00166079:
MOV R12,qword ptr [RBP + -0xa18]
MOV R15,qword ptr [RBP + -0xa28]
MOV R14,R13
LAB_0016608a:
MOV EAX,0xffffffff
TEST RBX,RBX
JZ 0x00166361
MOV qword ptr [RBP + -0xa40],R14
MOV R14D,dword ptr [RBP + -0xa5c]
ADD R14D,dword ptr [RBP + -0xa60]
MOV RAX,qword ptr [R12 + 0x10]
SUB RBX,RAX
MOV R13D,dword ptr [R12 + 0x20]
MOV dword ptr [R12 + 0x20],EBX
MOV ECX,dword ptr [R15 + 0x744]
MOV byte ptr [RAX + RCX*0x1 + -0x1],BL
MOV RAX,qword ptr [R12 + 0x10]
MOV ECX,dword ptr [R15 + 0x744]
MOV qword ptr [RBP + -0xa90],RBX
MOV byte ptr [RAX + RCX*0x1 + -0x2],BH
MOV RSI,qword ptr [RBP + -0xa48]
MOV qword ptr [RBP + -0xad0],RSI
MOV R12,qword ptr [RBP + -0xab0]
TEST R12,R12
JZ 0x00166114
SUB RSI,R12
MOV EDI,dword ptr [R15 + 0x744]
ADD RDI,qword ptr [RBP + -0xa78]
MOV RDX,R12
CALL 0x00129080
LAB_00166114:
LEA RDX,[RBP + -0xa80]
MOV R15,qword ptr [RBP + -0xaa8]
MOV RDI,R15
MOV ESI,0x6
CALL 0x00158e77
MOV qword ptr [RBP + -0xaf0],RAX
CMP RAX,-0x1
JZ 0x001662bd
MOV RBX,RAX
MOV qword ptr [RBP + -0xa88],R13
LEA RSI,[RBP + -0xa70]
MOV R13,qword ptr [RBP + -0xaa0]
MOV RDI,R13
CALL 0x00136edc
MOV ESI,R14D
ADD RSI,qword ptr [R13]
MOV RDI,R15
MOV RDX,RBX
CALL 0x00156b0d
LEA RCX,[RBP + -0xad0]
LEA RDI,[RBP + -0xa70]
MOV ESI,dword ptr [RBP + -0xa1c]
MOV EDX,R12D
MOV R14,qword ptr [RBP + -0xa40]
CALL qword ptr [R14 + 0xe0]
TEST EAX,EAX
MOV EAX,0xffffffff
JZ 0x00166361
LEA RDI,[RBP + -0xa70]
LEA R9,[RBP + -0xa10]
MOV ESI,R12D
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
CALL qword ptr [R14 + 0xf0]
MOV R13,qword ptr [RBP + -0xa88]
MOV RCX,qword ptr [RBP + -0xa18]
ADD R13,qword ptr [RCX + 0x10]
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0xad0]
SUB R13,RSI
MOV R12D,dword ptr [RBP + -0xa2c]
MOV R15,qword ptr [RBP + -0xa78]
ADD R12,R15
MOV EDI,EAX
ADD RDI,R12
MOV EDX,R13D
CALL 0x00129080
MOV RDI,R14
MOV RSI,R12
LEA RDX,[RBP + -0xa10]
CALL qword ptr [R14 + 0xf8]
ADD EBX,dword ptr [RBP + -0xa2c]
ADD EBX,R13D
MOV R14,qword ptr [RBP + -0xa28]
MOV EDX,dword ptr [R14 + 0x744]
MOV RDI,R15
XOR ESI,ESI
CALL 0x001292c0
MOV ECX,dword ptr [RBP + -0xa1c]
MOV dword ptr [RBP + -0xadc],ECX
MOV dword ptr [RBP + -0xae8],EBX
MOV EAX,dword ptr [R14 + 0x744]
ADD EAX,-0x3
MOV RDX,R15
MOV byte ptr [R15 + RAX*0x1],CL
MOV EAX,dword ptr [R14 + 0x744]
MOV byte ptr [R15 + RAX*0x1 + -0x1],BL
MOV EAX,dword ptr [R14 + 0x744]
MOV R12D,EBX
MOV byte ptr [RDX + RAX*0x1 + -0x2],BH
MOV RAX,qword ptr [RBP + -0xa18]
MOV RAX,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [R14 + 0x744]
ADD ECX,-0x4
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [R15 + RCX*0x1],AL
CMP byte ptr [R14 + 0x7e7],0x0
JZ 0x001662c7
LEA R14,[RBP + -0xb08]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00164c30
NEG AL
MOV R15D,0x0
SBB R15D,R15D
OR R15D,0x2
MOV RBX,qword ptr [R14 + 0x10]
JMP 0x001662d0
LAB_001662bd:
MOV EAX,0xffffffff
JMP 0x00166361
LAB_001662c7:
MOV RBX,R15
MOV R15D,0x2
LAB_001662d0:
MOV EDI,R12D
ADD RDI,RBX
MOV R14,qword ptr [RBP + -0xa28]
MOV EDX,dword ptr [R14 + 0x7bc]
SUB EDX,R12D
XOR ESI,ESI
CALL 0x001292c0
MOV RAX,qword ptr [RBP + -0xa80]
MOV ESI,dword ptr [RAX + 0xc]
LEA RDI,[RBP + -0xb08]
MOV EDX,0x3
CALL 0x00158b8d
NEG AL
MOV EAX,0x0
SBB EAX,EAX
OR EAX,R15D
CMP byte ptr [R14 + 0x7e7],0x0
JZ 0x00166361
MOV R9D,dword ptr [RBP + 0x10]
XOR EBX,EBX
MOV RDI,qword ptr [RBP + -0xa18]
MOV ESI,dword ptr [RBP + -0xa4c]
MOV RDX,qword ptr [RBP + -0xa90]
MOV R14,RAX
MOV RCX,qword ptr [RBP + -0xa98]
MOV R8D,dword ptr [RBP + -0xa50]
PUSH RBX
PUSH RBX
PUSH 0x0
PUSH RBX
CALL 0x0016649f
ADD RSP,0x20
NEG AL
SBB EBX,EBX
OR EBX,R14D
MOV EAX,EBX
LAB_00166361:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00166382
ADD RSP,0xaf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00166382:
CALL 0x00129270
|
uint _ma_split_page(long *param_1,long *param_2,long *param_3,int4 param_4,int8 param_5,
int4 param_6,int4 param_7,void *param_8,char param_9)
{
ushort uVar1;
long *plVar2;
long *plVar3;
uint uVar4;
int1 *puVar5;
char cVar6;
uint uVar7;
uint uVar8;
int iVar9;
uint uVar10;
long lVar11;
void *__s;
ulong uVar12;
int1 *puVar13;
int1 *__src;
long in_FS_OFFSET;
int1 local_b28 [24];
long *local_b10;
long *local_b08;
void *local_b00;
long local_af8;
uint local_af0;
uint local_ae4;
int1 *local_ad8;
long *local_ad0;
int8 local_ac8;
int4 local_ac0;
ulong local_ab8;
long *local_ab0;
long *local_aa8;
int8 local_aa0;
long local_a98;
ulong local_a90;
int1 *local_a88;
void *local_a80;
void *local_a78;
long *local_a70;
int8 local_a68;
int4 local_a60;
int4 local_a58;
int4 local_a54;
int1 *local_a50;
long *local_a48;
int1 *local_a40;
uint local_a34;
long local_a30;
uint local_a24;
long *local_a20;
int1 local_a18 [2528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_a88 = local_b28;
lVar11 = *param_1;
plVar2 = (long *)param_2[1];
*(int2 *)((long)param_1 + 0x684) = 0x101;
local_ab8 = (ulong)*(uint *)(param_3 + 5);
local_a24 = *(uint *)((long)param_3 + 0x2c);
local_a34 = *(int *)(lVar11 + 0x744) + *(uint *)(param_3 + 5);
local_b00 = (void *)param_1[0x6f];
local_a78 = param_8;
local_b10 = param_1;
local_b08 = plVar2;
local_ab0 = param_1;
local_aa8 = param_2;
local_aa0 = param_5;
local_a80 = local_b00;
local_a70 = plVar2;
local_a58 = param_6;
local_a54 = param_4;
local_a30 = lVar11;
local_a20 = param_3;
if (param_9 == '\0') {
__src = (int1 *)_ma_find_half_pos(&local_a78,param_3,&local_a50);
}
else {
plVar3 = (long *)*param_3;
uVar10 = *(uint *)(*plVar3 + 0x744);
uVar7 = (int)param_3[4] - uVar10;
puVar13 = (int1 *)(param_3[2] + (ulong)uVar10);
local_a40 = puVar13;
if ((local_a24 & 2) == 0 && (*(byte *)((long)plVar2 + 0xa2) & 0x2e) == 0) {
uVar1 = *(ushort *)((long)plVar2 + 0xaa);
local_a68 = CONCAT44(*(int4 *)(*plVar3 + 0x740),(uint)uVar1 - *(int *)(*plVar3 + 0x740))
;
local_a60 = 0;
__src = puVar13 + (uVar7 / uVar1 - 2) * (uint)uVar1;
local_a50 = __src + uVar1;
memcpy(param_8,__src,(ulong)uVar1);
param_3 = local_a20;
lVar11 = local_a30;
}
else {
local_ad8 = local_a18;
local_a18[0] = 0;
local_ad0 = plVar2;
uVar8 = (*(code *)plVar2[0x1c])(&local_ad8,local_a24,0,&local_a40);
uVar4 = local_a24;
if (uVar8 == 0) {
_ma_set_fatal_error(plVar3,0x7e);
__src = (int1 *)0x0;
param_3 = local_a20;
lVar11 = local_a30;
}
else {
puVar5 = puVar13;
local_a48 = plVar3;
do {
__src = puVar5;
puVar5 = local_a40;
local_a68 = local_ac8;
local_a60 = local_ac0;
memcpy(local_a78,local_a18,(ulong)uVar8);
uVar8 = (*(code *)plVar2[0x1c])(&local_ad8,uVar4,0,&local_a40);
if (uVar8 == 0) {
_ma_set_fatal_error(local_a48,0x7e);
__src = (int1 *)0x0;
param_3 = local_a20;
lVar11 = local_a30;
goto LAB_0016608a;
}
} while (local_a40 < puVar13 + ((ulong)uVar7 - (ulong)uVar10));
local_a50 = puVar5;
param_3 = local_a20;
lVar11 = local_a30;
}
}
}
LAB_0016608a:
uVar12 = local_ab8;
uVar10 = 0xffffffff;
if (__src != (int1 *)0x0) {
uVar7 = local_a68._4_4_ + (int)local_a68;
local_a98 = (long)__src - param_3[2];
uVar10 = *(uint *)(param_3 + 4);
*(int *)(param_3 + 4) = (int)local_a98;
*(char *)(param_3[2] + -1 + (ulong)*(uint *)(lVar11 + 0x744)) = (char)local_a98;
*(char *)(param_3[2] + -2 + (ulong)*(uint *)(lVar11 + 0x744)) = (char)((ulong)local_a98 >> 8);
local_ad8 = local_a50;
local_a48 = plVar2;
if (local_ab8 != 0) {
memcpy((void *)((ulong)*(uint *)(lVar11 + 0x744) + (long)local_a80),local_a50 + -local_ab8,
local_ab8);
}
plVar2 = local_ab0;
lVar11 = _ma_new(local_ab0,6,&local_a88);
plVar3 = local_aa8;
local_af8 = lVar11;
if (lVar11 == -1) {
uVar10 = 0xffffffff;
}
else {
local_a90 = (ulong)uVar10;
_ma_copy_key(local_aa8,&local_a78);
_ma_kpointer(plVar2,(ulong)uVar7 + *plVar3,lVar11);
plVar2 = local_a48;
iVar9 = (*(code *)local_a48[0x1c])(&local_a78,local_a24,uVar12 & 0xffffffff,&local_ad8);
uVar10 = 0xffffffff;
if (iVar9 != 0) {
uVar10 = (*(code *)plVar2[0x1e])(&local_a78,uVar12 & 0xffffffff,0,0,0,local_a18);
__s = local_a80;
uVar12 = (local_a90 + local_a20[2]) - (long)local_ad8;
lVar11 = (ulong)local_a34 + (long)local_a80;
memcpy((void *)((ulong)uVar10 + lVar11),local_ad8,uVar12 & 0xffffffff);
(*(code *)plVar2[0x1f])(plVar2,lVar11,local_a18);
lVar11 = local_a30;
uVar7 = uVar10 + local_a34 + (int)uVar12;
memset(__s,0,(ulong)*(uint *)(local_a30 + 0x744));
local_ae4 = local_a24;
*(char *)((long)__s + (ulong)(*(int *)(lVar11 + 0x744) - 3)) = (char)local_a24;
*(char *)((long)__s + ((ulong)*(uint *)(lVar11 + 0x744) - 1)) = (char)uVar7;
*(char *)((long)__s + ((ulong)*(uint *)(lVar11 + 0x744) - 2)) = (char)(uVar7 >> 8);
uVar12 = (ulong)(*(int *)(lVar11 + 0x744) - 4);
*(int1 *)((long)__s + uVar12) = *(int1 *)(local_a20[2] + uVar12);
local_af0 = uVar7;
if (*(char *)(lVar11 + 0x7e7) == '\0') {
uVar10 = 2;
}
else {
cVar6 = _ma_log_new(&local_b10);
uVar10 = -(uint)(cVar6 != '\0') | 2;
__s = local_b00;
}
lVar11 = local_a30;
memset((void *)((ulong)uVar7 + (long)__s),0,(ulong)(*(int *)(local_a30 + 0x7bc) - uVar7));
cVar6 = _ma_write_keypage(&local_b10,*(int4 *)(local_a88 + 0xc),3);
uVar10 = -(uint)(cVar6 != '\0') | uVar10;
if (*(char *)(lVar11 + 0x7e7) != '\0') {
cVar6 = _ma_log_split(local_a20,local_a54,local_a98,local_aa0,local_a58,param_7,0,0,0,0);
uVar10 = -(uint)(cVar6 != '\0') | uVar10;
}
}
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar10;
}
|
|
5,768 | Cache::getByte(unsigned int, unsigned int*) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | uint8_t Cache::getByte(uint32_t addr, uint32_t *cycles) {
this->referenceCounter++;
this->statistics.numRead++;
// If in cache, return directly
int blockId;
if ((blockId = this->getBlockId(addr)) != -1) {
uint32_t offset = this->getOffset(addr);
this->statistics.numHit++;
this->statistics.totalCycles += this->policy.hitLatency;
this->blocks[blockId].lastReference = this->referenceCounter;
if (cycles) *cycles = this->policy.hitLatency;
return this->blocks[blockId].data[offset];
}
// Else, find the data in memory or other level of cache
this->statistics.numMiss++;
this->statistics.totalCycles += this->policy.missLatency;
this->loadBlockFromLowerLevel(addr, cycles);
// The block is in top level cache now, return directly
if ((blockId = this->getBlockId(addr)) != -1) {
uint32_t offset = this->getOffset(addr);
this->blocks[blockId].lastReference = this->referenceCounter;
return this->blocks[blockId].data[offset];
} else {
fprintf(stderr, "Error: data not in top level cache!\n");
exit(-1);
}
} | O0 | cpp | Cache::getByte(unsigned int, unsigned int*):
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl 0x20(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x20(%rdi)
movl 0x8(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x8(%rdi)
movl 0x34(%rsp), %esi
callq 0x4690
movl %eax, 0x24(%rsp)
cmpl $-0x1, %eax
je 0x4942
movq 0x10(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x4a10
movq 0x10(%rsp), %rdi
movl %eax, 0x20(%rsp)
movl 0x10(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x10(%rdi)
movl 0x48(%rdi), %eax
addq 0x18(%rdi), %rax
movq %rax, 0x18(%rdi)
movl 0x20(%rdi), %eax
movl %eax, 0xc(%rsp)
addq $0x50, %rdi
movslq 0x24(%rsp), %rsi
callq 0x5710
movl 0xc(%rsp), %ecx
movl %ecx, 0x10(%rax)
cmpq $0x0, 0x28(%rsp)
je 0x4912
movq 0x10(%rsp), %rax
movl 0x48(%rax), %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
movq 0x10(%rsp), %rdi
addq $0x50, %rdi
movslq 0x24(%rsp), %rsi
callq 0x5710
movq %rax, %rdi
addq $0x18, %rdi
movl 0x20(%rsp), %eax
movl %eax, %esi
callq 0x5730
movb (%rax), %al
movb %al, 0x47(%rsp)
jmp 0x4a02
movq 0x10(%rsp), %rdi
movl 0x14(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x14(%rdi)
movl 0x4c(%rdi), %eax
addq 0x18(%rdi), %rax
movq %rax, 0x18(%rdi)
movl 0x34(%rsp), %esi
movq 0x28(%rsp), %rdx
callq 0x4a50
movq 0x10(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x4690
movl %eax, 0x24(%rsp)
cmpl $-0x1, %eax
je 0x49e0
movq 0x10(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x4a10
movq 0x10(%rsp), %rdi
movl %eax, 0x1c(%rsp)
movl 0x20(%rdi), %eax
movl %eax, 0x8(%rsp)
addq $0x50, %rdi
movslq 0x24(%rsp), %rsi
callq 0x5710
movl 0x8(%rsp), %ecx
movq 0x10(%rsp), %rdi
movl %ecx, 0x10(%rax)
addq $0x50, %rdi
movslq 0x24(%rsp), %rsi
callq 0x5710
movq %rax, %rdi
addq $0x18, %rdi
movl 0x1c(%rsp), %eax
movl %eax, %esi
callq 0x5730
movb (%rax), %al
movb %al, 0x47(%rsp)
jmp 0x4a02
movq 0x75e1(%rip), %rax # 0xbfc8
movq (%rax), %rdi
leaq 0x38a5(%rip), %rsi # 0x8296
movb $0x0, %al
callq 0x2260
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
callq 0x21e0
movb 0x47(%rsp), %al
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| _ZN5Cache7getByteEjPj:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_14], esi
mov [rsp+48h+var_20], rdx
mov rdi, [rsp+48h+var_10]; this
mov [rsp+48h+var_38], rdi
mov eax, [rdi+20h]
add eax, 1
mov [rdi+20h], eax
mov eax, [rdi+8]
add eax, 1
mov [rdi+8], eax
mov esi, [rsp+48h+var_14]; unsigned int
call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint)
mov [rsp+48h+var_24], eax
cmp eax, 0FFFFFFFFh
jz loc_4942
mov rdi, [rsp+48h+var_38]; this
mov esi, [rsp+48h+var_14]; unsigned int
call _ZN5Cache9getOffsetEj; Cache::getOffset(uint)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_28], eax
mov eax, [rdi+10h]
add eax, 1
mov [rdi+10h], eax
mov eax, [rdi+48h]
add rax, [rdi+18h]
mov [rdi+18h], rax
mov eax, [rdi+20h]
mov [rsp+48h+var_3C], eax
add rdi, 50h ; 'P'
movsxd rsi, [rsp+48h+var_24]
call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong)
mov ecx, [rsp+48h+var_3C]
mov [rax+10h], ecx
cmp [rsp+48h+var_20], 0
jz short loc_4912
mov rax, [rsp+48h+var_38]
mov ecx, [rax+48h]
mov rax, [rsp+48h+var_20]
mov [rax], ecx
loc_4912:
mov rdi, [rsp+48h+var_38]
add rdi, 50h ; 'P'
movsxd rsi, [rsp+48h+var_24]
call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong)
mov rdi, rax
add rdi, 18h
mov eax, [rsp+48h+var_28]
mov esi, eax
call _ZNSt6vectorIhSaIhEEixEm; std::vector<uchar>::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_1], al
jmp loc_4A02
loc_4942:
mov rdi, [rsp+48h+var_38]; this
mov eax, [rdi+14h]
add eax, 1
mov [rdi+14h], eax
mov eax, [rdi+4Ch]
add rax, [rdi+18h]
mov [rdi+18h], rax
mov esi, [rsp+48h+var_14]; unsigned int
mov rdx, [rsp+48h+var_20]; unsigned int *
call _ZN5Cache23loadBlockFromLowerLevelEjPj; Cache::loadBlockFromLowerLevel(uint,uint *)
mov rdi, [rsp+48h+var_38]; this
mov esi, [rsp+48h+var_14]; unsigned int
call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint)
mov [rsp+48h+var_24], eax
cmp eax, 0FFFFFFFFh
jz short loc_49E0
mov rdi, [rsp+48h+var_38]; this
mov esi, [rsp+48h+var_14]; unsigned int
call _ZN5Cache9getOffsetEj; Cache::getOffset(uint)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_2C], eax
mov eax, [rdi+20h]
mov [rsp+48h+var_40], eax
add rdi, 50h ; 'P'
movsxd rsi, [rsp+48h+var_24]
call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong)
mov ecx, [rsp+48h+var_40]
mov rdi, [rsp+48h+var_38]
mov [rax+10h], ecx
add rdi, 50h ; 'P'
movsxd rsi, [rsp+48h+var_24]
call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong)
mov rdi, rax
add rdi, 18h
mov eax, [rsp+48h+var_2C]
mov esi, eax
call _ZNSt6vectorIhSaIhEEixEm; std::vector<uchar>::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_1], al
jmp short loc_4A02
loc_49E0:
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aErrorDataNotIn; "Error: data not in top level cache!\n"
mov al, 0
call _fprintf
mov edi, 0FFFFFFFFh
call _exit
loc_4A02:
mov al, [rsp+48h+var_1]
add rsp, 48h
retn
| char Cache::getByte(Cache *this, unsigned int a2, unsigned int *a3)
{
long long v3; // rax
long long v4; // rax
int v6; // [rsp+8h] [rbp-40h]
int v7; // [rsp+Ch] [rbp-3Ch]
unsigned int Offset; // [rsp+1Ch] [rbp-2Ch]
unsigned int v9; // [rsp+20h] [rbp-28h]
int BlockId; // [rsp+24h] [rbp-24h]
int v11; // [rsp+24h] [rbp-24h]
++*((_DWORD *)this + 8);
++*((_DWORD *)this + 2);
BlockId = Cache::getBlockId(this, a2);
if ( BlockId == -1 )
{
++*((_DWORD *)this + 5);
*((_QWORD *)this + 3) += *((unsigned int *)this + 19);
Cache::loadBlockFromLowerLevel(this, a2, a3);
v11 = Cache::getBlockId(this, a2);
if ( v11 == -1 )
{
fprintf(stderr, "Error: data not in top level cache!\n");
exit(0xFFFFFFFFLL);
}
Offset = Cache::getOffset(this, a2);
v6 = *((_DWORD *)this + 8);
*(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 80, v11) + 16) = v6;
v4 = std::vector<Cache::Block>::operator[]((char *)this + 80, v11);
return *(_BYTE *)std::vector<unsigned char>::operator[](v4 + 24, Offset);
}
else
{
v9 = Cache::getOffset(this, a2);
++*((_DWORD *)this + 4);
*((_QWORD *)this + 3) += *((unsigned int *)this + 18);
v7 = *((_DWORD *)this + 8);
*(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 80, BlockId) + 16) = v7;
if ( a3 )
*a3 = *((_DWORD *)this + 18);
v3 = std::vector<Cache::Block>::operator[]((char *)this + 80, BlockId);
return *(_BYTE *)std::vector<unsigned char>::operator[](v3 + 24, v9);
}
}
| getByte:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV dword ptr [RSP + 0x34],ESI
MOV qword ptr [RSP + 0x28],RDX
MOV RDI,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RDI
MOV EAX,dword ptr [RDI + 0x20]
ADD EAX,0x1
MOV dword ptr [RDI + 0x20],EAX
MOV EAX,dword ptr [RDI + 0x8]
ADD EAX,0x1
MOV dword ptr [RDI + 0x8],EAX
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x00104690
MOV dword ptr [RSP + 0x24],EAX
CMP EAX,-0x1
JZ 0x00104942
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x00104a10
MOV RDI,qword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x20],EAX
MOV EAX,dword ptr [RDI + 0x10]
ADD EAX,0x1
MOV dword ptr [RDI + 0x10],EAX
MOV EAX,dword ptr [RDI + 0x48]
ADD RAX,qword ptr [RDI + 0x18]
MOV qword ptr [RDI + 0x18],RAX
MOV EAX,dword ptr [RDI + 0x20]
MOV dword ptr [RSP + 0xc],EAX
ADD RDI,0x50
MOVSXD RSI,dword ptr [RSP + 0x24]
CALL 0x00105710
MOV ECX,dword ptr [RSP + 0xc]
MOV dword ptr [RAX + 0x10],ECX
CMP qword ptr [RSP + 0x28],0x0
JZ 0x00104912
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RAX + 0x48]
MOV RAX,qword ptr [RSP + 0x28]
MOV dword ptr [RAX],ECX
LAB_00104912:
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x50
MOVSXD RSI,dword ptr [RSP + 0x24]
CALL 0x00105710
MOV RDI,RAX
ADD RDI,0x18
MOV EAX,dword ptr [RSP + 0x20]
MOV ESI,EAX
CALL 0x00105730
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x47],AL
JMP 0x00104a02
LAB_00104942:
MOV RDI,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RDI + 0x14]
ADD EAX,0x1
MOV dword ptr [RDI + 0x14],EAX
MOV EAX,dword ptr [RDI + 0x4c]
ADD RAX,qword ptr [RDI + 0x18]
MOV qword ptr [RDI + 0x18],RAX
MOV ESI,dword ptr [RSP + 0x34]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x00104a50
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x00104690
MOV dword ptr [RSP + 0x24],EAX
CMP EAX,-0x1
JZ 0x001049e0
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x00104a10
MOV RDI,qword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x1c],EAX
MOV EAX,dword ptr [RDI + 0x20]
MOV dword ptr [RSP + 0x8],EAX
ADD RDI,0x50
MOVSXD RSI,dword ptr [RSP + 0x24]
CALL 0x00105710
MOV ECX,dword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x10],ECX
ADD RDI,0x50
MOVSXD RSI,dword ptr [RSP + 0x24]
CALL 0x00105710
MOV RDI,RAX
ADD RDI,0x18
MOV EAX,dword ptr [RSP + 0x1c]
MOV ESI,EAX
CALL 0x00105730
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x47],AL
JMP 0x00104a02
LAB_001049e0:
MOV RAX,qword ptr [0x0010bfc8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x108296]
MOV AL,0x0
CALL 0x00102260
MOV EDI,0xffffffff
CALL 0x001021e0
LAB_00104a02:
MOV AL,byte ptr [RSP + 0x47]
ADD RSP,0x48
RET
|
/* Cache::getByte(unsigned int, unsigned int*) */
int8 __thiscall Cache::getByte(Cache *this,uint param_1,uint *param_2)
{
int4 uVar1;
int iVar2;
uint uVar3;
long lVar4;
int1 *puVar5;
int7 uVar6;
int1 local_1;
*(int *)(this + 0x20) = *(int *)(this + 0x20) + 1;
*(int *)(this + 8) = *(int *)(this + 8) + 1;
iVar2 = getBlockId(this,param_1);
if (iVar2 == -1) {
*(int *)(this + 0x14) = *(int *)(this + 0x14) + 1;
*(ulong *)(this + 0x18) = (ulong)*(uint *)(this + 0x4c) + *(long *)(this + 0x18);
loadBlockFromLowerLevel(this,param_1,param_2);
iVar2 = getBlockId(this,param_1);
if (iVar2 == -1) {
fprintf(*(FILE **)PTR_stderr_0010bfc8,"Error: data not in top level cache!\n");
/* WARNING: Subroutine does not return */
exit(-1);
}
uVar3 = getOffset(this,param_1);
uVar1 = *(int4 *)(this + 0x20);
lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[]
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50),
(long)iVar2);
*(int4 *)(lVar4 + 0x10) = uVar1;
lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[]
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50),
(long)iVar2);
puVar5 = (int1 *)
std::vector<unsigned_char,std::allocator<unsigned_char>>::operator[]
((vector<unsigned_char,std::allocator<unsigned_char>> *)(lVar4 + 0x18),
(ulong)uVar3);
local_1 = *puVar5;
uVar6 = (int7)((ulong)puVar5 >> 8);
}
else {
uVar3 = getOffset(this,param_1);
*(int *)(this + 0x10) = *(int *)(this + 0x10) + 1;
*(ulong *)(this + 0x18) = (ulong)*(uint *)(this + 0x48) + *(long *)(this + 0x18);
uVar1 = *(int4 *)(this + 0x20);
lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[]
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50),
(long)iVar2);
*(int4 *)(lVar4 + 0x10) = uVar1;
if (param_2 != (uint *)0x0) {
*param_2 = *(uint *)(this + 0x48);
}
lVar4 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[]
((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50),
(long)iVar2);
puVar5 = (int1 *)
std::vector<unsigned_char,std::allocator<unsigned_char>>::operator[]
((vector<unsigned_char,std::allocator<unsigned_char>> *)(lVar4 + 0x18),
(ulong)uVar3);
local_1 = *puVar5;
uVar6 = (int7)((ulong)puVar5 >> 8);
}
return CONCAT71(uVar6,local_1);
}
|
|
5,769 | Cache::getByte(unsigned int, unsigned int*) | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp | uint8_t Cache::getByte(uint32_t addr, uint32_t *cycles) {
this->referenceCounter++;
this->statistics.numRead++;
// If in cache, return directly
int blockId;
if ((blockId = this->getBlockId(addr)) != -1) {
uint32_t offset = this->getOffset(addr);
this->statistics.numHit++;
this->statistics.totalCycles += this->policy.hitLatency;
this->blocks[blockId].lastReference = this->referenceCounter;
if (cycles) *cycles = this->policy.hitLatency;
return this->blocks[blockId].data[offset];
}
// Else, find the data in memory or other level of cache
this->statistics.numMiss++;
this->statistics.totalCycles += this->policy.missLatency;
this->loadBlockFromLowerLevel(addr, cycles);
// The block is in top level cache now, return directly
if ((blockId = this->getBlockId(addr)) != -1) {
uint32_t offset = this->getOffset(addr);
this->blocks[blockId].lastReference = this->referenceCounter;
return this->blocks[blockId].data[offset];
} else {
fprintf(stderr, "Error: data not in top level cache!\n");
exit(-1);
}
} | O1 | cpp | Cache::getByte(unsigned int, unsigned int*):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rdi, %r14
incl 0x20(%rdi)
movl %esi, %ebx
incl 0x8(%rdi)
callq 0x390a
cmpl $-0x1, %eax
je 0x3a9a
movl 0x3c(%r14), %edx
testl %edx, %edx
je 0x3aeb
xorl %ecx, %ecx
cmpl $0x1, %edx
je 0x3af0
cmpl $0x2, %edx
jb 0x3af0
xorl %ecx, %ecx
movl %edx, %esi
shrl %esi
incl %ecx
cmpl $0x3, %edx
movl %esi, %edx
ja 0x3a8d
jmp 0x3af0
incl 0x14(%r14)
movl 0x4c(%r14), %eax
addq %rax, 0x18(%r14)
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x3b92
movq %r14, %rdi
movl %ebx, %esi
callq 0x390a
cmpl $-0x1, %eax
je 0x3b58
movl 0x3c(%r14), %edx
testl %edx, %edx
je 0x3b21
xorl %ecx, %ecx
cmpl $0x1, %edx
je 0x3b26
cmpl $0x2, %edx
jb 0x3b26
xorl %ecx, %ecx
movl %edx, %esi
shrl %esi
incl %ecx
cmpl $0x3, %edx
movl %esi, %edx
ja 0x3ade
jmp 0x3b26
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
incl 0x10(%r14)
movl 0x20(%r14), %esi
movl 0x48(%r14), %edx
addq %rdx, 0x18(%r14)
cltq
movq 0x50(%r14), %rdi
leaq (%rax,%rax,2), %r8
shlq $0x4, %r8
leaq (%rdi,%r8), %rax
movl %esi, 0x10(%rdi,%r8)
testq %r15, %r15
je 0x3b40
movl %edx, (%r15)
jmp 0x3b40
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
movl 0x20(%r14), %edx
cltq
movq 0x50(%r14), %rsi
leaq (%rax,%rax,2), %rdi
shlq $0x4, %rdi
leaq (%rsi,%rdi), %rax
movl %edx, 0x10(%rsi,%rdi)
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
shll %cl, %edx
notl %edx
andl %ebx, %edx
movq 0x18(%rax), %rax
movb (%rax,%rdx), %al
popq %rbx
popq %r14
popq %r15
retq
callq 0x2471
nop
| _ZN5Cache7getByteEjPj:
push r15
push r14
push rbx
mov r15, rdx
mov r14, rdi
inc dword ptr [rdi+20h]
mov ebx, esi
inc dword ptr [rdi+8]
call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint)
cmp eax, 0FFFFFFFFh
jz short loc_3A9A
mov edx, [r14+3Ch]
test edx, edx
jz short loc_3AEB
xor ecx, ecx
cmp edx, 1
jz short loc_3AF0
cmp edx, 2
jb short loc_3AF0
xor ecx, ecx
mov esi, edx
loc_3A8D:
shr esi, 1
inc ecx
cmp edx, 3
mov edx, esi
ja short loc_3A8D
jmp short loc_3AF0
loc_3A9A:
inc dword ptr [r14+14h]
mov eax, [r14+4Ch]
add [r14+18h], rax
mov rdi, r14; this
mov esi, ebx; unsigned int
mov rdx, r15; unsigned int *
call _ZN5Cache23loadBlockFromLowerLevelEjPj; Cache::loadBlockFromLowerLevel(uint,uint *)
mov rdi, r14; this
mov esi, ebx; unsigned int
call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint)
cmp eax, 0FFFFFFFFh
jz loc_3B58
mov edx, [r14+3Ch]
test edx, edx
jz short loc_3B21
xor ecx, ecx
cmp edx, 1
jz short loc_3B26
cmp edx, 2
jb short loc_3B26
xor ecx, ecx
mov esi, edx
loc_3ADE:
shr esi, 1
inc ecx
cmp edx, 3
mov edx, esi
ja short loc_3ADE
jmp short loc_3B26
loc_3AEB:
mov ecx, 0FFFFFFFFh
loc_3AF0:
inc dword ptr [r14+10h]
mov esi, [r14+20h]
mov edx, [r14+48h]
add [r14+18h], rdx
cdqe
mov rdi, [r14+50h]
lea r8, [rax+rax*2]
shl r8, 4
lea rax, [rdi+r8]
mov [rdi+r8+10h], esi
test r15, r15
jz short loc_3B40
mov [r15], edx
jmp short loc_3B40
loc_3B21:
mov ecx, 0FFFFFFFFh
loc_3B26:
mov edx, [r14+20h]
cdqe
mov rsi, [r14+50h]
lea rdi, [rax+rax*2]
shl rdi, 4
lea rax, [rsi+rdi]
mov [rsi+rdi+10h], edx
loc_3B40:
mov edx, 0FFFFFFFFh
shl edx, cl
not edx
and edx, ebx
mov rax, [rax+18h]
mov al, [rax+rdx]
pop rbx
pop r14
pop r15
retn
loc_3B58:
call _ZN5Cache7getByteEjPj_cold_1; Cache::getByte(uint,uint *) [clone]
| char Cache::getByte(Cache *this, unsigned int a2, unsigned int *a3)
{
int BlockId; // eax
unsigned int v6; // edx
char v7; // cl
unsigned int v8; // esi
bool v9; // cc
int v10; // eax
unsigned int v11; // edx
unsigned int v12; // esi
int v13; // esi
long long v14; // rdx
long long v15; // rax
++*((_DWORD *)this + 8);
++*((_DWORD *)this + 2);
BlockId = Cache::getBlockId(this, a2);
if ( BlockId == -1 )
{
++*((_DWORD *)this + 5);
*((_QWORD *)this + 3) += *((unsigned int *)this + 19);
Cache::loadBlockFromLowerLevel(this, a2, a3);
v10 = Cache::getBlockId(this, a2);
if ( v10 == -1 )
Cache::getByte();
v11 = *((_DWORD *)this + 15);
if ( v11 )
{
v7 = 0;
if ( v11 != 1 )
{
v7 = 0;
v12 = *((_DWORD *)this + 15);
do
{
v12 >>= 1;
++v7;
v9 = v11 <= 3;
v11 = v12;
}
while ( !v9 );
}
}
else
{
v7 = -1;
}
v15 = *((_QWORD *)this + 10) + 48LL * v10;
*(_DWORD *)(v15 + 16) = *((_DWORD *)this + 8);
}
else
{
v6 = *((_DWORD *)this + 15);
if ( v6 )
{
v7 = 0;
if ( v6 != 1 )
{
v7 = 0;
v8 = *((_DWORD *)this + 15);
do
{
v8 >>= 1;
++v7;
v9 = v6 <= 3;
v6 = v8;
}
while ( !v9 );
}
}
else
{
v7 = -1;
}
++*((_DWORD *)this + 4);
v13 = *((_DWORD *)this + 8);
v14 = *((unsigned int *)this + 18);
*((_QWORD *)this + 3) += v14;
v15 = *((_QWORD *)this + 10) + 48LL * BlockId;
*(_DWORD *)(v15 + 16) = v13;
if ( a3 )
*a3 = v14;
}
return *(_BYTE *)(*(_QWORD *)(v15 + 24) + (a2 & ~(-1 << v7)));
}
| getByte:
PUSH R15
PUSH R14
PUSH RBX
MOV R15,RDX
MOV R14,RDI
INC dword ptr [RDI + 0x20]
MOV EBX,ESI
INC dword ptr [RDI + 0x8]
CALL 0x0010390a
CMP EAX,-0x1
JZ 0x00103a9a
MOV EDX,dword ptr [R14 + 0x3c]
TEST EDX,EDX
JZ 0x00103aeb
XOR ECX,ECX
CMP EDX,0x1
JZ 0x00103af0
CMP EDX,0x2
JC 0x00103af0
XOR ECX,ECX
MOV ESI,EDX
LAB_00103a8d:
SHR ESI,0x1
INC ECX
CMP EDX,0x3
MOV EDX,ESI
JA 0x00103a8d
JMP 0x00103af0
LAB_00103a9a:
INC dword ptr [R14 + 0x14]
MOV EAX,dword ptr [R14 + 0x4c]
ADD qword ptr [R14 + 0x18],RAX
MOV RDI,R14
MOV ESI,EBX
MOV RDX,R15
CALL 0x00103b92
MOV RDI,R14
MOV ESI,EBX
CALL 0x0010390a
CMP EAX,-0x1
JZ 0x00103b58
MOV EDX,dword ptr [R14 + 0x3c]
TEST EDX,EDX
JZ 0x00103b21
XOR ECX,ECX
CMP EDX,0x1
JZ 0x00103b26
CMP EDX,0x2
JC 0x00103b26
XOR ECX,ECX
MOV ESI,EDX
LAB_00103ade:
SHR ESI,0x1
INC ECX
CMP EDX,0x3
MOV EDX,ESI
JA 0x00103ade
JMP 0x00103b26
LAB_00103aeb:
MOV ECX,0xffffffff
LAB_00103af0:
INC dword ptr [R14 + 0x10]
MOV ESI,dword ptr [R14 + 0x20]
MOV EDX,dword ptr [R14 + 0x48]
ADD qword ptr [R14 + 0x18],RDX
CDQE
MOV RDI,qword ptr [R14 + 0x50]
LEA R8,[RAX + RAX*0x2]
SHL R8,0x4
LEA RAX,[RDI + R8*0x1]
MOV dword ptr [RDI + R8*0x1 + 0x10],ESI
TEST R15,R15
JZ 0x00103b40
MOV dword ptr [R15],EDX
JMP 0x00103b40
LAB_00103b21:
MOV ECX,0xffffffff
LAB_00103b26:
MOV EDX,dword ptr [R14 + 0x20]
CDQE
MOV RSI,qword ptr [R14 + 0x50]
LEA RDI,[RAX + RAX*0x2]
SHL RDI,0x4
LEA RAX,[RSI + RDI*0x1]
MOV dword ptr [RSI + RDI*0x1 + 0x10],EDX
LAB_00103b40:
MOV EDX,0xffffffff
SHL EDX,CL
NOT EDX
AND EDX,EBX
MOV RAX,qword ptr [RAX + 0x18]
MOV AL,byte ptr [RAX + RDX*0x1]
POP RBX
POP R14
POP R15
RET
LAB_00103b58:
CALL 0x00102471
NOP
|
/* Cache::getByte(unsigned int, unsigned int*) */
ulong __thiscall Cache::getByte(Cache *this,uint param_1,uint *param_2)
{
bool bVar1;
int iVar2;
long lVar3;
byte bVar4;
uint uVar5;
uint *puVar6;
Cache *pCVar7;
*(int *)(this + 0x20) = *(int *)(this + 0x20) + 1;
puVar6 = (uint *)(ulong)param_1;
*(int *)(this + 8) = *(int *)(this + 8) + 1;
iVar2 = getBlockId(this,param_1);
if (iVar2 == -1) {
*(int *)(this + 0x14) = *(int *)(this + 0x14) + 1;
*(ulong *)(this + 0x18) = *(long *)(this + 0x18) + (ulong)*(uint *)(this + 0x4c);
loadBlockFromLowerLevel(this,param_1,param_2);
pCVar7 = this;
iVar2 = getBlockId(this,param_1);
if (iVar2 == -1) {
getByte((uint)pCVar7,puVar6);
uVar5 = *(uint *)(pCVar7 + 0x3c);
bVar4 = 0xff;
if (uVar5 != 0) {
bVar4 = 0;
if ((uVar5 != 1) && (bVar4 = 0, 1 < uVar5)) {
bVar4 = 0;
do {
bVar4 = bVar4 + 1;
bVar1 = 3 < uVar5;
uVar5 = uVar5 >> 1;
} while (bVar1);
}
}
return (ulong)(~(-1 << (bVar4 & 0x1f)) & (uint)puVar6);
}
uVar5 = *(uint *)(this + 0x3c);
if (uVar5 == 0) {
bVar4 = 0xff;
}
else {
bVar4 = 0;
if ((uVar5 != 1) && (1 < uVar5)) {
bVar4 = 0;
do {
bVar4 = bVar4 + 1;
bVar1 = 3 < uVar5;
uVar5 = uVar5 >> 1;
} while (bVar1);
}
}
lVar3 = *(long *)(this + 0x50) + (long)iVar2 * 0x30;
*(int4 *)(*(long *)(this + 0x50) + 0x10 + (long)iVar2 * 0x30) =
*(int4 *)(this + 0x20);
}
else {
uVar5 = *(uint *)(this + 0x3c);
if (uVar5 == 0) {
bVar4 = 0xff;
}
else {
bVar4 = 0;
if ((uVar5 != 1) && (bVar4 = 0, 1 < uVar5)) {
bVar4 = 0;
do {
bVar4 = bVar4 + 1;
bVar1 = 3 < uVar5;
uVar5 = uVar5 >> 1;
} while (bVar1);
}
}
*(int *)(this + 0x10) = *(int *)(this + 0x10) + 1;
uVar5 = *(uint *)(this + 0x48);
*(ulong *)(this + 0x18) = *(long *)(this + 0x18) + (ulong)uVar5;
lVar3 = *(long *)(this + 0x50) + (long)iVar2 * 0x30;
*(int4 *)(*(long *)(this + 0x50) + 0x10 + (long)iVar2 * 0x30) =
*(int4 *)(this + 0x20);
if (param_2 != (uint *)0x0) {
*param_2 = uVar5;
}
}
return CONCAT71((int7)((ulong)*(long *)(lVar3 + 0x18) >> 8),
*(int1 *)
(*(long *)(lVar3 + 0x18) + (ulong)(~(-1 << (bVar4 & 0x1f)) & param_1)));
}
|
|
5,770 | LefDefParser::lefiNonDefault::Init() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiNonDefault.cpp | void
lefiNonDefault::Init()
{
nameSize_ = 16;
name_ = (char*) lefMalloc(16);
layersAllocated_ = 2;
numLayers_ = 0;
layerName_ = (char**) lefMalloc(sizeof(char*) * 2);
width_ = (double*) lefMalloc(sizeof(double) * 2);
diagWidth_ = (double*) lefMalloc(sizeof(double) * 2);
spacing_ = (double*) lefMalloc(sizeof(double) * 2);
wireExtension_ = (double*) lefMalloc(sizeof(double) * 2);
resistance_ = (double*) lefMalloc(sizeof(double) * 2);
capacitance_ = (double*) lefMalloc(sizeof(double) * 2);
edgeCap_ = (double*) lefMalloc(sizeof(double) * 2);
hasWidth_ = (char*) lefMalloc(sizeof(char) * 2);
hasDiagWidth_ = (char*) lefMalloc(sizeof(char) * 2);
hasSpacing_ = (char*) lefMalloc(sizeof(char) * 2);
hasWireExtension_ = (char*) lefMalloc(sizeof(char) * 2);
hasResistance_ = (char*) lefMalloc(sizeof(char) * 2);
hasCapacitance_ = (char*) lefMalloc(sizeof(char) * 2);
hasEdgeCap_ = (char*) lefMalloc(sizeof(char) * 2);
allocatedVias_ = 2;
numVias_ = 0;
viaRules_ = (lefiVia**) lefMalloc(sizeof(lefiVia*) * 2);
allocatedSpacing_ = 2;
numSpacing_ = 0;
spacingRules_ = (lefiSpacing**) lefMalloc(sizeof(lefiSpacing*) * 2);
numProps_ = 0;
propsAllocated_ = 1;
names_ = (char**) lefMalloc(sizeof(char*));
values_ = (char**) lefMalloc(sizeof(char*));
dvalues_ = (double*) lefMalloc(sizeof(double));
types_ = (char*) lefMalloc(sizeof(char));
hardSpacing_ = 0;
numUseVias_ = 0; // Won't be allocated until they are used
allocatedUseVias_ = 0;
numUseViaRules_ = 0;
allocatedUseViaRules_ = 0;
numMinCuts_ = 0;
allocatedMinCuts_ = 0;
} | O3 | cpp | LefDefParser::lefiNonDefault::Init():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, (%rdi)
movl $0x10, %edi
callq 0x30c15
movq %rax, 0x8(%rbx)
movabsq $0x200000000, %r14 # imm = 0x200000000
movq %r14, 0x10(%rbx)
movl $0x10, %edi
callq 0x30c15
movq %rax, 0x18(%rbx)
movl $0x10, %edi
callq 0x30c15
movq %rax, 0x20(%rbx)
movl $0x10, %edi
callq 0x30c15
movq %rax, 0x80(%rbx)
movl $0x10, %edi
callq 0x30c15
movq %rax, 0x28(%rbx)
movl $0x10, %edi
callq 0x30c15
movq %rax, 0x30(%rbx)
movl $0x10, %edi
callq 0x30c15
movq %rax, 0x50(%rbx)
movl $0x10, %edi
callq 0x30c15
movq %rax, 0x58(%rbx)
movl $0x10, %edi
callq 0x30c15
movq %rax, 0x60(%rbx)
movl $0x2, %edi
callq 0x30c15
movq %rax, 0x38(%rbx)
movl $0x2, %edi
callq 0x30c15
movq %rax, 0x88(%rbx)
movl $0x2, %edi
callq 0x30c15
movq %rax, 0x40(%rbx)
movl $0x2, %edi
callq 0x30c15
movq %rax, 0x48(%rbx)
movl $0x2, %edi
callq 0x30c15
movq %rax, 0x68(%rbx)
movl $0x2, %edi
callq 0x30c15
movq %rax, 0x70(%rbx)
movl $0x2, %edi
callq 0x30c15
movq %rax, 0x78(%rbx)
movq %r14, 0x90(%rbx)
movl $0x10, %edi
callq 0x30c15
movq %rax, 0x98(%rbx)
movq %r14, 0xa0(%rbx)
movl $0x10, %edi
callq 0x30c15
movq %rax, 0xa8(%rbx)
movabsq $0x100000000, %rax # imm = 0x100000000
movq %rax, 0xf0(%rbx)
movl $0x8, %edi
callq 0x30c15
movq %rax, 0xf8(%rbx)
movl $0x8, %edi
callq 0x30c15
movq %rax, 0x100(%rbx)
movl $0x8, %edi
callq 0x30c15
movq %rax, 0x108(%rbx)
movl $0x1, %edi
callq 0x30c15
movq %rax, 0x110(%rbx)
xorl %eax, %eax
movq %rax, 0xb0(%rbx)
movl $0x0, 0xb8(%rbx)
movq %rax, 0xc8(%rbx)
movq %rax, 0xd8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN12LefDefParser14lefiNonDefault4InitEv:
push r14
push rbx
push rax
mov rbx, rdi
mov dword ptr [rdi], 10h
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+8], rax
mov r14, 200000000h
mov [rbx+10h], r14
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+18h], rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+20h], rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+80h], rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+28h], rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+30h], rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+50h], rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+58h], rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+60h], rax
mov edi, (offset dword_0+2); this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+38h], rax
mov edi, (offset dword_0+2); this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+88h], rax
mov edi, (offset dword_0+2); this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+40h], rax
mov edi, (offset dword_0+2); this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+48h], rax
mov edi, (offset dword_0+2); this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+68h], rax
mov edi, (offset dword_0+2); this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+70h], rax
mov edi, (offset dword_0+2); this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+78h], rax
mov [rbx+90h], r14
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+98h], rax
mov [rbx+0A0h], r14
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+0A8h], rax
mov rax, 100000000h
mov [rbx+0F0h], rax
mov edi, offset byte_8; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+0F8h], rax
mov edi, offset byte_8; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+100h], rax
mov edi, offset byte_8; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+108h], rax
mov edi, (offset dword_0+1); this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rbx+110h], rax
xor eax, eax
mov [rbx+0B0h], rax
mov dword ptr [rbx+0B8h], 0
mov [rbx+0C8h], rax
mov [rbx+0D8h], rax
add rsp, 8
pop rbx
pop r14
retn
| long long LefDefParser::lefiNonDefault::Init(LefDefParser::lefiNonDefault *this, unsigned long long a2)
{
long long result; // rax
*(_DWORD *)this = 16;
*((_QWORD *)this + 1) = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
*((_QWORD *)this + 2) = 0x200000000LL;
*((_QWORD *)this + 3) = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
*((_QWORD *)this + 4) = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
*((_QWORD *)this + 16) = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
*((_QWORD *)this + 5) = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
*((_QWORD *)this + 6) = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
*((_QWORD *)this + 10) = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
*((_QWORD *)this + 11) = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
*((_QWORD *)this + 12) = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
*((_QWORD *)this + 7) = LefDefParser::lefMalloc((LefDefParser *)((char *)&dword_0 + 2), a2);
*((_QWORD *)this + 17) = LefDefParser::lefMalloc((LefDefParser *)((char *)&dword_0 + 2), a2);
*((_QWORD *)this + 8) = LefDefParser::lefMalloc((LefDefParser *)((char *)&dword_0 + 2), a2);
*((_QWORD *)this + 9) = LefDefParser::lefMalloc((LefDefParser *)((char *)&dword_0 + 2), a2);
*((_QWORD *)this + 13) = LefDefParser::lefMalloc((LefDefParser *)((char *)&dword_0 + 2), a2);
*((_QWORD *)this + 14) = LefDefParser::lefMalloc((LefDefParser *)((char *)&dword_0 + 2), a2);
*((_QWORD *)this + 15) = LefDefParser::lefMalloc((LefDefParser *)((char *)&dword_0 + 2), a2);
*((_QWORD *)this + 18) = 0x200000000LL;
*((_QWORD *)this + 19) = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
*((_QWORD *)this + 20) = 0x200000000LL;
*((_QWORD *)this + 21) = LefDefParser::lefMalloc((LefDefParser *)&word_10, a2);
*((_QWORD *)this + 30) = 0x100000000LL;
*((_QWORD *)this + 31) = LefDefParser::lefMalloc((LefDefParser *)&byte_8, a2);
*((_QWORD *)this + 32) = LefDefParser::lefMalloc((LefDefParser *)&byte_8, a2);
*((_QWORD *)this + 33) = LefDefParser::lefMalloc((LefDefParser *)&byte_8, a2);
*((_QWORD *)this + 34) = LefDefParser::lefMalloc((LefDefParser *)((char *)&dword_0 + 1), a2);
result = 0LL;
*((_QWORD *)this + 22) = 0LL;
*((_DWORD *)this + 46) = 0;
*((_QWORD *)this + 25) = 0LL;
*((_QWORD *)this + 27) = 0LL;
return result;
}
| Init:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV dword ptr [RDI],0x10
MOV EDI,0x10
CALL 0x00130c15
MOV qword ptr [RBX + 0x8],RAX
MOV R14,0x200000000
MOV qword ptr [RBX + 0x10],R14
MOV EDI,0x10
CALL 0x00130c15
MOV qword ptr [RBX + 0x18],RAX
MOV EDI,0x10
CALL 0x00130c15
MOV qword ptr [RBX + 0x20],RAX
MOV EDI,0x10
CALL 0x00130c15
MOV qword ptr [RBX + 0x80],RAX
MOV EDI,0x10
CALL 0x00130c15
MOV qword ptr [RBX + 0x28],RAX
MOV EDI,0x10
CALL 0x00130c15
MOV qword ptr [RBX + 0x30],RAX
MOV EDI,0x10
CALL 0x00130c15
MOV qword ptr [RBX + 0x50],RAX
MOV EDI,0x10
CALL 0x00130c15
MOV qword ptr [RBX + 0x58],RAX
MOV EDI,0x10
CALL 0x00130c15
MOV qword ptr [RBX + 0x60],RAX
MOV EDI,0x2
CALL 0x00130c15
MOV qword ptr [RBX + 0x38],RAX
MOV EDI,0x2
CALL 0x00130c15
MOV qword ptr [RBX + 0x88],RAX
MOV EDI,0x2
CALL 0x00130c15
MOV qword ptr [RBX + 0x40],RAX
MOV EDI,0x2
CALL 0x00130c15
MOV qword ptr [RBX + 0x48],RAX
MOV EDI,0x2
CALL 0x00130c15
MOV qword ptr [RBX + 0x68],RAX
MOV EDI,0x2
CALL 0x00130c15
MOV qword ptr [RBX + 0x70],RAX
MOV EDI,0x2
CALL 0x00130c15
MOV qword ptr [RBX + 0x78],RAX
MOV qword ptr [RBX + 0x90],R14
MOV EDI,0x10
CALL 0x00130c15
MOV qword ptr [RBX + 0x98],RAX
MOV qword ptr [RBX + 0xa0],R14
MOV EDI,0x10
CALL 0x00130c15
MOV qword ptr [RBX + 0xa8],RAX
MOV RAX,0x100000000
MOV qword ptr [RBX + 0xf0],RAX
MOV EDI,0x8
CALL 0x00130c15
MOV qword ptr [RBX + 0xf8],RAX
MOV EDI,0x8
CALL 0x00130c15
MOV qword ptr [RBX + 0x100],RAX
MOV EDI,0x8
CALL 0x00130c15
MOV qword ptr [RBX + 0x108],RAX
MOV EDI,0x1
CALL 0x00130c15
MOV qword ptr [RBX + 0x110],RAX
XOR EAX,EAX
MOV qword ptr [RBX + 0xb0],RAX
MOV dword ptr [RBX + 0xb8],0x0
MOV qword ptr [RBX + 0xc8],RAX
MOV qword ptr [RBX + 0xd8],RAX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* LefDefParser::lefiNonDefault::Init() */
void LefDefParser::lefiNonDefault::Init(void)
{
int8 uVar1;
ulong in_RSI;
int4 *in_RDI;
*in_RDI = 0x10;
uVar1 = lefMalloc((LefDefParser *)0x10,in_RSI);
*(int8 *)(in_RDI + 2) = uVar1;
*(int8 *)(in_RDI + 4) = 0x200000000;
uVar1 = lefMalloc((LefDefParser *)0x10,in_RSI);
*(int8 *)(in_RDI + 6) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x10,in_RSI);
*(int8 *)(in_RDI + 8) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x10,in_RSI);
*(int8 *)(in_RDI + 0x20) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x10,in_RSI);
*(int8 *)(in_RDI + 10) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x10,in_RSI);
*(int8 *)(in_RDI + 0xc) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x10,in_RSI);
*(int8 *)(in_RDI + 0x14) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x10,in_RSI);
*(int8 *)(in_RDI + 0x16) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x10,in_RSI);
*(int8 *)(in_RDI + 0x18) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x2,in_RSI);
*(int8 *)(in_RDI + 0xe) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x2,in_RSI);
*(int8 *)(in_RDI + 0x22) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x2,in_RSI);
*(int8 *)(in_RDI + 0x10) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x2,in_RSI);
*(int8 *)(in_RDI + 0x12) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x2,in_RSI);
*(int8 *)(in_RDI + 0x1a) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x2,in_RSI);
*(int8 *)(in_RDI + 0x1c) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x2,in_RSI);
*(int8 *)(in_RDI + 0x1e) = uVar1;
*(int8 *)(in_RDI + 0x24) = 0x200000000;
uVar1 = lefMalloc((LefDefParser *)0x10,in_RSI);
*(int8 *)(in_RDI + 0x26) = uVar1;
*(int8 *)(in_RDI + 0x28) = 0x200000000;
uVar1 = lefMalloc((LefDefParser *)0x10,in_RSI);
*(int8 *)(in_RDI + 0x2a) = uVar1;
*(int8 *)(in_RDI + 0x3c) = 0x100000000;
uVar1 = lefMalloc((LefDefParser *)0x8,in_RSI);
*(int8 *)(in_RDI + 0x3e) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x8,in_RSI);
*(int8 *)(in_RDI + 0x40) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x8,in_RSI);
*(int8 *)(in_RDI + 0x42) = uVar1;
uVar1 = lefMalloc((LefDefParser *)0x1,in_RSI);
*(int8 *)(in_RDI + 0x44) = uVar1;
*(int8 *)(in_RDI + 0x2c) = 0;
in_RDI[0x2e] = 0;
*(int8 *)(in_RDI + 0x32) = 0;
*(int8 *)(in_RDI + 0x36) = 0;
return;
}
|
|
5,771 | POINTonE1_sign | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e1.c | static void POINTonE1_sign(POINTonE1 *out, const POINTonE1 *in, const pow256 SK)
{
vec384 Z, ZZ;
limb_t inf;
POINTonE1_mult_glv(out, in, SK);
/* convert to affine to remove possible bias in out->Z */
inf = vec_is_zero(out->Z, sizeof(out->Z));
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
flt_reciprocal_fp(Z, out->Z); /* 1/Z */
#else
reciprocal_fp(Z, out->Z); /* 1/Z */
#endif
sqr_fp(ZZ, Z);
mul_fp(out->X, out->X, ZZ); /* X = X/Z^2 */
mul_fp(ZZ, ZZ, Z);
mul_fp(out->Y, out->Y, ZZ); /* Y = Y/Z^3 */
vec_select(out->Z, out->Z, BLS12_381_G1.Z, sizeof(BLS12_381_G1.Z),
inf); /* Z = inf ? 0 : 1 */
} | O0 | c | POINTonE1_sign:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x25af0
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movl $0x30, %esi
callq 0x23820
movq %rax, -0x88(%rbp)
leaq -0x50(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
callq 0x331a0
leaq -0x80(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2d0b0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x30bd0
leaq -0x80(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x30bd0
movq -0x8(%rbp), %rdi
addq $0x30, %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
leaq -0x80(%rbp), %rdx
callq 0x30bd0
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
movq -0x88(%rbp), %r8
leaq 0x2f4c0(%rip), %rdx # 0x54968
addq $0x60, %rdx
movl $0x30, %ecx
callq 0x23690
addq $0x90, %rsp
popq %rbp
retq
nop
| POINTonE1_sign:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call POINTonE1_mult_glv
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
mov esi, 30h ; '0'
call vec_is_zero
mov [rbp+var_88], rax
lea rdi, [rbp+var_50]
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
call _flt_reciprocal_fp
lea rdi, [rbp+var_80]
lea rsi, [rbp+var_50]
call sqr_fp
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_8]
lea rdx, [rbp+var_80]
call mul_fp
lea rdi, [rbp+var_80]
lea rsi, [rbp+var_80]
lea rdx, [rbp+var_50]
call mul_fp
mov rdi, [rbp+var_8]
add rdi, 30h ; '0'
mov rsi, [rbp+var_8]
add rsi, 30h ; '0'
lea rdx, [rbp+var_80]
call mul_fp
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
mov r8, [rbp+var_88]
lea rdx, BLS12_381_G1
add rdx, 60h ; '`'
mov ecx, 30h ; '0'
call vec_select
add rsp, 90h
pop rbp
retn
| long long POINTonE1_sign(long long a1, long long a2, long long a3)
{
unsigned long long is_zero; // [rsp+8h] [rbp-88h]
_BYTE v5[48]; // [rsp+10h] [rbp-80h] BYREF
_BYTE v6[56]; // [rsp+40h] [rbp-50h] BYREF
long long v7; // [rsp+78h] [rbp-18h]
long long v8; // [rsp+80h] [rbp-10h]
long long v9; // [rsp+88h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
POINTonE1_mult_glv(a1, a2, a3);
is_zero = vec_is_zero(a1 + 96, 0x30uLL);
flt_reciprocal_fp(v6, a1 + 96);
sqr_fp(v5, v6);
mul_fp(v9, v9, v5);
mul_fp(v5, v5, v6);
mul_fp(v9 + 48, v9 + 48, v5);
return vec_select(v9 + 96, v9 + 96, (long long)&BLS12_381_G1 + 96, 0x30uLL, is_zero);
}
| POINTonE1_sign:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00125af0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
MOV ESI,0x30
CALL 0x00123820
MOV qword ptr [RBP + -0x88],RAX
LEA RDI,[RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
CALL 0x001331a0
LEA RDI,[RBP + -0x80]
LEA RSI,[RBP + -0x50]
CALL 0x0012d0b0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[RBP + -0x80]
CALL 0x00130bd0
LEA RDI,[RBP + -0x80]
LEA RSI,[RBP + -0x80]
LEA RDX,[RBP + -0x50]
CALL 0x00130bd0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x30
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x30
LEA RDX,[RBP + -0x80]
CALL 0x00130bd0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
MOV R8,qword ptr [RBP + -0x88]
LEA RDX,[0x154968]
ADD RDX,0x60
MOV ECX,0x30
CALL 0x00123690
ADD RSP,0x90
POP RBP
RET
|
void POINTonE1_sign(long param_1,int8 param_2,int8 param_3)
{
int8 uVar1;
int1 local_88 [48];
int1 local_58 [56];
int8 local_20;
int8 local_18;
long local_10;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
POINTonE1_mult_glv(param_1,param_2,param_3);
uVar1 = vec_is_zero(local_10 + 0x60,0x30);
flt_reciprocal_fp(local_58,local_10 + 0x60);
sqr_fp(local_88,local_58);
mul_fp(local_10,local_10,local_88);
mul_fp(local_88,local_88,local_58);
mul_fp(local_10 + 0x30,local_10 + 0x30,local_88);
vec_select(local_10 + 0x60,local_10 + 0x60,0x1549c8,0x30,uVar1);
return;
}
|
|
5,772 | my_uni_ucs2 | eloqsql/strings/ctype-ucs2.c | static int my_uni_ucs2(CHARSET_INFO *cs __attribute__((unused)) ,
my_wc_t wc, uchar *r, uchar *e)
{
if ( r+2 > e )
return MY_CS_TOOSMALL2;
if (wc > 0xFFFF) /* UCS2 does not support characters outside BMP */
return MY_CS_ILUNI;
r[0]= (uchar) (wc >> 8);
r[1]= (uchar) (wc & 0xFF);
return 2;
} | O3 | c | my_uni_ucs2:
pushq %rbp
movq %rsp, %rbp
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0xcbe80
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0xcbe80
rolw $0x8, %si
movw %si, (%rdx)
movl $0x2, %eax
popq %rbp
retq
| my_uni_ucs2:
push rbp
mov rbp, rsp
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_CBE80
xor eax, eax
cmp rsi, 0FFFFh
ja short loc_CBE80
rol si, 8
mov [rdx], si
mov eax, 2
loc_CBE80:
pop rbp
retn
| long long my_uni_ucs2(long long a1, unsigned long long a2, _WORD *a3, unsigned long long a4)
{
long long result; // rax
result = 4294967194LL;
if ( (unsigned long long)(a3 + 1) <= a4 )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
*a3 = __ROL2__(a2, 8);
return 2LL;
}
}
return result;
}
| my_uni_ucs2:
PUSH RBP
MOV RBP,RSP
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x001cbe80
XOR EAX,EAX
CMP RSI,0xffff
JA 0x001cbe80
ROL SI,0x8
MOV word ptr [RDX],SI
MOV EAX,0x2
LAB_001cbe80:
POP RBP
RET
|
int8 my_uni_ucs2(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4)
{
int8 uVar1;
uVar1 = 0xffffff9a;
if ((param_3 + 1 <= param_4) && (uVar1 = 0, param_2 < 0x10000)) {
*param_3 = (ushort)param_2 << 8 | (ushort)param_2 >> 8;
uVar1 = 2;
}
return uVar1;
}
|
|
5,773 | pfs_get_thread_file_name_locker_v1 | eloqsql/storage/perfschema/pfs.cc | PSI_file_locker*
pfs_get_thread_file_name_locker_v1(PSI_file_locker_state *state,
PSI_file_key key,
PSI_file_operation op,
const char *name, const void *identity)
{
assert(static_cast<int> (op) >= 0);
assert(static_cast<uint> (op) < array_elements(file_operation_map));
assert(state != NULL);
if (psi_unlikely(! flag_global_instrumentation))
return NULL;
PFS_file_class *klass= find_file_class(key);
if (unlikely(klass == NULL))
return NULL;
if (! klass->m_enabled)
return NULL;
/* Needed for the LF_HASH */
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
return NULL;
if (flag_thread_instrumentation && ! pfs_thread->m_enabled)
return NULL;
uint flags;
state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread);
flags= STATE_FLAG_THREAD;
if (klass->m_timed)
flags|= STATE_FLAG_TIMED;
if (flag_events_waits_current)
{
if (unlikely(pfs_thread->m_events_waits_current >=
& pfs_thread->m_events_waits_stack[WAIT_STACK_SIZE]))
{
locker_lost++;
return NULL;
}
PFS_events_waits *wait= pfs_thread->m_events_waits_current;
state->m_wait= wait;
flags|= STATE_FLAG_EVENT;
PFS_events_waits *parent_event= wait - 1;
wait->m_event_type= EVENT_TYPE_WAIT;
wait->m_nesting_event_id= parent_event->m_event_id;
wait->m_nesting_event_type= parent_event->m_event_type;
wait->m_thread_internal_id= pfs_thread->m_thread_internal_id;
wait->m_class= klass;
wait->m_timer_start= 0;
wait->m_timer_end= 0;
wait->m_object_instance_addr= NULL;
wait->m_weak_file= NULL;
wait->m_weak_version= 0;
wait->m_event_id= pfs_thread->m_event_id++;
wait->m_end_event_id= 0;
wait->m_operation= file_operation_map[static_cast<int> (op)];
wait->m_wait_class= WAIT_CLASS_FILE;
pfs_thread->m_events_waits_current++;
}
state->m_flags= flags;
state->m_file= NULL;
state->m_name= name;
state->m_class= klass;
state->m_operation= op;
return reinterpret_cast<PSI_file_locker*> (state);
} | O3 | cpp | pfs_get_thread_file_name_locker_v1:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x3a7bc3(%rip), %rax # 0x3d0c00
cmpb $0x1, (%rax)
je 0x29050
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rcx, %r15
movl %edx, %r14d
movq %rdi, %rbx
movl %esi, %edi
callq 0x35e8f
testq %rax, %rax
je 0x29042
movq %rax, %r12
cmpb $0x1, 0x4(%rax)
jne 0x29042
movl 0x3a71f8(%rip), %edi # 0x3d026c
callq 0x26540
testq %rax, %rax
je 0x29042
leaq 0x3a7bbb(%rip), %rcx # 0x3d0c40
cmpb $0x1, (%rcx)
jne 0x29093
cmpb $0x1, 0x7e0(%rax)
jne 0x29042
movq %rax, 0x20(%rbx)
movzbl 0x5(%r12), %ecx
orl $0x2, %ecx
leaq 0x3a7a99(%rip), %rdx # 0x3d0b40
cmpb $0x1, (%rdx)
jne 0x29155
movq 0x7f0(%rax), %rdx
movq %rax, %rsi
addq $0xc98, %rsi # imm = 0xC98
cmpq %rsi, %rdx
jae 0x2916d
movq %rdx, 0x40(%rbx)
movl $0x4, 0x18(%rdx)
movq -0xa8(%rdx), %rsi
movq %rsi, 0x20(%rdx)
movl -0x98(%rdx), %esi
movl %esi, 0x28(%rdx)
movq 0x850(%rax), %rsi
movq %rsi, (%rdx)
movq %r12, 0x30(%rdx)
andq $0x0, 0x88(%rdx)
orl $0x4, %ecx
andq $0x0, 0x68(%rdx)
andl $0x0, 0x80(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rdx)
movq 0x7f8(%rax), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, 0x7f8(%rax)
movq %rsi, 0x8(%rdx)
andq $0x0, 0x10(%rdx)
movslq %r14d, %rsi
leaq 0x57e96(%rip), %rdi # 0x80fd0
movl (%rdi,%rsi,4), %esi
movl %esi, 0x90(%rdx)
movl $0x5, 0x58(%rdx)
addq $0xb0, 0x7f0(%rax)
movl %ecx, (%rbx)
andq $0x0, 0x8(%rbx)
movq %r15, 0x10(%rbx)
movq %r12, 0x18(%rbx)
movl %r14d, 0x4(%rbx)
jmp 0x29044
leaq 0x3a3d1c(%rip), %rax # 0x3cce90
incq (%rax)
jmp 0x29042
| pfs_get_thread_file_name_locker_v1:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
lea rax, flag_global_instrumentation
cmp byte ptr [rax], 1
jz short loc_29050
loc_29042:
xor ebx, ebx
loc_29044:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_29050:
mov r15, rcx
mov r14d, edx
mov rbx, rdi
mov edi, esi; unsigned int
call _Z15find_file_classj; find_file_class(uint)
test rax, rax
jz short loc_29042
mov r12, rax
cmp byte ptr [rax+4], 1
jnz short loc_29042
mov edi, cs:THR_PFS
call _pthread_getspecific
test rax, rax
jz short loc_29042
lea rcx, flag_thread_instrumentation
cmp byte ptr [rcx], 1
jnz short loc_29093
cmp byte ptr [rax+7E0h], 1
jnz short loc_29042
loc_29093:
mov [rbx+20h], rax
movzx ecx, byte ptr [r12+5]
or ecx, 2
lea rdx, flag_events_waits_current
cmp byte ptr [rdx], 1
jnz loc_29155
mov rdx, [rax+7F0h]
mov rsi, rax
add rsi, 0C98h
cmp rdx, rsi
jnb loc_2916D
mov [rbx+40h], rdx
mov dword ptr [rdx+18h], 4
mov rsi, [rdx-0A8h]
mov [rdx+20h], rsi
mov esi, [rdx-98h]
mov [rdx+28h], esi
mov rsi, [rax+850h]
mov [rdx], rsi
mov [rdx+30h], r12
and qword ptr [rdx+88h], 0
or ecx, 4
and qword ptr [rdx+68h], 0
and dword ptr [rdx+80h], 0
xorps xmm0, xmm0
movups xmmword ptr [rdx+38h], xmm0
mov rsi, [rax+7F8h]
lea rdi, [rsi+1]
mov [rax+7F8h], rdi
mov [rdx+8], rsi
and qword ptr [rdx+10h], 0
movsxd rsi, r14d
lea rdi, _ZL18file_operation_map; file_operation_map
mov esi, [rdi+rsi*4]
mov [rdx+90h], esi
mov dword ptr [rdx+58h], 5
add qword ptr [rax+7F0h], 0B0h
loc_29155:
mov [rbx], ecx
and qword ptr [rbx+8], 0
mov [rbx+10h], r15
mov [rbx+18h], r12
mov [rbx+4], r14d
jmp loc_29044
loc_2916D:
lea rax, locker_lost
inc qword ptr [rax]
jmp loc_29042
| long long pfs_get_thread_file_name_locker_v1(long long a1, unsigned int a2, int a3, long long a4)
{
long long v4; // rbx
long long file_class; // rax
long long v9; // r12
long long v10; // rax
int v11; // ecx
unsigned long long v12; // rdx
long long v13; // rsi
if ( flag_global_instrumentation[0] == 1 )
{
v4 = a1;
file_class = find_file_class(a2);
if ( file_class )
{
v9 = file_class;
if ( *(_BYTE *)(file_class + 4) == 1 )
{
v10 = pthread_getspecific((unsigned int)THR_PFS);
if ( v10 )
{
if ( flag_thread_instrumentation[0] != 1 || *(_BYTE *)(v10 + 2016) == 1 )
{
*(_QWORD *)(a1 + 32) = v10;
v11 = *(unsigned __int8 *)(v9 + 5) | 2;
if ( flag_events_waits_current != 1 )
{
LABEL_12:
*(_DWORD *)a1 = v11;
*(_QWORD *)(a1 + 8) = 0LL;
*(_QWORD *)(a1 + 16) = a4;
*(_QWORD *)(a1 + 24) = v9;
*(_DWORD *)(a1 + 4) = a3;
return v4;
}
v12 = *(_QWORD *)(v10 + 2032);
if ( v12 < v10 + 3224 )
{
*(_QWORD *)(a1 + 64) = v12;
*(_DWORD *)(v12 + 24) = 4;
*(_QWORD *)(v12 + 32) = *(_QWORD *)(v12 - 168);
*(_DWORD *)(v12 + 40) = *(_DWORD *)(v12 - 152);
*(_QWORD *)v12 = *(_QWORD *)(v10 + 2128);
*(_QWORD *)(v12 + 48) = v9;
*(_QWORD *)(v12 + 136) = 0LL;
v11 |= 4u;
*(_QWORD *)(v12 + 104) = 0LL;
*(_DWORD *)(v12 + 128) = 0;
*(_OWORD *)(v12 + 56) = 0LL;
v13 = *(_QWORD *)(v10 + 2040);
*(_QWORD *)(v10 + 2040) = v13 + 1;
*(_QWORD *)(v12 + 8) = v13;
*(_QWORD *)(v12 + 16) = 0LL;
*(_DWORD *)(v12 + 144) = file_operation_map[a3];
*(_DWORD *)(v12 + 88) = 5;
*(_QWORD *)(v10 + 2032) += 176LL;
goto LABEL_12;
}
++locker_lost;
}
}
}
}
}
return 0LL;
}
| pfs_get_thread_file_name_locker_v1:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
LEA RAX,[0x4d0c00]
CMP byte ptr [RAX],0x1
JZ 0x00129050
LAB_00129042:
XOR EBX,EBX
LAB_00129044:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00129050:
MOV R15,RCX
MOV R14D,EDX
MOV RBX,RDI
MOV EDI,ESI
CALL 0x00135e8f
TEST RAX,RAX
JZ 0x00129042
MOV R12,RAX
CMP byte ptr [RAX + 0x4],0x1
JNZ 0x00129042
MOV EDI,dword ptr [0x004d026c]
CALL 0x00126540
TEST RAX,RAX
JZ 0x00129042
LEA RCX,[0x4d0c40]
CMP byte ptr [RCX],0x1
JNZ 0x00129093
CMP byte ptr [RAX + 0x7e0],0x1
JNZ 0x00129042
LAB_00129093:
MOV qword ptr [RBX + 0x20],RAX
MOVZX ECX,byte ptr [R12 + 0x5]
OR ECX,0x2
LEA RDX,[0x4d0b40]
CMP byte ptr [RDX],0x1
JNZ 0x00129155
MOV RDX,qword ptr [RAX + 0x7f0]
MOV RSI,RAX
ADD RSI,0xc98
CMP RDX,RSI
JNC 0x0012916d
MOV qword ptr [RBX + 0x40],RDX
MOV dword ptr [RDX + 0x18],0x4
MOV RSI,qword ptr [RDX + -0xa8]
MOV qword ptr [RDX + 0x20],RSI
MOV ESI,dword ptr [RDX + -0x98]
MOV dword ptr [RDX + 0x28],ESI
MOV RSI,qword ptr [RAX + 0x850]
MOV qword ptr [RDX],RSI
MOV qword ptr [RDX + 0x30],R12
AND qword ptr [RDX + 0x88],0x0
OR ECX,0x4
AND qword ptr [RDX + 0x68],0x0
AND dword ptr [RDX + 0x80],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDX + 0x38],XMM0
MOV RSI,qword ptr [RAX + 0x7f8]
LEA RDI,[RSI + 0x1]
MOV qword ptr [RAX + 0x7f8],RDI
MOV qword ptr [RDX + 0x8],RSI
AND qword ptr [RDX + 0x10],0x0
MOVSXD RSI,R14D
LEA RDI,[0x180fd0]
MOV ESI,dword ptr [RDI + RSI*0x4]
MOV dword ptr [RDX + 0x90],ESI
MOV dword ptr [RDX + 0x58],0x5
ADD qword ptr [RAX + 0x7f0],0xb0
LAB_00129155:
MOV dword ptr [RBX],ECX
AND qword ptr [RBX + 0x8],0x0
MOV qword ptr [RBX + 0x10],R15
MOV qword ptr [RBX + 0x18],R12
MOV dword ptr [RBX + 0x4],R14D
JMP 0x00129044
LAB_0012916d:
LEA RAX,[0x4cce90]
INC qword ptr [RAX]
JMP 0x00129042
|
uint * pfs_get_thread_file_name_locker_v1
(uint *param_1,uint param_2,uint param_3,int8 param_4)
{
byte bVar1;
int8 *puVar2;
long lVar3;
long lVar4;
void *pvVar5;
uint uVar6;
if ((((flag_global_instrumentation == '\x01') && (lVar4 = find_file_class(param_2), lVar4 != 0))
&& (*(char *)(lVar4 + 4) == '\x01')) &&
((pvVar5 = pthread_getspecific(THR_PFS), pvVar5 != (void *)0x0 &&
((flag_thread_instrumentation != '\x01' || (*(char *)((long)pvVar5 + 0x7e0) == '\x01')))))) {
*(void **)(param_1 + 8) = pvVar5;
bVar1 = *(byte *)(lVar4 + 5);
uVar6 = bVar1 | 2;
if (flag_events_waits_current == '\x01') {
puVar2 = *(int8 **)((long)pvVar5 + 0x7f0);
if ((int8 *)((long)pvVar5 + 0xc98) <= puVar2) {
locker_lost = locker_lost + 1;
return (uint *)0x0;
}
*(int8 **)(param_1 + 0x10) = puVar2;
*(int4 *)(puVar2 + 3) = 4;
puVar2[4] = puVar2[-0x15];
*(int4 *)(puVar2 + 5) = *(int4 *)(puVar2 + -0x13);
*puVar2 = *(int8 *)((long)pvVar5 + 0x850);
puVar2[6] = lVar4;
puVar2[0x11] = 0;
uVar6 = bVar1 | 6;
puVar2[0xd] = 0;
*(int4 *)(puVar2 + 0x10) = 0;
puVar2[7] = 0;
puVar2[8] = 0;
lVar3 = *(long *)((long)pvVar5 + 0x7f8);
*(long *)((long)pvVar5 + 0x7f8) = lVar3 + 1;
puVar2[1] = lVar3;
puVar2[2] = 0;
*(int4 *)(puVar2 + 0x12) = *(int4 *)(file_operation_map + (long)(int)param_3 * 4);
*(int4 *)(puVar2 + 0xb) = 5;
*(long *)((long)pvVar5 + 0x7f0) = *(long *)((long)pvVar5 + 0x7f0) + 0xb0;
}
*param_1 = uVar6;
param_1[2] = 0;
param_1[3] = 0;
*(int8 *)(param_1 + 4) = param_4;
*(long *)(param_1 + 6) = lVar4;
param_1[1] = param_3;
return param_1;
}
return (uint *)0x0;
}
|
|
5,774 | my_strndup | eloqsql/mysys/my_malloc.c | char *my_strndup(PSI_memory_key key, const char *from, size_t length, myf my_flags)
{
char *ptr;
DBUG_ENTER("my_strndup");
if ((ptr= (char*) my_malloc(key, length+1, my_flags)))
{
memcpy(ptr, from, length);
ptr[length]= 0;
}
DBUG_RETURN(ptr);
} | O3 | c | my_strndup:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x1(%rdx), %rsi
movq %rcx, %rdx
callq 0x466c1
movq %rax, %r15
testq %rax, %rax
je 0x46a0f
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x26290
movb $0x0, (%r15,%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
| my_strndup:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
lea rsi, [rdx+1]
mov rdx, rcx
call my_malloc
mov r15, rax
test rax, rax
jz short loc_46A0F
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call _memcpy
mov byte ptr [r15+rbx], 0
loc_46A0F:
mov rax, r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_strndup(unsigned int a1, long long a2, long long a3, int a4)
{
long long v5; // rax
long long v6; // r15
v5 = my_malloc(a1, a3 + 1, a4);
v6 = v5;
if ( v5 )
{
memcpy(v5, a2, a3);
*(_BYTE *)(v6 + a3) = 0;
}
return v6;
}
| my_strndup:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
LEA RSI,[RDX + 0x1]
MOV RDX,RCX
CALL 0x001466c1
MOV R15,RAX
TEST RAX,RAX
JZ 0x00146a0f
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00126290
MOV byte ptr [R15 + RBX*0x1],0x0
LAB_00146a0f:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void * my_strndup(int8 param_1,void *param_2,size_t param_3,int8 param_4)
{
void *__dest;
__dest = (void *)my_malloc(param_1,param_3 + 1,param_4);
if (__dest != (void *)0x0) {
memcpy(__dest,param_2,param_3);
*(int1 *)((long)__dest + param_3) = 0;
}
return __dest;
}
|
|
5,775 | 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 0x2770e
movq -0x8(%rbp), %rdi
callq 0x24460
jmp 0x27719
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x88(%rax)
jne 0x2775f
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
je 0x27750
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x24030
jmp 0x2775d
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0x24100
jmp 0x27793
movq -0x8(%rbp), %rcx
movl 0x88(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x88(%rcx)
cmpl $0x0, %eax
jne 0x27791
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8c(%rax)
je 0x27791
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x24030
jmp 0x27793
movq -0x8(%rbp), %rdi
callq 0x24210
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_2770E:
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
jmp short $+2
loc_27719:
mov rax, [rbp+var_8]
cmp dword ptr [rax+88h], 0FFFFFFFFh
jnz short loc_2775F
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_27750
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_cond_signal
jmp short loc_2775D
loc_27750:
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
call _pthread_cond_broadcast
loc_2775D:
jmp short loc_27793
loc_2775F:
mov rcx, [rbp+var_8]
mov eax, [rcx+88h]
add eax, 0FFFFFFFFh
mov [rcx+88h], eax
cmp eax, 0
jnz short loc_27791
mov rax, [rbp+var_8]
cmp dword ptr [rax+8Ch], 0
jz short loc_27791
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_cond_signal
loc_27791:
jmp short $+2
loc_27793:
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 0x0012770e
LAB_0012770e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124460
JMP 0x00127719
LAB_00127719:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x88],-0x1
JNZ 0x0012775f
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 0x00127750
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x00124030
JMP 0x0012775d
LAB_00127750:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
CALL 0x00124100
LAB_0012775d:
JMP 0x00127793
LAB_0012775f:
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 0x00127791
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x8c],0x0
JZ 0x00127791
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x00124030
LAB_00127791:
JMP 0x00127793
LAB_00127793:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00124210
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;
}
|
|
5,776 | wait_for_readers | eloqsql/mysys/mf_keycache.c | static void wait_for_readers(SIMPLE_KEY_CACHE_CB *keycache,
BLOCK_LINK *block)
{
struct st_my_thread_var *thread= my_thread_var;
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
DBUG_ASSERT(!(block->status & (BLOCK_IN_FLUSH | BLOCK_CHANGED)));
DBUG_ASSERT(block->hash_link);
DBUG_ASSERT(block->hash_link->block == block);
/* Linked in file_blocks or changed_blocks hash. */
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
/* Not linked in LRU ring. */
DBUG_ASSERT(!block->next_used);
DBUG_ASSERT(!block->prev_used);
while (block->hash_link->requests)
{
KEYCACHE_DBUG_PRINT("wait_for_readers: wait",
("suspend thread %ld block %u",
(ulong) thread->id, BLOCK_NUMBER(block)));
/* There must be no other waiter. We have no queue here. */
DBUG_ASSERT(!block->condvar);
block->condvar= &thread->suspend;
keycache_pthread_cond_wait(&thread->suspend, &keycache->cache_lock);
block->condvar= NULL;
}
} | O0 | c | wait_for_readers:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0xfc990
movq %rax, -0x18(%rbp)
jmp 0xe845b
jmp 0xe845d
jmp 0xe845f
jmp 0xe8461
jmp 0xe8463
jmp 0xe8465
jmp 0xe8467
jmp 0xe8469
jmp 0xe846b
jmp 0xe846d
jmp 0xe846f
jmp 0xe8471
jmp 0xe8473
jmp 0xe8475
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
cmpl $0x0, 0x28(%rax)
je 0xe84cd
jmp 0xe8485
jmp 0xe8487
jmp 0xe8489
jmp 0xe848b
movq -0x18(%rbp), %rcx
addq $0x8, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
leaq 0x74f5d(%rip), %rdx # 0x15d412
movl $0x68f, %ecx # imm = 0x68F
callq 0xe7dd0
movq -0x10(%rbp), %rax
movq $0x0, 0x68(%rax)
jmp 0xe8475
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| wait_for_readers_0:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
call _my_thread_var
mov [rbp+var_18], rax
jmp short $+2
loc_E845B:
jmp short $+2
loc_E845D:
jmp short $+2
loc_E845F:
jmp short $+2
loc_E8461:
jmp short $+2
loc_E8463:
jmp short $+2
loc_E8465:
jmp short $+2
loc_E8467:
jmp short $+2
loc_E8469:
jmp short $+2
loc_E846B:
jmp short $+2
loc_E846D:
jmp short $+2
loc_E846F:
jmp short $+2
loc_E8471:
jmp short $+2
loc_E8473:
jmp short $+2
loc_E8475:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
cmp dword ptr [rax+28h], 0
jz short loc_E84CD
jmp short $+2
loc_E8485:
jmp short $+2
loc_E8487:
jmp short $+2
loc_E8489:
jmp short $+2
loc_E848B:
mov rcx, [rbp+var_18]
add rcx, 8
mov rax, [rbp+var_10]
mov [rax+68h], rcx
mov rdi, [rbp+var_18]
add rdi, 8
mov rsi, [rbp+var_8]
add rsi, 0C0h
lea rdx, aWorkspaceLlm4b_40; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 68Fh
call inline_mysql_cond_wait_5
mov rax, [rbp+var_10]
mov qword ptr [rax+68h], 0
jmp short loc_E8475
loc_E84CD:
add rsp, 20h
pop rbp
retn
| long long wait_for_readers_0(long long a1, long long a2)
{
long long result; // rax
long long v3; // [rsp+8h] [rbp-18h]
v3 = my_thread_var(a1, (const char *)a2);
while ( 1 )
{
result = *(_QWORD *)(a2 + 32);
if ( !*(_DWORD *)(result + 40) )
break;
*(_QWORD *)(a2 + 104) = v3 + 8;
inline_mysql_cond_wait_5(
v3 + 8,
a1 + 192,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0x68Fu);
*(_QWORD *)(a2 + 104) = 0LL;
}
return result;
}
| wait_for_readers:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
CALL 0x001fc990
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001e845b
LAB_001e845b:
JMP 0x001e845d
LAB_001e845d:
JMP 0x001e845f
LAB_001e845f:
JMP 0x001e8461
LAB_001e8461:
JMP 0x001e8463
LAB_001e8463:
JMP 0x001e8465
LAB_001e8465:
JMP 0x001e8467
LAB_001e8467:
JMP 0x001e8469
LAB_001e8469:
JMP 0x001e846b
LAB_001e846b:
JMP 0x001e846d
LAB_001e846d:
JMP 0x001e846f
LAB_001e846f:
JMP 0x001e8471
LAB_001e8471:
JMP 0x001e8473
LAB_001e8473:
JMP 0x001e8475
LAB_001e8475:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
CMP dword ptr [RAX + 0x28],0x0
JZ 0x001e84cd
JMP 0x001e8485
LAB_001e8485:
JMP 0x001e8487
LAB_001e8487:
JMP 0x001e8489
LAB_001e8489:
JMP 0x001e848b
LAB_001e848b:
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x8
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x68],RCX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
LEA RDX,[0x25d412]
MOV ECX,0x68f
CALL 0x001e7dd0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x68],0x0
JMP 0x001e8475
LAB_001e84cd:
ADD RSP,0x20
POP RBP
RET
|
void wait_for_readers(long param_1,long param_2)
{
long lVar1;
lVar1 = _my_thread_var();
while (*(int *)(*(long *)(param_2 + 0x20) + 0x28) != 0) {
*(long *)(param_2 + 0x68) = lVar1 + 8;
inline_mysql_cond_wait
(lVar1 + 8,param_1 + 0xc0,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x68f);
*(int8 *)(param_2 + 0x68) = 0;
}
return;
}
|
|
5,777 | construct_help_options(st_mem_root*, st_plugin_int*) | eloqsql/sql/sql_plugin.cc | static my_option *construct_help_options(MEM_ROOT *mem_root,
struct st_plugin_int *p)
{
st_mysql_sys_var **opt;
my_option *opts;
uint count= EXTRA_OPTIONS;
DBUG_ENTER("construct_help_options");
for (opt= p->plugin->system_vars; opt && *opt; opt++, count+= 2)
;
if (!(opts= (my_option*) alloc_root(mem_root, sizeof(my_option) * count)))
DBUG_RETURN(NULL);
bzero(opts, sizeof(my_option) * count);
/**
some plugin variables (those that don't have PLUGIN_VAR_NOSYSVAR flag)
have their names prefixed with the plugin name. Restore the names here
to get the correct (not double-prefixed) help text.
We won't need @@sysvars anymore and don't care about their proper names.
*/
restore_ptr_backup(p->nbackups, p->ptr_backup);
if (construct_options(mem_root, p, opts))
DBUG_RETURN(NULL);
DBUG_RETURN(opts);
} | O0 | cpp | construct_help_options(st_mem_root*, st_plugin_int*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x3, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x2d(%rbp)
je 0x914cd1
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
setne %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0x914cda
jmp 0x914cf3
jmp 0x914cdc
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movl -0x2c(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x2c(%rbp)
jmp 0x914cb7
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %eax
imulq $0x70, %rax, %rsi
callq 0x12bc050
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x914d19
jmp 0x914d0f
movq $0x0, -0x8(%rbp)
jmp 0x914d6b
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %eax
imulq $0x70, %rax, %rdx
xorl %esi, %esi
callq 0x7584b0
movq -0x18(%rbp), %rax
movl 0x28(%rax), %edi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x916a50
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x915e70
cmpl $0x0, %eax
je 0x914d61
jmp 0x914d57
movq $0x0, -0x8(%rbp)
jmp 0x914d6b
jmp 0x914d63
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZL22construct_help_optionsP11st_mem_rootP13st_plugin_int:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_2C], 3
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rax, [rax+50h]
mov [rbp+var_20], rax
loc_914CB7:
xor eax, eax
cmp [rbp+var_20], 0
mov [rbp+var_2D], al
jz short loc_914CD1
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0
setnz al
mov [rbp+var_2D], al
loc_914CD1:
mov al, [rbp+var_2D]
test al, 1
jnz short loc_914CDA
jmp short loc_914CF3
loc_914CDA:
jmp short $+2
loc_914CDC:
mov rax, [rbp+var_20]
add rax, 8
mov [rbp+var_20], rax
mov eax, [rbp+var_2C]
add eax, 2
mov [rbp+var_2C], eax
jmp short loc_914CB7
loc_914CF3:
mov rdi, [rbp+var_10]
mov eax, [rbp+var_2C]
imul rsi, rax, 70h ; 'p'
call alloc_root
mov [rbp+var_28], rax
cmp rax, 0
jnz short loc_914D19
jmp short $+2
loc_914D0F:
mov [rbp+var_8], 0
jmp short loc_914D6B
loc_914D19:
mov rdi, [rbp+var_28]
mov eax, [rbp+var_2C]
imul rdx, rax, 70h ; 'p'
xor esi, esi
call _memset
mov rax, [rbp+var_18]
mov edi, [rax+28h]; unsigned int
mov rax, [rbp+var_18]
mov rsi, [rax+20h]; st_ptr_backup *
call _ZL18restore_ptr_backupjP13st_ptr_backup; restore_ptr_backup(uint,st_ptr_backup *)
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call _ZL17construct_optionsP11st_mem_rootP13st_plugin_intP9my_option; construct_options(st_mem_root *,st_plugin_int *,my_option *)
cmp eax, 0
jz short loc_914D61
jmp short $+2
loc_914D57:
mov [rbp+var_8], 0
jmp short loc_914D6B
loc_914D61:
jmp short $+2
loc_914D63:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_914D6B:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long construct_help_options(long long a1, long long a2)
{
bool v3; // [rsp+3h] [rbp-2Dh]
unsigned int v4; // [rsp+4h] [rbp-2Ch]
long long v5; // [rsp+8h] [rbp-28h]
_QWORD *i; // [rsp+10h] [rbp-20h]
v4 = 3;
for ( i = *(_QWORD **)(*(_QWORD *)(a2 + 16) + 80LL); ; ++i )
{
v3 = 0;
if ( i )
v3 = *i != 0LL;
if ( !v3 )
break;
v4 += 2;
}
v5 = alloc_root(a1, 112LL * v4);
if ( !v5 )
return 0LL;
memset(v5, 0LL, 112LL * v4);
restore_ptr_backup(*(_DWORD *)(a2 + 40), *(st_ptr_backup **)(a2 + 32));
if ( (unsigned int)construct_options(a1, a2, v5) )
return 0LL;
else
return v5;
}
| init_sp_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00914caa
LAB_00914caa:
MOV RSI,qword ptr [RBP + -0x18]
MOV RDI,RSI
ADD RDI,0x20
ADD RSI,0x40
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x10
CALL 0x0098f430
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV CL,byte ptr [RCX + 0x20]
AND CL,0x1
MOV byte ptr [RAX + 0x190],CL
JMP 0x00914ce0
LAB_00914ce0:
ADD RSP,0x20
POP RBP
RET
|
/* sp_head::init_sp_name(sp_name const*) */
void __thiscall sp_head::init_sp_name(sp_head *this,sp_name *param_1)
{
Database_qualified_name::copy
((Database_qualified_name *)(this + 0x20),(st_mem_root *)(this + 0x40),
(st_mysql_const_lex_string *)param_1,(st_mysql_const_lex_string *)(param_1 + 0x10));
this[400] = (sp_head)((byte)param_1[0x20] & 1);
return;
}
|
|
5,778 | mysql_stmt_free_result_cont | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_stmt_free_result_cont(my_bool *ret, MYSQL_STMT *stmt, int ready_status)
{
MK_ASYNC_CONT_BODY(
stmt->mysql,
TRUE,
r_my_bool)
} | O3 | c | mysql_stmt_free_result_cont:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rsi), %rax
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %r15
cmpb $0x0, 0x15(%r15)
je 0x2f004
movb $0x1, 0x14(%r15)
movl %edx, 0x4(%r15)
leaq 0x38(%r15), %rdi
callq 0x2fdbb
movb $0x0, 0x14(%r15)
testl %eax, %eax
jle 0x2f067
movl (%r15), %r15d
jmp 0x2f0dd
movl $0x7de, 0x90(%rax) # imm = 0x7DE
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x1ebf2(%rip), %rax # 0x4dc10
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x1ebd7(%rip), %rax # 0x4dc20
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movb $0x1, (%rbx)
jmp 0x2f0dd
movb $0x0, 0x15(%r15)
js 0x2f074
movb 0x8(%r15), %al
jmp 0x2f0d8
movq 0x38(%r14), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x1eb7e(%rip), %rax # 0x4dc10
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x1eb63(%rip), %rax # 0x4dc20
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movb $0x1, %al
movb %al, (%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mysql_stmt_free_result_cont:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+38h]
mov rcx, [rax+480h]
mov r15, [rcx+28h]
cmp byte ptr [r15+15h], 0
jz short loc_2F004
mov byte ptr [r15+14h], 1
mov [r15+4], edx
lea rdi, [r15+38h]
call my_context_continue
mov byte ptr [r15+14h], 0
test eax, eax
jle short loc_2F067
mov r15d, [r15]
jmp loc_2F0DD
loc_2F004:
mov dword ptr [rax+90h], 7DEh
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov byte ptr [rbx], 1
jmp short loc_2F0DD
loc_2F067:
mov byte ptr [r15+15h], 0
js short loc_2F074
mov al, [r15+8]
jmp short loc_2F0D8
loc_2F074:
mov rax, [r14+38h]
mov dword ptr [rax+90h], 7D8h
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov al, 1
loc_2F0D8:
mov [rbx], al
xor r15d, r15d
loc_2F0DD:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mysql_stmt_free_result_cont(char *a1, long long a2, unsigned int a3)
{
long long v3; // rax
unsigned int *v4; // r15
int v5; // eax
unsigned int v6; // r15d
char v7; // al
v3 = *(_QWORD *)(a2 + 56);
v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL);
if ( *((_BYTE *)v4 + 21) )
{
*((_BYTE *)v4 + 20) = 1;
v4[1] = a3;
v5 = my_context_continue(v4 + 14);
*((_BYTE *)v4 + 20) = 0;
if ( v5 <= 0 )
{
*((_BYTE *)v4 + 21) = 0;
if ( v5 < 0 )
{
*(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
v7 = 1;
}
else
{
v7 = *((_BYTE *)v4 + 8);
}
*a1 = v7;
return 0;
}
else
{
return *v4;
}
}
else
{
*(_DWORD *)(v3 + 144) = 2014;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
v6 = 0;
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[14], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
*a1 = 1;
}
return v6;
}
| mysql_stmt_free_result_cont:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x38]
MOV RCX,qword ptr [RAX + 0x480]
MOV R15,qword ptr [RCX + 0x28]
CMP byte ptr [R15 + 0x15],0x0
JZ 0x0012f004
MOV byte ptr [R15 + 0x14],0x1
MOV dword ptr [R15 + 0x4],EDX
LEA RDI,[R15 + 0x38]
CALL 0x0012fdbb
MOV byte ptr [R15 + 0x14],0x0
TEST EAX,EAX
JLE 0x0012f067
MOV R15D,dword ptr [R15]
JMP 0x0012f0dd
LAB_0012f004:
MOV dword ptr [RAX + 0x90],0x7de
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14dc10]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14dc20]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV byte ptr [RBX],0x1
JMP 0x0012f0dd
LAB_0012f067:
MOV byte ptr [R15 + 0x15],0x0
JS 0x0012f074
MOV AL,byte ptr [R15 + 0x8]
JMP 0x0012f0d8
LAB_0012f074:
MOV RAX,qword ptr [R14 + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14dc10]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14dc20]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV AL,0x1
LAB_0012f0d8:
MOV byte ptr [RBX],AL
XOR R15D,R15D
LAB_0012f0dd:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 mysql_stmt_free_result_cont(int1 *param_1,long param_2,int4 param_3)
{
int4 *puVar1;
int1 uVar2;
int iVar3;
int4 uVar4;
puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
if (*(char *)((long)puVar1 + 0x15) == '\0') {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7de;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
uVar4 = 0;
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),
PTR_s_Commands_out_of_sync__you_can_t_r_0014dc90,0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
*param_1 = 1;
}
else {
*(int1 *)(puVar1 + 5) = 1;
puVar1[1] = param_3;
iVar3 = my_context_continue(puVar1 + 0xe);
*(int1 *)(puVar1 + 5) = 0;
if (iVar3 < 1) {
*(int1 *)((long)puVar1 + 0x15) = 0;
if (iVar3 < 0) {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0014dc60,
0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
uVar2 = 1;
}
else {
uVar2 = *(int1 *)(puVar1 + 2);
}
*param_1 = uVar2;
uVar4 = 0;
}
else {
uVar4 = *puVar1;
}
}
return uVar4;
}
|
|
5,779 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>) | hkr04[P]cpp-mcp/common/json.hpp | IteratorType erase(IteratorType pos)
{
// make sure iterator fits the current value
if (JSON_HEDLEY_UNLIKELY(this != pos.m_object))
{
JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this));
}
IteratorType result = end();
switch (m_data.m_type)
{
case value_t::boolean:
case value_t::number_float:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::string:
case value_t::binary:
{
if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin()))
{
JSON_THROW(invalid_iterator::create(205, "iterator out of range", this));
}
if (is_string())
{
AllocatorType<string_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1);
m_data.m_value.string = nullptr;
}
else if (is_binary())
{
AllocatorType<binary_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1);
m_data.m_value.binary = nullptr;
}
m_data.m_type = value_t::null;
assert_invariant();
break;
}
case value_t::object:
{
result.m_it.object_iterator = m_data.m_value.object->erase(pos.m_it.object_iterator);
break;
}
case value_t::array:
{
result.m_it.array_iterator = m_data.m_value.array->erase(pos.m_it.array_iterator);
break;
}
case value_t::null:
case value_t::discarded:
default:
JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this));
}
return result;
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
cmpq %rsi, (%rdx)
jne 0x4cc73
movq %rdx, %r15
movq %rdi, %rbx
movq %r14, %rsi
callq 0x4ca44
movzbl (%r14), %eax
leal -0x3(%rax), %ecx
cmpl $0x6, %ecx
jae 0x4cbf1
cmpq $0x0, 0x18(%r15)
jne 0x4ccd6
cmpl $0x8, %eax
je 0x4cc12
cmpl $0x3, %eax
jne 0x4cc48
leaq 0x8(%r14), %r12
movq 0x8(%r14), %rax
movq (%rax), %rdi
addq $0x10, %rax
movl $0x20, %r15d
cmpq %rax, %rdi
je 0x4cc34
movq (%rax), %rsi
incq %rsi
jmp 0x4cc2f
cmpl $0x1, %eax
je 0x4cc5c
cmpl $0x2, %eax
jne 0x4cd36
movq 0x8(%r14), %rdi
movq 0x10(%r15), %rsi
callq 0x4d480
movq %rax, 0x10(%rbx)
jmp 0x4cc4c
leaq 0x8(%r14), %r12
movq 0x8(%r14), %rax
movq (%rax), %rdi
movl $0x28, %r15d
testq %rdi, %rdi
je 0x4cc34
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0xa630
movq (%r12), %rdi
movq %r15, %rsi
callq 0xa630
movq $0x0, (%r12)
movb $0x0, (%r14)
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rdi
movq 0x8(%r15), %rsi
leaq 0x30(%rsi), %rdx
callq 0x4d186
movq %rax, 0x8(%rbx)
jmp 0x4cc4c
movl $0x20, %edi
callq 0xa300
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xf114(%rip), %rsi # 0x5bda4
leaq 0xf130(%rip), %rdx # 0x5bdc7
leaq 0x8(%rsp), %rdi
callq 0xfaac
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xca, %esi
movq %r14, %rcx
callq 0x4cf04
xorl %ebp, %ebp
leaq 0x2fd76(%rip), %rsi # 0x7ca38
leaq -0x3c093(%rip), %rdx # 0x10c36
movq %rbx, %rdi
callq 0xaa10
jmp 0x4cd94
movl $0x20, %edi
callq 0xa300
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xf0d5(%rip), %rsi # 0x5bdc8
leaq 0xf0e3(%rip), %rdx # 0x5bddd
leaq 0x8(%rsp), %rdi
callq 0xfaac
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xcd, %esi
movq %r14, %rcx
callq 0x4cf04
xorl %ebp, %ebp
leaq 0x2fd13(%rip), %rsi # 0x7ca38
leaq -0x3c0f6(%rip), %rdx # 0x10c36
movq %rbx, %rdi
callq 0xaa10
jmp 0x4cd94
movl $0x20, %edi
callq 0xa300
movq %rax, %rbx
movq %r14, %rdi
callq 0xf344
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xf084(%rip), %rsi # 0x5bdde
leaq 0x8(%rsp), %rdi
callq 0x4d0fd
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x133, %esi # imm = 0x133
movq %r14, %rcx
callq 0x11224
xorl %ebp, %ebp
leaq 0x2eccb(%rip), %rsi # 0x7ba50
leaq -0x3c156(%rip), %rdx # 0x10c36
movq %rbx, %rdi
callq 0xaa10
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x4cdba
jmp 0x4cdcf
jmp 0x4cdc9
jmp 0x4cdad
jmp 0x4cdc9
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4cdcf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa630
jmp 0x4cdcf
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x4cddc
movq %rbx, %rdi
callq 0xa480
movq %r14, %rdi
callq 0xaa60
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_:
push rbp; int
push r15; int
push r14; char
push r12; int
push rbx; __int64
sub rsp, 30h
mov r14, rsi
cmp [rdx], rsi
jnz loc_4CC73
mov r15, rdx
mov rbx, rdi
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv; 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>::end(void)
movzx eax, byte ptr [r14]
lea ecx, [rax-3]
cmp ecx, 6
jnb short loc_4CBF1
cmp qword ptr [r15+18h], 0
jnz loc_4CCD6
cmp eax, 8
jz short loc_4CC12
cmp eax, 3
jnz short loc_4CC48
lea r12, [r14+8]
mov rax, [r14+8]
mov rdi, [rax]
add rax, 10h
mov r15d, 20h ; ' '
cmp rdi, rax
jz short loc_4CC34
mov rsi, [rax]
inc rsi
jmp short loc_4CC2F
loc_4CBF1:
cmp eax, 1
jz short loc_4CC5C
cmp eax, 2
jnz loc_4CD36
mov rdi, [r14+8]
mov rsi, [r15+10h]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPSD_SF_EE; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::_M_erase(__gnu_cxx::__normal_iterator<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::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>)
mov [rbx+10h], rax
jmp short loc_4CC4C
loc_4CC12:
lea r12, [r14+8]
mov rax, [r14+8]
mov rdi, [rax]; void *
mov r15d, 28h ; '('
test rdi, rdi
jz short loc_4CC34
mov rsi, [rax+10h]
sub rsi, rdi; unsigned __int64
loc_4CC2F:
call __ZdlPvm; operator delete(void *,ulong)
loc_4CC34:
mov rdi, [r12]; void *
mov rsi, r15; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov qword ptr [r12], 0
loc_4CC48:
mov byte ptr [r14], 0
loc_4CC4C:
mov rax, rbx
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_4CC5C:
mov rdi, [r14+8]
mov rsi, [r15+8]
lea rdx, [rsi+30h]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEESP_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>)
mov [rbx+8], rax
jmp short loc_4CC4C
loc_4CC73:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+58h+var_40]
mov [r15-10h], r15
lea rsi, aIteratorDoesNo; "iterator does not fit current value"
lea rdx, aIteratorDoesNo+23h; ""
lea rdi, [rsp+58h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov bpl, 1
lea rdx, [rsp+58h+var_50]
mov rdi, rbx; this
mov esi, 0CAh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp loc_4CD94
loc_4CCD6:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+58h+var_40]
mov [r15-10h], r15
lea rsi, aIteratorOutOfR; "iterator out of range"
lea rdx, aIteratorOutOfR+15h; ""
lea rdi, [rsp+58h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov bpl, 1
lea rdx, [rsp+58h+var_50]
mov rdi, rbx; this
mov esi, 0CDh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_4CD94
loc_4CD36:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+58h+var_30]
mov [rdx], rax
lea rsi, aCannotUseErase; "cannot use erase() with "
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA25_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>(char const(&)[25],char const* &&)
mov bpl, 1
lea rdx, [rsp+58h+var_50]
mov rdi, rbx; this
mov esi, 133h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_4CD94:
mov r14, rax
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]
cmp rdi, rax
jnz short loc_4CDBA
jmp short loc_4CDCF
jmp short loc_4CDC9
jmp short loc_4CDAD
jmp short loc_4CDC9
loc_4CDAD:
mov r14, rax
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r15
jz short loc_4CDCF
loc_4CDBA:
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_4CDCF
loc_4CDC9:
mov r14, rax
mov bpl, 1
loc_4CDCF:
test bpl, bpl
jz short loc_4CDDC
mov rdi, rbx; void *
call ___cxa_free_exception
loc_4CDDC:
mov rdi, r14
call __Unwind_Resume
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
CMP qword ptr [RDX],RSI
JNZ 0x0014cc73
MOV R15,RDX
MOV RBX,RDI
MOV RSI,R14
CALL 0x0014ca44
MOVZX EAX,byte ptr [R14]
LEA ECX,[RAX + -0x3]
CMP ECX,0x6
JNC 0x0014cbf1
CMP qword ptr [R15 + 0x18],0x0
JNZ 0x0014ccd6
CMP EAX,0x8
JZ 0x0014cc12
CMP EAX,0x3
JNZ 0x0014cc48
LEA R12,[R14 + 0x8]
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [RAX]
ADD RAX,0x10
MOV R15D,0x20
CMP RDI,RAX
JZ 0x0014cc34
MOV RSI,qword ptr [RAX]
INC RSI
JMP 0x0014cc2f
LAB_0014cbf1:
CMP EAX,0x1
JZ 0x0014cc5c
CMP EAX,0x2
JNZ 0x0014cd36
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [R15 + 0x10]
CALL 0x0014d480
MOV qword ptr [RBX + 0x10],RAX
JMP 0x0014cc4c
LAB_0014cc12:
LEA R12,[R14 + 0x8]
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [RAX]
MOV R15D,0x28
TEST RDI,RDI
JZ 0x0014cc34
MOV RSI,qword ptr [RAX + 0x10]
SUB RSI,RDI
LAB_0014cc2f:
CALL 0x0010a630
LAB_0014cc34:
MOV RDI,qword ptr [R12]
MOV RSI,R15
CALL 0x0010a630
MOV qword ptr [R12],0x0
LAB_0014cc48:
MOV byte ptr [R14],0x0
LAB_0014cc4c:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0014cc5c:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [R15 + 0x8]
LEA RDX,[RSI + 0x30]
CALL 0x0014d186
MOV qword ptr [RBX + 0x8],RAX
JMP 0x0014cc4c
LAB_0014cc73:
MOV EDI,0x20
CALL 0x0010a300
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_0014cc89:
LEA RSI,[0x15bda4]
LEA RDX,[0x15bdc7]
LEA RDI,[RSP + 0x8]
CALL 0x0010faac
MOV BPL,0x1
LAB_0014cca4:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xca
MOV RCX,R14
CALL 0x0014cf04
XOR EBP,EBP
LEA RSI,[0x17ca38]
LEA RDX,[0x110c36]
MOV RDI,RBX
CALL 0x0010aa10
LAB_0014ccd6:
MOV EDI,0x20
CALL 0x0010a300
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_0014ccec:
LEA RSI,[0x15bdc8]
LEA RDX,[0x15bddd]
LEA RDI,[RSP + 0x8]
CALL 0x0010faac
MOV BPL,0x1
LAB_0014cd07:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xcd
MOV RCX,R14
CALL 0x0014cf04
XOR EBP,EBP
LEA RSI,[0x17ca38]
LEA RDX,[0x110c36]
MOV RDI,RBX
CALL 0x0010aa10
LAB_0014cd36:
MOV EDI,0x20
CALL 0x0010a300
MOV RBX,RAX
MOV RDI,R14
CALL 0x0010f344
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_0014cd53:
LEA RSI,[0x15bdde]
LEA RDI,[RSP + 0x8]
CALL 0x0014d0fd
MOV BPL,0x1
LAB_0014cd67:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x133
MOV RCX,R14
CALL 0x00111224
XOR EBP,EBP
LEA RSI,[0x17ba50]
LEA RDX,[0x110c36]
MOV RDI,RBX
CALL 0x0010aa10
|
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
(long param_1,
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_2,long *param_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>
bVar1;
long *plVar2;
int8 uVar3;
ulong uVar4;
long *plVar5;
ulong uVar6;
int1 *local_50 [2];
int1 local_40 [16];
char *local_30;
if ((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)*param_3 != param_2) {
uVar3 = __cxa_allocate_exception(0x20);
local_50[0] = local_40;
/* try { // try from 0014cc89 to 0014cca0 has its CatchHandler @ 0014cdc9 */
std::__cxx11::string::_M_construct<char_const*>
(local_50,"iterator does not fit current value","");
/* try { // try from 0014cca4 to 0014ccd0 has its CatchHandler @ 0014cdad */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0xca,local_50,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::end();
bVar1 = *param_2;
if (5 < (byte)bVar1 - 3) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar3 = nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::erase(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(param_2 + 8),param_3[1],param_3[1] + 0x30);
*(int8 *)(param_1 + 8) = uVar3;
return param_1;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar3 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::_M_erase(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(param_2 + 8),param_3[2]);
*(int8 *)(param_1 + 0x10) = uVar3;
return param_1;
}
uVar3 = __cxa_allocate_exception(0x20);
local_30 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_2);
/* try { // try from 0014cd53 to 0014cd63 has its CatchHandler @ 0014cda7 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[25],char_const*>
((detail *)local_50,"cannot use erase() with ",&local_30);
/* try { // try from 0014cd67 to 0014cd93 has its CatchHandler @ 0014cd94 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0x133,local_50,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if (param_3[3] != 0) {
uVar3 = __cxa_allocate_exception(0x20);
local_50[0] = local_40;
/* try { // try from 0014ccec to 0014cd03 has its CatchHandler @ 0014cdab */
std::__cxx11::string::_M_construct<char_const*>(local_50,"iterator out of range","");
/* try { // try from 0014cd07 to 0014cd33 has its CatchHandler @ 0014cda9 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0xcd,local_50,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if (bVar1 == (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>
)0x8) {
plVar5 = (long *)**(long **)(param_2 + 8);
uVar6 = 0x28;
if (plVar5 != (long *)0x0) {
uVar4 = (*(long **)(param_2 + 8))[2] - (long)plVar5;
LAB_0014cc2f:
operator_delete(plVar5,uVar4);
}
}
else {
if (bVar1 != (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>
)0x3) goto LAB_0014cc48;
plVar5 = (long *)**(long **)(param_2 + 8);
plVar2 = *(long **)(param_2 + 8) + 2;
uVar6 = 0x20;
if (plVar5 != plVar2) {
uVar4 = *plVar2 + 1;
goto LAB_0014cc2f;
}
}
operator_delete(*(void **)(param_2 + 8),uVar6);
*(int8 *)(param_2 + 8) = 0;
LAB_0014cc48:
*param_2 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0;
return param_1;
}
|
||
5,780 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>) | hkr04[P]cpp-mcp/common/json.hpp | IteratorType erase(IteratorType pos)
{
// make sure iterator fits the current value
if (JSON_HEDLEY_UNLIKELY(this != pos.m_object))
{
JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this));
}
IteratorType result = end();
switch (m_data.m_type)
{
case value_t::boolean:
case value_t::number_float:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::string:
case value_t::binary:
{
if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin()))
{
JSON_THROW(invalid_iterator::create(205, "iterator out of range", this));
}
if (is_string())
{
AllocatorType<string_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1);
m_data.m_value.string = nullptr;
}
else if (is_binary())
{
AllocatorType<binary_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1);
m_data.m_value.binary = nullptr;
}
m_data.m_type = value_t::null;
assert_invariant();
break;
}
case value_t::object:
{
result.m_it.object_iterator = m_data.m_value.object->erase(pos.m_it.object_iterator);
break;
}
case value_t::array:
{
result.m_it.array_iterator = m_data.m_value.array->erase(pos.m_it.array_iterator);
break;
}
case value_t::null:
case value_t::discarded:
default:
JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this));
}
return result;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
cmpq %rsi, (%rdx)
jne 0x3f7ae
movq %rdx, %r15
movq %rdi, %rbx
movq %r14, %rsi
callq 0x3f61c
movzbl (%r14), %eax
leal -0x3(%rax), %ecx
cmpl $0x6, %ecx
jae 0x3f74c
cmpq $0x0, 0x18(%r15)
jne 0x3f802
cmpl $0x8, %eax
je 0x3f76d
cmpl $0x3, %eax
jne 0x3f789
leaq 0x8(%r14), %r15
movq 0x8(%r14), %rdi
callq 0xac20
pushq $0x20
jmp 0x3f77c
cmpl $0x1, %eax
je 0x3f79b
cmpl $0x2, %eax
jne 0x3f853
movq 0x8(%r14), %rdi
movq 0x10(%r15), %rsi
callq 0x3fb30
movq %rax, 0x10(%rbx)
jmp 0x3f78d
leaq 0x8(%r14), %r15
movq 0x8(%r14), %rdi
callq 0xe2da
pushq $0x28
popq %rsi
movq (%r15), %rdi
callq 0xa6a0
andq $0x0, (%r15)
movb $0x0, (%r14)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rdi
movq 0x8(%r15), %rsi
callq 0x3fb26
movq %rax, 0x8(%rbx)
jmp 0x3f78d
pushq $0x20
popq %rdi
callq 0xa340
movq %rax, %rbx
leaq 0xe525(%rip), %rsi # 0x4dce5
leaq 0x8(%rsp), %rdi
movq %rsp, %rdx
callq 0xcab2
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xca, %esi
movq %r14, %rcx
callq 0x3f9d8
xorl %ebp, %ebp
leaq 0x3824a(%rip), %rsi # 0x77a38
leaq -0x308db(%rip), %rdx # 0xef1a
movq %rbx, %rdi
callq 0xaa70
jmp 0x3f8ad
pushq $0x20
popq %rdi
callq 0xa340
movq %rax, %rbx
leaq 0xe4f5(%rip), %rsi # 0x4dd09
leaq 0x8(%rsp), %rdi
movq %rsp, %rdx
callq 0xcab2
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xcd, %esi
movq %r14, %rcx
callq 0x3f9d8
xorl %ebp, %ebp
leaq 0x381f6(%rip), %rsi # 0x77a38
leaq -0x3092f(%rip), %rdx # 0xef1a
movq %rbx, %rdi
callq 0xaa70
jmp 0x3f8ad
pushq $0x20
popq %rdi
callq 0xa340
movq %rax, %rbx
movq %r14, %rdi
callq 0xd25a
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xe4ac(%rip), %rsi # 0x4dd1f
leaq 0x8(%rsp), %rdi
callq 0x3fb35
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x133, %esi # imm = 0x133
movq %r14, %rcx
callq 0xf4a2
xorl %ebp, %ebp
leaq 0x37202(%rip), %rsi # 0x76aa0
leaq -0x3098b(%rip), %rdx # 0xef1a
movq %rbx, %rdi
callq 0xaa70
jmp 0x3f8b5
jmp 0x3f8c9
jmp 0x3f8b5
jmp 0x3f8c9
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0xac20
testb %bpl, %bpl
jne 0x3f8cc
jmp 0x3f8d4
movq %rax, %r14
movq %rbx, %rdi
callq 0xa4e0
movq %r14, %rdi
callq 0xaac0
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 28h
mov r14, rsi
cmp [rdx], rsi
jnz loc_3F7AE
mov r15, rdx
mov rbx, rdi
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv; 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>::end(void)
movzx eax, byte ptr [r14]
lea ecx, [rax-3]
cmp ecx, 6
jnb short loc_3F74C
cmp qword ptr [r15+18h], 0
jnz loc_3F802
cmp eax, 8
jz short loc_3F76D
cmp eax, 3
jnz short loc_3F789
lea r15, [r14+8]
mov rdi, [r14+8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
push 20h ; ' '
jmp short loc_3F77C
loc_3F74C:
cmp eax, 1
jz short loc_3F79B
cmp eax, 2
jnz loc_3F853
mov rdi, [r14+8]
mov rsi, [r15+10h]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKSD_SF_EE; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::erase(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>)
mov [rbx+10h], rax
jmp short loc_3F78D
loc_3F76D:
lea r15, [r14+8]
mov rdi, [r14+8]
call _ZNSt12_Vector_baseIhSaIhEED2Ev; std::_Vector_base<uchar>::~_Vector_base()
push 28h ; '('
loc_3F77C:
pop rsi; unsigned __int64
mov rdi, [r15]; void *
call __ZdlPvm; operator delete(void *,ulong)
and qword ptr [r15], 0
loc_3F789:
mov byte ptr [r14], 0
loc_3F78D:
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_3F79B:
mov rdi, [r14+8]
mov rsi, [r15+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEE; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>)
mov [rbx+8], rax
jmp short loc_3F78D
loc_3F7AE:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aIteratorDoesNo; "iterator does not fit current value"
lea rdi, [rsp+48h+var_40]
mov rdx, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov bpl, 1
lea rdx, [rsp+48h+var_40]
mov rdi, rbx; this
mov esi, 0CAh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp loc_3F8AD
loc_3F802:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aIteratorOutOfR; "iterator out of range"
lea rdi, [rsp+48h+var_40]
mov rdx, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov bpl, 1
lea rdx, [rsp+48h+var_40]
mov rdi, rbx; this
mov esi, 0CDh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_3F8AD
loc_3F853:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseErase; "cannot use erase() with "
lea rdi, [rsp+48h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA25_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>(char const(&)[25],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_40]
mov rdi, rbx; this
mov esi, 133h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_3F8AD:
jmp short loc_3F8B5
jmp short loc_3F8C9
jmp short loc_3F8B5
jmp short loc_3F8C9
loc_3F8B5:
mov r14, rax
lea rdi, [rsp+48h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_3F8CC
jmp short loc_3F8D4
loc_3F8C9:
mov r14, rax
loc_3F8CC:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_3F8D4:
mov rdi, r14
call __Unwind_Resume
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
CMP qword ptr [RDX],RSI
JNZ 0x0013f7ae
MOV R15,RDX
MOV RBX,RDI
MOV RSI,R14
CALL 0x0013f61c
MOVZX EAX,byte ptr [R14]
LEA ECX,[RAX + -0x3]
CMP ECX,0x6
JNC 0x0013f74c
CMP qword ptr [R15 + 0x18],0x0
JNZ 0x0013f802
CMP EAX,0x8
JZ 0x0013f76d
CMP EAX,0x3
JNZ 0x0013f789
LEA R15,[R14 + 0x8]
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0010ac20
PUSH 0x20
JMP 0x0013f77c
LAB_0013f74c:
CMP EAX,0x1
JZ 0x0013f79b
CMP EAX,0x2
JNZ 0x0013f853
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [R15 + 0x10]
CALL 0x0013fb30
MOV qword ptr [RBX + 0x10],RAX
JMP 0x0013f78d
LAB_0013f76d:
LEA R15,[R14 + 0x8]
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0010e2da
PUSH 0x28
LAB_0013f77c:
POP RSI
MOV RDI,qword ptr [R15]
CALL 0x0010a6a0
AND qword ptr [R15],0x0
LAB_0013f789:
MOV byte ptr [R14],0x0
LAB_0013f78d:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0013f79b:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [R15 + 0x8]
CALL 0x0013fb26
MOV qword ptr [RBX + 0x8],RAX
JMP 0x0013f78d
LAB_0013f7ae:
PUSH 0x20
POP RDI
CALL 0x0010a340
MOV RBX,RAX
LAB_0013f7b9:
LEA RSI,[0x14dce5]
LEA RDI,[RSP + 0x8]
MOV RDX,RSP
CALL 0x0010cab2
MOV BPL,0x1
LAB_0013f7d0:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xca
MOV RCX,R14
CALL 0x0013f9d8
XOR EBP,EBP
LEA RSI,[0x177a38]
LEA RDX,[0x10ef1a]
MOV RDI,RBX
CALL 0x0010aa70
LAB_0013f802:
PUSH 0x20
POP RDI
CALL 0x0010a340
MOV RBX,RAX
LAB_0013f80d:
LEA RSI,[0x14dd09]
LEA RDI,[RSP + 0x8]
MOV RDX,RSP
CALL 0x0010cab2
MOV BPL,0x1
LAB_0013f824:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xcd
MOV RCX,R14
CALL 0x0013f9d8
XOR EBP,EBP
LEA RSI,[0x177a38]
LEA RDX,[0x10ef1a]
MOV RDI,RBX
CALL 0x0010aa70
LAB_0013f853:
PUSH 0x20
POP RDI
CALL 0x0010a340
MOV RBX,RAX
MOV RDI,R14
CALL 0x0010d25a
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_0013f86c:
LEA RSI,[0x14dd1f]
LEA RDI,[RSP + 0x8]
CALL 0x0013fb35
MOV BPL,0x1
LAB_0013f880:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x133
MOV RCX,R14
CALL 0x0010f4a2
XOR EBP,EBP
LEA RSI,[0x176aa0]
LEA RDX,[0x10ef1a]
MOV RDI,RBX
CALL 0x0010aa70
|
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
(long param_1,
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_2,long *param_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>
bVar1;
int8 uVar2;
ulong uStack_50;
char *local_48;
string local_40 [32];
if ((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)*param_3 != param_2) {
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 0013f7b9 to 0013f7cc has its CatchHandler @ 0013f8c9 */
std::__cxx11::string::string<std::allocator<char>>
(local_40,"iterator does not fit current value",(allocator *)&local_48);
/* try { // try from 0013f7d0 to 0013f7fc has its CatchHandler @ 0013f8b5 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0xca,local_40,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::end();
bVar1 = *param_2;
if (5 < (byte)bVar1 - 3) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar2 = nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::erase(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(param_2 + 8),param_3[1]);
*(int8 *)(param_1 + 8) = uVar2;
return param_1;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar2 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::erase(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(param_2 + 8),param_3[2]);
*(int8 *)(param_1 + 0x10) = uVar2;
return param_1;
}
uVar2 = __cxa_allocate_exception(0x20);
local_48 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_2);
/* try { // try from 0013f86c to 0013f87c has its CatchHandler @ 0013f8af */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[25],char_const*>
((detail *)local_40,"cannot use erase() with ",&local_48);
/* try { // try from 0013f880 to 0013f8ac has its CatchHandler @ 0013f8ad */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x133,local_40,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if (param_3[3] != 0) {
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 0013f80d to 0013f820 has its CatchHandler @ 0013f8b3 */
std::__cxx11::string::string<std::allocator<char>>
(local_40,"iterator out of range",(allocator *)&local_48);
/* try { // try from 0013f824 to 0013f850 has its CatchHandler @ 0013f8b1 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0xcd,local_40,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if (bVar1 == (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>
)0x8) {
std::_Vector_base<unsigned_char,std::allocator<unsigned_char>>::~_Vector_base
(*(_Vector_base<unsigned_char,std::allocator<unsigned_char>> **)(param_2 + 8));
uStack_50 = 0x28;
}
else {
if (bVar1 != (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>
)0x3) goto LAB_0013f789;
std::__cxx11::string::~string(*(string **)(param_2 + 8));
uStack_50 = 0x20;
}
operator_delete(*(void **)(param_2 + 8),uStack_50);
*(int8 *)(param_2 + 8) = 0;
LAB_0013f789:
*param_2 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0;
return param_1;
}
|
||
5,781 | ma_compact_block_page | eloqsql/storage/maria/ma_blockrec.c | void _ma_compact_block_page(MARIA_SHARE *share,
uchar *buff, uint rownr,
my_bool extend_block, TrID min_read_from,
uint min_row_length)
{
uint max_entry= (uint) buff[DIR_COUNT_OFFSET];
uint page_pos, next_free_pos, start_of_found_block, diff, end_of_found_block;
uint freed_size= 0;
uint block_size= share->block_size;
uchar *dir, *end;
DBUG_ENTER("_ma_compact_block_page");
DBUG_PRINT("enter", ("rownr: %u min_read_from: %lu", rownr,
(ulong) min_read_from));
DBUG_ASSERT(max_entry > 0 &&
max_entry < (block_size - PAGE_HEADER_SIZE(share) -
PAGE_SUFFIX_SIZE) / DIR_ENTRY_SIZE);
/* Move all entries before and including rownr up to start of page */
dir= dir_entry_pos(buff, block_size, rownr);
end= dir_entry_pos(buff, block_size, 0);
page_pos= next_free_pos= start_of_found_block= PAGE_HEADER_SIZE(share);
diff= 0;
for (; dir <= end ; end-= DIR_ENTRY_SIZE)
{
uint offset= uint2korr(end);
if (offset)
{
uint row_length= uint2korr(end + 2);
DBUG_ASSERT(offset >= page_pos);
DBUG_ASSERT(buff + offset + row_length <= dir);
DBUG_ASSERT(row_length >= min_row_length || row_length == 0);
/* Row length can be zero if row is to be deleted */
if (min_read_from && row_length && (buff[offset] & ROW_FLAG_TRANSID))
{
TrID transid= transid_korr(buff+offset+1);
if (transid < min_read_from)
{
/* Remove transid from row by moving the start point of the row up */
buff[offset + TRANSID_SIZE]= buff[offset] & ~ROW_FLAG_TRANSID;
offset+= TRANSID_SIZE;
freed_size+= TRANSID_SIZE;
row_length-= TRANSID_SIZE;
int2store(end+2, row_length);
}
}
if (offset != next_free_pos)
{
uint length= (next_free_pos - start_of_found_block);
/*
There was empty space before this and prev block
Check if we have to move previous block up to page start
*/
if (page_pos != start_of_found_block)
{
/* move up previous block */
memmove(buff + page_pos, buff + start_of_found_block, length);
}
page_pos+= length;
/* next continuous block starts here */
start_of_found_block= offset;
diff= offset - page_pos;
}
int2store(end, offset - diff); /* correct current pos */
next_free_pos= offset + row_length;
if (unlikely(row_length < min_row_length) && row_length)
{
/*
This can only happen in the case we compacted transid and
the row become 'too short'
Move the current row down to it's right place and extend it
with 0.
*/
uint row_diff= min_row_length - row_length;
uint length= (next_free_pos - start_of_found_block);
DBUG_ASSERT(page_pos != start_of_found_block);
bmove(buff + page_pos, buff + start_of_found_block, length);
bzero(buff+ page_pos + length, row_diff);
page_pos+= min_row_length;
int2store(end+2, min_row_length);
freed_size-= row_diff;
next_free_pos= start_of_found_block= page_pos;
diff= 0;
}
}
}
if (page_pos != start_of_found_block)
{
uint length= (next_free_pos - start_of_found_block);
memmove(buff + page_pos, buff + start_of_found_block, length);
}
start_of_found_block= uint2korr(dir);
if (rownr != max_entry - 1)
{
/* Move all entries after rownr to end of page */
uint rownr_length;
DBUG_ASSERT(extend_block); /* Should always be true */
next_free_pos= end_of_found_block= page_pos=
block_size - DIR_ENTRY_SIZE * max_entry - PAGE_SUFFIX_SIZE;
diff= 0;
/* End points to entry before 'rownr' */
for (dir= buff + end_of_found_block ; dir <= end ; dir+= DIR_ENTRY_SIZE)
{
uint offset= uint2korr(dir);
uint row_length;
uint row_end;
if (!offset)
continue;
row_length= uint2korr(dir + 2);
row_end= offset + row_length;
DBUG_ASSERT(offset >= start_of_found_block &&
row_end <= next_free_pos && row_length >= min_row_length);
if (min_read_from && (buff[offset] & ROW_FLAG_TRANSID))
{
TrID transid= transid_korr(buff + offset+1);
if (transid < min_read_from)
{
/* Remove transid from row */
buff[offset + TRANSID_SIZE]= buff[offset] & ~ROW_FLAG_TRANSID;
offset+= TRANSID_SIZE;
row_length-= TRANSID_SIZE;
int2store(dir+2, row_length);
}
if (unlikely(row_length < min_row_length))
{
/*
This can only happen in the case we compacted transid and
the row become 'too short'
*/
uint row_diff= min_row_length - row_length;
if (next_free_pos < row_end + row_diff)
{
/*
Not enough space for extending next block with enough
end 0's. Move current data down to get place for them
*/
uint move_down= row_diff - (next_free_pos - row_end);
bmove(buff + offset - move_down, buff + offset, row_length);
offset-= move_down;
}
/*
Extend the next block with 0, which will be part of current
row when the blocks are joined together later
*/
bzero(buff + next_free_pos - row_diff, row_diff);
next_free_pos-= row_diff;
int2store(dir+2, min_row_length);
}
row_end= offset + row_length;
}
if (row_end != next_free_pos)
{
uint length= (end_of_found_block - next_free_pos);
if (page_pos != end_of_found_block)
{
/* move next block down */
memmove(buff + page_pos - length, buff + next_free_pos, length);
}
page_pos-= length;
/* next continuous block starts here */
end_of_found_block= row_end;
diff= page_pos - row_end;
}
int2store(dir, offset + diff); /* correct current pos */
next_free_pos= offset;
}
if (page_pos != end_of_found_block)
{
uint length= (end_of_found_block - next_free_pos);
memmove(buff + page_pos - length, buff + next_free_pos, length);
next_free_pos= page_pos- length;
}
/* Extend rownr block to cover hole */
rownr_length= next_free_pos - start_of_found_block;
int2store(dir+2, rownr_length);
DBUG_ASSERT(rownr_length >= min_row_length);
}
else
{
if (extend_block)
{
/* Extend last block to cover whole page */
uint length= ((uint) (dir - buff) - start_of_found_block);
int2store(dir+2, length);
DBUG_ASSERT(length >= min_row_length);
}
else
{
/* Add length gained from freed transaction id's to this page */
uint length= uint2korr(buff+ EMPTY_SPACE_OFFSET) + freed_size;
int2store(buff + EMPTY_SPACE_OFFSET, length);
}
buff[PAGE_TYPE_OFFSET]&= ~(uchar) PAGE_CAN_BE_COMPACTED;
}
check_directory(share, buff, block_size, min_row_length,
extend_block ? 0 : (uint) -1);
DBUG_EXECUTE("directory", _ma_print_directory(share,
DBUG_FILE, buff, block_size););
DBUG_VOID_RETURN;
} | O3 | c | ma_compact_block_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, -0x60(%rbp)
movq %rsi, %r10
movzbl 0x8(%rsi), %eax
movq %rax, -0x58(%rbp)
movl 0x7bc(%rdi), %r11d
leaq (%rsi,%r11), %rcx
movq %rdx, -0x68(%rbp)
leal (,%rdx,4), %eax
subq %rax, %rcx
movq %rcx, -0x70(%rbp)
leaq -0x8(%rcx), %rax
movl 0xc18(%rdi), %esi
movq %rax, %rdi
addl $0xc, %esi
leaq (%r10,%r11), %r14
addq $-0x8, %r14
xorl %r15d, %r15d
movl %esi, %r13d
movl %esi, %eax
movl $0x0, -0x2c(%rbp)
movq %r11, -0x48(%rbp)
movq %r10, -0x40(%rbp)
movl %r9d, -0x30(%rbp)
movq %r8, -0x50(%rbp)
movq %rdi, -0x38(%rbp)
movzwl (%r14), %r12d
testl %r12d, %r12d
je 0x48c7f
movzwl 0x2(%r14), %ecx
movzwl %cx, %ebx
testq %r8, %r8
je 0x48c27
testw %cx, %cx
je 0x48c27
movl %r12d, %edx
movb (%r10,%rdx), %cl
testb $0x1, %cl
je 0x48c27
movl %esi, %r11d
movl 0x1(%r10,%rdx), %esi
movzwl 0x5(%r10,%rdx), %edx
shlq $0x20, %rdx
orq %rsi, %rdx
cmpq %r8, %rdx
jae 0x48c24
andb $-0x2, %cl
movb %cl, 0x6(%r10,%r12)
addq $0x6, %r12
addl $0x6, -0x2c(%rbp)
addl $-0x6, %ebx
movw %bx, 0x2(%r14)
movl %r11d, %esi
cmpl %r13d, %r12d
je 0x48c67
subl %eax, %r13d
cmpl %eax, %esi
je 0x48c5b
movl %esi, %edi
addq %r10, %rdi
movl %esi, %r15d
movl %eax, %esi
addq %r10, %rsi
movl %r13d, %edx
callq 0x2a130
movl %r15d, %esi
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %r8
movl -0x30(%rbp), %r9d
movq -0x40(%rbp), %r10
addl %r13d, %esi
movl %r12d, %r15d
subl %esi, %r15d
movl %r12d, %eax
movl %r12d, %ecx
subl %r15d, %ecx
movw %cx, (%r14)
addl %ebx, %r12d
movl %r9d, %r13d
subl %ebx, %r13d
ja 0x48c8e
movl %r12d, %r13d
addq $-0x4, %r14
cmpq %r14, %rdi
jbe 0x48bc7
jmp 0x48ce5
testl %ebx, %ebx
je 0x48c7c
subl %eax, %r12d
movl %esi, %r15d
addq %r10, %r15
movl %esi, %ebx
movl %eax, %esi
addq %r10, %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x2a130
addq %r12, %r15
movq %r15, %rdi
xorl %r15d, %r15d
xorl %esi, %esi
movq %r13, %rdx
callq 0x2a290
movl %ebx, %esi
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %r8
movl -0x30(%rbp), %r9d
movq -0x40(%rbp), %r10
addl %r9d, %esi
movw %r9w, 0x2(%r14)
subl %r13d, -0x2c(%rbp)
movl %esi, %eax
movl %esi, %r13d
jmp 0x48c7f
cmpl %eax, %esi
je 0x48d0e
subl %eax, %r13d
movl %esi, %edi
addq %r10, %rdi
movl %eax, %esi
addq %r10, %rsi
movq %r13, %rdx
callq 0x2a130
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %r8
movl -0x30(%rbp), %r9d
movq -0x40(%rbp), %r10
movzwl (%rdi), %ecx
movq -0x58(%rbp), %rdx
leal -0x1(%rdx), %eax
cmpl -0x68(%rbp), %eax
jne 0x48d39
cmpb $0x0, -0x60(%rbp)
je 0x48eaf
subl %r10d, %edi
subl %ecx, %edi
movq -0x70(%rbp), %rax
movw %di, -0x6(%rax)
jmp 0x48eb7
shll $0x2, %edx
movq -0x48(%rbp), %rsi
subl %edx, %esi
addl $-0x4, %esi
leaq (%r10,%rsi), %r13
cmpq %r14, %r13
ja 0x48ee6
movl %ecx, -0x2c(%rbp)
xorl %edx, %edx
movl %esi, %r11d
movl %esi, %edi
movzwl (%r13), %r15d
testl %r15d, %r15d
je 0x48e19
movzwl 0x2(%r13), %r12d
leal (%r12,%r15), %ebx
testq %r8, %r8
je 0x48dc4
movl %r15d, %ecx
movb (%r10,%rcx), %al
testb $0x1, %al
je 0x48dc4
movq %rdx, -0x38(%rbp)
movl 0x1(%r10,%rcx), %edx
movzwl 0x5(%r10,%rcx), %ecx
shlq $0x20, %rcx
orq %rdx, %rcx
cmpq %r8, %rcx
jae 0x48db2
andb $-0x2, %al
movb %al, 0x6(%r10,%r15)
addq $0x6, %r15
addl $-0x6, %r12d
movw %r12w, 0x2(%r13)
movl %r9d, %ecx
subl %r12d, %ecx
movq -0x38(%rbp), %rdx
ja 0x48e28
addl %r15d, %r12d
movl %r12d, %ebx
cmpl %r11d, %ebx
jne 0x48dcd
movl %edi, %ebx
jmp 0x48e0b
movl %edi, %r12d
subl %r11d, %r12d
cmpl %edi, %esi
je 0x48e04
movl %esi, %edi
addq %r10, %rdi
movl %r12d, %edx
subq %rdx, %rdi
movq %rsi, %rax
movl %r11d, %esi
addq %r10, %rsi
movq %rax, -0x48(%rbp)
callq 0x2a130
movq -0x50(%rbp), %r8
movl -0x30(%rbp), %r9d
movq -0x40(%rbp), %r10
movq -0x48(%rbp), %rsi
subl %r12d, %esi
movl %esi, %edx
subl %ebx, %edx
leal (%rdx,%r15), %eax
movw %ax, (%r13)
movl %ebx, %edi
movl %r15d, %r11d
addq $0x4, %r13
cmpq %r14, %r13
jbe 0x48d5c
jmp 0x48ea6
movq %rdi, -0x68(%rbp)
movq %rsi, -0x48(%rbp)
leal (%rcx,%rbx), %eax
cmpl %eax, %r11d
movl %r11d, -0x58(%rbp)
jae 0x48e68
subl %r11d, %ebx
addl %ecx, %ebx
movl %r15d, %esi
addq %r10, %rsi
movq %rsi, %rdi
subq %rbx, %rdi
movl %r12d, %edx
movq %rcx, -0x60(%rbp)
callq 0x2a130
movq -0x60(%rbp), %rcx
movl -0x58(%rbp), %r11d
movq -0x40(%rbp), %r10
subl %ebx, %r15d
movl %r11d, %edi
addq %r10, %rdi
movl %ecx, %edx
subq %rdx, %rdi
xorl %esi, %esi
movq %rcx, %rbx
callq 0x2a290
movl -0x58(%rbp), %r11d
movq -0x40(%rbp), %r10
subl %ebx, %r11d
movl -0x30(%rbp), %r9d
movw %r9w, 0x2(%r13)
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %r8
movq -0x68(%rbp), %rdi
movq -0x38(%rbp), %rdx
jmp 0x48dbe
cmpl %edi, %esi
jne 0x48ebe
movl %r11d, %esi
jmp 0x48ee3
movl -0x2c(%rbp), %eax
addw %ax, 0xa(%r10)
andb $0x7f, 0x7(%r10)
jmp 0x48eed
subl %r11d, %edi
movq %rdi, %r14
movl %esi, %edi
addq %r10, %rdi
subq %r14, %rdi
movq %rsi, %rbx
movl %r11d, %esi
addq %r10, %rsi
movq %r14, %rdx
callq 0x2a130
movq %rbx, %rsi
subl %r14d, %esi
movl -0x2c(%rbp), %ecx
subl %ecx, %esi
movw %si, 0x2(%r13)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_compact_block_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov dword ptr [rbp+var_60], ecx
mov r10, rsi
movzx eax, byte ptr [rsi+8]
mov [rbp+var_58], rax
mov r11d, [rdi+7BCh]
lea rcx, [rsi+r11]
mov [rbp+var_68], rdx
lea eax, ds:0[rdx*4]
sub rcx, rax
mov [rbp+var_70], rcx
lea rax, [rcx-8]
mov esi, [rdi+0C18h]
mov rdi, rax
add esi, 0Ch
lea r14, [r10+r11]
add r14, 0FFFFFFFFFFFFFFF8h
xor r15d, r15d
mov r13d, esi
mov eax, esi
mov [rbp+var_2C], 0
mov [rbp+var_48], r11
mov [rbp+var_40], r10
mov [rbp+var_30], r9d
mov [rbp+var_50], r8
mov [rbp+var_38], rdi
loc_48BC7:
movzx r12d, word ptr [r14]
test r12d, r12d
jz loc_48C7F
movzx ecx, word ptr [r14+2]
movzx ebx, cx
test r8, r8
jz short loc_48C27
test cx, cx
jz short loc_48C27
mov edx, r12d
mov cl, [r10+rdx]
test cl, 1
jz short loc_48C27
mov r11d, esi
mov esi, [r10+rdx+1]
movzx edx, word ptr [r10+rdx+5]
shl rdx, 20h
or rdx, rsi
cmp rdx, r8
jnb short loc_48C24
and cl, 0FEh
mov [r10+r12+6], cl
add r12, 6
add [rbp+var_2C], 6
add ebx, 0FFFFFFFAh
mov [r14+2], bx
loc_48C24:
mov esi, r11d
loc_48C27:
cmp r12d, r13d
jz short loc_48C67
sub r13d, eax
cmp esi, eax
jz short loc_48C5B
mov edi, esi
add rdi, r10
mov r15d, esi
mov esi, eax
add rsi, r10
mov edx, r13d
call _memmove
mov esi, r15d
mov rdi, [rbp+var_38]
mov r8, [rbp+var_50]
mov r9d, [rbp+var_30]
mov r10, [rbp+var_40]
loc_48C5B:
add esi, r13d
mov r15d, r12d
sub r15d, esi
mov eax, r12d
loc_48C67:
mov ecx, r12d
sub ecx, r15d
mov [r14], cx
add r12d, ebx
mov r13d, r9d
sub r13d, ebx
ja short loc_48C8E
loc_48C7C:
mov r13d, r12d
loc_48C7F:
add r14, 0FFFFFFFFFFFFFFFCh
cmp rdi, r14
jbe loc_48BC7
jmp short loc_48CE5
loc_48C8E:
test ebx, ebx
jz short loc_48C7C
sub r12d, eax
mov r15d, esi
add r15, r10
mov ebx, esi
mov esi, eax
add rsi, r10
mov rdi, r15
mov rdx, r12
call _memmove
add r15, r12
mov rdi, r15
xor r15d, r15d
xor esi, esi
mov rdx, r13
call _memset
mov esi, ebx
mov rdi, [rbp+var_38]
mov r8, [rbp+var_50]
mov r9d, [rbp+var_30]
mov r10, [rbp+var_40]
add esi, r9d
mov [r14+2], r9w
sub [rbp+var_2C], r13d
mov eax, esi
mov r13d, esi
jmp short loc_48C7F
loc_48CE5:
cmp esi, eax
jz short loc_48D0E
sub r13d, eax
mov edi, esi
add rdi, r10
mov esi, eax
add rsi, r10
mov rdx, r13
call _memmove
mov rdi, [rbp+var_38]
mov r8, [rbp+var_50]
mov r9d, [rbp+var_30]
mov r10, [rbp+var_40]
loc_48D0E:
movzx ecx, word ptr [rdi]
mov rdx, [rbp+var_58]
lea eax, [rdx-1]
cmp eax, dword ptr [rbp+var_68]
jnz short loc_48D39
cmp byte ptr [rbp+var_60], 0
jz loc_48EAF
sub edi, r10d
sub edi, ecx
mov rax, [rbp+var_70]
mov [rax-6], di
jmp loc_48EB7
loc_48D39:
shl edx, 2
mov rsi, [rbp+var_48]
sub esi, edx
add esi, 0FFFFFFFCh
lea r13, [r10+rsi]
cmp r13, r14
ja loc_48EE6
mov [rbp+var_2C], ecx
xor edx, edx
mov r11d, esi
mov edi, esi
loc_48D5C:
movzx r15d, word ptr [r13+0]
test r15d, r15d
jz loc_48E19
movzx r12d, word ptr [r13+2]
lea ebx, [r12+r15]
test r8, r8
jz short loc_48DC4
mov ecx, r15d
mov al, [r10+rcx]
test al, 1
jz short loc_48DC4
mov [rbp+var_38], rdx
mov edx, [r10+rcx+1]
movzx ecx, word ptr [r10+rcx+5]
shl rcx, 20h
or rcx, rdx
cmp rcx, r8
jnb short loc_48DB2
and al, 0FEh
mov [r10+r15+6], al
add r15, 6
add r12d, 0FFFFFFFAh
mov [r13+2], r12w
loc_48DB2:
mov ecx, r9d
sub ecx, r12d
mov rdx, [rbp+var_38]
ja short loc_48E28
loc_48DBE:
add r12d, r15d
mov ebx, r12d
loc_48DC4:
cmp ebx, r11d
jnz short loc_48DCD
mov ebx, edi
jmp short loc_48E0B
loc_48DCD:
mov r12d, edi
sub r12d, r11d
cmp esi, edi
jz short loc_48E04
mov edi, esi
add rdi, r10
mov edx, r12d
sub rdi, rdx
mov rax, rsi
mov esi, r11d
add rsi, r10
mov [rbp+var_48], rax
call _memmove
mov r8, [rbp+var_50]
mov r9d, [rbp+var_30]
mov r10, [rbp+var_40]
mov rsi, [rbp+var_48]
loc_48E04:
sub esi, r12d
mov edx, esi
sub edx, ebx
loc_48E0B:
lea eax, [rdx+r15]
mov [r13+0], ax
mov edi, ebx
mov r11d, r15d
loc_48E19:
add r13, 4
cmp r13, r14
jbe loc_48D5C
jmp short loc_48EA6
loc_48E28:
mov [rbp+var_68], rdi
mov [rbp+var_48], rsi
lea eax, [rcx+rbx]
cmp r11d, eax
mov dword ptr [rbp+var_58], r11d
jnb short loc_48E68
sub ebx, r11d
add ebx, ecx
mov esi, r15d
add rsi, r10
mov rdi, rsi
sub rdi, rbx
mov edx, r12d
mov [rbp+var_60], rcx
call _memmove
mov rcx, [rbp+var_60]
mov r11d, dword ptr [rbp+var_58]
mov r10, [rbp+var_40]
sub r15d, ebx
loc_48E68:
mov edi, r11d
add rdi, r10
mov edx, ecx
sub rdi, rdx
xor esi, esi
mov rbx, rcx
call _memset
mov r11d, dword ptr [rbp+var_58]
mov r10, [rbp+var_40]
sub r11d, ebx
mov r9d, [rbp+var_30]
mov [r13+2], r9w
mov rsi, [rbp+var_48]
mov r8, [rbp+var_50]
mov rdi, [rbp+var_68]
mov rdx, [rbp+var_38]
jmp loc_48DBE
loc_48EA6:
cmp esi, edi
jnz short loc_48EBE
mov esi, r11d
jmp short loc_48EE3
loc_48EAF:
mov eax, [rbp+var_2C]
add [r10+0Ah], ax
loc_48EB7:
and byte ptr [r10+7], 7Fh
jmp short loc_48EED
loc_48EBE:
sub edi, r11d
mov r14, rdi
mov edi, esi
add rdi, r10
sub rdi, r14
mov rbx, rsi
mov esi, r11d
add rsi, r10
mov rdx, r14
call _memmove
mov rsi, rbx
sub esi, r14d
loc_48EE3:
mov ecx, [rbp+var_2C]
loc_48EE6:
sub esi, ecx
mov [r13+2], si
loc_48EED:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_compact_block_page(long long a1, long long a2, int a3, char a4, unsigned long long a5, unsigned int a6)
{
long long v6; // r10
long long v7; // r11
int v8; // esi
unsigned __int16 *v9; // rdi
unsigned int v10; // esi
unsigned __int16 *v11; // r14
__int16 v12; // r15
unsigned int v13; // r13d
unsigned int v14; // eax
long long v15; // r12
unsigned __int16 v16; // cx
unsigned int v17; // ebx
char v18; // cl
unsigned int v19; // r13d
unsigned int v20; // r12d
long long v21; // r13
long long v22; // r12
long long v23; // r15
long long v24; // rdi
unsigned __int16 v25; // cx
long long result; // rax
long long v27; // rsi
unsigned __int16 *v28; // r13
long long v29; // rdx
unsigned int v30; // r11d
unsigned int v31; // edi
long long v32; // r15
unsigned int v33; // r12d
unsigned int v34; // ebx
char v35; // al
unsigned int v36; // ecx
unsigned int v37; // r12d
long long v38; // rbx
unsigned int v39; // ebx
long long v40; // r14
long long v41; // [rsp+0h] [rbp-70h]
unsigned int v44; // [rsp+10h] [rbp-60h]
int v45; // [rsp+18h] [rbp-58h]
unsigned int v46; // [rsp+18h] [rbp-58h]
unsigned long long v47; // [rsp+20h] [rbp-50h]
int v48; // [rsp+28h] [rbp-48h]
long long v49; // [rsp+30h] [rbp-40h]
long long v50; // [rsp+38h] [rbp-38h]
unsigned int v51; // [rsp+40h] [rbp-30h]
unsigned int v52; // [rsp+44h] [rbp-2Ch]
unsigned __int16 v53; // [rsp+44h] [rbp-2Ch]
v6 = a2;
v45 = *(unsigned __int8 *)(a2 + 8);
v7 = *(unsigned int *)(a1 + 1980);
v41 = a2 + v7 - (unsigned int)(4 * a3);
v8 = *(_DWORD *)(a1 + 3096);
v9 = (unsigned __int16 *)(v41 - 8);
v10 = v8 + 12;
v11 = (unsigned __int16 *)(v6 + v7 - 8);
v12 = 0;
v13 = v10;
v14 = v10;
v52 = 0;
v48 = v7;
v49 = v6;
v51 = a6;
v47 = a5;
do
{
v15 = *v11;
if ( *v11 )
{
v16 = v11[1];
v17 = v16;
if ( a5 )
{
if ( v16 )
{
v18 = *(_BYTE *)(v6 + *v11);
if ( (v18 & 1) != 0
&& (*(unsigned int *)(v6 + *v11 + 1) | ((unsigned long long)*(unsigned __int16 *)(v6 + *v11 + 5) << 32)) < a5 )
{
*(_BYTE *)(v6 + v15 + 6) = v18 & 0xFE;
LODWORD(v15) = v15 + 6;
v52 += 6;
v17 -= 6;
v11[1] = v17;
}
}
}
if ( (_DWORD)v15 != v13 )
{
v19 = v13 - v14;
if ( v10 != v14 )
{
memmove(v6 + v10, v6 + v14, v19);
v9 = (unsigned __int16 *)(v41 - 8);
a5 = v47;
a6 = v51;
v6 = v49;
}
v10 += v19;
v12 = v15 - v10;
v14 = v15;
}
*v11 = v15 - v12;
v20 = v17 + v15;
v21 = a6 - v17;
if ( a6 > v17 && v17 )
{
v22 = v20 - v14;
v23 = v6 + v10;
memmove(v23, v6 + v14, v22);
v24 = v22 + v23;
v12 = 0;
memset(v24, 0LL, v21);
v9 = (unsigned __int16 *)(v41 - 8);
a5 = v47;
a6 = v51;
v6 = v49;
v10 += v51;
v11[1] = v51;
v52 -= v21;
v14 = v10;
v13 = v10;
}
else
{
v13 = v20;
}
}
v11 -= 2;
}
while ( v9 <= v11 );
if ( v10 != v14 )
{
memmove(v6 + v10, v6 + v14, v13 - v14);
v9 = (unsigned __int16 *)(v41 - 8);
a5 = v47;
a6 = v51;
v6 = v49;
}
v25 = *v9;
result = (unsigned int)(v45 - 1);
if ( (_DWORD)result == a3 )
{
if ( a4 )
{
result = v41;
*(_WORD *)(v41 - 6) = (_WORD)v9 - v6 - v25;
}
else
{
result = v52;
*(_WORD *)(v6 + 10) += v52;
}
*(_BYTE *)(v6 + 7) &= ~0x80u;
}
else
{
v27 = (unsigned int)(v48 - 4 * v45 - 4);
v28 = (unsigned __int16 *)(v6 + v27);
if ( v6 + v27 <= (unsigned long long)v11 )
{
v53 = *v9;
v29 = 0LL;
v30 = v48 - 4 * v45 - 4;
v31 = v30;
do
{
v32 = *v28;
if ( *v28 )
{
v33 = v28[1];
v34 = v33 + v32;
if ( a5 )
{
v35 = *(_BYTE *)(v6 + *v28);
if ( (v35 & 1) != 0 )
{
v50 = v29;
if ( (*(unsigned int *)(v6 + *v28 + 1) | ((unsigned long long)*(unsigned __int16 *)(v6 + *v28 + 5) << 32)) < a5 )
{
*(_BYTE *)(v6 + v32 + 6) = v35 & 0xFE;
LODWORD(v32) = v32 + 6;
v33 -= 6;
v28[1] = v33;
}
v36 = a6 - v33;
if ( a6 > v33 )
{
v46 = v30;
if ( v30 < v36 + v34 )
{
v38 = v36 + v34 - v30;
v44 = a6 - v33;
memmove(v6 + (unsigned int)v32 - v38, v6 + (unsigned int)v32, v33);
v36 = v44;
v30 = v46;
v6 = v49;
LODWORD(v32) = v32 - v38;
}
v39 = v36;
memset(v6 + v30 - v36, 0LL, v36);
v6 = v49;
v30 = v46 - v39;
a6 = v51;
v28[1] = v51;
a5 = v47;
v29 = v50;
}
v34 = v32 + v33;
}
}
if ( v34 == v30 )
{
v34 = v31;
}
else
{
v37 = v31 - v30;
if ( (_DWORD)v27 != v31 )
{
memmove(v6 + (unsigned int)v27 - v37, v6 + v30, v37);
a5 = v47;
a6 = v51;
v6 = v49;
}
LODWORD(v27) = v27 - v37;
v29 = (unsigned int)v27 - v34;
}
result = (unsigned int)(v29 + v32);
*v28 = v29 + v32;
v31 = v34;
v30 = v32;
}
v28 += 2;
}
while ( v28 <= v11 );
if ( (_DWORD)v27 == v31 )
{
LOWORD(v27) = v30;
}
else
{
v40 = v31 - v30;
result = memmove(v6 + (unsigned int)v27 - v40, v6 + v30, v40);
LOWORD(v27) = v27 - v40;
}
v25 = v53;
}
v28[1] = v27 - v25;
}
return result;
}
| _ma_compact_block_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x60],ECX
MOV R10,RSI
MOVZX EAX,byte ptr [RSI + 0x8]
MOV qword ptr [RBP + -0x58],RAX
MOV R11D,dword ptr [RDI + 0x7bc]
LEA RCX,[RSI + R11*0x1]
MOV qword ptr [RBP + -0x68],RDX
LEA EAX,[RDX*0x4]
SUB RCX,RAX
MOV qword ptr [RBP + -0x70],RCX
LEA RAX,[RCX + -0x8]
MOV ESI,dword ptr [RDI + 0xc18]
MOV RDI,RAX
ADD ESI,0xc
LEA R14,[R10 + R11*0x1]
ADD R14,-0x8
XOR R15D,R15D
MOV R13D,ESI
MOV EAX,ESI
MOV dword ptr [RBP + -0x2c],0x0
MOV qword ptr [RBP + -0x48],R11
MOV qword ptr [RBP + -0x40],R10
MOV dword ptr [RBP + -0x30],R9D
MOV qword ptr [RBP + -0x50],R8
MOV qword ptr [RBP + -0x38],RDI
LAB_00148bc7:
MOVZX R12D,word ptr [R14]
TEST R12D,R12D
JZ 0x00148c7f
MOVZX ECX,word ptr [R14 + 0x2]
MOVZX EBX,CX
TEST R8,R8
JZ 0x00148c27
TEST CX,CX
JZ 0x00148c27
MOV EDX,R12D
MOV CL,byte ptr [R10 + RDX*0x1]
TEST CL,0x1
JZ 0x00148c27
MOV R11D,ESI
MOV ESI,dword ptr [R10 + RDX*0x1 + 0x1]
MOVZX EDX,word ptr [R10 + RDX*0x1 + 0x5]
SHL RDX,0x20
OR RDX,RSI
CMP RDX,R8
JNC 0x00148c24
AND CL,0xfe
MOV byte ptr [R10 + R12*0x1 + 0x6],CL
ADD R12,0x6
ADD dword ptr [RBP + -0x2c],0x6
ADD EBX,-0x6
MOV word ptr [R14 + 0x2],BX
LAB_00148c24:
MOV ESI,R11D
LAB_00148c27:
CMP R12D,R13D
JZ 0x00148c67
SUB R13D,EAX
CMP ESI,EAX
JZ 0x00148c5b
MOV EDI,ESI
ADD RDI,R10
MOV R15D,ESI
MOV ESI,EAX
ADD RSI,R10
MOV EDX,R13D
CALL 0x0012a130
MOV ESI,R15D
MOV RDI,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x50]
MOV R9D,dword ptr [RBP + -0x30]
MOV R10,qword ptr [RBP + -0x40]
LAB_00148c5b:
ADD ESI,R13D
MOV R15D,R12D
SUB R15D,ESI
MOV EAX,R12D
LAB_00148c67:
MOV ECX,R12D
SUB ECX,R15D
MOV word ptr [R14],CX
ADD R12D,EBX
MOV R13D,R9D
SUB R13D,EBX
JA 0x00148c8e
LAB_00148c7c:
MOV R13D,R12D
LAB_00148c7f:
ADD R14,-0x4
CMP RDI,R14
JBE 0x00148bc7
JMP 0x00148ce5
LAB_00148c8e:
TEST EBX,EBX
JZ 0x00148c7c
SUB R12D,EAX
MOV R15D,ESI
ADD R15,R10
MOV EBX,ESI
MOV ESI,EAX
ADD RSI,R10
MOV RDI,R15
MOV RDX,R12
CALL 0x0012a130
ADD R15,R12
MOV RDI,R15
XOR R15D,R15D
XOR ESI,ESI
MOV RDX,R13
CALL 0x0012a290
MOV ESI,EBX
MOV RDI,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x50]
MOV R9D,dword ptr [RBP + -0x30]
MOV R10,qword ptr [RBP + -0x40]
ADD ESI,R9D
MOV word ptr [R14 + 0x2],R9W
SUB dword ptr [RBP + -0x2c],R13D
MOV EAX,ESI
MOV R13D,ESI
JMP 0x00148c7f
LAB_00148ce5:
CMP ESI,EAX
JZ 0x00148d0e
SUB R13D,EAX
MOV EDI,ESI
ADD RDI,R10
MOV ESI,EAX
ADD RSI,R10
MOV RDX,R13
CALL 0x0012a130
MOV RDI,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x50]
MOV R9D,dword ptr [RBP + -0x30]
MOV R10,qword ptr [RBP + -0x40]
LAB_00148d0e:
MOVZX ECX,word ptr [RDI]
MOV RDX,qword ptr [RBP + -0x58]
LEA EAX,[RDX + -0x1]
CMP EAX,dword ptr [RBP + -0x68]
JNZ 0x00148d39
CMP byte ptr [RBP + -0x60],0x0
JZ 0x00148eaf
SUB EDI,R10D
SUB EDI,ECX
MOV RAX,qword ptr [RBP + -0x70]
MOV word ptr [RAX + -0x6],DI
JMP 0x00148eb7
LAB_00148d39:
SHL EDX,0x2
MOV RSI,qword ptr [RBP + -0x48]
SUB ESI,EDX
ADD ESI,-0x4
LEA R13,[R10 + RSI*0x1]
CMP R13,R14
JA 0x00148ee6
MOV dword ptr [RBP + -0x2c],ECX
XOR EDX,EDX
MOV R11D,ESI
MOV EDI,ESI
LAB_00148d5c:
MOVZX R15D,word ptr [R13]
TEST R15D,R15D
JZ 0x00148e19
MOVZX R12D,word ptr [R13 + 0x2]
LEA EBX,[R12 + R15*0x1]
TEST R8,R8
JZ 0x00148dc4
MOV ECX,R15D
MOV AL,byte ptr [R10 + RCX*0x1]
TEST AL,0x1
JZ 0x00148dc4
MOV qword ptr [RBP + -0x38],RDX
MOV EDX,dword ptr [R10 + RCX*0x1 + 0x1]
MOVZX ECX,word ptr [R10 + RCX*0x1 + 0x5]
SHL RCX,0x20
OR RCX,RDX
CMP RCX,R8
JNC 0x00148db2
AND AL,0xfe
MOV byte ptr [R10 + R15*0x1 + 0x6],AL
ADD R15,0x6
ADD R12D,-0x6
MOV word ptr [R13 + 0x2],R12W
LAB_00148db2:
MOV ECX,R9D
SUB ECX,R12D
MOV RDX,qword ptr [RBP + -0x38]
JA 0x00148e28
LAB_00148dbe:
ADD R12D,R15D
MOV EBX,R12D
LAB_00148dc4:
CMP EBX,R11D
JNZ 0x00148dcd
MOV EBX,EDI
JMP 0x00148e0b
LAB_00148dcd:
MOV R12D,EDI
SUB R12D,R11D
CMP ESI,EDI
JZ 0x00148e04
MOV EDI,ESI
ADD RDI,R10
MOV EDX,R12D
SUB RDI,RDX
MOV RAX,RSI
MOV ESI,R11D
ADD RSI,R10
MOV qword ptr [RBP + -0x48],RAX
CALL 0x0012a130
MOV R8,qword ptr [RBP + -0x50]
MOV R9D,dword ptr [RBP + -0x30]
MOV R10,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x48]
LAB_00148e04:
SUB ESI,R12D
MOV EDX,ESI
SUB EDX,EBX
LAB_00148e0b:
LEA EAX,[RDX + R15*0x1]
MOV word ptr [R13],AX
MOV EDI,EBX
MOV R11D,R15D
LAB_00148e19:
ADD R13,0x4
CMP R13,R14
JBE 0x00148d5c
JMP 0x00148ea6
LAB_00148e28:
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x48],RSI
LEA EAX,[RCX + RBX*0x1]
CMP R11D,EAX
MOV dword ptr [RBP + -0x58],R11D
JNC 0x00148e68
SUB EBX,R11D
ADD EBX,ECX
MOV ESI,R15D
ADD RSI,R10
MOV RDI,RSI
SUB RDI,RBX
MOV EDX,R12D
MOV qword ptr [RBP + -0x60],RCX
CALL 0x0012a130
MOV RCX,qword ptr [RBP + -0x60]
MOV R11D,dword ptr [RBP + -0x58]
MOV R10,qword ptr [RBP + -0x40]
SUB R15D,EBX
LAB_00148e68:
MOV EDI,R11D
ADD RDI,R10
MOV EDX,ECX
SUB RDI,RDX
XOR ESI,ESI
MOV RBX,RCX
CALL 0x0012a290
MOV R11D,dword ptr [RBP + -0x58]
MOV R10,qword ptr [RBP + -0x40]
SUB R11D,EBX
MOV R9D,dword ptr [RBP + -0x30]
MOV word ptr [R13 + 0x2],R9W
MOV RSI,qword ptr [RBP + -0x48]
MOV R8,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x38]
JMP 0x00148dbe
LAB_00148ea6:
CMP ESI,EDI
JNZ 0x00148ebe
MOV ESI,R11D
JMP 0x00148ee3
LAB_00148eaf:
MOV EAX,dword ptr [RBP + -0x2c]
ADD word ptr [R10 + 0xa],AX
LAB_00148eb7:
AND byte ptr [R10 + 0x7],0x7f
JMP 0x00148eed
LAB_00148ebe:
SUB EDI,R11D
MOV R14,RDI
MOV EDI,ESI
ADD RDI,R10
SUB RDI,R14
MOV RBX,RSI
MOV ESI,R11D
ADD RSI,R10
MOV RDX,R14
CALL 0x0012a130
MOV RSI,RBX
SUB ESI,R14D
LAB_00148ee3:
MOV ECX,dword ptr [RBP + -0x2c]
LAB_00148ee6:
SUB ESI,ECX
MOV word ptr [R13 + 0x2],SI
LAB_00148eed:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void _ma_compact_block_page
(long param_1,long param_2,int param_3,char param_4,ulong param_5,uint param_6)
{
byte bVar1;
ushort uVar2;
ushort uVar3;
ushort uVar4;
long lVar5;
uint uVar6;
uint uVar7;
uint uVar8;
uint uVar9;
uint uVar10;
ulong uVar11;
uint uVar12;
ushort *puVar13;
ushort *puVar14;
int iVar15;
ulong uVar16;
int local_34;
bVar1 = *(byte *)(param_2 + 8);
uVar9 = *(uint *)(param_1 + 0x7bc);
lVar5 = (param_2 + (ulong)uVar9) - (ulong)(uint)(param_3 * 4);
puVar13 = (ushort *)(lVar5 - 8);
uVar8 = *(int *)(param_1 + 0xc18) + 0xc;
puVar14 = (ushort *)(param_2 + (ulong)uVar9 + -8);
iVar15 = 0;
local_34 = 0;
uVar10 = uVar8;
uVar7 = uVar8;
do {
uVar11 = (ulong)*puVar14;
if (*puVar14 != 0) {
uVar2 = puVar14[1];
uVar6 = (uint)uVar2;
if ((((param_5 != 0) && (uVar2 != 0)) && ((*(byte *)(param_2 + uVar11) & 1) != 0)) &&
(CONCAT24(*(int2 *)(param_2 + 5 + uVar11),*(int4 *)(param_2 + 1 + uVar11)) <
param_5)) {
*(byte *)(param_2 + 6 + uVar11) = *(byte *)(param_2 + uVar11) & 0xfe;
uVar11 = uVar11 + 6;
local_34 = local_34 + 6;
uVar6 = uVar2 - 6;
puVar14[1] = (ushort)uVar6;
}
uVar12 = (uint)uVar11;
if (uVar12 != uVar10) {
if (uVar8 != uVar7) {
memmove((void *)((ulong)uVar8 + param_2),(void *)((ulong)uVar7 + param_2),
(ulong)(uVar10 - uVar7));
}
uVar8 = uVar8 + (uVar10 - uVar7);
iVar15 = uVar12 - uVar8;
uVar7 = uVar12;
}
*puVar14 = (short)uVar11 - (short)iVar15;
uVar10 = uVar12 + uVar6;
uVar12 = param_6 - uVar6;
if ((uVar6 <= param_6 && uVar12 != 0) && (uVar6 != 0)) {
memmove((void *)((ulong)uVar8 + param_2),(void *)((ulong)uVar7 + param_2),
(ulong)(uVar10 - uVar7));
iVar15 = 0;
memset((void *)((long)((ulong)uVar8 + param_2) + (ulong)(uVar10 - uVar7)),0,(ulong)uVar12);
uVar8 = uVar8 + param_6;
puVar14[1] = (ushort)param_6;
local_34 = local_34 - uVar12;
uVar10 = uVar8;
uVar7 = uVar8;
}
}
puVar14 = puVar14 + -2;
} while (puVar13 <= puVar14);
if (uVar8 != uVar7) {
memmove((void *)((ulong)uVar8 + param_2),(void *)((ulong)uVar7 + param_2),
(ulong)(uVar10 - uVar7));
}
uVar2 = *puVar13;
if (bVar1 - 1 == param_3) {
if (param_4 == '\0') {
*(short *)(param_2 + 10) = *(short *)(param_2 + 10) + (short)local_34;
}
else {
*(ushort *)(lVar5 + -6) = ((short)puVar13 - (short)param_2) - uVar2;
}
*(byte *)(param_2 + 7) = *(byte *)(param_2 + 7) & 0x7f;
}
else {
uVar9 = (uVar9 + (uint)bVar1 * -4) - 4;
uVar11 = (ulong)uVar9;
puVar13 = (ushort *)(param_2 + uVar11);
if (puVar13 <= puVar14) {
iVar15 = 0;
uVar10 = uVar9;
do {
uVar3 = *puVar13;
uVar16 = (ulong)uVar3;
if (uVar3 != 0) {
uVar4 = puVar13[1];
uVar8 = (uint)uVar4;
uVar7 = (uint)uVar4 + (uint)uVar3;
if ((param_5 != 0) && ((*(byte *)(param_2 + uVar16) & 1) != 0)) {
if (CONCAT24(*(int2 *)(param_2 + 5 + uVar16),*(int4 *)(param_2 + 1 + uVar16)
) < param_5) {
*(byte *)(param_2 + 6 + uVar16) = *(byte *)(param_2 + uVar16) & 0xfe;
uVar16 = uVar16 + 6;
uVar8 = uVar4 - 6;
puVar13[1] = (ushort)uVar8;
}
uVar6 = param_6 - uVar8;
if (uVar8 <= param_6 && uVar6 != 0) {
if (uVar9 < uVar6 + uVar7) {
uVar7 = (uVar7 - uVar9) + uVar6;
memmove((void *)((long)(uVar16 + param_2) - (ulong)uVar7),(void *)(uVar16 + param_2)
,(ulong)uVar8);
uVar16 = (ulong)((int)uVar16 - uVar7);
}
memset((void *)(((ulong)uVar9 + param_2) - (ulong)uVar6),0,(ulong)uVar6);
uVar9 = uVar9 - uVar6;
puVar13[1] = (ushort)param_6;
}
uVar7 = uVar8 + (int)uVar16;
}
if (uVar7 != uVar9) {
uVar8 = uVar10 - uVar9;
if ((uint)uVar11 != uVar10) {
memmove((void *)((uVar11 + param_2) - (ulong)uVar8),(void *)((ulong)uVar9 + param_2),
(ulong)uVar8);
}
uVar8 = (uint)uVar11 - uVar8;
uVar11 = (ulong)uVar8;
iVar15 = uVar8 - uVar7;
uVar10 = uVar7;
}
*puVar13 = (short)iVar15 + (short)uVar16;
uVar9 = (uint)uVar16;
}
puVar13 = puVar13 + 2;
} while (puVar13 <= puVar14);
if ((uint)uVar11 != uVar10) {
uVar10 = uVar10 - uVar9;
memmove((void *)((uVar11 + param_2) - (ulong)uVar10),(void *)((ulong)uVar9 + param_2),
(ulong)uVar10);
uVar9 = (uint)uVar11 - uVar10;
}
}
puVar13[1] = (short)uVar9 - uVar2;
}
return;
}
|
|
5,782 | CLI::RequiredError::RequiredError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Error.hpp | explicit RequiredError(std::string name) : RequiredError(name + " is required", ExitCodes::RequiredError) {} | O1 | cpp | CLI::RequiredError::RequiredError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %rbx
movq %rdi, %rbx
leaq 0x222f3(%rip), %rax # 0x491f0
movq %rax, (%rdi)
movq 0x18(%rdi), %rdi
leaq 0x28(%rbx), %rax
cmpq %rax, %rdi
je 0x26f18
movq (%rax), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rdi
callq 0x7490
movl $0x38, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x7430
| _ZN3CLI13RequiredErrorD0Ev:
push rbx
mov rbx, rdi
lea rax, off_491F0
mov [rdi], rax
mov rdi, [rdi+18h]; void *
lea rax, [rbx+28h]
cmp rdi, rax
jz short loc_26F18
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_26F18:
mov rdi, rbx; this
call __ZNSt13runtime_errorD2Ev; std::runtime_error::~runtime_error()
mov esi, 38h ; '8'; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void CLI::RequiredError::~RequiredError(CLI::RequiredError *this)
{
char *v2; // rdi
*(_QWORD *)this = off_491F0;
v2 = (char *)*((_QWORD *)this + 3);
if ( v2 != (char *)this + 40 )
operator delete(v2, *((_QWORD *)this + 5) + 1LL);
std::runtime_error::~runtime_error(this);
operator delete(this, 0x38uLL);
}
| ~RequiredError:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1491f0]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x18]
LEA RAX,[RBX + 0x28]
CMP RDI,RAX
JZ 0x00126f18
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_00126f18:
MOV RDI,RBX
CALL 0x00107490
MOV ESI,0x38
MOV RDI,RBX
POP RBX
JMP 0x00107430
|
/* CLI::RequiredError::~RequiredError() */
void __thiscall CLI::RequiredError::~RequiredError(RequiredError *this)
{
*(int ***)this = &PTR__Error_001491f0;
if (*(RequiredError **)(this + 0x18) != this + 0x28) {
operator_delete(*(RequiredError **)(this + 0x18),*(long *)(this + 0x28) + 1);
}
std::runtime_error::~runtime_error((runtime_error *)this);
operator_delete(this,0x38);
return;
}
|
|
5,783 | bfdec_divrem | bluesky950520[P]quickjs/libbf.c | int bfdec_divrem(bfdec_t *q, bfdec_t *r, const bfdec_t *a, const bfdec_t *b,
limb_t prec, bf_flags_t flags, int rnd_mode)
{
bf_context_t *s = q->ctx;
bfdec_t a1_s, *a1 = &a1_s;
bfdec_t b1_s, *b1 = &b1_s;
bfdec_t r1_s, *r1 = &r1_s;
int q_sign, res;
BOOL is_ceil, is_rndn;
assert(q != a && q != b);
assert(r != a && r != b);
assert(q != r);
if (a->len == 0 || b->len == 0) {
bfdec_set_zero(q, 0);
if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) {
bfdec_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF || b->expn == BF_EXP_ZERO) {
bfdec_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bfdec_set(r, a);
return bfdec_round(r, prec, flags);
}
}
q_sign = a->sign ^ b->sign;
is_rndn = (rnd_mode == BF_RNDN || rnd_mode == BF_RNDNA);
switch(rnd_mode) {
default:
case BF_RNDZ:
case BF_RNDN:
case BF_RNDNA:
is_ceil = FALSE;
break;
case BF_RNDD:
is_ceil = q_sign;
break;
case BF_RNDU:
is_ceil = q_sign ^ 1;
break;
case BF_RNDA:
is_ceil = TRUE;
break;
case BF_DIVREM_EUCLIDIAN:
is_ceil = a->sign;
break;
}
a1->expn = a->expn;
a1->tab = a->tab;
a1->len = a->len;
a1->sign = 0;
b1->expn = b->expn;
b1->tab = b->tab;
b1->len = b->len;
b1->sign = 0;
// bfdec_print_str("a1", a1);
// bfdec_print_str("b1", b1);
/* XXX: could improve to avoid having a large 'q' */
bfdec_tdivremu(s, q, r, a1, b1);
if (bfdec_is_nan(q) || bfdec_is_nan(r))
goto fail;
// bfdec_print_str("q", q);
// bfdec_print_str("r", r);
if (r->len != 0) {
if (is_rndn) {
bfdec_init(s, r1);
if (bfdec_set(r1, r))
goto fail;
if (bfdec_mul_si(r1, r1, 2, BF_PREC_INF, BF_RNDZ)) {
bfdec_delete(r1);
goto fail;
}
res = bfdec_cmpu(r1, b);
bfdec_delete(r1);
if (res > 0 ||
(res == 0 &&
(rnd_mode == BF_RNDNA ||
(get_digit(q->tab, q->len, q->len * LIMB_DIGITS - q->expn) & 1) != 0))) {
goto do_sub_r;
}
} else if (is_ceil) {
do_sub_r:
res = bfdec_add_si(q, q, 1, BF_PREC_INF, BF_RNDZ);
res |= bfdec_sub(r, r, b1, BF_PREC_INF, BF_RNDZ);
if (res & BF_ST_MEM_ERROR)
goto fail;
}
}
r->sign ^= a->sign;
q->sign = q_sign;
return bfdec_round(r, prec, flags);
fail:
bfdec_set_nan(q);
bfdec_set_nan(r);
return BF_ST_MEM_ERROR;
} | O1 | c | bfdec_divrem:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r9d, 0x8(%rsp)
movq %r8, 0x18(%rsp)
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movabsq $0x7fffffffffffffff, %rbp # imm = 0x7FFFFFFFFFFFFFFF
movq (%rdi), %r15
movq 0x18(%rdx), %rcx
testq %rcx, %rcx
je 0x8eace
movq 0x18(%r13), %rax
testq %rax, %rax
je 0x8eace
movl 0xd0(%rsp), %edi
movl 0x8(%r12), %esi
movl 0x8(%r13), %edx
xorl %esi, %edx
movl %edx, 0x4(%rsp)
xorl %edx, %edx
movq %rdi, 0x10(%rsp)
addl $-0x2, %edi
movl $0x0, %r8d
cmpl $0x4, %edi
ja 0x8ebaa
leaq 0x1280c(%rip), %r8 # 0xa12c4
movslq (%r8,%rdi,4), %rdi
addq %r8, %rdi
xorl %r8d, %r8d
jmpq *%rdi
movl 0x4(%rsp), %r8d
jmp 0x8ebaa
cmpq $0x0, 0x18(%r14)
je 0x8eaee
movq 0x20(%r14), %rsi
movq (%r15), %rdi
xorl %edx, %edx
callq *0x8(%r15)
movq %rax, 0x20(%r14)
movq $0x0, 0x18(%r14)
leaq 0x1(%rbp), %rax
movq %rax, 0x10(%r14)
movl $0x0, 0x8(%r14)
movq 0x10(%r12), %rcx
cmpq %rbp, %rcx
je 0x8eb11
movq 0x10(%r13), %rdx
cmpq %rbp, %rdx
jne 0x8eb45
cmpq $0x0, 0x18(%rbx)
je 0x8eb33
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %rbp, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
xorl %eax, %eax
jmp 0x8ee81
leaq -0x1(%rbp), %rsi
cmpq %rsi, %rcx
setne %cl
cmpq %rax, %rdx
setne %al
testb %al, %cl
jne 0x8ed27
cmpq $0x0, 0x18(%rbx)
je 0x8eb7f
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %rbp, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x1, %eax
jmp 0x8ee81
movl $0x1, %r8d
jmp 0x8ebaa
movl 0x4(%rsp), %r8d
xorl $0x1, %r8d
jmp 0x8ebaa
movl %esi, %r8d
movl %r8d, 0xc(%rsp)
movq 0x10(%r12), %rsi
leaq 0x70(%rsp), %rdi
movq %rsi, 0x10(%rdi)
movq 0x20(%r12), %rsi
movq %rsi, 0x20(%rdi)
movq %rcx, 0x18(%rdi)
movl %edx, 0x8(%rdi)
movq 0x10(%r13), %rcx
leaq 0x48(%rsp), %rsi
movq %rcx, 0x10(%rsi)
movq 0x20(%r13), %rcx
movq %rcx, 0x20(%rsi)
movq %rax, 0x18(%rsi)
movl %edx, 0x8(%rsi)
callq 0x84816
testl %eax, %eax
js 0x8ec62
leaq -0x597(%rip), %r9 # 0x8e662
leaq 0x70(%rsp), %rsi
leaq 0x48(%rsp), %rdx
movq %r14, %rdi
xorl %ecx, %ecx
movl $0x11, %r8d
callq 0x86f26
movabsq $0x3fffffffffffffff, %rbp # imm = 0x3FFFFFFFFFFFFFFF
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x48(%rsp), %rdx
movq %rbp, %rcx
movl $0x1, %r8d
callq 0x8e208
leaq -0xa40(%rip), %r9 # 0x8e1fd
movq %rbx, %rdi
leaq 0x70(%rsp), %rsi
movq %rbx, %rdx
movq %rbp, %rcx
movabsq $0x7fffffffffffffff, %rbp # imm = 0x7FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0x86f26
jmp 0x8ec79
movq %r14, %rdi
xorl %esi, %esi
callq 0x8e0ab
leaq 0x70(%rsp), %rsi
movq %rbx, %rdi
callq 0x84079
cmpq %rbp, 0x10(%r14)
movl 0xc(%rsp), %eax
je 0x8ee21
cmpq %rbp, 0x10(%rbx)
je 0x8ee21
cmpq $0x0, 0x18(%rbx)
je 0x8edf1
testl $0xfffffffb, 0x10(%rsp) # imm = 0xFFFFFFFB
jne 0x8ed61
leaq 0x20(%rsp), %rdi
movq %r15, (%rdi)
movl $0x0, 0x8(%rdi)
leaq 0x1(%rbp), %rax
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movq %rbx, %rsi
callq 0x84079
testl %eax, %eax
jne 0x8ee21
leaq 0x20(%rsp), %rdi
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x2, %edx
movq %rdi, %rsi
movl $0x1, %r8d
callq 0x8e529
testl %eax, %eax
je 0x8ed6a
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x8ee21
movq 0x40(%rsp), %rsi
testq %rsi, %rsi
je 0x8ee21
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x8ee21
movq %rbx, %rdi
movq %r12, %rsi
callq 0x84079
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x8eb3e
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movl 0x8(%rsp), %edx
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8d7f7
testl %eax, %eax
jne 0x8eda0
jmp 0x8edf1
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x84816
movl %eax, %r13d
movq (%r15), %rax
testq %rax, %rax
je 0x8ed97
movq 0x40(%rsp), %rsi
testq %rsi, %rsi
je 0x8ed97
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
testl %r13d, %r13d
jle 0x8ee93
movabsq $0x3fffffffffffffff, %r15 # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %edx
movq %r14, %rdi
movq %r14, %rsi
movq %r15, %rcx
movl $0x1, %r8d
callq 0x8e5bc
movq %rbp, %r13
movl %eax, %ebp
leaq -0xbd2(%rip), %r9 # 0x8e1fd
leaq 0x48(%rsp), %rdx
movq %rbx, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl $0x1, %r8d
callq 0x86f26
orl %ebp, %eax
movq %r13, %rbp
testb $0x20, %al
jne 0x8ee21
movl 0x8(%r12), %eax
xorl %eax, 0x8(%rbx)
movl 0x4(%rsp), %eax
movl %eax, 0x8(%r14)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x8eb3e
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movl 0x8(%rsp), %edx
callq 0x8d7f7
jmp 0x8ee81
cmpq $0x0, 0x18(%r14)
je 0x8ee43
movq (%r14), %rax
movq 0x20(%r14), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%r14)
movq $0x0, 0x18(%r14)
movq %rbp, 0x10(%r14)
movl $0x0, 0x8(%r14)
cmpq $0x0, 0x18(%rbx)
je 0x8ee71
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %rbp, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x20, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jne 0x8edf1
cmpl $0x4, 0x10(%rsp)
je 0x8eda0
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
leaq (%rsi,%rsi,8), %rax
leaq (%rsi,%rax,2), %rdx
subq 0x10(%r14), %rdx
callq 0x8eeca
testb $0x1, %al
jne 0x8eda0
jmp 0x8edf1
| bfdec_divrem:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov [rsp+0C8h+var_C0], r9d
mov [rsp+0C8h+var_B0], r8
mov r13, rcx
mov r12, rdx
mov rbx, rsi
mov r14, rdi
mov rbp, 7FFFFFFFFFFFFFFFh
mov r15, [rdi]
mov rcx, [rdx+18h]
test rcx, rcx
jz short loc_8EACE
mov rax, [r13+18h]
test rax, rax
jz short loc_8EACE
mov edi, [rsp+0C8h+arg_0]
mov esi, [r12+8]
mov edx, [r13+8]
xor edx, esi
mov [rsp+0C8h+var_C4], edx
xor edx, edx
mov [rsp+0C8h+var_B8], rdi
add edi, 0FFFFFFFEh; switch 5 cases
mov r8d, 0
cmp edi, 4
ja def_8EAC2; jumptable 000000000008EAC2 default case, case 4
lea r8, jpt_8EAC2
movsxd rdi, ds:(jpt_8EAC2 - 0A12C4h)[r8+rdi*4]
add rdi, r8
xor r8d, r8d
jmp rdi; switch jump
loc_8EAC4:
mov r8d, [rsp+0C8h+var_C4]; jumptable 000000000008EAC2 case 2
jmp def_8EAC2; jumptable 000000000008EAC2 default case, case 4
loc_8EACE:
cmp qword ptr [r14+18h], 0
jz short loc_8EAEE
mov rsi, [r14+20h]
mov rdi, [r15]
xor edx, edx
call qword ptr [r15+8]
mov [r14+20h], rax
mov qword ptr [r14+18h], 0
loc_8EAEE:
lea rax, [rbp+1]
mov [r14+10h], rax
mov dword ptr [r14+8], 0
mov rcx, [r12+10h]
cmp rcx, rbp
jz short loc_8EB11
mov rdx, [r13+10h]
cmp rdx, rbp
jnz short loc_8EB45
loc_8EB11:
cmp qword ptr [rbx+18h], 0
jz short loc_8EB33
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8EB33:
mov [rbx+10h], rbp
mov dword ptr [rbx+8], 0
loc_8EB3E:
xor eax, eax
jmp loc_8EE81
loc_8EB45:
lea rsi, [rbp-1]
cmp rcx, rsi
setnz cl
cmp rdx, rax
setnz al
test cl, al
jnz loc_8ED27
cmp qword ptr [rbx+18h], 0
jz short loc_8EB7F
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8EB7F:
mov [rbx+10h], rbp
mov dword ptr [rbx+8], 0
mov eax, 1
jmp loc_8EE81
loc_8EB94:
mov r8d, 1; jumptable 000000000008EAC2 case 5
jmp short def_8EAC2; jumptable 000000000008EAC2 default case, case 4
loc_8EB9C:
mov r8d, [rsp+0C8h+var_C4]; jumptable 000000000008EAC2 case 3
xor r8d, 1
jmp short def_8EAC2; jumptable 000000000008EAC2 default case, case 4
loc_8EBA7:
mov r8d, esi; jumptable 000000000008EAC2 case 6
def_8EAC2:
mov [rsp+0C8h+var_BC], r8d; jumptable 000000000008EAC2 default case, case 4
mov rsi, [r12+10h]
lea rdi, [rsp+0C8h+var_58]
mov [rdi+10h], rsi
mov rsi, [r12+20h]
mov [rdi+20h], rsi
mov [rdi+18h], rcx
mov [rdi+8], edx
mov rcx, [r13+10h]
lea rsi, [rsp+0C8h+var_80]
mov [rsi+10h], rcx
mov rcx, [r13+20h]
mov [rsi+20h], rcx
mov [rsi+18h], rax
mov [rsi+8], edx
call bf_cmpu
test eax, eax
js short loc_8EC62
lea r9, __bfdec_div
lea rsi, [rsp+0C8h+var_58]
lea rdx, [rsp+0C8h+var_80]
mov rdi, r14
xor ecx, ecx
mov r8d, 11h
call bf_op2
mov rbp, 3FFFFFFFFFFFFFFFh
mov rdi, rbx
mov rsi, r14
lea rdx, [rsp+0C8h+var_80]
mov rcx, rbp
mov r8d, 1
call bfdec_mul
lea r9, __bfdec_sub
mov rdi, rbx
lea rsi, [rsp+0C8h+var_58]
mov rdx, rbx
mov rcx, rbp
mov rbp, 7FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_op2
jmp short loc_8EC79
loc_8EC62:
mov rdi, r14
xor esi, esi
call bfdec_set_ui
lea rsi, [rsp+0C8h+var_58]
mov rdi, rbx
call bf_set
loc_8EC79:
cmp [r14+10h], rbp
mov eax, [rsp+0C8h+var_BC]
jz loc_8EE21
cmp [rbx+10h], rbp
jz loc_8EE21
cmp qword ptr [rbx+18h], 0
jz loc_8EDF1
test dword ptr [rsp+0C8h+var_B8], 0FFFFFFFBh
jnz loc_8ED61
lea rdi, [rsp+0C8h+var_A8]
mov [rdi], r15
mov dword ptr [rdi+8], 0
lea rax, [rbp+1]
mov [rdi+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [rdi+18h], xmm0
mov rsi, rbx
call bf_set
test eax, eax
jnz loc_8EE21
lea rdi, [rsp+0C8h+var_A8]
mov rcx, 3FFFFFFFFFFFFFFFh
mov edx, 2
mov rsi, rdi
mov r8d, 1
call bfdec_mul_si
test eax, eax
jz short loc_8ED6A
mov rax, [rsp+0C8h+var_A8]
test rax, rax
jz loc_8EE21
mov rsi, [rsp+0C8h+var_88]
test rsi, rsi
jz loc_8EE21
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
jmp loc_8EE21
loc_8ED27:
mov rdi, rbx
mov rsi, r12
call bf_set
mov rcx, [rbx+18h]
test rcx, rcx
jz loc_8EB3E
mov rdi, rbx
mov rsi, [rsp+0C8h+var_B0]
mov edx, [rsp+0C8h+var_C0]
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp __bfdec_round
loc_8ED61:
test eax, eax
jnz short loc_8EDA0
jmp loc_8EDF1
loc_8ED6A:
lea r15, [rsp+0C8h+var_A8]
mov rdi, r15
mov rsi, r13
call bf_cmpu
mov r13d, eax
mov rax, [r15]
test rax, rax
jz short loc_8ED97
mov rsi, [rsp+0C8h+var_88]
test rsi, rsi
jz short loc_8ED97
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8ED97:
test r13d, r13d
jle loc_8EE93
loc_8EDA0:
mov r15, 3FFFFFFFFFFFFFFFh
mov edx, 1
mov rdi, r14
mov rsi, r14
mov rcx, r15
mov r8d, 1
call bfdec_add_si
mov r13, rbp
mov ebp, eax
lea r9, __bfdec_sub
lea rdx, [rsp+0C8h+var_80]
mov rdi, rbx
mov rsi, rbx
mov rcx, r15
mov r8d, 1
call bf_op2
or eax, ebp
mov rbp, r13
test al, 20h
jnz short loc_8EE21
loc_8EDF1:
mov eax, [r12+8]
xor [rbx+8], eax
mov eax, [rsp+0C8h+var_C4]
mov [r14+8], eax
mov rcx, [rbx+18h]
test rcx, rcx
jz loc_8EB3E
mov rdi, rbx
mov rsi, [rsp+0C8h+var_B0]
mov edx, [rsp+0C8h+var_C0]
call __bfdec_round
jmp short loc_8EE81
loc_8EE21:
cmp qword ptr [r14+18h], 0
jz short loc_8EE43
mov rax, [r14]
mov rsi, [r14+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [r14+20h], rax
mov qword ptr [r14+18h], 0
loc_8EE43:
mov [r14+10h], rbp
mov dword ptr [r14+8], 0
cmp qword ptr [rbx+18h], 0
jz short loc_8EE71
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_8EE71:
mov [rbx+10h], rbp
mov dword ptr [rbx+8], 0
mov eax, 20h ; ' '
loc_8EE81:
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8EE93:
jnz loc_8EDF1
cmp dword ptr [rsp+0C8h+var_B8], 4
jz loc_8EDA0
mov rsi, [r14+18h]
mov rdi, [r14+20h]
lea rax, [rsi+rsi*8]
lea rdx, [rsi+rax*2]
sub rdx, [r14+10h]
call get_digit
test al, 1
jnz loc_8EDA0
jmp loc_8EDF1
| long long bfdec_divrem(
__int128 *a1,
__int128 *a2,
long long a3,
long long a4,
long long a5,
unsigned int a6,
int a7)
{
_QWORD *v10; // r15
long long v11; // rcx
long long v12; // rax
int v13; // esi
int v14; // r8d
long long v15; // rcx
long long v16; // rdx
long long v18; // rcx
int v19; // r13d
unsigned __int8 v20; // bp
long long v21; // rcx
int v22; // [rsp+4h] [rbp-C4h]
int v24; // [rsp+Ch] [rbp-BCh]
_QWORD *v26; // [rsp+20h] [rbp-A8h] BYREF
int v27; // [rsp+28h] [rbp-A0h]
unsigned long long v28; // [rsp+30h] [rbp-98h]
__int128 v29; // [rsp+38h] [rbp-90h]
__int128 v30; // [rsp+48h] [rbp-80h] BYREF
long long v31; // [rsp+58h] [rbp-70h]
long long v32; // [rsp+60h] [rbp-68h]
long long v33; // [rsp+68h] [rbp-60h]
__int128 v34; // [rsp+70h] [rbp-58h] BYREF
long long v35; // [rsp+80h] [rbp-48h]
long long v36; // [rsp+88h] [rbp-40h]
long long v37; // [rsp+90h] [rbp-38h]
v10 = *(_QWORD **)a1;
v11 = *(_QWORD *)(a3 + 24);
if ( v11 )
{
v12 = *(_QWORD *)(a4 + 24);
if ( v12 )
{
v13 = *(_DWORD *)(a3 + 8);
v22 = v13 ^ *(_DWORD *)(a4 + 8);
v14 = 0;
switch ( a7 )
{
case 2:
v14 = v13 ^ *(_DWORD *)(a4 + 8);
break;
case 3:
v14 = v22 ^ 1;
break;
case 5:
v14 = 1;
break;
case 6:
v14 = *(_DWORD *)(a3 + 8);
break;
default:
break;
}
v24 = v14;
v35 = *(_QWORD *)(a3 + 16);
v37 = *(_QWORD *)(a3 + 32);
v36 = v11;
DWORD2(v34) = 0;
v31 = *(_QWORD *)(a4 + 16);
v33 = *(_QWORD *)(a4 + 32);
v32 = v12;
DWORD2(v30) = 0;
if ( (int)bf_cmpu(&v34, &v30) < 0 )
{
bfdec_set_ui((_QWORD **)a1, 0LL);
bf_set(a2, (long long)&v34);
}
else
{
bf_op2(a1, &v34, &v30, 0LL, 17LL, (long long ( *)(__int128 *))_bfdec_div);
bfdec_mul((_QWORD **)a2, (long long)a1, (long long)&v30, 0x3FFFFFFFFFFFFFFFLL, 1LL);
bf_op2(a2, &v34, a2, 0x3FFFFFFFFFFFFFFFLL, 1LL, (long long ( *)(__int128 *))_bfdec_sub);
}
if ( *((_QWORD *)a1 + 2) == 0x7FFFFFFFFFFFFFFFLL || *((_QWORD *)a2 + 2) == 0x7FFFFFFFFFFFFFFFLL )
goto LABEL_43;
if ( !*((_QWORD *)a2 + 3) )
goto LABEL_41;
if ( (a7 & 0xFFFFFFFB) != 0 )
{
if ( !v24 )
{
LABEL_41:
*((_DWORD *)a2 + 2) ^= *(_DWORD *)(a3 + 8);
*((_DWORD *)a1 + 2) = v22;
v21 = *((_QWORD *)a2 + 3);
if ( v21 )
return _bfdec_round((_QWORD **)a2, a5, a6, v21);
return 0LL;
}
}
else
{
v26 = v10;
v27 = 0;
v28 = 0x8000000000000000LL;
v29 = 0LL;
if ( (unsigned int)bf_set(&v26, (long long)a2) )
goto LABEL_43;
if ( (unsigned int)bfdec_mul_si(&v26, (long long)&v26, 2LL, 0x3FFFFFFFFFFFFFFFLL, 1u) )
{
if ( v26 && *((_QWORD *)&v29 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD))v26[1])(*v26, *((_QWORD *)&v29 + 1), 0LL);
goto LABEL_43;
}
v19 = bf_cmpu(&v26, (_QWORD *)a4);
if ( v26 && *((_QWORD *)&v29 + 1) )
((void ( *)(_QWORD, _QWORD, _QWORD))v26[1])(*v26, *((_QWORD *)&v29 + 1), 0LL);
if ( v19 <= 0
&& (v19
|| a7 != 4
&& (get_digit(*((_QWORD *)a1 + 4), *((_QWORD *)a1 + 3), 19LL * *((_QWORD *)a1 + 3) - *((_QWORD *)a1 + 2)) & 1) == 0) )
{
goto LABEL_41;
}
}
v20 = bfdec_add_si(a1, a1, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1u);
if ( ((v20 | (unsigned __int8)bf_op2(
a2,
a2,
&v30,
0x3FFFFFFFFFFFFFFFLL,
1LL,
(long long ( *)(__int128 *))_bfdec_sub)) & 0x20) == 0 )
goto LABEL_41;
LABEL_43:
if ( *((_QWORD *)a1 + 3) )
{
*((_QWORD *)a1 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 8LL))(
**(_QWORD **)a1,
*((_QWORD *)a1 + 4),
0LL);
*((_QWORD *)a1 + 3) = 0LL;
}
*((_QWORD *)a1 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a1 + 2) = 0;
if ( *((_QWORD *)a2 + 3) )
{
*((_QWORD *)a2 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a2 + 8LL))(
**(_QWORD **)a2,
*((_QWORD *)a2 + 4),
0LL);
*((_QWORD *)a2 + 3) = 0LL;
}
*((_QWORD *)a2 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a2 + 2) = 0;
return 32LL;
}
}
if ( *((_QWORD *)a1 + 3) )
{
*((_QWORD *)a1 + 4) = ((long long ( *)(_QWORD, _QWORD, _QWORD))v10[1])(*v10, *((_QWORD *)a1 + 4), 0LL);
*((_QWORD *)a1 + 3) = 0LL;
}
*((_QWORD *)a1 + 2) = 0x8000000000000000LL;
*((_DWORD *)a1 + 2) = 0;
v15 = *(_QWORD *)(a3 + 16);
if ( v15 == 0x7FFFFFFFFFFFFFFFLL || (v16 = *(_QWORD *)(a4 + 16), v16 == 0x7FFFFFFFFFFFFFFFLL) )
{
if ( *((_QWORD *)a2 + 3) )
{
*((_QWORD *)a2 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a2 + 8LL))(
**(_QWORD **)a2,
*((_QWORD *)a2 + 4),
0LL);
*((_QWORD *)a2 + 3) = 0LL;
}
*((_QWORD *)a2 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a2 + 2) = 0;
return 0LL;
}
if ( v16 != 0x8000000000000000LL && v15 != 0x7FFFFFFFFFFFFFFELL )
{
bf_set(a2, a3);
v18 = *((_QWORD *)a2 + 3);
if ( v18 )
return _bfdec_round((_QWORD **)a2, a5, a6, v18);
return 0LL;
}
if ( *((_QWORD *)a2 + 3) )
{
*((_QWORD *)a2 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a2 + 8LL))(
**(_QWORD **)a2,
*((_QWORD *)a2 + 4),
0LL);
*((_QWORD *)a2 + 3) = 0LL;
}
*((_QWORD *)a2 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a2 + 2) = 0;
return 1LL;
}
| bfdec_divrem:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV dword ptr [RSP + 0x8],R9D
MOV qword ptr [RSP + 0x18],R8
MOV R13,RCX
MOV R12,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RBP,0x7fffffffffffffff
MOV R15,qword ptr [RDI]
MOV RCX,qword ptr [RDX + 0x18]
TEST RCX,RCX
JZ 0x0018eace
MOV RAX,qword ptr [R13 + 0x18]
TEST RAX,RAX
JZ 0x0018eace
MOV EDI,dword ptr [RSP + 0xd0]
MOV ESI,dword ptr [R12 + 0x8]
MOV EDX,dword ptr [R13 + 0x8]
XOR EDX,ESI
MOV dword ptr [RSP + 0x4],EDX
XOR EDX,EDX
MOV qword ptr [RSP + 0x10],RDI
ADD EDI,-0x2
MOV R8D,0x0
CMP EDI,0x4
JA 0x0018ebaa
LEA R8,[0x1a12c4]
MOVSXD RDI,dword ptr [R8 + RDI*0x4]
ADD RDI,R8
XOR R8D,R8D
switchD:
JMP RDI
caseD_2:
MOV R8D,dword ptr [RSP + 0x4]
JMP 0x0018ebaa
LAB_0018eace:
CMP qword ptr [R14 + 0x18],0x0
JZ 0x0018eaee
MOV RSI,qword ptr [R14 + 0x20]
MOV RDI,qword ptr [R15]
XOR EDX,EDX
CALL qword ptr [R15 + 0x8]
MOV qword ptr [R14 + 0x20],RAX
MOV qword ptr [R14 + 0x18],0x0
LAB_0018eaee:
LEA RAX,[RBP + 0x1]
MOV qword ptr [R14 + 0x10],RAX
MOV dword ptr [R14 + 0x8],0x0
MOV RCX,qword ptr [R12 + 0x10]
CMP RCX,RBP
JZ 0x0018eb11
MOV RDX,qword ptr [R13 + 0x10]
CMP RDX,RBP
JNZ 0x0018eb45
LAB_0018eb11:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018eb33
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018eb33:
MOV qword ptr [RBX + 0x10],RBP
MOV dword ptr [RBX + 0x8],0x0
LAB_0018eb3e:
XOR EAX,EAX
JMP 0x0018ee81
LAB_0018eb45:
LEA RSI,[RBP + -0x1]
CMP RCX,RSI
SETNZ CL
CMP RDX,RAX
SETNZ AL
TEST CL,AL
JNZ 0x0018ed27
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018eb7f
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018eb7f:
MOV qword ptr [RBX + 0x10],RBP
MOV dword ptr [RBX + 0x8],0x0
MOV EAX,0x1
JMP 0x0018ee81
caseD_5:
MOV R8D,0x1
JMP 0x0018ebaa
caseD_3:
MOV R8D,dword ptr [RSP + 0x4]
XOR R8D,0x1
JMP 0x0018ebaa
caseD_6:
MOV R8D,ESI
caseD_4:
MOV dword ptr [RSP + 0xc],R8D
MOV RSI,qword ptr [R12 + 0x10]
LEA RDI,[RSP + 0x70]
MOV qword ptr [RDI + 0x10],RSI
MOV RSI,qword ptr [R12 + 0x20]
MOV qword ptr [RDI + 0x20],RSI
MOV qword ptr [RDI + 0x18],RCX
MOV dword ptr [RDI + 0x8],EDX
MOV RCX,qword ptr [R13 + 0x10]
LEA RSI,[RSP + 0x48]
MOV qword ptr [RSI + 0x10],RCX
MOV RCX,qword ptr [R13 + 0x20]
MOV qword ptr [RSI + 0x20],RCX
MOV qword ptr [RSI + 0x18],RAX
MOV dword ptr [RSI + 0x8],EDX
CALL 0x00184816
TEST EAX,EAX
JS 0x0018ec62
LEA R9,[0x18e662]
LEA RSI,[RSP + 0x70]
LEA RDX,[RSP + 0x48]
MOV RDI,R14
XOR ECX,ECX
MOV R8D,0x11
CALL 0x00186f26
MOV RBP,0x3fffffffffffffff
MOV RDI,RBX
MOV RSI,R14
LEA RDX,[RSP + 0x48]
MOV RCX,RBP
MOV R8D,0x1
CALL 0x0018e208
LEA R9,[0x18e1fd]
MOV RDI,RBX
LEA RSI,[RSP + 0x70]
MOV RDX,RBX
MOV RCX,RBP
MOV RBP,0x7fffffffffffffff
MOV R8D,0x1
CALL 0x00186f26
JMP 0x0018ec79
LAB_0018ec62:
MOV RDI,R14
XOR ESI,ESI
CALL 0x0018e0ab
LEA RSI,[RSP + 0x70]
MOV RDI,RBX
CALL 0x00184079
LAB_0018ec79:
CMP qword ptr [R14 + 0x10],RBP
MOV EAX,dword ptr [RSP + 0xc]
JZ 0x0018ee21
CMP qword ptr [RBX + 0x10],RBP
JZ 0x0018ee21
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018edf1
TEST dword ptr [RSP + 0x10],0xfffffffb
JNZ 0x0018ed61
LEA RDI,[RSP + 0x20]
MOV qword ptr [RDI],R15
MOV dword ptr [RDI + 0x8],0x0
LEA RAX,[RBP + 0x1]
MOV qword ptr [RDI + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOV RSI,RBX
CALL 0x00184079
TEST EAX,EAX
JNZ 0x0018ee21
LEA RDI,[RSP + 0x20]
MOV RCX,0x3fffffffffffffff
MOV EDX,0x2
MOV RSI,RDI
MOV R8D,0x1
CALL 0x0018e529
TEST EAX,EAX
JZ 0x0018ed6a
MOV RAX,qword ptr [RSP + 0x20]
TEST RAX,RAX
JZ 0x0018ee21
MOV RSI,qword ptr [RSP + 0x40]
TEST RSI,RSI
JZ 0x0018ee21
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
JMP 0x0018ee21
LAB_0018ed27:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00184079
MOV RCX,qword ptr [RBX + 0x18]
TEST RCX,RCX
JZ 0x0018eb3e
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x18]
MOV EDX,dword ptr [RSP + 0x8]
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018d7f7
LAB_0018ed61:
TEST EAX,EAX
JNZ 0x0018eda0
JMP 0x0018edf1
LAB_0018ed6a:
LEA R15,[RSP + 0x20]
MOV RDI,R15
MOV RSI,R13
CALL 0x00184816
MOV R13D,EAX
MOV RAX,qword ptr [R15]
TEST RAX,RAX
JZ 0x0018ed97
MOV RSI,qword ptr [RSP + 0x40]
TEST RSI,RSI
JZ 0x0018ed97
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_0018ed97:
TEST R13D,R13D
JLE 0x0018ee93
LAB_0018eda0:
MOV R15,0x3fffffffffffffff
MOV EDX,0x1
MOV RDI,R14
MOV RSI,R14
MOV RCX,R15
MOV R8D,0x1
CALL 0x0018e5bc
MOV R13,RBP
MOV EBP,EAX
LEA R9,[0x18e1fd]
LEA RDX,[RSP + 0x48]
MOV RDI,RBX
MOV RSI,RBX
MOV RCX,R15
MOV R8D,0x1
CALL 0x00186f26
OR EAX,EBP
MOV RBP,R13
TEST AL,0x20
JNZ 0x0018ee21
LAB_0018edf1:
MOV EAX,dword ptr [R12 + 0x8]
XOR dword ptr [RBX + 0x8],EAX
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R14 + 0x8],EAX
MOV RCX,qword ptr [RBX + 0x18]
TEST RCX,RCX
JZ 0x0018eb3e
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x18]
MOV EDX,dword ptr [RSP + 0x8]
CALL 0x0018d7f7
JMP 0x0018ee81
LAB_0018ee21:
CMP qword ptr [R14 + 0x18],0x0
JZ 0x0018ee43
MOV RAX,qword ptr [R14]
MOV RSI,qword ptr [R14 + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [R14 + 0x20],RAX
MOV qword ptr [R14 + 0x18],0x0
LAB_0018ee43:
MOV qword ptr [R14 + 0x10],RBP
MOV dword ptr [R14 + 0x8],0x0
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0018ee71
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_0018ee71:
MOV qword ptr [RBX + 0x10],RBP
MOV dword ptr [RBX + 0x8],0x0
MOV EAX,0x20
LAB_0018ee81:
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018ee93:
JNZ 0x0018edf1
CMP dword ptr [RSP + 0x10],0x4
JZ 0x0018eda0
MOV RSI,qword ptr [R14 + 0x18]
MOV RDI,qword ptr [R14 + 0x20]
LEA RAX,[RSI + RSI*0x8]
LEA RDX,[RSI + RAX*0x2]
SUB RDX,qword ptr [R14 + 0x10]
CALL 0x0018eeca
TEST AL,0x1
JNZ 0x0018eda0
JMP 0x0018edf1
|
int8
bfdec_divrem(long *param_1,long *param_2,long param_3,long param_4,int8 param_5,
int4 param_6,uint param_7)
{
int8 *puVar1;
int iVar2;
uint uVar3;
uint uVar4;
int8 uVar5;
long lVar6;
ulong uVar7;
uint uVar8;
int8 *local_a8;
int4 local_a0;
int8 local_98;
int8 local_90;
long lStack_88;
int1 local_80 [8];
int4 local_78;
int8 local_70;
long local_68;
int8 local_60;
int1 local_58 [8];
int4 local_50;
int8 local_48;
long local_40;
int8 local_38;
puVar1 = (int8 *)*param_1;
local_40 = *(long *)(param_3 + 0x18);
if ((local_40 == 0) || (local_68 = *(long *)(param_4 + 0x18), local_68 == 0)) {
if (param_1[3] != 0) {
lVar6 = (*(code *)puVar1[1])(*puVar1,param_1[4],0);
param_1[4] = lVar6;
param_1[3] = 0;
}
param_1[2] = -0x8000000000000000;
*(int4 *)(param_1 + 1) = 0;
if ((*(long *)(param_3 + 0x10) == 0x7fffffffffffffff) ||
(*(long *)(param_4 + 0x10) == 0x7fffffffffffffff)) {
if (param_2[3] != 0) {
lVar6 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0);
param_2[4] = lVar6;
param_2[3] = 0;
}
param_2[2] = 0x7fffffffffffffff;
*(int4 *)(param_2 + 1) = 0;
return 0;
}
if (*(long *)(param_3 + 0x10) == 0x7ffffffffffffffe ||
*(long *)(param_4 + 0x10) == -0x8000000000000000) {
if (param_2[3] != 0) {
lVar6 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0);
param_2[4] = lVar6;
param_2[3] = 0;
}
param_2[2] = 0x7fffffffffffffff;
*(int4 *)(param_2 + 1) = 0;
return 1;
}
bf_set(param_2,param_3);
if (param_2[3] == 0) {
return 0;
}
uVar5 = __bfdec_round(param_2,param_5,param_6);
return uVar5;
}
uVar8 = *(uint *)(param_4 + 8) ^ *(uint *)(param_3 + 8);
uVar3 = 0;
switch(param_7) {
case 2:
uVar3 = uVar8;
break;
case 3:
uVar3 = uVar8 ^ 1;
break;
case 5:
uVar3 = 1;
break;
case 6:
uVar3 = *(uint *)(param_3 + 8);
}
local_48 = *(int8 *)(param_3 + 0x10);
local_38 = *(int8 *)(param_3 + 0x20);
local_50 = 0;
local_70 = *(int8 *)(param_4 + 0x10);
local_60 = *(int8 *)(param_4 + 0x20);
local_78 = 0;
iVar2 = bf_cmpu();
if (iVar2 < 0) {
bfdec_set_ui(param_1,0);
bf_set(param_2,local_58);
}
else {
bf_op2(param_1,local_58,local_80,0,0x11,__bfdec_div);
bfdec_mul(param_2,param_1,local_80,0x3fffffffffffffff,1);
bf_op2(param_2,local_58,param_2,0x3fffffffffffffff,1,__bfdec_sub);
}
if ((param_1[2] == 0x7fffffffffffffff) || (param_2[2] == 0x7fffffffffffffff)) goto LAB_0018ee21;
if (param_2[3] != 0) {
if ((param_7 & 0xfffffffb) == 0) {
local_a0 = 0;
local_98 = 0x8000000000000000;
local_90 = 0;
lStack_88 = 0;
local_a8 = puVar1;
iVar2 = bf_set(&local_a8,param_2);
if (iVar2 != 0) goto LAB_0018ee21;
iVar2 = bfdec_mul_si(&local_a8,&local_a8,2,0x3fffffffffffffff,1);
if (iVar2 != 0) {
if ((local_a8 != (int8 *)0x0) && (lStack_88 != 0)) {
(*(code *)local_a8[1])(*local_a8,lStack_88,0);
}
goto LAB_0018ee21;
}
iVar2 = bf_cmpu(&local_a8,param_4);
if ((local_a8 != (int8 *)0x0) && (lStack_88 != 0)) {
(*(code *)local_a8[1])(*local_a8,lStack_88,0);
}
if ((iVar2 < 1) &&
((iVar2 != 0 ||
((param_7 != 4 &&
(uVar7 = get_digit(param_1[4],param_1[3],param_1[3] * 0x13 - param_1[2]),
(uVar7 & 1) == 0)))))) goto LAB_0018edf1;
}
else if (uVar3 == 0) goto LAB_0018edf1;
uVar3 = bfdec_add_si(param_1,param_1,1,0x3fffffffffffffff,1);
uVar4 = bf_op2(param_2,param_2,local_80,0x3fffffffffffffff,1,__bfdec_sub);
if (((uVar4 | uVar3) & 0x20) != 0) {
LAB_0018ee21:
if (param_1[3] != 0) {
lVar6 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar6;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
if (param_2[3] != 0) {
lVar6 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0);
param_2[4] = lVar6;
param_2[3] = 0;
}
param_2[2] = 0x7fffffffffffffff;
*(int4 *)(param_2 + 1) = 0;
return 0x20;
}
}
LAB_0018edf1:
*(uint *)(param_2 + 1) = *(uint *)(param_2 + 1) ^ *(uint *)(param_3 + 8);
*(uint *)(param_1 + 1) = uVar8;
if (param_2[3] == 0) {
return 0;
}
uVar5 = __bfdec_round(param_2,param_5,param_6);
return uVar5;
}
|
|
5,784 | bfdec_divrem | bluesky950520[P]quickjs/libbf.c | int bfdec_divrem(bfdec_t *q, bfdec_t *r, const bfdec_t *a, const bfdec_t *b,
limb_t prec, bf_flags_t flags, int rnd_mode)
{
bf_context_t *s = q->ctx;
bfdec_t a1_s, *a1 = &a1_s;
bfdec_t b1_s, *b1 = &b1_s;
bfdec_t r1_s, *r1 = &r1_s;
int q_sign, res;
BOOL is_ceil, is_rndn;
assert(q != a && q != b);
assert(r != a && r != b);
assert(q != r);
if (a->len == 0 || b->len == 0) {
bfdec_set_zero(q, 0);
if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) {
bfdec_set_nan(r);
return 0;
} else if (a->expn == BF_EXP_INF || b->expn == BF_EXP_ZERO) {
bfdec_set_nan(r);
return BF_ST_INVALID_OP;
} else {
bfdec_set(r, a);
return bfdec_round(r, prec, flags);
}
}
q_sign = a->sign ^ b->sign;
is_rndn = (rnd_mode == BF_RNDN || rnd_mode == BF_RNDNA);
switch(rnd_mode) {
default:
case BF_RNDZ:
case BF_RNDN:
case BF_RNDNA:
is_ceil = FALSE;
break;
case BF_RNDD:
is_ceil = q_sign;
break;
case BF_RNDU:
is_ceil = q_sign ^ 1;
break;
case BF_RNDA:
is_ceil = TRUE;
break;
case BF_DIVREM_EUCLIDIAN:
is_ceil = a->sign;
break;
}
a1->expn = a->expn;
a1->tab = a->tab;
a1->len = a->len;
a1->sign = 0;
b1->expn = b->expn;
b1->tab = b->tab;
b1->len = b->len;
b1->sign = 0;
// bfdec_print_str("a1", a1);
// bfdec_print_str("b1", b1);
/* XXX: could improve to avoid having a large 'q' */
bfdec_tdivremu(s, q, r, a1, b1);
if (bfdec_is_nan(q) || bfdec_is_nan(r))
goto fail;
// bfdec_print_str("q", q);
// bfdec_print_str("r", r);
if (r->len != 0) {
if (is_rndn) {
bfdec_init(s, r1);
if (bfdec_set(r1, r))
goto fail;
if (bfdec_mul_si(r1, r1, 2, BF_PREC_INF, BF_RNDZ)) {
bfdec_delete(r1);
goto fail;
}
res = bfdec_cmpu(r1, b);
bfdec_delete(r1);
if (res > 0 ||
(res == 0 &&
(rnd_mode == BF_RNDNA ||
(get_digit(q->tab, q->len, q->len * LIMB_DIGITS - q->expn) & 1) != 0))) {
goto do_sub_r;
}
} else if (is_ceil) {
do_sub_r:
res = bfdec_add_si(q, q, 1, BF_PREC_INF, BF_RNDZ);
res |= bfdec_sub(r, r, b1, BF_PREC_INF, BF_RNDZ);
if (res & BF_ST_MEM_ERROR)
goto fail;
}
}
r->sign ^= a->sign;
q->sign = q_sign;
return bfdec_round(r, prec, flags);
fail:
bfdec_set_nan(q);
bfdec_set_nan(r);
return BF_ST_MEM_ERROR;
} | O3 | c | bfdec_divrem:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r9d, 0x8(%rsp)
movq %r8, 0x18(%rsp)
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movabsq $0x7fffffffffffffff, %rbp # imm = 0x7FFFFFFFFFFFFFFF
movq (%rdi), %r15
movq 0x18(%rdx), %rcx
testq %rcx, %rcx
je 0x91587
movq 0x18(%r13), %rax
testq %rax, %rax
je 0x91587
movl 0xd0(%rsp), %edi
movl 0x8(%r12), %esi
movl 0x8(%r13), %edx
xorl %esi, %edx
movl %edx, 0x4(%rsp)
xorl %edx, %edx
movq %rdi, 0x10(%rsp)
addl $-0x2, %edi
movl $0x0, %r8d
cmpl $0x4, %edi
ja 0x91663
leaq 0x12d03(%rip), %r8 # 0xa4274
movslq (%r8,%rdi,4), %rdi
addq %r8, %rdi
xorl %r8d, %r8d
jmpq *%rdi
movl 0x4(%rsp), %r8d
jmp 0x91663
cmpq $0x0, 0x18(%r14)
je 0x915a7
movq 0x20(%r14), %rsi
movq (%r15), %rdi
xorl %edx, %edx
callq *0x8(%r15)
movq %rax, 0x20(%r14)
movq $0x0, 0x18(%r14)
leaq 0x1(%rbp), %rax
movq %rax, 0x10(%r14)
movl $0x0, 0x8(%r14)
movq 0x10(%r12), %rcx
cmpq %rbp, %rcx
je 0x915ca
movq 0x10(%r13), %rdx
cmpq %rbp, %rdx
jne 0x915fe
cmpq $0x0, 0x18(%rbx)
je 0x915ec
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %rbp, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
xorl %eax, %eax
jmp 0x91941
leaq -0x1(%rbp), %rsi
cmpq %rsi, %rcx
setne %cl
cmpq %rax, %rdx
setne %al
testb %al, %cl
jne 0x917e2
cmpq $0x0, 0x18(%rbx)
je 0x91638
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %rbp, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x1, %eax
jmp 0x91941
movl $0x1, %r8d
jmp 0x91663
movl 0x4(%rsp), %r8d
xorl $0x1, %r8d
jmp 0x91663
movl %esi, %r8d
movl %r8d, 0xc(%rsp)
movq 0x10(%r12), %rsi
leaq 0x70(%rsp), %rdi
movq %rsi, 0x10(%rdi)
movq 0x20(%r12), %rsi
movq %rsi, 0x20(%rdi)
movq %rcx, 0x18(%rdi)
movl %edx, 0x8(%rdi)
movq 0x10(%r13), %rcx
leaq 0x48(%rsp), %rsi
movq %rcx, 0x10(%rsi)
movq 0x20(%r13), %rcx
movq %rcx, 0x20(%rsi)
movq %rax, 0x18(%rsi)
movl %edx, 0x8(%rsi)
callq 0x87224
testl %eax, %eax
js 0x9171b
leaq -0x54f(%rip), %r9 # 0x91163
leaq 0x70(%rsp), %rsi
leaq 0x48(%rsp), %rdx
movq %r14, %rdi
xorl %ecx, %ecx
movl $0x11, %r8d
callq 0x899fd
movabsq $0x3fffffffffffffff, %rbp # imm = 0x3FFFFFFFFFFFFFFF
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x48(%rsp), %rdx
movq %rbp, %rcx
movl $0x1, %r8d
callq 0x90cfb
leaq -0xa06(%rip), %r9 # 0x90cf0
movq %rbx, %rdi
leaq 0x70(%rsp), %rsi
movq %rbx, %rdx
movq %rbp, %rcx
movabsq $0x7fffffffffffffff, %rbp # imm = 0x7FFFFFFFFFFFFFFF
movl $0x1, %r8d
callq 0x899fd
jmp 0x91732
movq %r14, %rdi
xorl %esi, %esi
callq 0x90b9e
leaq 0x70(%rsp), %rsi
movq %rbx, %rdi
callq 0x86a9a
cmpq %rbp, 0x10(%r14)
movl 0xc(%rsp), %eax
je 0x918e1
cmpq %rbp, 0x10(%rbx)
je 0x918e1
cmpq $0x0, 0x18(%rbx)
je 0x918b1
testl $0xfffffffb, 0x10(%rsp) # imm = 0xFFFFFFFB
jne 0x9181c
leaq 0x20(%rsp), %rdi
movq %r15, (%rdi)
movl $0x0, 0x8(%rdi)
leaq 0x1(%rbp), %rax
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movq %rbx, %rsi
callq 0x86a9a
testl %eax, %eax
jne 0x918e1
leaq 0x20(%rsp), %rdi
movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x2, %edx
movq %rdi, %rsi
movl $0x1, %r8d
callq 0x91020
testl %eax, %eax
je 0x91825
movq 0x20(%rsp), %rax
movq 0x40(%rsp), %rsi
testq %rax, %rax
sete %cl
testq %rsi, %rsi
sete %dl
orb %cl, %dl
jne 0x918e1
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
jmp 0x918e1
movq %rbx, %rdi
movq %r12, %rsi
callq 0x86a9a
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x915f7
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movl 0x8(%rsp), %edx
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9027b
testl %eax, %eax
jne 0x91860
jmp 0x918b1
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x87224
movl %eax, %r13d
movq (%r15), %rax
movq 0x20(%r15), %rsi
testq %rax, %rax
sete %cl
testq %rsi, %rsi
sete %dl
orb %cl, %dl
jne 0x91857
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
testl %r13d, %r13d
jle 0x91953
movabsq $0x3fffffffffffffff, %r15 # imm = 0x3FFFFFFFFFFFFFFF
movl $0x1, %edx
movq %r14, %rdi
movq %r14, %rsi
movq %r15, %rcx
movl $0x1, %r8d
callq 0x910b8
movq %rbp, %r13
movl %eax, %ebp
leaq -0xb9f(%rip), %r9 # 0x90cf0
leaq 0x48(%rsp), %rdx
movq %rbx, %rdi
movq %rbx, %rsi
movq %r15, %rcx
movl $0x1, %r8d
callq 0x899fd
orl %ebp, %eax
movq %r13, %rbp
testb $0x20, %al
jne 0x918e1
movl 0x8(%r12), %eax
xorl %eax, 0x8(%rbx)
movl 0x4(%rsp), %eax
movl %eax, 0x8(%r14)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x915f7
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movl 0x8(%rsp), %edx
callq 0x9027b
jmp 0x91941
cmpq $0x0, 0x18(%r14)
je 0x91903
movq (%r14), %rax
movq 0x20(%r14), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%r14)
movq $0x0, 0x18(%r14)
movq %rbp, 0x10(%r14)
movl $0x0, 0x8(%r14)
cmpq $0x0, 0x18(%rbx)
je 0x91931
movq (%rbx), %rax
movq 0x20(%rbx), %rsi
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq %rax, 0x20(%rbx)
movq $0x0, 0x18(%rbx)
movq %rbp, 0x10(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x20, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jne 0x918b1
cmpl $0x4, 0x10(%rsp)
je 0x91860
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
leaq (%rsi,%rsi,8), %rax
leaq (%rsi,%rax,2), %rdx
subq 0x10(%r14), %rdx
callq 0x9198a
testb $0x1, %al
jne 0x91860
jmp 0x918b1
| bfdec_divrem:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov [rsp+0C8h+var_C0], r9d
mov [rsp+0C8h+var_B0], r8
mov r13, rcx
mov r12, rdx
mov rbx, rsi
mov r14, rdi
mov rbp, 7FFFFFFFFFFFFFFFh
mov r15, [rdi]
mov rcx, [rdx+18h]
test rcx, rcx
jz short loc_91587
mov rax, [r13+18h]
test rax, rax
jz short loc_91587
mov edi, [rsp+0C8h+arg_0]
mov esi, [r12+8]
mov edx, [r13+8]
xor edx, esi
mov [rsp+0C8h+var_C4], edx
xor edx, edx
mov [rsp+0C8h+var_B8], rdi
add edi, 0FFFFFFFEh; switch 5 cases
mov r8d, 0
cmp edi, 4
ja def_9157B; jumptable 000000000009157B default case, case 4
lea r8, jpt_9157B
movsxd rdi, ds:(jpt_9157B - 0A4274h)[r8+rdi*4]
add rdi, r8
xor r8d, r8d
jmp rdi; switch jump
loc_9157D:
mov r8d, [rsp+0C8h+var_C4]; jumptable 000000000009157B case 2
jmp def_9157B; jumptable 000000000009157B default case, case 4
loc_91587:
cmp qword ptr [r14+18h], 0
jz short loc_915A7
mov rsi, [r14+20h]
mov rdi, [r15]
xor edx, edx
call qword ptr [r15+8]
mov [r14+20h], rax
mov qword ptr [r14+18h], 0
loc_915A7:
lea rax, [rbp+1]
mov [r14+10h], rax
mov dword ptr [r14+8], 0
mov rcx, [r12+10h]
cmp rcx, rbp
jz short loc_915CA
mov rdx, [r13+10h]
cmp rdx, rbp
jnz short loc_915FE
loc_915CA:
cmp qword ptr [rbx+18h], 0
jz short loc_915EC
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_915EC:
mov [rbx+10h], rbp
mov dword ptr [rbx+8], 0
loc_915F7:
xor eax, eax
jmp loc_91941
loc_915FE:
lea rsi, [rbp-1]
cmp rcx, rsi
setnz cl
cmp rdx, rax
setnz al
test cl, al
jnz loc_917E2
cmp qword ptr [rbx+18h], 0
jz short loc_91638
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_91638:
mov [rbx+10h], rbp
mov dword ptr [rbx+8], 0
mov eax, 1
jmp loc_91941
loc_9164D:
mov r8d, 1; jumptable 000000000009157B case 5
jmp short def_9157B; jumptable 000000000009157B default case, case 4
loc_91655:
mov r8d, [rsp+0C8h+var_C4]; jumptable 000000000009157B case 3
xor r8d, 1
jmp short def_9157B; jumptable 000000000009157B default case, case 4
loc_91660:
mov r8d, esi; jumptable 000000000009157B case 6
def_9157B:
mov [rsp+0C8h+var_BC], r8d; jumptable 000000000009157B default case, case 4
mov rsi, [r12+10h]
lea rdi, [rsp+0C8h+var_58]
mov [rdi+10h], rsi
mov rsi, [r12+20h]
mov [rdi+20h], rsi
mov [rdi+18h], rcx
mov [rdi+8], edx
mov rcx, [r13+10h]
lea rsi, [rsp+0C8h+var_80]
mov [rsi+10h], rcx
mov rcx, [r13+20h]
mov [rsi+20h], rcx
mov [rsi+18h], rax
mov [rsi+8], edx
call bf_cmpu
test eax, eax
js short loc_9171B
lea r9, __bfdec_div
lea rsi, [rsp+0C8h+var_58]
lea rdx, [rsp+0C8h+var_80]
mov rdi, r14
xor ecx, ecx
mov r8d, 11h
call bf_op2
mov rbp, 3FFFFFFFFFFFFFFFh
mov rdi, rbx
mov rsi, r14
lea rdx, [rsp+0C8h+var_80]
mov rcx, rbp
mov r8d, 1
call bfdec_mul
lea r9, __bfdec_sub
mov rdi, rbx
lea rsi, [rsp+0C8h+var_58]
mov rdx, rbx
mov rcx, rbp
mov rbp, 7FFFFFFFFFFFFFFFh
mov r8d, 1
call bf_op2
jmp short loc_91732
loc_9171B:
mov rdi, r14
xor esi, esi
call bfdec_set_ui
lea rsi, [rsp+0C8h+var_58]
mov rdi, rbx
call bf_set
loc_91732:
cmp [r14+10h], rbp
mov eax, [rsp+0C8h+var_BC]
jz loc_918E1
cmp [rbx+10h], rbp
jz loc_918E1
cmp qword ptr [rbx+18h], 0
jz loc_918B1
test dword ptr [rsp+0C8h+var_B8], 0FFFFFFFBh
jnz loc_9181C
lea rdi, [rsp+0C8h+var_A8]
mov [rdi], r15
mov dword ptr [rdi+8], 0
lea rax, [rbp+1]
mov [rdi+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [rdi+18h], xmm0
mov rsi, rbx
call bf_set
test eax, eax
jnz loc_918E1
lea rdi, [rsp+0C8h+var_A8]
mov rcx, 3FFFFFFFFFFFFFFFh
mov edx, 2
mov rsi, rdi
mov r8d, 1
call bfdec_mul_si
test eax, eax
jz short loc_91825
mov rax, [rsp+0C8h+var_A8]
mov rsi, [rsp+0C8h+var_88]
test rax, rax
setz cl
test rsi, rsi
setz dl
or dl, cl
jnz loc_918E1
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
jmp loc_918E1
loc_917E2:
mov rdi, rbx
mov rsi, r12
call bf_set
mov rcx, [rbx+18h]
test rcx, rcx
jz loc_915F7
mov rdi, rbx
mov rsi, [rsp+0C8h+var_B0]
mov edx, [rsp+0C8h+var_C0]
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp __bfdec_round
loc_9181C:
test eax, eax
jnz short loc_91860
jmp loc_918B1
loc_91825:
lea r15, [rsp+0C8h+var_A8]
mov rdi, r15
mov rsi, r13
call bf_cmpu
mov r13d, eax
mov rax, [r15]
mov rsi, [r15+20h]
test rax, rax
setz cl
test rsi, rsi
setz dl
or dl, cl
jnz short loc_91857
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_91857:
test r13d, r13d
jle loc_91953
loc_91860:
mov r15, 3FFFFFFFFFFFFFFFh
mov edx, 1
mov rdi, r14
mov rsi, r14
mov rcx, r15
mov r8d, 1
call bfdec_add_si
mov r13, rbp
mov ebp, eax
lea r9, __bfdec_sub
lea rdx, [rsp+0C8h+var_80]
mov rdi, rbx
mov rsi, rbx
mov rcx, r15
mov r8d, 1
call bf_op2
or eax, ebp
mov rbp, r13
test al, 20h
jnz short loc_918E1
loc_918B1:
mov eax, [r12+8]
xor [rbx+8], eax
mov eax, [rsp+0C8h+var_C4]
mov [r14+8], eax
mov rcx, [rbx+18h]
test rcx, rcx
jz loc_915F7
mov rdi, rbx
mov rsi, [rsp+0C8h+var_B0]
mov edx, [rsp+0C8h+var_C0]
call __bfdec_round
jmp short loc_91941
loc_918E1:
cmp qword ptr [r14+18h], 0
jz short loc_91903
mov rax, [r14]
mov rsi, [r14+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [r14+20h], rax
mov qword ptr [r14+18h], 0
loc_91903:
mov [r14+10h], rbp
mov dword ptr [r14+8], 0
cmp qword ptr [rbx+18h], 0
jz short loc_91931
mov rax, [rbx]
mov rsi, [rbx+20h]
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
mov [rbx+20h], rax
mov qword ptr [rbx+18h], 0
loc_91931:
mov [rbx+10h], rbp
mov dword ptr [rbx+8], 0
mov eax, 20h ; ' '
loc_91941:
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_91953:
jnz loc_918B1
cmp dword ptr [rsp+0C8h+var_B8], 4
jz loc_91860
mov rsi, [r14+18h]
mov rdi, [r14+20h]
lea rax, [rsi+rsi*8]
lea rdx, [rsi+rax*2]
sub rdx, [r14+10h]
call get_digit
test al, 1
jnz loc_91860
jmp loc_918B1
| long long bfdec_divrem(
__int128 *a1,
__int128 *a2,
long long a3,
long long a4,
long long a5,
unsigned int a6,
int a7)
{
_QWORD *v10; // r15
long long v11; // rcx
long long v12; // rax
int v13; // esi
int v14; // r8d
long long v15; // rcx
long long v16; // rdx
long long v18; // rcx
int v19; // r13d
unsigned __int8 v20; // bp
long long v21; // rcx
int v22; // [rsp+4h] [rbp-C4h]
int v24; // [rsp+Ch] [rbp-BCh]
_QWORD *v26; // [rsp+20h] [rbp-A8h] BYREF
int v27; // [rsp+28h] [rbp-A0h]
unsigned long long v28; // [rsp+30h] [rbp-98h]
__int128 v29; // [rsp+38h] [rbp-90h]
__int128 v30; // [rsp+48h] [rbp-80h] BYREF
long long v31; // [rsp+58h] [rbp-70h]
long long v32; // [rsp+60h] [rbp-68h]
long long v33; // [rsp+68h] [rbp-60h]
__int128 v34; // [rsp+70h] [rbp-58h] BYREF
long long v35; // [rsp+80h] [rbp-48h]
long long v36; // [rsp+88h] [rbp-40h]
long long v37; // [rsp+90h] [rbp-38h]
v10 = *(_QWORD **)a1;
v11 = *(_QWORD *)(a3 + 24);
if ( v11 )
{
v12 = *(_QWORD *)(a4 + 24);
if ( v12 )
{
v13 = *(_DWORD *)(a3 + 8);
v22 = v13 ^ *(_DWORD *)(a4 + 8);
v14 = 0;
switch ( a7 )
{
case 2:
v14 = v13 ^ *(_DWORD *)(a4 + 8);
break;
case 3:
v14 = v22 ^ 1;
break;
case 5:
v14 = 1;
break;
case 6:
v14 = *(_DWORD *)(a3 + 8);
break;
default:
break;
}
v24 = v14;
v35 = *(_QWORD *)(a3 + 16);
v37 = *(_QWORD *)(a3 + 32);
v36 = v11;
DWORD2(v34) = 0;
v31 = *(_QWORD *)(a4 + 16);
v33 = *(_QWORD *)(a4 + 32);
v32 = v12;
DWORD2(v30) = 0;
if ( (int)bf_cmpu(&v34, &v30) < 0 )
{
bfdec_set_ui((_QWORD **)a1, 0LL);
bf_set(a2, (long long)&v34);
}
else
{
bf_op2(a1, &v34, &v30, 0LL, 17LL, (long long ( *)(__int128 *))_bfdec_div);
bfdec_mul((long long)a2, (long long)a1, (long long)&v30, 0x3FFFFFFFFFFFFFFFLL, 1LL);
bf_op2(a2, &v34, a2, 0x3FFFFFFFFFFFFFFFLL, 1LL, (long long ( *)(__int128 *))_bfdec_sub);
}
if ( *((_QWORD *)a1 + 2) == 0x7FFFFFFFFFFFFFFFLL || *((_QWORD *)a2 + 2) == 0x7FFFFFFFFFFFFFFFLL )
goto LABEL_41;
if ( !*((_QWORD *)a2 + 3) )
goto LABEL_39;
if ( (a7 & 0xFFFFFFFB) != 0 )
{
if ( !v24 )
{
LABEL_39:
*((_DWORD *)a2 + 2) ^= *(_DWORD *)(a3 + 8);
*((_DWORD *)a1 + 2) = v22;
v21 = *((_QWORD *)a2 + 3);
if ( v21 )
return _bfdec_round((long long)a2, a5, a6, v21);
return 0LL;
}
}
else
{
v26 = v10;
v27 = 0;
v28 = 0x8000000000000000LL;
v29 = 0LL;
if ( (unsigned int)bf_set(&v26, (long long)a2) )
goto LABEL_41;
if ( (unsigned int)bfdec_mul_si((long long *)&v26, (long long)&v26, 2LL, 0x3FFFFFFFFFFFFFFFLL, 1u) )
{
if ( v26 != 0LL && *((_QWORD *)&v29 + 1) != 0LL )
((void ( *)(_QWORD, _QWORD, _QWORD))v26[1])(*v26, *((_QWORD *)&v29 + 1), 0LL);
goto LABEL_41;
}
v19 = bf_cmpu(&v26, (_QWORD *)a4);
if ( v26 != 0LL && *((_QWORD *)&v29 + 1) != 0LL )
((void ( *)(_QWORD, _QWORD, _QWORD))v26[1])(*v26, *((_QWORD *)&v29 + 1), 0LL);
if ( v19 <= 0
&& (v19
|| a7 != 4
&& (get_digit(*((_QWORD *)a1 + 4), *((_QWORD *)a1 + 3), 19LL * *((_QWORD *)a1 + 3) - *((_QWORD *)a1 + 2)) & 1) == 0) )
{
goto LABEL_39;
}
}
v20 = bfdec_add_si(a1, a1, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1u);
if ( ((v20 | (unsigned __int8)bf_op2(
a2,
a2,
&v30,
0x3FFFFFFFFFFFFFFFLL,
1LL,
(long long ( *)(__int128 *))_bfdec_sub)) & 0x20) == 0 )
goto LABEL_39;
LABEL_41:
if ( *((_QWORD *)a1 + 3) )
{
*((_QWORD *)a1 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 8LL))(
**(_QWORD **)a1,
*((_QWORD *)a1 + 4),
0LL);
*((_QWORD *)a1 + 3) = 0LL;
}
*((_QWORD *)a1 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a1 + 2) = 0;
if ( *((_QWORD *)a2 + 3) )
{
*((_QWORD *)a2 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a2 + 8LL))(
**(_QWORD **)a2,
*((_QWORD *)a2 + 4),
0LL);
*((_QWORD *)a2 + 3) = 0LL;
}
*((_QWORD *)a2 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a2 + 2) = 0;
return 32LL;
}
}
if ( *((_QWORD *)a1 + 3) )
{
*((_QWORD *)a1 + 4) = ((long long ( *)(_QWORD, _QWORD, _QWORD))v10[1])(*v10, *((_QWORD *)a1 + 4), 0LL);
*((_QWORD *)a1 + 3) = 0LL;
}
*((_QWORD *)a1 + 2) = 0x8000000000000000LL;
*((_DWORD *)a1 + 2) = 0;
v15 = *(_QWORD *)(a3 + 16);
if ( v15 == 0x7FFFFFFFFFFFFFFFLL || (v16 = *(_QWORD *)(a4 + 16), v16 == 0x7FFFFFFFFFFFFFFFLL) )
{
if ( *((_QWORD *)a2 + 3) )
{
*((_QWORD *)a2 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a2 + 8LL))(
**(_QWORD **)a2,
*((_QWORD *)a2 + 4),
0LL);
*((_QWORD *)a2 + 3) = 0LL;
}
*((_QWORD *)a2 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a2 + 2) = 0;
return 0LL;
}
if ( v16 != 0x8000000000000000LL && v15 != 0x7FFFFFFFFFFFFFFELL )
{
bf_set(a2, a3);
v18 = *((_QWORD *)a2 + 3);
if ( v18 )
return _bfdec_round((long long)a2, a5, a6, v18);
return 0LL;
}
if ( *((_QWORD *)a2 + 3) )
{
*((_QWORD *)a2 + 4) = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)a2 + 8LL))(
**(_QWORD **)a2,
*((_QWORD *)a2 + 4),
0LL);
*((_QWORD *)a2 + 3) = 0LL;
}
*((_QWORD *)a2 + 2) = 0x7FFFFFFFFFFFFFFFLL;
*((_DWORD *)a2 + 2) = 0;
return 1LL;
}
| bfdec_divrem:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV dword ptr [RSP + 0x8],R9D
MOV qword ptr [RSP + 0x18],R8
MOV R13,RCX
MOV R12,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RBP,0x7fffffffffffffff
MOV R15,qword ptr [RDI]
MOV RCX,qword ptr [RDX + 0x18]
TEST RCX,RCX
JZ 0x00191587
MOV RAX,qword ptr [R13 + 0x18]
TEST RAX,RAX
JZ 0x00191587
MOV EDI,dword ptr [RSP + 0xd0]
MOV ESI,dword ptr [R12 + 0x8]
MOV EDX,dword ptr [R13 + 0x8]
XOR EDX,ESI
MOV dword ptr [RSP + 0x4],EDX
XOR EDX,EDX
MOV qword ptr [RSP + 0x10],RDI
ADD EDI,-0x2
MOV R8D,0x0
CMP EDI,0x4
JA 0x00191663
LEA R8,[0x1a4274]
MOVSXD RDI,dword ptr [R8 + RDI*0x4]
ADD RDI,R8
XOR R8D,R8D
switchD:
JMP RDI
caseD_2:
MOV R8D,dword ptr [RSP + 0x4]
JMP 0x00191663
LAB_00191587:
CMP qword ptr [R14 + 0x18],0x0
JZ 0x001915a7
MOV RSI,qword ptr [R14 + 0x20]
MOV RDI,qword ptr [R15]
XOR EDX,EDX
CALL qword ptr [R15 + 0x8]
MOV qword ptr [R14 + 0x20],RAX
MOV qword ptr [R14 + 0x18],0x0
LAB_001915a7:
LEA RAX,[RBP + 0x1]
MOV qword ptr [R14 + 0x10],RAX
MOV dword ptr [R14 + 0x8],0x0
MOV RCX,qword ptr [R12 + 0x10]
CMP RCX,RBP
JZ 0x001915ca
MOV RDX,qword ptr [R13 + 0x10]
CMP RDX,RBP
JNZ 0x001915fe
LAB_001915ca:
CMP qword ptr [RBX + 0x18],0x0
JZ 0x001915ec
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_001915ec:
MOV qword ptr [RBX + 0x10],RBP
MOV dword ptr [RBX + 0x8],0x0
LAB_001915f7:
XOR EAX,EAX
JMP 0x00191941
LAB_001915fe:
LEA RSI,[RBP + -0x1]
CMP RCX,RSI
SETNZ CL
CMP RDX,RAX
SETNZ AL
TEST CL,AL
JNZ 0x001917e2
CMP qword ptr [RBX + 0x18],0x0
JZ 0x00191638
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_00191638:
MOV qword ptr [RBX + 0x10],RBP
MOV dword ptr [RBX + 0x8],0x0
MOV EAX,0x1
JMP 0x00191941
caseD_5:
MOV R8D,0x1
JMP 0x00191663
caseD_3:
MOV R8D,dword ptr [RSP + 0x4]
XOR R8D,0x1
JMP 0x00191663
caseD_6:
MOV R8D,ESI
caseD_4:
MOV dword ptr [RSP + 0xc],R8D
MOV RSI,qword ptr [R12 + 0x10]
LEA RDI,[RSP + 0x70]
MOV qword ptr [RDI + 0x10],RSI
MOV RSI,qword ptr [R12 + 0x20]
MOV qword ptr [RDI + 0x20],RSI
MOV qword ptr [RDI + 0x18],RCX
MOV dword ptr [RDI + 0x8],EDX
MOV RCX,qword ptr [R13 + 0x10]
LEA RSI,[RSP + 0x48]
MOV qword ptr [RSI + 0x10],RCX
MOV RCX,qword ptr [R13 + 0x20]
MOV qword ptr [RSI + 0x20],RCX
MOV qword ptr [RSI + 0x18],RAX
MOV dword ptr [RSI + 0x8],EDX
CALL 0x00187224
TEST EAX,EAX
JS 0x0019171b
LEA R9,[0x191163]
LEA RSI,[RSP + 0x70]
LEA RDX,[RSP + 0x48]
MOV RDI,R14
XOR ECX,ECX
MOV R8D,0x11
CALL 0x001899fd
MOV RBP,0x3fffffffffffffff
MOV RDI,RBX
MOV RSI,R14
LEA RDX,[RSP + 0x48]
MOV RCX,RBP
MOV R8D,0x1
CALL 0x00190cfb
LEA R9,[0x190cf0]
MOV RDI,RBX
LEA RSI,[RSP + 0x70]
MOV RDX,RBX
MOV RCX,RBP
MOV RBP,0x7fffffffffffffff
MOV R8D,0x1
CALL 0x001899fd
JMP 0x00191732
LAB_0019171b:
MOV RDI,R14
XOR ESI,ESI
CALL 0x00190b9e
LEA RSI,[RSP + 0x70]
MOV RDI,RBX
CALL 0x00186a9a
LAB_00191732:
CMP qword ptr [R14 + 0x10],RBP
MOV EAX,dword ptr [RSP + 0xc]
JZ 0x001918e1
CMP qword ptr [RBX + 0x10],RBP
JZ 0x001918e1
CMP qword ptr [RBX + 0x18],0x0
JZ 0x001918b1
TEST dword ptr [RSP + 0x10],0xfffffffb
JNZ 0x0019181c
LEA RDI,[RSP + 0x20]
MOV qword ptr [RDI],R15
MOV dword ptr [RDI + 0x8],0x0
LEA RAX,[RBP + 0x1]
MOV qword ptr [RDI + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOV RSI,RBX
CALL 0x00186a9a
TEST EAX,EAX
JNZ 0x001918e1
LEA RDI,[RSP + 0x20]
MOV RCX,0x3fffffffffffffff
MOV EDX,0x2
MOV RSI,RDI
MOV R8D,0x1
CALL 0x00191020
TEST EAX,EAX
JZ 0x00191825
MOV RAX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x40]
TEST RAX,RAX
SETZ CL
TEST RSI,RSI
SETZ DL
OR DL,CL
JNZ 0x001918e1
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
JMP 0x001918e1
LAB_001917e2:
MOV RDI,RBX
MOV RSI,R12
CALL 0x00186a9a
MOV RCX,qword ptr [RBX + 0x18]
TEST RCX,RCX
JZ 0x001915f7
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x18]
MOV EDX,dword ptr [RSP + 0x8]
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0019027b
LAB_0019181c:
TEST EAX,EAX
JNZ 0x00191860
JMP 0x001918b1
LAB_00191825:
LEA R15,[RSP + 0x20]
MOV RDI,R15
MOV RSI,R13
CALL 0x00187224
MOV R13D,EAX
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [R15 + 0x20]
TEST RAX,RAX
SETZ CL
TEST RSI,RSI
SETZ DL
OR DL,CL
JNZ 0x00191857
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
LAB_00191857:
TEST R13D,R13D
JLE 0x00191953
LAB_00191860:
MOV R15,0x3fffffffffffffff
MOV EDX,0x1
MOV RDI,R14
MOV RSI,R14
MOV RCX,R15
MOV R8D,0x1
CALL 0x001910b8
MOV R13,RBP
MOV EBP,EAX
LEA R9,[0x190cf0]
LEA RDX,[RSP + 0x48]
MOV RDI,RBX
MOV RSI,RBX
MOV RCX,R15
MOV R8D,0x1
CALL 0x001899fd
OR EAX,EBP
MOV RBP,R13
TEST AL,0x20
JNZ 0x001918e1
LAB_001918b1:
MOV EAX,dword ptr [R12 + 0x8]
XOR dword ptr [RBX + 0x8],EAX
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [R14 + 0x8],EAX
MOV RCX,qword ptr [RBX + 0x18]
TEST RCX,RCX
JZ 0x001915f7
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x18]
MOV EDX,dword ptr [RSP + 0x8]
CALL 0x0019027b
JMP 0x00191941
LAB_001918e1:
CMP qword ptr [R14 + 0x18],0x0
JZ 0x00191903
MOV RAX,qword ptr [R14]
MOV RSI,qword ptr [R14 + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [R14 + 0x20],RAX
MOV qword ptr [R14 + 0x18],0x0
LAB_00191903:
MOV qword ptr [R14 + 0x10],RBP
MOV dword ptr [R14 + 0x8],0x0
CMP qword ptr [RBX + 0x18],0x0
JZ 0x00191931
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RAX]
XOR EDX,EDX
CALL qword ptr [RAX + 0x8]
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],0x0
LAB_00191931:
MOV qword ptr [RBX + 0x10],RBP
MOV dword ptr [RBX + 0x8],0x0
MOV EAX,0x20
LAB_00191941:
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00191953:
JNZ 0x001918b1
CMP dword ptr [RSP + 0x10],0x4
JZ 0x00191860
MOV RSI,qword ptr [R14 + 0x18]
MOV RDI,qword ptr [R14 + 0x20]
LEA RAX,[RSI + RSI*0x8]
LEA RDX,[RSI + RAX*0x2]
SUB RDX,qword ptr [R14 + 0x10]
CALL 0x0019198a
TEST AL,0x1
JNZ 0x00191860
JMP 0x001918b1
|
int8
bfdec_divrem(long *param_1,long *param_2,long param_3,long param_4,int8 param_5,
int4 param_6,uint param_7)
{
int8 *puVar1;
int iVar2;
uint uVar3;
uint uVar4;
int8 uVar5;
long lVar6;
ulong uVar7;
uint uVar8;
int8 *local_a8;
int4 local_a0;
int8 local_98;
int8 local_90;
long lStack_88;
int1 local_80 [8];
int4 local_78;
int8 local_70;
long local_68;
int8 local_60;
int1 local_58 [8];
int4 local_50;
int8 local_48;
long local_40;
int8 local_38;
puVar1 = (int8 *)*param_1;
local_40 = *(long *)(param_3 + 0x18);
if ((local_40 == 0) || (local_68 = *(long *)(param_4 + 0x18), local_68 == 0)) {
if (param_1[3] != 0) {
lVar6 = (*(code *)puVar1[1])(*puVar1,param_1[4],0);
param_1[4] = lVar6;
param_1[3] = 0;
}
param_1[2] = -0x8000000000000000;
*(int4 *)(param_1 + 1) = 0;
if ((*(long *)(param_3 + 0x10) == 0x7fffffffffffffff) ||
(*(long *)(param_4 + 0x10) == 0x7fffffffffffffff)) {
if (param_2[3] != 0) {
lVar6 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0);
param_2[4] = lVar6;
param_2[3] = 0;
}
param_2[2] = 0x7fffffffffffffff;
*(int4 *)(param_2 + 1) = 0;
return 0;
}
if (*(long *)(param_3 + 0x10) == 0x7ffffffffffffffe ||
*(long *)(param_4 + 0x10) == -0x8000000000000000) {
if (param_2[3] != 0) {
lVar6 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0);
param_2[4] = lVar6;
param_2[3] = 0;
}
param_2[2] = 0x7fffffffffffffff;
*(int4 *)(param_2 + 1) = 0;
return 1;
}
bf_set(param_2,param_3);
if (param_2[3] == 0) {
return 0;
}
uVar5 = __bfdec_round(param_2,param_5,param_6);
return uVar5;
}
uVar8 = *(uint *)(param_4 + 8) ^ *(uint *)(param_3 + 8);
uVar3 = 0;
switch(param_7) {
case 2:
uVar3 = uVar8;
break;
case 3:
uVar3 = uVar8 ^ 1;
break;
case 5:
uVar3 = 1;
break;
case 6:
uVar3 = *(uint *)(param_3 + 8);
}
local_48 = *(int8 *)(param_3 + 0x10);
local_38 = *(int8 *)(param_3 + 0x20);
local_50 = 0;
local_70 = *(int8 *)(param_4 + 0x10);
local_60 = *(int8 *)(param_4 + 0x20);
local_78 = 0;
iVar2 = bf_cmpu();
if (iVar2 < 0) {
bfdec_set_ui(param_1,0);
bf_set(param_2,local_58);
}
else {
bf_op2(param_1,local_58,local_80,0,0x11,__bfdec_div);
bfdec_mul(param_2,param_1,local_80,0x3fffffffffffffff,1);
bf_op2(param_2,local_58,param_2,0x3fffffffffffffff,1,__bfdec_sub);
}
if ((param_1[2] == 0x7fffffffffffffff) || (param_2[2] == 0x7fffffffffffffff)) goto LAB_001918e1;
if (param_2[3] != 0) {
if ((param_7 & 0xfffffffb) == 0) {
local_a0 = 0;
local_98 = 0x8000000000000000;
local_90 = 0;
lStack_88 = 0;
local_a8 = puVar1;
iVar2 = bf_set(&local_a8,param_2);
if (iVar2 != 0) goto LAB_001918e1;
iVar2 = bfdec_mul_si(&local_a8,&local_a8,2,0x3fffffffffffffff,1);
if (iVar2 != 0) {
if (lStack_88 != 0 && local_a8 != (int8 *)0x0) {
(*(code *)local_a8[1])(*local_a8,lStack_88,0);
}
goto LAB_001918e1;
}
iVar2 = bf_cmpu(&local_a8,param_4);
if (lStack_88 != 0 && local_a8 != (int8 *)0x0) {
(*(code *)local_a8[1])(*local_a8,lStack_88,0);
}
if ((iVar2 < 1) &&
((iVar2 != 0 ||
((param_7 != 4 &&
(uVar7 = get_digit(param_1[4],param_1[3],param_1[3] * 0x13 - param_1[2]),
(uVar7 & 1) == 0)))))) goto LAB_001918b1;
}
else if (uVar3 == 0) goto LAB_001918b1;
uVar3 = bfdec_add_si(param_1,param_1,1,0x3fffffffffffffff,1);
uVar4 = bf_op2(param_2,param_2,local_80,0x3fffffffffffffff,1,__bfdec_sub);
if (((uVar4 | uVar3) & 0x20) != 0) {
LAB_001918e1:
if (param_1[3] != 0) {
lVar6 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0);
param_1[4] = lVar6;
param_1[3] = 0;
}
param_1[2] = 0x7fffffffffffffff;
*(int4 *)(param_1 + 1) = 0;
if (param_2[3] != 0) {
lVar6 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0);
param_2[4] = lVar6;
param_2[3] = 0;
}
param_2[2] = 0x7fffffffffffffff;
*(int4 *)(param_2 + 1) = 0;
return 0x20;
}
}
LAB_001918b1:
*(uint *)(param_2 + 1) = *(uint *)(param_2 + 1) ^ *(uint *)(param_3 + 8);
*(uint *)(param_1 + 1) = uVar8;
if (param_2[3] == 0) {
return 0;
}
uVar5 = __bfdec_round(param_2,param_5,param_6);
return uVar5;
}
|
|
5,785 | my_hash_insert | eloqsql/mysys/hash.c | my_bool my_hash_insert(HASH *info, const uchar *record)
{
int flag;
size_t idx, halfbuff, first_index;
size_t length;
my_hash_value_type current_hash_nr, UNINIT_VAR(rec_hash_nr),
UNINIT_VAR(rec2_hash_nr);
uchar *UNINIT_VAR(rec_data),*UNINIT_VAR(rec2_data), *key;
HASH_LINK *data,*empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos;
key= (uchar*) my_hash_key(info, record, &length, 1);
current_hash_nr= info->hash_function(info->charset, key, length);
if (info->flags & HASH_UNIQUE)
{
if (my_hash_search_using_hash_value(info, current_hash_nr, key, length))
return(TRUE); /* Duplicate entry */
}
flag=0;
if (!(empty=(HASH_LINK*) alloc_dynamic(&info->array)))
return(TRUE); /* No more memory */
data=dynamic_element(&info->array,0,HASH_LINK*);
halfbuff= info->blength >> 1;
idx=first_index=info->records-halfbuff;
if (idx != info->records) /* If some records */
{
do
{
my_hash_value_type hash_nr;
pos=data+idx;
hash_nr= pos->hash_nr;
if (flag == 0) /* First loop; Check if ok */
if (my_hash_mask(hash_nr, info->blength, info->records) != first_index)
break;
if (!(hash_nr & halfbuff))
{ /* Key will not move */
if (!(flag & LOWFIND))
{
if (flag & HIGHFIND)
{
flag= LOWFIND | HIGHFIND;
/* key shall be moved to the current empty position */
gpos= empty;
rec_data= pos->data;
rec_hash_nr= pos->hash_nr;
empty=pos; /* This place is now free */
}
else
{
flag= LOWFIND | LOWUSED; /* key isn't changed */
gpos= pos;
rec_data= pos->data;
rec_hash_nr= pos->hash_nr;
}
}
else
{
if (!(flag & LOWUSED))
{
/* Change link of previous LOW-key */
gpos->data= rec_data;
gpos->hash_nr= rec_hash_nr;
gpos->next= (uint) (pos-data);
flag= (flag & HIGHFIND) | (LOWFIND | LOWUSED);
}
gpos= pos;
rec_data= pos->data;
rec_hash_nr= pos->hash_nr;
}
}
else
{ /* key will be moved */
if (!(flag & HIGHFIND))
{
flag= (flag & LOWFIND) | HIGHFIND;
/* key shall be moved to the last (empty) position */
gpos2= empty;
empty= pos;
rec2_data= pos->data;
rec2_hash_nr= pos->hash_nr;
}
else
{
if (!(flag & HIGHUSED))
{
/* Change link of previous hash-key and save */
gpos2->data= rec2_data;
gpos2->hash_nr= rec2_hash_nr;
gpos2->next= (uint) (pos-data);
flag= (flag & LOWFIND) | (HIGHFIND | HIGHUSED);
}
gpos2= pos;
rec2_data= pos->data;
rec2_hash_nr= pos->hash_nr;
}
}
}
while ((idx=pos->next) != NO_RECORD);
if ((flag & (LOWFIND | LOWUSED)) == LOWFIND)
{
gpos->data= rec_data;
gpos->hash_nr= rec_hash_nr;
gpos->next= NO_RECORD;
}
if ((flag & (HIGHFIND | HIGHUSED)) == HIGHFIND)
{
gpos2->data= rec2_data;
gpos2->hash_nr= rec2_hash_nr;
gpos2->next= NO_RECORD;
}
}
idx= my_hash_mask(current_hash_nr, info->blength, info->records + 1);
pos= data+idx;
/* Check if we are at the empty position */
if (pos == empty)
{
pos->next=NO_RECORD;
}
else
{
/* Move conflicting record to empty position (last) */
empty[0]= pos[0];
/* Check if the moved record was in same hash-nr family */
gpos= data + my_hash_rec_mask(pos, info->blength, info->records + 1);
if (pos == gpos)
{
/* Point to moved record */
pos->next= (uint32) (empty - data);
}
else
{
pos->next= NO_RECORD;
movelink(data,(uint) (pos-data),(uint) (gpos-data),(uint) (empty-data));
}
}
pos->data= (uchar*) record;
pos->hash_nr= current_hash_nr;
if (++info->records == info->blength)
info->blength+= info->blength;
return(0);
} | O3 | c | my_hash_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x50(%rdi), %rax
testq %rax, %rax
je 0x303a7
leaq -0x50(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq *%rax
movq %rax, %r12
movq (%r15), %rdx
jmp 0x303b5
movq 0x8(%rbx), %rdx
movq %rdx, -0x50(%rbp)
movq (%rbx), %r12
addq %r14, %r12
movq 0x68(%rbx), %rdi
movq %r12, %rsi
callq *0x58(%rbx)
movl %eax, %r15d
testb $0x1, 0x20(%rbx)
je 0x303ec
movq -0x50(%rbp), %rcx
leaq -0x5c(%rbp), %r8
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x30187
movq %rax, %rcx
movb $0x1, %al
testq %rcx, %rcx
jne 0x30663
leaq 0x28(%rbx), %rdi
callq 0x2d370
testq %rax, %rax
je 0x3059a
movq %rax, %rdi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movq 0x28(%rbx), %rcx
movq 0x10(%rbx), %rsi
cmpq $0x2, %rsi
jb 0x305ac
movl %r15d, -0x2c(%rbp)
movq %r14, -0x48(%rbp)
movq 0x18(%rbx), %r12
shrq %rsi
subq %rsi, %r12
xorl %r8d, %r8d
movq %r12, -0x58(%rbp)
movq %rdi, %r14
movq %r12, %rax
shlq $0x4, %rax
movl 0x4(%rcx,%rax), %r10d
testl %r8d, %r8d
jne 0x30484
movq 0x10(%rbx), %rdi
leal (%rdi,%rdx), %r9d
movq %rsi, %rdx
movq %r15, %rsi
movl %r11d, %r15d
movl %r10d, %r11d
andl %r9d, %r11d
shrq %rdi
decl %edi
andl %r10d, %edi
cmpq 0x18(%rbx), %r11
cmovbl %r11d, %edi
movl %r15d, %r11d
movq %rsi, %r15
movq %rdx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
cmpq %rdi, -0x58(%rbp)
jne 0x305a1
addq %rcx, %rax
testl %r10d, %esi
je 0x304ac
testb $0x4, %r8b
jne 0x304e3
andl $0x1, %r8d
orl $0x4, %r8d
movq 0x8(%rax), %r15
movl %r10d, %r11d
movq %rax, %rdi
movq %r14, %r13
jmp 0x3054b
testb $0x1, %r8b
jne 0x30510
andl $0x4, %r8d
movl %r8d, %r9d
shrl %r9d
addl $0x3, %r9d
testl %r8d, %r8d
movq %rax, %rdi
cmoveq %r14, %rdi
cmoveq %rax, %r14
movq 0x8(%rax), %r8
movq %r8, -0x40(%rbp)
movl %r10d, -0x30(%rbp)
movl %r9d, %r8d
movq %r14, -0x38(%rbp)
jmp 0x3054b
testb $0x8, %r8b
jne 0x30501
movq %r15, 0x8(%r13)
movl %r11d, 0x4(%r13)
movl %r12d, (%r13)
andl $0x1, %r8d
orl $0xc, %r8d
movl 0x4(%rax), %r10d
movq 0x8(%rax), %r15
movl %r10d, %r11d
movq %r14, %rdi
movq %rax, %r13
jmp 0x3054b
testb $0x2, %r8b
jne 0x30538
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %r9
movq %rdi, 0x8(%r9)
movl -0x30(%rbp), %edi
movl %edi, 0x4(%r9)
movl %r12d, (%r9)
andl $0x4, %r8d
orl $0x3, %r8d
movl 0x4(%rax), %r10d
movq 0x8(%rax), %rdi
movq %rdi, -0x40(%rbp)
movl %r10d, -0x30(%rbp)
movq %r14, %rdi
movq %rax, -0x38(%rbp)
movl (%rax), %r12d
cmpq %rdx, %r12
jne 0x30431
movl %r8d, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x3057a
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rsi
movq %rax, 0x8(%rsi)
movl -0x30(%rbp), %eax
movl %eax, 0x4(%rsi)
movl $0xffffffff, (%rsi) # imm = 0xFFFFFFFF
andl $0xc, %r8d
cmpl $0x4, %r8d
movq -0x48(%rbp), %r14
jne 0x305a8
movq %r15, 0x8(%r13)
movl %r11d, 0x4(%r13)
movl $0xffffffff, (%r13) # imm = 0xFFFFFFFF
jmp 0x305a8
movb $0x1, %al
jmp 0x30663
movq %r14, %rdi
movq -0x48(%rbp), %r14
movl -0x2c(%rbp), %r15d
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rsi
incq %rsi
leal (%rax,%rdx), %r8d
andl %r15d, %r8d
shrq %rax
decl %eax
andl %r15d, %eax
cmpq %rsi, %r8
cmovbl %r8d, %eax
movq %rax, %rsi
shlq $0x4, %rsi
addq %rcx, %rsi
cmpq %rdi, %rsi
je 0x30617
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movq 0x10(%rbx), %r8
movq 0x18(%rbx), %r9
incq %r9
movl 0x4(%rsi), %r10d
addl %r8d, %edx
andl %r10d, %edx
shrq %r8
decl %r8d
andl %r10d, %r8d
cmpq %r9, %rdx
cmovbl %edx, %r8d
cmpl %r8d, %eax
jne 0x3061f
subq %rcx, %rdi
shrq $0x4, %rdi
movl %edi, (%rsi)
jmp 0x30641
movl $0xffffffff, (%rsi) # imm = 0xFFFFFFFF
jmp 0x30641
movl $0xffffffff, (%rsi) # imm = 0xFFFFFFFF
subq %rcx, %rdi
shrq $0x4, %rdi
movl %r8d, %edx
shlq $0x4, %rdx
movl (%rcx,%rdx), %r8d
cmpl %eax, %r8d
jne 0x3062c
addq %rdx, %rcx
movl %edi, (%rcx)
movq %r14, 0x8(%rsi)
movl %r15d, 0x4(%rsi)
movq 0x18(%rbx), %rax
incq %rax
movq %rax, 0x18(%rbx)
cmpq 0x10(%rbx), %rax
jne 0x30661
addq %rax, %rax
movq %rax, 0x10(%rbx)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_hash_insert:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
mov rax, [rdi+50h]
test rax, rax
jz short loc_303A7
lea r15, [rbp+var_50]
mov rdi, r14
mov rsi, r15
mov edx, 1
call rax
mov r12, rax
mov rdx, [r15]
jmp short loc_303B5
loc_303A7:
mov rdx, [rbx+8]
mov [rbp+var_50], rdx
mov r12, [rbx]
add r12, r14
loc_303B5:
mov rdi, [rbx+68h]
mov rsi, r12
call qword ptr [rbx+58h]
mov r15d, eax
test byte ptr [rbx+20h], 1
jz short loc_303EC
mov rcx, [rbp+var_50]
lea r8, [rbp+var_5C]
mov rdi, rbx
mov esi, r15d
mov rdx, r12
call my_hash_first_from_hash_value
mov rcx, rax
mov al, 1
test rcx, rcx
jnz loc_30663
loc_303EC:
lea rdi, [rbx+28h]
call alloc_dynamic
test rax, rax
jz loc_3059A
mov rdi, rax
mov edx, 0FFFFFFFFh
mov rcx, [rbx+28h]
mov rsi, [rbx+10h]
cmp rsi, 2
jb loc_305AC
mov [rbp+var_2C], r15d
mov [rbp+var_48], r14
mov r12, [rbx+18h]
shr rsi, 1
sub r12, rsi
xor r8d, r8d
mov [rbp+var_58], r12
loc_30431:
mov r14, rdi
mov rax, r12
shl rax, 4
mov r10d, [rcx+rax+4]
test r8d, r8d
jnz short loc_30484
mov rdi, [rbx+10h]
lea r9d, [rdi+rdx]
mov rdx, rsi
mov rsi, r15
mov r15d, r11d
mov r11d, r10d
and r11d, r9d
shr rdi, 1
dec edi
and edi, r10d
cmp r11, [rbx+18h]
cmovb edi, r11d
mov r11d, r15d
mov r15, rsi
mov rsi, rdx
mov edx, 0FFFFFFFFh
cmp [rbp+var_58], rdi
jnz loc_305A1
loc_30484:
add rax, rcx
test esi, r10d
jz short loc_304AC
test r8b, 4
jnz short loc_304E3
and r8d, 1
or r8d, 4
mov r15, [rax+8]
mov r11d, r10d
mov rdi, rax
mov r13, r14
jmp loc_3054B
loc_304AC:
test r8b, 1
jnz short loc_30510
and r8d, 4
mov r9d, r8d
shr r9d, 1
add r9d, 3
test r8d, r8d
mov rdi, rax
cmovz rdi, r14
cmovz r14, rax
mov r8, [rax+8]
mov [rbp+var_40], r8
mov [rbp+var_30], r10d
mov r8d, r9d
mov [rbp+var_38], r14
jmp short loc_3054B
loc_304E3:
test r8b, 8
jnz short loc_30501
mov [r13+8], r15
mov [r13+4], r11d
mov [r13+0], r12d
and r8d, 1
or r8d, 0Ch
mov r10d, [rax+4]
loc_30501:
mov r15, [rax+8]
mov r11d, r10d
mov rdi, r14
mov r13, rax
jmp short loc_3054B
loc_30510:
test r8b, 2
jnz short loc_30538
mov rdi, [rbp+var_40]
mov r9, [rbp+var_38]
mov [r9+8], rdi
mov edi, [rbp+var_30]
mov [r9+4], edi
mov [r9], r12d
and r8d, 4
or r8d, 3
mov r10d, [rax+4]
loc_30538:
mov rdi, [rax+8]
mov [rbp+var_40], rdi
mov [rbp+var_30], r10d
mov rdi, r14
mov [rbp+var_38], rax
loc_3054B:
mov r12d, [rax]
cmp r12, rdx
jnz loc_30431
mov eax, r8d
and eax, 3
cmp eax, 1
jnz short loc_3057A
mov rax, [rbp+var_40]
mov rsi, [rbp+var_38]
mov [rsi+8], rax
mov eax, [rbp+var_30]
mov [rsi+4], eax
mov dword ptr [rsi], 0FFFFFFFFh
loc_3057A:
and r8d, 0Ch
cmp r8d, 4
mov r14, [rbp+var_48]
jnz short loc_305A8
mov [r13+8], r15
mov [r13+4], r11d
mov dword ptr [r13+0], 0FFFFFFFFh
jmp short loc_305A8
loc_3059A:
mov al, 1
jmp loc_30663
loc_305A1:
mov rdi, r14
mov r14, [rbp+var_48]
loc_305A8:
mov r15d, [rbp+var_2C]
loc_305AC:
mov rax, [rbx+10h]
mov rsi, [rbx+18h]
inc rsi
lea r8d, [rax+rdx]
and r8d, r15d
shr rax, 1
dec eax
and eax, r15d
cmp r8, rsi
cmovb eax, r8d
mov rsi, rax
shl rsi, 4
add rsi, rcx
cmp rsi, rdi
jz short loc_30617
movups xmm0, xmmword ptr [rsi]
movups xmmword ptr [rdi], xmm0
mov r8, [rbx+10h]
mov r9, [rbx+18h]
inc r9
mov r10d, [rsi+4]
add edx, r8d
and edx, r10d
shr r8, 1
dec r8d
and r8d, r10d
cmp rdx, r9
cmovb r8d, edx
cmp eax, r8d
jnz short loc_3061F
sub rdi, rcx
shr rdi, 4
mov [rsi], edi
jmp short loc_30641
loc_30617:
mov dword ptr [rsi], 0FFFFFFFFh
jmp short loc_30641
loc_3061F:
mov dword ptr [rsi], 0FFFFFFFFh
sub rdi, rcx
shr rdi, 4
loc_3062C:
mov edx, r8d
shl rdx, 4
mov r8d, [rcx+rdx]
cmp r8d, eax
jnz short loc_3062C
add rcx, rdx
mov [rcx], edi
loc_30641:
mov [rsi+8], r14
mov [rsi+4], r15d
mov rax, [rbx+18h]
inc rax
mov [rbx+18h], rax
cmp rax, [rbx+10h]
jnz short loc_30661
add rax, rax
mov [rbx+10h], rax
loc_30661:
xor eax, eax
loc_30663:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char my_hash_insert(long long a1, long long a2)
{
_OWORD *v2; // r13
long long v3; // r14
long long ( *v5)(long long, long long *, long long); // rax
long long v6; // r12
long long v7; // rdx
unsigned int v8; // eax
long long v9; // r15
long long v10; // rcx
char result; // al
long long v12; // rax
unsigned int v13; // r11d
_OWORD *v14; // rdi
long long v15; // rcx
unsigned long long v16; // rsi
unsigned long long v17; // rsi
unsigned long long v18; // r12
int v19; // r8d
_OWORD *v20; // r14
unsigned int v21; // r10d
unsigned long long v22; // rdi
unsigned long long v23; // rdx
long long v24; // rsi
unsigned int v25; // r15d
unsigned long long v26; // r11
long long v27; // rdi
unsigned int *v28; // rax
unsigned int v29; // r8d
_DWORD *v30; // r9
_DWORD *v31; // rsi
unsigned long long v32; // rax
unsigned long long v33; // r8
long long v34; // rax
long long v35; // rsi
unsigned long long v36; // r8
int v37; // r10d
unsigned long long v38; // rdx
unsigned int v39; // r8d
unsigned long long v40; // rdi
long long v41; // rdx
long long v42; // rax
unsigned int v43; // [rsp+4h] [rbp-5Ch] BYREF
unsigned long long v44; // [rsp+8h] [rbp-58h]
long long v45; // [rsp+10h] [rbp-50h] BYREF
long long v46; // [rsp+18h] [rbp-48h]
long long v47; // [rsp+20h] [rbp-40h]
_OWORD *v48; // [rsp+28h] [rbp-38h]
unsigned int v49; // [rsp+30h] [rbp-30h]
int v50; // [rsp+34h] [rbp-2Ch]
v3 = a2;
v5 = *(long long ( **)(long long, long long *, long long))(a1 + 80);
if ( v5 )
{
v6 = v5(a2, &v45, 1LL);
v7 = v45;
}
else
{
v7 = *(_QWORD *)(a1 + 8);
v45 = v7;
v6 = a2 + *(_QWORD *)a1;
}
v8 = (*(long long ( **)(_QWORD, long long, long long))(a1 + 88))(*(_QWORD *)(a1 + 104), v6, v7);
v9 = v8;
if ( (*(_BYTE *)(a1 + 32) & 1) == 0
|| (v10 = my_hash_first_from_hash_value((_QWORD *)a1, v8, v6, v45, &v43), result = 1, !v10) )
{
v12 = alloc_dynamic((long long *)(a1 + 40));
if ( v12 )
{
v14 = (_OWORD *)v12;
v15 = *(_QWORD *)(a1 + 40);
v16 = *(_QWORD *)(a1 + 16);
if ( v16 >= 2 )
{
v50 = v9;
v46 = v3;
v17 = v16 >> 1;
v18 = *(_QWORD *)(a1 + 24) - v17;
v19 = 0;
v44 = v18;
do
{
v20 = v14;
v21 = *(_DWORD *)(v15 + 16 * v18 + 4);
if ( !v19 )
{
v22 = *(_QWORD *)(a1 + 16);
v23 = v17;
v24 = v9;
v25 = v13;
v26 = ((_DWORD)v22 - 1) & v21;
v27 = v21 & ((unsigned int)(v22 >> 1) - 1);
if ( v26 < *(_QWORD *)(a1 + 24) )
v27 = (unsigned int)v26;
v13 = v25;
v9 = v24;
v17 = v23;
if ( v44 != v27 )
{
v14 = v20;
v3 = v46;
goto LABEL_33;
}
}
v28 = (unsigned int *)(v15 + 16 * v18);
if ( (v21 & (unsigned int)v17) != 0 )
{
if ( (v19 & 4) != 0 )
{
if ( (v19 & 8) == 0 )
{
*((_QWORD *)v2 + 1) = v9;
*((_DWORD *)v2 + 1) = v13;
*(_DWORD *)v2 = v18;
v19 = v19 & 1 | 0xC;
v21 = v28[1];
}
v9 = *((_QWORD *)v28 + 1);
v13 = v21;
v14 = v20;
v2 = (_OWORD *)(v15 + 16 * v18);
}
else
{
v19 = v19 & 1 | 4;
v9 = *((_QWORD *)v28 + 1);
v13 = *(_DWORD *)(v15 + 16 * v18 + 4);
v14 = (_OWORD *)(v15 + 16 * v18);
v2 = v20;
}
}
else if ( (v19 & 1) != 0 )
{
if ( (v19 & 2) == 0 )
{
v30 = v48;
*((_QWORD *)v48 + 1) = v47;
v30[1] = v49;
*v30 = v18;
v19 = v19 & 4 | 3;
v21 = v28[1];
}
v47 = *((_QWORD *)v28 + 1);
v49 = v21;
v14 = v20;
v48 = (_OWORD *)(v15 + 16 * v18);
}
else
{
v29 = v19 & 4;
v14 = (_OWORD *)(v15 + 16 * v18);
if ( !v29 )
{
v14 = v20;
v20 = (_OWORD *)(v15 + 16 * v18);
}
v47 = *((_QWORD *)v28 + 1);
v49 = v21;
v19 = (v29 >> 1) + 3;
v48 = v20;
}
v18 = *v28;
}
while ( v18 != 0xFFFFFFFF );
if ( (v19 & 3) == 1 )
{
v31 = v48;
*((_QWORD *)v48 + 1) = v47;
v31[1] = v49;
*v31 = -1;
}
v3 = v46;
if ( (v19 & 0xC) == 4 )
{
*((_QWORD *)v2 + 1) = v9;
*((_DWORD *)v2 + 1) = v13;
*(_DWORD *)v2 = -1;
}
LABEL_33:
LODWORD(v9) = v50;
}
v32 = *(_QWORD *)(a1 + 16);
v33 = (unsigned int)v9 & ((_DWORD)v32 - 1);
v34 = (unsigned int)v9 & ((unsigned int)(v32 >> 1) - 1);
if ( v33 < *(_QWORD *)(a1 + 24) + 1LL )
v34 = (unsigned int)v33;
v35 = v15 + 16 * v34;
if ( (_OWORD *)v35 == v14 )
{
*(_DWORD *)v35 = -1;
}
else
{
*v14 = *(_OWORD *)v35;
v36 = *(_QWORD *)(a1 + 16);
v37 = *(_DWORD *)(v35 + 4);
v38 = v37 & (unsigned int)(v36 - 1);
v39 = v37 & ((v36 >> 1) - 1);
if ( v38 < *(_QWORD *)(a1 + 24) + 1LL )
v39 = v38;
if ( (_DWORD)v34 == v39 )
{
*(_DWORD *)v35 = ((unsigned long long)v14 - v15) >> 4;
}
else
{
*(_DWORD *)v35 = -1;
v40 = ((unsigned long long)v14 - v15) >> 4;
do
{
v41 = 16LL * v39;
v39 = *(_DWORD *)(v15 + v41);
}
while ( v39 != (_DWORD)v34 );
*(_DWORD *)(v41 + v15) = v40;
}
}
*(_QWORD *)(v35 + 8) = v3;
*(_DWORD *)(v35 + 4) = v9;
v42 = *(_QWORD *)(a1 + 24) + 1LL;
*(_QWORD *)(a1 + 24) = v42;
if ( v42 == *(_QWORD *)(a1 + 16) )
*(_QWORD *)(a1 + 16) = 2 * v42;
return 0;
}
else
{
return 1;
}
}
return result;
}
| my_hash_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x50]
TEST RAX,RAX
JZ 0x001303a7
LEA R15,[RBP + -0x50]
MOV RDI,R14
MOV RSI,R15
MOV EDX,0x1
CALL RAX
MOV R12,RAX
MOV RDX,qword ptr [R15]
JMP 0x001303b5
LAB_001303a7:
MOV RDX,qword ptr [RBX + 0x8]
MOV qword ptr [RBP + -0x50],RDX
MOV R12,qword ptr [RBX]
ADD R12,R14
LAB_001303b5:
MOV RDI,qword ptr [RBX + 0x68]
MOV RSI,R12
CALL qword ptr [RBX + 0x58]
MOV R15D,EAX
TEST byte ptr [RBX + 0x20],0x1
JZ 0x001303ec
MOV RCX,qword ptr [RBP + -0x50]
LEA R8,[RBP + -0x5c]
MOV RDI,RBX
MOV ESI,R15D
MOV RDX,R12
CALL 0x00130187
MOV RCX,RAX
MOV AL,0x1
TEST RCX,RCX
JNZ 0x00130663
LAB_001303ec:
LEA RDI,[RBX + 0x28]
CALL 0x0012d370
TEST RAX,RAX
JZ 0x0013059a
MOV RDI,RAX
MOV EDX,0xffffffff
MOV RCX,qword ptr [RBX + 0x28]
MOV RSI,qword ptr [RBX + 0x10]
CMP RSI,0x2
JC 0x001305ac
MOV dword ptr [RBP + -0x2c],R15D
MOV qword ptr [RBP + -0x48],R14
MOV R12,qword ptr [RBX + 0x18]
SHR RSI,0x1
SUB R12,RSI
XOR R8D,R8D
MOV qword ptr [RBP + -0x58],R12
LAB_00130431:
MOV R14,RDI
MOV RAX,R12
SHL RAX,0x4
MOV R10D,dword ptr [RCX + RAX*0x1 + 0x4]
TEST R8D,R8D
JNZ 0x00130484
MOV RDI,qword ptr [RBX + 0x10]
LEA R9D,[RDI + RDX*0x1]
MOV RDX,RSI
MOV RSI,R15
MOV R15D,R11D
MOV R11D,R10D
AND R11D,R9D
SHR RDI,0x1
DEC EDI
AND EDI,R10D
CMP R11,qword ptr [RBX + 0x18]
CMOVC EDI,R11D
MOV R11D,R15D
MOV R15,RSI
MOV RSI,RDX
MOV EDX,0xffffffff
CMP qword ptr [RBP + -0x58],RDI
JNZ 0x001305a1
LAB_00130484:
ADD RAX,RCX
TEST ESI,R10D
JZ 0x001304ac
TEST R8B,0x4
JNZ 0x001304e3
AND R8D,0x1
OR R8D,0x4
MOV R15,qword ptr [RAX + 0x8]
MOV R11D,R10D
MOV RDI,RAX
MOV R13,R14
JMP 0x0013054b
LAB_001304ac:
TEST R8B,0x1
JNZ 0x00130510
AND R8D,0x4
MOV R9D,R8D
SHR R9D,0x1
ADD R9D,0x3
TEST R8D,R8D
MOV RDI,RAX
CMOVZ RDI,R14
CMOVZ R14,RAX
MOV R8,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],R8
MOV dword ptr [RBP + -0x30],R10D
MOV R8D,R9D
MOV qword ptr [RBP + -0x38],R14
JMP 0x0013054b
LAB_001304e3:
TEST R8B,0x8
JNZ 0x00130501
MOV qword ptr [R13 + 0x8],R15
MOV dword ptr [R13 + 0x4],R11D
MOV dword ptr [R13],R12D
AND R8D,0x1
OR R8D,0xc
MOV R10D,dword ptr [RAX + 0x4]
LAB_00130501:
MOV R15,qword ptr [RAX + 0x8]
MOV R11D,R10D
MOV RDI,R14
MOV R13,RAX
JMP 0x0013054b
LAB_00130510:
TEST R8B,0x2
JNZ 0x00130538
MOV RDI,qword ptr [RBP + -0x40]
MOV R9,qword ptr [RBP + -0x38]
MOV qword ptr [R9 + 0x8],RDI
MOV EDI,dword ptr [RBP + -0x30]
MOV dword ptr [R9 + 0x4],EDI
MOV dword ptr [R9],R12D
AND R8D,0x4
OR R8D,0x3
MOV R10D,dword ptr [RAX + 0x4]
LAB_00130538:
MOV RDI,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RDI
MOV dword ptr [RBP + -0x30],R10D
MOV RDI,R14
MOV qword ptr [RBP + -0x38],RAX
LAB_0013054b:
MOV R12D,dword ptr [RAX]
CMP R12,RDX
JNZ 0x00130431
MOV EAX,R8D
AND EAX,0x3
CMP EAX,0x1
JNZ 0x0013057a
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
MOV qword ptr [RSI + 0x8],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RSI + 0x4],EAX
MOV dword ptr [RSI],0xffffffff
LAB_0013057a:
AND R8D,0xc
CMP R8D,0x4
MOV R14,qword ptr [RBP + -0x48]
JNZ 0x001305a8
MOV qword ptr [R13 + 0x8],R15
MOV dword ptr [R13 + 0x4],R11D
MOV dword ptr [R13],0xffffffff
JMP 0x001305a8
LAB_0013059a:
MOV AL,0x1
JMP 0x00130663
LAB_001305a1:
MOV RDI,R14
MOV R14,qword ptr [RBP + -0x48]
LAB_001305a8:
MOV R15D,dword ptr [RBP + -0x2c]
LAB_001305ac:
MOV RAX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RBX + 0x18]
INC RSI
LEA R8D,[RAX + RDX*0x1]
AND R8D,R15D
SHR RAX,0x1
DEC EAX
AND EAX,R15D
CMP R8,RSI
CMOVC EAX,R8D
MOV RSI,RAX
SHL RSI,0x4
ADD RSI,RCX
CMP RSI,RDI
JZ 0x00130617
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS xmmword ptr [RDI],XMM0
MOV R8,qword ptr [RBX + 0x10]
MOV R9,qword ptr [RBX + 0x18]
INC R9
MOV R10D,dword ptr [RSI + 0x4]
ADD EDX,R8D
AND EDX,R10D
SHR R8,0x1
DEC R8D
AND R8D,R10D
CMP RDX,R9
CMOVC R8D,EDX
CMP EAX,R8D
JNZ 0x0013061f
SUB RDI,RCX
SHR RDI,0x4
MOV dword ptr [RSI],EDI
JMP 0x00130641
LAB_00130617:
MOV dword ptr [RSI],0xffffffff
JMP 0x00130641
LAB_0013061f:
MOV dword ptr [RSI],0xffffffff
SUB RDI,RCX
SHR RDI,0x4
LAB_0013062c:
MOV EDX,R8D
SHL RDX,0x4
MOV R8D,dword ptr [RCX + RDX*0x1]
CMP R8D,EAX
JNZ 0x0013062c
ADD RCX,RDX
MOV dword ptr [RCX],EDI
LAB_00130641:
MOV qword ptr [RSI + 0x8],R14
MOV dword ptr [RSI + 0x4],R15D
MOV RAX,qword ptr [RBX + 0x18]
INC RAX
MOV qword ptr [RBX + 0x18],RAX
CMP RAX,qword ptr [RBX + 0x10]
JNZ 0x00130661
ADD RAX,RAX
MOV qword ptr [RBX + 0x10],RAX
LAB_00130661:
XOR EAX,EAX
LAB_00130663:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 my_hash_insert(long *param_1,long param_2)
{
uint uVar1;
long lVar2;
uint *puVar3;
uint *puVar4;
int8 uVar5;
ulong uVar6;
uint uVar7;
ulong uVar8;
uint *puVar9;
ulong uVar10;
uint uVar11;
uint uVar12;
ulong uVar13;
ulong in_R11;
ulong uVar14;
ulong uVar15;
uint *unaff_R13;
long local_58 [2];
int8 local_48;
uint *local_40;
uint local_38;
if ((code *)param_1[10] == (code *)0x0) {
local_58[0] = param_1[1];
lVar2 = *param_1 + param_2;
}
else {
lVar2 = (*(code *)param_1[10])(param_2,local_58,1);
}
uVar1 = (*(code *)param_1[0xb])(param_1[0xd],lVar2,local_58[0]);
uVar6 = (ulong)uVar1;
if (((*(byte *)(param_1 + 4) & 1) != 0) &&
(lVar2 = my_hash_first_from_hash_value(param_1,uVar6,lVar2,local_58[0]), lVar2 != 0)) {
return 1;
}
puVar3 = (uint *)alloc_dynamic(param_1 + 5);
if (puVar3 == (uint *)0x0) {
uVar5 = 1;
}
else {
lVar2 = param_1[5];
if (1 < (ulong)param_1[2]) {
uVar8 = (ulong)param_1[2] >> 1;
uVar15 = param_1[3] - uVar8;
uVar11 = 0;
uVar13 = uVar15;
do {
uVar7 = *(uint *)(lVar2 + 4 + uVar13 * 0x10);
if (uVar11 == 0) {
in_R11 = in_R11 & 0xffffffff;
uVar14 = (ulong)(uVar7 & (int)param_1[2] - 1U);
uVar10 = (ulong)((int)((ulong)param_1[2] >> 1) - 1U & uVar7);
if (uVar14 < (ulong)param_1[3]) {
uVar10 = uVar14;
}
if (uVar15 != uVar10) goto LAB_001305ac;
}
puVar4 = (uint *)(uVar13 * 0x10 + lVar2);
puVar9 = puVar4;
if (((uint)uVar8 & uVar7) == 0) {
if ((uVar11 & 1) == 0) {
uVar12 = uVar11 & 4;
uVar11 = (uVar12 >> 1) + 3;
local_40 = puVar3;
if (uVar12 == 0) {
local_40 = puVar4;
puVar9 = puVar3;
}
local_48 = *(int8 *)(puVar4 + 2);
local_38 = uVar7;
}
else {
if ((uVar11 & 2) == 0) {
*(int8 *)(local_40 + 2) = local_48;
local_40[1] = local_38;
*local_40 = (uint)uVar13;
uVar11 = uVar11 & 4 | 3;
uVar7 = puVar4[1];
}
local_48 = *(int8 *)(puVar4 + 2);
puVar9 = puVar3;
local_40 = puVar4;
local_38 = uVar7;
}
}
else if ((uVar11 & 4) == 0) {
uVar11 = uVar11 & 1 | 4;
uVar6 = *(ulong *)(puVar4 + 2);
in_R11 = (ulong)uVar7;
unaff_R13 = puVar3;
}
else {
if ((uVar11 & 8) == 0) {
*(ulong *)(unaff_R13 + 2) = uVar6;
unaff_R13[1] = (uint)in_R11;
*unaff_R13 = (uint)uVar13;
uVar11 = uVar11 & 1 | 0xc;
uVar7 = puVar4[1];
}
uVar6 = *(ulong *)(puVar4 + 2);
in_R11 = (ulong)uVar7;
puVar9 = puVar3;
unaff_R13 = puVar4;
}
uVar13 = (ulong)*puVar4;
puVar3 = puVar9;
} while (uVar13 != 0xffffffff);
if ((uVar11 & 3) == 1) {
*(int8 *)(local_40 + 2) = local_48;
local_40[1] = local_38;
*local_40 = 0xffffffff;
}
if ((uVar11 & 0xc) == 4) {
*(ulong *)(unaff_R13 + 2) = uVar6;
unaff_R13[1] = (uint)in_R11;
*unaff_R13 = 0xffffffff;
}
}
LAB_001305ac:
uVar13 = (ulong)((int)param_1[2] - 1U & uVar1);
uVar6 = (ulong)((int)((ulong)param_1[2] >> 1) - 1U & uVar1);
if (uVar13 < param_1[3] + 1U) {
uVar6 = uVar13;
}
puVar9 = (uint *)(uVar6 * 0x10 + lVar2);
if (puVar9 == puVar3) {
*puVar9 = 0xffffffff;
}
else {
uVar5 = *(int8 *)(puVar9 + 2);
*(int8 *)puVar3 = *(int8 *)puVar9;
*(int8 *)(puVar3 + 2) = uVar5;
uVar7 = (int)param_1[2] - 1U & puVar9[1];
uVar11 = (int)((ulong)param_1[2] >> 1) - 1U & puVar9[1];
if ((ulong)uVar7 < param_1[3] + 1U) {
uVar11 = uVar7;
}
if ((uint)uVar6 == uVar11) {
*puVar9 = (uint)((ulong)((long)puVar3 - lVar2) >> 4);
}
else {
*puVar9 = 0xffffffff;
do {
uVar13 = (ulong)uVar11;
uVar11 = *(uint *)(lVar2 + uVar13 * 0x10);
} while (uVar11 != (uint)uVar6);
*(int *)(lVar2 + uVar13 * 0x10) = (int)((ulong)((long)puVar3 - lVar2) >> 4);
}
}
*(long *)(puVar9 + 2) = param_2;
puVar9[1] = uVar1;
lVar2 = param_1[3] + 1;
param_1[3] = lVar2;
if (lVar2 == param_1[2]) {
param_1[2] = lVar2 * 2;
}
uVar5 = 0;
}
return uVar5;
}
|
|
5,786 | flush_simple_key_cache_blocks | eloqsql/mysys/mf_keycache.c | static
int flush_simple_key_cache_blocks(SIMPLE_KEY_CACHE_CB *keycache,
File file,
void *file_extra __attribute__((unused)),
enum flush_type type)
{
int res= 0;
DBUG_ENTER("flush_key_blocks");
DBUG_PRINT("enter", ("keycache: %p", keycache));
if (!keycache->key_cache_inited)
DBUG_RETURN(0);
keycache_pthread_mutex_lock(&keycache->cache_lock);
/* While waiting for lock, keycache could have been ended. */
if (keycache->disk_blocks > 0)
{
inc_counter_for_resize_op(keycache);
res= flush_key_blocks_int(keycache, file, type);
dec_counter_for_resize_op(keycache);
}
keycache_pthread_mutex_unlock(&keycache->cache_lock);
DBUG_RETURN(res);
} | O3 | c | flush_simple_key_cache_blocks:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpb $0x0, (%rdi)
je 0x99af1
movl %ecx, %r15d
movl %esi, %r12d
movq %rdi, %r14
leaq 0xc0(%rdi), %rbx
cmpq $0x0, 0x100(%rdi)
jne 0x99b19
movq %rbx, %rdi
callq 0x29220
cmpl $0x0, 0x48(%r14)
jle 0x99af6
incq 0x70(%r14)
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x99eae
movl %eax, %r15d
decq 0x70(%r14)
jne 0x99af9
leaq 0x110(%r14), %rdi
callq 0x989b9
jmp 0x99af9
xorl %r15d, %r15d
jmp 0x99b0d
xorl %r15d, %r15d
movq 0x100(%r14), %rdi
testq %rdi, %rdi
jne 0x99b2f
movq %rbx, %rdi
callq 0x291e0
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4284b(%rip), %rsi # 0xdc36b
movq %rbx, %rdi
movl $0x111a, %edx # imm = 0x111A
callq 0x2eb8f
jmp 0x99ac1
leaq 0x2ec4da(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x99b05
| flush_simple_key_cache_blocks:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
cmp byte ptr [rdi], 0
jz short loc_99AF1
mov r15d, ecx
mov r12d, esi
mov r14, rdi
lea rbx, [rdi+0C0h]
cmp qword ptr [rdi+100h], 0
jnz short loc_99B19
mov rdi, rbx
call _pthread_mutex_lock
loc_99AC1:
cmp dword ptr [r14+48h], 0
jle short loc_99AF6
inc qword ptr [r14+70h]
mov rdi, r14
mov esi, r12d
mov edx, r15d
call flush_key_blocks_int
mov r15d, eax
dec qword ptr [r14+70h]
jnz short loc_99AF9
lea rdi, [r14+110h]
call release_whole_queue
jmp short loc_99AF9
loc_99AF1:
xor r15d, r15d
jmp short loc_99B0D
loc_99AF6:
xor r15d, r15d
loc_99AF9:
mov rdi, [r14+100h]
test rdi, rdi
jnz short loc_99B2F
loc_99B05:
mov rdi, rbx
call _pthread_mutex_unlock
loc_99B0D:
mov eax, r15d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_99B19:
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 111Ah
call psi_mutex_lock
jmp short loc_99AC1
loc_99B2F:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_99B05
| long long flush_simple_key_cache_blocks(long long a1, unsigned int a2, long long a3, unsigned int a4)
{
unsigned int v5; // r15d
if ( *(_BYTE *)a1 )
{
if ( *(_QWORD *)(a1 + 256) )
psi_mutex_lock(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x111Au);
else
pthread_mutex_lock(a1 + 192);
if ( *(int *)(a1 + 72) <= 0 )
{
v5 = 0;
}
else
{
++*(_QWORD *)(a1 + 112);
v5 = flush_key_blocks_int(a1, a2, a4);
if ( (*(_QWORD *)(a1 + 112))-- == 1LL )
release_whole_queue((long long *)(a1 + 272));
}
if ( *(_QWORD *)(a1 + 256) )
PSI_server[44]();
pthread_mutex_unlock(a1 + 192);
}
else
{
return 0;
}
return v5;
}
| flush_simple_key_cache_blocks:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
CMP byte ptr [RDI],0x0
JZ 0x00199af1
MOV R15D,ECX
MOV R12D,ESI
MOV R14,RDI
LEA RBX,[RDI + 0xc0]
CMP qword ptr [RDI + 0x100],0x0
JNZ 0x00199b19
MOV RDI,RBX
CALL 0x00129220
LAB_00199ac1:
CMP dword ptr [R14 + 0x48],0x0
JLE 0x00199af6
INC qword ptr [R14 + 0x70]
MOV RDI,R14
MOV ESI,R12D
MOV EDX,R15D
CALL 0x00199eae
MOV R15D,EAX
DEC qword ptr [R14 + 0x70]
JNZ 0x00199af9
LEA RDI,[R14 + 0x110]
CALL 0x001989b9
JMP 0x00199af9
LAB_00199af1:
XOR R15D,R15D
JMP 0x00199b0d
LAB_00199af6:
XOR R15D,R15D
LAB_00199af9:
MOV RDI,qword ptr [R14 + 0x100]
TEST RDI,RDI
JNZ 0x00199b2f
LAB_00199b05:
MOV RDI,RBX
CALL 0x001291e0
LAB_00199b0d:
MOV EAX,R15D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00199b19:
LEA RSI,[0x1dc36b]
MOV RDI,RBX
MOV EDX,0x111a
CALL 0x0012eb8f
JMP 0x00199ac1
LAB_00199b2f:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00199b05
|
int4
flush_simple_key_cache_blocks
(char *param_1,int4 param_2,int8 param_3,int4 param_4)
{
long *plVar1;
pthread_mutex_t *__mutex;
int4 uVar2;
if (*param_1 == '\0') {
uVar2 = 0;
}
else {
__mutex = (pthread_mutex_t *)(param_1 + 0xc0);
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x111a);
}
if (*(int *)(param_1 + 0x48) < 1) {
uVar2 = 0;
}
else {
*(long *)(param_1 + 0x70) = *(long *)(param_1 + 0x70) + 1;
uVar2 = flush_key_blocks_int(param_1,param_2,param_4);
plVar1 = (long *)(param_1 + 0x70);
*plVar1 = *plVar1 + -1;
if (*plVar1 == 0) {
release_whole_queue(param_1 + 0x110);
}
}
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
}
return uVar2;
}
|
|
5,787 | google::protobuf::OneofDescriptorProto::ByteSizeLong() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | size_t OneofDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.OneofDescriptorProto)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// optional .google.protobuf.OneofOptions options = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.options_);
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
} | O0 | cpp | google::protobuf::OneofDescriptorProto::ByteSizeLong() const:
subq $0x38, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
addq $0x10, %rax
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x30(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xb5338
movl 0x14(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xb530e
movq 0x8(%rsp), %rdi
callq 0x87d60
movq %rax, %rdi
callq 0xd53e0
addq $0x1, %rax
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x14(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xb5336
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0xd7890
addq $0x1, %rax
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0xb5338
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rdi, %rdx
addq $0x10, %rdx
addq $0x4, %rdx
callq 0x13aa50
addq $0x38, %rsp
retq
nopw (%rax,%rax)
| _ZNK6google8protobuf20OneofDescriptorProto12ByteSizeLongEv:
sub rsp, 38h
mov [rsp+38h+var_18], rdi
mov rax, [rsp+38h+var_18]
mov [rsp+38h+var_30], rax
mov [rsp+38h+var_20], 0
mov [rsp+38h+var_24], 0
add rax, 10h
mov [rsp+38h+var_8], rax
mov [rsp+38h+var_C], 0
mov rax, [rsp+38h+var_8]
movsxd rcx, [rsp+38h+var_C]
mov eax, [rax+rcx*4]
mov [rsp+38h+var_24], eax
mov eax, [rsp+38h+var_24]
and eax, 3
cmp eax, 0
jz short loc_B5338
mov eax, [rsp+38h+var_24]
and eax, 1
cmp eax, 0
jz short loc_B530E
mov rdi, [rsp+38h+var_30]
call _ZNK6google8protobuf20OneofDescriptorProto14_internal_nameB5cxx11Ev; google::protobuf::OneofDescriptorProto::_internal_name(void)
mov rdi, rax
call _ZN6google8protobuf8internal14WireFormatLite10StringSizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::WireFormatLite::StringSize(std::string const&)
add rax, 1
add rax, [rsp+38h+var_20]
mov [rsp+38h+var_20], rax
loc_B530E:
mov eax, [rsp+38h+var_24]
and eax, 2
cmp eax, 0
jz short loc_B5336
mov rax, [rsp+38h+var_30]
mov rdi, [rax+20h]
call _ZN6google8protobuf8internal14WireFormatLite11MessageSizeINS0_12OneofOptionsEEEmRKT_; google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::OneofOptions>(google::protobuf::OneofOptions const&)
add rax, 1
add rax, [rsp+38h+var_20]
mov [rsp+38h+var_20], rax
loc_B5336:
jmp short $+2
loc_B5338:
mov rdi, [rsp+38h+var_30]; this
mov rsi, [rsp+38h+var_20]; unsigned __int64
mov rdx, rdi
add rdx, 10h
add rdx, 4; google::protobuf::internal::CachedSize *
call _ZNK6google8protobuf7Message29MaybeComputeUnknownFieldsSizeEmPNS0_8internal10CachedSizeE; google::protobuf::Message::MaybeComputeUnknownFieldsSize(ulong,google::protobuf::internal::CachedSize *)
add rsp, 38h
retn
| long long google::protobuf::OneofDescriptorProto::ByteSizeLong(google::protobuf::OneofDescriptorProto *this)
{
unsigned long long v1; // rax
_BYTE v3[12]; // [rsp+14h] [rbp-24h]
*(_DWORD *)&v3[8] = 0;
*(_QWORD *)v3 = *((unsigned int *)this + 4);
if ( (v3[0] & 3) != 0 )
{
if ( (v3[0] & 1) != 0 )
{
v1 = google::protobuf::OneofDescriptorProto::_internal_name[abi:cxx11]((long long)this);
*(_QWORD *)&v3[4] += google::protobuf::internal::WireFormatLite::StringSize(v1) + 1;
}
if ( (v3[0] & 2) != 0 )
*(_QWORD *)&v3[4] += google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::OneofOptions>(*((_QWORD *)this + 4))
+ 1;
}
return google::protobuf::Message::MaybeComputeUnknownFieldsSize(
this,
*(unsigned long long *)&v3[4],
(google::protobuf::OneofDescriptorProto *)((char *)this + 20));
}
| ByteSizeLong:
SUB RSP,0x38
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x14],0x0
ADD RAX,0x10
MOV qword ptr [RSP + 0x30],RAX
MOV dword ptr [RSP + 0x2c],0x0
MOV RAX,qword ptr [RSP + 0x30]
MOVSXD RCX,dword ptr [RSP + 0x2c]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x14],EAX
MOV EAX,dword ptr [RSP + 0x14]
AND EAX,0x3
CMP EAX,0x0
JZ 0x001b5338
MOV EAX,dword ptr [RSP + 0x14]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001b530e
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00187d60
MOV RDI,RAX
CALL 0x001d53e0
ADD RAX,0x1
ADD RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x18],RAX
LAB_001b530e:
MOV EAX,dword ptr [RSP + 0x14]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001b5336
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x20]
CALL 0x001d7890
ADD RAX,0x1
ADD RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x18],RAX
LAB_001b5336:
JMP 0x001b5338
LAB_001b5338:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,RDI
ADD RDX,0x10
ADD RDX,0x4
CALL 0x0023aa50
ADD RSP,0x38
RET
|
/* google::protobuf::OneofDescriptorProto::ByteSizeLong() const */
void __thiscall google::protobuf::OneofDescriptorProto::ByteSizeLong(OneofDescriptorProto *this)
{
uint uVar1;
string *psVar2;
long lVar3;
ulong uVar4;
ulong local_20;
local_20 = 0;
uVar1 = *(uint *)(this + 0x10);
if ((uVar1 & 3) != 0) {
if ((uVar1 & 1) != 0) {
psVar2 = (string *)_internal_name_abi_cxx11_(this);
lVar3 = internal::WireFormatLite::StringSize(psVar2);
local_20 = lVar3 + 1;
}
if ((uVar1 & 2) != 0) {
uVar4 = internal::WireFormatLite::MessageSize<google::protobuf::OneofOptions>
(*(OneofOptions **)(this + 0x20));
local_20 = uVar4 + 1 + local_20;
}
}
Message::MaybeComputeUnknownFieldsSize((Message *)this,local_20,(CachedSize *)(this + 0x14));
return;
}
|
|
5,788 | fmt::v11::detail::compute_width(fmt::v11::basic_string_view<char>)::count_code_points::operator()(unsigned int, fmt::v11::basic_string_view<char>) const | zkingston[P]unknot/build_O0/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR auto operator()(uint32_t cp, string_view) const -> bool {
*count += to_unsigned(
1 +
(cp >= 0x1100 &&
(cp <= 0x115f || // Hangul Jamo init. consonants
cp == 0x2329 || // LEFT-POINTING ANGLE BRACKET
cp == 0x232a || // RIGHT-POINTING ANGLE BRACKET
// CJK ... Yi except IDEOGRAPHIC HALF FILL SPACE:
(cp >= 0x2e80 && cp <= 0xa4cf && cp != 0x303f) ||
(cp >= 0xac00 && cp <= 0xd7a3) || // Hangul Syllables
(cp >= 0xf900 && cp <= 0xfaff) || // CJK Compatibility Ideographs
(cp >= 0xfe10 && cp <= 0xfe19) || // Vertical Forms
(cp >= 0xfe30 && cp <= 0xfe6f) || // CJK Compatibility Forms
(cp >= 0xff00 && cp <= 0xff60) || // Fullwidth Forms
(cp >= 0xffe0 && cp <= 0xffe6) || // Fullwidth Forms
(cp >= 0x20000 && cp <= 0x2fffd) || // CJK
(cp >= 0x30000 && cp <= 0x3fffd) ||
// Miscellaneous Symbols and Pictographs + Emoticons:
(cp >= 0x1f300 && cp <= 0x1f64f) ||
// Supplemental Symbols and Pictographs:
(cp >= 0x1f900 && cp <= 0x1f9ff))));
return true;
} | O0 | c | fmt::v11::detail::compute_width(fmt::v11::basic_string_view<char>)::count_code_points::operator()(unsigned int, fmt::v11::basic_string_view<char>) const:
subq $0x38, %rsp
movq %rdx, 0x28(%rsp)
movq %rcx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %eax, %eax
cmpl $0x1100, 0x1c(%rsp) # imm = 0x1100
movb %al, 0x1b(%rsp)
jb 0xc5466
movb $0x1, %al
cmpl $0x115f, 0x1c(%rsp) # imm = 0x115F
movb %al, 0xf(%rsp)
jbe 0xc545e
movb $0x1, %al
cmpl $0x2329, 0x1c(%rsp) # imm = 0x2329
movb %al, 0xf(%rsp)
je 0xc545e
movb $0x1, %al
cmpl $0x232a, 0x1c(%rsp) # imm = 0x232A
movb %al, 0xf(%rsp)
je 0xc545e
cmpl $0x2e80, 0x1c(%rsp) # imm = 0x2E80
jb 0xc5339
cmpl $0xa4cf, 0x1c(%rsp) # imm = 0xA4CF
ja 0xc5339
movb $0x1, %al
cmpl $0x303f, 0x1c(%rsp) # imm = 0x303F
movb %al, 0xf(%rsp)
jne 0xc545e
cmpl $0xac00, 0x1c(%rsp) # imm = 0xAC00
jb 0xc5357
movb $0x1, %al
cmpl $0xd7a3, 0x1c(%rsp) # imm = 0xD7A3
movb %al, 0xf(%rsp)
jbe 0xc545e
cmpl $0xf900, 0x1c(%rsp) # imm = 0xF900
jb 0xc5375
movb $0x1, %al
cmpl $0xfaff, 0x1c(%rsp) # imm = 0xFAFF
movb %al, 0xf(%rsp)
jbe 0xc545e
cmpl $0xfe10, 0x1c(%rsp) # imm = 0xFE10
jb 0xc5393
movb $0x1, %al
cmpl $0xfe19, 0x1c(%rsp) # imm = 0xFE19
movb %al, 0xf(%rsp)
jbe 0xc545e
cmpl $0xfe30, 0x1c(%rsp) # imm = 0xFE30
jb 0xc53b1
movb $0x1, %al
cmpl $0xfe6f, 0x1c(%rsp) # imm = 0xFE6F
movb %al, 0xf(%rsp)
jbe 0xc545e
cmpl $0xff00, 0x1c(%rsp) # imm = 0xFF00
jb 0xc53cf
movb $0x1, %al
cmpl $0xff60, 0x1c(%rsp) # imm = 0xFF60
movb %al, 0xf(%rsp)
jbe 0xc545e
cmpl $0xffe0, 0x1c(%rsp) # imm = 0xFFE0
jb 0xc53e9
movb $0x1, %al
cmpl $0xffe6, 0x1c(%rsp) # imm = 0xFFE6
movb %al, 0xf(%rsp)
jbe 0xc545e
cmpl $0x20000, 0x1c(%rsp) # imm = 0x20000
jb 0xc5403
movb $0x1, %al
cmpl $0x2fffd, 0x1c(%rsp) # imm = 0x2FFFD
movb %al, 0xf(%rsp)
jbe 0xc545e
cmpl $0x30000, 0x1c(%rsp) # imm = 0x30000
jb 0xc541d
movb $0x1, %al
cmpl $0x3fffd, 0x1c(%rsp) # imm = 0x3FFFD
movb %al, 0xf(%rsp)
jbe 0xc545e
cmpl $0x1f300, 0x1c(%rsp) # imm = 0x1F300
jb 0xc5437
movb $0x1, %al
cmpl $0x1f64f, 0x1c(%rsp) # imm = 0x1F64F
movb %al, 0xf(%rsp)
jbe 0xc545e
xorl %eax, %eax
cmpl $0x1f900, 0x1c(%rsp) # imm = 0x1F900
movb %al, 0xe(%rsp)
jb 0xc5456
cmpl $0x1f9ff, 0x1c(%rsp) # imm = 0x1F9FF
setbe %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
movb %al, 0x1b(%rsp)
movb 0x1b(%rsp), %al
andb $0x1, %al
movzbl %al, %edi
addl $0x1, %edi
callq 0xa6a90
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, %ecx
movq (%rax), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movb $0x1, %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZZN3fmt3v116detail13compute_widthENS0_17basic_string_viewIcEEENK17count_code_pointsclEjS3_:
sub rsp, 38h
mov [rsp+38h+var_10], rdx
mov [rsp+38h+var_8], rcx
mov [rsp+38h+var_18], rdi
mov [rsp+38h+var_1C], esi
mov rax, [rsp+38h+var_18]
mov [rsp+38h+var_28], rax
xor eax, eax
cmp [rsp+38h+var_1C], 1100h
mov [rsp+38h+var_1D], al
jb loc_C5466
mov al, 1
cmp [rsp+38h+var_1C], 115Fh
mov [rsp+38h+var_29], al
jbe loc_C545E
mov al, 1
cmp [rsp+38h+var_1C], 2329h
mov [rsp+38h+var_29], al
jz loc_C545E
mov al, 1
cmp [rsp+38h+var_1C], 232Ah
mov [rsp+38h+var_29], al
jz loc_C545E
cmp [rsp+38h+var_1C], 2E80h
jb short loc_C5339
cmp [rsp+38h+var_1C], 0A4CFh
ja short loc_C5339
mov al, 1
cmp [rsp+38h+var_1C], 303Fh
mov [rsp+38h+var_29], al
jnz loc_C545E
loc_C5339:
cmp [rsp+38h+var_1C], 0AC00h
jb short loc_C5357
mov al, 1
cmp [rsp+38h+var_1C], 0D7A3h
mov [rsp+38h+var_29], al
jbe loc_C545E
loc_C5357:
cmp [rsp+38h+var_1C], 0F900h
jb short loc_C5375
mov al, 1
cmp [rsp+38h+var_1C], 0FAFFh
mov [rsp+38h+var_29], al
jbe loc_C545E
loc_C5375:
cmp [rsp+38h+var_1C], 0FE10h
jb short loc_C5393
mov al, 1
cmp [rsp+38h+var_1C], 0FE19h
mov [rsp+38h+var_29], al
jbe loc_C545E
loc_C5393:
cmp [rsp+38h+var_1C], 0FE30h
jb short loc_C53B1
mov al, 1
cmp [rsp+38h+var_1C], 0FE6Fh
mov [rsp+38h+var_29], al
jbe loc_C545E
loc_C53B1:
cmp [rsp+38h+var_1C], 0FF00h
jb short loc_C53CF
mov al, 1
cmp [rsp+38h+var_1C], 0FF60h
mov [rsp+38h+var_29], al
jbe loc_C545E
loc_C53CF:
cmp [rsp+38h+var_1C], 0FFE0h
jb short loc_C53E9
mov al, 1
cmp [rsp+38h+var_1C], 0FFE6h
mov [rsp+38h+var_29], al
jbe short loc_C545E
loc_C53E9:
cmp [rsp+38h+var_1C], offset _ZNSaINSt8__detail4_NFAINSt7__cxx1112regex_traitsIcEEEEEC2ERKS5_; std::allocator<std::__detail::_NFA<std::regex_traits<char>>>::allocator(std::allocator<std::__detail::_NFA<std::regex_traits<char>>> const&)
jb short loc_C5403
mov al, 1
cmp [rsp+38h+var_1C], 2FFFDh
mov [rsp+38h+var_29], al
jbe short loc_C545E
loc_C5403:
cmp [rsp+38h+var_1C], 30000h
jb short loc_C541D
mov al, 1
cmp [rsp+38h+var_1C], 3FFFDh
mov [rsp+38h+var_29], al
jbe short loc_C545E
loc_C541D:
cmp [rsp+38h+var_1C], 1F300h
jb short loc_C5437
mov al, 1
cmp [rsp+38h+var_1C], 1F64Fh
mov [rsp+38h+var_29], al
jbe short loc_C545E
loc_C5437:
xor eax, eax
cmp [rsp+38h+var_1C], 1F900h
mov [rsp+38h+var_2A], al
jb short loc_C5456
cmp [rsp+38h+var_1C], 1F9FFh
setbe al
mov [rsp+38h+var_2A], al
loc_C5456:
mov al, [rsp+38h+var_2A]
mov [rsp+38h+var_29], al
loc_C545E:
mov al, [rsp+38h+var_29]
mov [rsp+38h+var_1D], al
loc_C5466:
mov al, [rsp+38h+var_1D]
and al, 1
movzx edi, al
add edi, 1
call _ZN3fmt3v116detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v11::detail::to_unsigned<int>(int)
mov ecx, eax
mov rax, [rsp+38h+var_28]
mov ecx, ecx
mov rax, [rax]
add rcx, [rax]
mov [rax], rcx
mov al, 1
and al, 1
add rsp, 38h
retn
| char fmt::v11::detail::compute_width(fmt::v11::basic_string_view<char>)::count_code_points::operator()(
_QWORD **a1,
unsigned int a2)
{
bool v3; // [rsp+Eh] [rbp-2Ah]
char v4; // [rsp+Fh] [rbp-29h]
char v5; // [rsp+1Bh] [rbp-1Dh]
v5 = 0;
if ( a2 >= 0x1100 )
{
v4 = 1;
if ( a2 > 0x115F )
{
v4 = 1;
if ( a2 != 9001 )
{
v4 = 1;
if ( a2 != 9002 )
{
if ( a2 < 0x2E80 || a2 > 0xA4CF || (v4 = 1, a2 == 12351) )
{
if ( a2 < 0xAC00 || (v4 = 1, a2 > 0xD7A3) )
{
if ( a2 < 0xF900 || (v4 = 1, a2 > 0xFAFF) )
{
if ( a2 < 0xFE10 || (v4 = 1, a2 > 0xFE19) )
{
if ( a2 < 0xFE30 || (v4 = 1, a2 > 0xFE6F) )
{
if ( a2 < 0xFF00 || (v4 = 1, a2 > 0xFF60) )
{
if ( a2 < 0xFFE0 || (v4 = 1, a2 > 0xFFE6) )
{
if ( a2 < (unsigned int)std::allocator<std::__detail::_NFA<std::regex_traits<char>>>::allocator
|| (v4 = 1, a2 > 0x2FFFD) )
{
if ( a2 < 0x30000 || (v4 = 1, a2 > 0x3FFFD) )
{
if ( a2 < 0x1F300 || (v4 = 1, a2 > 0x1F64F) )
{
v3 = 0;
if ( a2 >= 0x1F900 )
v3 = a2 <= 0x1F9FF;
v4 = v3;
}
}
}
}
}
}
}
}
}
}
}
}
}
v5 = v4;
}
**a1 += (unsigned int)fmt::v11::detail::to_unsigned<int>((v5 & 1u) + 1);
return 1;
}
| operator():
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDX
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ESI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
XOR EAX,EAX
CMP dword ptr [RSP + 0x1c],0x1100
MOV byte ptr [RSP + 0x1b],AL
JC 0x001c5466
MOV AL,0x1
CMP dword ptr [RSP + 0x1c],0x115f
MOV byte ptr [RSP + 0xf],AL
JBE 0x001c545e
MOV AL,0x1
CMP dword ptr [RSP + 0x1c],0x2329
MOV byte ptr [RSP + 0xf],AL
JZ 0x001c545e
MOV AL,0x1
CMP dword ptr [RSP + 0x1c],0x232a
MOV byte ptr [RSP + 0xf],AL
JZ 0x001c545e
CMP dword ptr [RSP + 0x1c],0x2e80
JC 0x001c5339
CMP dword ptr [RSP + 0x1c],0xa4cf
JA 0x001c5339
MOV AL,0x1
CMP dword ptr [RSP + 0x1c],0x303f
MOV byte ptr [RSP + 0xf],AL
JNZ 0x001c545e
LAB_001c5339:
CMP dword ptr [RSP + 0x1c],0xac00
JC 0x001c5357
MOV AL,0x1
CMP dword ptr [RSP + 0x1c],0xd7a3
MOV byte ptr [RSP + 0xf],AL
JBE 0x001c545e
LAB_001c5357:
CMP dword ptr [RSP + 0x1c],0xf900
JC 0x001c5375
MOV AL,0x1
CMP dword ptr [RSP + 0x1c],0xfaff
MOV byte ptr [RSP + 0xf],AL
JBE 0x001c545e
LAB_001c5375:
CMP dword ptr [RSP + 0x1c],0xfe10
JC 0x001c5393
MOV AL,0x1
CMP dword ptr [RSP + 0x1c],0xfe19
MOV byte ptr [RSP + 0xf],AL
JBE 0x001c545e
LAB_001c5393:
CMP dword ptr [RSP + 0x1c],0xfe30
JC 0x001c53b1
MOV AL,0x1
CMP dword ptr [RSP + 0x1c],0xfe6f
MOV byte ptr [RSP + 0xf],AL
JBE 0x001c545e
LAB_001c53b1:
CMP dword ptr [RSP + 0x1c],0xff00
JC 0x001c53cf
MOV AL,0x1
CMP dword ptr [RSP + 0x1c],0xff60
MOV byte ptr [RSP + 0xf],AL
JBE 0x001c545e
LAB_001c53cf:
CMP dword ptr [RSP + 0x1c],0xffe0
JC 0x001c53e9
MOV AL,0x1
CMP dword ptr [RSP + 0x1c],0xffe6
MOV byte ptr [RSP + 0xf],AL
JBE 0x001c545e
LAB_001c53e9:
CMP dword ptr [RSP + 0x1c],0x20000
JC 0x001c5403
MOV AL,0x1
CMP dword ptr [RSP + 0x1c],0x2fffd
MOV byte ptr [RSP + 0xf],AL
JBE 0x001c545e
LAB_001c5403:
CMP dword ptr [RSP + 0x1c],0x30000
JC 0x001c541d
MOV AL,0x1
CMP dword ptr [RSP + 0x1c],0x3fffd
MOV byte ptr [RSP + 0xf],AL
JBE 0x001c545e
LAB_001c541d:
CMP dword ptr [RSP + 0x1c],0x1f300
JC 0x001c5437
MOV AL,0x1
CMP dword ptr [RSP + 0x1c],0x1f64f
MOV byte ptr [RSP + 0xf],AL
JBE 0x001c545e
LAB_001c5437:
XOR EAX,EAX
CMP dword ptr [RSP + 0x1c],0x1f900
MOV byte ptr [RSP + 0xe],AL
JC 0x001c5456
CMP dword ptr [RSP + 0x1c],0x1f9ff
SETBE AL
MOV byte ptr [RSP + 0xe],AL
LAB_001c5456:
MOV AL,byte ptr [RSP + 0xe]
MOV byte ptr [RSP + 0xf],AL
LAB_001c545e:
MOV AL,byte ptr [RSP + 0xf]
MOV byte ptr [RSP + 0x1b],AL
LAB_001c5466:
MOV AL,byte ptr [RSP + 0x1b]
AND AL,0x1
MOVZX EDI,AL
ADD EDI,0x1
CALL 0x001a6a90
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,ECX
MOV RAX,qword ptr [RAX]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV AL,0x1
AND AL,0x1
ADD RSP,0x38
RET
|
/* fmt::v11::detail::compute_width(fmt::v11::basic_string_view<char>)::count_code_points::TEMPNAMEPLACEHOLDERVALUE(unsigned
int, fmt::v11::basic_string_view<char>) const */
int8
fmt::v11::detail::compute_width(fmt::v11::basic_string_view<char>)::count_code_points::operator()
(int8 *param_1,uint param_2)
{
long *plVar1;
uint uVar2;
bool local_2a;
bool local_29;
bool local_1d;
local_1d = false;
if (0x10ff < param_2) {
local_29 = true;
if ((((((((0x115f < param_2) && (local_29 = true, param_2 != 0x2329)) &&
(local_29 = true, param_2 != 0x232a)) &&
(((param_2 < 0x2e80 || (0xa4cf < param_2)) || (local_29 = true, param_2 == 0x303f)))) &&
(((param_2 < 0xac00 || (local_29 = true, 0xd7a3 < param_2)) &&
((param_2 < 0xf900 || (local_29 = true, 0xfaff < param_2)))))) &&
(((param_2 < 0xfe10 || (local_29 = true, 0xfe19 < param_2)) &&
(((param_2 < 0xfe30 || (local_29 = true, 0xfe6f < param_2)) &&
((((param_2 < 0xff00 || (local_29 = true, 0xff60 < param_2)) &&
((param_2 < 0xffe0 || (local_29 = true, 0xffe6 < param_2)))) &&
((param_2 < 0x20000 || (local_29 = true, 0x2fffd < param_2)))))))))) &&
((param_2 < 0x30000 || (local_29 = true, 0x3fffd < param_2)))) &&
((param_2 < 0x1f300 || (local_29 = true, 0x1f64f < param_2)))) {
local_2a = 0x1f8ff < param_2 && param_2 < 0x1fa00;
local_29 = local_2a;
}
local_1d = local_29;
}
uVar2 = to_unsigned<int>(local_1d + 1);
plVar1 = (long *)*param_1;
*plVar1 = (ulong)uVar2 + *plVar1;
return CONCAT71((int7)((ulong)plVar1 >> 8),1);
}
|
|
5,789 | ma_bitmap_unlock | eloqsql/storage/maria/ma_bitmap.c | void _ma_bitmap_unlock(MARIA_SHARE *share)
{
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
uint send_signal;
DBUG_ENTER("_ma_bitmap_unlock");
if (!share->now_transactional)
DBUG_VOID_RETURN;
DBUG_ASSERT(bitmap->flush_all_requested > 0 && bitmap->non_flushable == 1);
mysql_mutex_lock(&bitmap->bitmap_lock);
bitmap->non_flushable= 0;
_ma_bitmap_unpin_all(share);
send_signal= bitmap->waiting_for_non_flushable;
if (!--bitmap->flush_all_requested)
send_signal|= bitmap->waiting_for_flush_all_requested;
mysql_mutex_unlock(&bitmap->bitmap_lock);
if (send_signal)
mysql_cond_broadcast(&bitmap->bitmap_cond);
DBUG_VOID_RETURN;
} | O0 | c | ma_bitmap_unlock:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa10, %rax # imm = 0xA10
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x7e7(%rax)
jne 0xb5c75e
jmp 0xb5c759
jmp 0xb5c7e5
jmp 0xb5c760
jmp 0xb5c762
movq -0x10(%rbp), %rdi
addq $0x88, %rdi
leaq 0x27621e(%rip), %rsi # 0xdd2992
movl $0x279, %edx # imm = 0x279
callq 0xb5c0a0
movq -0x10(%rbp), %rax
movl $0x0, 0x38(%rax)
movq -0x8(%rbp), %rdi
callq 0xb5c7f0
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rcx
movl 0x30(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x30(%rcx)
cmpl $0x0, %eax
jne 0xb5c7bb
movq -0x10(%rbp), %rax
movl 0x34(%rax), %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
addq $0x88, %rdi
callq 0xb5c350
cmpl $0x0, -0x14(%rbp)
je 0xb5c7e1
movq -0x10(%rbp), %rdi
addq $0xd0, %rdi
callq 0xb5c600
jmp 0xb5c7e3
jmp 0xb5c7e5
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ma_bitmap_unlock:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
add rax, 0A10h
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
cmp byte ptr [rax+7E7h], 0
jnz short loc_B5C75E
jmp short $+2
loc_B5C759:
jmp loc_B5C7E5
loc_B5C75E:
jmp short $+2
loc_B5C760:
jmp short $+2
loc_B5C762:
mov rdi, [rbp+var_10]
add rdi, 88h
lea rsi, aWorkspaceLlm4b_137; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 279h
call inline_mysql_mutex_lock_17
mov rax, [rbp+var_10]
mov dword ptr [rax+38h], 0
mov rdi, [rbp+var_8]
call _ma_bitmap_unpin_all
mov rax, [rbp+var_10]
mov eax, [rax+3Ch]
mov [rbp+var_14], eax
mov rcx, [rbp+var_10]
mov eax, [rcx+30h]
add eax, 0FFFFFFFFh
mov [rcx+30h], eax
cmp eax, 0
jnz short loc_B5C7BB
mov rax, [rbp+var_10]
mov eax, [rax+34h]
or eax, [rbp+var_14]
mov [rbp+var_14], eax
loc_B5C7BB:
mov rdi, [rbp+var_10]
add rdi, 88h
call inline_mysql_mutex_unlock_17
cmp [rbp+var_14], 0
jz short loc_B5C7E1
mov rdi, [rbp+var_10]
add rdi, 0D0h
call inline_mysql_cond_broadcast_2
loc_B5C7E1:
jmp short $+2
loc_B5C7E3:
jmp short $+2
loc_B5C7E5:
add rsp, 20h
pop rbp
retn
| long long ma_bitmap_unlock(long long a1)
{
long long result; // rax
int v2; // eax
int v3; // [rsp+Ch] [rbp-14h]
result = a1;
if ( *(_BYTE *)(a1 + 2023) )
{
inline_mysql_mutex_lock_17(
a1 + 2712,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c",
0x279u);
*(_DWORD *)(a1 + 2632) = 0;
ma_bitmap_unpin_all(a1);
v3 = *(_DWORD *)(a1 + 2636);
v2 = *(_DWORD *)(a1 + 2624) - 1;
*(_DWORD *)(a1 + 2624) = v2;
if ( !v2 )
v3 |= *(_DWORD *)(a1 + 2628);
result = inline_mysql_mutex_unlock_17(a1 + 2712);
if ( v3 )
return inline_mysql_cond_broadcast_2(a1 + 2784);
}
return result;
}
| add:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00b5c74a
LAB_00b5c74a:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00b5c771
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x10
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0074a5d0
LAB_00b5c771:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x20
POP RBP
RET
|
/* Json_writer_array::add(st_mysql_const_lex_string const&) */
Json_writer_array * __thiscall
Json_writer_array::add(Json_writer_array *this,st_mysql_const_lex_string *param_1)
{
if (*(long *)(this + 8) != 0) {
Json_value_helper::add_str
((Json_value_helper *)(this + 0x10),*(char **)param_1,*(ulong *)(param_1 + 8));
}
return this;
}
|
|
5,790 | inline_mysql_cond_destroy | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_destroy(
mysql_cond_t *that)
{
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
{
PSI_COND_CALL(destroy_cond)(that->m_psi);
that->m_psi= NULL;
}
#endif
return pthread_cond_destroy(&that->m_cond);
} | O0 | c | inline_mysql_cond_destroy:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xffe54
leaq 0x1bf261(%rip), %rax # 0x2bf098
movq (%rax), %rax
movq 0x68(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rdi
callq 0x2a270
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_cond_destroy_5:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_FFE54
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+68h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
mov rax, [rbp+var_8]
mov qword ptr [rax+30h], 0
loc_FFE54:
mov rdi, [rbp+var_8]
call _pthread_cond_destroy
add rsp, 10h
pop rbp
retn
| long long inline_mysql_cond_destroy_5(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
{
((void ( *)(_QWORD))PSI_server[13])(*(_QWORD *)(a1 + 48));
*(_QWORD *)(a1 + 48) = 0LL;
}
return pthread_cond_destroy(a1);
}
| inline_mysql_cond_destroy:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001ffe54
LEA RAX,[0x3bf098]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x30],0x0
LAB_001ffe54:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a270
ADD RSP,0x10
POP RBP
RET
|
void inline_mysql_cond_destroy(pthread_cond_t *param_1)
{
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x68))(param_1[1].__align);
param_1[1].__align = 0;
}
pthread_cond_destroy(param_1);
return;
}
|
|
5,791 | llama_sampler_mirostat_clone(llama_sampler const*) | monkey531[P]llama/src/llama-sampling.cpp | static struct llama_sampler * llama_sampler_mirostat_clone(const struct llama_sampler * smpl) {
const auto * ctx = (const llama_sampler_mirostat *) smpl->ctx;
auto * result = llama_sampler_init_mirostat(ctx->n_vocab, ctx->seed, ctx->tau, ctx->eta, ctx->m);
// copy the state
{
auto * result_ctx = (llama_sampler_mirostat *) smpl->ctx;
result_ctx->mu = ctx->mu;
result_ctx->rng = ctx->rng;
}
return result;
} | O0 | cpp | llama_sampler_mirostat_clone(llama_sampler const*):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movl (%rax), %edi
movq 0x18(%rsp), %rax
movl 0x4(%rax), %esi
movq 0x18(%rsp), %rax
movss 0xc(%rax), %xmm0
movq 0x18(%rsp), %rax
movss 0x10(%rax), %xmm1
movq 0x18(%rsp), %rax
movl 0x14(%rax), %edx
callq 0x21e8e0
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movss 0x18(%rax), %xmm0
movq 0x8(%rsp), %rax
movss %xmm0, 0x18(%rax)
movq 0x18(%rsp), %rsi
addq $0x20, %rsi
movq 0x8(%rsp), %rdi
addq $0x20, %rdi
movl $0x1388, %edx # imm = 0x1388
callq 0x200fa0
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZL28llama_sampler_mirostat_clonePK13llama_sampler:
sub rsp, 28h
mov [rsp+28h+var_8], rdi; __int64
mov rax, [rsp+28h+var_8]
mov rax, [rax+8]
mov qword ptr [rsp+28h+var_10], rax; int
mov rax, qword ptr [rsp+28h+var_10]
mov edi, [rax]; int
mov rax, qword ptr [rsp+28h+var_10]
mov esi, [rax+4]; int
mov rax, qword ptr [rsp+28h+var_10]
movss xmm0, dword ptr [rax+0Ch]
mov rax, qword ptr [rsp+28h+var_10]
movss xmm1, dword ptr [rax+10h]
mov rax, qword ptr [rsp+28h+var_10]
mov edx, [rax+14h]; int
call _llama_sampler_init_mirostat
mov [rsp+28h+var_18], rax
mov rax, [rsp+28h+var_8]
mov rax, [rax+8]
mov [rsp+28h+var_20], rax
mov rax, qword ptr [rsp+28h+var_10]
movss xmm0, dword ptr [rax+18h]
mov rax, [rsp+28h+var_20]
movss dword ptr [rax+18h], xmm0
mov rsi, qword ptr [rsp+28h+var_10]
add rsi, 20h ; ' '
mov rdi, [rsp+28h+var_20]
add rdi, 20h ; ' '
mov edx, 1388h
call _memcpy
mov rax, [rsp+28h+var_18]
add rsp, 28h
retn
| long long llama_sampler_mirostat_clone(long long a1, long long a2, long long a3, int a4, int a5, int a6)
{
long long v6; // rax
void *v8; // [rsp+0h] [rbp-28h]
int v9; // [rsp+8h] [rbp-20h]
void *v10; // [rsp+10h] [rbp-18h]
long long inited; // [rsp+10h] [rbp-18h]
int v12[2]; // [rsp+18h] [rbp-10h]
long long v13; // [rsp+20h] [rbp-8h]
inited = llama_sampler_init_mirostat(
**(_DWORD **)(a1 + 8),
*(_DWORD *)(*(_QWORD *)(a1 + 8) + 4LL),
*(_DWORD *)(*(_QWORD *)(a1 + 8) + 20LL),
a4,
a5,
a6,
v8,
v9,
v10,
*(_QWORD *)(a1 + 8),
a1);
v6 = *(_QWORD *)(v13 + 8);
*(_DWORD *)(v6 + 24) = *(_DWORD *)(*(_QWORD *)v12 + 24LL);
memcpy(v6 + 32, *(_QWORD *)v12 + 32LL, 5000LL);
return inited;
}
| |||
5,792 | llama_sampler_mirostat_clone(llama_sampler const*) | monkey531[P]llama/src/llama-sampling.cpp | static struct llama_sampler * llama_sampler_mirostat_clone(const struct llama_sampler * smpl) {
const auto * ctx = (const llama_sampler_mirostat *) smpl->ctx;
auto * result = llama_sampler_init_mirostat(ctx->n_vocab, ctx->seed, ctx->tau, ctx->eta, ctx->m);
// copy the state
{
auto * result_ctx = (llama_sampler_mirostat *) smpl->ctx;
result_ctx->mu = ctx->mu;
result_ctx->rng = ctx->rng;
}
return result;
} | O3 | cpp | llama_sampler_mirostat_clone(llama_sampler const*):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movl (%r14), %edi
movl 0x4(%r14), %esi
movss 0xc(%r14), %xmm0
movss 0x10(%r14), %xmm1
movl 0x14(%r14), %edx
callq 0x6c2c0
movq %rax, %r15
movq 0x8(%rbx), %rdi
movss 0x18(%r14), %xmm0
movss %xmm0, 0x18(%rdi)
addq $0x20, %r14
addq $0x20, %rdi
movl $0x1388, %edx # imm = 0x1388
movq %r14, %rsi
callq 0x67420
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
| _ZL28llama_sampler_mirostat_clonePK13llama_sampler:
push r15
push r14
push rbx
mov rbx, rdi
mov r14, [rdi+8]
mov edi, [r14]
mov esi, [r14+4]
movss xmm0, dword ptr [r14+0Ch]
movss xmm1, dword ptr [r14+10h]
mov edx, [r14+14h]
call _llama_sampler_init_mirostat
mov r15, rax
mov rdi, [rbx+8]
movss xmm0, dword ptr [r14+18h]
movss dword ptr [rdi+18h], xmm0
add r14, 20h ; ' '
add rdi, 20h ; ' '
mov edx, 1388h
mov rsi, r14
call _memcpy
mov rax, r15
pop rbx
pop r14
pop r15
retn
| _QWORD * llama_sampler_mirostat_clone(long long a1)
{
long long v1; // r14
_QWORD *inited; // r15
long long v3; // rdi
v1 = *(_QWORD *)(a1 + 8);
inited = llama_sampler_init_mirostat(
*(_DWORD *)v1,
*(_DWORD *)(v1 + 4),
*(_DWORD *)(v1 + 20),
COERCE_DOUBLE((unsigned long long)*(_DWORD *)(v1 + 12)),
*(float *)(v1 + 16));
v3 = *(_QWORD *)(a1 + 8);
*(_DWORD *)(v3 + 24) = *(_DWORD *)(v1 + 24);
memcpy(v3 + 32, v1 + 32, 5000LL);
return inited;
}
| llama_sampler_mirostat_clone:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x8]
MOV EDI,dword ptr [R14]
MOV ESI,dword ptr [R14 + 0x4]
MOVSS XMM0,dword ptr [R14 + 0xc]
MOVSS XMM1,dword ptr [R14 + 0x10]
MOV EDX,dword ptr [R14 + 0x14]
CALL 0x0016c2c0
MOV R15,RAX
MOV RDI,qword ptr [RBX + 0x8]
MOVSS XMM0,dword ptr [R14 + 0x18]
MOVSS dword ptr [RDI + 0x18],XMM0
ADD R14,0x20
ADD RDI,0x20
MOV EDX,0x1388
MOV RSI,R14
CALL 0x00167420
MOV RAX,R15
POP RBX
POP R14
POP R15
RET
|
/* llama_sampler_mirostat_clone(llama_sampler const*) */
int8 llama_sampler_mirostat_clone(llama_sampler *param_1)
{
int4 *puVar1;
long lVar2;
int8 uVar3;
puVar1 = *(int4 **)(param_1 + 8);
uVar3 = llama_sampler_init_mirostat(puVar1[3],puVar1[4],*puVar1,puVar1[1],puVar1[5]);
lVar2 = *(long *)(param_1 + 8);
*(int4 *)(lVar2 + 0x18) = puVar1[6];
memcpy((void *)(lVar2 + 0x20),puVar1 + 8,5000);
return uVar3;
}
|
|
5,793 | js_typed_array_get_buffer | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_get_buffer(JSContext *ctx, JSValue this_val)
{
JSObject *p;
JSTypedArray *ta;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
ta = p->u.typed_array;
return js_dup(JS_MKPTR(JS_TAG_OBJECT, ta->buffer));
} | O1 | c | js_typed_array_get_buffer:
pushq %rbx
subq $0x10, %rsp
movq %rsi, 0x8(%rsp)
cmpl $-0x1, %edx
jne 0x80845
movq 0x8(%rsp), %rbx
movzwl 0x6(%rbx), %eax
addl $-0x15, %eax
cmpw $0xc, %ax
jb 0x80855
leaq 0x21bc5(%rip), %rsi # 0xa2411
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x22567
testq %rbx, %rbx
je 0x8086d
movq 0x30(%rbx), %rax
movq 0x18(%rax), %rax
incl (%rax)
movq $-0x1, %rdx
jmp 0x80874
movl $0x6, %edx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
| js_typed_array_get_buffer:
push rbx
sub rsp, 10h
mov [rsp+18h+var_10], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_80845
mov rbx, [rsp+18h+var_10]
movzx eax, word ptr [rbx+6]
add eax, 0FFFFFFEBh
cmp ax, 0Ch
jb short loc_80855
loc_80845:
lea rsi, aNotATypedarray; "not a TypedArray"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
loc_80855:
test rbx, rbx
jz short loc_8086D
mov rax, [rbx+30h]
mov rax, [rax+18h]
inc dword ptr [rax]
mov rdx, 0FFFFFFFFFFFFFFFFh
jmp short loc_80874
loc_8086D:
mov edx, 6
xor eax, eax
loc_80874:
add rsp, 10h
pop rbx
retn
| _DWORD * js_typed_array_get_buffer(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rbx
_DWORD *result; // rax
char v16; // [rsp+0h] [rbp-18h]
if ( (_DWORD)a3 != -1 || (v14 = a2, (unsigned __int16)(*(_WORD *)(a2 + 6) - 21) >= 0xCu) )
{
v14 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a TypedArray", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v16);
}
if ( !v14 )
return 0LL;
result = *(_DWORD **)(*(_QWORD *)(v14 + 48) + 24LL);
++*result;
return result;
}
| js_typed_array_get_buffer:
PUSH RBX
SUB RSP,0x10
MOV qword ptr [RSP + 0x8],RSI
CMP EDX,-0x1
JNZ 0x00180845
MOV RBX,qword ptr [RSP + 0x8]
MOVZX EAX,word ptr [RBX + 0x6]
ADD EAX,-0x15
CMP AX,0xc
JC 0x00180855
LAB_00180845:
LEA RSI,[0x1a2411]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x00122567
LAB_00180855:
TEST RBX,RBX
JZ 0x0018086d
MOV RAX,qword ptr [RBX + 0x30]
MOV RAX,qword ptr [RAX + 0x18]
INC dword ptr [RAX]
MOV RDX,-0x1
JMP 0x00180874
LAB_0018086d:
MOV EDX,0x6
XOR EAX,EAX
LAB_00180874:
ADD RSP,0x10
POP RBX
RET
|
int1 [16] js_typed_array_get_buffer(int8 param_1,long param_2,int param_3)
{
int *piVar1;
int8 uVar2;
int1 auVar3 [16];
if ((param_3 != -1) || (0xb < (ushort)(*(short *)(param_2 + 6) - 0x15U))) {
param_2 = 0;
JS_ThrowTypeError(param_1,"not a TypedArray");
}
if (param_2 == 0) {
uVar2 = 6;
piVar1 = (int *)0x0;
}
else {
piVar1 = *(int **)(*(long *)(param_2 + 0x30) + 0x18);
*piVar1 = *piVar1 + 1;
uVar2 = 0xffffffffffffffff;
}
auVar3._8_8_ = uVar2;
auVar3._0_8_ = piVar1;
return auVar3;
}
|
|
5,794 | js_typed_array_get_buffer | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_get_buffer(JSContext *ctx, JSValue this_val)
{
JSObject *p;
JSTypedArray *ta;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
ta = p->u.typed_array;
return js_dup(JS_MKPTR(JS_TAG_OBJECT, ta->buffer));
} | O2 | c | js_typed_array_get_buffer:
pushq %rax
callq 0x3280b
testq %rax, %rax
je 0x6c130
movq 0x30(%rax), %rax
movq 0x18(%rax), %rax
incl (%rax)
pushq $-0x1
popq %rdx
jmp 0x6c135
pushq $0x6
popq %rdx
xorl %eax, %eax
popq %rcx
retq
| js_typed_array_get_buffer:
push rax
call get_typed_array
test rax, rax
jz short loc_6C130
mov rax, [rax+30h]
mov rax, [rax+18h]
inc dword ptr [rax]
push 0FFFFFFFFFFFFFFFFh
pop rdx
jmp short loc_6C135
loc_6C130:
push 6
pop rdx
xor eax, eax
loc_6C135:
pop rcx
retn
| _DWORD * js_typed_array_get_buffer(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long typed_array; // rax
_DWORD *result; // rax
typed_array = get_typed_array(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( !typed_array )
return 0LL;
result = *(_DWORD **)(*(_QWORD *)(typed_array + 48) + 24LL);
++*result;
return result;
}
| js_typed_array_get_buffer:
PUSH RAX
CALL 0x0013280b
TEST RAX,RAX
JZ 0x0016c130
MOV RAX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RAX + 0x18]
INC dword ptr [RAX]
PUSH -0x1
POP RDX
JMP 0x0016c135
LAB_0016c130:
PUSH 0x6
POP RDX
XOR EAX,EAX
LAB_0016c135:
POP RCX
RET
|
int1 [16] js_typed_array_get_buffer(void)
{
long lVar1;
int *piVar2;
int8 uVar3;
int1 auVar4 [16];
lVar1 = get_typed_array();
if (lVar1 == 0) {
uVar3 = 6;
piVar2 = (int *)0x0;
}
else {
piVar2 = *(int **)(*(long *)(lVar1 + 0x30) + 0x18);
*piVar2 = *piVar2 + 1;
uVar3 = 0xffffffffffffffff;
}
auVar4._8_8_ = uVar3;
auVar4._0_8_ = piVar2;
return auVar4;
}
|
|
5,795 | my_hash_next | eloqsql/mysys/hash.c | uchar* my_hash_next(const HASH *hash, const uchar *key, size_t length,
HASH_SEARCH_STATE *current_record)
{
HASH_LINK *pos;
uint idx;
if (*current_record != NO_RECORD)
{
HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*);
for (idx=data[*current_record].next; idx != NO_RECORD ; idx=pos->next)
{
pos=data+idx;
if (!hashcmp(hash,pos,key,length))
{
*current_record= idx;
return pos->data;
}
}
*current_record= NO_RECORD;
}
return 0;
} | O0 | c | my_hash_next:
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 -0x28(%rbp), %rax
cmpl $-0x1, (%rax)
je 0x81c07
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
movl (%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
cmpl $-0x1, -0x34(%rbp)
je 0x81bfd
movq -0x40(%rbp), %rax
movl -0x34(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x81a90
cmpl $0x0, %eax
jne 0x81bf0
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x81c0f
jmp 0x81bf2
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0x81ba7
movq -0x28(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| my_hash_next:
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_28]
cmp dword ptr [rax], 0FFFFFFFFh
jz loc_81C07
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
mov ecx, [rcx]
shl rcx, 4
add rax, rcx
mov eax, [rax]
mov [rbp+var_34], eax
loc_81BA7:
cmp [rbp+var_34], 0FFFFFFFFh
jz short loc_81BFD
mov rax, [rbp+var_40]
mov ecx, [rbp+var_34]
shl rcx, 4
add rax, rcx
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
call hashcmp_0
cmp eax, 0
jnz short loc_81BF0
mov ecx, [rbp+var_34]
mov rax, [rbp+var_28]
mov [rax], ecx
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp short loc_81C0F
loc_81BF0:
jmp short $+2
loc_81BF2:
mov rax, [rbp+var_30]
mov eax, [rax]
mov [rbp+var_34], eax
jmp short loc_81BA7
loc_81BFD:
mov rax, [rbp+var_28]
mov dword ptr [rax], 0FFFFFFFFh
loc_81C07:
mov [rbp+var_8], 0
loc_81C0F:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long my_hash_next(long long a1, long long a2, long long a3, unsigned int *a4)
{
long long v5; // [rsp+0h] [rbp-40h]
unsigned int i; // [rsp+Ch] [rbp-34h]
long long v7; // [rsp+10h] [rbp-30h]
if ( *a4 != -1 )
{
v5 = *(_QWORD *)(a1 + 40);
for ( i = *(_DWORD *)(16LL * *a4 + v5); i != -1; i = *(_DWORD *)v7 )
{
v7 = 16LL * i + v5;
if ( !hashcmp_0(a1, v7, a2, a3) )
{
*a4 = i;
return *(_QWORD *)(v7 + 8);
}
}
*a4 = -1;
}
return 0LL;
}
| my_hash_next:
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 + -0x28]
CMP dword ptr [RAX],-0x1
JZ 0x00181c07
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX]
SHL RCX,0x4
ADD RAX,RCX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
LAB_00181ba7:
CMP dword ptr [RBP + -0x34],-0x1
JZ 0x00181bfd
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x34]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x00181a90
CMP EAX,0x0
JNZ 0x00181bf0
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00181c0f
LAB_00181bf0:
JMP 0x00181bf2
LAB_00181bf2:
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x00181ba7
LAB_00181bfd:
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0xffffffff
LAB_00181c07:
MOV qword ptr [RBP + -0x8],0x0
LAB_00181c0f:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 my_hash_next(long param_1,int8 param_2,int8 param_3,uint *param_4)
{
long lVar1;
int iVar2;
uint *puVar3;
uint local_3c;
if (*param_4 != 0xffffffff) {
lVar1 = *(long *)(param_1 + 0x28);
local_3c = *(uint *)(lVar1 + (ulong)*param_4 * 0x10);
while (local_3c != 0xffffffff) {
puVar3 = (uint *)(lVar1 + (ulong)local_3c * 0x10);
iVar2 = hashcmp(param_1,puVar3,param_2,param_3);
if (iVar2 == 0) {
*param_4 = local_3c;
return *(int8 *)(puVar3 + 2);
}
local_3c = *puVar3;
}
*param_4 = 0xffffffff;
}
return 0;
}
|
|
5,796 | my_hash_next | eloqsql/mysys/hash.c | uchar* my_hash_next(const HASH *hash, const uchar *key, size_t length,
HASH_SEARCH_STATE *current_record)
{
HASH_LINK *pos;
uint idx;
if (*current_record != NO_RECORD)
{
HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*);
for (idx=data[*current_record].next; idx != NO_RECORD ; idx=pos->next)
{
pos=data+idx;
if (!hashcmp(hash,pos,key,length))
{
*current_record= idx;
return pos->data;
}
}
*current_record= NO_RECORD;
}
return 0;
} | O3 | c | my_hash_next:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x38(%rbp)
movl (%rcx), %ebx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %rbx
je 0x657b5
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, -0x30(%rbp)
movq 0x28(%rdi), %r13
shlq $0x4, %rbx
addq %r13, %rbx
movl (%rbx), %r14d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %r14
je 0x657ab
movq %r14, %rax
shlq $0x4, %rax
leaq (%rax,%r13), %rbx
movq 0x8(%r13,%rax), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq 0x656ad
testl %eax, %eax
jne 0x6576e
movq -0x30(%rbp), %rax
movl %r14d, (%rax)
movq 0x8(%rbx), %rax
jmp 0x657b7
movq -0x30(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_hash_next:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], rdx
mov ebx, [rcx]
mov eax, 0FFFFFFFFh
cmp rbx, rax
jz short loc_657B5
mov r15, rsi
mov r12, rdi
mov [rbp+var_30], rcx
mov r13, [rdi+28h]
shl rbx, 4
add rbx, r13
loc_6576E:
mov r14d, [rbx]
mov eax, 0FFFFFFFFh
cmp r14, rax
jz short loc_657AB
mov rax, r14
shl rax, 4
lea rbx, [rax+r13]
mov rsi, [r13+rax+8]
mov rdi, r12
mov rdx, r15
mov rcx, [rbp+var_38]
call hashcmp_0
test eax, eax
jnz short loc_6576E
mov rax, [rbp+var_30]
mov [rax], r14d
mov rax, [rbx+8]
jmp short loc_657B7
loc_657AB:
mov rax, [rbp+var_30]
mov dword ptr [rax], 0FFFFFFFFh
loc_657B5:
xor eax, eax
loc_657B7:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_hash_next(_QWORD *a1, long long a2, long long a3, _DWORD *a4)
{
long long v4; // rbx
long long v5; // r13
unsigned int *v6; // rbx
long long v7; // r14
v4 = (unsigned int)*a4;
if ( v4 != 0xFFFFFFFFLL )
{
v5 = a1[5];
v6 = (unsigned int *)(v5 + 16 * v4);
while ( 1 )
{
v7 = *v6;
if ( v7 == 0xFFFFFFFFLL )
break;
v6 = (unsigned int *)(16 * v7 + v5);
if ( !hashcmp_0(a1, *((_QWORD *)v6 + 1), a2, a3) )
{
*a4 = v7;
return *((_QWORD *)v6 + 1);
}
}
*a4 = -1;
}
return 0LL;
}
| my_hash_next:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],RDX
MOV EBX,dword ptr [RCX]
MOV EAX,0xffffffff
CMP RBX,RAX
JZ 0x001657b5
MOV R15,RSI
MOV R12,RDI
MOV qword ptr [RBP + -0x30],RCX
MOV R13,qword ptr [RDI + 0x28]
SHL RBX,0x4
ADD RBX,R13
LAB_0016576e:
MOV R14D,dword ptr [RBX]
MOV EAX,0xffffffff
CMP R14,RAX
JZ 0x001657ab
MOV RAX,R14
SHL RAX,0x4
LEA RBX,[RAX + R13*0x1]
MOV RSI,qword ptr [R13 + RAX*0x1 + 0x8]
MOV RDI,R12
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x38]
CALL 0x001656ad
TEST EAX,EAX
JNZ 0x0016576e
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],R14D
MOV RAX,qword ptr [RBX + 0x8]
JMP 0x001657b7
LAB_001657ab:
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],0xffffffff
LAB_001657b5:
XOR EAX,EAX
LAB_001657b7:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 my_hash_next(long param_1,int8 param_2,int8 param_3,uint *param_4)
{
uint uVar1;
long lVar2;
int iVar3;
long lVar4;
int8 uVar5;
uint *puVar6;
if ((ulong)*param_4 == 0xffffffff) {
LAB_001657b5:
uVar5 = 0;
}
else {
lVar2 = *(long *)(param_1 + 0x28);
puVar6 = (uint *)((ulong)*param_4 * 0x10 + lVar2);
do {
uVar1 = *puVar6;
if ((ulong)uVar1 == 0xffffffff) {
*param_4 = 0xffffffff;
goto LAB_001657b5;
}
lVar4 = (ulong)uVar1 * 0x10;
puVar6 = (uint *)(lVar4 + lVar2);
iVar3 = hashcmp(param_1,*(int8 *)(lVar2 + 8 + lVar4),param_2,param_3);
} while (iVar3 != 0);
*param_4 = uVar1;
uVar5 = *(int8 *)(puVar6 + 2);
}
return uVar5;
}
|
|
5,797 | ftxui::Loop::Loop(ftxui::ScreenInteractive*, std::shared_ptr<ftxui::ComponentBase>) | Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/loop.cpp | Loop::Loop(ScreenInteractive* screen, Component component)
: screen_(screen), component_(std::move(component)) {
screen_->PreMain();
} | O3 | cpp | ftxui::Loop::Loop(ftxui::ScreenInteractive*, std::shared_ptr<ftxui::ComponentBase>):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movups (%rdx), %xmm0
movq %rax, 0x8(%rdx)
movups %xmm0, 0x8(%rdi)
movq %rax, (%rdx)
movq %rsi, %rdi
callq 0x2d692
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x36857
callq 0x14af8
movq %r14, %rdi
callq 0xb780
nop
| _ZN5ftxui4LoopC2EPNS_17ScreenInteractiveESt10shared_ptrINS_13ComponentBaseEE:
push r14
push rbx
push rax
mov rbx, rdi
mov [rdi], rsi
xor eax, eax
mov [rdi+10h], rax
movups xmm0, xmmword ptr [rdx]
mov [rdx+8], rax
movups xmmword ptr [rdi+8], xmm0
mov [rdx], rax
mov rdi, rsi; this
call _ZN5ftxui17ScreenInteractive7PreMainEv; ftxui::ScreenInteractive::PreMain(void)
add rsp, 8
pop rbx
pop r14
retn
mov r14, rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_36857
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_36857:
mov rdi, r14
call __Unwind_Resume
| long long ftxui::Loop::Loop(long long a1, ftxui::ScreenInteractive *a2, __int128 *a3)
{
__int128 v3; // xmm0
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 16) = 0LL;
v3 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 8) = v3;
*(_QWORD *)a3 = 0LL;
return ftxui::ScreenInteractive::PreMain(a2);
}
| Loop:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV qword ptr [RDI],RSI
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOV qword ptr [RDX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOV qword ptr [RDX],RAX
LAB_00136836:
MOV RDI,RSI
CALL 0x0012d692
LAB_0013683e:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* ftxui::Loop::Loop(ftxui::ScreenInteractive*, std::shared_ptr<ftxui::ComponentBase>) */
void __thiscall ftxui::Loop::Loop(Loop *this,ScreenInteractive *param_1,int8 *param_3)
{
int8 uVar1;
*(ScreenInteractive **)this = param_1;
*(int8 *)(this + 0x10) = 0;
uVar1 = param_3[1];
param_3[1] = 0;
*(int8 *)(this + 8) = *param_3;
*(int8 *)(this + 0x10) = uVar1;
*param_3 = 0;
/* try { // try from 00136836 to 0013683d has its CatchHandler @ 00136846 */
ScreenInteractive::PreMain(param_1);
return;
}
|
|
5,798 | test_if_hard_path | eloqsql/mysys/my_getwd.c | int test_if_hard_path(register const char *dir_name)
{
if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR)
return (home_dir != NullS && test_if_hard_path(home_dir));
if (dir_name[0] == FN_LIBCHAR)
return (TRUE);
#ifdef FN_DEVCHAR
return (strchr(dir_name,FN_DEVCHAR) != 0);
#else
return FALSE;
#endif
} | O3 | c | test_if_hard_path:
pushq %rbp
movq %rsp, %rbp
leaq 0xb6cc9f(%rip), %rax # 0xc15888
movq (%rax), %rax
movb (%rdi), %cl
cmpb $0x7e, %cl
jne 0xa8c05
cmpb $0x2f, 0x1(%rdi)
jne 0xa8c05
movq %rax, %rdi
testq %rax, %rax
jne 0xa8bec
xorl %eax, %eax
jmp 0xa8c0d
xorl %eax, %eax
cmpb $0x2f, %cl
sete %al
popq %rbp
retq
| test_if_hard_path:
push rbp
mov rbp, rsp
lea rax, home_dir
mov rax, [rax]
loc_A8BEC:
mov cl, [rdi]
cmp cl, 7Eh ; '~'
jnz short loc_A8C05
cmp byte ptr [rdi+1], 2Fh ; '/'
jnz short loc_A8C05
mov rdi, rax
test rax, rax
jnz short loc_A8BEC
xor eax, eax
jmp short loc_A8C0D
loc_A8C05:
xor eax, eax
cmp cl, 2Fh ; '/'
setz al
loc_A8C0D:
pop rbp
retn
| _BOOL8 test_if_hard_path(_BYTE *a1)
{
while ( *a1 == 126 && a1[1] == 47 )
{
a1 = (_BYTE *)home_dir;
if ( !home_dir )
return 0LL;
}
return *a1 == 47;
}
| test_if_hard_path:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0xd15888]
MOV RAX,qword ptr [RAX]
LAB_001a8bec:
MOV CL,byte ptr [RDI]
CMP CL,0x7e
JNZ 0x001a8c05
CMP byte ptr [RDI + 0x1],0x2f
JNZ 0x001a8c05
MOV RDI,RAX
TEST RAX,RAX
JNZ 0x001a8bec
XOR EAX,EAX
JMP 0x001a8c0d
LAB_001a8c05:
XOR EAX,EAX
CMP CL,0x2f
SETZ AL
LAB_001a8c0d:
POP RBP
RET
|
bool test_if_hard_path(char *param_1)
{
while ((*param_1 == '~' && (param_1[1] == '/'))) {
param_1 = home_dir;
if (home_dir == (char *)0x0) {
return false;
}
}
return *param_1 == '/';
}
|
|
5,799 | my_mb_wc_eucjpms | eloqsql/strings/ctype-eucjpms.c | static int
my_mb_wc_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
if (hi >= 0xA1 && hi <= 0xFE) /* JIS X 0208 code set: [A1..FE][A1..FE] */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
return (*pwc= jisx0208_eucjpms_to_unicode[(hi << 8) + s[1]]) ? 2 :
(s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2;
}
/* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */
if (hi == 0x8E)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (s[1] < 0xA1 || s[1] > 0xDF)
return MY_CS_ILSEQ;
*pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */
return 2;
}
if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
return (*pwc= jisx0212_eucjpms_to_unicode[(((int) s[1]) << 8) + s[2]]) ?
3 :
(s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ?
MY_CS_ILSEQ : -3;
}
return MY_CS_ILSEQ;
} | O3 | c | my_mb_wc_eucjpms:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xaf44a
movzbl (%rdx), %edi
testb %dil, %dil
js 0xaf44c
movq %rdi, (%rsi)
movl $0x1, %eax
popq %rbp
retq
leal 0x5f(%rdi), %eax
cmpb $0x5d, %al
ja 0xaf498
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0xaf44a
movzbl 0x1(%rdx), %eax
shll $0x9, %edi
leal (%rdi,%rax,2), %eax
leaq 0xace0e(%rip), %rcx # 0x15c280
movzwl (%rax,%rcx), %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testq %rcx, %rcx
jne 0xaf44a
movb 0x1(%rdx), %al
incb %al
xorl %ecx, %ecx
cmpb $-0x5e, %al
setb %cl
leal -0x2(,%rcx,2), %eax
jmp 0xaf44a
cmpq $0x8f, %rdi
je 0xaf4dc
cmpl $0x8e, %edi
jne 0xaf51e
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0xaf44a
movzbl 0x1(%rdx), %ecx
leal 0x20(%rcx), %edx
movl $0x0, %eax
cmpb $-0x3f, %dl
jb 0xaf44a
addq $0xfec0, %rcx # imm = 0xFEC0
movq %rcx, (%rsi)
movl $0x2, %eax
jmp 0xaf44a
leaq 0x3(%rdx), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rdi
ja 0xaf44a
movzwl 0x1(%rdx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
leaq 0xccd80(%rip), %rcx # 0x17c280
movzwl (%rcx,%rax,2), %ecx
movq %rcx, (%rsi)
movl $0x3, %eax
testq %rcx, %rcx
jne 0xaf44a
movb 0x1(%rdx), %al
incb %al
cmpb $-0x5e, %al
jae 0xaf525
xorl %eax, %eax
jmp 0xaf44a
movb 0x2(%rdx), %cl
movl $0x0, %eax
cmpb $-0x5f, %cl
jb 0xaf44a
xorl %eax, %eax
cmpb $-0x1, %cl
sete %al
leal (%rax,%rax,2), %eax
addl $-0x3, %eax
jmp 0xaf44a
| my_mb_wc_eucjpms:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_AF44A
movzx edi, byte ptr [rdx]
test dil, dil
js short loc_AF44C
mov [rsi], rdi
mov eax, 1
loc_AF44A:
pop rbp
retn
loc_AF44C:
lea eax, [rdi+5Fh]
cmp al, 5Dh ; ']'
ja short loc_AF498
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_AF44A
movzx eax, byte ptr [rdx+1]
shl edi, 9
lea eax, [rdi+rax*2]
lea rcx, jisx0208_eucjpms_to_unicode
movzx ecx, word ptr [rax+rcx]
mov [rsi], rcx
mov eax, 2
test rcx, rcx
jnz short loc_AF44A
mov al, [rdx+1]
inc al
xor ecx, ecx
cmp al, 0A2h
setb cl
lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2]
jmp short loc_AF44A
loc_AF498:
cmp rdi, 8Fh
jz short loc_AF4DC
cmp edi, 8Eh
jnz short loc_AF51E
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_AF44A
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx+20h]
mov eax, 0
cmp dl, 0C1h
jb short loc_AF44A
add rcx, 0FEC0h
mov [rsi], rcx
mov eax, 2
jmp loc_AF44A
loc_AF4DC:
lea rdi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rdi, rcx
ja loc_AF44A
movzx eax, word ptr [rdx+1]
rol ax, 8
movzx eax, ax
lea rcx, jisx0212_eucjpms_to_unicode
movzx ecx, word ptr [rcx+rax*2]
mov [rsi], rcx
mov eax, 3
test rcx, rcx
jnz loc_AF44A
mov al, [rdx+1]
inc al
cmp al, 0A2h
jnb short loc_AF525
loc_AF51E:
xor eax, eax
jmp loc_AF44A
loc_AF525:
mov cl, [rdx+2]
mov eax, 0
cmp cl, 0A1h
jb loc_AF44A
xor eax, eax
cmp cl, 0FFh
setz al
lea eax, [rax+rax*2]
add eax, 0FFFFFFFDh
jmp loc_AF44A
| long long my_mb_wc_eucjpms(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
long long v6; // rcx
long long v7; // rcx
long long v8; // rcx
unsigned __int8 v9; // cl
result = 4294967195LL;
if ( (unsigned long long)a3 >= a4 )
return result;
v5 = *a3;
if ( (v5 & 0x80u) == 0LL )
{
*a2 = v5;
return 1LL;
}
if ( (unsigned __int8)(v5 + 95) <= 0x5Du )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = jisx0208_eucjpms_to_unicode[256 * (_DWORD)v5 + a3[1]];
*a2 = v6;
result = 2LL;
if ( !v6 )
return 2 * (unsigned int)((unsigned __int8)(a3[1] + 1) < 0xA2u) - 2;
}
return result;
}
if ( v5 != 143 )
{
if ( (_DWORD)v5 == 142 )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v7 = a3[1];
result = 0LL;
if ( (unsigned __int8)(v7 + 32) >= 0xC1u )
{
*a2 = v7 + 65216;
return 2LL;
}
}
return result;
}
return 0LL;
}
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) > a4 )
return result;
v8 = jisx0212_eucjpms_to_unicode[(unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8)];
*a2 = v8;
result = 3LL;
if ( v8 )
return result;
if ( (unsigned __int8)(a3[1] + 1) < 0xA2u )
return 0LL;
v9 = a3[2];
result = 0LL;
if ( v9 >= 0xA1u )
return 3 * (unsigned int)(v9 == 0xFF) - 3;
return result;
}
| my_mb_wc_eucjpms:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001af44a
MOVZX EDI,byte ptr [RDX]
TEST DIL,DIL
JS 0x001af44c
MOV qword ptr [RSI],RDI
MOV EAX,0x1
LAB_001af44a:
POP RBP
RET
LAB_001af44c:
LEA EAX,[RDI + 0x5f]
CMP AL,0x5d
JA 0x001af498
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001af44a
MOVZX EAX,byte ptr [RDX + 0x1]
SHL EDI,0x9
LEA EAX,[RDI + RAX*0x2]
LEA RCX,[0x25c280]
MOVZX ECX,word ptr [RAX + RCX*0x1]
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST RCX,RCX
JNZ 0x001af44a
MOV AL,byte ptr [RDX + 0x1]
INC AL
XOR ECX,ECX
CMP AL,0xa2
SETC CL
LEA EAX,[-0x2 + RCX*0x2]
JMP 0x001af44a
LAB_001af498:
CMP RDI,0x8f
JZ 0x001af4dc
CMP EDI,0x8e
JNZ 0x001af51e
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x001af44a
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + 0x20]
MOV EAX,0x0
CMP DL,0xc1
JC 0x001af44a
ADD RCX,0xfec0
MOV qword ptr [RSI],RCX
MOV EAX,0x2
JMP 0x001af44a
LAB_001af4dc:
LEA RDI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RDI,RCX
JA 0x001af44a
MOVZX EAX,word ptr [RDX + 0x1]
ROL AX,0x8
MOVZX EAX,AX
LEA RCX,[0x27c280]
MOVZX ECX,word ptr [RCX + RAX*0x2]
MOV qword ptr [RSI],RCX
MOV EAX,0x3
TEST RCX,RCX
JNZ 0x001af44a
MOV AL,byte ptr [RDX + 0x1]
INC AL
CMP AL,0xa2
JNC 0x001af525
LAB_001af51e:
XOR EAX,EAX
JMP 0x001af44a
LAB_001af525:
MOV CL,byte ptr [RDX + 0x2]
MOV EAX,0x0
CMP CL,0xa1
JC 0x001af44a
XOR EAX,EAX
CMP CL,0xff
SETZ AL
LEA EAX,[RAX + RAX*0x2]
ADD EAX,-0x3
JMP 0x001af44a
|
int my_mb_wc_eucjpms(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
ushort uVar2;
int iVar3;
iVar3 = -0x65;
if (param_3 < param_4) {
bVar1 = *param_3;
if ((char)bVar1 < '\0') {
if ((byte)(bVar1 + 0x5f) < 0x5e) {
iVar3 = -0x66;
if (param_3 + 2 <= param_4) {
uVar2 = *(ushort *)
(jisx0208_eucjpms_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2));
*param_2 = (ulong)uVar2;
iVar3 = 2;
if ((ulong)uVar2 == 0) {
iVar3 = (uint)((byte)(param_3[1] + 1) < 0xa2) * 2 + -2;
}
}
}
else {
if ((ulong)bVar1 == 0x8f) {
if (param_4 < param_3 + 3) {
return -0x67;
}
uVar2 = *(ushort *)
(&jisx0212_eucjpms_to_unicode +
(ulong)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) *
2);
*param_2 = (ulong)uVar2;
if ((ulong)uVar2 != 0) {
return 3;
}
if (0xa1 < (byte)(param_3[1] + 1)) {
if (param_3[2] < 0xa1) {
return 0;
}
return (uint)(param_3[2] == 0xff) * 3 + -3;
}
}
else if (bVar1 == 0x8e) {
if (param_4 < param_3 + 2) {
return -0x66;
}
if ((byte)(param_3[1] + 0x20) < 0xc1) {
return 0;
}
*param_2 = (ulong)param_3[1] + 0xfec0;
return 2;
}
iVar3 = 0;
}
}
else {
*param_2 = (ulong)bVar1;
iVar3 = 1;
}
}
return iVar3;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.