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
|
---|---|---|---|---|---|---|---|---|---|---|---|
1,000 | create_tmpdir | eloqsql/storage/maria/unittest/ma_pagecache_single.c | static char *create_tmpdir(const char *progname)
{
static char test_dirname[FN_REFLEN];
char tmp_name[FN_REFLEN];
size_t length;
/* Create a temporary directory of name TMP-'executable', but without the -t extension */
fn_format(tmp_name, progname, "", "", MY_REPLACE_DIR | MY_REPLACE_EXT);
length= strlen(tmp_name);
if (length > 2 && tmp_name[length-2] == '-' && tmp_name[length-1] == 't')
tmp_name[length-2]= 0;
strxmov(test_dirname, "TMP-", tmp_name, NullS);
/*
Don't give an error if we can't create dir, as it may already exist from a previously aborted
run
*/
(void) my_mkdir(test_dirname, 0777, MYF(0));
return test_dirname;
} | O0 | c | create_tmpdir:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp # imm = 0x230
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x218(%rbp), %rsi
leaq 0x12c499(%rip), %rcx # 0x158f8d
movl $0x3, %r8d
movq %rcx, %rdx
callq 0xe0b40
leaq -0x210(%rbp), %rdi
callq 0x2a350
movq %rax, -0x220(%rbp)
cmpq $0x2, -0x220(%rbp)
jbe 0x2cb62
movq -0x220(%rbp), %rax
subq $0x2, %rax
movsbl -0x210(%rbp,%rax), %eax
cmpl $0x2d, %eax
jne 0x2cb62
movq -0x220(%rbp), %rax
subq $0x1, %rax
movsbl -0x210(%rbp,%rax), %eax
cmpl $0x74, %eax
jne 0x2cb62
movq -0x220(%rbp), %rax
subq $0x2, %rax
movb $0x0, -0x210(%rbp,%rax)
leaq 0x44bbb7(%rip), %rdi # 0x478720
movq %rdi, -0x230(%rbp)
leaq 0x125a80(%rip), %rsi # 0x1525f7
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, -0x228(%rbp)
leaq -0x210(%rbp), %rdx
callq 0x14f2c0
movq -0x230(%rbp), %rdi
movq -0x228(%rbp), %rdx
movl $0x1ff, %esi # imm = 0x1FF
callq 0xf5220
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2cbc8
leaq 0x44bb61(%rip), %rax # 0x478720
addq $0x230, %rsp # imm = 0x230
popq %rbp
retq
callq 0x2a270
nopl (%rax)
| create_tmpdir:
push rbp
mov rbp, rsp
sub rsp, 230h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_218]
lea rcx, asc_158F89+4; ""
mov r8d, 3
mov rdx, rcx
call fn_format
lea rdi, [rbp+var_210]
call _strlen
mov [rbp+var_220], rax
cmp [rbp+var_220], 2
jbe short loc_2CB62
mov rax, [rbp+var_220]
sub rax, 2
movsx eax, [rbp+rax+var_210]
cmp eax, 2Dh ; '-'
jnz short loc_2CB62
mov rax, [rbp+var_220]
sub rax, 1
movsx eax, [rbp+rax+var_210]
cmp eax, 74h ; 't'
jnz short loc_2CB62
mov rax, [rbp+var_220]
sub rax, 2
mov [rbp+rax+var_210], 0
loc_2CB62:
lea rdi, create_tmpdir_test_dirname
mov [rbp+var_230], rdi
lea rsi, aTmp; "TMP-"
xor eax, eax
mov ecx, eax
mov [rbp+var_228], rcx
lea rdx, [rbp+var_210]
call strxmov
mov rdi, [rbp+var_230]
mov rdx, [rbp+var_228]
mov esi, 1FFh
call my_mkdir
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2CBC8
lea rax, create_tmpdir_test_dirname
add rsp, 230h
pop rbp
retn
loc_2CBC8:
call ___stack_chk_fail
| void * create_tmpdir(long long a1)
{
int v1; // r8d
int v2; // r9d
long long v4; // [rsp+0h] [rbp-230h]
long long v5; // [rsp+8h] [rbp-228h]
unsigned long long v6; // [rsp+10h] [rbp-220h]
long long v7; // [rsp+18h] [rbp-218h]
_BYTE v8[520]; // [rsp+20h] [rbp-210h] BYREF
unsigned long long v9; // [rsp+228h] [rbp-8h]
v9 = __readfsqword(0x28u);
HIWORD(v7) = HIWORD(a1);
fn_format(v8, a1, "", "", 3LL);
v6 = strlen(v8);
if ( v6 > 2 && v8[v6 - 2] == 45 && v8[v6 - 1] == 116 )
v8[v6 - 2] = 0;
strxmov(
(unsigned int)&create_tmpdir_test_dirname,
(unsigned int)"TMP-",
(unsigned int)v8,
0,
v1,
v2,
&create_tmpdir_test_dirname,
0LL);
my_mkdir(v4, 511LL, v5);
return &create_tmpdir_test_dirname;
}
| create_tmpdir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x230
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x218]
LEA RCX,[0x258f8d]
MOV R8D,0x3
MOV RDX,RCX
CALL 0x001e0b40
LEA RDI,[RBP + -0x210]
CALL 0x0012a350
MOV qword ptr [RBP + -0x220],RAX
CMP qword ptr [RBP + -0x220],0x2
JBE 0x0012cb62
MOV RAX,qword ptr [RBP + -0x220]
SUB RAX,0x2
MOVSX EAX,byte ptr [RBP + RAX*0x1 + -0x210]
CMP EAX,0x2d
JNZ 0x0012cb62
MOV RAX,qword ptr [RBP + -0x220]
SUB RAX,0x1
MOVSX EAX,byte ptr [RBP + RAX*0x1 + -0x210]
CMP EAX,0x74
JNZ 0x0012cb62
MOV RAX,qword ptr [RBP + -0x220]
SUB RAX,0x2
MOV byte ptr [RBP + RAX*0x1 + -0x210],0x0
LAB_0012cb62:
LEA RDI,[0x578720]
MOV qword ptr [RBP + -0x230],RDI
LEA RSI,[0x2525f7]
XOR EAX,EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x228],RCX
LEA RDX,[RBP + -0x210]
CALL 0x0024f2c0
MOV RDI,qword ptr [RBP + -0x230]
MOV RDX,qword ptr [RBP + -0x228]
MOV ESI,0x1ff
CALL 0x001f5220
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012cbc8
LEA RAX,[0x578720]
ADD RSP,0x230
POP RBP
RET
LAB_0012cbc8:
CALL 0x0012a270
|
int1 * create_tmpdir(int8 param_1)
{
size_t sVar1;
long in_FS_OFFSET;
int8 local_220;
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_220 = param_1;
fn_format(local_218,param_1,&DAT_00258f8d,&DAT_00258f8d,3);
sVar1 = strlen(local_218);
if (((2 < sVar1) && (local_218[sVar1 - 2] == '-')) && (local_218[sVar1 - 1] == 't')) {
local_218[sVar1 - 2] = '\0';
}
strxmov(create_tmpdir_test_dirname,&DAT_002525f7,local_218);
my_mkdir(create_tmpdir_test_dirname,0x1ff,0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return create_tmpdir_test_dirname;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
1,001 | get_timer_pico_value(enum_timer_name) | eloqsql/storage/perfschema/pfs_timer.cc | ulonglong get_timer_pico_value(enum_timer_name timer_name)
{
ulonglong result;
switch (timer_name)
{
case TIMER_NAME_CYCLE:
result= (my_timer_cycles() - cycle_v0) * cycle_to_pico;
break;
case TIMER_NAME_NANOSEC:
result= (my_timer_nanoseconds() - nanosec_v0) * nanosec_to_pico;
break;
case TIMER_NAME_MICROSEC:
result= (my_timer_microseconds() - microsec_v0) * microsec_to_pico;
break;
case TIMER_NAME_MILLISEC:
result= (my_timer_milliseconds() - millisec_v0) * millisec_to_pico;
break;
case TIMER_NAME_TICK:
result= (my_timer_ticks() - tick_v0) * tick_to_pico;
break;
default:
result= 0;
assert(false);
}
return result;
} | O0 | cpp | get_timer_pico_value(enum_timer_name):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x4, %eax
ja 0x4af35
movq -0x18(%rbp), %rax
leaq 0x690ce(%rip), %rcx # 0xb3f78
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x4ac70
subq 0x3c47d1(%rip), %rax # 0x40f690
imulq 0x3c47f1(%rip), %rax # 0x40f6b8
movq %rax, -0x10(%rbp)
jmp 0x4af3d
callq 0x5dbc0
subq 0x3c47bf(%rip), %rax # 0x40f698
imulq 0x3c47df(%rip), %rax # 0x40f6c0
movq %rax, -0x10(%rbp)
jmp 0x4af3d
callq 0x5dbf0
subq 0x3c47ad(%rip), %rax # 0x40f6a0
imulq 0x3c47cd(%rip), %rax # 0x40f6c8
movq %rax, -0x10(%rbp)
jmp 0x4af3d
callq 0x5dc40
subq 0x3c479b(%rip), %rax # 0x40f6a8
imulq 0x3c47bb(%rip), %rax # 0x40f6d0
movq %rax, -0x10(%rbp)
jmp 0x4af3d
callq 0x5dc80
subq 0x3c4789(%rip), %rax # 0x40f6b0
imulq 0x3c47a9(%rip), %rax # 0x40f6d8
movq %rax, -0x10(%rbp)
jmp 0x4af3d
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _Z20get_timer_pico_value15enum_timer_name:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
dec eax; switch 5 cases
mov ecx, eax
mov [rbp+var_18], rcx
sub eax, 4
ja def_4AEB1; jumptable 000000000004AEB1 default case
mov rax, [rbp+var_18]
lea rcx, jpt_4AEB1
movsxd rax, ds:(jpt_4AEB1 - 0B3F78h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_4AEB3:
call _ZL15my_timer_cyclesv; jumptable 000000000004AEB1 case 1
sub rax, cs:_ZL8cycle_v0; cycle_v0
imul rax, cs:_ZL13cycle_to_pico; cycle_to_pico
mov [rbp+var_10], rax
jmp short loc_4AF3D
loc_4AECD:
call my_timer_nanoseconds; jumptable 000000000004AEB1 case 2
sub rax, cs:_ZL10nanosec_v0; nanosec_v0
imul rax, cs:_ZL15nanosec_to_pico; nanosec_to_pico
mov [rbp+var_10], rax
jmp short loc_4AF3D
loc_4AEE7:
call my_timer_microseconds; jumptable 000000000004AEB1 case 3
sub rax, cs:_ZL11microsec_v0; microsec_v0
imul rax, cs:_ZL16microsec_to_pico; microsec_to_pico
mov [rbp+var_10], rax
jmp short loc_4AF3D
loc_4AF01:
call my_timer_milliseconds; jumptable 000000000004AEB1 case 4
sub rax, cs:_ZL11millisec_v0; millisec_v0
imul rax, cs:_ZL16millisec_to_pico; millisec_to_pico
mov [rbp+var_10], rax
jmp short loc_4AF3D
loc_4AF1B:
call my_timer_ticks; jumptable 000000000004AEB1 case 5
sub rax, cs:_ZL7tick_v0; tick_v0
imul rax, cs:_ZL12tick_to_pico; tick_to_pico
mov [rbp+var_10], rax
jmp short loc_4AF3D
def_4AEB1:
mov [rbp+var_10], 0; jumptable 000000000004AEB1 default case
loc_4AF3D:
mov rax, [rbp+var_10]
add rsp, 20h
pop rbp
retn
| long long get_timer_pico_value(long long a1)
{
long long v2; // [rsp+10h] [rbp-10h]
switch ( (int)a1 )
{
case 1:
v2 = cycle_to_pico * (my_timer_cycles() - cycle_v0);
break;
case 2:
v2 = nanosec_to_pico * (my_timer_nanoseconds(a1) - nanosec_v0);
break;
case 3:
v2 = microsec_to_pico * (my_timer_microseconds(a1) - microsec_v0);
break;
case 4:
v2 = millisec_to_pico * (my_timer_milliseconds(a1) - millisec_v0);
break;
case 5:
v2 = tick_to_pico * (my_timer_ticks(a1) - tick_v0);
break;
default:
v2 = 0LL;
break;
}
return v2;
}
| get_timer_pico_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x18],RCX
SUB EAX,0x4
JA 0x0014af35
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x1b3f78]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
CALL 0x0014ac70
SUB RAX,qword ptr [0x0050f690]
IMUL RAX,qword ptr [0x0050f6b8]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0014af3d
caseD_2:
CALL 0x0015dbc0
SUB RAX,qword ptr [0x0050f698]
IMUL RAX,qword ptr [0x0050f6c0]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0014af3d
caseD_3:
CALL 0x0015dbf0
SUB RAX,qword ptr [0x0050f6a0]
IMUL RAX,qword ptr [0x0050f6c8]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0014af3d
caseD_4:
CALL 0x0015dc40
SUB RAX,qword ptr [0x0050f6a8]
IMUL RAX,qword ptr [0x0050f6d0]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0014af3d
caseD_5:
CALL 0x0015dc80
SUB RAX,qword ptr [0x0050f6b0]
IMUL RAX,qword ptr [0x0050f6d8]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0014af3d
default:
MOV qword ptr [RBP + -0x10],0x0
LAB_0014af3d:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x20
POP RBP
RET
|
/* get_timer_pico_value(enum_timer_name) */
long get_timer_pico_value(int4 param_1)
{
long lVar1;
long local_18;
switch(param_1) {
case 1:
lVar1 = my_timer_cycles();
local_18 = (lVar1 - cycle_v0) * cycle_to_pico;
break;
case 2:
lVar1 = my_timer_nanoseconds();
local_18 = (lVar1 - nanosec_v0) * nanosec_to_pico;
break;
case 3:
lVar1 = my_timer_microseconds();
local_18 = (lVar1 - microsec_v0) * microsec_to_pico;
break;
case 4:
lVar1 = my_timer_milliseconds();
local_18 = (lVar1 - millisec_v0) * millisec_to_pico;
break;
case 5:
lVar1 = my_timer_ticks();
local_18 = (lVar1 - tick_v0) * tick_to_pico;
break;
default:
local_18 = 0;
}
return local_18;
}
|
|
1,002 | LefDefParser::defiRegion::addRect(int, int, int, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiRegion.cpp | void defiRegion::addRect(int xl, int yl, int xh, int yh) {
if (numRectangles_ == rectanglesAllocated_) {
int i;
int max = rectanglesAllocated_ = rectanglesAllocated_ * 2;
int* newxl = (int*)malloc(sizeof(int)*max);
int* newyl = (int*)malloc(sizeof(int)*max);
int* newxh = (int*)malloc(sizeof(int)*max);
int* newyh = (int*)malloc(sizeof(int)*max);
for (i = 0; i < numRectangles_; i++) {
newxl[i] = xl_[i];
newyl[i] = yl_[i];
newxh[i] = xh_[i];
newyh[i] = yh_[i];
}
free((char*)(xl_));
free((char*)(yl_));
free((char*)(xh_));
free((char*)(yh_));
xl_ = newxl;
yl_ = newyl;
xh_ = newxh;
yh_ = newyh;
}
xl_[numRectangles_] = xl;
yl_[numRectangles_] = yl;
xh_[numRectangles_] = xh;
yh_[numRectangles_] = yh;
numRectangles_ += 1;
} | O0 | cpp | LefDefParser::defiRegion::addRect(int, int, int, int):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movl %edx, 0x38(%rsp)
movl %ecx, 0x34(%rsp)
movl %r8d, 0x30(%rsp)
movq 0x40(%rsp), %rcx
movq %rcx, (%rsp)
movl 0xc(%rcx), %eax
cmpl 0x10(%rcx), %eax
jne 0x19874
movq (%rsp), %rcx
movl 0x10(%rcx), %eax
shll %eax
movl %eax, 0x10(%rcx)
movl %eax, 0x28(%rsp)
movslq 0x28(%rsp), %rdi
shlq $0x2, %rdi
callq 0x72d0
movq %rax, 0x20(%rsp)
movslq 0x28(%rsp), %rdi
shlq $0x2, %rdi
callq 0x72d0
movq %rax, 0x18(%rsp)
movslq 0x28(%rsp), %rdi
shlq $0x2, %rdi
callq 0x72d0
movq %rax, 0x10(%rsp)
movslq 0x28(%rsp), %rdi
shlq $0x2, %rdi
callq 0x72d0
movq %rax, 0x8(%rsp)
movl $0x0, 0x2c(%rsp)
movq (%rsp), %rcx
movl 0x2c(%rsp), %eax
cmpl 0xc(%rcx), %eax
jge 0x19818
movq (%rsp), %rax
movq 0x18(%rax), %rcx
movslq 0x2c(%rsp), %rdx
movl (%rcx,%rdx,4), %esi
movq 0x20(%rsp), %rcx
movslq 0x2c(%rsp), %rdx
movl %esi, (%rcx,%rdx,4)
movq 0x20(%rax), %rcx
movslq 0x2c(%rsp), %rdx
movl (%rcx,%rdx,4), %esi
movq 0x18(%rsp), %rcx
movslq 0x2c(%rsp), %rdx
movl %esi, (%rcx,%rdx,4)
movq 0x28(%rax), %rcx
movslq 0x2c(%rsp), %rdx
movl (%rcx,%rdx,4), %esi
movq 0x10(%rsp), %rcx
movslq 0x2c(%rsp), %rdx
movl %esi, (%rcx,%rdx,4)
movq 0x30(%rax), %rax
movslq 0x2c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x8(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x19793
movq (%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x72a0
movq (%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x72a0
movq (%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x72a0
movq (%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x72a0
movq (%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x30(%rax)
movq (%rsp), %rax
movl 0x3c(%rsp), %esi
movq 0x18(%rax), %rcx
movslq 0xc(%rax), %rdx
movl %esi, (%rcx,%rdx,4)
movl 0x38(%rsp), %esi
movq 0x20(%rax), %rcx
movslq 0xc(%rax), %rdx
movl %esi, (%rcx,%rdx,4)
movl 0x34(%rsp), %esi
movq 0x28(%rax), %rcx
movslq 0xc(%rax), %rdx
movl %esi, (%rcx,%rdx,4)
movl 0x30(%rsp), %esi
movq 0x30(%rax), %rcx
movslq 0xc(%rax), %rdx
movl %esi, (%rcx,%rdx,4)
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser10defiRegion7addRectEiiii:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_C], esi
mov [rsp+48h+var_10], edx
mov [rsp+48h+var_14], ecx
mov [rsp+48h+var_18], r8d
mov rcx, [rsp+48h+var_8]
mov [rsp+48h+var_48], rcx
mov eax, [rcx+0Ch]
cmp eax, [rcx+10h]
jnz loc_19874
mov rcx, [rsp+48h+var_48]
mov eax, [rcx+10h]
shl eax, 1
mov [rcx+10h], eax
mov [rsp+48h+var_20], eax
movsxd rdi, [rsp+48h+var_20]
shl rdi, 2
call _malloc
mov [rsp+48h+var_28], rax
movsxd rdi, [rsp+48h+var_20]
shl rdi, 2
call _malloc
mov [rsp+48h+var_30], rax
movsxd rdi, [rsp+48h+var_20]
shl rdi, 2
call _malloc
mov [rsp+48h+var_38], rax
movsxd rdi, [rsp+48h+var_20]
shl rdi, 2
call _malloc
mov [rsp+48h+var_40], rax
mov [rsp+48h+var_1C], 0
loc_19793:
mov rcx, [rsp+48h+var_48]
mov eax, [rsp+48h+var_1C]
cmp eax, [rcx+0Ch]
jge short loc_19818
mov rax, [rsp+48h+var_48]
mov rcx, [rax+18h]
movsxd rdx, [rsp+48h+var_1C]
mov esi, [rcx+rdx*4]
mov rcx, [rsp+48h+var_28]
movsxd rdx, [rsp+48h+var_1C]
mov [rcx+rdx*4], esi
mov rcx, [rax+20h]
movsxd rdx, [rsp+48h+var_1C]
mov esi, [rcx+rdx*4]
mov rcx, [rsp+48h+var_30]
movsxd rdx, [rsp+48h+var_1C]
mov [rcx+rdx*4], esi
mov rcx, [rax+28h]
movsxd rdx, [rsp+48h+var_1C]
mov esi, [rcx+rdx*4]
mov rcx, [rsp+48h+var_38]
movsxd rdx, [rsp+48h+var_1C]
mov [rcx+rdx*4], esi
mov rax, [rax+30h]
movsxd rcx, [rsp+48h+var_1C]
mov edx, [rax+rcx*4]
mov rax, [rsp+48h+var_40]
movsxd rcx, [rsp+48h+var_1C]
mov [rax+rcx*4], edx
mov eax, [rsp+48h+var_1C]
add eax, 1
mov [rsp+48h+var_1C], eax
jmp loc_19793
loc_19818:
mov rax, [rsp+48h+var_48]
mov rdi, [rax+18h]
call _free
mov rax, [rsp+48h+var_48]
mov rdi, [rax+20h]
call _free
mov rax, [rsp+48h+var_48]
mov rdi, [rax+28h]
call _free
mov rax, [rsp+48h+var_48]
mov rdi, [rax+30h]
call _free
mov rax, [rsp+48h+var_48]
mov rcx, [rsp+48h+var_28]
mov [rax+18h], rcx
mov rcx, [rsp+48h+var_30]
mov [rax+20h], rcx
mov rcx, [rsp+48h+var_38]
mov [rax+28h], rcx
mov rcx, [rsp+48h+var_40]
mov [rax+30h], rcx
loc_19874:
mov rax, [rsp+48h+var_48]
mov esi, [rsp+48h+var_C]
mov rcx, [rax+18h]
movsxd rdx, dword ptr [rax+0Ch]
mov [rcx+rdx*4], esi
mov esi, [rsp+48h+var_10]
mov rcx, [rax+20h]
movsxd rdx, dword ptr [rax+0Ch]
mov [rcx+rdx*4], esi
mov esi, [rsp+48h+var_14]
mov rcx, [rax+28h]
movsxd rdx, dword ptr [rax+0Ch]
mov [rcx+rdx*4], esi
mov esi, [rsp+48h+var_18]
mov rcx, [rax+30h]
movsxd rdx, dword ptr [rax+0Ch]
mov [rcx+rdx*4], esi
mov ecx, [rax+0Ch]
add ecx, 1
mov [rax+0Ch], ecx
add rsp, 48h
retn
| LefDefParser::defiRegion * LefDefParser::defiRegion::addRect(
LefDefParser::defiRegion *this,
int a2,
int a3,
int a4,
int a5)
{
int v5; // eax
LefDefParser::defiRegion *result; // rax
long long v7; // [rsp+8h] [rbp-40h]
long long v8; // [rsp+10h] [rbp-38h]
long long v9; // [rsp+18h] [rbp-30h]
long long v10; // [rsp+20h] [rbp-28h]
int v11; // [rsp+28h] [rbp-20h]
int i; // [rsp+2Ch] [rbp-1Ch]
if ( *((_DWORD *)this + 3) == *((_DWORD *)this + 4) )
{
v5 = 2 * *((_DWORD *)this + 4);
*((_DWORD *)this + 4) = v5;
v11 = v5;
v10 = malloc(4LL * v5);
v9 = malloc(4LL * v11);
v8 = malloc(4LL * v11);
v7 = malloc(4LL * v11);
for ( i = 0; i < *((_DWORD *)this + 3); ++i )
{
*(_DWORD *)(v10 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 3) + 4LL * i);
*(_DWORD *)(v9 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 4) + 4LL * i);
*(_DWORD *)(v8 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 5) + 4LL * i);
*(_DWORD *)(v7 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 6) + 4LL * i);
}
free(*((_QWORD *)this + 3));
free(*((_QWORD *)this + 4));
free(*((_QWORD *)this + 5));
free(*((_QWORD *)this + 6));
*((_QWORD *)this + 3) = v10;
*((_QWORD *)this + 4) = v9;
*((_QWORD *)this + 5) = v8;
*((_QWORD *)this + 6) = v7;
}
result = this;
*(_DWORD *)(*((_QWORD *)this + 3) + 4LL * *((int *)this + 3)) = a2;
*(_DWORD *)(*((_QWORD *)this + 4) + 4LL * *((int *)this + 3)) = a3;
*(_DWORD *)(*((_QWORD *)this + 5) + 4LL * *((int *)this + 3)) = a4;
*(_DWORD *)(*((_QWORD *)this + 6) + 4LL * (int)(*((_DWORD *)this + 3))++) = a5;
return result;
}
| addRect:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV dword ptr [RSP + 0x3c],ESI
MOV dword ptr [RSP + 0x38],EDX
MOV dword ptr [RSP + 0x34],ECX
MOV dword ptr [RSP + 0x30],R8D
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP],RCX
MOV EAX,dword ptr [RCX + 0xc]
CMP EAX,dword ptr [RCX + 0x10]
JNZ 0x00119874
MOV RCX,qword ptr [RSP]
MOV EAX,dword ptr [RCX + 0x10]
SHL EAX,0x1
MOV dword ptr [RCX + 0x10],EAX
MOV dword ptr [RSP + 0x28],EAX
MOVSXD RDI,dword ptr [RSP + 0x28]
SHL RDI,0x2
CALL 0x001072d0
MOV qword ptr [RSP + 0x20],RAX
MOVSXD RDI,dword ptr [RSP + 0x28]
SHL RDI,0x2
CALL 0x001072d0
MOV qword ptr [RSP + 0x18],RAX
MOVSXD RDI,dword ptr [RSP + 0x28]
SHL RDI,0x2
CALL 0x001072d0
MOV qword ptr [RSP + 0x10],RAX
MOVSXD RDI,dword ptr [RSP + 0x28]
SHL RDI,0x2
CALL 0x001072d0
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RSP + 0x2c],0x0
LAB_00119793:
MOV RCX,qword ptr [RSP]
MOV EAX,dword ptr [RSP + 0x2c]
CMP EAX,dword ptr [RCX + 0xc]
JGE 0x00119818
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RAX + 0x18]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV ESI,dword ptr [RCX + RDX*0x4]
MOV RCX,qword ptr [RSP + 0x20]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV dword ptr [RCX + RDX*0x4],ESI
MOV RCX,qword ptr [RAX + 0x20]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV ESI,dword ptr [RCX + RDX*0x4]
MOV RCX,qword ptr [RSP + 0x18]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV dword ptr [RCX + RDX*0x4],ESI
MOV RCX,qword ptr [RAX + 0x28]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV ESI,dword ptr [RCX + RDX*0x4]
MOV RCX,qword ptr [RSP + 0x10]
MOVSXD RDX,dword ptr [RSP + 0x2c]
MOV dword ptr [RCX + RDX*0x4],ESI
MOV RAX,qword ptr [RAX + 0x30]
MOVSXD RCX,dword ptr [RSP + 0x2c]
MOV EDX,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RSP + 0x8]
MOVSXD RCX,dword ptr [RSP + 0x2c]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EAX,dword ptr [RSP + 0x2c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x00119793
LAB_00119818:
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x001072a0
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX + 0x20]
CALL 0x001072a0
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX + 0x28]
CALL 0x001072a0
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX + 0x30]
CALL 0x001072a0
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x18],RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x28],RCX
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x30],RCX
LAB_00119874:
MOV RAX,qword ptr [RSP]
MOV ESI,dword ptr [RSP + 0x3c]
MOV RCX,qword ptr [RAX + 0x18]
MOVSXD RDX,dword ptr [RAX + 0xc]
MOV dword ptr [RCX + RDX*0x4],ESI
MOV ESI,dword ptr [RSP + 0x38]
MOV RCX,qword ptr [RAX + 0x20]
MOVSXD RDX,dword ptr [RAX + 0xc]
MOV dword ptr [RCX + RDX*0x4],ESI
MOV ESI,dword ptr [RSP + 0x34]
MOV RCX,qword ptr [RAX + 0x28]
MOVSXD RDX,dword ptr [RAX + 0xc]
MOV dword ptr [RCX + RDX*0x4],ESI
MOV ESI,dword ptr [RSP + 0x30]
MOV RCX,qword ptr [RAX + 0x30]
MOVSXD RDX,dword ptr [RAX + 0xc]
MOV dword ptr [RCX + RDX*0x4],ESI
MOV ECX,dword ptr [RAX + 0xc]
ADD ECX,0x1
MOV dword ptr [RAX + 0xc],ECX
ADD RSP,0x48
RET
|
/* LefDefParser::defiRegion::addRect(int, int, int, int) */
void __thiscall
LefDefParser::defiRegion::addRect(defiRegion *this,int param_1,int param_2,int param_3,int param_4)
{
int iVar1;
void *pvVar2;
void *pvVar3;
void *pvVar4;
void *pvVar5;
int local_1c;
if (*(int *)(this + 0xc) == *(int *)(this + 0x10)) {
iVar1 = *(int *)(this + 0x10) << 1;
*(int *)(this + 0x10) = iVar1;
pvVar2 = malloc((long)iVar1 << 2);
pvVar3 = malloc((long)iVar1 << 2);
pvVar4 = malloc((long)iVar1 << 2);
pvVar5 = malloc((long)iVar1 << 2);
for (local_1c = 0; local_1c < *(int *)(this + 0xc); local_1c = local_1c + 1) {
*(int4 *)((long)pvVar2 + (long)local_1c * 4) =
*(int4 *)(*(long *)(this + 0x18) + (long)local_1c * 4);
*(int4 *)((long)pvVar3 + (long)local_1c * 4) =
*(int4 *)(*(long *)(this + 0x20) + (long)local_1c * 4);
*(int4 *)((long)pvVar4 + (long)local_1c * 4) =
*(int4 *)(*(long *)(this + 0x28) + (long)local_1c * 4);
*(int4 *)((long)pvVar5 + (long)local_1c * 4) =
*(int4 *)(*(long *)(this + 0x30) + (long)local_1c * 4);
}
free(*(void **)(this + 0x18));
free(*(void **)(this + 0x20));
free(*(void **)(this + 0x28));
free(*(void **)(this + 0x30));
*(void **)(this + 0x18) = pvVar2;
*(void **)(this + 0x20) = pvVar3;
*(void **)(this + 0x28) = pvVar4;
*(void **)(this + 0x30) = pvVar5;
}
*(int *)(*(long *)(this + 0x18) + (long)*(int *)(this + 0xc) * 4) = param_1;
*(int *)(*(long *)(this + 0x20) + (long)*(int *)(this + 0xc) * 4) = param_2;
*(int *)(*(long *)(this + 0x28) + (long)*(int *)(this + 0xc) * 4) = param_3;
*(int *)(*(long *)(this + 0x30) + (long)*(int *)(this + 0xc) * 4) = param_4;
*(int *)(this + 0xc) = *(int *)(this + 0xc) + 1;
return;
}
|
|
1,003 | my_hash_sort_utf8mb3_nopad | eloqsql/strings/ctype-utf8.c | static void my_hash_sort_utf8mb3_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
const uchar *e= s+slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((s < e) && (res=my_utf8mb3_uni(cs,&wc, (uchar *)s, (uchar*)e))>0 )
{
my_tosort_unicode(uni_plane, &wc, cs->state);
MY_HASH_ADD_16(m1, m2, wc);
s+= res;
}
*nr1= m1;
*nr2= m2;
} | O0 | c | my_hash_sort_utf8mb3_nopad:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x7b93a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x79790
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x7b946
jmp 0x7b9e7
movq -0x48(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edx
leaq -0x30(%rbp), %rsi
callq 0x7a540
jmp 0x7b95c
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
andq $0xff, %rcx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x7b998
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
shrq $0x8, %rcx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x7b9d1
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x7b90a
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_sort_utf8mb3_nopad:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_58], rax
loc_7B90A:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_59], al
jnb short loc_7B93A
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_utf8mb3_uni
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_59], al
loc_7B93A:
mov al, [rbp+var_59]
test al, 1
jnz short loc_7B946
jmp loc_7B9E7
loc_7B946:
mov rdi, [rbp+var_48]
mov rax, [rbp+var_8]
mov edx, [rax+0Ch]
lea rsi, [rbp+var_30]
call my_tosort_unicode
jmp short $+2
loc_7B95C:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
and rcx, 0FFh
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_7B998:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
shr rcx, 8
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_7B9D1:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp loc_7B90A
loc_7B9E7:
mov rcx, [rbp+var_50]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_58]
mov rax, [rbp+var_28]
mov [rax], rcx
add rsp, 60h
pop rbp
retn
| _QWORD * my_hash_sort_utf8mb3_nopad(
long long a1,
unsigned long long a2,
long long a3,
unsigned long long *a4,
_QWORD *a5,
long long a6)
{
_QWORD *result; // rax
bool v7; // [rsp+7h] [rbp-59h]
long long v8; // [rsp+8h] [rbp-58h]
long long v9; // [rsp+8h] [rbp-58h]
unsigned long long v10; // [rsp+10h] [rbp-50h]
long long v11; // [rsp+10h] [rbp-50h]
_QWORD *v12; // [rsp+18h] [rbp-48h]
unsigned long long v13; // [rsp+20h] [rbp-40h]
int v14; // [rsp+2Ch] [rbp-34h]
unsigned long long v15; // [rsp+30h] [rbp-30h] BYREF
_QWORD *v16; // [rsp+38h] [rbp-28h]
unsigned long long *v17; // [rsp+40h] [rbp-20h]
long long v18; // [rsp+48h] [rbp-18h]
unsigned long long v19; // [rsp+50h] [rbp-10h]
long long v20; // [rsp+58h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v13 = a3 + a2;
v12 = *(_QWORD **)(a1 + 120);
v10 = *a4;
v8 = *a5;
while ( 1 )
{
v7 = 0;
if ( v19 < v13 )
{
v14 = my_utf8mb3_uni(v20, (long long)&v15, v19, v13, (long long)a5, a6);
v7 = v14 > 0;
}
if ( !v7 )
break;
my_tosort_unicode(v12, &v15, *(_DWORD *)(v20 + 12));
v11 = v10 ^ ((v10 << 8) + (unsigned __int8)v15 * (v8 + (v10 & 0x3F)));
v9 = v8 + 3;
v10 = v11 ^ ((v11 << 8) + (v15 >> 8) * (v9 + (v11 & 0x3F)));
v8 = v9 + 3;
v19 += v14;
}
*v17 = v10;
result = v16;
*v16 = v8;
return result;
}
| my_hash_sort_utf8mb3_nopad:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
LAB_0017b90a:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x59],AL
JNC 0x0017b93a
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x00179790
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x59],AL
LAB_0017b93a:
MOV AL,byte ptr [RBP + -0x59]
TEST AL,0x1
JNZ 0x0017b946
JMP 0x0017b9e7
LAB_0017b946:
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RAX + 0xc]
LEA RSI,[RBP + -0x30]
CALL 0x0017a540
JMP 0x0017b95c
LAB_0017b95c:
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
AND RCX,0xff
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0017b998
LAB_0017b998:
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
SHR RCX,0x8
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0017b9d1
LAB_0017b9d1:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0017b90a
LAB_0017b9e7:
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
ADD RSP,0x60
POP RBP
RET
|
void my_hash_sort_utf8mb3_nopad
(long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5)
{
int8 uVar1;
bool bVar2;
long local_60;
ulong local_58;
int local_3c;
ulong local_38;
long *local_30;
ulong *local_28;
long local_20;
ulong local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_58 = *param_4;
local_60 = *param_5;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (local_18 < param_2 + param_3) {
local_3c = my_utf8mb3_uni(local_10,&local_38,local_18,param_2 + param_3);
bVar2 = 0 < local_3c;
}
if (!bVar2) break;
my_tosort_unicode(uVar1,&local_38,*(int4 *)(local_10 + 0xc));
local_58 = ((local_58 & 0x3f) + local_60) * (local_38 & 0xff) + local_58 * 0x100 ^ local_58;
local_58 = ((local_58 & 0x3f) + local_60 + 3) * (local_38 >> 8) + local_58 * 0x100 ^ local_58;
local_60 = local_60 + 6;
local_18 = local_18 + (long)local_3c;
}
*local_28 = local_58;
*local_30 = local_60;
return;
}
|
|
1,004 | 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;
} | O0 | c | ma_keydef_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
leaq -0x14(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movb 0xa0(%rax), %dl
movq -0x28(%rbp), %rax
movq %rax, %rsi
incq %rsi
movq %rsi, -0x28(%rbp)
movb %dl, (%rax)
movq -0x20(%rbp), %rax
movb 0xa4(%rax), %dl
movq -0x28(%rbp), %rax
movq %rax, %rsi
incq %rsi
movq %rsi, -0x28(%rbp)
movb %dl, (%rax)
movq -0x20(%rbp), %rax
movzwl 0xa2(%rax), %eax
movl %eax, -0x2c(%rbp)
movb -0x2c(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x2b(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0xa6(%rax), %eax
movl %eax, -0x30(%rbp)
movb -0x30(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x2f(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0xaa(%rax), %eax
movl %eax, -0x34(%rbp)
movb -0x34(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x33(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0xac(%rax), %eax
movl %eax, -0x38(%rbp)
movb -0x38(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x37(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0xae(%rax), %eax
movl %eax, -0x3c(%rbp)
movb -0x3c(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x3b(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %edx
movq -0x28(%rbp), %r8
subq %rcx, %r8
leaq 0xacf7e(%rip), %rdi # 0x11fec8
movl $0x707, %esi # imm = 0x707
movl $0x4, %r9d
callq 0x71d90
testq %rax, %rax
setne %al
movb %al, -0x3d(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x72f7e
movb -0x3d(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
callq 0x272b0
nopw %cs:(%rax,%rax)
| _ma_keydef_write:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], edi
mov [rbp+var_20], rsi
lea rcx, [rbp+var_14]
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
mov dl, [rax+0A0h]
mov rax, [rbp+var_28]
mov rsi, rax
inc rsi
mov [rbp+var_28], rsi
mov [rax], dl
mov rax, [rbp+var_20]
mov dl, [rax+0A4h]
mov rax, [rbp+var_28]
mov rsi, rax
inc rsi
mov [rbp+var_28], rsi
mov [rax], dl
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0A2h]
mov [rbp+var_2C], eax
mov dl, byte ptr [rbp+var_2C]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_2C+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0A6h]
mov [rbp+var_30], eax
mov dl, byte ptr [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_30+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0AAh]
mov [rbp+var_34], eax
mov dl, byte ptr [rbp+var_34]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_34+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0ACh]
mov [rbp+var_38], eax
mov dl, byte ptr [rbp+var_38]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_38+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0AEh]
mov [rbp+var_3C], eax
mov dl, byte ptr [rbp+var_3C]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_3C+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov edx, [rbp+var_18]
mov r8, [rbp+var_28]
sub r8, rcx
lea rdi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 707h
mov r9d, 4
call inline_mysql_file_write_0
test rax, rax
setnz al
mov [rbp+var_3D], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_72F7E
mov al, [rbp+var_3D]
add rsp, 40h
pop rbp
retn
loc_72F7E:
call ___stack_chk_fail
| bool ma_keydef_write(unsigned int a1, long long a2)
{
__int16 v2; // kr00_2
__int16 v3; // kr02_2
__int16 v4; // kr04_2
__int16 v5; // kr06_2
__int16 v6; // kr08_2
_BYTE v8[12]; // [rsp+2Ch] [rbp-14h] BYREF
unsigned long long v9; // [rsp+38h] [rbp-8h]
v9 = __readfsqword(0x28u);
v8[0] = *(_BYTE *)(a2 + 160);
v8[1] = *(_BYTE *)(a2 + 164);
v2 = *(_WORD *)(a2 + 162);
v8[2] = HIBYTE(v2);
v8[3] = v2;
v3 = *(_WORD *)(a2 + 166);
v8[4] = HIBYTE(v3);
v8[5] = v3;
v4 = *(_WORD *)(a2 + 170);
v8[6] = HIBYTE(v4);
v8[7] = v4;
v5 = *(_WORD *)(a2 + 172);
v8[8] = HIBYTE(v5);
v8[9] = v5;
v6 = *(_WORD *)(a2 + 174);
v8[10] = HIBYTE(v6);
v8[11] = v6;
return inline_mysql_file_write_0(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",
0x707u,
a1,
(long long)v8,
12LL,
4LL) != 0;
}
| _ma_keydef_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x18],EDI
MOV qword ptr [RBP + -0x20],RSI
LEA RCX,[RBP + -0x14]
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV DL,byte ptr [RAX + 0xa0]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RAX
INC RSI
MOV qword ptr [RBP + -0x28],RSI
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x20]
MOV DL,byte ptr [RAX + 0xa4]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RAX
INC RSI
MOV qword ptr [RBP + -0x28],RSI
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xa2]
MOV dword ptr [RBP + -0x2c],EAX
MOV DL,byte ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x2b]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xa6]
MOV dword ptr [RBP + -0x30],EAX
MOV DL,byte ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x2f]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xaa]
MOV dword ptr [RBP + -0x34],EAX
MOV DL,byte ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x33]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xac]
MOV dword ptr [RBP + -0x38],EAX
MOV DL,byte ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x37]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xae]
MOV dword ptr [RBP + -0x3c],EAX
MOV DL,byte ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x3b]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV EDX,dword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x28]
SUB R8,RCX
LEA RDI,[0x21fec8]
MOV ESI,0x707
MOV R9D,0x4
CALL 0x00171d90
TEST RAX,RAX
SETNZ AL
MOV byte ptr [RBP + -0x3d],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00172f7e
MOV AL,byte ptr [RBP + -0x3d]
ADD RSP,0x40
POP RBP
RET
LAB_00172f7e:
CALL 0x001272b0
|
int8 _ma_keydef_write(int4 param_1,long param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_44;
int1 uStack_43;
int1 local_40;
int1 uStack_3f;
int1 local_3c;
int1 uStack_3b;
int1 local_38;
int1 uStack_37;
int1 local_34;
int1 uStack_33;
int1 local_1c;
int1 local_1b;
int1 local_1a;
int1 local_19;
int1 local_18;
int1 local_17;
int1 local_16;
int1 local_15;
int1 local_14;
int1 local_13;
int1 local_12;
int1 local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_1c = *(int1 *)(param_2 + 0xa0);
local_1b = *(int1 *)(param_2 + 0xa4);
local_34 = (int1)*(int2 *)(param_2 + 0xa2);
local_19 = local_34;
uStack_33 = (int1)((ushort)*(int2 *)(param_2 + 0xa2) >> 8);
local_1a = uStack_33;
local_38 = (int1)*(int2 *)(param_2 + 0xa6);
local_17 = local_38;
uStack_37 = (int1)((ushort)*(int2 *)(param_2 + 0xa6) >> 8);
local_18 = uStack_37;
local_3c = (int1)*(int2 *)(param_2 + 0xaa);
local_15 = local_3c;
uStack_3b = (int1)((ushort)*(int2 *)(param_2 + 0xaa) >> 8);
local_16 = uStack_3b;
local_40 = (int1)*(int2 *)(param_2 + 0xac);
local_13 = local_40;
uStack_3f = (int1)((ushort)*(int2 *)(param_2 + 0xac) >> 8);
local_14 = uStack_3f;
local_44 = (int1)*(int2 *)(param_2 + 0xae);
local_11 = local_44;
uStack_43 = (int1)((ushort)*(int2 *)(param_2 + 0xae) >> 8);
local_12 = uStack_43;
lVar1 = inline_mysql_file_write
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x707,
param_1,&local_1c,(long)&local_10 - (long)&local_1c,4);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),lVar1 != 0);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
1,005 | minja::Context::at(minja::Value const&) | monkey531[P]llama/common/minja.hpp | virtual Value & at(const Value & key) {
if (values_.contains(key)) return values_.at(key);
if (parent_) return parent_->at(key);
throw std::runtime_error("Undefined variable: " + key.dump());
} | O1 | cpp | minja::Context::at(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0x5a702
testb %al, %al
je 0x6623f
movq %r15, %rdi
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5a504
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x6625e
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq %r14, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movl $0x10, %edi
callq 0x1a390
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x43576
leaq 0x4e4f1(%rip), %rsi # 0xb4777
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x29fff
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x1ac00
xorl %ebp, %ebp
movq 0x7fd42(%rip), %rsi # 0xe5ff0
movq 0x7fcbb(%rip), %rdx # 0xe5f70
movq %rbx, %rdi
callq 0x1acd0
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x662e3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a740
jmp 0x662e3
movq %rax, %r14
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x66306
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a740
jmp 0x66306
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x66313
movq %rbx, %rdi
callq 0x1a530
movq %r14, %rdi
callq 0x1ad30
nop
| _ZN5minja7Context2atERKNS_5ValueE:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r15, [rdi+18h]
mov rdi, r15; this
call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&)
test al, al
jz short loc_6623F
mov rdi, r15; this
mov rsi, r14; minja::Value *
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
loc_6623F:
mov rdi, [rbx+68h]
test rdi, rdi
jz short loc_6625E
mov rax, [rdi]
mov rax, [rax+18h]
mov rsi, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp rax
loc_6625E:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUndefinedVaria; "Undefined variable: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_662E3
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_662E3
mov r14, rax
mov bpl, 1
loc_662E3:
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_66306
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_66306
mov r14, rax
mov bpl, 1
loc_66306:
test bpl, bpl
jz short loc_66313
mov rdi, rbx; void *
call ___cxa_free_exception
loc_66313:
mov rdi, r14
call __Unwind_Resume
| unsigned long long minja::Context::at(minja::Context *this, const minja::Value *a2, __m128d a3)
{
long long v4; // rdi
void *exception; // rbx
_BYTE v6[16]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v7[16]; // [rsp+28h] [rbp-40h] BYREF
if ( (unsigned __int8)minja::Value::contains((minja::Context *)((char *)this + 24), a2, a3) )
return minja::Value::at((minja::Context *)((char *)this + 24), a2);
v4 = *((_QWORD *)this + 13);
if ( !v4 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6);
std::runtime_error::runtime_error(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return (*(long long ( **)(long long, const minja::Value *))(*(_QWORD *)v4 + 24LL))(v4, a2);
}
| at:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RDI + 0x18]
MOV RDI,R15
CALL 0x0015a702
TEST AL,AL
JZ 0x0016623f
MOV RDI,R15
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0015a504
LAB_0016623f:
MOV RDI,qword ptr [RBX + 0x68]
TEST RDI,RDI
JZ 0x0016625e
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x18]
MOV RSI,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP RAX
LAB_0016625e:
MOV EDI,0x10
CALL 0x0011a390
MOV RBX,RAX
LAB_0016626b:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00143576
LAB_0016627f:
LEA RSI,[0x1b4777]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00129fff
MOV BPL,0x1
LAB_00166298:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x0011ac00
XOR EBP,EBP
MOV RSI,qword ptr [0x001e5ff0]
MOV RDX,qword ptr [0x001e5f70]
MOV RDI,RBX
CALL 0x0011acd0
|
/* minja::Context::at(minja::Value const&) */
void __thiscall minja::Context::at(Context *this,Value *param_1)
{
long *plVar1;
char cVar2;
runtime_error *this_00;
int1 local_60 [32];
string local_40 [32];
cVar2 = Value::contains((Value *)(this + 0x18),param_1);
if (cVar2 != '\0') {
Value::at((Value *)(this + 0x18),param_1);
return;
}
plVar1 = *(long **)(this + 0x68);
if (plVar1 != (long *)0x0) {
/* WARNING: Could not recover jumptable at 0x0016625c. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*plVar1 + 0x18))(plVar1,param_1);
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016626b to 0016627e has its CatchHandler @ 00166300 */
Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0));
/* try { // try from 0016627f to 00166294 has its CatchHandler @ 001662dd */
std::operator+((char *)local_40,(string *)"Undefined variable: ");
/* try { // try from 00166298 to 001662bc has its CatchHandler @ 001662bd */
std::runtime_error::runtime_error(this_00,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001e5ff0,PTR__runtime_error_001e5f70);
}
|
|
1,006 | my_strtoull | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static unsigned long long my_strtoull(const char *str, size_t len, const char **end, int *err)
{
unsigned long long val = 0;
const char *p = str;
const char *end_str = p + len;
for (; p < end_str; p++)
{
if (*p < '0' || *p > '9')
break;
if (val > ULONGLONG_MAX /10 || val*10 > ULONGLONG_MAX - (*p - '0'))
{
*err = ERANGE;
break;
}
val = val * 10 + *p -'0';
}
if (p == str)
/* Did not parse anything.*/
*err = ERANGE;
*end = p;
return val;
} | O3 | c | my_strtoull:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
testq %rsi, %rsi
jle 0x24645
addq %rdi, %rsi
xorl %r8d, %r8d
movabsq $0x1999999999999999, %r9 # imm = 0x1999999999999999
xorl %eax, %eax
movsbq (%rdi,%r8), %r10
leal -0x3a(%r10), %r11d
cmpb $-0xa, %r11b
jb 0x2464f
cmpq %r9, %rax
ja 0x24649
leaq (%rax,%rax), %r11
leaq (%r11,%r11,4), %r11
movl $0x2f, %ebx
subq %r10, %rbx
cmpq %rbx, %r11
ja 0x24649
leaq (%r11,%r10), %rax
addq $-0x30, %rax
leaq (%rdi,%r8), %r10
incq %r10
incq %r8
cmpq %rsi, %r10
jb 0x24600
addq %r8, %rdi
jmp 0x2465d
xorl %eax, %eax
jmp 0x24657
movl $0x22, (%rcx)
addq %r8, %rdi
testq %r8, %r8
jne 0x2465d
movl $0x22, (%rcx)
movq %rdi, (%rdx)
popq %rbx
popq %rbp
retq
| my_strtoull:
push rbp
mov rbp, rsp
push rbx
test rsi, rsi
jle short loc_24645
add rsi, rdi
xor r8d, r8d
mov r9, 1999999999999999h
xor eax, eax
loc_24600:
movsx r10, byte ptr [rdi+r8]
lea r11d, [r10-3Ah]
cmp r11b, 0F6h
jb short loc_2464F
cmp rax, r9
ja short loc_24649
lea r11, [rax+rax]
lea r11, [r11+r11*4]
mov ebx, 2Fh ; '/'
sub rbx, r10
cmp r11, rbx
ja short loc_24649
lea rax, [r11+r10]
add rax, 0FFFFFFFFFFFFFFD0h
lea r10, [rdi+r8]
inc r10
inc r8
cmp r10, rsi
jb short loc_24600
add rdi, r8
jmp short loc_2465D
loc_24645:
xor eax, eax
jmp short loc_24657
loc_24649:
mov dword ptr [rcx], 22h ; '"'
loc_2464F:
add rdi, r8
test r8, r8
jnz short loc_2465D
loc_24657:
mov dword ptr [rcx], 22h ; '"'
loc_2465D:
mov [rdx], rdi
pop rbx
pop rbp
retn
| unsigned long long my_strtoull(long long a1, long long a2, _QWORD *a3, _DWORD *a4)
{
unsigned long long v4; // rsi
long long v5; // r8
unsigned long long result; // rax
long long v7; // r10
unsigned long long v8; // r10
if ( a2 <= 0 )
{
result = 0LL;
LABEL_11:
*a4 = 34;
goto LABEL_12;
}
v4 = a1 + a2;
v5 = 0LL;
result = 0LL;
while ( 1 )
{
v7 = *(char *)(a1 + v5);
if ( (unsigned __int8)(v7 - 58) < 0xF6u )
break;
if ( result > 0x1999999999999999LL || 10 * result > 47 - v7 )
{
*a4 = 34;
break;
}
result = 10 * result + v7 - 48;
v8 = a1 + v5++ + 1;
if ( v8 >= v4 )
{
a1 += v5;
goto LABEL_12;
}
}
a1 += v5;
if ( !v5 )
goto LABEL_11;
LABEL_12:
*a3 = a1;
return result;
}
| my_strtoull:
PUSH RBP
MOV RBP,RSP
PUSH RBX
TEST RSI,RSI
JLE 0x00124645
ADD RSI,RDI
XOR R8D,R8D
MOV R9,0x1999999999999999
XOR EAX,EAX
LAB_00124600:
MOVSX R10,byte ptr [RDI + R8*0x1]
LEA R11D,[R10 + -0x3a]
CMP R11B,0xf6
JC 0x0012464f
CMP RAX,R9
JA 0x00124649
LEA R11,[RAX + RAX*0x1]
LEA R11,[R11 + R11*0x4]
MOV EBX,0x2f
SUB RBX,R10
CMP R11,RBX
JA 0x00124649
LEA RAX,[R11 + R10*0x1]
ADD RAX,-0x30
LEA R10,[RDI + R8*0x1]
INC R10
INC R8
CMP R10,RSI
JC 0x00124600
ADD RDI,R8
JMP 0x0012465d
LAB_00124645:
XOR EAX,EAX
JMP 0x00124657
LAB_00124649:
MOV dword ptr [RCX],0x22
LAB_0012464f:
ADD RDI,R8
TEST R8,R8
JNZ 0x0012465d
LAB_00124657:
MOV dword ptr [RCX],0x22
LAB_0012465d:
MOV qword ptr [RDX],RDI
POP RBX
POP RBP
RET
|
ulong my_strtoull(long param_1,long param_2,long *param_3,int4 *param_4)
{
long lVar1;
char cVar2;
ulong uVar3;
long lVar4;
if (param_2 < 1) {
uVar3 = 0;
LAB_00124657:
*param_4 = 0x22;
}
else {
lVar4 = 0;
uVar3 = 0;
do {
cVar2 = *(char *)(param_1 + lVar4);
if ((byte)(cVar2 - 0x3aU) < 0xf6) {
LAB_0012464f:
param_1 = param_1 + lVar4;
if (lVar4 == 0) goto LAB_00124657;
goto LAB_0012465d;
}
if ((0x1999999999999999 < uVar3) || (0x2fU - (long)cVar2 < uVar3 * 10)) {
*param_4 = 0x22;
goto LAB_0012464f;
}
uVar3 = (uVar3 * 10 + (long)cVar2) - 0x30;
lVar1 = param_1 + lVar4;
lVar4 = lVar4 + 1;
} while (lVar1 + 1U < (ulong)(param_2 + param_1));
param_1 = param_1 + lVar4;
}
LAB_0012465d:
*param_3 = param_1;
return uVar3;
}
|
|
1,007 | spdlog::details::c_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v8::basic_memory_buffer<char, 250ul, std::allocator<char>>&) | aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/pattern_formatter-inl.h | void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override
{
const size_t field_size = 24;
ScopedPadder p(field_size, padinfo_, dest);
fmt_helper::append_string_view(days[static_cast<size_t>(tm_time.tm_wday)], dest);
dest.push_back(' ');
fmt_helper::append_string_view(months[static_cast<size_t>(tm_time.tm_mon)], dest);
dest.push_back(' ');
fmt_helper::append_int(tm_time.tm_mday, dest);
dest.push_back(' ');
// time
fmt_helper::pad2(tm_time.tm_hour, dest);
dest.push_back(':');
fmt_helper::pad2(tm_time.tm_min, dest);
dest.push_back(':');
fmt_helper::pad2(tm_time.tm_sec, dest);
dest.push_back(' ');
fmt_helper::append_int(tm_time.tm_year + 1900, dest);
} | O0 | c | spdlog::details::c_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v8::basic_memory_buffer<char, 250ul, std::allocator<char>>&):
subq $0x98, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
movq 0x70(%rsp), %rdx
movq $0x18, 0x50(%rsp)
addq $0x8, %rdx
movq 0x58(%rsp), %rcx
leaq 0x4f(%rsp), %rdi
movl $0x18, %esi
callq 0xf3330
movq 0x60(%rsp), %rax
movslq 0x18(%rax), %rsi
leaq 0x661e7(%rip), %rdi # 0x15c388
callq 0xe3810
movq (%rax), %rax
leaq 0x38(%rsp), %rcx
movq %rcx, 0x80(%rsp)
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x78(%rsp), %rcx
movq %rcx, (%rax)
movq 0x78(%rsp), %rdi
callq 0x19f90
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x58(%rsp), %rdx
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0xcd760
movq 0x58(%rsp), %rdi
movb $0x20, 0x37(%rsp)
leaq 0x37(%rsp), %rsi
callq 0x9a6a0
movq 0x60(%rsp), %rax
movslq 0x10(%rax), %rsi
leaq 0x6369a(%rip), %rdi # 0x1598b8
callq 0xe4370
movq (%rax), %rax
leaq 0x20(%rsp), %rcx
movq %rcx, 0x90(%rsp)
movq %rax, 0x88(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x88(%rsp), %rcx
movq %rcx, (%rax)
movq 0x88(%rsp), %rdi
callq 0x19f90
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x58(%rsp), %rdx
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xcd760
movq 0x58(%rsp), %rdi
movb $0x20, 0x1f(%rsp)
leaq 0x1f(%rsp), %rsi
callq 0x9a6a0
movq 0x60(%rsp), %rax
movl 0xc(%rax), %edi
movq 0x58(%rsp), %rsi
callq 0xdaf20
movq 0x58(%rsp), %rdi
movb $0x20, 0x1e(%rsp)
leaq 0x1e(%rsp), %rsi
callq 0x9a6a0
movq 0x60(%rsp), %rax
movl 0x8(%rax), %edi
movq 0x58(%rsp), %rsi
callq 0xdaf90
movq 0x58(%rsp), %rdi
movb $0x3a, 0x1d(%rsp)
leaq 0x1d(%rsp), %rsi
callq 0x9a6a0
movq 0x60(%rsp), %rax
movl 0x4(%rax), %edi
movq 0x58(%rsp), %rsi
callq 0xdaf90
movq 0x58(%rsp), %rdi
movb $0x3a, 0x1c(%rsp)
leaq 0x1c(%rsp), %rsi
callq 0x9a6a0
movq 0x60(%rsp), %rax
movl (%rax), %edi
movq 0x58(%rsp), %rsi
callq 0xdaf90
movq 0x58(%rsp), %rdi
movb $0x20, 0x1b(%rsp)
leaq 0x1b(%rsp), %rsi
callq 0x9a6a0
movq 0x60(%rsp), %rax
movl 0x14(%rax), %edi
addl $0x76c, %edi # imm = 0x76C
movq 0x58(%rsp), %rsi
callq 0xdaf20
addq $0x98, %rsp
retq
nopl (%rax,%rax)
| _ZN6spdlog7details11c_formatterINS0_18null_scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt2v819basic_memory_bufferIcLm250ESaIcEEE:
sub rsp, 98h
mov [rsp+98h+var_28], rdi
mov [rsp+98h+var_30], rsi
mov [rsp+98h+var_38], rdx
mov [rsp+98h+var_40], rcx
mov rdx, [rsp+98h+var_28]
mov [rsp+98h+var_48], 18h
add rdx, 8
mov rcx, [rsp+98h+var_40]
lea rdi, [rsp+98h+var_49]
mov esi, 18h
call _ZN6spdlog7details18null_scoped_padderC2EmRKNS0_12padding_infoERN3fmt2v819basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::null_scoped_padder::null_scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>> &)
mov rax, [rsp+98h+var_38]
movsxd rsi, dword ptr [rax+18h]
lea rdi, _ZN6spdlog7detailsL4daysE; spdlog::details::days
call _ZNSt5arrayIPKcLm7EEixEm; std::array<char const*,7ul>::operator[](ulong)
mov rax, [rax]
lea rcx, [rsp+98h+var_60]
mov [rsp+98h+var_18], rcx
mov [rsp+98h+var_20], rax
mov rax, [rsp+98h+var_18]
mov [rsp+98h+var_90], rax
mov rcx, [rsp+98h+var_20]
mov [rax], rcx
mov rdi, [rsp+98h+var_20]
call _strlen
mov rcx, rax
mov rax, [rsp+98h+var_90]
mov [rax+8], rcx
mov rdx, [rsp+98h+var_40]
mov rdi, [rsp+98h+var_60]
mov rsi, [rsp+98h+var_58]
call _ZN6spdlog7details10fmt_helper18append_string_viewEN3fmt2v817basic_string_viewIcEERNS3_19basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_string_view(fmt::v8::basic_string_view<char>,fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>> &)
mov rdi, [rsp+98h+var_40]
mov [rsp+98h+var_61], 20h ; ' '
lea rsi, [rsp+98h+var_61]
call _ZN3fmt2v86detail6bufferIcE9push_backERKc; fmt::v8::detail::buffer<char>::push_back(char const&)
mov rax, [rsp+98h+var_38]
movsxd rsi, dword ptr [rax+10h]
lea rdi, _ZN6spdlog7detailsL6monthsE; spdlog::details::months
call _ZNKSt5arrayIPKcLm12EEixEm; std::array<char const*,12ul>::operator[](ulong)
mov rax, [rax]
lea rcx, [rsp+98h+var_78]
mov [rsp+98h+var_8], rcx
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_8]
mov [rsp+98h+var_88], rax
mov rcx, [rsp+98h+var_10]
mov [rax], rcx
mov rdi, [rsp+98h+var_10]
call _strlen
mov rcx, rax
mov rax, [rsp+98h+var_88]
mov [rax+8], rcx
mov rdx, [rsp+98h+var_40]
mov rdi, [rsp+98h+var_78]
mov rsi, [rsp+98h+var_70]
call _ZN6spdlog7details10fmt_helper18append_string_viewEN3fmt2v817basic_string_viewIcEERNS3_19basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_string_view(fmt::v8::basic_string_view<char>,fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>> &)
mov rdi, [rsp+98h+var_40]
mov [rsp+98h+var_79], 20h ; ' '
lea rsi, [rsp+98h+var_79]
call _ZN3fmt2v86detail6bufferIcE9push_backERKc; fmt::v8::detail::buffer<char>::push_back(char const&)
mov rax, [rsp+98h+var_38]
mov edi, [rax+0Ch]
mov rsi, [rsp+98h+var_40]
call _ZN6spdlog7details10fmt_helper10append_intIiEEvT_RN3fmt2v819basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_int<int>(int,fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>> &)
mov rdi, [rsp+98h+var_40]
mov [rsp+98h+var_7A], 20h ; ' '
lea rsi, [rsp+98h+var_7A]
call _ZN3fmt2v86detail6bufferIcE9push_backERKc; fmt::v8::detail::buffer<char>::push_back(char const&)
mov rax, [rsp+98h+var_38]
mov edi, [rax+8]
mov rsi, [rsp+98h+var_40]
call _ZN6spdlog7details10fmt_helper4pad2EiRN3fmt2v819basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::pad2(int,fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>> &)
mov rdi, [rsp+98h+var_40]
mov [rsp+98h+var_7B], 3Ah ; ':'
lea rsi, [rsp+98h+var_7B]
call _ZN3fmt2v86detail6bufferIcE9push_backERKc; fmt::v8::detail::buffer<char>::push_back(char const&)
mov rax, [rsp+98h+var_38]
mov edi, [rax+4]
mov rsi, [rsp+98h+var_40]
call _ZN6spdlog7details10fmt_helper4pad2EiRN3fmt2v819basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::pad2(int,fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>> &)
mov rdi, [rsp+98h+var_40]
mov [rsp+98h+var_7C], 3Ah ; ':'
lea rsi, [rsp+98h+var_7C]
call _ZN3fmt2v86detail6bufferIcE9push_backERKc; fmt::v8::detail::buffer<char>::push_back(char const&)
mov rax, [rsp+98h+var_38]
mov edi, [rax]
mov rsi, [rsp+98h+var_40]
call _ZN6spdlog7details10fmt_helper4pad2EiRN3fmt2v819basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::pad2(int,fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>> &)
mov rdi, [rsp+98h+var_40]
mov [rsp+98h+var_7D], 20h ; ' '
lea rsi, [rsp+98h+var_7D]
call _ZN3fmt2v86detail6bufferIcE9push_backERKc; fmt::v8::detail::buffer<char>::push_back(char const&)
mov rax, [rsp+98h+var_38]
mov edi, [rax+14h]
add edi, 76Ch
mov rsi, [rsp+98h+var_40]
call _ZN6spdlog7details10fmt_helper10append_intIiEEvT_RN3fmt2v819basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_int<int>(int,fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>> &)
add rsp, 98h
retn
| long long spdlog::details::c_formatter<spdlog::details::null_scoped_padder>::format(
long long a1,
long long a2,
int *a3,
_QWORD *a4)
{
long long v4; // rax
long long v5; // rax
char v7; // [rsp+1Bh] [rbp-7Dh] BYREF
char v8; // [rsp+1Ch] [rbp-7Ch] BYREF
char v9; // [rsp+1Dh] [rbp-7Bh] BYREF
char v10; // [rsp+1Eh] [rbp-7Ah] BYREF
char v11; // [rsp+1Fh] [rbp-79h] BYREF
long long v12; // [rsp+20h] [rbp-78h] BYREF
long long v13; // [rsp+28h] [rbp-70h]
char v14; // [rsp+37h] [rbp-61h] BYREF
long long v15; // [rsp+38h] [rbp-60h] BYREF
long long v16; // [rsp+40h] [rbp-58h]
long long v17; // [rsp+50h] [rbp-48h]
_QWORD *v18; // [rsp+58h] [rbp-40h]
int *v19; // [rsp+60h] [rbp-38h]
long long v20; // [rsp+68h] [rbp-30h]
long long v21; // [rsp+70h] [rbp-28h]
long long v22; // [rsp+78h] [rbp-20h]
long long *v23; // [rsp+80h] [rbp-18h]
long long v24; // [rsp+88h] [rbp-10h]
long long *v25; // [rsp+90h] [rbp-8h]
v21 = a1;
v20 = a2;
v19 = a3;
v18 = a4;
v17 = 24LL;
spdlog::details::null_scoped_padder::null_scoped_padder();
v4 = *(_QWORD *)std::array<char const*,7ul>::operator[]((long long)spdlog::details::days, v19[6]);
v23 = &v15;
v22 = v4;
v15 = v4;
v16 = strlen(v4);
spdlog::details::fmt_helper::append_string_view(v15, v16, v18);
v14 = 32;
fmt::v8::detail::buffer<char>::push_back((long long)v18, &v14);
v5 = *(_QWORD *)std::array<char const*,12ul>::operator[]((long long)spdlog::details::months, v19[4]);
v25 = &v12;
v24 = v5;
v12 = v5;
v13 = strlen(v5);
spdlog::details::fmt_helper::append_string_view(v12, v13, v18);
v11 = 32;
fmt::v8::detail::buffer<char>::push_back((long long)v18, &v11);
spdlog::details::fmt_helper::append_int<int>(v19[3], v18);
v10 = 32;
fmt::v8::detail::buffer<char>::push_back((long long)v18, &v10);
spdlog::details::fmt_helper::pad2(v19[2], (long long)v18);
v9 = 58;
fmt::v8::detail::buffer<char>::push_back((long long)v18, &v9);
spdlog::details::fmt_helper::pad2(v19[1], (long long)v18);
v8 = 58;
fmt::v8::detail::buffer<char>::push_back((long long)v18, &v8);
spdlog::details::fmt_helper::pad2(*v19, (long long)v18);
v7 = 32;
fmt::v8::detail::buffer<char>::push_back((long long)v18, &v7);
return spdlog::details::fmt_helper::append_int<int>(v19[5] + 1900, v18);
}
| format:
SUB RSP,0x98
MOV qword ptr [RSP + 0x70],RDI
MOV qword ptr [RSP + 0x68],RSI
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x58],RCX
MOV RDX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x50],0x18
ADD RDX,0x8
MOV RCX,qword ptr [RSP + 0x58]
LEA RDI,[RSP + 0x4f]
MOV ESI,0x18
CALL 0x001f3330
MOV RAX,qword ptr [RSP + 0x60]
MOVSXD RSI,dword ptr [RAX + 0x18]
LEA RDI,[0x25c388]
CALL 0x001e3810
MOV RAX,qword ptr [RAX]
LEA RCX,[RSP + 0x38]
MOV qword ptr [RSP + 0x80],RCX
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x8],RAX
MOV RCX,qword ptr [RSP + 0x78]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x78]
CALL 0x00119f90
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RDX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x001cd760
MOV RDI,qword ptr [RSP + 0x58]
MOV byte ptr [RSP + 0x37],0x20
LEA RSI,[RSP + 0x37]
CALL 0x0019a6a0
MOV RAX,qword ptr [RSP + 0x60]
MOVSXD RSI,dword ptr [RAX + 0x10]
LEA RDI,[0x2598b8]
CALL 0x001e4370
MOV RAX,qword ptr [RAX]
LEA RCX,[RSP + 0x20]
MOV qword ptr [RSP + 0x90],RCX
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x10],RAX
MOV RCX,qword ptr [RSP + 0x88]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x00119f90
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RDX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001cd760
MOV RDI,qword ptr [RSP + 0x58]
MOV byte ptr [RSP + 0x1f],0x20
LEA RSI,[RSP + 0x1f]
CALL 0x0019a6a0
MOV RAX,qword ptr [RSP + 0x60]
MOV EDI,dword ptr [RAX + 0xc]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x001daf20
MOV RDI,qword ptr [RSP + 0x58]
MOV byte ptr [RSP + 0x1e],0x20
LEA RSI,[RSP + 0x1e]
CALL 0x0019a6a0
MOV RAX,qword ptr [RSP + 0x60]
MOV EDI,dword ptr [RAX + 0x8]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x001daf90
MOV RDI,qword ptr [RSP + 0x58]
MOV byte ptr [RSP + 0x1d],0x3a
LEA RSI,[RSP + 0x1d]
CALL 0x0019a6a0
MOV RAX,qword ptr [RSP + 0x60]
MOV EDI,dword ptr [RAX + 0x4]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x001daf90
MOV RDI,qword ptr [RSP + 0x58]
MOV byte ptr [RSP + 0x1c],0x3a
LEA RSI,[RSP + 0x1c]
CALL 0x0019a6a0
MOV RAX,qword ptr [RSP + 0x60]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x001daf90
MOV RDI,qword ptr [RSP + 0x58]
MOV byte ptr [RSP + 0x1b],0x20
LEA RSI,[RSP + 0x1b]
CALL 0x0019a6a0
MOV RAX,qword ptr [RSP + 0x60]
MOV EDI,dword ptr [RAX + 0x14]
ADD EDI,0x76c
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x001daf20
ADD RSP,0x98
RET
|
/* spdlog::details::c_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg
const&, tm const&, fmt::v8::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */
void __thiscall
spdlog::details::c_formatter<spdlog::details::null_scoped_padder>::format
(c_formatter<spdlog::details::null_scoped_padder> *this,log_msg *param_1,tm *param_2,
basic_memory_buffer *param_3)
{
int8 *puVar1;
size_t sVar2;
char local_7d [5];
fmt_helper *local_78 [2];
char local_61;
fmt_helper *local_60 [2];
null_scoped_padder local_49;
int8 local_48;
basic_memory_buffer *local_40;
tm *local_38;
log_msg *local_30;
c_formatter<spdlog::details::null_scoped_padder> *local_28;
fmt_helper *local_20;
fmt_helper **local_18;
fmt_helper *local_10;
fmt_helper **local_8;
local_48 = 0x18;
local_40 = param_3;
local_38 = param_2;
local_30 = param_1;
local_28 = this;
null_scoped_padder::null_scoped_padder(&local_49,0x18,(padding_info *)(this + 8),param_3);
puVar1 = (int8 *)
std::array<char_const*,7ul>::operator[]
((array<char_const*,7ul> *)days,(long)local_38->tm_wday);
local_60[0] = (fmt_helper *)*puVar1;
local_18 = local_60;
local_20 = local_60[0];
sVar2 = strlen((char *)local_60[0]);
fmt_helper::append_string_view(local_60[0],sVar2,local_40);
local_61 = ' ';
fmt::v8::detail::buffer<char>::push_back((buffer<char> *)local_40,&local_61);
puVar1 = (int8 *)
std::array<char_const*,12ul>::operator[]
((array<char_const*,12ul> *)months,(long)local_38->tm_mon);
local_78[0] = (fmt_helper *)*puVar1;
local_8 = local_78;
local_10 = local_78[0];
sVar2 = strlen((char *)local_78[0]);
fmt_helper::append_string_view(local_78[0],sVar2,local_40);
local_7d[4] = 0x20;
fmt::v8::detail::buffer<char>::push_back((buffer<char> *)local_40,local_7d + 4);
fmt_helper::append_int<int>(local_38->tm_mday,local_40);
local_7d[3] = 0x20;
fmt::v8::detail::buffer<char>::push_back((buffer<char> *)local_40,local_7d + 3);
fmt_helper::pad2(local_38->tm_hour,local_40);
local_7d[2] = 0x3a;
fmt::v8::detail::buffer<char>::push_back((buffer<char> *)local_40,local_7d + 2);
fmt_helper::pad2(local_38->tm_min,local_40);
local_7d[1] = 0x3a;
fmt::v8::detail::buffer<char>::push_back((buffer<char> *)local_40,local_7d + 1);
fmt_helper::pad2(local_38->tm_sec,local_40);
local_7d[0] = ' ';
fmt::v8::detail::buffer<char>::push_back((buffer<char> *)local_40,local_7d);
fmt_helper::append_int<int>(local_38->tm_year + 0x76c,local_40);
return;
}
|
|
1,008 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3]>(char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3]) | monkey531[P]llama/common/json.hpp | inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
} | O1 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3]>(char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %rbp
movq %rbp, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x1b3e0
movq %rax, %r13
addq 0x8(%r15), %r13
movq %r14, %rdi
callq 0x1b3e0
addq %rax, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1bd70
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1c0f0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x1b260
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1c0f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %rbp, %rdi
je 0xac3fd
movq (%rbp), %rsi
incq %rsi
callq 0x1b8c0
movq %r14, %rdi
callq 0x1bf90
nop
| _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
lea rbp, [rdi+10h]
mov [rdi], rbp
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
call _strlen
mov r13, rax
add r13, [r15+8]
mov rdi, r14
call _strlen
add r13, rax
mov rdi, rbx
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, rbp
jz short loc_AC3FD
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AC3FD:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
long long a1,
long long a2,
_QWORD *a3,
long long a4)
{
long long v6; // r13
long long v7; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v6 = a3[1] + strlen(a2);
v7 = strlen(a4);
std::string::reserve(a1, v7 + v6);
std::string::append(a1, a2);
std::string::_M_append(a1, *a3, a3[1]);
std::string::append(a1, a4);
return a1;
}
| concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
LEA RBP,[RDI + 0x10]
MOV qword ptr [RDI],RBP
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
CALL 0x0011b3e0
MOV R13,RAX
ADD R13,qword ptr [R15 + 0x8]
MOV RDI,R14
CALL 0x0011b3e0
ADD R13,RAX
LAB_001ac3a4:
MOV RDI,RBX
MOV RSI,R13
CALL 0x0011bd70
MOV RDI,RBX
MOV RSI,R12
CALL 0x0011c0f0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
MOV RDI,RBX
CALL 0x0011b260
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011c0f0
LAB_001ac3d4:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [6], std::__cxx11::string, char const (&) [12]>(char const (&) [6], std::__cxx11::string&&,
char const (&) [12]) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(detail *this,char *param_1,string *param_2,char *param_3)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
strlen(param_1);
strlen(param_3);
/* try { // try from 001ac3a4 to 001ac3d3 has its CatchHandler @ 001ac3e6 */
std::__cxx11::string::reserve((ulong)this);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::_M_append((char *)this,*(ulong *)param_2);
std::__cxx11::string::append((char *)this);
return this;
}
|
|
1,009 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3]>(char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3]) | monkey531[P]llama/common/json.hpp | inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
} | O2 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3]>(char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3]):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x442c3
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24d70
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x83b89
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x251d8
movq %r14, %rdi
callq 0x24f80
| _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_:
push r15
push r14
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
and qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
mov rsi, rdx
call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJPKcEEEmS4_DpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(char const*,char const* const&)
mov rdi, rbx
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA56_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_
mov rax, rbx
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(
long long a1,
long long a2,
_QWORD *a3)
{
long long v4; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(a2, a3);
std::string::reserve(a1, v4);
ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA56_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_(
a1,
a2,
a3);
return a1;
}
| concat<std::__cxx11::string,char_const(&)[56],char_const*>:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
AND qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
MOV RSI,RDX
CALL 0x001442c3
LAB_00183b54:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00124d70
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x00183b89
LAB_00183b6d:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [56], char const*>(char const (&) [56], char const*&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[56],char_const*>
(detail *this,char *param_1,char **param_2)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
concat_length<char_const*>(param_1,param_2);
/* try { // try from 00183b54 to 00183b6c has its CatchHandler @ 00183b76 */
std::__cxx11::string::reserve((ulong)this);
_ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA56_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_
(this,param_1,param_2);
return this;
}
|
|
1,010 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3]>(char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3]) | monkey531[P]llama/common/json.hpp | inline OutStringType concat(Args && ... args)
{
OutStringType str;
str.reserve(concat_length(args...));
concat_into(str, std::forward<Args>(args)...);
return str;
} | O3 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3]>(char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3]):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0x1b3e0
addq 0x8(%r14), %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1bd70
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c0f0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x1b260
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0xb7d6d
movq (%r12), %rsi
incq %rsi
callq 0x1b8c0
movq %r14, %rdi
callq 0x1bf90
| _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA39_KcS8_EEET_DpOT0_:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r12, [rdi+10h]
mov [rdi], r12
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
call _strlen
add rax, [r14+8]
mov rdi, rbx
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r12
jz short loc_B7D6D
mov rsi, [r12]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B7D6D:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[39],std::string>(
long long a1,
long long a2,
_QWORD *a3)
{
long long v4; // rax
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
v4 = strlen(a2);
std::string::reserve(a1, a3[1] + v4);
std::string::append(a1, a2);
std::string::_M_append(a1, *a3, a3[1]);
return a1;
}
| concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RDI + 0x10]
MOV qword ptr [RDI],R12
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RDI,RSI
CALL 0x0011b3e0
ADD RAX,qword ptr [R14 + 0x8]
LAB_001b7d22:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011bd70
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011c0f0
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x0011b260
LAB_001b7d47:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const
(&) [39], std::__cxx11::string >(char const (&) [39], std::__cxx11::string&&) */
detail * __thiscall
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string>
(detail *this,char *param_1,string *param_2)
{
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
strlen(param_1);
/* try { // try from 001b7d22 to 001b7d46 has its CatchHandler @ 001b7d56 */
std::__cxx11::string::reserve((ulong)this);
std::__cxx11::string::append((char *)this);
std::__cxx11::string::_M_append((char *)this,*(ulong *)param_2);
return this;
}
|
|
1,011 | 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 0x42bd5
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 0x42be7
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_42BD5
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_42BE7
loc_42BD5:
mov rax, [rbp+var_18]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rax], rcx
loc_42BE7:
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 0x00142bd5
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 0x00142be7
LAB_00142bd5:
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_00142be7:
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;
}
|
|
1,012 | 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;
} | O3 | c | my_suspend_hook:
pushq %rbp
movq %rsp, %rbp
testb %dil, %dil
je 0x3f397
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
movq (%rax), %rdx
movq %rdx, 0x10(%rsi)
movq (%rcx), %rcx
jmp 0x3f39e
movq (%rsi), %rax
movq 0x10(%rsi), %rcx
movq %rcx, (%rax)
popq %rbp
retq
| my_suspend_hook:
push rbp
mov rbp, rsp
test dil, dil
jz short loc_3F397
mov rax, [rsi]
mov rcx, [rsi+8]
mov rdx, [rax]
mov [rsi+10h], rdx
mov rcx, [rcx]
jmp short loc_3F39E
loc_3F397:
mov rax, [rsi]
mov rcx, [rsi+10h]
loc_3F39E:
mov [rax], rcx
pop rbp
retn
| _QWORD * my_suspend_hook(char a1, long long a2)
{
_QWORD *result; // rax
long long *v3; // rcx
long long v4; // rcx
result = *(_QWORD **)a2;
if ( a1 )
{
v3 = *(long long **)(a2 + 8);
*(_QWORD *)(a2 + 16) = **(_QWORD **)a2;
v4 = *v3;
}
else
{
v4 = *(_QWORD *)(a2 + 16);
}
*result = v4;
return result;
}
| my_suspend_hook:
PUSH RBP
MOV RBP,RSP
TEST DIL,DIL
JZ 0x0013f397
MOV RAX,qword ptr [RSI]
MOV RCX,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RAX]
MOV qword ptr [RSI + 0x10],RDX
MOV RCX,qword ptr [RCX]
JMP 0x0013f39e
LAB_0013f397:
MOV RAX,qword ptr [RSI]
MOV RCX,qword ptr [RSI + 0x10]
LAB_0013f39e:
MOV qword ptr [RAX],RCX
POP RBP
RET
|
void my_suspend_hook(char param_1,int8 *param_2)
{
int8 *puVar1;
int8 uVar2;
if (param_1 == '\0') {
puVar1 = (int8 *)*param_2;
uVar2 = param_2[2];
}
else {
puVar1 = (int8 *)*param_2;
param_2[2] = *puVar1;
uVar2 = *(int8 *)param_2[1];
}
*puVar1 = uVar2;
return;
}
|
|
1,013 | maria_rtree_real_delete | eloqsql/storage/maria/ma_rt_index.c | my_bool maria_rtree_real_delete(MARIA_HA *info, MARIA_KEY *key,
my_off_t *root)
{
uint page_size;
stPageList ReinsertList;
my_off_t old_root;
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *keyinfo= key->keyinfo;
uint key_data_length= key->data_length;
my_bool buff_alloced= 0;
uchar *page_buf= 0;
DBUG_ENTER("maria_rtree_real_delete");
if ((old_root= share->state.key_root[keyinfo->key_nr]) ==
HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
DBUG_RETURN(1); /* purecov: inspected */
}
DBUG_PRINT("rtree", ("starting deletion at root page: %lu",
(ulong) old_root));
ReinsertList.pages= NULL;
ReinsertList.n_pages= 0;
ReinsertList.m_pages= 0;
switch (maria_rtree_delete_req(info, key, old_root, &page_size,
&ReinsertList, 0)) {
case 2: /* empty */
{
*root= HA_OFFSET_ERROR;
break;
}
case 0: /* deleted */
{
uint nod_flag;
ulong i;
MARIA_PAGE page;
MARIA_KEY tmp_key;
tmp_key.keyinfo= key->keyinfo;
tmp_key.data_length= key->data_length;
tmp_key.ref_length= key->ref_length;
tmp_key.flag= 0; /* Safety */
if (ReinsertList.n_pages)
{
alloc_on_stack(*info->stack_end_ptr, page_buf, buff_alloced,
keyinfo->block_length);
if (!page_buf)
{
my_errno= HA_ERR_OUT_OF_MEM;
goto err;
}
for (i= 0; i < ReinsertList.n_pages; ++i)
{
uchar *k, *last;
if (_ma_fetch_keypage(&page, info, keyinfo, ReinsertList.pages[i].offs,
PAGECACHE_LOCK_WRITE,
DFLT_INIT_HITS, page_buf, 0))
goto err;
nod_flag= page.node;
DBUG_PRINT("rtree", ("reinserting keys from "
"page: %lu level: %d nod_flag: %u",
(ulong) ReinsertList.pages[i].offs,
ReinsertList.pages[i].level, nod_flag));
k= rt_PAGE_FIRST_KEY(share, page.buff, nod_flag);
last= rt_PAGE_END(&page);
for (; k < last; k= rt_PAGE_NEXT_KEY(share, k, key_data_length,
nod_flag))
{
int res;
tmp_key.data= k;
if ((res= maria_rtree_insert_level(info, &tmp_key,
ReinsertList.pages[i].level,
root)) == -1)
goto err;
if (res)
{
uint j;
DBUG_PRINT("rtree", ("root has been split, adjust levels"));
for (j= i; j < ReinsertList.n_pages; j++)
{
ReinsertList.pages[j].level++;
DBUG_PRINT("rtree", ("keys from page: %lu now level: %d",
(ulong) ReinsertList.pages[i].offs,
ReinsertList.pages[i].level));
}
}
}
page_mark_changed(info, &page);
if (_ma_dispose(info, page.pos, 0))
goto err;
}
}
/* check for redundant root (not leaf, 1 child) and eliminate */
if ((old_root= *root) == HA_OFFSET_ERROR)
goto err;
if (_ma_fetch_keypage(&page, info, keyinfo, old_root,
PAGECACHE_LOCK_WRITE,
DFLT_INIT_HITS, info->buff, 0))
goto err;
nod_flag= page.node;
if (nod_flag && (page.size == share->keypage_header + key_data_length +
nod_flag))
{
*root= _ma_kpos(nod_flag,
rt_PAGE_FIRST_KEY(share, info->buff, nod_flag));
page_mark_changed(info, &page);
if (_ma_dispose(info, page.pos, 0))
goto err;
}
info->update= HA_STATE_DELETED;
break;
}
case 1: /* not found */
{
my_errno= HA_ERR_KEY_NOT_FOUND;
goto err;
}
case -1: /* error */
default:
goto err; /* purecov: inspected */
}
my_free(ReinsertList.pages);
stack_alloc_free(page_buf, buff_alloced);
DBUG_RETURN(0);
err:
my_free(ReinsertList.pages);
stack_alloc_free(page_buf, buff_alloced);
DBUG_RETURN(1);
} | O3 | c | maria_rtree_real_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, -0x48(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq 0x8(%rsi), %r12
movq %rax, -0x70(%rbp)
movq 0x118(%rax), %rax
movzbl 0xa5(%r12), %ecx
movq (%rax,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0x861b2
movq %rsi, %r15
movq %rdi, %rbx
movl 0x10(%rsi), %r14d
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %r8
movaps %xmm0, (%r8)
leaq -0xa4(%rbp), %rcx
xorl %r9d, %r9d
callq 0x86526
testl %eax, %eax
je 0x861d6
cmpl $0x1, %eax
je 0x861c2
cmpl $0x2, %eax
jne 0x861cd
movq -0x48(%rbp), %rax
movq $-0x1, (%rax)
movq -0x58(%rbp), %rdi
callq 0xbf54e
xorl %eax, %eax
jmp 0x8646d
callq 0xc14ee
movl $0x89, (%rax)
jmp 0x8646b
callq 0xc14ee
movl $0x78, (%rax)
movq -0x58(%rbp), %rdi
jmp 0x86466
movq 0x8(%r15), %rax
movq %rax, -0xf8(%rbp)
movq 0x10(%r15), %rax
movq %rax, -0xf0(%rbp)
movl $0x0, -0xe8(%rbp)
movl -0x60(%rbp), %eax
movq %rax, -0x68(%rbp)
testq %rax, %rax
je 0x863e8
movzwl 0xa6(%r12), %esi
leaq -0x108(%rbp), %rcx
movq %rsi, (%rcx)
movq 0x78(%rbx), %rax
movq (%rax), %rax
subq %rcx, %rax
subq %rsi, %rax
jbe 0x8625c
cmpq $0x10000, %rax # imm = 0x10000
ja 0x86240
cmpl $0x1000, %esi # imm = 0x1000
jb 0x8625c
cmpq $0x8001, %rax # imm = 0x8001
jb 0x8625c
movq %rsp, %rcx
addl $0xf, %esi
andl $-0x10, %esi
subq %rsi, %rcx
movq %rcx, -0x40(%rbp)
movq %rcx, %rsp
movl $0x0, -0x34(%rbp)
jmp 0x8627a
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
callq 0xbf321
movq %rax, -0x40(%rbp)
testq %rax, %rax
je 0x86446
movb $0x1, %al
movl %eax, -0x34(%rbp)
movq -0x58(%rbp), %rax
xorl %r13d, %r13d
movq -0x68(%rbp), %rcx
movq %rcx, -0x88(%rbp)
movq %rax, -0x78(%rbp)
movq %rax, -0x80(%rbp)
movq %r14, -0x98(%rbp)
movq %r12, -0xa0(%rbp)
movq %r13, %r15
shlq $0x4, %r15
movq -0x78(%rbp), %rax
movq 0x8(%rax,%r15), %rcx
leaq -0xe0(%rbp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x4, %r8d
movl $0x3, %r9d
pushq $0x0
pushq -0x40(%rbp)
callq 0x5fbfe
addq $0x10, %rsp
testb %al, %al
jne 0x86432
movq %r13, -0x90(%rbp)
movq %rbx, %r14
movl -0xb8(%rbp), %r12d
movq -0xd0(%rbp), %rax
movq -0x70(%rbp), %rcx
movl 0x744(%rcx), %r13d
addq %rax, %r13
addq %r12, %r13
movl -0xc0(%rbp), %ebx
addq %rax, %rbx
cmpq %rbx, %r13
jae 0x8638a
addq -0x78(%rbp), %r15
movq %r13, -0x100(%rbp)
movl (%r15), %edx
movq %r14, %rdi
leaq -0x100(%rbp), %rsi
movq -0x48(%rbp), %rcx
callq 0x856c2
testl %eax, %eax
je 0x86369
cmpl $-0x1, %eax
je 0x86432
movq -0x90(%rbp), %rax
cmpq -0x68(%rbp), %rax
jae 0x86369
movq -0x88(%rbp), %rax
movq -0x80(%rbp), %rcx
incl (%rcx)
addq $0x10, %rcx
decq %rax
jne 0x8635e
movq %r12, %rax
testl %r12d, %r12d
jne 0x8637b
movq -0x70(%rbp), %rax
movl 0x3e0(%rax), %eax
addq -0x98(%rbp), %r13
addq %rax, %r13
cmpq %rbx, %r13
jb 0x8631c
movq %r14, %rbx
movq 0x2e8(%r14), %rax
movl -0xb0(%rbp), %ecx
leaq (%rcx,%rcx,2), %rcx
movb $0x1, 0x10(%rax,%rcx,8)
movq -0xc8(%rbp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x5fe05
testl %eax, %eax
jne 0x86432
movq -0x90(%rbp), %r13
incq %r13
addq $0x10, -0x80(%rbp)
decq -0x88(%rbp)
cmpq -0x68(%rbp), %r13
movq -0x98(%rbp), %r14
movq -0xa0(%rbp), %r12
jne 0x862a2
jmp 0x863f7
movq $0x0, -0x40(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rcx
cmpq $-0x1, %rcx
je 0x86432
leaq -0xe0(%rbp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x4, %r8d
movl $0x3, %r9d
pushq $0x0
pushq 0x378(%rbx)
callq 0x5fbfe
addq $0x10, %rsp
testb %al, %al
je 0x8648f
movl -0x34(%rbp), %r15d
movq -0x58(%rbp), %rdi
callq 0xbf54e
testb %r15b, %r15b
jne 0x86462
jmp 0x8646b
callq 0xc14ee
movl $0x80, (%rax)
movq -0x58(%rbp), %rdi
callq 0xbf54e
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xbf54e
movb $0x1, %al
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x86521
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl -0xb8(%rbp), %edi
testq %rdi, %rdi
movl -0x34(%rbp), %r15d
je 0x864fc
movq -0x70(%rbp), %rax
movl 0x744(%rax), %esi
addl %edi, %r14d
addl %esi, %r14d
cmpl %r14d, -0xc0(%rbp)
jne 0x864fc
addq 0x378(%rbx), %rsi
addq %rdi, %rsi
callq 0x5dc0f
movq -0x48(%rbp), %rcx
movq %rax, (%rcx)
movq 0x2e8(%rbx), %rax
movl -0xb0(%rbp), %ecx
leaq (%rcx,%rcx,2), %rcx
movb $0x1, 0x10(%rax,%rcx,8)
movq -0xc8(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x5fe05
testl %eax, %eax
jne 0x86436
movl $0x8, 0x624(%rbx)
movq -0x58(%rbp), %rdi
callq 0xbf54e
testb %r15b, %r15b
je 0x861ab
movq -0x40(%rbp), %rdi
jmp 0x861a6
callq 0x2a280
| maria_rtree_real_delete:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov [rbp+var_48], rdx
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov r12, [rsi+8]
mov [rbp+var_70], rax
mov rax, [rax+118h]
movzx ecx, byte ptr [r12+0A5h]
mov rdx, [rax+rcx*8]
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz short loc_861B2
mov r15, rsi
mov rbx, rdi
mov r14d, [rsi+10h]
xorps xmm0, xmm0
lea r8, [rbp+var_60]
movaps xmmword ptr [r8], xmm0
lea rcx, [rbp+var_A4]
xor r9d, r9d
call maria_rtree_delete_req
test eax, eax
jz short loc_861D6
cmp eax, 1
jz short loc_861C2
cmp eax, 2
jnz short loc_861CD
mov rax, [rbp+var_48]
mov qword ptr [rax], 0FFFFFFFFFFFFFFFFh
mov rdi, [rbp+var_58]
loc_861A6:
call my_free
loc_861AB:
xor eax, eax
jmp loc_8646D
loc_861B2:
call _my_thread_var
mov dword ptr [rax], 89h
jmp loc_8646B
loc_861C2:
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
loc_861CD:
mov rdi, [rbp+var_58]
jmp loc_86466
loc_861D6:
mov rax, [r15+8]
mov [rbp+var_F8], rax
mov rax, [r15+10h]
mov [rbp+var_F0], rax
mov [rbp+var_E8], 0
mov eax, [rbp+var_60]
mov [rbp+var_68], rax
test rax, rax
jz loc_863E8
movzx esi, word ptr [r12+0A6h]
lea rcx, [rbp+var_108]
mov [rcx], rsi
mov rax, [rbx+78h]
mov rax, [rax]
sub rax, rcx
sub rax, rsi
jbe short loc_8625C
cmp rax, 10000h
ja short loc_86240
cmp esi, 1000h
jb short loc_8625C
cmp rax, 8001h
jb short loc_8625C
loc_86240:
mov rcx, rsp
add esi, 0Fh
and esi, 0FFFFFFF0h
sub rcx, rsi
mov [rbp+var_40], rcx
mov rsp, rcx
mov [rbp+var_34], 0
jmp short loc_8627A
loc_8625C:
mov edx, 10010h
xor edi, edi
call my_malloc
mov [rbp+var_40], rax
test rax, rax
jz loc_86446
mov al, 1
mov [rbp+var_34], eax
loc_8627A:
mov rax, [rbp+var_58]
xor r13d, r13d
mov rcx, [rbp+var_68]
mov [rbp+var_88], rcx
mov [rbp+var_78], rax
mov [rbp+var_80], rax
mov [rbp+var_98], r14
mov [rbp+var_A0], r12
loc_862A2:
mov r15, r13
shl r15, 4
mov rax, [rbp+var_78]
mov rcx, [rax+r15+8]
lea rdi, [rbp+var_E0]
mov rsi, rbx
mov rdx, r12
mov r8d, 4
mov r9d, 3
push 0
push [rbp+var_40]
call _ma_fetch_keypage
add rsp, 10h
test al, al
jnz loc_86432
mov [rbp+var_90], r13
mov r14, rbx
mov r12d, [rbp+var_B8]
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_70]
mov r13d, [rcx+744h]
add r13, rax
add r13, r12
mov ebx, [rbp+var_C0]
add rbx, rax
cmp r13, rbx
jnb short loc_8638A
add r15, [rbp+var_78]
loc_8631C:
mov [rbp+var_100], r13
mov edx, [r15]
mov rdi, r14
lea rsi, [rbp+var_100]
mov rcx, [rbp+var_48]
call maria_rtree_insert_level
test eax, eax
jz short loc_86369
cmp eax, 0FFFFFFFFh
jz loc_86432
mov rax, [rbp+var_90]
cmp rax, [rbp+var_68]
jnb short loc_86369
mov rax, [rbp+var_88]
mov rcx, [rbp+var_80]
loc_8635E:
inc dword ptr [rcx]
add rcx, 10h
dec rax
jnz short loc_8635E
loc_86369:
mov rax, r12
test r12d, r12d
jnz short loc_8637B
mov rax, [rbp+var_70]
mov eax, [rax+3E0h]
loc_8637B:
add r13, [rbp+var_98]
add r13, rax
cmp r13, rbx
jb short loc_8631C
loc_8638A:
mov rbx, r14
mov rax, [r14+2E8h]
mov ecx, [rbp+var_B0]
lea rcx, [rcx+rcx*2]
mov byte ptr [rax+rcx*8+10h], 1
mov rsi, [rbp+var_C8]
mov rdi, r14
xor edx, edx
call _ma_dispose
test eax, eax
jnz short loc_86432
mov r13, [rbp+var_90]
inc r13
add [rbp+var_80], 10h
dec [rbp+var_88]
cmp r13, [rbp+var_68]
mov r14, [rbp+var_98]
mov r12, [rbp+var_A0]
jnz loc_862A2
jmp short loc_863F7
loc_863E8:
mov [rbp+var_40], 0
mov [rbp+var_34], 0
loc_863F7:
mov rax, [rbp+var_48]
mov rcx, [rax]
cmp rcx, 0FFFFFFFFFFFFFFFFh
jz short loc_86432
lea rdi, [rbp+var_E0]
mov rsi, rbx
mov rdx, r12
mov r8d, 4
mov r9d, 3
push 0
push qword ptr [rbx+378h]
call _ma_fetch_keypage
add rsp, 10h
test al, al
jz short loc_8648F
loc_86432:
mov r15d, [rbp+var_34]
loc_86436:
mov rdi, [rbp+var_58]
call my_free
test r15b, r15b
jnz short loc_86462
jmp short loc_8646B
loc_86446:
call _my_thread_var
mov dword ptr [rax], 80h
mov rdi, [rbp+var_58]
call my_free
mov [rbp+var_40], 0
loc_86462:
mov rdi, [rbp+var_40]
loc_86466:
call my_free
loc_8646B:
mov al, 1
loc_8646D:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz loc_86521
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8648F:
mov edi, [rbp+var_B8]
test rdi, rdi
mov r15d, [rbp+var_34]
jz short loc_864FC
mov rax, [rbp+var_70]
mov esi, [rax+744h]
add r14d, edi
add r14d, esi
cmp [rbp+var_C0], r14d
jnz short loc_864FC
add rsi, [rbx+378h]
add rsi, rdi
call _ma_kpos
mov rcx, [rbp+var_48]
mov [rcx], rax
mov rax, [rbx+2E8h]
mov ecx, [rbp+var_B0]
lea rcx, [rcx+rcx*2]
mov byte ptr [rax+rcx*8+10h], 1
mov rsi, [rbp+var_C8]
mov rdi, rbx
xor edx, edx
call _ma_dispose
test eax, eax
jnz loc_86436
loc_864FC:
mov dword ptr [rbx+624h], 8
mov rdi, [rbp+var_58]
call my_free
test r15b, r15b
jz loc_861AB
mov rdi, [rbp+var_40]
jmp loc_861A6
loc_86521:
call ___stack_chk_fail
| char maria_rtree_real_delete(long long a1, long long a2, long long *a3)
{
long long v3; // r12
long long v4; // rdx
long long v5; // rbx
long long v6; // r14
int v7; // eax
long long v8; // rdi
long long v10; // rdi
unsigned long long v11; // rsi
unsigned long long v12; // rax
bool v13; // cc
unsigned long long v14; // rax
long long v15; // rax
unsigned long long v16; // r13
long long v17; // r15
long long *v18; // r14
long long v19; // r12
unsigned long long v20; // r13
unsigned long long v21; // rbx
unsigned int *v22; // r15
int inserted; // eax
unsigned long long v24; // rax
_DWORD *v25; // rcx
long long v26; // rax
char v27; // r15
long long v28; // rsi
long long v29; // rax
long long v30; // [rsp+0h] [rbp-110h] BYREF
unsigned long long v31; // [rsp+8h] [rbp-108h] BYREF
_QWORD v32[3]; // [rsp+10h] [rbp-100h] BYREF
int v33; // [rsp+28h] [rbp-E8h]
_BYTE v34[16]; // [rsp+30h] [rbp-E0h] BYREF
long long v35; // [rsp+40h] [rbp-D0h]
unsigned long long v36; // [rsp+48h] [rbp-C8h]
unsigned int v37; // [rsp+50h] [rbp-C0h]
unsigned int v38; // [rsp+58h] [rbp-B8h]
unsigned int v39; // [rsp+60h] [rbp-B0h]
_BYTE v40[4]; // [rsp+6Ch] [rbp-A4h] BYREF
long long v41; // [rsp+70h] [rbp-A0h]
long long v42; // [rsp+78h] [rbp-98h]
unsigned long long v43; // [rsp+80h] [rbp-90h]
unsigned long long v44; // [rsp+88h] [rbp-88h]
_DWORD *v45; // [rsp+90h] [rbp-80h]
long long v46; // [rsp+98h] [rbp-78h]
long long v47; // [rsp+A0h] [rbp-70h]
unsigned long long v48; // [rsp+A8h] [rbp-68h]
__int128 v49; // [rsp+B0h] [rbp-60h] BYREF
long long *v50; // [rsp+C8h] [rbp-48h]
long long v51; // [rsp+D0h] [rbp-40h]
int v52; // [rsp+DCh] [rbp-34h]
unsigned long long v53; // [rsp+E0h] [rbp-30h]
v50 = a3;
v53 = __readfsqword(0x28u);
v3 = *(_QWORD *)(a2 + 8);
v47 = *(_QWORD *)a1;
v4 = *(_QWORD *)(*(_QWORD *)(v47 + 280) + 8LL * *(unsigned __int8 *)(v3 + 165));
if ( v4 != -1 )
{
v5 = a1;
v6 = *(unsigned int *)(a2 + 16);
v49 = 0LL;
v7 = maria_rtree_delete_req(a1, a2, v4, v40, &v49, 0LL);
if ( v7 )
{
if ( v7 == 1 )
{
*(_DWORD *)my_thread_var(a1) = 120;
}
else if ( v7 == 2 )
{
*v50 = -1LL;
v8 = *((_QWORD *)&v49 + 1);
goto LABEL_6;
}
v10 = *((_QWORD *)&v49 + 1);
goto LABEL_42;
}
v32[1] = *(_QWORD *)(a2 + 8);
v32[2] = *(_QWORD *)(a2 + 16);
v33 = 0;
v48 = (unsigned int)v49;
if ( (_DWORD)v49 )
{
v11 = *(unsigned __int16 *)(v3 + 166);
v31 = v11;
v12 = **(_QWORD **)(a1 + 120) - (_QWORD)&v31;
v13 = v12 <= v11;
v14 = v12 - v11;
if ( v13 || v14 <= 0x10000 && ((unsigned int)v11 < 0x1000 || v14 < 0x8001) )
{
v15 = my_malloc(0LL, v11, 65552LL);
v51 = v15;
if ( !v15 )
{
*(_DWORD *)my_thread_var(0LL) = 128;
my_free(*((_QWORD *)&v49 + 1));
v51 = 0LL;
LABEL_41:
v10 = v51;
LABEL_42:
my_free(v10);
return 1;
}
LOBYTE(v15) = 1;
v52 = v15;
}
else
{
v51 = (long long)&v30 - (((_DWORD)v11 + 15) & 0xFFFFFFF0);
v52 = 0;
}
v16 = 0LL;
v44 = v48;
v46 = *((_QWORD *)&v49 + 1);
v45 = (_DWORD *)*((_QWORD *)&v49 + 1);
v42 = v6;
v41 = v3;
while ( 1 )
{
v17 = 16 * v16;
if ( ma_fetch_keypage((long long)v34, v5, v3, *(_QWORD *)(v46 + 16 * v16 + 8), 4u, 3, v51) )
break;
v43 = v16;
v18 = (long long *)v5;
v19 = v38;
v20 = v38 + v35 + *(unsigned int *)(v47 + 1860);
v21 = v35 + v37;
if ( v20 < v21 )
{
v22 = (unsigned int *)(v46 + v17);
do
{
v32[0] = v20;
inserted = maria_rtree_insert_level(v18, (long long)v32, *v22, v50);
if ( inserted )
{
if ( inserted == -1 )
goto LABEL_37;
if ( v43 < v48 )
{
v24 = v44;
v25 = v45;
do
{
++*v25;
v25 += 4;
--v24;
}
while ( v24 );
}
}
v26 = v19;
if ( !(_DWORD)v19 )
v26 = *(unsigned int *)(v47 + 992);
v20 += v26 + v42;
}
while ( v20 < v21 );
}
v5 = (long long)v18;
*(_BYTE *)(v18[93] + 24LL * v39 + 16) = 1;
if ( (unsigned int)ma_dispose(v18, v36, 0) )
break;
v16 = v43 + 1;
v45 += 4;
--v44;
LODWORD(v6) = v42;
v3 = v41;
if ( v43 + 1 == v48 )
goto LABEL_35;
}
}
else
{
v51 = 0LL;
v52 = 0;
LABEL_35:
if ( *v50 != -1 && !ma_fetch_keypage((long long)v34, v5, v3, *v50, 4u, 3, *(_QWORD *)(v5 + 888)) )
{
v27 = v52;
if ( !v38
|| (v28 = *(unsigned int *)(v47 + 1860), v37 != (_DWORD)v28 + v38 + (_DWORD)v6)
|| (v29 = ma_kpos(v38, v38 + *(_QWORD *)(v5 + 888) + v28),
*v50 = v29,
*(_BYTE *)(*(_QWORD *)(v5 + 744) + 24LL * v39 + 16) = 1,
!(unsigned int)ma_dispose((_QWORD *)v5, v36, 0)) )
{
*(_DWORD *)(v5 + 1572) = 8;
my_free(*((_QWORD *)&v49 + 1));
if ( !v27 )
return 0;
v8 = v51;
LABEL_6:
my_free(v8);
return 0;
}
LABEL_38:
my_free(*((_QWORD *)&v49 + 1));
if ( !v27 )
return 1;
goto LABEL_41;
}
}
LABEL_37:
v27 = v52;
goto LABEL_38;
}
*(_DWORD *)my_thread_var(a1) = 137;
return 1;
}
| maria_rtree_real_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RBP + -0x48],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV R12,qword ptr [RSI + 0x8]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RAX + 0x118]
MOVZX ECX,byte ptr [R12 + 0xa5]
MOV RDX,qword ptr [RAX + RCX*0x8]
CMP RDX,-0x1
JZ 0x001861b2
MOV R15,RSI
MOV RBX,RDI
MOV R14D,dword ptr [RSI + 0x10]
XORPS XMM0,XMM0
LEA R8,[RBP + -0x60]
MOVAPS xmmword ptr [R8],XMM0
LEA RCX,[RBP + -0xa4]
XOR R9D,R9D
CALL 0x00186526
TEST EAX,EAX
JZ 0x001861d6
CMP EAX,0x1
JZ 0x001861c2
CMP EAX,0x2
JNZ 0x001861cd
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX],-0x1
MOV RDI,qword ptr [RBP + -0x58]
LAB_001861a6:
CALL 0x001bf54e
LAB_001861ab:
XOR EAX,EAX
JMP 0x0018646d
LAB_001861b2:
CALL 0x001c14ee
MOV dword ptr [RAX],0x89
JMP 0x0018646b
LAB_001861c2:
CALL 0x001c14ee
MOV dword ptr [RAX],0x78
LAB_001861cd:
MOV RDI,qword ptr [RBP + -0x58]
JMP 0x00186466
LAB_001861d6:
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RBP + -0xf8],RAX
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RBP + -0xf0],RAX
MOV dword ptr [RBP + -0xe8],0x0
MOV EAX,dword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x68],RAX
TEST RAX,RAX
JZ 0x001863e8
MOVZX ESI,word ptr [R12 + 0xa6]
LEA RCX,[RBP + -0x108]
MOV qword ptr [RCX],RSI
MOV RAX,qword ptr [RBX + 0x78]
MOV RAX,qword ptr [RAX]
SUB RAX,RCX
SUB RAX,RSI
JBE 0x0018625c
CMP RAX,0x10000
JA 0x00186240
CMP ESI,0x1000
JC 0x0018625c
CMP RAX,0x8001
JC 0x0018625c
LAB_00186240:
MOV RCX,RSP
ADD ESI,0xf
AND ESI,0xfffffff0
SUB RCX,RSI
MOV qword ptr [RBP + -0x40],RCX
MOV RSP,RCX
MOV dword ptr [RBP + -0x34],0x0
JMP 0x0018627a
LAB_0018625c:
MOV EDX,0x10010
XOR EDI,EDI
CALL 0x001bf321
MOV qword ptr [RBP + -0x40],RAX
TEST RAX,RAX
JZ 0x00186446
MOV AL,0x1
MOV dword ptr [RBP + -0x34],EAX
LAB_0018627a:
MOV RAX,qword ptr [RBP + -0x58]
XOR R13D,R13D
MOV RCX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x88],RCX
MOV qword ptr [RBP + -0x78],RAX
MOV qword ptr [RBP + -0x80],RAX
MOV qword ptr [RBP + -0x98],R14
MOV qword ptr [RBP + -0xa0],R12
LAB_001862a2:
MOV R15,R13
SHL R15,0x4
MOV RAX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RAX + R15*0x1 + 0x8]
LEA RDI,[RBP + -0xe0]
MOV RSI,RBX
MOV RDX,R12
MOV R8D,0x4
MOV R9D,0x3
PUSH 0x0
PUSH qword ptr [RBP + -0x40]
CALL 0x0015fbfe
ADD RSP,0x10
TEST AL,AL
JNZ 0x00186432
MOV qword ptr [RBP + -0x90],R13
MOV R14,RBX
MOV R12D,dword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x70]
MOV R13D,dword ptr [RCX + 0x744]
ADD R13,RAX
ADD R13,R12
MOV EBX,dword ptr [RBP + -0xc0]
ADD RBX,RAX
CMP R13,RBX
JNC 0x0018638a
ADD R15,qword ptr [RBP + -0x78]
LAB_0018631c:
MOV qword ptr [RBP + -0x100],R13
MOV EDX,dword ptr [R15]
MOV RDI,R14
LEA RSI,[RBP + -0x100]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x001856c2
TEST EAX,EAX
JZ 0x00186369
CMP EAX,-0x1
JZ 0x00186432
MOV RAX,qword ptr [RBP + -0x90]
CMP RAX,qword ptr [RBP + -0x68]
JNC 0x00186369
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x80]
LAB_0018635e:
INC dword ptr [RCX]
ADD RCX,0x10
DEC RAX
JNZ 0x0018635e
LAB_00186369:
MOV RAX,R12
TEST R12D,R12D
JNZ 0x0018637b
MOV RAX,qword ptr [RBP + -0x70]
MOV EAX,dword ptr [RAX + 0x3e0]
LAB_0018637b:
ADD R13,qword ptr [RBP + -0x98]
ADD R13,RAX
CMP R13,RBX
JC 0x0018631c
LAB_0018638a:
MOV RBX,R14
MOV RAX,qword ptr [R14 + 0x2e8]
MOV ECX,dword ptr [RBP + -0xb0]
LEA RCX,[RCX + RCX*0x2]
MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1
MOV RSI,qword ptr [RBP + -0xc8]
MOV RDI,R14
XOR EDX,EDX
CALL 0x0015fe05
TEST EAX,EAX
JNZ 0x00186432
MOV R13,qword ptr [RBP + -0x90]
INC R13
ADD qword ptr [RBP + -0x80],0x10
DEC qword ptr [RBP + -0x88]
CMP R13,qword ptr [RBP + -0x68]
MOV R14,qword ptr [RBP + -0x98]
MOV R12,qword ptr [RBP + -0xa0]
JNZ 0x001862a2
JMP 0x001863f7
LAB_001863e8:
MOV qword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x34],0x0
LAB_001863f7:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RAX]
CMP RCX,-0x1
JZ 0x00186432
LEA RDI,[RBP + -0xe0]
MOV RSI,RBX
MOV RDX,R12
MOV R8D,0x4
MOV R9D,0x3
PUSH 0x0
PUSH qword ptr [RBX + 0x378]
CALL 0x0015fbfe
ADD RSP,0x10
TEST AL,AL
JZ 0x0018648f
LAB_00186432:
MOV R15D,dword ptr [RBP + -0x34]
LAB_00186436:
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x001bf54e
TEST R15B,R15B
JNZ 0x00186462
JMP 0x0018646b
LAB_00186446:
CALL 0x001c14ee
MOV dword ptr [RAX],0x80
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x001bf54e
MOV qword ptr [RBP + -0x40],0x0
LAB_00186462:
MOV RDI,qword ptr [RBP + -0x40]
LAB_00186466:
CALL 0x001bf54e
LAB_0018646b:
MOV AL,0x1
LAB_0018646d:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00186521
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018648f:
MOV EDI,dword ptr [RBP + -0xb8]
TEST RDI,RDI
MOV R15D,dword ptr [RBP + -0x34]
JZ 0x001864fc
MOV RAX,qword ptr [RBP + -0x70]
MOV ESI,dword ptr [RAX + 0x744]
ADD R14D,EDI
ADD R14D,ESI
CMP dword ptr [RBP + -0xc0],R14D
JNZ 0x001864fc
ADD RSI,qword ptr [RBX + 0x378]
ADD RSI,RDI
CALL 0x0015dc0f
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RCX],RAX
MOV RAX,qword ptr [RBX + 0x2e8]
MOV ECX,dword ptr [RBP + -0xb0]
LEA RCX,[RCX + RCX*0x2]
MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1
MOV RSI,qword ptr [RBP + -0xc8]
MOV RDI,RBX
XOR EDX,EDX
CALL 0x0015fe05
TEST EAX,EAX
JNZ 0x00186436
LAB_001864fc:
MOV dword ptr [RBX + 0x624],0x8
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x001bf54e
TEST R15B,R15B
JZ 0x001861ab
MOV RDI,qword ptr [RBP + -0x40]
JMP 0x001861a6
LAB_00186521:
CALL 0x0012a280
|
int8 maria_rtree_real_delete(long *param_1,long param_2,long *param_3)
{
ushort uVar1;
uint uVar2;
long lVar3;
long *plVar4;
char cVar5;
int iVar6;
int4 *puVar7;
ulong uVar8;
int8 uVar9;
long lVar10;
int *piVar11;
ulong uVar12;
int *piVar13;
int *piVar14;
ulong uVar15;
ulong uVar16;
uint uVar17;
long in_FS_OFFSET;
int aiStack_118 [2];
ulong local_110;
ulong local_108;
int8 local_100;
int8 local_f8;
int4 local_f0;
int1 local_e8 [16];
long local_d8;
int8 local_d0;
uint local_c8;
uint local_c0;
uint local_b8;
long local_a8;
ulong local_a0;
ulong local_98;
ulong local_90;
int *local_88;
int *local_80;
long local_78;
ulong local_70;
ulong local_68;
int *piStack_60;
long *local_50;
int *local_48;
int4 local_3c;
long local_38;
piVar14 = aiStack_118;
piVar13 = aiStack_118;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_78 = *param_1;
lVar10 = *(long *)(param_2 + 8);
local_50 = param_3;
if (*(long *)(*(long *)(local_78 + 0x118) + (ulong)*(byte *)(lVar10 + 0xa5) * 8) == -1) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x89;
piVar13 = aiStack_118;
}
else {
uVar17 = *(uint *)(param_2 + 0x10);
local_68 = 0;
piStack_60 = (int *)0x0;
iVar6 = maria_rtree_delete_req();
if (iVar6 == 0) {
local_100 = *(int8 *)(param_2 + 8);
local_f8 = *(int8 *)(param_2 + 0x10);
local_f0 = 0;
local_70 = local_68 & 0xffffffff;
if (local_70 == 0) {
local_48 = (int *)0x0;
local_3c = 0;
}
else {
uVar1 = *(ushort *)(lVar10 + 0xa6);
local_110 = (ulong)uVar1;
uVar8 = (*(long *)param_1[0xf] - (long)&local_110) - local_110;
if ((local_110 < (ulong)(*(long *)param_1[0xf] - (long)&local_110)) &&
((0x10000 < uVar8 || ((0xfff < uVar1 && (0x8000 < uVar8)))))) {
local_48 = (int *)((long)aiStack_118 - (ulong)(uVar1 + 0xf & 0xfffffff0));
local_3c = 0;
piVar13 = local_48;
}
else {
local_48 = (int *)my_malloc(0,local_110,0x10010);
if (local_48 == (int *)0x0) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x80;
my_free(piStack_60);
local_48 = (int *)0x0;
piVar14 = aiStack_118;
piVar11 = local_48;
goto LAB_00186466;
}
local_3c = (int4)CONCAT71((int7)((ulong)local_48 >> 8),1);
piVar13 = aiStack_118;
}
uVar8 = 0;
local_90 = local_70;
local_80 = piStack_60;
local_88 = piStack_60;
local_a8 = lVar10;
local_a0 = (ulong)uVar17;
do {
lVar10 = local_a8;
uVar9 = *(int8 *)(local_80 + uVar8 * 4 + 2);
piVar13[-2] = 0;
piVar13[-1] = 0;
*(int **)(piVar13 + -4) = local_48;
piVar13[-6] = 0x1862d5;
piVar13[-5] = 0;
cVar5 = _ma_fetch_keypage(local_e8,param_1,lVar10,uVar9,4,3);
uVar17 = local_c0;
if (cVar5 != '\0') goto LAB_00186432;
uVar15 = (ulong)local_c0;
uVar16 = (ulong)*(uint *)(local_78 + 0x744) + local_d8 + uVar15;
uVar12 = (ulong)local_c8 + local_d8;
local_98 = uVar8;
if (uVar16 < uVar12) {
piVar14 = local_80 + uVar8 * 4;
do {
plVar4 = local_50;
iVar6 = *piVar14;
local_108 = uVar16;
piVar13[-2] = 0x186339;
piVar13[-1] = 0;
iVar6 = maria_rtree_insert_level(param_1,&local_108,iVar6,plVar4);
if (iVar6 != 0) {
if (iVar6 == -1) goto LAB_00186432;
uVar8 = local_90;
piVar11 = local_88;
if (local_98 < local_70) {
do {
*piVar11 = *piVar11 + 1;
uVar8 = uVar8 - 1;
piVar11 = piVar11 + 4;
} while (uVar8 != 0);
}
}
uVar8 = uVar15;
if (uVar17 == 0) {
uVar8 = (ulong)*(uint *)(local_78 + 0x3e0);
}
uVar16 = uVar16 + local_a0 + uVar8;
} while (uVar16 < uVar12);
}
uVar9 = local_d0;
*(int1 *)(param_1[0x5d] + 0x10 + (ulong)local_b8 * 0x18) = 1;
piVar13[-2] = 0x1863b4;
piVar13[-1] = 0;
iVar6 = _ma_dispose(param_1,uVar9,0);
if (iVar6 != 0) goto LAB_00186432;
uVar8 = local_98 + 1;
local_88 = local_88 + 4;
local_90 = local_90 - 1;
uVar17 = (uint)local_a0;
lVar10 = local_a8;
} while (uVar8 != local_70);
}
lVar3 = *local_50;
if (lVar3 == -1) {
LAB_00186432:
cVar5 = (char)local_3c;
}
else {
*(int8 *)((long)piVar13 + -8) = 0;
*(long *)((long)piVar13 + -0x10) = param_1[0x6f];
*(int8 *)((long)piVar13 + -0x18) = 0x18642a;
cVar5 = _ma_fetch_keypage(local_e8,param_1,lVar10,lVar3,4,3);
if (cVar5 != '\0') goto LAB_00186432;
uVar8 = (ulong)local_c0;
cVar5 = (char)local_3c;
if ((uVar8 == 0) ||
(uVar2 = *(uint *)(local_78 + 0x744), local_c8 != uVar17 + local_c0 + uVar2)) {
LAB_001864fc:
piVar14 = piStack_60;
*(int4 *)((long)param_1 + 0x624) = 8;
*(int8 *)((long)piVar13 + -8) = 0x18650f;
my_free(piVar14);
piVar14 = local_48;
if (cVar5 != '\0') goto LAB_001861a6;
goto LAB_001861ab;
}
lVar10 = param_1[0x6f];
*(int8 *)((long)piVar13 + -8) = 0x1864c6;
lVar10 = _ma_kpos(uVar8,(ulong)uVar2 + lVar10 + uVar8);
*local_50 = lVar10;
*(int1 *)(param_1[0x5d] + 0x10 + (ulong)local_b8 * 0x18) = 1;
*(int8 *)((long)piVar13 + -8) = 0x1864f4;
iVar6 = _ma_dispose(param_1,local_d0,0);
if (iVar6 == 0) goto LAB_001864fc;
}
piVar14 = piStack_60;
*(int8 *)((long)piVar13 + -8) = 0x18643f;
my_free(piVar14);
piVar14 = piVar13;
piVar11 = local_48;
if (cVar5 == '\0') goto LAB_0018646b;
}
else if (iVar6 == 1) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x78;
piVar11 = piStack_60;
}
else {
piVar14 = aiStack_118;
piVar11 = piStack_60;
if (iVar6 == 2) {
*local_50 = -1;
piVar13 = aiStack_118;
piVar14 = piStack_60;
LAB_001861a6:
*(int8 *)((long)piVar13 + -8) = 0x1861ab;
my_free(piVar14);
LAB_001861ab:
uVar9 = 0;
goto LAB_0018646d;
}
}
LAB_00186466:
*(int8 *)((long)piVar14 + -8) = 0x18646b;
my_free(piVar11);
piVar13 = piVar14;
}
LAB_0018646b:
uVar9 = 1;
LAB_0018646d:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)((long)piVar13 + -8) = maria_rtree_delete_req;
__stack_chk_fail();
}
return uVar9;
}
|
|
1,014 | ma_apply_redo_insert_row_head_or_tail | eloqsql/storage/maria/ma_blockrec.c | uint _ma_apply_redo_insert_row_head_or_tail(MARIA_HA *info, LSN lsn,
uint page_type,
my_bool new_page,
const uchar *header,
const uchar *data,
size_t data_length)
{
MARIA_SHARE *share= info->s;
pgcache_page_no_t page;
uint rownr, empty_space;
uint block_size= share->block_size;
uint rec_offset;
uchar *buff, *dir;
uint result;
MARIA_PINNED_PAGE page_link;
enum pagecache_page_lock lock_method;
enum pagecache_page_pin pin_method;
my_off_t end_of_page;
uint error;
DBUG_ENTER("_ma_apply_redo_insert_row_head_or_tail");
page= page_korr(header);
rownr= dirpos_korr(header + PAGE_STORE_SIZE);
DBUG_PRINT("enter", ("rowid: %lu page: %lu rownr: %u data_length: %u",
(ulong) ma_recordpos(page, rownr),
(ulong) page, rownr, (uint) data_length));
share->state.changed|= (STATE_CHANGED | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
end_of_page= (page + 1) * share->block_size;
if (end_of_page > share->state.state.data_file_length)
{
DBUG_PRINT("info", ("Enlarging data file from %lu to %lu",
(ulong) share->state.state.data_file_length,
(ulong) end_of_page));
/*
New page at end of file. Note that the test above is also positive if
data_file_length is not a multiple of block_size (system crashed while
writing the last page): in this case we just extend the last page and
fill it entirely with zeroes, then the REDO will put correct data on
it.
*/
lock_method= PAGECACHE_LOCK_WRITE;
pin_method= PAGECACHE_PIN;
DBUG_ASSERT(rownr == 0 && new_page);
if (rownr != 0 || !new_page)
goto crashed_file;
buff= info->keyread_buff;
info->keyread_buff_used= 1;
make_empty_page(info, buff, page_type, 1);
empty_space= (block_size - PAGE_OVERHEAD_SIZE(share));
rec_offset= PAGE_HEADER_SIZE(share);
dir= buff+ block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE;
}
else
{
lock_method= PAGECACHE_LOCK_LEFT_WRITELOCKED;
pin_method= PAGECACHE_PIN_LEFT_PINNED;
share->pagecache->readwrite_flags&= ~MY_WME;
share->silence_encryption_errors= 1;
buff= pagecache_read(share->pagecache, &info->dfile,
page, 0, 0,
PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE,
&page_link.link);
share->pagecache->readwrite_flags= share->pagecache->org_readwrite_flags;
share->silence_encryption_errors= 0;
if (!buff)
{
/* Skip errors when reading outside of file and uninitialized pages */
if (!new_page || (my_errno != HA_ERR_FILE_TOO_SHORT &&
my_errno != HA_ERR_WRONG_CRC &&
my_errno != HA_ERR_DECRYPTION_FAILED))
{
DBUG_PRINT("error", ("Error %d when reading page", (int) my_errno));
goto err;
}
/* Create new page */
buff= pagecache_block_link_to_buffer(page_link.link);
buff[PAGE_TYPE_OFFSET]= UNALLOCATED_PAGE;
}
else if (lsn_korr(buff) >= lsn) /* Test if already applied */
{
check_skipped_lsn(info, lsn_korr(buff), 1, page);
/* Fix bitmap, just in case */
empty_space= uint2korr(buff + EMPTY_SPACE_OFFSET);
if (!enough_free_entries_on_page(share, buff))
empty_space= 0; /* Page is full */
if (_ma_bitmap_set(info, page, page_type == HEAD_PAGE, empty_space))
goto err;
pagecache_unlock_by_link(share->pagecache, page_link.link,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
LSN_IMPOSSIBLE, 0, FALSE);
DBUG_RETURN(0);
}
if (((uint) (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) != page_type))
{
/*
This is a page that has been freed before and now should be
changed to new type.
*/
if (!new_page)
{
DBUG_PRINT("error",
("Found page of wrong type: %u, should have been %u",
(uint) (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK),
page_type));
goto crashed_file;
}
make_empty_page(info, buff, page_type, 0);
empty_space= block_size - PAGE_HEADER_SIZE(share) - PAGE_SUFFIX_SIZE;
(void) extend_directory(info, buff, block_size, 0, rownr, &empty_space,
page_type == HEAD_PAGE);
rec_offset= PAGE_HEADER_SIZE(share);
dir= dir_entry_pos(buff, block_size, rownr);
empty_space+= uint2korr(dir+2);
}
else
{
uint max_entry= (uint) buff[DIR_COUNT_OFFSET];
uint length;
DBUG_ASSERT(!new_page);
dir= dir_entry_pos(buff, block_size, rownr);
empty_space= uint2korr(buff + EMPTY_SPACE_OFFSET);
if (max_entry <= rownr)
{
/* Add directory entry first in directory and data last on page */
if (extend_directory(info, buff, block_size, max_entry, rownr,
&empty_space, page_type == HEAD_PAGE))
goto crashed_file;
}
if (extend_area_on_page(info, buff, dir, rownr,
(uint) data_length, &empty_space,
&rec_offset, &length, page_type == HEAD_PAGE))
goto crashed_file;
}
}
/* Copy data */
int2store(dir+2, data_length);
memcpy(buff + rec_offset, data, data_length);
empty_space-= (uint) data_length;
int2store(buff + EMPTY_SPACE_OFFSET, empty_space);
/* Fix bitmap */
if (!enough_free_entries_on_page(share, buff))
empty_space= 0; /* Page is full */
if (_ma_bitmap_set(info, page, page_type == HEAD_PAGE, empty_space))
goto err;
/*
If page was not read before, write it but keep it pinned.
We don't update its LSN When we have processed all REDOs for this page
in the current REDO's group, we will stamp page with UNDO's LSN
(if we stamped it now, a next REDO, in
this group, for this page, would be skipped) and unpin then.
*/
result= 0;
if (lock_method == PAGECACHE_LOCK_WRITE &&
pagecache_write(share->pagecache,
&info->dfile, page, 0,
buff, PAGECACHE_PLAIN_PAGE,
lock_method, pin_method,
PAGECACHE_WRITE_DELAY, &page_link.link,
LSN_IMPOSSIBLE))
result= my_errno;
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= 1;
push_dynamic(&info->pinned_pages, (void*) &page_link);
/*
Data page and bitmap page are in place, we can update data_file_length in
case we extended the file. We could not do it earlier: bitmap code tests
data_file_length to know if it has to create a new page or not.
*/
set_if_bigger(share->state.state.data_file_length, end_of_page);
DBUG_RETURN(result);
crashed_file:
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
err:
error= my_errno;
if (lock_method == PAGECACHE_LOCK_LEFT_WRITELOCKED)
pagecache_unlock_by_link(share->pagecache, page_link.link,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
LSN_IMPOSSIBLE, 0, FALSE);
_ma_mark_file_crashed(share);
DBUG_ASSERT(!maria_assert_if_crashed_table); /* catch recovery error early */
DBUG_RETURN((my_errno= error));
} | O3 | c | ma_apply_redo_insert_row_head_or_tail:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %r12d
movq %rsi, %r14
movq (%rdi), %rbx
movl 0x7bc(%rbx), %r13d
movl (%r8), %eax
movzbl 0x4(%r8), %ecx
shlq $0x20, %rcx
leaq (%rcx,%rax), %r10
movzbl 0x5(%r8), %r11d
orl $0x181, 0x170(%rbx) # imm = 0x181
leaq (%rcx,%rax), %rsi
incq %rsi
imulq %r13, %rsi
movq 0x40(%rbx), %r8
cmpq %r8, %rsi
jbe 0x5ff6b
testl %r11d, %r11d
setne %al
testb %r12b, %r12b
sete %cl
movl $0x4, %r14d
orb %al, %cl
jne 0x60320
movq %r9, -0x70(%rbp)
movq %r8, -0x68(%rbp)
movq %r10, -0x60(%rbp)
movq %rsi, -0x58(%rbp)
movq 0x380(%rdi), %r15
movb $0x1, 0x685(%rdi)
movq %rdi, -0x38(%rbp)
movq %r15, %rsi
movl %edx, -0x30(%rbp)
movl $0x1, %ecx
callq 0x603b2
movl 0xc18(%rbx), %eax
movl %r13d, %ecx
subl %eax, %ecx
addl $-0x14, %ecx
movl %ecx, -0x2c(%rbp)
addl $0xc, %eax
movl %eax, -0x3c(%rbp)
addq %r15, %r13
addq $-0x8, %r13
movl $0x4, -0x48(%rbp)
movl $0x2, %eax
movq %rax, -0x50(%rbp)
jmp 0x60217
movq %r11, -0x48(%rbp)
movq %r9, -0x70(%rbp)
movq %r8, -0x68(%rbp)
movl %edx, -0x30(%rbp)
movq %rsi, -0x58(%rbp)
movq 0x600(%rbx), %rax
movl $0xffffffef, %ecx # imm = 0xFFFFFFEF
andq %rcx, 0x198(%rax)
movb $0x1, 0x7ec(%rbx)
movq 0x600(%rbx), %rcx
movq %rdi, -0x38(%rbp)
leaq 0x470(%rdi), %rsi
leaq -0x88(%rbp), %rax
movq %rcx, %rdi
movq %r10, -0x60(%rbp)
movq %r10, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rax
pushq $0x4
callq 0x33566
addq $0x10, %rsp
movq %rax, %r15
movq 0x600(%rbx), %rax
movq 0x1a0(%rax), %rcx
movq %rcx, 0x198(%rax)
movb $0x0, 0x7ec(%rbx)
testq %r15, %r15
je 0x60024
movzwl (%r15), %eax
shlq $0x20, %rax
movzbl 0x2(%r15), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x3(%r15), %esi
orq %rcx, %rsi
cmpq %r14, %rsi
jge 0x6012c
movzbl 0x7(%r15), %eax
andl $0x7, %eax
jmp 0x6006d
testb %r12b, %r12b
je 0x6017a
callq 0xa2a4e
cmpl $0xaf, (%rax)
je 0x60058
callq 0xa2a4e
cmpl $0xb0, (%rax)
je 0x60058
callq 0xa2a4e
cmpl $0xc0, (%rax)
jne 0x6017a
movq -0x88(%rbp), %rdi
callq 0x35a49
movq %rax, %r15
movb $0x0, 0x7(%rax)
xorl %eax, %eax
movl -0x30(%rbp), %edx
cmpl %edx, %eax
movq -0x38(%rbp), %rdi
jne 0x60187
movzbl 0x8(%r15), %ecx
movzwl 0xa(%r15), %eax
movl %eax, -0x2c(%rbp)
movq -0x48(%rbp), %r14
cmpb %r14b, %cl
ja 0x600c4
xorl %eax, %eax
cmpl $0x1, %edx
sete %al
subq $0x8, %rsp
leaq -0x2c(%rbp), %r9
movq %r15, %rsi
movl %r13d, %edx
movl %r14d, %r8d
pushq %rax
callq 0x60448
movl -0x30(%rbp), %edx
movq -0x38(%rbp), %rdi
addq $0x10, %rsp
testb %al, %al
jne 0x6031a
addq %r15, %r13
leal (,%r14,4), %eax
subq %rax, %r13
addq $-0x8, %r13
xorl %eax, %eax
cmpl $0x1, %edx
sete %al
subq $0x8, %rsp
leaq -0x8c(%rbp), %r10
leaq -0x3c(%rbp), %r11
leaq -0x2c(%rbp), %r9
movq %r15, %rsi
movq %r13, %rdx
movl %r14d, %ecx
movq 0x10(%rbp), %r8
pushq %rax
pushq %r10
pushq %r11
callq 0x605be
movq -0x38(%rbp), %rdi
addq $0x20, %rsp
testb %al, %al
jne 0x6031a
movl $0x2, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
jmp 0x60217
movq -0x38(%rbp), %rdi
movl $0x1, %edx
movq -0x60(%rbp), %r13
movq %r13, %rcx
callq 0x4d729
movzwl 0xa(%r15), %r14d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5cf2a
xorl %r12d, %r12d
testb %al, %al
cmovel %r12d, %r14d
xorl %edx, %edx
cmpl $0x1, -0x30(%rbp)
sete %dl
movq -0x38(%rbp), %rdi
movq %r13, %rsi
movl %r14d, %ecx
callq 0x42bd3
testb %al, %al
je 0x60385
callq 0xa2a4e
movl (%rax), %r12d
jmp 0x60338
testb %r12b, %r12b
je 0x6031a
movq $0x0, -0x50(%rbp)
movq %rdi, %r12
movq %r15, %rsi
xorl %ecx, %ecx
movl %edx, %r14d
callq 0x603b2
movl %r13d, %eax
subl 0xc18(%rbx), %eax
addl $-0x10, %eax
leaq -0x2c(%rbp), %rcx
movl %eax, (%rcx)
movq %rcx, %r9
xorl %eax, %eax
cmpl $0x1, %r14d
sete %al
subq $0x8, %rsp
movq %r12, %rdi
movq %r15, %rsi
movl %r13d, %edx
xorl %ecx, %ecx
movq -0x48(%rbp), %r14
movl %r14d, %r8d
movq %r9, %r12
pushq %rax
callq 0x60448
addq $0x10, %rsp
movl 0xc18(%rbx), %eax
addl $0xc, %eax
movl %eax, -0x3c(%rbp)
addq %r15, %r13
leal (,%r14,4), %eax
subq %rax, %r13
movzwl -0x6(%r13), %eax
addq $-0x8, %r13
addl %eax, (%r12)
movl $0x2, -0x48(%rbp)
movq 0x10(%rbp), %r12
movw %r12w, 0x2(%r13)
movl -0x3c(%rbp), %edi
addq %r15, %rdi
movq -0x70(%rbp), %rsi
movq %r12, %rdx
callq 0x29080
movl -0x2c(%rbp), %r14d
subl %r12d, %r14d
movl %r14d, -0x2c(%rbp)
movw %r14w, 0xa(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5cf2a
testb %al, %al
jne 0x6025b
movl $0x0, -0x2c(%rbp)
xorl %r14d, %r14d
xorl %edx, %edx
cmpl $0x1, -0x30(%rbp)
sete %dl
movq -0x38(%rbp), %r12
movq %r12, %rdi
movq -0x60(%rbp), %r13
movq %r13, %rsi
movl %r14d, %ecx
callq 0x42bd3
testb %al, %al
movl -0x48(%rbp), %r14d
jne 0x6032a
movq %r12, %r14
xorl %r12d, %r12d
movq -0x68(%rbp), %rax
cmpq %rax, -0x58(%rbp)
jbe 0x602e9
movq 0x600(%rbx), %rdi
leaq 0x470(%r14), %rsi
movl 0x80(%rdi), %eax
subq $0x8, %rsp
xorl %r12d, %r12d
leaq -0x88(%rbp), %r10
movq %r13, %rdx
xorl %ecx, %ecx
movq %r15, %r8
movl $0x1, %r9d
pushq %rax
pushq %r12
pushq $0x0
pushq %r10
pushq %r12
pushq -0x50(%rbp)
pushq $0x4
callq 0x349ca
addq $0x40, %rsp
testb %al, %al
je 0x602e9
callq 0xa2a4e
movl (%rax), %r12d
leaq -0x88(%rbp), %rsi
movl $0x6, 0x8(%rsi)
movb $0x1, 0x10(%rsi)
movq %r14, %rdi
addq $0x2e8, %rdi # imm = 0x2E8
callq 0x92af2
movq -0x58(%rbp), %rax
cmpq %rax, 0x40(%rbx)
jae 0x60373
movq %rax, 0x40(%rbx)
jmp 0x60373
movl $0x2, %r14d
movl $0x7f, %esi
callq 0x37978
callq 0xa2a4e
movl (%rax), %r12d
cmpl $0x2, %r14d
jne 0x60363
movq 0x600(%rbx), %rdi
movq -0x88(%rbp), %rsi
xorl %eax, %eax
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
callq 0x33281
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x39176
callq 0xa2a4e
movl %r12d, (%rax)
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x600(%rbx), %rdi
movq -0x88(%rbp), %rsi
movl $0x6, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %r12
callq 0x33281
addq $0x10, %rsp
jmp 0x60373
| _ma_apply_redo_insert_row_head_or_tail:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12d, ecx
mov r14, rsi
mov rbx, [rdi]
mov r13d, [rbx+7BCh]
mov eax, [r8]
movzx ecx, byte ptr [r8+4]
shl rcx, 20h
lea r10, [rcx+rax]
movzx r11d, byte ptr [r8+5]
or dword ptr [rbx+170h], 181h
lea rsi, [rcx+rax]
inc rsi
imul rsi, r13
mov r8, [rbx+40h]
cmp rsi, r8
jbe short loc_5FF6B
test r11d, r11d
setnz al
test r12b, r12b
setz cl
mov r14d, 4
or cl, al
jnz loc_60320
mov [rbp+var_70], r9
mov [rbp+var_68], r8
mov [rbp+var_60], r10
mov [rbp+var_58], rsi
mov r15, [rdi+380h]
mov byte ptr [rdi+685h], 1
mov [rbp+var_38], rdi
mov rsi, r15
mov [rbp+var_30], edx
mov ecx, 1
call make_empty_page
mov eax, [rbx+0C18h]
mov ecx, r13d
sub ecx, eax
add ecx, 0FFFFFFECh
mov [rbp+var_2C], ecx
add eax, 0Ch
mov [rbp+var_3C], eax
add r13, r15
add r13, 0FFFFFFFFFFFFFFF8h
mov dword ptr [rbp+var_48], 4
mov eax, 2
mov [rbp+var_50], rax
jmp loc_60217
loc_5FF6B:
mov [rbp+var_48], r11
mov [rbp+var_70], r9
mov [rbp+var_68], r8
mov [rbp+var_30], edx
mov [rbp+var_58], rsi
mov rax, [rbx+600h]
mov ecx, 0FFFFFFEFh
and [rax+198h], rcx
mov byte ptr [rbx+7ECh], 1
mov rcx, [rbx+600h]
mov [rbp+var_38], rdi
lea rsi, [rdi+470h]
lea rax, [rbp+var_88]
mov rdi, rcx
mov [rbp+var_60], r10
mov rdx, r10
xor ecx, ecx
xor r8d, r8d
mov r9d, 1
push rax
push 4
call pagecache_read
add rsp, 10h
mov r15, rax
mov rax, [rbx+600h]
mov rcx, [rax+1A0h]
mov [rax+198h], rcx
mov byte ptr [rbx+7ECh], 0
test r15, r15
jz short loc_60024
movzx eax, word ptr [r15]
shl rax, 20h
movzx ecx, byte ptr [r15+2]
shl rcx, 30h
or rcx, rax
mov esi, [r15+3]
or rsi, rcx
cmp rsi, r14
jge loc_6012C
movzx eax, byte ptr [r15+7]
and eax, 7
jmp short loc_6006D
loc_60024:
test r12b, r12b
jz loc_6017A
call _my_thread_var
cmp dword ptr [rax], 0AFh
jz short loc_60058
call _my_thread_var
cmp dword ptr [rax], 0B0h
jz short loc_60058
call _my_thread_var
cmp dword ptr [rax], 0C0h
jnz loc_6017A
loc_60058:
mov rdi, [rbp+var_88]
call pagecache_block_link_to_buffer
mov r15, rax
mov byte ptr [rax+7], 0
xor eax, eax
loc_6006D:
mov edx, [rbp+var_30]
cmp eax, edx
mov rdi, [rbp+var_38]
jnz loc_60187
movzx ecx, byte ptr [r15+8]
movzx eax, word ptr [r15+0Ah]
mov [rbp+var_2C], eax
mov r14, [rbp+var_48]
cmp cl, r14b
ja short loc_600C4
xor eax, eax
cmp edx, 1
setz al
sub rsp, 8
lea r9, [rbp+var_2C]
mov rsi, r15
mov edx, r13d
mov r8d, r14d
push rax
call extend_directory
mov edx, [rbp+var_30]
mov rdi, [rbp+var_38]
add rsp, 10h
test al, al
jnz loc_6031A
loc_600C4:
add r13, r15
lea eax, ds:0[r14*4]
sub r13, rax
add r13, 0FFFFFFFFFFFFFFF8h
xor eax, eax
cmp edx, 1
setz al
sub rsp, 8
lea r10, [rbp+var_8C]
lea r11, [rbp+var_3C]
lea r9, [rbp+var_2C]
mov rsi, r15
mov rdx, r13
mov ecx, r14d
mov r8, [rbp+arg_0]
push rax
push r10
push r11
call extend_area_on_page
mov rdi, [rbp+var_38]
add rsp, 20h
test al, al
jnz loc_6031A
mov dword ptr [rbp+var_48], 2
mov [rbp+var_50], 0
jmp loc_60217
loc_6012C:
mov rdi, [rbp+var_38]
mov edx, 1
mov r13, [rbp+var_60]
mov rcx, r13
call check_skipped_lsn
movzx r14d, word ptr [r15+0Ah]
mov rdi, rbx
mov rsi, r15
call enough_free_entries_on_page
xor r12d, r12d
test al, al
cmovz r14d, r12d
xor edx, edx
cmp [rbp+var_30], 1
setz dl
mov rdi, [rbp+var_38]
mov rsi, r13
mov ecx, r14d
call _ma_bitmap_set
test al, al
jz loc_60385
loc_6017A:
call _my_thread_var
mov r12d, [rax]
jmp loc_60338
loc_60187:
test r12b, r12b
jz loc_6031A
mov [rbp+var_50], 0
mov r12, rdi
mov rsi, r15
xor ecx, ecx
mov r14d, edx
call make_empty_page
mov eax, r13d
sub eax, [rbx+0C18h]
add eax, 0FFFFFFF0h
lea rcx, [rbp+var_2C]
mov [rcx], eax
mov r9, rcx
xor eax, eax
cmp r14d, 1
setz al
sub rsp, 8
mov rdi, r12
mov rsi, r15
mov edx, r13d
xor ecx, ecx
mov r14, [rbp+var_48]
mov r8d, r14d
mov r12, r9
push rax
call extend_directory
add rsp, 10h
mov eax, [rbx+0C18h]
add eax, 0Ch
mov [rbp+var_3C], eax
add r13, r15
lea eax, ds:0[r14*4]
sub r13, rax
movzx eax, word ptr [r13-6]
add r13, 0FFFFFFFFFFFFFFF8h
add [r12], eax
mov dword ptr [rbp+var_48], 2
loc_60217:
mov r12, [rbp+arg_0]
mov [r13+2], r12w
mov edi, [rbp+var_3C]
add rdi, r15
mov rsi, [rbp+var_70]
mov rdx, r12
call _memcpy
mov r14d, [rbp+var_2C]
sub r14d, r12d
mov [rbp+var_2C], r14d
mov [r15+0Ah], r14w
mov rdi, rbx
mov rsi, r15
call enough_free_entries_on_page
test al, al
jnz short loc_6025B
mov [rbp+var_2C], 0
xor r14d, r14d
loc_6025B:
xor edx, edx
cmp [rbp+var_30], 1
setz dl
mov r12, [rbp+var_38]
mov rdi, r12
mov r13, [rbp+var_60]
mov rsi, r13
mov ecx, r14d
call _ma_bitmap_set
test al, al
mov r14d, dword ptr [rbp+var_48]
jnz loc_6032A
mov r14, r12
xor r12d, r12d
mov rax, [rbp+var_68]
cmp [rbp+var_58], rax
jbe short loc_602E9
mov rdi, [rbx+600h]
lea rsi, [r14+470h]
mov eax, [rdi+80h]
sub rsp, 8
xor r12d, r12d
lea r10, [rbp+var_88]
mov rdx, r13
xor ecx, ecx
mov r8, r15
mov r9d, 1
push rax
push r12
push 0
push r10
push r12
push [rbp+var_50]
push 4
call pagecache_write_part
add rsp, 40h
test al, al
jz short loc_602E9
call _my_thread_var
mov r12d, [rax]
loc_602E9:
lea rsi, [rbp+var_88]
mov dword ptr [rsi+8], 6
mov byte ptr [rsi+10h], 1
mov rdi, r14
add rdi, 2E8h
call insert_dynamic
mov rax, [rbp+var_58]
cmp [rbx+40h], rax
jnb short loc_60373
mov [rbx+40h], rax
jmp short loc_60373
loc_6031A:
mov r14d, 2
loc_60320:
mov esi, 7Fh
call _ma_set_fatal_error
loc_6032A:
call _my_thread_var
mov r12d, [rax]
cmp r14d, 2
jnz short loc_60363
loc_60338:
mov rdi, [rbx+600h]
mov rsi, [rbp+var_88]
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_60363:
mov rdi, rbx
call _ma_mark_file_crashed
call _my_thread_var
mov [rax], r12d
loc_60373:
mov eax, r12d
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_60385:
mov rdi, [rbx+600h]
mov rsi, [rbp+var_88]
mov edx, 6
mov ecx, 3
xor r8d, r8d
xor r9d, r9d
push r12
push r12
call pagecache_unlock_by_link
add rsp, 10h
jmp short loc_60373
| long long ma_apply_redo_insert_row_head_or_tail(
long long *a1,
long long a2,
long long a3,
char a4,
unsigned int *a5,
long long a6,
long long a7)
{
long long v9; // rbx
long long v10; // r13
long long v11; // rax
unsigned long long v12; // rcx
long long v13; // r10
long long v14; // r11
unsigned long long v15; // rsi
unsigned long long v16; // r8
int v17; // r14d
unsigned __int16 *v18; // r15
int v19; // eax
long long v20; // r13
long long v21; // rcx
const char *v22; // rsi
long long *v23; // rdi
long long v24; // rsi
int v25; // eax
int v26; // ecx
int v27; // r14d
char v28; // al
char v29; // al
unsigned long long v30; // r13
unsigned int v31; // r14d
unsigned int v32; // r12d
unsigned int v33; // r14d
char v34; // al
int v35; // r14d
char *v36; // r13
int v37; // eax
unsigned int v38; // r14d
long long *v39; // r12
long long v40; // r13
const char *v41; // rsi
char v42; // al
long long *v43; // r14
__m128i *v44; // rdi
_BYTE v46[4]; // [rsp+4h] [rbp-8Ch] BYREF
const char *v47; // [rsp+8h] [rbp-88h] BYREF
int v48; // [rsp+10h] [rbp-80h]
char v49; // [rsp+18h] [rbp-78h]
long long v50; // [rsp+20h] [rbp-70h]
unsigned long long v51; // [rsp+28h] [rbp-68h]
const char *v52; // [rsp+30h] [rbp-60h]
unsigned long long v53; // [rsp+38h] [rbp-58h]
long long v54; // [rsp+40h] [rbp-50h]
long long v55; // [rsp+48h] [rbp-48h]
unsigned int v56; // [rsp+54h] [rbp-3Ch] BYREF
long long *v57; // [rsp+58h] [rbp-38h]
unsigned int v58; // [rsp+60h] [rbp-30h]
_DWORD v59[11]; // [rsp+64h] [rbp-2Ch] BYREF
v9 = *a1;
v10 = *(unsigned int *)(*a1 + 1980);
v11 = *a5;
v12 = (unsigned long long)*((unsigned __int8 *)a5 + 4) << 32;
v13 = v12 + v11;
v14 = *((unsigned __int8 *)a5 + 5);
*(_DWORD *)(v9 + 368) |= 0x181u;
v15 = v10 * (v12 + v11 + 1);
v16 = *(_QWORD *)(v9 + 64);
if ( v15 > v16 )
{
v17 = 4;
LOBYTE(v12) = (_DWORD)v14 != 0 || a4 == 0;
if ( !(_BYTE)v12 )
{
v50 = a6;
v51 = v16;
v52 = (const char *)v13;
v53 = v15;
v18 = (unsigned __int16 *)a1[112];
*((_BYTE *)a1 + 1669) = 1;
v57 = a1;
v58 = a3;
make_empty_page(a1, v18, a3, 1LL);
v19 = *(_DWORD *)(v9 + 3096);
v59[0] = v10 - v19 - 20;
v56 = v19 + 12;
v20 = (long long)v18 + v10 - 8;
LODWORD(v55) = 4;
v54 = 2LL;
goto LABEL_23;
}
LABEL_32:
v41 = (_BYTE *)(&dword_7C + 3);
ma_set_fatal_error(a1, 127LL, a3, v12, v16, a6);
goto LABEL_33;
}
v55 = v14;
v50 = a6;
v51 = v16;
v58 = a3;
v53 = v10 * (v12 + v11 + 1);
*(_QWORD *)(*(_QWORD *)(v9 + 1536) + 408LL) &= 0xFFFFFFEFuLL;
*(_BYTE *)(v9 + 2028) = 1;
v21 = *(_QWORD *)(v9 + 1536);
v57 = a1;
v22 = (const char *)(a1 + 142);
v23 = (long long *)v21;
v52 = (const char *)v13;
v18 = (unsigned __int16 *)pagecache_read(v21, (long long)v22, v13, 0, 0LL, 1, 4u, &v47);
*(_QWORD *)(*(_QWORD *)(v9 + 1536) + 408LL) = *(_QWORD *)(*(_QWORD *)(v9 + 1536) + 416LL);
*(_BYTE *)(v9 + 2028) = 0;
if ( v18 )
{
v12 = ((unsigned long long)*v18 << 32) | ((unsigned long long)*((unsigned __int8 *)v18 + 2) << 48);
v24 = v12 | *(unsigned int *)((char *)v18 + 3);
if ( v24 < a2 )
{
v25 = *((_BYTE *)v18 + 7) & 7;
goto LABEL_12;
}
v30 = (unsigned long long)v52;
check_skipped_lsn((long long)v57, v24, 1, (int)v52);
v31 = v18[5];
v32 = 0;
if ( !enough_free_entries_on_page(v9, v18) )
v31 = 0;
v23 = v57;
v22 = (const char *)v30;
if ( !(unsigned __int8)ma_bitmap_set(v57, v30, v58 == 1, v31) )
{
pagecache_unlock_by_link(*(_QWORD *)(v9 + 1536), (long long)v47, 6, 3, 0LL, 0LL, 0);
return v32;
}
LABEL_20:
v32 = *(_DWORD *)my_thread_var(v23, v22);
goto LABEL_34;
}
if ( !a4
|| *(_DWORD *)my_thread_var(v23, v22) != 175
&& *(_DWORD *)my_thread_var(v23, v22) != 176
&& *(_DWORD *)my_thread_var(v23, v22) != 192 )
{
goto LABEL_20;
}
v18 = (unsigned __int16 *)pagecache_block_link_to_buffer((long long)v47);
*((_BYTE *)v18 + 7) = 0;
v25 = 0;
LABEL_12:
a3 = v58;
a1 = v57;
if ( v25 == v58 )
{
v26 = *((unsigned __int8 *)v18 + 8);
v59[0] = v18[5];
v27 = v55;
if ( (unsigned __int8)v26 > (unsigned __int8)v55
|| (v28 = extend_directory((_DWORD)v57, (_DWORD)v18, v10, v26, v55, (unsigned int)v59, v58 == 1),
a3 = v58,
a1 = v57,
!v28) )
{
v20 = (long long)v18 + v10 - (unsigned int)(4 * v27) - 8;
v29 = extend_area_on_page(
(_DWORD)a1,
(_DWORD)v18,
v20,
v27,
a7,
(unsigned int)v59,
(long long)&v56,
(long long)v46,
(_DWORD)a3 == 1);
a1 = v57;
if ( !v29 )
{
LODWORD(v55) = 2;
v54 = 0LL;
goto LABEL_23;
}
}
LABEL_31:
v17 = 2;
goto LABEL_32;
}
if ( !a4 )
goto LABEL_31;
v54 = 0LL;
v33 = v58;
make_empty_page(v57, v18, v58, 0LL);
v59[0] = v10 - *(_DWORD *)(v9 + 3096) - 16;
v34 = v33 == 1;
v35 = v55;
extend_directory((_DWORD)a1, (_DWORD)v18, v10, 0, v55, (unsigned int)v59, v34);
v56 = *(_DWORD *)(v9 + 3096) + 12;
v36 = (char *)v18 + v10 - (unsigned int)(4 * v35);
v37 = *((unsigned __int16 *)v36 - 3);
v20 = (long long)(v36 - 8);
v59[0] += v37;
LODWORD(v55) = 2;
LABEL_23:
*(_WORD *)(v20 + 2) = a7;
memcpy((char *)v18 + v56, v50, a7);
v38 = v59[0] - a7;
v59[0] = v38;
v18[5] = v38;
if ( !enough_free_entries_on_page(v9, v18) )
{
v59[0] = 0;
v38 = 0;
}
v39 = v57;
a1 = v57;
v40 = (long long)v52;
v41 = v52;
v42 = ma_bitmap_set(v57, (unsigned long long)v52, v58 == 1, v38);
v17 = v55;
if ( v42 )
{
LABEL_33:
v32 = *(_DWORD *)my_thread_var(a1, v41);
if ( v17 != 2 )
{
LABEL_35:
ma_mark_file_crashed(v9);
*(_DWORD *)my_thread_var(v9, v41) = v32;
return v32;
}
LABEL_34:
v41 = v47;
pagecache_unlock_by_link(*(_QWORD *)(v9 + 1536), (long long)v47, 6, 3, 0LL, 0LL, 0);
goto LABEL_35;
}
v43 = v39;
v32 = 0;
if ( v53 > v51 )
{
v44 = *(__m128i **)(v9 + 1536);
v32 = 0;
if ( (unsigned __int8)pagecache_write_part(
v44,
(char *)v43 + 1136,
v40,
0,
(char *)v18,
1,
4u,
v54,
0,
&v47,
0LL,
0,
v44[8].m128i_u32[0]) )
v32 = *(_DWORD *)my_thread_var(v44, (const char *)v43 + 1136);
}
v48 = 6;
v49 = 1;
insert_dynamic(v43 + 93, &v47);
if ( *(_QWORD *)(v9 + 64) < v53 )
*(_QWORD *)(v9 + 64) = v53;
return v32;
}
| _ma_apply_redo_insert_row_head_or_tail:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R12D,ECX
MOV R14,RSI
MOV RBX,qword ptr [RDI]
MOV R13D,dword ptr [RBX + 0x7bc]
MOV EAX,dword ptr [R8]
MOVZX ECX,byte ptr [R8 + 0x4]
SHL RCX,0x20
LEA R10,[RCX + RAX*0x1]
MOVZX R11D,byte ptr [R8 + 0x5]
OR dword ptr [RBX + 0x170],0x181
LEA RSI,[RCX + RAX*0x1]
INC RSI
IMUL RSI,R13
MOV R8,qword ptr [RBX + 0x40]
CMP RSI,R8
JBE 0x0015ff6b
TEST R11D,R11D
SETNZ AL
TEST R12B,R12B
SETZ CL
MOV R14D,0x4
OR CL,AL
JNZ 0x00160320
MOV qword ptr [RBP + -0x70],R9
MOV qword ptr [RBP + -0x68],R8
MOV qword ptr [RBP + -0x60],R10
MOV qword ptr [RBP + -0x58],RSI
MOV R15,qword ptr [RDI + 0x380]
MOV byte ptr [RDI + 0x685],0x1
MOV qword ptr [RBP + -0x38],RDI
MOV RSI,R15
MOV dword ptr [RBP + -0x30],EDX
MOV ECX,0x1
CALL 0x001603b2
MOV EAX,dword ptr [RBX + 0xc18]
MOV ECX,R13D
SUB ECX,EAX
ADD ECX,-0x14
MOV dword ptr [RBP + -0x2c],ECX
ADD EAX,0xc
MOV dword ptr [RBP + -0x3c],EAX
ADD R13,R15
ADD R13,-0x8
MOV dword ptr [RBP + -0x48],0x4
MOV EAX,0x2
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00160217
LAB_0015ff6b:
MOV qword ptr [RBP + -0x48],R11
MOV qword ptr [RBP + -0x70],R9
MOV qword ptr [RBP + -0x68],R8
MOV dword ptr [RBP + -0x30],EDX
MOV qword ptr [RBP + -0x58],RSI
MOV RAX,qword ptr [RBX + 0x600]
MOV ECX,0xffffffef
AND qword ptr [RAX + 0x198],RCX
MOV byte ptr [RBX + 0x7ec],0x1
MOV RCX,qword ptr [RBX + 0x600]
MOV qword ptr [RBP + -0x38],RDI
LEA RSI,[RDI + 0x470]
LEA RAX,[RBP + -0x88]
MOV RDI,RCX
MOV qword ptr [RBP + -0x60],R10
MOV RDX,R10
XOR ECX,ECX
XOR R8D,R8D
MOV R9D,0x1
PUSH RAX
PUSH 0x4
CALL 0x00133566
ADD RSP,0x10
MOV R15,RAX
MOV RAX,qword ptr [RBX + 0x600]
MOV RCX,qword ptr [RAX + 0x1a0]
MOV qword ptr [RAX + 0x198],RCX
MOV byte ptr [RBX + 0x7ec],0x0
TEST R15,R15
JZ 0x00160024
MOVZX EAX,word ptr [R15]
SHL RAX,0x20
MOVZX ECX,byte ptr [R15 + 0x2]
SHL RCX,0x30
OR RCX,RAX
MOV ESI,dword ptr [R15 + 0x3]
OR RSI,RCX
CMP RSI,R14
JGE 0x0016012c
MOVZX EAX,byte ptr [R15 + 0x7]
AND EAX,0x7
JMP 0x0016006d
LAB_00160024:
TEST R12B,R12B
JZ 0x0016017a
CALL 0x001a2a4e
CMP dword ptr [RAX],0xaf
JZ 0x00160058
CALL 0x001a2a4e
CMP dword ptr [RAX],0xb0
JZ 0x00160058
CALL 0x001a2a4e
CMP dword ptr [RAX],0xc0
JNZ 0x0016017a
LAB_00160058:
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00135a49
MOV R15,RAX
MOV byte ptr [RAX + 0x7],0x0
XOR EAX,EAX
LAB_0016006d:
MOV EDX,dword ptr [RBP + -0x30]
CMP EAX,EDX
MOV RDI,qword ptr [RBP + -0x38]
JNZ 0x00160187
MOVZX ECX,byte ptr [R15 + 0x8]
MOVZX EAX,word ptr [R15 + 0xa]
MOV dword ptr [RBP + -0x2c],EAX
MOV R14,qword ptr [RBP + -0x48]
CMP CL,R14B
JA 0x001600c4
XOR EAX,EAX
CMP EDX,0x1
SETZ AL
SUB RSP,0x8
LEA R9,[RBP + -0x2c]
MOV RSI,R15
MOV EDX,R13D
MOV R8D,R14D
PUSH RAX
CALL 0x00160448
MOV EDX,dword ptr [RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x38]
ADD RSP,0x10
TEST AL,AL
JNZ 0x0016031a
LAB_001600c4:
ADD R13,R15
LEA EAX,[R14*0x4]
SUB R13,RAX
ADD R13,-0x8
XOR EAX,EAX
CMP EDX,0x1
SETZ AL
SUB RSP,0x8
LEA R10,[RBP + -0x8c]
LEA R11,[RBP + -0x3c]
LEA R9,[RBP + -0x2c]
MOV RSI,R15
MOV RDX,R13
MOV ECX,R14D
MOV R8,qword ptr [RBP + 0x10]
PUSH RAX
PUSH R10
PUSH R11
CALL 0x001605be
MOV RDI,qword ptr [RBP + -0x38]
ADD RSP,0x20
TEST AL,AL
JNZ 0x0016031a
MOV dword ptr [RBP + -0x48],0x2
MOV qword ptr [RBP + -0x50],0x0
JMP 0x00160217
LAB_0016012c:
MOV RDI,qword ptr [RBP + -0x38]
MOV EDX,0x1
MOV R13,qword ptr [RBP + -0x60]
MOV RCX,R13
CALL 0x0014d729
MOVZX R14D,word ptr [R15 + 0xa]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015cf2a
XOR R12D,R12D
TEST AL,AL
CMOVZ R14D,R12D
XOR EDX,EDX
CMP dword ptr [RBP + -0x30],0x1
SETZ DL
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,R13
MOV ECX,R14D
CALL 0x00142bd3
TEST AL,AL
JZ 0x00160385
LAB_0016017a:
CALL 0x001a2a4e
MOV R12D,dword ptr [RAX]
JMP 0x00160338
LAB_00160187:
TEST R12B,R12B
JZ 0x0016031a
MOV qword ptr [RBP + -0x50],0x0
MOV R12,RDI
MOV RSI,R15
XOR ECX,ECX
MOV R14D,EDX
CALL 0x001603b2
MOV EAX,R13D
SUB EAX,dword ptr [RBX + 0xc18]
ADD EAX,-0x10
LEA RCX,[RBP + -0x2c]
MOV dword ptr [RCX],EAX
MOV R9,RCX
XOR EAX,EAX
CMP R14D,0x1
SETZ AL
SUB RSP,0x8
MOV RDI,R12
MOV RSI,R15
MOV EDX,R13D
XOR ECX,ECX
MOV R14,qword ptr [RBP + -0x48]
MOV R8D,R14D
MOV R12,R9
PUSH RAX
CALL 0x00160448
ADD RSP,0x10
MOV EAX,dword ptr [RBX + 0xc18]
ADD EAX,0xc
MOV dword ptr [RBP + -0x3c],EAX
ADD R13,R15
LEA EAX,[R14*0x4]
SUB R13,RAX
MOVZX EAX,word ptr [R13 + -0x6]
ADD R13,-0x8
ADD dword ptr [R12],EAX
MOV dword ptr [RBP + -0x48],0x2
LAB_00160217:
MOV R12,qword ptr [RBP + 0x10]
MOV word ptr [R13 + 0x2],R12W
MOV EDI,dword ptr [RBP + -0x3c]
ADD RDI,R15
MOV RSI,qword ptr [RBP + -0x70]
MOV RDX,R12
CALL 0x00129080
MOV R14D,dword ptr [RBP + -0x2c]
SUB R14D,R12D
MOV dword ptr [RBP + -0x2c],R14D
MOV word ptr [R15 + 0xa],R14W
MOV RDI,RBX
MOV RSI,R15
CALL 0x0015cf2a
TEST AL,AL
JNZ 0x0016025b
MOV dword ptr [RBP + -0x2c],0x0
XOR R14D,R14D
LAB_0016025b:
XOR EDX,EDX
CMP dword ptr [RBP + -0x30],0x1
SETZ DL
MOV R12,qword ptr [RBP + -0x38]
MOV RDI,R12
MOV R13,qword ptr [RBP + -0x60]
MOV RSI,R13
MOV ECX,R14D
CALL 0x00142bd3
TEST AL,AL
MOV R14D,dword ptr [RBP + -0x48]
JNZ 0x0016032a
MOV R14,R12
XOR R12D,R12D
MOV RAX,qword ptr [RBP + -0x68]
CMP qword ptr [RBP + -0x58],RAX
JBE 0x001602e9
MOV RDI,qword ptr [RBX + 0x600]
LEA RSI,[R14 + 0x470]
MOV EAX,dword ptr [RDI + 0x80]
SUB RSP,0x8
XOR R12D,R12D
LEA R10,[RBP + -0x88]
MOV RDX,R13
XOR ECX,ECX
MOV R8,R15
MOV R9D,0x1
PUSH RAX
PUSH R12
PUSH 0x0
PUSH R10
PUSH R12
PUSH qword ptr [RBP + -0x50]
PUSH 0x4
CALL 0x001349ca
ADD RSP,0x40
TEST AL,AL
JZ 0x001602e9
CALL 0x001a2a4e
MOV R12D,dword ptr [RAX]
LAB_001602e9:
LEA RSI,[RBP + -0x88]
MOV dword ptr [RSI + 0x8],0x6
MOV byte ptr [RSI + 0x10],0x1
MOV RDI,R14
ADD RDI,0x2e8
CALL 0x00192af2
MOV RAX,qword ptr [RBP + -0x58]
CMP qword ptr [RBX + 0x40],RAX
JNC 0x00160373
MOV qword ptr [RBX + 0x40],RAX
JMP 0x00160373
LAB_0016031a:
MOV R14D,0x2
LAB_00160320:
MOV ESI,0x7f
CALL 0x00137978
LAB_0016032a:
CALL 0x001a2a4e
MOV R12D,dword ptr [RAX]
CMP R14D,0x2
JNZ 0x00160363
LAB_00160338:
MOV RDI,qword ptr [RBX + 0x600]
MOV RSI,qword ptr [RBP + -0x88]
XOR EAX,EAX
MOV EDX,0x6
MOV ECX,0x3
XOR R8D,R8D
XOR R9D,R9D
PUSH RAX
PUSH RAX
CALL 0x00133281
ADD RSP,0x10
LAB_00160363:
MOV RDI,RBX
CALL 0x00139176
CALL 0x001a2a4e
MOV dword ptr [RAX],R12D
LAB_00160373:
MOV EAX,R12D
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00160385:
MOV RDI,qword ptr [RBX + 0x600]
MOV RSI,qword ptr [RBP + -0x88]
MOV EDX,0x6
MOV ECX,0x3
XOR R8D,R8D
XOR R9D,R9D
PUSH R12
PUSH R12
CALL 0x00133281
ADD RSP,0x10
JMP 0x00160373
|
int4
_ma_apply_redo_insert_row_head_or_tail
(long *param_1,long param_2,int8 param_3,char param_4,uint5 *param_5,void *param_6,
size_t param_7)
{
ulong *puVar1;
ulong uVar2;
byte bVar3;
long lVar4;
uint5 uVar5;
long lVar6;
long *plVar7;
uint uVar8;
char cVar9;
uint uVar10;
ushort *puVar11;
int *piVar12;
int4 *puVar13;
ulong uVar14;
ulong uVar15;
int4 uVar16;
ulong uVar17;
long lVar18;
ushort uVar19;
uint uVar20;
int iVar21;
int1 local_94 [4];
int8 local_90;
int4 local_88;
int1 local_80;
void *local_78;
ulong local_70;
ulong local_68;
ulong local_60;
int8 local_58;
ulong local_50;
uint local_44;
long *local_40;
uint local_38;
uint local_34;
lVar4 = *param_1;
uVar20 = *(uint *)(lVar4 + 0x7bc);
uVar17 = (ulong)uVar20;
uVar5 = *param_5;
uVar2 = (ulong)*param_5;
bVar3 = *(byte *)((long)param_5 + 5);
*(uint *)(lVar4 + 0x170) = *(uint *)(lVar4 + 0x170) | 0x181;
uVar14 = ((ulong)uVar5 + 1) * uVar17;
uVar15 = *(ulong *)(lVar4 + 0x40);
if (uVar14 < uVar15 || uVar14 - uVar15 == 0) {
puVar1 = (ulong *)(*(long *)(lVar4 + 0x600) + 0x198);
*puVar1 = *puVar1 & 0xffffffef;
*(int1 *)(lVar4 + 0x7ec) = 1;
local_78 = param_6;
local_70 = uVar15;
local_68 = uVar2;
local_60 = uVar14;
local_50 = (ulong)bVar3;
local_40 = param_1;
local_38 = (uint)param_3;
puVar11 = (ushort *)
pagecache_read(*(int8 *)(lVar4 + 0x600),param_1 + 0x8e,uVar2,0,0,1,4,&local_90);
uVar2 = local_68;
*(int8 *)(*(long *)(lVar4 + 0x600) + 0x198) =
*(int8 *)(*(long *)(lVar4 + 0x600) + 0x1a0);
*(int1 *)(lVar4 + 0x7ec) = 0;
if (puVar11 == (ushort *)0x0) {
if ((param_4 != '\0') &&
(((piVar12 = (int *)_my_thread_var(), *piVar12 == 0xaf ||
(piVar12 = (int *)_my_thread_var(), *piVar12 == 0xb0)) ||
(piVar12 = (int *)_my_thread_var(), *piVar12 == 0xc0)))) {
puVar11 = (ushort *)pagecache_block_link_to_buffer(local_90);
*(int1 *)((long)puVar11 + 7) = 0;
uVar10 = 0;
goto LAB_0016006d;
}
}
else {
uVar15 = (ulong)*(uint *)((long)puVar11 + 3) |
(ulong)(byte)puVar11[1] << 0x30 | (ulong)*puVar11 << 0x20;
if ((long)uVar15 < param_2) {
uVar10 = *(byte *)((long)puVar11 + 7) & 7;
LAB_0016006d:
uVar8 = local_38;
plVar7 = local_40;
uVar2 = local_50;
if (uVar10 == local_38) {
local_34 = (uint)puVar11[5];
if (((byte)local_50 < (byte)puVar11[4]) ||
(cVar9 = extend_directory(local_40,puVar11,uVar17,(byte)puVar11[4],
local_50 & 0xffffffff,&local_34,local_38 == 1), cVar9 == '\0'
)) {
lVar18 = (long)puVar11 + (uVar17 - (uint)((int)uVar2 * 4)) + -8;
cVar9 = extend_area_on_page(local_40,puVar11,lVar18,uVar2 & 0xffffffff,param_7,&local_34
,&local_44,local_94,local_38 == 1);
if (cVar9 == '\0') {
local_50 = CONCAT44(local_50._4_4_,2);
local_58 = 0;
goto LAB_00160217;
}
}
LAB_0016031a:
iVar21 = 2;
param_1 = local_40;
goto LAB_00160320;
}
if (param_4 == '\0') goto LAB_0016031a;
local_58 = 0;
make_empty_page(local_40,puVar11,local_38,0);
uVar2 = local_50;
local_34 = (uVar20 - *(int *)(lVar4 + 0xc18)) - 0x10;
extend_directory(plVar7,puVar11,uVar17,0,local_50 & 0xffffffff,&local_34,uVar8 == 1);
local_44 = *(int *)(lVar4 + 0xc18) + 0xc;
lVar6 = uVar17 - (uint)((int)uVar2 * 4);
lVar18 = (long)puVar11 + lVar6 + -8;
local_34 = local_34 + *(ushort *)((long)puVar11 + lVar6 + -6);
local_50 = CONCAT44(local_50._4_4_,2);
LAB_00160217:
*(short *)(lVar18 + 2) = (short)param_7;
memcpy((void *)((ulong)local_44 + (long)puVar11),local_78,param_7);
uVar20 = local_34 - (int)param_7;
puVar11[5] = (ushort)uVar20;
local_34 = uVar20;
cVar9 = enough_free_entries_on_page(lVar4,puVar11);
plVar7 = local_40;
uVar2 = local_68;
if (cVar9 == '\0') {
local_34 = 0;
uVar20 = 0;
}
cVar9 = _ma_bitmap_set(local_40,local_68,local_38 == 1,uVar20);
iVar21 = (int)local_50;
if (cVar9 == '\0') {
uVar16 = 0;
if (local_70 < local_60) {
uVar16 = 0;
cVar9 = pagecache_write_part
(*(long *)(lVar4 + 0x600),plVar7 + 0x8e,uVar2,0,puVar11,1,4,local_58,0
,&local_90,0,0,*(int4 *)(*(long *)(lVar4 + 0x600) + 0x80));
if (cVar9 != '\0') {
puVar13 = (int4 *)_my_thread_var();
uVar16 = *puVar13;
}
}
local_88 = 6;
local_80 = 1;
insert_dynamic(plVar7 + 0x5d);
if (local_60 <= *(ulong *)(lVar4 + 0x40)) {
return uVar16;
}
*(ulong *)(lVar4 + 0x40) = local_60;
return uVar16;
}
goto LAB_0016032a;
}
check_skipped_lsn(local_40,uVar15,1,local_68);
uVar19 = puVar11[5];
cVar9 = enough_free_entries_on_page(lVar4,puVar11);
if (cVar9 == '\0') {
uVar19 = 0;
}
cVar9 = _ma_bitmap_set(local_40,uVar2,local_38 == 1,uVar19);
if (cVar9 == '\0') {
pagecache_unlock_by_link(*(int8 *)(lVar4 + 0x600),local_90,6,3,0,0,0,0);
return 0;
}
}
puVar13 = (int4 *)_my_thread_var();
uVar16 = *puVar13;
}
else {
iVar21 = 4;
if (param_4 != '\0' && bVar3 == 0) {
puVar11 = (ushort *)param_1[0x70];
*(int1 *)((long)param_1 + 0x685) = 1;
local_78 = param_6;
local_70 = uVar15;
local_68 = uVar2;
local_60 = uVar14;
local_40 = param_1;
local_38 = (uint)param_3;
make_empty_page(param_1,puVar11,param_3,1);
local_34 = (uVar20 - *(int *)(lVar4 + 0xc18)) - 0x14;
local_44 = *(int *)(lVar4 + 0xc18) + 0xc;
lVar18 = (long)puVar11 + (uVar17 - 8);
local_50 = CONCAT44(local_50._4_4_,4);
local_58 = 2;
goto LAB_00160217;
}
LAB_00160320:
_ma_set_fatal_error(param_1,0x7f);
LAB_0016032a:
puVar13 = (int4 *)_my_thread_var();
uVar16 = *puVar13;
if (iVar21 != 2) goto LAB_00160363;
}
pagecache_unlock_by_link(*(int8 *)(lVar4 + 0x600),local_90,6,3,0,0,0,0);
LAB_00160363:
_ma_mark_file_crashed(lVar4);
puVar13 = (int4 *)_my_thread_var();
*puVar13 = uVar16;
return uVar16;
}
|
|
1,015 | ma_scan_restore_block_record | eloqsql/storage/maria/ma_blockrec.c | int _ma_scan_restore_block_record(MARIA_HA *info,
MARIA_RECORD_POS lastpos)
{
uchar *bitmap_buff;
DBUG_ENTER("_ma_scan_restore_block_record");
info->cur_row.nextpos= lastpos;
bitmap_buff= info->scan.bitmap_buff;
memcpy(&info->scan, info->scan_save, sizeof(*info->scan_save));
info->scan.bitmap_buff= bitmap_buff;
memcpy(bitmap_buff, info->scan_save->bitmap_buff, info->s->block_size * 2);
if (info->scan.row_changes != info->row_changes)
{
/*
Table has been changed. We have to re-read the current page block as
data may have changed on it that we have to see.
*/
if (!(pagecache_read(info->s->pagecache,
&info->dfile,
ma_recordpos_to_page(info->scan.row_base_page),
0, info->scan.page_buff,
info->s->page_type,
PAGECACHE_LOCK_LEFT_UNLOCKED, 0)))
DBUG_RETURN(my_errno);
info->scan.number_of_rows=
(uint) (uchar) info->scan.page_buff[DIR_COUNT_OFFSET];
info->scan.dir_end= (info->scan.page_buff + info->s->block_size -
PAGE_SUFFIX_SIZE -
info->scan.number_of_rows * DIR_ENTRY_SIZE);
}
DBUG_RETURN(0);
} | O3 | c | ma_scan_restore_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, 0xa0(%rdi)
addq $0x220, %rdi # imm = 0x220
movq 0x220(%rbx), %r14
movq 0x280(%rbx), %r15
movl $0x60, %edx
movq %r15, %rsi
callq 0x2a0a0
movq %r14, 0x220(%rbx)
movq (%r15), %rsi
movq (%rbx), %rax
movl 0x7bc(%rax), %edx
addl %edx, %edx
movq %r14, %rdi
callq 0x2a0a0
movq 0x278(%rbx), %rax
xorl %r14d, %r14d
cmpq 0x3f0(%rbx), %rax
je 0x4b40c
movq (%rbx), %rax
movq 0x600(%rax), %rdi
leaq 0x470(%rbx), %rsi
movq 0x270(%rbx), %rdx
shrq $0x8, %rdx
movq 0x238(%rbx), %r8
movl 0x7d4(%rax), %r9d
xorl %r14d, %r14d
xorl %ecx, %ecx
pushq $0x0
pushq $0x0
callq 0x70b16
addq $0x10, %rsp
testq %rax, %rax
je 0x4b404
movq 0x238(%rbx), %rax
movzbl 0x8(%rax), %ecx
movl %ecx, 0x268(%rbx)
movq (%rbx), %rdx
movl 0x7bc(%rdx), %edx
addq %rax, %rdx
shll $0x2, %ecx
subq %rcx, %rdx
addq $-0x4, %rdx
movq %rdx, 0x248(%rbx)
jmp 0x4b40c
callq 0xa8ec2
movl (%rax), %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ma_scan_restore_block_record:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov [rdi+0A0h], rsi
add rdi, 220h
mov r14, [rbx+220h]
mov r15, [rbx+280h]
mov edx, 60h ; '`'
mov rsi, r15
call _memcpy
mov [rbx+220h], r14
mov rsi, [r15]
mov rax, [rbx]
mov edx, [rax+7BCh]
add edx, edx
mov rdi, r14
call _memcpy
mov rax, [rbx+278h]
xor r14d, r14d
cmp rax, [rbx+3F0h]
jz short loc_4B40C
mov rax, [rbx]
mov rdi, [rax+600h]
lea rsi, [rbx+470h]
mov rdx, [rbx+270h]
shr rdx, 8
mov r8, [rbx+238h]
mov r9d, [rax+7D4h]
xor r14d, r14d
xor ecx, ecx
push 0
push 0
call pagecache_read
add rsp, 10h
test rax, rax
jz short loc_4B404
mov rax, [rbx+238h]
movzx ecx, byte ptr [rax+8]
mov [rbx+268h], ecx
mov rdx, [rbx]
mov edx, [rdx+7BCh]
add rdx, rax
shl ecx, 2
sub rdx, rcx
add rdx, 0FFFFFFFFFFFFFFFCh
mov [rbx+248h], rdx
jmp short loc_4B40C
loc_4B404:
call _my_thread_var
mov r14d, [rax]
loc_4B40C:
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long ma_scan_restore_block_record(_QWORD *a1, long long a2)
{
long long v3; // r14
_QWORD *v4; // r15
unsigned int v5; // r14d
long long v6; // rdi
long long v7; // rax
int v8; // ecx
a1[20] = a2;
v3 = a1[68];
v4 = (_QWORD *)a1[80];
memcpy(a1 + 68, v4, 96LL);
a1[68] = v3;
memcpy(v3, *v4, (unsigned int)(2 * *(_DWORD *)(*a1 + 1980LL)));
v5 = 0;
if ( a1[79] != a1[126] )
{
v6 = *(_QWORD *)(*a1 + 1536LL);
v5 = 0;
if ( pagecache_read(v6, (int)a1 + 1136, a1[78] >> 8, 0, a1[71], *(_DWORD *)(*a1 + 2004LL), 0, 0LL) )
{
v7 = a1[71];
v8 = *(unsigned __int8 *)(v7 + 8);
*((_DWORD *)a1 + 154) = v8;
a1[73] = v7 + *(unsigned int *)(*a1 + 1980LL) - (unsigned int)(4 * v8) - 4;
}
else
{
return *(unsigned int *)my_thread_var(v6);
}
}
return v5;
}
| _ma_scan_restore_block_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV qword ptr [RDI + 0xa0],RSI
ADD RDI,0x220
MOV R14,qword ptr [RBX + 0x220]
MOV R15,qword ptr [RBX + 0x280]
MOV EDX,0x60
MOV RSI,R15
CALL 0x0012a0a0
MOV qword ptr [RBX + 0x220],R14
MOV RSI,qword ptr [R15]
MOV RAX,qword ptr [RBX]
MOV EDX,dword ptr [RAX + 0x7bc]
ADD EDX,EDX
MOV RDI,R14
CALL 0x0012a0a0
MOV RAX,qword ptr [RBX + 0x278]
XOR R14D,R14D
CMP RAX,qword ptr [RBX + 0x3f0]
JZ 0x0014b40c
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + 0x600]
LEA RSI,[RBX + 0x470]
MOV RDX,qword ptr [RBX + 0x270]
SHR RDX,0x8
MOV R8,qword ptr [RBX + 0x238]
MOV R9D,dword ptr [RAX + 0x7d4]
XOR R14D,R14D
XOR ECX,ECX
PUSH 0x0
PUSH 0x0
CALL 0x00170b16
ADD RSP,0x10
TEST RAX,RAX
JZ 0x0014b404
MOV RAX,qword ptr [RBX + 0x238]
MOVZX ECX,byte ptr [RAX + 0x8]
MOV dword ptr [RBX + 0x268],ECX
MOV RDX,qword ptr [RBX]
MOV EDX,dword ptr [RDX + 0x7bc]
ADD RDX,RAX
SHL ECX,0x2
SUB RDX,RCX
ADD RDX,-0x4
MOV qword ptr [RBX + 0x248],RDX
JMP 0x0014b40c
LAB_0014b404:
CALL 0x001a8ec2
MOV R14D,dword ptr [RAX]
LAB_0014b40c:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 _ma_scan_restore_block_record(long *param_1,long param_2)
{
byte bVar1;
void *__dest;
int8 *__src;
long lVar2;
int4 *puVar3;
int4 uVar4;
param_1[0x14] = param_2;
__dest = (void *)param_1[0x44];
__src = (int8 *)param_1[0x50];
memcpy(param_1 + 0x44,__src,0x60);
param_1[0x44] = (long)__dest;
memcpy(__dest,(void *)*__src,(ulong)(uint)(*(int *)(*param_1 + 0x7bc) * 2));
uVar4 = 0;
if (param_1[0x4f] != param_1[0x7e]) {
uVar4 = 0;
lVar2 = pagecache_read(*(int8 *)(*param_1 + 0x600),param_1 + 0x8e,
(ulong)param_1[0x4e] >> 8,0,param_1[0x47],
*(int4 *)(*param_1 + 0x7d4),0,0);
if (lVar2 == 0) {
puVar3 = (int4 *)_my_thread_var();
uVar4 = *puVar3;
}
else {
bVar1 = *(byte *)(param_1[0x47] + 8);
*(uint *)(param_1 + 0x4d) = (uint)bVar1;
param_1[0x49] = (ulong)*(uint *)(*param_1 + 0x7bc) + param_1[0x47] + (ulong)bVar1 * -4 + -4;
}
}
return uVar4;
}
|
|
1,016 | my_delete | eloqsql/mysys/my_delete.c | int my_delete(const char *name, myf MyFlags)
{
int err;
DBUG_ENTER("my_delete");
DBUG_PRINT("my",("name %s MyFlags %lu", name, MyFlags));
#ifdef _WIN32
err = my_win_unlink(name);
#else
if (MyFlags & MY_NOSYMLINKS)
err= unlink_nosymlinks(name);
else
err= unlink(name);
#endif
if ((MyFlags & MY_IGNORE_ENOENT) && errno == ENOENT)
DBUG_RETURN(0);
if (err)
{
my_errno= errno;
if (MyFlags & (MY_FAE+MY_WME))
my_error(EE_DELETE, MYF(ME_BELL), name, errno);
}
else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(name, MyFlags))
err= -1;
DBUG_RETURN(err);
} | O3 | c | my_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
btl $0x9, %r14d
jb 0xa06cc
movq %rbx, %rdi
callq 0x291b0
movl %eax, %r15d
jmp 0xa0701
leaq -0x2c(%rbp), %rsi
movq %rbx, %rdi
callq 0xa5af0
testq %rax, %rax
je 0xa06fb
movl -0x2c(%rbp), %edi
movq %rax, %rsi
xorl %edx, %edx
callq 0x299e0
movl %eax, %r15d
movl -0x2c(%rbp), %edi
testl %edi, %edi
js 0xa0701
callq 0x291a0
jmp 0xa0701
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
testb $0x20, %r14b
je 0xa0711
callq 0x297b0
cmpl $0x2, (%rax)
je 0xa074f
testl %r15d, %r15d
je 0xa0749
callq 0x297b0
movq %rax, %r12
movl (%rax), %r13d
callq 0xa672a
movl %r13d, (%rax)
testb $0x18, %r14b
je 0xa0767
movl (%r12), %ecx
movl $0x4, %esi
movl $0x6, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xa091b
jmp 0xa0767
testw %r14w, %r14w
js 0xa0754
xorl %r15d, %r15d
jmp 0xa0767
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa624b
xorl %r15d, %r15d
negl %eax
sbbl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_delete:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
bt r14d, 9
jb short loc_A06CC
mov rdi, rbx
call _unlink
mov r15d, eax
jmp short loc_A0701
loc_A06CC:
lea rsi, [rbp+var_2C]
mov rdi, rbx
call my_open_parent_dir_nosymlinks
test rax, rax
jz short loc_A06FB
mov edi, [rbp+var_2C]
mov rsi, rax
xor edx, edx
call _unlinkat
mov r15d, eax
mov edi, [rbp+var_2C]
test edi, edi
js short loc_A0701
call _close
jmp short loc_A0701
loc_A06FB:
mov r15d, 0FFFFFFFFh
loc_A0701:
test r14b, 20h
jz short loc_A0711
call ___errno_location
cmp dword ptr [rax], 2
jz short loc_A074F
loc_A0711:
test r15d, r15d
jz short loc_A0749
call ___errno_location
mov r12, rax
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r14b, 18h
jz short loc_A0767
mov ecx, [r12]
mov esi, 4
mov edi, 6
mov rdx, rbx
xor eax, eax
call my_error
jmp short loc_A0767
loc_A0749:
test r14w, r14w
js short loc_A0754
loc_A074F:
xor r15d, r15d
jmp short loc_A0767
loc_A0754:
mov rdi, rbx
mov rsi, r14
call my_sync_dir_by_file
xor r15d, r15d
neg eax
sbb r15d, r15d
loc_A0767:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_delete(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rbx
unsigned int v4; // r15d
long long v5; // rax
_DWORD *v6; // r12
int v7; // r13d
int v8; // r8d
int v9; // r9d
unsigned int v11[11]; // [rsp+0h] [rbp-2Ch] BYREF
v11[0] = HIDWORD(v2);
v3 = a1;
if ( (a2 & 0x200) != 0 )
{
v5 = my_open_parent_dir_nosymlinks(a1, v11);
if ( v5 )
{
v4 = unlinkat(v11[0], v5, 0LL);
a1 = v11[0];
if ( (v11[0] & 0x80000000) == 0 )
close(v11[0]);
}
else
{
v4 = -1;
}
}
else
{
v4 = unlink(a1);
}
if ( (a2 & 0x20) != 0 && *(_DWORD *)__errno_location(a1) == 2 )
return 0;
if ( !v4 )
{
if ( (a2 & 0x8000u) != 0LL )
return (unsigned int)-((unsigned int)my_sync_dir_by_file(v3, a2) != 0);
return 0;
}
v6 = (_DWORD *)__errno_location(a1);
v7 = *v6;
*(_DWORD *)my_thread_var(a1) = v7;
if ( (a2 & 0x18) != 0 )
my_error(6, 4, v3, *v6, v8, v9);
return v4;
}
| my_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
BT R14D,0x9
JC 0x001a06cc
MOV RDI,RBX
CALL 0x001291b0
MOV R15D,EAX
JMP 0x001a0701
LAB_001a06cc:
LEA RSI,[RBP + -0x2c]
MOV RDI,RBX
CALL 0x001a5af0
TEST RAX,RAX
JZ 0x001a06fb
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,RAX
XOR EDX,EDX
CALL 0x001299e0
MOV R15D,EAX
MOV EDI,dword ptr [RBP + -0x2c]
TEST EDI,EDI
JS 0x001a0701
CALL 0x001291a0
JMP 0x001a0701
LAB_001a06fb:
MOV R15D,0xffffffff
LAB_001a0701:
TEST R14B,0x20
JZ 0x001a0711
CALL 0x001297b0
CMP dword ptr [RAX],0x2
JZ 0x001a074f
LAB_001a0711:
TEST R15D,R15D
JZ 0x001a0749
CALL 0x001297b0
MOV R12,RAX
MOV R13D,dword ptr [RAX]
CALL 0x001a672a
MOV dword ptr [RAX],R13D
TEST R14B,0x18
JZ 0x001a0767
MOV ECX,dword ptr [R12]
MOV ESI,0x4
MOV EDI,0x6
MOV RDX,RBX
XOR EAX,EAX
CALL 0x001a091b
JMP 0x001a0767
LAB_001a0749:
TEST R14W,R14W
JS 0x001a0754
LAB_001a074f:
XOR R15D,R15D
JMP 0x001a0767
LAB_001a0754:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001a624b
XOR R15D,R15D
NEG EAX
SBB R15D,R15D
LAB_001a0767:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_delete(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
int8 in_RAX;
char *__name;
int *piVar3;
int *piVar4;
int local_34;
local_34 = (int)((ulong)in_RAX >> 0x20);
if (((uint)param_2 >> 9 & 1) == 0) {
iVar2 = unlink(param_1);
}
else {
__name = (char *)my_open_parent_dir_nosymlinks(param_1,&local_34);
if (__name == (char *)0x0) {
iVar2 = -1;
}
else {
iVar2 = unlinkat(local_34,__name,0);
if (-1 < local_34) {
close(local_34);
}
}
}
if (((param_2 & 0x20) == 0) || (piVar3 = __errno_location(), *piVar3 != 2)) {
if (iVar2 != 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if ((param_2 & 0x18) == 0) {
return iVar2;
}
my_error(6,4,param_1,*piVar3);
return iVar2;
}
if ((short)param_2 < 0) {
iVar2 = my_sync_dir_by_file(param_1,param_2);
return -(uint)(iVar2 != 0);
}
}
return 0;
}
|
|
1,017 | nibble_cmp | corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c | static int nibble_cmp(nibbles_t nibbles, bytes_t path, int* path_n_len) {
int odd = (path.data[0] & 0x10) >> 4;
int nibbles_len = path.len * 2 - (odd ? 1 : 2);
*path_n_len = nibbles_len;
for (int i = 0; i < nibbles_len; i++) {
uint8_t pn = path.data[(i + 2 - odd) >> 1] >> ((i + odd) % 2 ? 0 : 4) & 0xf;
if (nibbles.len == i || nibbles.data[i] != pn)
return i;
}
return nibbles_len;
} | O0 | c | nibble_cmp:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x18(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x28(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x30(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
andl $0x10, %eax
sarl $0x4, %eax
movl %eax, -0x34(%rbp)
movl -0x28(%rbp), %eax
shll %eax
movl -0x34(%rbp), %esi
movl $0x2, %ecx
movl $0x1, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
subl %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x33cbd
movq -0x20(%rbp), %rax
movl -0x3c(%rbp), %ecx
addl $0x2, %ecx
subl -0x34(%rbp), %ecx
sarl %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
movl -0x3c(%rbp), %eax
addl -0x34(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl -0x44(%rbp), %eax
movl %edx, %esi
movl $0x4, %ecx
xorl %edx, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
sarl %cl, %eax
andl $0xf, %eax
movb %al, -0x3d(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x3c(%rbp), %eax
je 0x33ca8
movq -0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movzbl -0x3d(%rbp), %ecx
cmpl %ecx, %eax
je 0x33cb0
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x33cc3
jmp 0x33cb2
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x33c43
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| nibble_cmp:
push rbp
mov rbp, rsp
mov [rbp+var_18], edi
mov [rbp+var_10], rsi
mov [rbp+var_28], edx
mov [rbp+var_20], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
and eax, 10h
sar eax, 4
mov [rbp+var_34], eax
mov eax, [rbp+var_28]
shl eax, 1
mov esi, [rbp+var_34]
mov ecx, 2
mov edx, 1
cmp esi, 0
cmovnz ecx, edx
sub eax, ecx
mov [rbp+var_38], eax
mov ecx, [rbp+var_38]
mov rax, [rbp+var_30]
mov [rax], ecx
mov [rbp+var_3C], 0
loc_33C43:
mov eax, [rbp+var_3C]
cmp eax, [rbp+var_38]
jge short loc_33CBD
mov rax, [rbp+var_20]
mov ecx, [rbp+var_3C]
add ecx, 2
sub ecx, [rbp+var_34]
sar ecx, 1
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_44], eax
mov eax, [rbp+var_3C]
add eax, [rbp+var_34]
mov ecx, 2
cdq
idiv ecx
mov eax, [rbp+var_44]
mov esi, edx
mov ecx, 4
xor edx, edx
cmp esi, 0
cmovnz ecx, edx
sar eax, cl
and eax, 0Fh
mov [rbp+var_3D], al
mov eax, [rbp+var_18]
cmp eax, [rbp+var_3C]
jz short loc_33CA8
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_3C]
movzx eax, byte ptr [rax+rcx]
movzx ecx, [rbp+var_3D]
cmp eax, ecx
jz short loc_33CB0
loc_33CA8:
mov eax, [rbp+var_3C]
mov [rbp+var_4], eax
jmp short loc_33CC3
loc_33CB0:
jmp short $+2
loc_33CB2:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp short loc_33C43
loc_33CBD:
mov eax, [rbp+var_38]
mov [rbp+var_4], eax
loc_33CC3:
mov eax, [rbp+var_4]
pop rbp
retn
| long long nibble_cmp(int a1, long long a2, int a3, _BYTE *a4, _DWORD *a5)
{
int v5; // eax
int v6; // ecx
char v7; // cl
int i; // [rsp+8h] [rbp-3Ch]
int v10; // [rsp+Ch] [rbp-38h]
int v11; // [rsp+10h] [rbp-34h]
v11 = (*a4 & 0x10) >> 4;
v5 = 2 * a3;
v6 = 2;
if ( v11 )
v6 = 1;
v10 = v5 - v6;
*a5 = v5 - v6;
for ( i = 0; i < v10; ++i )
{
v7 = 4;
if ( (v11 + i) % 2 )
v7 = 0;
if ( a1 == i || *(_BYTE *)(a2 + i) != (((int)(unsigned __int8)a4[(i + 2 - v11) >> 1] >> v7) & 0xF) )
return (unsigned int)i;
}
return (unsigned int)v10;
}
| nibble_cmp:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x18],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x28],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x10
SAR EAX,0x4
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x28]
SHL EAX,0x1
MOV ESI,dword ptr [RBP + -0x34]
MOV ECX,0x2
MOV EDX,0x1
CMP ESI,0x0
CMOVNZ ECX,EDX
SUB EAX,ECX
MOV dword ptr [RBP + -0x38],EAX
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x3c],0x0
LAB_00133c43:
MOV EAX,dword ptr [RBP + -0x3c]
CMP EAX,dword ptr [RBP + -0x38]
JGE 0x00133cbd
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x3c]
ADD ECX,0x2
SUB ECX,dword ptr [RBP + -0x34]
SAR ECX,0x1
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,dword ptr [RBP + -0x34]
MOV ECX,0x2
CDQ
IDIV ECX
MOV EAX,dword ptr [RBP + -0x44]
MOV ESI,EDX
MOV ECX,0x4
XOR EDX,EDX
CMP ESI,0x0
CMOVNZ ECX,EDX
SAR EAX,CL
AND EAX,0xf
MOV byte ptr [RBP + -0x3d],AL
MOV EAX,dword ptr [RBP + -0x18]
CMP EAX,dword ptr [RBP + -0x3c]
JZ 0x00133ca8
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x3c]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOVZX ECX,byte ptr [RBP + -0x3d]
CMP EAX,ECX
JZ 0x00133cb0
LAB_00133ca8:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00133cc3
LAB_00133cb0:
JMP 0x00133cb2
LAB_00133cb2:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00133c43
LAB_00133cbd:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x4],EAX
LAB_00133cc3:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int nibble_cmp(int param_1,long param_2,int param_3,byte *param_4,int *param_5)
{
int iVar1;
int iVar2;
sbyte sVar3;
int local_44;
iVar1 = (int)(*param_4 & 0x10) >> 4;
iVar2 = 2;
if (iVar1 != 0) {
iVar2 = 1;
}
iVar2 = param_3 * 2 - iVar2;
*param_5 = iVar2;
local_44 = 0;
while( true ) {
if (iVar2 <= local_44) {
return iVar2;
}
sVar3 = 4;
if ((local_44 + iVar1) % 2 != 0) {
sVar3 = 0;
}
if ((param_1 == local_44) ||
(*(byte *)(param_2 + local_44) !=
((byte)((int)(uint)param_4[(local_44 + 2) - iVar1 >> 1] >> sVar3) & 0xf))) break;
local_44 = local_44 + 1;
}
return local_44;
}
|
|
1,018 | nibble_cmp | corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c | static int nibble_cmp(nibbles_t nibbles, bytes_t path, int* path_n_len) {
int odd = (path.data[0] & 0x10) >> 4;
int nibbles_len = path.len * 2 - (odd ? 1 : 2);
*path_n_len = nibbles_len;
for (int i = 0; i < nibbles_len; i++) {
uint8_t pn = path.data[(i + 2 - odd) >> 1] >> ((i + odd) % 2 ? 0 : 4) & 0xf;
if (nibbles.len == i || nibbles.data[i] != pn)
return i;
}
return nibbles_len;
} | O3 | c | nibble_cmp:
pushq %rbx
movq %rcx, %r9
movzbl (%rcx), %ecx
shrl $0x4, %ecx
movl %ecx, %r10d
andl $0x1, %r10d
cmpl $0x1, %r10d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
sbbl $0x0, %eax
leal (%rax,%rdx,2), %eax
movl %eax, (%r8)
testl %eax, %eax
setle %dl
testl %edi, %edi
sete %r8b
xorl %ebx, %ebx
orb %dl, %r8b
jne 0x2ce41
movl %edi, %edx
movl %eax, %edi
movl $0x2, %r8d
subq %r10, %r8
movzbl %cl, %r10d
andl $0x1, %r10d
shll $0x2, %r10d
decq %rdx
xorl %r11d, %r11d
leal (%r8,%r11), %ecx
shrl %ecx
movzbl (%r9,%rcx), %ebx
movl %r10d, %ecx
notb %cl
andb $0x4, %cl
shrl %cl, %ebx
andl $0xf, %ebx
movzbl (%rsi,%r11), %ecx
cmpl %ecx, %ebx
jne 0x2ce3e
leaq 0x1(%r11), %rbx
cmpq %rdi, %rbx
jae 0x2ce41
addl $0x4, %r10d
cmpq %r11, %rdx
movq %rbx, %r11
jne 0x2ce06
jmp 0x2ce41
movq %r11, %rbx
cmpl %eax, %ebx
cmovll %ebx, %eax
popq %rbx
retq
| nibble_cmp:
push rbx
mov r9, rcx
movzx ecx, byte ptr [rcx]
shr ecx, 4
mov r10d, ecx
and r10d, 1
cmp r10d, 1
mov eax, 0FFFFFFFFh
sbb eax, 0
lea eax, [rax+rdx*2]
mov [r8], eax
test eax, eax
setle dl
test edi, edi
setz r8b
xor ebx, ebx
or r8b, dl
jnz short loc_2CE41
mov edx, edi
mov edi, eax
mov r8d, 2
sub r8, r10
movzx r10d, cl
and r10d, 1
shl r10d, 2
dec rdx
xor r11d, r11d
loc_2CE06:
lea ecx, [r8+r11]
shr ecx, 1
movzx ebx, byte ptr [r9+rcx]
mov ecx, r10d
not cl
and cl, 4
shr ebx, cl
and ebx, 0Fh
movzx ecx, byte ptr [rsi+r11]
cmp ebx, ecx
jnz short loc_2CE3E
lea rbx, [r11+1]
cmp rbx, rdi
jnb short loc_2CE41
add r10d, 4
cmp rdx, r11
mov r11, rbx
jnz short loc_2CE06
jmp short loc_2CE41
loc_2CE3E:
mov rbx, r11
loc_2CE41:
cmp ebx, eax
cmovl eax, ebx
pop rbx
retn
| long long nibble_cmp(unsigned int a1, long long a2, int a3, unsigned __int8 *a4, _DWORD *a5)
{
int v6; // ecx
long long result; // rax
int v8; // ebx
char v9; // r10
long long v10; // r11
v6 = *a4 >> 4;
result = (unsigned int)((((v6 & 1 | 0xFFFFFFFF00000000LL) - 1) >> 32) + 2 * a3);
*a5 = result;
v8 = 0;
if ( (int)result > 0 && a1 != 0 )
{
v9 = 4 * (v6 & 1);
v10 = 0LL;
while ( ((a4[(2 - (v6 & 1) + (unsigned int)v10) >> 1] >> (~v9 & 4)) & 0xF) == *(_BYTE *)(a2 + v10) )
{
v8 = v10 + 1;
if ( v10 + 1 < (unsigned long long)(unsigned int)result )
{
v9 += 4;
if ( a1 - 1LL != v10++ )
continue;
}
goto LABEL_8;
}
v8 = v10;
}
LABEL_8:
if ( v8 < (int)result )
return (unsigned int)v8;
return result;
}
| nibble_cmp:
PUSH RBX
MOV R9,RCX
MOVZX ECX,byte ptr [RCX]
SHR ECX,0x4
MOV R10D,ECX
AND R10D,0x1
CMP R10D,0x1
MOV EAX,0xffffffff
SBB EAX,0x0
LEA EAX,[RAX + RDX*0x2]
MOV dword ptr [R8],EAX
TEST EAX,EAX
SETLE DL
TEST EDI,EDI
SETZ R8B
XOR EBX,EBX
OR R8B,DL
JNZ 0x0012ce41
MOV EDX,EDI
MOV EDI,EAX
MOV R8D,0x2
SUB R8,R10
MOVZX R10D,CL
AND R10D,0x1
SHL R10D,0x2
DEC RDX
XOR R11D,R11D
LAB_0012ce06:
LEA ECX,[R8 + R11*0x1]
SHR ECX,0x1
MOVZX EBX,byte ptr [R9 + RCX*0x1]
MOV ECX,R10D
NOT CL
AND CL,0x4
SHR EBX,CL
AND EBX,0xf
MOVZX ECX,byte ptr [RSI + R11*0x1]
CMP EBX,ECX
JNZ 0x0012ce3e
LEA RBX,[R11 + 0x1]
CMP RBX,RDI
JNC 0x0012ce41
ADD R10D,0x4
CMP RDX,R11
MOV R11,RBX
JNZ 0x0012ce06
JMP 0x0012ce41
LAB_0012ce3e:
MOV RBX,R11
LAB_0012ce41:
CMP EBX,EAX
CMOVL EAX,EBX
POP RBX
RET
|
ulong nibble_cmp(uint param_1,long param_2,int param_3,byte *param_4,uint *param_5)
{
uint uVar1;
byte bVar2;
ulong uVar3;
ulong uVar4;
int iVar5;
ulong uVar6;
bool bVar7;
bVar2 = *param_4 >> 4;
uVar1 = (-1 - (uint)((bVar2 & 1) == 0)) + param_3 * 2;
uVar3 = (ulong)uVar1;
*param_5 = uVar1;
uVar4 = 0;
if (param_1 != 0 && 0 < (int)uVar1) {
iVar5 = (bVar2 & 1) << 2;
uVar6 = 0;
do {
uVar4 = uVar6;
if (((param_4[(2 - (bVar2 & 1)) + (int)uVar6 >> 1] >> (~(byte)iVar5 & 4) & 0xf) !=
*(byte *)(param_2 + uVar6)) || (uVar4 = uVar6 + 1, uVar1 <= uVar4)) break;
iVar5 = iVar5 + 4;
bVar7 = (ulong)param_1 - 1 != uVar6;
uVar6 = uVar4;
} while (bVar7);
}
if ((int)uVar4 < (int)uVar1) {
uVar3 = uVar4 & 0xffffffff;
}
return uVar3;
}
|
|
1,019 | mysql_list_processes_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_list_processes_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_list_processes,
(parms->mysql),
parms->mysql,
MYSQL_RES *,
r_ptr)
} | O3 | c | mysql_list_processes_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq 0x480(%rdi), %rax
movq 0x28(%rax), %rbx
callq 0x1e781
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_list_processes_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdi, [rdi]
mov rax, [rdi+480h]
mov rbx, [rax+28h]
call mysql_list_processes
mov [rbx+8], rax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_list_processes_start_internal(long long *a1)
{
long long v1; // rdi
long long v2; // rbx
long long result; // rax
v1 = *a1;
v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL);
result = mysql_list_processes(v1);
*(_QWORD *)(v2 + 8) = result;
*(_DWORD *)v2 = 0;
return result;
}
| mysql_list_processes_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x480]
MOV RBX,qword ptr [RAX + 0x28]
CALL 0x0011e781
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_list_processes_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_list_processes();
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
1,020 | LefDefParser::lefiCorrectionEdge::addResistance() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiCrossTalk.cpp | void
lefiCorrectionEdge::addResistance()
{
lefiCorrectionResistance *r;
if (numResistances_ == resistancesAllocated_) {
int max;
lefiCorrectionResistance **ne;
int i;
if (resistancesAllocated_ == 0) {
max = resistancesAllocated_ = 2;
numResistances_ = 0;
} else
max = resistancesAllocated_ = numResistances_ * 2;
ne = (lefiCorrectionResistance**) lefMalloc
(sizeof(lefiCorrectionResistance*) * max);
max /= 2;
for (i = 0; i < max; i++)
ne[i] = resistances_[i];
lefFree((char*) (resistances_));
resistances_ = ne;
}
r = (lefiCorrectionResistance*) lefMalloc(sizeof(lefiCorrectionResistance));
r->Init();
resistances_[numResistances_] = r;
numResistances_ += 1;
} | O0 | cpp | LefDefParser::lefiCorrectionEdge::addResistance():
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movl 0x8(%rcx), %eax
cmpl 0xc(%rcx), %eax
jne 0x1a576
movq 0x8(%rsp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x1a4e7
movq 0x8(%rsp), %rax
movl $0x2, 0xc(%rax)
movl $0x2, 0x24(%rsp)
movl $0x0, 0x8(%rax)
jmp 0x1a4f8
movq 0x8(%rsp), %rcx
movl 0x8(%rcx), %eax
shll %eax
movl %eax, 0xc(%rcx)
movl %eax, 0x24(%rsp)
movslq 0x24(%rsp), %rdi
shlq $0x3, %rdi
callq 0x359d0
movq %rax, 0x18(%rsp)
movl 0x24(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, 0x24(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x1a55a
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x18(%rsp), %rax
movslq 0x14(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x1a523
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x38c90
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, 0x10(%rax)
movl $0x20, %edi
callq 0x359d0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x19f10
movq 0x8(%rsp), %rax
movq 0x28(%rsp), %rsi
movq 0x10(%rax), %rcx
movslq 0x8(%rax), %rdx
movq %rsi, (%rcx,%rdx,8)
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser18lefiCorrectionEdge13addResistanceEv:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov rcx, [rsp+38h+var_8]
mov [rsp+38h+var_30], rcx
mov eax, [rcx+8]
cmp eax, [rcx+0Ch]
jnz loc_1A576
mov rax, [rsp+38h+var_30]
cmp dword ptr [rax+0Ch], 0
jnz short loc_1A4E7
mov rax, [rsp+38h+var_30]
mov dword ptr [rax+0Ch], 2
mov [rsp+38h+var_14], 2
mov dword ptr [rax+8], 0
jmp short loc_1A4F8
loc_1A4E7:
mov rcx, [rsp+38h+var_30]
mov eax, [rcx+8]
shl eax, 1
mov [rcx+0Ch], eax
mov [rsp+38h+var_14], eax
loc_1A4F8:
movsxd rdi, [rsp+38h+var_14]
shl rdi, 3; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+38h+var_20], rax
mov eax, [rsp+38h+var_14]
mov ecx, 2
cdq
idiv ecx
mov [rsp+38h+var_14], eax
mov [rsp+38h+var_24], 0
loc_1A523:
mov eax, [rsp+38h+var_24]
cmp eax, [rsp+38h+var_14]
jge short loc_1A55A
mov rax, [rsp+38h+var_30]
mov rax, [rax+10h]
movsxd rcx, [rsp+38h+var_24]
mov rdx, [rax+rcx*8]
mov rax, [rsp+38h+var_20]
movsxd rcx, [rsp+38h+var_24]
mov [rax+rcx*8], rdx
mov eax, [rsp+38h+var_24]
add eax, 1
mov [rsp+38h+var_24], eax
jmp short loc_1A523
loc_1A55A:
mov rax, [rsp+38h+var_30]
mov rdi, [rax+10h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rax, [rsp+38h+var_30]
mov rcx, [rsp+38h+var_20]
mov [rax+10h], rcx
loc_1A576:
mov edi, offset qword_20; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [rsp+38h+var_10], rax
mov rdi, [rsp+38h+var_10]; this
call _ZN12LefDefParser24lefiCorrectionResistance4InitEv; LefDefParser::lefiCorrectionResistance::Init(void)
mov rax, [rsp+38h+var_30]
mov rsi, [rsp+38h+var_10]
mov rcx, [rax+10h]
movsxd rdx, dword ptr [rax+8]
mov [rcx+rdx*8], rsi
mov ecx, [rax+8]
add ecx, 1
mov [rax+8], ecx
add rsp, 38h
retn
| LefDefParser::lefiCorrectionEdge * LefDefParser::lefiCorrectionEdge::addResistance(
LefDefParser::lefiCorrectionEdge *this,
void *a2)
{
int v2; // eax
LefDefParser::lefiCorrectionEdge *result; // rax
int i; // [rsp+14h] [rbp-24h]
long long v5; // [rsp+18h] [rbp-20h]
int v6; // [rsp+24h] [rbp-14h]
int v7; // [rsp+24h] [rbp-14h]
LefDefParser::lefiCorrectionResistance *v8; // [rsp+28h] [rbp-10h]
if ( *((_DWORD *)this + 2) == *((_DWORD *)this + 3) )
{
if ( *((_DWORD *)this + 3) )
{
v2 = 2 * *((_DWORD *)this + 2);
*((_DWORD *)this + 3) = v2;
v6 = v2;
}
else
{
*((_DWORD *)this + 3) = 2;
v6 = 2;
*((_DWORD *)this + 2) = 0;
}
v5 = LefDefParser::lefMalloc((LefDefParser *)(8LL * v6), (unsigned long long)a2);
v7 = v6 / 2;
for ( i = 0; i < v7; ++i )
*(_QWORD *)(v5 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 2) + 8LL * i);
LefDefParser::lefFree(*((LefDefParser **)this + 2), a2);
*((_QWORD *)this + 2) = v5;
}
v8 = (LefDefParser::lefiCorrectionResistance *)LefDefParser::lefMalloc(
(LefDefParser *)&qword_20,
(unsigned long long)a2);
LefDefParser::lefiCorrectionResistance::Init(v8, (unsigned long long)a2);
result = this;
*(_QWORD *)(*((_QWORD *)this + 2) + 8LL * (int)(*((_DWORD *)this + 2))++) = v8;
return result;
}
| addResistance:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RCX
MOV EAX,dword ptr [RCX + 0x8]
CMP EAX,dword ptr [RCX + 0xc]
JNZ 0x0011a576
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0xc],0x0
JNZ 0x0011a4e7
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0xc],0x2
MOV dword ptr [RSP + 0x24],0x2
MOV dword ptr [RAX + 0x8],0x0
JMP 0x0011a4f8
LAB_0011a4e7:
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RCX + 0x8]
SHL EAX,0x1
MOV dword ptr [RCX + 0xc],EAX
MOV dword ptr [RSP + 0x24],EAX
LAB_0011a4f8:
MOVSXD RDI,dword ptr [RSP + 0x24]
SHL RDI,0x3
CALL 0x001359d0
MOV qword ptr [RSP + 0x18],RAX
MOV EAX,dword ptr [RSP + 0x24]
MOV ECX,0x2
CDQ
IDIV ECX
MOV dword ptr [RSP + 0x24],EAX
MOV dword ptr [RSP + 0x14],0x0
LAB_0011a523:
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,dword ptr [RSP + 0x24]
JGE 0x0011a55a
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x14]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RSP + 0x14]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x0011a523
LAB_0011a55a:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00138c90
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x10],RCX
LAB_0011a576:
MOV EDI,0x20
CALL 0x001359d0
MOV qword ptr [RSP + 0x28],RAX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00119f10
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RAX + 0x10]
MOVSXD RDX,dword ptr [RAX + 0x8]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV ECX,dword ptr [RAX + 0x8]
ADD ECX,0x1
MOV dword ptr [RAX + 0x8],ECX
ADD RSP,0x38
RET
|
/* LefDefParser::lefiCorrectionEdge::addResistance() */
void __thiscall LefDefParser::lefiCorrectionEdge::addResistance(lefiCorrectionEdge *this)
{
long lVar1;
lefiCorrectionResistance *this_00;
int local_24;
int local_14;
if (*(int *)(this + 8) == *(int *)(this + 0xc)) {
if (*(int *)(this + 0xc) == 0) {
*(int4 *)(this + 0xc) = 2;
local_14 = 2;
*(int4 *)(this + 8) = 0;
}
else {
local_14 = *(int *)(this + 8) << 1;
*(int *)(this + 0xc) = local_14;
}
lVar1 = lefMalloc((long)local_14 << 3);
for (local_24 = 0; local_24 < local_14 / 2; local_24 = local_24 + 1) {
*(int8 *)(lVar1 + (long)local_24 * 8) =
*(int8 *)(*(long *)(this + 0x10) + (long)local_24 * 8);
}
lefFree(*(void **)(this + 0x10));
*(long *)(this + 0x10) = lVar1;
}
this_00 = (lefiCorrectionResistance *)lefMalloc(0x20);
lefiCorrectionResistance::Init(this_00);
*(lefiCorrectionResistance **)(*(long *)(this + 0x10) + (long)*(int *)(this + 8) * 8) = this_00;
*(int *)(this + 8) = *(int *)(this + 8) + 1;
return;
}
|
|
1,021 | LefDefParser::lefiCorrectionEdge::addResistance() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiCrossTalk.cpp | void
lefiCorrectionEdge::addResistance()
{
lefiCorrectionResistance *r;
if (numResistances_ == resistancesAllocated_) {
int max;
lefiCorrectionResistance **ne;
int i;
if (resistancesAllocated_ == 0) {
max = resistancesAllocated_ = 2;
numResistances_ = 0;
} else
max = resistancesAllocated_ = numResistances_ * 2;
ne = (lefiCorrectionResistance**) lefMalloc
(sizeof(lefiCorrectionResistance*) * max);
max /= 2;
for (i = 0; i < max; i++)
ne[i] = resistances_[i];
lefFree((char*) (resistances_));
resistances_ = ne;
}
r = (lefiCorrectionResistance*) lefMalloc(sizeof(lefiCorrectionResistance));
r->Init();
resistances_[numResistances_] = r;
numResistances_ += 1;
} | O3 | cpp | LefDefParser::lefiCorrectionEdge::addResistance():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl 0xc(%rdi), %eax
jne 0x15f59
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x2, %eax
cmovnel %ecx, %eax
movl %eax, 0xc(%rbx)
movslq %eax, %r15
leaq (,%r15,8), %rdi
callq 0x24985
movq %rax, %r14
sarl %r15d
testl %r15d, %r15d
jle 0x15f4c
movl %r15d, %eax
xorl %ecx, %ecx
movq 0x10(%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
movq %rdx, (%r14,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x15f38
movq 0x10(%rbx), %rdi
callq 0x26040
movq %r14, 0x10(%rbx)
movl $0x20, %edi
callq 0x24985
movq %rax, %r14
movabsq $0x100000000, %rax # imm = 0x100000000
movq %rax, (%r14)
movl $0x8, %edi
callq 0x24985
movq %rax, 0x8(%r14)
movabsq $0x200000000, %rax # imm = 0x200000000
movq %rax, 0x10(%r14)
movl $0x10, %edi
callq 0x24985
movq %rax, 0x18(%r14)
movq 0x10(%rbx), %rax
movslq 0x8(%rbx), %rcx
movq %r14, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN12LefDefParser18lefiCorrectionEdge13addResistanceEv:
push r15
push r14
push rbx
mov rbx, rdi
mov eax, [rdi+8]
cmp eax, [rdi+0Ch]
jnz short loc_15F59
lea ecx, [rax+rax]
test eax, eax
mov eax, 2
cmovnz eax, ecx
mov [rbx+0Ch], eax
movsxd r15, eax
lea rdi, ds:0[r15*8]; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r14, rax
sar r15d, 1
test r15d, r15d
jle short loc_15F4C
mov eax, r15d
xor ecx, ecx
loc_15F38:
mov rdx, [rbx+10h]
mov rdx, [rdx+rcx*8]
mov [r14+rcx*8], rdx
inc rcx
cmp rax, rcx
jnz short loc_15F38
loc_15F4C:
mov rdi, [rbx+10h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov [rbx+10h], r14
loc_15F59:
mov edi, offset qword_20; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r14, rax
mov rax, 100000000h
mov [r14], rax
mov edi, offset byte_8; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [r14+8], rax
mov rax, 200000000h
mov [r14+10h], rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [r14+18h], rax
mov rax, [rbx+10h]
movsxd rcx, dword ptr [rbx+8]
mov [rax+rcx*8], r14
lea eax, [rcx+1]
mov [rbx+8], eax
pop rbx
pop r14
pop r15
retn
| long long LefDefParser::lefiCorrectionEdge::addResistance(LefDefParser::lefiCorrectionEdge *this, void *a2)
{
int v2; // eax
int v3; // ecx
bool v4; // zf
int v5; // eax
int v6; // r15d
long long v7; // r14
int v8; // r15d
long long i; // rcx
_QWORD *v10; // r14
long long v11; // rcx
long long result; // rax
v2 = *((_DWORD *)this + 2);
if ( v2 == *((_DWORD *)this + 3) )
{
v3 = 2 * v2;
v4 = v2 == 0;
v5 = 2;
if ( !v4 )
v5 = v3;
*((_DWORD *)this + 3) = v5;
v6 = v5;
v7 = LefDefParser::lefMalloc((LefDefParser *)(8LL * v5), (unsigned long long)a2);
v8 = v6 >> 1;
if ( v8 > 0 )
{
for ( i = 0LL; i != v8; ++i )
*(_QWORD *)(v7 + 8 * i) = *(_QWORD *)(*((_QWORD *)this + 2) + 8 * i);
}
LefDefParser::lefFree(*((LefDefParser **)this + 2), a2);
*((_QWORD *)this + 2) = v7;
}
v10 = (_QWORD *)LefDefParser::lefMalloc((LefDefParser *)&qword_20, (unsigned long long)a2);
*v10 = 0x100000000LL;
v10[1] = LefDefParser::lefMalloc((LefDefParser *)&byte_8, (unsigned long long)a2);
v10[2] = 0x200000000LL;
v10[3] = LefDefParser::lefMalloc((LefDefParser *)&word_10, (unsigned long long)a2);
v11 = *((int *)this + 2);
*(_QWORD *)(*((_QWORD *)this + 2) + 8 * v11) = v10;
result = (unsigned int)(v11 + 1);
*((_DWORD *)this + 2) = result;
return result;
}
| addResistance:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x8]
CMP EAX,dword ptr [RDI + 0xc]
JNZ 0x00115f59
LEA ECX,[RAX + RAX*0x1]
TEST EAX,EAX
MOV EAX,0x2
CMOVNZ EAX,ECX
MOV dword ptr [RBX + 0xc],EAX
MOVSXD R15,EAX
LEA RDI,[R15*0x8]
CALL 0x00124985
MOV R14,RAX
SAR R15D,0x1
TEST R15D,R15D
JLE 0x00115f4c
MOV EAX,R15D
XOR ECX,ECX
LAB_00115f38:
MOV RDX,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RDX + RCX*0x8]
MOV qword ptr [R14 + RCX*0x8],RDX
INC RCX
CMP RAX,RCX
JNZ 0x00115f38
LAB_00115f4c:
MOV RDI,qword ptr [RBX + 0x10]
CALL 0x00126040
MOV qword ptr [RBX + 0x10],R14
LAB_00115f59:
MOV EDI,0x20
CALL 0x00124985
MOV R14,RAX
MOV RAX,0x100000000
MOV qword ptr [R14],RAX
MOV EDI,0x8
CALL 0x00124985
MOV qword ptr [R14 + 0x8],RAX
MOV RAX,0x200000000
MOV qword ptr [R14 + 0x10],RAX
MOV EDI,0x10
CALL 0x00124985
MOV qword ptr [R14 + 0x18],RAX
MOV RAX,qword ptr [RBX + 0x10]
MOVSXD RCX,dword ptr [RBX + 0x8]
MOV qword ptr [RAX + RCX*0x8],R14
LEA EAX,[RCX + 0x1]
MOV dword ptr [RBX + 0x8],EAX
POP RBX
POP R14
POP R15
RET
|
/* LefDefParser::lefiCorrectionEdge::addResistance() */
void LefDefParser::lefiCorrectionEdge::addResistance(void)
{
int iVar1;
int iVar2;
long lVar3;
int8 *puVar4;
int8 uVar5;
ulong uVar6;
ulong in_RSI;
long in_RDI;
iVar1 = *(int *)(in_RDI + 8);
if (iVar1 == *(int *)(in_RDI + 0xc)) {
iVar2 = 2;
if (iVar1 != 0) {
iVar2 = iVar1 * 2;
}
*(int *)(in_RDI + 0xc) = iVar2;
lVar3 = lefMalloc((LefDefParser *)((long)iVar2 * 8),in_RSI);
if (0 < iVar2 >> 1) {
uVar6 = 0;
do {
*(int8 *)(lVar3 + uVar6 * 8) = *(int8 *)(*(long *)(in_RDI + 0x10) + uVar6 * 8);
uVar6 = uVar6 + 1;
} while ((uint)(iVar2 >> 1) != uVar6);
}
lefFree(*(void **)(in_RDI + 0x10));
*(long *)(in_RDI + 0x10) = lVar3;
}
puVar4 = (int8 *)lefMalloc((LefDefParser *)0x20,in_RSI);
*puVar4 = 0x100000000;
uVar5 = lefMalloc((LefDefParser *)0x8,in_RSI);
puVar4[1] = uVar5;
puVar4[2] = 0x200000000;
uVar5 = lefMalloc((LefDefParser *)0x10,in_RSI);
puVar4[3] = uVar5;
iVar1 = *(int *)(in_RDI + 8);
*(int8 **)(*(long *)(in_RDI + 0x10) + (long)iVar1 * 8) = puVar4;
*(int *)(in_RDI + 8) = iVar1 + 1;
return;
}
|
|
1,022 | auth_old_password | eloqsql/libmariadb/plugins/auth/old_password.c | static int auth_old_password(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
{
uchar *pkt;
int pkt_len;
if (((MCPVIO_EXT *)vio)->mysql_change_user)
{
/*
in mysql_change_user() the client sends the first packet.
we use the old scramble.
*/
pkt= (uchar*)mysql->scramble_buff;
}
else
{
/* read the scramble */
if ((pkt_len= vio->read_packet(vio, &pkt)) < 0)
return CR_ERROR;
if (pkt_len != SCRAMBLE_LENGTH_323 + 1 &&
pkt_len != SCRAMBLE_LENGTH + 1)
return CR_SERVER_HANDSHAKE_ERR;
/* save it in MYSQL */
memmove(mysql->scramble_buff, pkt, pkt_len - 1);
mysql->scramble_buff[pkt_len - 1] = 0;
}
if (mysql && mysql->passwd[0])
{
char scrambled[SCRAMBLE_LENGTH_323 + 1];
ma_scramble_323(scrambled, (char*)pkt, mysql->passwd);
if (vio->write_packet(vio, (uchar*)scrambled, SCRAMBLE_LENGTH_323 + 1))
return CR_ERROR;
}
else
if (vio->write_packet(vio, 0, 0)) /* no password */
return CR_ERROR;
return CR_OK;
} | O0 | c | auth_old_password:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x48(%rax)
je 0x45827
movq -0x28(%rbp), %rax
addq $0x48e, %rax # imm = 0x48E
movq %rax, -0x30(%rbp)
jmp 0x45896
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jge 0x4584c
movl $0x0, -0x18(%rbp)
jmp 0x4591a
cmpl $0x9, -0x34(%rbp)
je 0x45864
cmpl $0x15, -0x34(%rbp)
je 0x45864
movl $0x7dc, -0x18(%rbp) # imm = 0x7DC
jmp 0x4591a
movq -0x28(%rbp), %rdi
addq $0x48e, %rdi # imm = 0x48E
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
callq 0x136f0
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, 0x48e(%rax,%rcx)
cmpq $0x0, -0x28(%rbp)
je 0x458ef
movq -0x28(%rbp), %rax
movq 0x2c0(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x458ef
leaq -0x11(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rax
movq 0x2c0(%rax), %rdx
callq 0x4cde0
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rdi
leaq -0x11(%rbp), %rsi
movl $0x9, %edx
callq *%rax
cmpl $0x0, %eax
je 0x458ed
movl $0x0, -0x18(%rbp)
jmp 0x4591a
jmp 0x45913
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
xorl %edx, %edx
callq *%rax
cmpl $0x0, %eax
je 0x45911
movl $0x0, -0x18(%rbp)
jmp 0x4591a
jmp 0x45913
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
movl -0x18(%rbp), %eax
movl %eax, -0x38(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4593b
movl -0x38(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
callq 0x134b0
| auth_old_password:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov rax, [rbp+var_20]
cmp byte ptr [rax+48h], 0
jz short loc_45827
mov rax, [rbp+var_28]
add rax, 48Eh
mov [rbp+var_30], rax
jmp short loc_45896
loc_45827:
mov rax, [rbp+var_20]
mov rax, [rax]
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_30]
call rax
mov [rbp+var_34], eax
cmp eax, 0
jge short loc_4584C
mov [rbp+var_18], 0
jmp loc_4591A
loc_4584C:
cmp [rbp+var_34], 9
jz short loc_45864
cmp [rbp+var_34], 15h
jz short loc_45864
mov [rbp+var_18], 7DCh
jmp loc_4591A
loc_45864:
mov rdi, [rbp+var_28]
add rdi, 48Eh
mov rsi, [rbp+var_30]
mov eax, [rbp+var_34]
sub eax, 1
movsxd rdx, eax
call _memmove
mov rax, [rbp+var_28]
mov ecx, [rbp+var_34]
sub ecx, 1
movsxd rcx, ecx
mov byte ptr [rax+rcx+48Eh], 0
loc_45896:
cmp [rbp+var_28], 0
jz short loc_458EF
mov rax, [rbp+var_28]
mov rax, [rax+2C0h]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_458EF
lea rdi, [rbp+var_11]
mov rsi, [rbp+var_30]
mov rax, [rbp+var_28]
mov rdx, [rax+2C0h]
call ma_scramble_323
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_11]
mov edx, 9
call rax
cmp eax, 0
jz short loc_458ED
mov [rbp+var_18], 0
jmp short loc_4591A
loc_458ED:
jmp short loc_45913
loc_458EF:
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rdi, [rbp+var_20]
xor ecx, ecx
mov esi, ecx
xor edx, edx
call rax
cmp eax, 0
jz short loc_45911
mov [rbp+var_18], 0
jmp short loc_4591A
loc_45911:
jmp short $+2
loc_45913:
mov [rbp+var_18], 0FFFFFFFFh
loc_4591A:
mov eax, [rbp+var_18]
mov [rbp+var_38], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_4593B
mov eax, [rbp+var_38]
add rsp, 40h
pop rbp
retn
loc_4593B:
call ___stack_chk_fail
| long long auth_old_password(long long a1, long long a2)
{
int v3; // [rsp+Ch] [rbp-34h]
long long v4; // [rsp+10h] [rbp-30h] BYREF
long long v5; // [rsp+18h] [rbp-28h]
long long v6; // [rsp+20h] [rbp-20h]
_BYTE v8[9]; // [rsp+2Fh] [rbp-11h] BYREF
unsigned long long v9; // [rsp+38h] [rbp-8h]
v9 = __readfsqword(0x28u);
v6 = a1;
v5 = a2;
if ( *(_BYTE *)(a1 + 72) )
{
v4 = v5 + 1166;
LABEL_9:
if ( v5 && **(_BYTE **)(v5 + 704) )
{
ma_scramble_323(v8, v4, *(_QWORD *)(v5 + 704));
if ( (*(unsigned int ( **)(long long, _BYTE *, long long))(v6 + 8))(v6, v8, 9LL) )
return 0;
}
else if ( (*(unsigned int ( **)(long long, _QWORD, _QWORD))(v6 + 8))(v6, 0LL, 0LL) )
{
return 0;
}
return (unsigned int)-1;
}
v3 = (*(long long ( **)(long long, long long *))v6)(v6, &v4);
if ( v3 >= 0 )
{
if ( v3 == 9 || v3 == 21 )
{
memmove(v5 + 1166, v4, v3 - 1);
*(_BYTE *)(v5 + v3 - 1 + 1166) = 0;
goto LABEL_9;
}
return 2012;
}
else
{
return 0;
}
}
| auth_old_password:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x48],0x0
JZ 0x00145827
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x48e
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00145896
LAB_00145827:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x30]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JGE 0x0014584c
MOV dword ptr [RBP + -0x18],0x0
JMP 0x0014591a
LAB_0014584c:
CMP dword ptr [RBP + -0x34],0x9
JZ 0x00145864
CMP dword ptr [RBP + -0x34],0x15
JZ 0x00145864
MOV dword ptr [RBP + -0x18],0x7dc
JMP 0x0014591a
LAB_00145864:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x48e
MOV RSI,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x34]
SUB EAX,0x1
MOVSXD RDX,EAX
CALL 0x001136f0
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x34]
SUB ECX,0x1
MOVSXD RCX,ECX
MOV byte ptr [RAX + RCX*0x1 + 0x48e],0x0
LAB_00145896:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001458ef
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x2c0]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001458ef
LEA RDI,[RBP + -0x11]
MOV RSI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX + 0x2c0]
CALL 0x0014cde0
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x11]
MOV EDX,0x9
CALL RAX
CMP EAX,0x0
JZ 0x001458ed
MOV dword ptr [RBP + -0x18],0x0
JMP 0x0014591a
LAB_001458ed:
JMP 0x00145913
LAB_001458ef:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x20]
XOR ECX,ECX
MOV ESI,ECX
XOR EDX,EDX
CALL RAX
CMP EAX,0x0
JZ 0x00145911
MOV dword ptr [RBP + -0x18],0x0
JMP 0x0014591a
LAB_00145911:
JMP 0x00145913
LAB_00145913:
MOV dword ptr [RBP + -0x18],0xffffffff
LAB_0014591a:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0014593b
MOV EAX,dword ptr [RBP + -0x38]
ADD RSP,0x40
POP RBP
RET
LAB_0014593b:
CALL 0x001134b0
|
int4 auth_old_password(int8 *param_1,long param_2)
{
int iVar1;
long in_FS_OFFSET;
void *local_38;
long local_30;
int8 *local_28;
int4 local_20;
int1 local_19 [9];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_30 = param_2;
local_28 = param_1;
if (*(char *)(param_1 + 9) == '\0') {
iVar1 = (*(code *)*param_1)(param_1,&local_38);
if (iVar1 < 0) {
local_20 = 0;
goto LAB_0014591a;
}
if ((iVar1 != 9) && (iVar1 != 0x15)) {
local_20 = 0x7dc;
goto LAB_0014591a;
}
memmove((void *)(local_30 + 0x48e),local_38,(long)(iVar1 + -1));
*(int1 *)(local_30 + 0x48e + (long)(iVar1 + -1)) = 0;
}
else {
local_38 = (void *)(param_2 + 0x48e);
}
if ((local_30 == 0) || (**(char **)(local_30 + 0x2c0) == '\0')) {
iVar1 = (*(code *)local_28[1])(local_28,0,0);
if (iVar1 != 0) {
local_20 = 0;
goto LAB_0014591a;
}
}
else {
ma_scramble_323(local_19,local_38,*(int8 *)(local_30 + 0x2c0));
iVar1 = (*(code *)local_28[1])(local_28,local_19,9);
if (iVar1 != 0) {
local_20 = 0;
goto LAB_0014591a;
}
}
local_20 = 0xffffffff;
LAB_0014591a:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_20;
}
|
|
1,023 | auth_old_password | eloqsql/libmariadb/plugins/auth/old_password.c | static int auth_old_password(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
{
uchar *pkt;
int pkt_len;
if (((MCPVIO_EXT *)vio)->mysql_change_user)
{
/*
in mysql_change_user() the client sends the first packet.
we use the old scramble.
*/
pkt= (uchar*)mysql->scramble_buff;
}
else
{
/* read the scramble */
if ((pkt_len= vio->read_packet(vio, &pkt)) < 0)
return CR_ERROR;
if (pkt_len != SCRAMBLE_LENGTH_323 + 1 &&
pkt_len != SCRAMBLE_LENGTH + 1)
return CR_SERVER_HANDSHAKE_ERR;
/* save it in MYSQL */
memmove(mysql->scramble_buff, pkt, pkt_len - 1);
mysql->scramble_buff[pkt_len - 1] = 0;
}
if (mysql && mysql->passwd[0])
{
char scrambled[SCRAMBLE_LENGTH_323 + 1];
ma_scramble_323(scrambled, (char*)pkt, mysql->passwd);
if (vio->write_packet(vio, (uchar*)scrambled, SCRAMBLE_LENGTH_323 + 1))
return CR_ERROR;
}
else
if (vio->write_packet(vio, 0, 0)) /* no password */
return CR_ERROR;
return CR_OK;
} | O3 | c | auth_old_password:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
cmpb $0x0, 0x48(%rdi)
je 0x317da
leaq 0x48e(%r14), %rax
movq %rax, -0x40(%rbp)
testq %r14, %r14
jne 0x3181a
jmp 0x3184d
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq *(%rbx)
testl %eax, %eax
js 0x31848
movl %eax, %r12d
cmpl $0x15, %eax
je 0x317fb
movl $0x7dc, %r15d # imm = 0x7DC
cmpl $0x9, %r12d
jne 0x31864
leaq 0x48e(%r14), %rdi
movq -0x40(%rbp), %rsi
decl %r12d
movq %r12, %rdx
callq 0x13720
movb $0x0, 0x48e(%r14,%r12)
movq 0x2c0(%r14), %rdx
cmpb $0x0, (%rdx)
je 0x3184d
movq -0x40(%rbp), %rsi
leaq -0x31(%rbp), %r14
movq %r14, %rdi
callq 0x35806
movq %rbx, %rdi
movq %r14, %rsi
movl $0x9, %edx
callq *0x8(%rbx)
testl %eax, %eax
je 0x3185e
xorl %r15d, %r15d
jmp 0x31864
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq *0x8(%rbx)
testl %eax, %eax
jne 0x31864
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x31883
movl %r15d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x13500
| auth_old_password:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
cmp byte ptr [rdi+48h], 0
jz short loc_317DA
lea rax, [r14+48Eh]
mov [rbp+var_40], rax
test r14, r14
jnz short loc_3181A
jmp short loc_3184D
loc_317DA:
lea rsi, [rbp+var_40]
mov rdi, rbx
call qword ptr [rbx]
test eax, eax
js short loc_31848
mov r12d, eax
cmp eax, 15h
jz short loc_317FB
mov r15d, 7DCh
cmp r12d, 9
jnz short loc_31864
loc_317FB:
lea rdi, [r14+48Eh]
mov rsi, [rbp+var_40]
dec r12d
mov rdx, r12
call _memmove
mov byte ptr [r14+r12+48Eh], 0
loc_3181A:
mov rdx, [r14+2C0h]
cmp byte ptr [rdx], 0
jz short loc_3184D
mov rsi, [rbp+var_40]
lea r14, [rbp+var_31]
mov rdi, r14
call ma_scramble_323
mov rdi, rbx
mov rsi, r14
mov edx, 9
call qword ptr [rbx+8]
test eax, eax
jz short loc_3185E
loc_31848:
xor r15d, r15d
jmp short loc_31864
loc_3184D:
xor r15d, r15d
mov rdi, rbx
xor esi, esi
xor edx, edx
call qword ptr [rbx+8]
test eax, eax
jnz short loc_31864
loc_3185E:
mov r15d, 0FFFFFFFFh
loc_31864:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_31883
mov eax, r15d
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_31883:
call ___stack_chk_fail
| long long auth_old_password(long long a1, long long a2)
{
int v2; // eax
unsigned int v3; // r15d
unsigned int v4; // r12d
long long v6; // [rsp+0h] [rbp-40h] BYREF
_BYTE v7[9]; // [rsp+Fh] [rbp-31h] BYREF
unsigned long long v8; // [rsp+18h] [rbp-28h]
v8 = __readfsqword(0x28u);
if ( !*(_BYTE *)(a1 + 72) )
{
v2 = (*(long long ( **)(long long, long long *))a1)(a1, &v6);
if ( v2 < 0 )
return 0;
if ( v2 != 21 )
{
v3 = 2012;
if ( v2 != 9 )
return v3;
}
v4 = v2 - 1;
memmove(a2 + 1166, v6, (unsigned int)(v2 - 1));
*(_BYTE *)(a2 + v4 + 1166) = 0;
LABEL_8:
if ( !**(_BYTE **)(a2 + 704) )
goto LABEL_11;
ma_scramble_323(v7, v6);
if ( !(*(unsigned int ( **)(long long, _BYTE *, long long))(a1 + 8))(a1, v7, 9LL) )
return (unsigned int)-1;
return 0;
}
v6 = a2 + 1166;
if ( a2 )
goto LABEL_8;
LABEL_11:
v3 = 0;
if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD))(a1 + 8))(a1, 0LL, 0LL) )
return (unsigned int)-1;
return v3;
}
| auth_old_password:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
CMP byte ptr [RDI + 0x48],0x0
JZ 0x001317da
LEA RAX,[R14 + 0x48e]
MOV qword ptr [RBP + -0x40],RAX
TEST R14,R14
JNZ 0x0013181a
JMP 0x0013184d
LAB_001317da:
LEA RSI,[RBP + -0x40]
MOV RDI,RBX
CALL qword ptr [RBX]
TEST EAX,EAX
JS 0x00131848
MOV R12D,EAX
CMP EAX,0x15
JZ 0x001317fb
MOV R15D,0x7dc
CMP R12D,0x9
JNZ 0x00131864
LAB_001317fb:
LEA RDI,[R14 + 0x48e]
MOV RSI,qword ptr [RBP + -0x40]
DEC R12D
MOV RDX,R12
CALL 0x00113720
MOV byte ptr [R14 + R12*0x1 + 0x48e],0x0
LAB_0013181a:
MOV RDX,qword ptr [R14 + 0x2c0]
CMP byte ptr [RDX],0x0
JZ 0x0013184d
MOV RSI,qword ptr [RBP + -0x40]
LEA R14,[RBP + -0x31]
MOV RDI,R14
CALL 0x00135806
MOV RDI,RBX
MOV RSI,R14
MOV EDX,0x9
CALL qword ptr [RBX + 0x8]
TEST EAX,EAX
JZ 0x0013185e
LAB_00131848:
XOR R15D,R15D
JMP 0x00131864
LAB_0013184d:
XOR R15D,R15D
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL qword ptr [RBX + 0x8]
TEST EAX,EAX
JNZ 0x00131864
LAB_0013185e:
MOV R15D,0xffffffff
LAB_00131864:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00131883
MOV EAX,R15D
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00131883:
CALL 0x00113500
|
int8 auth_old_password(int8 *param_1,long param_2)
{
int iVar1;
int8 uVar2;
long in_FS_OFFSET;
void *local_48;
int1 local_39 [9];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
if (*(char *)(param_1 + 9) == '\0') {
iVar1 = (*(code *)*param_1)(param_1,&local_48);
if (-1 < iVar1) {
if ((iVar1 != 0x15) && (uVar2 = 0x7dc, iVar1 != 9)) goto LAB_00131864;
memmove((void *)(param_2 + 0x48e),local_48,(ulong)(iVar1 - 1));
*(int1 *)(param_2 + 0x48e + (ulong)(iVar1 - 1)) = 0;
goto LAB_0013181a;
}
LAB_00131848:
uVar2 = 0;
goto LAB_00131864;
}
local_48 = (void *)(param_2 + 0x48e);
if (param_2 == 0) {
LAB_0013184d:
uVar2 = 0;
iVar1 = (*(code *)param_1[1])(param_1,0,0);
if (iVar1 != 0) goto LAB_00131864;
}
else {
LAB_0013181a:
if (**(char **)(param_2 + 0x2c0) == '\0') goto LAB_0013184d;
ma_scramble_323(local_39,local_48);
iVar1 = (*(code *)param_1[1])(param_1,local_39,9);
if (iVar1 != 0) goto LAB_00131848;
}
uVar2 = 0xffffffff;
LAB_00131864:
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar2;
}
|
|
1,024 | free_small | seiftnesse[P]memoryallocator/src/custom_alloc_small.c | void free_small(void *ptr) {
if (!ptr || ptr < (void *) small_pool ||
ptr >= (void *) (small_pool + SMALL_POOL_SIZE)) {
HEAP_LOG("Invalid pointer for small free: %p\n", ptr);
return;
}
// Calculate block index
size_t offset = (uint8_t *) ptr - small_pool;
int start_block = offset / SMALL_BLOCK_SIZE;
HEAP_LOG("Freeing small allocation: ptr=%p, block=%d\n", ptr, start_block);
// First pass: Count blocks without freeing them
int blocks_to_free = 0;
size_t total_size_freed = 0;
// This loop just counts the blocks that will be freed
for (int i = 0; start_block + i < SMALL_POOL_SIZE / SMALL_BLOCK_SIZE; i++) {
int bmap_idx = (start_block + i) / 32;
int bit_idx = (start_block + i) % 32;
// Check if this block is actually allocated
if (!(small_block_bitmap[bmap_idx] & (1 << bit_idx))) {
break;
}
blocks_to_free++;
total_size_freed += SMALL_BLOCK_SIZE;
}
// Apply zero-on-free according to configured depth
if (zero_on_free_depth > ZERO_DEPTH_NONE && blocks_to_free > 0) {
size_t user_size = blocks_to_free * SMALL_BLOCK_SIZE;
size_t zero_size = 0;
switch (zero_on_free_depth) {
case ZERO_DEPTH_SHALLOW:
// Zero only the first portion (headers/pointers)
zero_size = (shallow_zero_size < user_size) ? shallow_zero_size : user_size;
break;
case ZERO_DEPTH_MEDIUM:
// Zero half the memory
zero_size = user_size / 2;
break;
case ZERO_DEPTH_DEEP:
default:
// Zero all memory (most secure, but slowest)
zero_size = user_size;
break;
}
if (zero_size > 0) {
HEAP_LOG("Zeroing %zu bytes on small free at %p (depth=%d)\n",
zero_size, ptr, zero_on_free_depth);
_memset(ptr, 0, zero_size);
}
}
// Second pass: Now mark the blocks as free in the bitmap
for (int i = 0; i < blocks_to_free; i++) {
int block = start_block + i;
int bmap_idx = block / 32;
int bit_idx = block % 32;
small_block_bitmap[bmap_idx] &= ~(1 << bit_idx);
}
if (blocks_to_free > 0) {
// Update stats - ensure we don't underflow
if (allocation_stats.small_pool_used >= total_size_freed) {
allocation_stats.small_pool_used -= total_size_freed;
} else {
allocation_stats.small_pool_used = 0;
}
update_stats_free(total_size_freed);
HEAP_LOG("Small allocation freed: %d blocks, total size=%zu bytes\n",
blocks_to_free, total_size_freed);
} else {
HEAP_LOG("Warning: No blocks freed from small pool\n");
}
} | O3 | c | free_small:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x2bbb(%rip), %rax # 0x5100
cmpq %rax, %rdi
setb %cl
addq $0x100000, %rax # imm = 0x100000
cmpq %rax, %rdi
setae %al
orb %cl, %al
jne 0x2667
movq %rdi, %rbx
subq 0x2a67(%rip), %rbx # 0x4fd0
shrq $0x5, %rbx
cmpl $0x7fff, %ebx # imm = 0x7FFF
jg 0x2667
movl $0x8000, %eax # imm = 0x8000
subl %ebx, %eax
xorl %r12d, %r12d
leaq 0x4102b76(%rip), %r15 # 0x4105100
xorl %r14d, %r14d
movl %ebx, %ecx
addl %r12d, %ecx
leal 0x1f(%rbx,%r12), %edx
cmovnsl %ecx, %edx
sarl $0x5, %edx
movslq %edx, %rdx
movl (%r15,%rdx,4), %edx
btl %ecx, %edx
jae 0x25c6
addq $0x20, %r14
leal (%rbx,%r12), %ecx
incl %ecx
movl %r12d, %edx
incl %edx
movl %edx, %r12d
cmpl $0x8000, %ecx # imm = 0x8000
jne 0x258d
movl %eax, %r12d
leaq 0x4103b6b(%rip), %rax # 0x4106138
movl (%rax), %eax
testl %eax, %eax
jle 0x25fb
testl %r12d, %r12d
je 0x25fb
movl %r12d, %edx
shll $0x5, %edx
cmpl $0x2, %eax
je 0x2605
cmpl $0x1, %eax
jne 0x2607
leaq 0x2ad1(%rip), %rax # 0x50c0
movq (%rax), %rax
cmpq %rdx, %rax
cmovbq %rax, %rdx
jmp 0x2607
movl %r12d, %eax
testl %r12d, %r12d
jne 0x2616
jmp 0x2637
shrl %edx
testq %rdx, %rdx
je 0x2613
xorl %esi, %esi
callq 0x2c1a
movl %r12d, %eax
leal 0x1f(%rbx), %edx
testl %ebx, %ebx
cmovnsl %ebx, %edx
sarl $0x5, %edx
movl $0xfffffffe, %esi # imm = 0xFFFFFFFE
movl %ebx, %ecx
roll %cl, %esi
movslq %edx, %rcx
andl %esi, (%r15,%rcx,4)
incl %ebx
decl %eax
jne 0x2616
testl %r12d, %r12d
je 0x2667
leaq 0x4103abd(%rip), %rax # 0x4106100
movq 0x28(%rax), %rcx
xorl %edx, %edx
subq %r14, %rcx
cmovaeq %rcx, %rdx
movq %rdx, 0x28(%rax)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2e27
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| free_small:
push r15
push r14
push r12
push rbx
push rax
lea rax, small_pool
cmp rdi, rax
setb cl
add rax, 100000h
cmp rdi, rax
setnb al
or al, cl
jnz loc_2667
mov rbx, rdi
sub rbx, cs:small_pool_ptr
shr rbx, 5
cmp ebx, 7FFFh
jg loc_2667
mov eax, 8000h
sub eax, ebx
xor r12d, r12d
lea r15, small_block_bitmap
xor r14d, r14d
loc_258D:
mov ecx, ebx
add ecx, r12d
lea edx, [rbx+r12+1Fh]
cmovns edx, ecx
sar edx, 5
movsxd rdx, edx
mov edx, [r15+rdx*4]
bt edx, ecx
jnb short loc_25C6
add r14, 20h ; ' '
lea ecx, [rbx+r12]
inc ecx
mov edx, r12d
inc edx
mov r12d, edx
cmp ecx, 8000h
jnz short loc_258D
mov r12d, eax
loc_25C6:
lea rax, zero_on_free_depth
mov eax, [rax]
test eax, eax
jle short loc_25FB
test r12d, r12d
jz short loc_25FB
mov edx, r12d
shl edx, 5
cmp eax, 2
jz short loc_2605
cmp eax, 1
jnz short loc_2607
lea rax, shallow_zero_size
mov rax, [rax]
cmp rax, rdx
cmovb rdx, rax
jmp short loc_2607
loc_25FB:
mov eax, r12d
test r12d, r12d
jnz short loc_2616
jmp short loc_2637
loc_2605:
shr edx, 1
loc_2607:
test rdx, rdx
jz short loc_2613
xor esi, esi
call _memset
loc_2613:
mov eax, r12d
loc_2616:
lea edx, [rbx+1Fh]
test ebx, ebx
cmovns edx, ebx
sar edx, 5
mov esi, 0FFFFFFFEh
mov ecx, ebx
rol esi, cl
movsxd rcx, edx
and [r15+rcx*4], esi
inc ebx
dec eax
jnz short loc_2616
loc_2637:
test r12d, r12d
jz short loc_2667
lea rax, allocation_stats
mov rcx, [rax+28h]
xor edx, edx
sub rcx, r14
cmovnb rdx, rcx
mov [rax+28h], rdx
mov rdi, r14
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp update_stats_free
loc_2667:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long free_small(unsigned long long a1)
{
long long result; // rax
unsigned long long v2; // rbx
unsigned int v3; // r12d
unsigned long long v4; // r14
int v5; // edx
int v6; // edx
int v7; // ecx
unsigned long long v8; // rdx
unsigned long long v9; // rcx
long long v10; // rdx
bool v11; // cf
long long v12; // rcx
result = (long long)&small_pool + 0x100000;
LOBYTE(result) = a1 < (unsigned long long)&small_pool || a1 >= (unsigned long long)&small_pool + 0x100000;
if ( (_BYTE)result )
return result;
v2 = (a1 - (unsigned long long)&small_pool) >> 5;
if ( (int)v2 > 0x7FFF )
return result;
v3 = 0;
v4 = 0LL;
while ( 1 )
{
v5 = v2 + v3 + 31;
if ( (int)(v3 + v2) >= 0 )
v5 = v3 + v2;
v6 = small_block_bitmap[v5 >> 5];
if ( !_bittest(&v6, v3 + v2) )
break;
v4 += 32LL;
v7 = v2 + v3++ + 1;
if ( v7 == 0x8000 )
{
v3 = 0x8000 - v2;
break;
}
}
if ( zero_on_free_depth > 0 && v3 )
{
v8 = 32 * v3;
if ( zero_on_free_depth == 2 )
{
v8 = (unsigned int)v8 >> 1;
}
else if ( zero_on_free_depth == 1 && (unsigned long long)shallow_zero_size < v8 )
{
v8 = (unsigned long long)shallow_zero_size;
}
if ( v8 )
memset(a1, 0LL, v8);
LODWORD(result) = v3;
}
else
{
result = v3;
if ( !v3 )
goto LABEL_23;
}
do
{
small_block_bitmap[(int)v2 / 32] &= __ROL4__(-2, v2);
LODWORD(v2) = v2 + 1;
result = (unsigned int)(result - 1);
}
while ( (_DWORD)result );
LABEL_23:
if ( v3 )
{
v9 = *(&allocation_stats + 5);
v10 = 0LL;
v11 = v9 < v4;
v12 = v9 - v4;
if ( !v11 )
v10 = v12;
*(&allocation_stats + 5) = v10;
return update_stats_free(v4);
}
return result;
}
| free_small:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
LEA RAX,[0x105100]
CMP RDI,RAX
SETC CL
ADD RAX,0x100000
CMP RDI,RAX
SETNC AL
OR AL,CL
JNZ 0x00102667
MOV RBX,RDI
SUB RBX,qword ptr [0x00104fd0]
SHR RBX,0x5
CMP EBX,0x7fff
JG 0x00102667
MOV EAX,0x8000
SUB EAX,EBX
XOR R12D,R12D
LEA R15,[0x4205100]
XOR R14D,R14D
LAB_0010258d:
MOV ECX,EBX
ADD ECX,R12D
LEA EDX,[RBX + R12*0x1 + 0x1f]
CMOVNS EDX,ECX
SAR EDX,0x5
MOVSXD RDX,EDX
MOV EDX,dword ptr [R15 + RDX*0x4]
BT EDX,ECX
JNC 0x001025c6
ADD R14,0x20
LEA ECX,[RBX + R12*0x1]
INC ECX
MOV EDX,R12D
INC EDX
MOV R12D,EDX
CMP ECX,0x8000
JNZ 0x0010258d
MOV R12D,EAX
LAB_001025c6:
LEA RAX,[0x4206138]
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JLE 0x001025fb
TEST R12D,R12D
JZ 0x001025fb
MOV EDX,R12D
SHL EDX,0x5
CMP EAX,0x2
JZ 0x00102605
CMP EAX,0x1
JNZ 0x00102607
LEA RAX,[0x1050c0]
MOV RAX,qword ptr [RAX]
CMP RAX,RDX
CMOVC RDX,RAX
JMP 0x00102607
LAB_001025fb:
MOV EAX,R12D
TEST R12D,R12D
JNZ 0x00102616
JMP 0x00102637
LAB_00102605:
SHR EDX,0x1
LAB_00102607:
TEST RDX,RDX
JZ 0x00102613
XOR ESI,ESI
CALL 0x00102c1a
LAB_00102613:
MOV EAX,R12D
LAB_00102616:
LEA EDX,[RBX + 0x1f]
TEST EBX,EBX
CMOVNS EDX,EBX
SAR EDX,0x5
MOV ESI,0xfffffffe
MOV ECX,EBX
ROL ESI,CL
MOVSXD RCX,EDX
AND dword ptr [R15 + RCX*0x4],ESI
INC EBX
DEC EAX
JNZ 0x00102616
LAB_00102637:
TEST R12D,R12D
JZ 0x00102667
LEA RAX,[0x4206100]
MOV RCX,qword ptr [RAX + 0x28]
XOR EDX,EDX
SUB RCX,R14
CMOVNC RDX,RCX
MOV qword ptr [RAX + 0x28],RDX
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00102e27
LAB_00102667:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void free_small(int1 *param_1)
{
byte bVar1;
uint uVar2;
int iVar3;
long lVar4;
uint uVar5;
int iVar6;
ulong uVar7;
int iVar8;
ulong uVar9;
int iVar10;
ulong uVar11;
bool bVar12;
if (param_1 < memory && small_pool <= param_1) {
uVar9 = (ulong)((long)param_1 - (long)PTR_small_pool_00104fd0) >> 5;
iVar8 = (int)uVar9;
if (iVar8 < 0x8000) {
iVar6 = 0;
uVar11 = 0;
do {
uVar2 = iVar8 + iVar6;
uVar5 = iVar8 + 0x1f + iVar6;
if (-1 < (int)uVar2) {
uVar5 = uVar2;
}
iVar10 = iVar6;
if (((uint)(&small_block_bitmap)[(int)uVar5 >> 5] >> (uVar2 & 0x1f) & 1) == 0) break;
uVar11 = uVar11 + 0x20;
iVar3 = iVar8 + iVar6;
iVar6 = iVar6 + 1;
iVar10 = 0x8000 - iVar8;
} while (iVar3 != 0x7fff);
iVar8 = iVar10;
if (zero_on_free_depth < 1) goto joined_r0x00102601;
if (iVar10 == 0) goto joined_r0x00102601;
uVar7 = (ulong)(uint)(iVar10 << 5);
if (zero_on_free_depth == 2) {
uVar7 = (ulong)((uint)(iVar10 << 5) >> 1);
}
else if ((zero_on_free_depth == 1) && (shallow_zero_size < uVar7)) {
uVar7 = shallow_zero_size;
}
if (uVar7 != 0) {
_memset(param_1,0);
}
do {
iVar6 = (int)uVar9;
iVar3 = iVar6 + 0x1f;
if (-1 < iVar6) {
iVar3 = iVar6;
}
bVar1 = (byte)uVar9 & 0x1f;
(&small_block_bitmap)[iVar3 >> 5] =
(&small_block_bitmap)[iVar3 >> 5] & (-2 << bVar1 | 0xfffffffeU >> 0x20 - bVar1);
uVar9 = (ulong)(iVar6 + 1);
iVar8 = iVar8 + -1;
joined_r0x00102601:
} while (iVar8 != 0);
if (iVar10 != 0) {
bVar12 = uVar11 <= DAT_04206128;
lVar4 = DAT_04206128 - uVar11;
DAT_04206128 = 0;
if (bVar12) {
DAT_04206128 = lVar4;
}
update_stats_free(uVar11);
return;
}
}
}
return;
}
|
|
1,025 | update_dynamic_record | eloqsql/storage/myisam/mi_dynrec.c | static int update_dynamic_record(MI_INFO *info, my_off_t filepos, uchar *record,
ulong reclength)
{
int flag;
uint error;
ulong length;
MI_BLOCK_INFO block_info;
DBUG_ENTER("update_dynamic_record");
flag=block_info.second_read=0;
/*
Check if we have enough room for the record.
First we do simplified check to make usual case faster.
Then we do more precise check for the space left.
Though it still is not absolutely precise, as
we always use MI_MAX_DYN_BLOCK_HEADER while it can be
less in the most of the cases.
*/
/*
compare with just the reclength as we're going
to get some space from the old replaced record
*/
if (unlikely(info->s->base.max_data_file_length -
info->state->data_file_length < reclength))
{
/*
let's read the old record's block to find out the length of the
old record
*/
if ((error=_mi_get_block_info(&block_info,info->dfile,filepos))
& (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR))
{
DBUG_PRINT("error",("Got wrong block info"));
if (!(error & BLOCK_FATAL_ERROR))
my_errno=HA_ERR_WRONG_IN_RECORD;
goto err;
}
/*
if new record isn't longer, we can go on safely
*/
if (block_info.rec_len < reclength)
{
if (info->s->base.max_data_file_length - info->state->data_file_length +
info->state->empty - info->state->del * MI_MAX_DYN_BLOCK_HEADER <
reclength - block_info.rec_len + MI_MAX_DYN_BLOCK_HEADER)
{
my_errno=HA_ERR_RECORD_FILE_FULL;
goto err;
}
}
block_info.second_read=0;
}
while (reclength > 0)
{
if (filepos != info->s->state.dellink)
{
block_info.next_filepos= HA_OFFSET_ERROR;
if ((error=_mi_get_block_info(&block_info,info->dfile,filepos))
& (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR |
BLOCK_FATAL_ERROR))
{
DBUG_PRINT("error",("Got wrong block info"));
if (!(error & BLOCK_FATAL_ERROR))
my_errno=HA_ERR_WRONG_IN_RECORD;
goto err;
}
length=(ulong) (block_info.filepos-filepos) + block_info.block_len;
if (length < reclength)
{
uint tmp=MY_ALIGN(reclength - length + 3 +
MY_TEST(reclength >= 65520L), MI_DYN_ALIGN_SIZE);
/* Don't create a block bigger than MI_MAX_BLOCK_LENGTH */
tmp= MY_MIN(length+tmp, MI_MAX_BLOCK_LENGTH)-length;
/* Check if we can extend this block */
if (block_info.filepos + block_info.block_len ==
info->state->data_file_length &&
info->state->data_file_length <
info->s->base.max_data_file_length-tmp)
{
/* extend file */
DBUG_PRINT("info",("Extending file with %d bytes",tmp));
if (info->nextpos == info->state->data_file_length)
info->nextpos+= tmp;
info->state->data_file_length+= tmp;
info->update|= HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK;
length+=tmp;
}
else if (length < MI_MAX_BLOCK_LENGTH - MI_MIN_BLOCK_LENGTH)
{
/*
Check if next block is a deleted block
Above we have MI_MIN_BLOCK_LENGTH to avoid the problem where
the next block is so small it can't be split which could
cause problems
*/
MI_BLOCK_INFO del_block;
del_block.second_read=0;
if (_mi_get_block_info(&del_block,info->dfile,
block_info.filepos + block_info.block_len) &
BLOCK_DELETED)
{
/* Use; Unlink it and extend the current block */
DBUG_PRINT("info",("Extending current block"));
if (unlink_deleted_block(info,&del_block))
goto err;
if ((length+=del_block.block_len) > MI_MAX_BLOCK_LENGTH)
{
/*
New block was too big, link overflow part back to
delete list
*/
my_off_t next_pos;
ulong rest_length= length-MI_MAX_BLOCK_LENGTH;
set_if_bigger(rest_length, MI_MIN_BLOCK_LENGTH);
next_pos= del_block.filepos+ del_block.block_len - rest_length;
if (update_backward_delete_link(info, info->s->state.dellink,
next_pos))
DBUG_RETURN(1);
/* create delete link for data that didn't fit into the page */
del_block.header[0]=0;
mi_int3store(del_block.header+1, rest_length);
mi_sizestore(del_block.header+4,info->s->state.dellink);
bfill(del_block.header+12,8,255);
if (info->s->file_write(info,(uchar*) del_block.header,20, next_pos,
MYF(MY_NABP)))
DBUG_RETURN(1);
info->s->state.dellink= next_pos;
info->s->state.split++;
info->state->del++;
info->state->empty+= rest_length;
length-= rest_length;
}
}
}
}
}
else
{
if (_mi_find_writepos(info,reclength,&filepos,&length))
goto err;
}
if (_mi_write_part_record(info,filepos,length,block_info.next_filepos,
&record,&reclength,&flag))
goto err;
if ((filepos=block_info.next_filepos) == HA_OFFSET_ERROR)
{
/* Start writing data on deleted blocks */
filepos=info->s->state.dellink;
}
}
if (block_info.next_filepos != HA_OFFSET_ERROR)
{
/*
delete_dynamic_record() may change data file position.
IO cache must be notified as it may still have cached
data, which has to be flushed later.
*/
info->rec_cache.seek_not_done= 1;
if (delete_dynamic_record(info,block_info.next_filepos,1))
goto err;
}
DBUG_RETURN(0);
err:
DBUG_RETURN(1);
} | O3 | c | update_dynamic_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %r13
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rsi, -0xf0(%rbp)
movq %rdx, -0x110(%rbp)
movq %rcx, -0x108(%rbp)
xorl %eax, %eax
movl %eax, -0x38(%rbp)
movl %eax, -0xf4(%rbp)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x110(%rax), %rax
subq 0x28(%rcx), %rax
cmpq %r13, %rax
jb 0x77900
testq %r13, %r13
je 0x778d2
leaq -0x108(%rbp), %r15
movq (%rbx), %rax
cmpq 0x58(%rax), %r14
jne 0x77630
movq %rbx, %rdi
movq %r13, %rsi
leaq -0xf0(%rbp), %rdx
leaq -0xe8(%rbp), %rcx
callq 0x79e65
testl %eax, %eax
jne 0x7796f
movq -0xf0(%rbp), %r14
movq -0xe8(%rbp), %r12
jmp 0x7786f
movq $-0x1, -0x48(%rbp)
movl 0x1c0(%rbx), %esi
leaq -0x88(%rbp), %rdi
movq %r14, %rdx
callq 0x78413
cmpl $0x4, %eax
jae 0x77964
movq -0x60(%rbp), %rdx
movq -0x50(%rbp), %rax
movq %rax, %r12
subq %r14, %r12
addq %rdx, %r12
movq %r12, -0xe8(%rbp)
cmpq %r13, %r12
jae 0x7786f
addq %rax, %rdx
movq 0x8(%rbx), %rax
cmpq 0x28(%rax), %rdx
jne 0x776eb
cmpq $0xfff0, %r13 # imm = 0xFFF0
sbbl $-0x1, %r13d
subl %r12d, %r13d
addl $0x6, %r13d
andl $-0x4, %r13d
addq %r12, %r13
movl $0xfffffc, %ecx # imm = 0xFFFFFC
cmpq %rcx, %r13
cmovaeq %rcx, %r13
subl %r12d, %r13d
movq (%rbx), %rcx
movq 0x110(%rcx), %rcx
subq %r13, %rcx
cmpq %rcx, %rdx
jae 0x776eb
cmpq %rdx, 0x178(%rbx)
jne 0x776d5
addq %r13, %rdx
movq %rdx, 0x178(%rbx)
movq 0x28(%rax), %rdx
addq %r13, %rdx
movq %rdx, 0x28(%rax)
orb $0x9, 0x1d1(%rbx)
addq %r13, %r12
jmp 0x77868
cmpq $0xffffe7, %r12 # imm = 0xFFFFE7
ja 0x7786f
movl $0x0, -0x90(%rbp)
movl 0x1c0(%rbx), %esi
leaq -0xe0(%rbp), %r13
movq %r13, %rdi
callq 0x78413
testb $0x4, %al
je 0x7786f
movq %rbx, %rdi
movq %r13, %rsi
callq 0x787e9
testb %al, %al
jne 0x7796f
movq -0xb8(%rbp), %r13
addq %r13, %r12
movq %r12, -0xe8(%rbp)
cmpq $0xfffffd, %r12 # imm = 0xFFFFFD
jb 0x7786f
leaq -0xfffffc(%r12), %rcx
cmpq $0x15, %rcx
movl $0x14, %eax
cmovbq %rax, %rcx
movq %rcx, -0x100(%rbp)
subq %rcx, %r13
addq -0xa8(%rbp), %r13
movq (%rbx), %rax
movq 0x58(%rax), %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x7891a
testl %eax, %eax
jne 0x7796f
movb $0x0, -0xe0(%rbp)
movq -0x100(%rbp), %rax
movb %al, -0xdd(%rbp)
movb %ah, -0xde(%rbp)
shrl $0x10, %eax
movb %al, -0xdf(%rbp)
movq (%rbx), %rax
movq 0x58(%rax), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
movb %dl, -0xd9(%rbp)
movq %rcx, %rdx
shrq $0x28, %rdx
movb %dl, -0xda(%rbp)
movq %rcx, %rdx
shrq $0x30, %rdx
movb %dl, -0xdb(%rbp)
movq %rcx, %rdx
shrq $0x38, %rdx
movb %dl, -0xdc(%rbp)
movb %cl, -0xd5(%rbp)
movb %ch, -0xd6(%rbp)
movl %ecx, %edx
shrl $0x10, %edx
movb %dl, -0xd7(%rbp)
shrl $0x18, %ecx
movb %cl, -0xd8(%rbp)
movq $-0x1, -0xd4(%rbp)
movl $0x14, %edx
movl $0x4, %r8d
movq %rbx, %rdi
leaq -0xe0(%rbp), %rsi
movq %r13, %rcx
callq *0x2e8(%rax)
testq %rax, %rax
jne 0x7796f
movq (%rbx), %rax
movq %r13, 0x58(%rax)
movq (%rbx), %rax
incq 0x50(%rax)
movq 0x8(%rbx), %rax
incq 0x8(%rax)
movq 0x8(%rbx), %rax
movq -0x100(%rbp), %rcx
addq %rcx, 0x10(%rax)
subq %rcx, %r12
movq %r12, -0xe8(%rbp)
movq -0x48(%rbp), %rcx
leaq -0xf4(%rbp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
leaq -0x110(%rbp), %r8
movq %r15, %r9
callq 0x77d2c
testl %eax, %eax
jne 0x7796f
movq -0x48(%rbp), %rsi
movq %rsi, -0xf0(%rbp)
movq %rsi, %r14
cmpq $-0x1, %rsi
jne 0x778c0
movq (%rbx), %rax
movq 0x58(%rax), %r14
movq %r14, -0xf0(%rbp)
movq -0x108(%rbp), %r13
testq %r13, %r13
jne 0x775f3
jmp 0x778d6
movq -0x48(%rbp), %rsi
xorl %r14d, %r14d
cmpq $-0x1, %rsi
je 0x77975
movl $0x1, 0x300(%rbx)
movq %rbx, %rdi
movl $0x1, %edx
callq 0x77b57
testl %eax, %eax
jne 0x7796f
jmp 0x77975
movl 0x1c0(%rbx), %esi
leaq -0x88(%rbp), %rdi
movq %r14, %rdx
callq 0x78413
cmpl $0x4, %eax
jae 0x77964
movq -0x70(%rbp), %rax
cmpq %r13, %rax
jae 0x77999
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
movq 0x110(%rcx), %rcx
subq 0x28(%rdx), %rcx
addq 0x10(%rdx), %rcx
movq 0x8(%rdx), %rdx
shlq $0x2, %rdx
leaq (%rdx,%rdx,4), %rdx
subq %rdx, %rcx
movq %r13, %rdx
subq %rax, %rdx
addq $0x14, %rdx
cmpq %rdx, %rcx
jae 0x77999
callq 0xa1b22
movl $0x87, (%rax)
jmp 0x7796f
callq 0xa1b22
movl $0x7f, (%rax)
movl $0x1, %r14d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x779a5
movl %r14d, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, -0x38(%rbp)
jmp 0x775ec
callq 0x29270
| update_dynamic_record_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r13, rcx
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_F0], rsi
mov [rbp+var_110], rdx
mov [rbp+var_108], rcx
xor eax, eax
mov [rbp+var_38], eax
mov [rbp+var_F4], eax
mov rax, [rdi]
mov rcx, [rdi+8]
mov rax, [rax+110h]
sub rax, [rcx+28h]
cmp rax, r13
jb loc_77900
test r13, r13
jz loc_778D2
loc_775EC:
lea r15, [rbp+var_108]
loc_775F3:
mov rax, [rbx]
cmp r14, [rax+58h]
jnz short loc_77630
mov rdi, rbx
mov rsi, r13
lea rdx, [rbp+var_F0]
lea rcx, [rbp+var_E8]
call _mi_find_writepos
test eax, eax
jnz loc_7796F
mov r14, [rbp+var_F0]
mov r12, [rbp+var_E8]
jmp loc_7786F
loc_77630:
mov [rbp+var_48], 0FFFFFFFFFFFFFFFFh
mov esi, [rbx+1C0h]
lea rdi, [rbp+var_88]
mov rdx, r14
call _mi_get_block_info
cmp eax, 4
jnb loc_77964
mov rdx, [rbp+var_60]
mov rax, [rbp+var_50]
mov r12, rax
sub r12, r14
add r12, rdx
mov [rbp+var_E8], r12
cmp r12, r13
jnb loc_7786F
add rdx, rax
mov rax, [rbx+8]
cmp rdx, [rax+28h]
jnz short loc_776EB
cmp r13, 0FFF0h
sbb r13d, 0FFFFFFFFh
sub r13d, r12d
add r13d, 6
and r13d, 0FFFFFFFCh
add r13, r12
mov ecx, 0FFFFFCh
cmp r13, rcx
cmovnb r13, rcx
sub r13d, r12d
mov rcx, [rbx]
mov rcx, [rcx+110h]
sub rcx, r13
cmp rdx, rcx
jnb short loc_776EB
cmp [rbx+178h], rdx
jnz short loc_776D5
add rdx, r13
mov [rbx+178h], rdx
mov rdx, [rax+28h]
loc_776D5:
add rdx, r13
mov [rax+28h], rdx
or byte ptr [rbx+1D1h], 9
add r12, r13
jmp loc_77868
loc_776EB:
cmp r12, 0FFFFE7h
ja loc_7786F
mov [rbp+var_90], 0
mov esi, [rbx+1C0h]
lea r13, [rbp+var_E0]
mov rdi, r13
call _mi_get_block_info
test al, 4
jz loc_7786F
mov rdi, rbx
mov rsi, r13
call unlink_deleted_block_0
test al, al
jnz loc_7796F
mov r13, [rbp+var_B8]
add r12, r13
mov [rbp+var_E8], r12
cmp r12, 0FFFFFDh
jb loc_7786F
lea rcx, [r12-0FFFFFCh]
cmp rcx, 15h
mov eax, 14h
cmovb rcx, rax
mov [rbp+var_100], rcx
sub r13, rcx
add r13, [rbp+var_A8]
mov rax, [rbx]
mov rsi, [rax+58h]
mov rdi, rbx
mov rdx, r13
call update_backward_delete_link_0
test eax, eax
jnz loc_7796F
mov [rbp+var_E0], 0
mov rax, [rbp+var_100]
mov [rbp+var_DD], al
mov [rbp+var_DE], ah
shr eax, 10h
mov [rbp+var_DF], al
mov rax, [rbx]
mov rcx, [rax+58h]
mov rdx, rcx
shr rdx, 20h
mov [rbp+var_D9], dl
mov rdx, rcx
shr rdx, 28h
mov [rbp+var_DA], dl
mov rdx, rcx
shr rdx, 30h
mov [rbp+var_DB], dl
mov rdx, rcx
shr rdx, 38h
mov [rbp+var_DC], dl
mov [rbp+var_D5], cl
mov [rbp+var_D6], ch
mov edx, ecx
shr edx, 10h
mov [rbp+var_D7], dl
shr ecx, 18h
mov [rbp+var_D8], cl
mov [rbp+var_D4], 0FFFFFFFFFFFFFFFFh
mov edx, 14h
mov r8d, 4
mov rdi, rbx
lea rsi, [rbp+var_E0]
mov rcx, r13
call qword ptr [rax+2E8h]
test rax, rax
jnz loc_7796F
mov rax, [rbx]
mov [rax+58h], r13
mov rax, [rbx]
inc qword ptr [rax+50h]
mov rax, [rbx+8]
inc qword ptr [rax+8]
mov rax, [rbx+8]
mov rcx, [rbp+var_100]
add [rax+10h], rcx
sub r12, rcx
loc_77868:
mov [rbp+var_E8], r12
loc_7786F:
mov rcx, [rbp+var_48]
lea rax, [rbp+var_F4]
mov [rsp+120h+var_120], rax
mov rdi, rbx
mov rsi, r14
mov rdx, r12
lea r8, [rbp+var_110]
mov r9, r15
call _mi_write_part_record
test eax, eax
jnz loc_7796F
mov rsi, [rbp+var_48]
mov [rbp+var_F0], rsi
mov r14, rsi
cmp rsi, 0FFFFFFFFFFFFFFFFh
jnz short loc_778C0
mov rax, [rbx]
mov r14, [rax+58h]
mov [rbp+var_F0], r14
loc_778C0:
mov r13, [rbp+var_108]
test r13, r13
jnz loc_775F3
jmp short loc_778D6
loc_778D2:
mov rsi, [rbp+var_48]
loc_778D6:
xor r14d, r14d
cmp rsi, 0FFFFFFFFFFFFFFFFh
jz loc_77975
mov dword ptr [rbx+300h], 1
mov rdi, rbx
mov edx, 1
call delete_dynamic_record_0
test eax, eax
jnz short loc_7796F
jmp short loc_77975
loc_77900:
mov esi, [rbx+1C0h]
lea rdi, [rbp+var_88]
mov rdx, r14
call _mi_get_block_info
cmp eax, 4
jnb short loc_77964
mov rax, [rbp+var_70]
cmp rax, r13
jnb short loc_77999
mov rcx, [rbx]
mov rdx, [rbx+8]
mov rcx, [rcx+110h]
sub rcx, [rdx+28h]
add rcx, [rdx+10h]
mov rdx, [rdx+8]
shl rdx, 2
lea rdx, [rdx+rdx*4]
sub rcx, rdx
mov rdx, r13
sub rdx, rax
add rdx, 14h
cmp rcx, rdx
jnb short loc_77999
call _my_thread_var
mov dword ptr [rax], 87h
jmp short loc_7796F
loc_77964:
call _my_thread_var
mov dword ptr [rax], 7Fh
loc_7796F:
mov r14d, 1
loc_77975:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_779A5
mov eax, r14d
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_77999:
mov [rbp+var_38], 0
jmp loc_775EC
loc_779A5:
call ___stack_chk_fail
| long long update_dynamic_record_0(long long *a1, long long a2, long long a3, unsigned long long a4)
{
unsigned long long v4; // r13
long long v5; // r14
unsigned long long v6; // r12
const char *v7; // rsi
unsigned long long v8; // rdx
long long v9; // rax
unsigned long long v10; // r13
long long v11; // r13
long long v12; // rcx
long long v13; // r13
long long v14; // rax
long long v15; // rcx
long long v16; // rcx
long long v17; // rsi
unsigned int v18; // r14d
long long v20; // [rsp+10h] [rbp-110h] BYREF
unsigned long long v21; // [rsp+18h] [rbp-108h] BYREF
long long v22; // [rsp+20h] [rbp-100h]
int v23; // [rsp+2Ch] [rbp-F4h] BYREF
long long v24; // [rsp+30h] [rbp-F0h] BYREF
unsigned long long v25; // [rsp+38h] [rbp-E8h] BYREF
_BYTE v26[12]; // [rsp+40h] [rbp-E0h] BYREF
long long v27; // [rsp+4Ch] [rbp-D4h]
long long v28; // [rsp+68h] [rbp-B8h]
long long v29; // [rsp+78h] [rbp-A8h]
int v30; // [rsp+90h] [rbp-90h]
_BYTE v31[24]; // [rsp+98h] [rbp-88h] BYREF
unsigned long long v32; // [rsp+B0h] [rbp-70h]
long long v33; // [rsp+C0h] [rbp-60h]
long long v34; // [rsp+D0h] [rbp-50h]
long long v35; // [rsp+D8h] [rbp-48h]
int v36; // [rsp+E8h] [rbp-38h]
unsigned long long v37; // [rsp+F0h] [rbp-30h]
v4 = a4;
v5 = a2;
v37 = __readfsqword(0x28u);
v24 = a2;
v20 = a3;
v21 = a4;
v36 = 0;
v23 = 0;
if ( *(_QWORD *)(*a1 + 272) - *(_QWORD *)(a1[1] + 40) < a4 )
{
v7 = (const char *)*((unsigned int *)a1 + 112);
if ( (unsigned int)mi_get_block_info(v31, v7, v5) >= 4 )
{
LABEL_38:
*(_DWORD *)my_thread_var(v31, v7) = 127;
return 1;
}
if ( v32 < v4
&& *(_QWORD *)(a1[1] + 16) + *(_QWORD *)(*a1 + 272) - *(_QWORD *)(a1[1] + 40) - 20LL * *(_QWORD *)(a1[1] + 8) < v4 - v32 + 20 )
{
*(_DWORD *)my_thread_var(v31, v7) = 135;
return 1;
}
v36 = 0;
while ( 1 )
{
LABEL_3:
if ( v5 == *(_QWORD *)(*a1 + 88) )
{
if ( (unsigned int)mi_find_writepos(a1, v4, &v24, &v25) )
return 1;
LODWORD(v5) = v24;
LODWORD(v6) = v25;
}
else
{
v35 = -1LL;
v7 = (const char *)*((unsigned int *)a1 + 112);
if ( (unsigned int)mi_get_block_info(v31, v7, v5) >= 4 )
goto LABEL_38;
v6 = v33 + v34 - v5;
v25 = v6;
if ( v6 < v4 )
{
v8 = v34 + v33;
v9 = a1[1];
if ( v34 + v33 != *(_QWORD *)(v9 + 40) )
goto LABEL_44;
v10 = v6 + (((_DWORD)v4 - ((v4 < 0xFFF0) - 1) - (_DWORD)v6 + 6) & 0xFFFFFFFC);
if ( v10 >= 0xFFFFFC )
LODWORD(v10) = 16777212;
v11 = (unsigned int)(v10 - v6);
if ( v8 < *(_QWORD *)(*a1 + 272) - v11 )
{
if ( a1[47] == v8 )
{
a1[47] = v11 + v8;
v8 = *(_QWORD *)(v9 + 40);
}
*(_QWORD *)(v9 + 40) = v11 + v8;
*((_BYTE *)a1 + 465) |= 9u;
v6 += v11;
}
else
{
LABEL_44:
if ( v6 > 0xFFFFE7 )
goto LABEL_25;
v30 = 0;
if ( (mi_get_block_info(v26, *((unsigned int *)a1 + 112), v8) & 4) == 0 )
goto LABEL_25;
if ( (unsigned __int8)unlink_deleted_block_0(a1, v26) )
return 1;
v6 += v28;
v25 = v6;
if ( v6 < 0xFFFFFD )
goto LABEL_25;
v12 = v6 - 16777212;
if ( v6 - 16777212 < 0x15 )
v12 = 20LL;
v22 = v12;
v13 = v29 + v28 - v12;
if ( (unsigned int)update_backward_delete_link_0(a1, *(_QWORD *)(*a1 + 88), v13) )
return 1;
v26[0] = 0;
v26[2] = BYTE1(v22);
v26[3] = v22;
v26[1] = BYTE2(v22);
v14 = *a1;
v15 = *(_QWORD *)(*a1 + 88);
v26[7] = BYTE4(v15);
v26[6] = BYTE5(v15);
v26[5] = BYTE6(v15);
v26[4] = HIBYTE(v15);
v26[10] = BYTE1(v15);
v26[11] = v15;
v26[9] = BYTE2(v15);
v26[8] = BYTE3(v15);
v27 = -1LL;
if ( (*(long long ( **)(long long *, _BYTE *, long long, long long, long long))(v14 + 744))(
a1,
v26,
20LL,
v13,
4LL) )
{
return 1;
}
*(_QWORD *)(*a1 + 88) = v13;
++*(_QWORD *)(*a1 + 80);
++*(_QWORD *)(a1[1] + 8);
v16 = v22;
*(_QWORD *)(a1[1] + 16) += v22;
v6 -= v16;
}
v25 = v6;
}
}
LABEL_25:
if ( (unsigned int)mi_write_part_record(
(_DWORD)a1,
v5,
v6,
v35,
(unsigned int)&v20,
(unsigned int)&v21,
(long long)&v23) )
return 1;
v17 = v35;
v24 = v35;
v5 = v35;
if ( v35 == -1 )
{
v5 = *(_QWORD *)(*a1 + 88);
v24 = v5;
}
v4 = v21;
if ( !v21 )
goto LABEL_31;
}
}
if ( a4 )
goto LABEL_3;
v17 = v35;
LABEL_31:
v18 = 0;
if ( v17 != -1 )
{
*((_DWORD *)a1 + 192) = 1;
if ( (unsigned int)delete_dynamic_record_0(a1, v17, 1LL) )
return 1;
}
return v18;
}
| update_dynamic_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R13,RCX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0xf0],RSI
MOV qword ptr [RBP + -0x110],RDX
MOV qword ptr [RBP + -0x108],RCX
XOR EAX,EAX
MOV dword ptr [RBP + -0x38],EAX
MOV dword ptr [RBP + -0xf4],EAX
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RAX + 0x110]
SUB RAX,qword ptr [RCX + 0x28]
CMP RAX,R13
JC 0x00177900
TEST R13,R13
JZ 0x001778d2
LAB_001775ec:
LEA R15,[RBP + -0x108]
LAB_001775f3:
MOV RAX,qword ptr [RBX]
CMP R14,qword ptr [RAX + 0x58]
JNZ 0x00177630
MOV RDI,RBX
MOV RSI,R13
LEA RDX,[RBP + -0xf0]
LEA RCX,[RBP + -0xe8]
CALL 0x00179e65
TEST EAX,EAX
JNZ 0x0017796f
MOV R14,qword ptr [RBP + -0xf0]
MOV R12,qword ptr [RBP + -0xe8]
JMP 0x0017786f
LAB_00177630:
MOV qword ptr [RBP + -0x48],-0x1
MOV ESI,dword ptr [RBX + 0x1c0]
LEA RDI,[RBP + -0x88]
MOV RDX,R14
CALL 0x00178413
CMP EAX,0x4
JNC 0x00177964
MOV RDX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x50]
MOV R12,RAX
SUB R12,R14
ADD R12,RDX
MOV qword ptr [RBP + -0xe8],R12
CMP R12,R13
JNC 0x0017786f
ADD RDX,RAX
MOV RAX,qword ptr [RBX + 0x8]
CMP RDX,qword ptr [RAX + 0x28]
JNZ 0x001776eb
CMP R13,0xfff0
SBB R13D,-0x1
SUB R13D,R12D
ADD R13D,0x6
AND R13D,0xfffffffc
ADD R13,R12
MOV ECX,0xfffffc
CMP R13,RCX
CMOVNC R13,RCX
SUB R13D,R12D
MOV RCX,qword ptr [RBX]
MOV RCX,qword ptr [RCX + 0x110]
SUB RCX,R13
CMP RDX,RCX
JNC 0x001776eb
CMP qword ptr [RBX + 0x178],RDX
JNZ 0x001776d5
ADD RDX,R13
MOV qword ptr [RBX + 0x178],RDX
MOV RDX,qword ptr [RAX + 0x28]
LAB_001776d5:
ADD RDX,R13
MOV qword ptr [RAX + 0x28],RDX
OR byte ptr [RBX + 0x1d1],0x9
ADD R12,R13
JMP 0x00177868
LAB_001776eb:
CMP R12,0xffffe7
JA 0x0017786f
MOV dword ptr [RBP + -0x90],0x0
MOV ESI,dword ptr [RBX + 0x1c0]
LEA R13,[RBP + -0xe0]
MOV RDI,R13
CALL 0x00178413
TEST AL,0x4
JZ 0x0017786f
MOV RDI,RBX
MOV RSI,R13
CALL 0x001787e9
TEST AL,AL
JNZ 0x0017796f
MOV R13,qword ptr [RBP + -0xb8]
ADD R12,R13
MOV qword ptr [RBP + -0xe8],R12
CMP R12,0xfffffd
JC 0x0017786f
LEA RCX,[R12 + -0xfffffc]
CMP RCX,0x15
MOV EAX,0x14
CMOVC RCX,RAX
MOV qword ptr [RBP + -0x100],RCX
SUB R13,RCX
ADD R13,qword ptr [RBP + -0xa8]
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX + 0x58]
MOV RDI,RBX
MOV RDX,R13
CALL 0x0017891a
TEST EAX,EAX
JNZ 0x0017796f
MOV byte ptr [RBP + -0xe0],0x0
MOV RAX,qword ptr [RBP + -0x100]
MOV byte ptr [RBP + -0xdd],AL
MOV byte ptr [RBP + -0xde],AH
SHR EAX,0x10
MOV byte ptr [RBP + -0xdf],AL
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX + 0x58]
MOV RDX,RCX
SHR RDX,0x20
MOV byte ptr [RBP + -0xd9],DL
MOV RDX,RCX
SHR RDX,0x28
MOV byte ptr [RBP + -0xda],DL
MOV RDX,RCX
SHR RDX,0x30
MOV byte ptr [RBP + -0xdb],DL
MOV RDX,RCX
SHR RDX,0x38
MOV byte ptr [RBP + -0xdc],DL
MOV byte ptr [RBP + -0xd5],CL
MOV byte ptr [RBP + -0xd6],CH
MOV EDX,ECX
SHR EDX,0x10
MOV byte ptr [RBP + -0xd7],DL
SHR ECX,0x18
MOV byte ptr [RBP + -0xd8],CL
MOV qword ptr [RBP + -0xd4],-0x1
MOV EDX,0x14
MOV R8D,0x4
MOV RDI,RBX
LEA RSI,[RBP + -0xe0]
MOV RCX,R13
CALL qword ptr [RAX + 0x2e8]
TEST RAX,RAX
JNZ 0x0017796f
MOV RAX,qword ptr [RBX]
MOV qword ptr [RAX + 0x58],R13
MOV RAX,qword ptr [RBX]
INC qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RBX + 0x8]
INC qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBP + -0x100]
ADD qword ptr [RAX + 0x10],RCX
SUB R12,RCX
LAB_00177868:
MOV qword ptr [RBP + -0xe8],R12
LAB_0017786f:
MOV RCX,qword ptr [RBP + -0x48]
LEA RAX,[RBP + -0xf4]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R12
LEA R8,[RBP + -0x110]
MOV R9,R15
CALL 0x00177d2c
TEST EAX,EAX
JNZ 0x0017796f
MOV RSI,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0xf0],RSI
MOV R14,RSI
CMP RSI,-0x1
JNZ 0x001778c0
MOV RAX,qword ptr [RBX]
MOV R14,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0xf0],R14
LAB_001778c0:
MOV R13,qword ptr [RBP + -0x108]
TEST R13,R13
JNZ 0x001775f3
JMP 0x001778d6
LAB_001778d2:
MOV RSI,qword ptr [RBP + -0x48]
LAB_001778d6:
XOR R14D,R14D
CMP RSI,-0x1
JZ 0x00177975
MOV dword ptr [RBX + 0x300],0x1
MOV RDI,RBX
MOV EDX,0x1
CALL 0x00177b57
TEST EAX,EAX
JNZ 0x0017796f
JMP 0x00177975
LAB_00177900:
MOV ESI,dword ptr [RBX + 0x1c0]
LEA RDI,[RBP + -0x88]
MOV RDX,R14
CALL 0x00178413
CMP EAX,0x4
JNC 0x00177964
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,R13
JNC 0x00177999
MOV RCX,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RCX + 0x110]
SUB RCX,qword ptr [RDX + 0x28]
ADD RCX,qword ptr [RDX + 0x10]
MOV RDX,qword ptr [RDX + 0x8]
SHL RDX,0x2
LEA RDX,[RDX + RDX*0x4]
SUB RCX,RDX
MOV RDX,R13
SUB RDX,RAX
ADD RDX,0x14
CMP RCX,RDX
JNC 0x00177999
CALL 0x001a1b22
MOV dword ptr [RAX],0x87
JMP 0x0017796f
LAB_00177964:
CALL 0x001a1b22
MOV dword ptr [RAX],0x7f
LAB_0017796f:
MOV R14D,0x1
LAB_00177975:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001779a5
MOV EAX,R14D
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00177999:
MOV dword ptr [RBP + -0x38],0x0
JMP 0x001775ec
LAB_001779a5:
CALL 0x00129270
|
int8 update_dynamic_record(long *param_1,long param_2,int8 param_3,ulong param_4)
{
char cVar1;
int iVar2;
uint uVar3;
long lVar4;
int4 *puVar5;
ulong uVar6;
ulong uVar7;
ulong uVar8;
long lVar9;
int8 uVar10;
long in_FS_OFFSET;
int8 local_118;
ulong local_110;
ulong local_108;
int4 local_fc;
long local_f8;
ulong local_f0;
int1 local_e8;
int1 local_e7;
int1 local_e6;
int1 local_e5;
int1 local_e4;
int1 local_e3;
int1 local_e2;
int1 local_e1;
int1 local_e0;
int1 local_df;
int1 local_de;
int1 local_dd;
int8 local_dc;
long local_c0;
long local_b0;
int4 local_98;
int1 local_90 [24];
ulong local_78;
long local_68;
long local_58;
long local_50;
int4 local_40;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_40 = 0;
local_fc = 0;
local_118 = param_3;
local_110 = param_4;
local_f8 = param_2;
if ((ulong)(*(long *)(*param_1 + 0x110) - *(long *)(param_1[1] + 0x28)) < param_4) {
uVar3 = _mi_get_block_info(local_90,(int)param_1[0x38],param_2);
if (uVar3 < 4) {
if ((param_4 <= local_78) ||
(lVar9 = param_1[1],
(param_4 - local_78) + 0x14 <=
(ulong)((*(long *)(*param_1 + 0x110) - *(long *)(lVar9 + 0x28)) + *(long *)(lVar9 + 0x10) +
*(long *)(lVar9 + 8) * -0x14))) goto LAB_001775ec;
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x87;
}
else {
LAB_00177964:
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x7f;
}
}
else {
if (param_4 != 0) {
LAB_001775ec:
local_40 = 0;
do {
if (param_2 == *(long *)(*param_1 + 0x58)) {
iVar2 = _mi_find_writepos(param_1,param_4,&local_f8,&local_f0);
uVar7 = local_f0;
param_2 = local_f8;
if (iVar2 != 0) goto LAB_0017796f;
}
else {
local_50 = -1;
uVar3 = _mi_get_block_info(local_90,(int)param_1[0x38],param_2);
if (3 < uVar3) goto LAB_00177964;
uVar7 = (local_58 - param_2) + local_68;
local_f0 = uVar7;
if (uVar7 < param_4) {
uVar6 = local_68 + local_58;
lVar9 = param_1[1];
if (uVar6 == *(ulong *)(lVar9 + 0x28)) {
uVar8 = ((((int)param_4 - (uint)(param_4 < 0xfff0)) - (int)uVar7) + 7 & 0xfffffffc) +
uVar7;
if (0xfffffb < uVar8) {
uVar8 = 0xfffffc;
}
uVar8 = (ulong)(uint)((int)uVar8 - (int)uVar7);
if (uVar6 < *(long *)(*param_1 + 0x110) - uVar8) {
if (param_1[0x2f] == uVar6) {
param_1[0x2f] = uVar6 + uVar8;
uVar6 = *(ulong *)(lVar9 + 0x28);
}
*(ulong *)(lVar9 + 0x28) = uVar6 + uVar8;
*(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) | 9;
local_f0 = uVar7 + uVar8;
uVar7 = local_f0;
goto LAB_0017786f;
}
}
if (uVar7 < 0xffffe8) {
local_98 = 0;
uVar6 = _mi_get_block_info(&local_e8,(int)param_1[0x38]);
if ((uVar6 & 4) != 0) {
cVar1 = unlink_deleted_block(param_1,&local_e8);
if (cVar1 != '\0') goto LAB_0017796f;
uVar7 = uVar7 + local_c0;
local_f0 = uVar7;
if (0xfffffc < uVar7) {
local_108 = uVar7 - 0xfffffc;
if (local_108 < 0x15) {
local_108 = 0x14;
}
lVar9 = (local_c0 - local_108) + local_b0;
iVar2 = update_backward_delete_link
(param_1,*(int8 *)(*param_1 + 0x58),lVar9);
if (iVar2 != 0) goto LAB_0017796f;
local_e8 = 0;
local_e5 = (int1)local_108;
local_e6 = (int1)(local_108 >> 8);
local_e7 = (int1)(local_108 >> 0x10);
uVar10 = *(int8 *)(*param_1 + 0x58);
local_e1 = (int1)((ulong)uVar10 >> 0x20);
local_e2 = (int1)((ulong)uVar10 >> 0x28);
local_e3 = (int1)((ulong)uVar10 >> 0x30);
local_e4 = (int1)((ulong)uVar10 >> 0x38);
local_dd = (int1)uVar10;
local_de = (int1)((ulong)uVar10 >> 8);
local_df = (int1)((ulong)uVar10 >> 0x10);
local_e0 = (int1)((ulong)uVar10 >> 0x18);
local_dc = 0xffffffffffffffff;
lVar4 = (**(code **)(*param_1 + 0x2e8))(param_1,&local_e8,0x14,lVar9,4);
if (lVar4 != 0) goto LAB_0017796f;
*(long *)(*param_1 + 0x58) = lVar9;
*(long *)(*param_1 + 0x50) = *(long *)(*param_1 + 0x50) + 1;
*(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + 1;
*(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) + local_108;
local_f0 = uVar7 - local_108;
uVar7 = local_f0;
}
}
}
}
}
LAB_0017786f:
iVar2 = _mi_write_part_record
(param_1,param_2,uVar7,local_50,&local_118,&local_110,&local_fc);
if (iVar2 != 0) goto LAB_0017796f;
param_2 = local_50;
if (local_50 == -1) {
param_2 = *(long *)(*param_1 + 0x58);
}
param_4 = local_110;
local_f8 = param_2;
} while (local_110 != 0);
}
uVar10 = 0;
if (local_50 == -1) goto LAB_00177975;
*(int4 *)(param_1 + 0x60) = 1;
iVar2 = delete_dynamic_record(param_1,local_50,1);
if (iVar2 == 0) goto LAB_00177975;
}
LAB_0017796f:
uVar10 = 1;
LAB_00177975:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar10;
}
|
|
1,026 | mthd_stmt_flush_unbuffered | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | void mthd_stmt_flush_unbuffered(MYSQL_STMT *stmt)
{
ulong packet_len;
int in_resultset= stmt->state > MYSQL_STMT_EXECUTED &&
stmt->state < MYSQL_STMT_FETCH_DONE;
while ((packet_len = ma_net_safe_read(stmt->mysql)) != packet_error)
{
uchar *pos= stmt->mysql->net.read_pos;
if (!in_resultset && *pos == 0) /* OK */
{
pos++;
net_field_length(&pos);
net_field_length(&pos);
stmt->mysql->server_status= uint2korr(pos);
goto end;
}
if (packet_len < 8 && *pos == 254) /* EOF */
{
if (mariadb_connection(stmt->mysql))
{
stmt->mysql->server_status= uint2korr(pos + 3);
if (in_resultset)
goto end;
in_resultset= 1;
}
else
goto end;
}
}
end:
stmt->state= MYSQL_STMT_FETCH_DONE;
} | O0 | c | mthd_stmt_flush_unbuffered:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x2, 0x50(%rcx)
movb %al, -0x21(%rbp)
jbe 0x26939
movq -0x8(%rbp), %rax
cmpl $0x6, 0x50(%rax)
setb %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x16970
movq %rax, -0x10(%rbp)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0x26a3c
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x269d0
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x269d0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x16f90
leaq -0x20(%rbp), %rdi
callq 0x16f90
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movl %ecx, 0x380(%rax)
jmp 0x26a3e
cmpq $0x8, -0x10(%rbp)
jae 0x26a37
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jne 0x26a37
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x16e00
cmpb $0x0, %al
je 0x26a33
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movl %ecx, 0x380(%rax)
cmpl $0x0, -0x14(%rbp)
je 0x26a2a
jmp 0x26a3e
movl $0x1, -0x14(%rbp)
jmp 0x26a35
jmp 0x26a3e
jmp 0x26a37
jmp 0x26944
jmp 0x26a3e
movq -0x8(%rbp), %rax
movl $0x6, 0x50(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
| mthd_stmt_flush_unbuffered:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rcx, [rbp+var_8]
xor eax, eax
cmp dword ptr [rcx+50h], 2
mov [rbp+var_21], al
jbe short loc_26939
mov rax, [rbp+var_8]
cmp dword ptr [rax+50h], 6
setb al
mov [rbp+var_21], al
loc_26939:
mov al, [rbp+var_21]
and al, 1
movzx eax, al
mov [rbp+var_14], eax
loc_26944:
mov rax, [rbp+var_8]
mov rdi, [rax+38h]
call ma_net_safe_read
mov [rbp+var_10], rax
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jz loc_26A3C
mov rax, [rbp+var_8]
mov rax, [rax+38h]
mov rax, [rax+20h]
mov [rbp+var_20], rax
cmp [rbp+var_14], 0
jnz short loc_269D0
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_269D0
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
lea rdi, [rbp+var_20]
call net_field_length
lea rdi, [rbp+var_20]
call net_field_length
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_8]
mov rax, [rax+38h]
mov [rax+380h], ecx
jmp short loc_26A3E
loc_269D0:
cmp [rbp+var_10], 8
jnb short loc_26A37
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jnz short loc_26A37
mov rax, [rbp+var_8]
mov rdi, [rax+38h]
call mariadb_connection
cmp al, 0
jz short loc_26A33
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+4]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_8]
mov rax, [rax+38h]
mov [rax+380h], ecx
cmp [rbp+var_14], 0
jz short loc_26A2A
jmp short loc_26A3E
loc_26A2A:
mov [rbp+var_14], 1
jmp short loc_26A35
loc_26A33:
jmp short loc_26A3E
loc_26A35:
jmp short $+2
loc_26A37:
jmp loc_26944
loc_26A3C:
jmp short $+2
loc_26A3E:
mov rax, [rbp+var_8]
mov dword ptr [rax+50h], 6
add rsp, 30h
pop rbp
retn
| long long mthd_stmt_flush_unbuffered(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long v6; // rcx
long long result; // rax
bool v8; // [rsp+Fh] [rbp-21h]
unsigned __int8 *v9; // [rsp+10h] [rbp-20h] BYREF
int v10; // [rsp+1Ch] [rbp-14h]
unsigned long long v11; // [rsp+20h] [rbp-10h]
long long v12; // [rsp+28h] [rbp-8h]
v12 = a1;
v6 = a1;
v8 = 0;
if ( *(_DWORD *)(a1 + 80) > 2u )
v8 = *(_DWORD *)(v12 + 80) < 6u;
v10 = v8;
while ( 1 )
{
v11 = ma_net_safe_read(*(_QWORD *)(v12 + 56), a2, a3, v6, a5, a6);
v6 = 0xFFFFFFFFLL;
if ( v11 == 0xFFFFFFFF )
break;
v9 = *(unsigned __int8 **)(*(_QWORD *)(v12 + 56) + 32LL);
if ( !v10 && !*v9 )
{
++v9;
net_field_length(&v9);
net_field_length(&v9);
*(_DWORD *)(*(_QWORD *)(v12 + 56) + 896LL) = (unsigned __int16)((v9[1] << 8) + *v9);
break;
}
if ( v11 < 8 && *v9 == 254 )
{
if ( !mariadb_connection(*(_QWORD *)(v12 + 56)) )
break;
v6 = (unsigned __int16)((v9[4] << 8) + v9[3]);
*(_DWORD *)(*(_QWORD *)(v12 + 56) + 896LL) = v6;
if ( v10 )
break;
v10 = 1;
}
}
result = v12;
*(_DWORD *)(v12 + 80) = 6;
return result;
}
| mthd_stmt_flush_unbuffered:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RCX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP dword ptr [RCX + 0x50],0x2
MOV byte ptr [RBP + -0x21],AL
JBE 0x00126939
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x50],0x6
SETC AL
MOV byte ptr [RBP + -0x21],AL
LAB_00126939:
MOV AL,byte ptr [RBP + -0x21]
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x14],EAX
LAB_00126944:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x00116970
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,0xffffffff
CMP RAX,RCX
JZ 0x00126a3c
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x20],RAX
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x001269d0
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x001269d0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[RBP + -0x20]
CALL 0x00116f90
LEA RDI,[RBP + -0x20]
CALL 0x00116f90
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x380],ECX
JMP 0x00126a3e
LAB_001269d0:
CMP qword ptr [RBP + -0x10],0x8
JNC 0x00126a37
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JNZ 0x00126a37
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x00116e00
CMP AL,0x0
JZ 0x00126a33
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x4]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x380],ECX
CMP dword ptr [RBP + -0x14],0x0
JZ 0x00126a2a
JMP 0x00126a3e
LAB_00126a2a:
MOV dword ptr [RBP + -0x14],0x1
JMP 0x00126a35
LAB_00126a33:
JMP 0x00126a3e
LAB_00126a35:
JMP 0x00126a37
LAB_00126a37:
JMP 0x00126944
LAB_00126a3c:
JMP 0x00126a3e
LAB_00126a3e:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x50],0x6
ADD RSP,0x30
POP RBP
RET
|
void mthd_stmt_flush_unbuffered(long param_1)
{
char cVar1;
bool local_29;
byte *local_28;
uint local_1c;
ulong local_18;
long local_10;
local_29 = false;
if (2 < *(uint *)(param_1 + 0x50)) {
local_29 = *(uint *)(param_1 + 0x50) < 6;
}
local_1c = (uint)local_29;
local_10 = param_1;
do {
local_18 = ma_net_safe_read(*(int8 *)(local_10 + 0x38));
if (local_18 == 0xffffffff) {
LAB_00126a3e:
*(int4 *)(local_10 + 0x50) = 6;
return;
}
local_28 = *(byte **)(*(long *)(local_10 + 0x38) + 0x20);
if ((local_1c == 0) && (*local_28 == 0)) {
local_28 = local_28 + 1;
net_field_length(&local_28);
net_field_length(&local_28);
*(uint *)(*(long *)(local_10 + 0x38) + 0x380) =
(uint)*local_28 + (uint)local_28[1] * 0x100 & 0xffff;
goto LAB_00126a3e;
}
if ((local_18 < 8) && (*local_28 == 0xfe)) {
cVar1 = mariadb_connection(*(int8 *)(local_10 + 0x38));
if ((cVar1 == '\0') ||
(*(uint *)(*(long *)(local_10 + 0x38) + 0x380) =
(uint)local_28[3] + (uint)local_28[4] * 0x100 & 0xffff, local_1c != 0))
goto LAB_00126a3e;
local_1c = 1;
}
} while( true );
}
|
|
1,027 | is_not_initialized | eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c | static int is_not_initialized(MYSQL *mysql, const char *name)
{
if (initialized)
return 0;
my_set_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD,
SQLSTATE_UNKNOWN, ER(CR_AUTH_PLUGIN_CANNOT_LOAD),
name, "not initialized");
return 1;
} | O0 | c | is_not_initialized:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpb $0x0, 0x2d839(%rip) # 0x68fc0
je 0x3b792
movl $0x0, -0x4(%rbp)
jmp 0x3b7cc
movq -0x10(%rbp), %rdi
leaq 0x2baa3(%rip), %rax # 0x67240
movq (%rax), %rdx
leaq 0x2baa9(%rip), %rax # 0x67250
movq 0x1d8(%rax), %rcx
movq -0x18(%rbp), %r8
movl $0x80b, %esi # imm = 0x80B
leaq 0x1791f(%rip), %r9 # 0x530dd
movb $0x0, %al
callq 0x1bae0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| is_not_initialized:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp cs:initialized, 0
jz short loc_3B792
mov [rbp+var_4], 0
jmp short loc_3B7CC
loc_3B792:
mov rdi, [rbp+var_10]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rax, client_errors
mov rcx, [rax+1D8h]
mov r8, [rbp+var_18]
mov esi, 80Bh
lea r9, aNotInitialized; "not initialized"
mov al, 0
call my_set_error
mov [rbp+var_4], 1
loc_3B7CC:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long is_not_initialized(long long a1, long long a2)
{
if ( initialized )
{
return 0;
}
else
{
my_set_error(a1, 0x80Bu, (long long)SQLSTATE_UNKNOWN, (long long)client_errors[59], a2, "not initialized");
return 1;
}
}
| is_not_initialized:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP byte ptr [0x00168fc0],0x0
JZ 0x0013b792
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013b7cc
LAB_0013b792:
MOV RDI,qword ptr [RBP + -0x10]
LEA RAX,[0x167240]
MOV RDX,qword ptr [RAX]
LEA RAX,[0x167250]
MOV RCX,qword ptr [RAX + 0x1d8]
MOV R8,qword ptr [RBP + -0x18]
MOV ESI,0x80b
LEA R9,[0x1530dd]
MOV AL,0x0
CALL 0x0011bae0
MOV dword ptr [RBP + -0x4],0x1
LAB_0013b7cc:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
bool is_not_initialized(int8 param_1,int8 param_2)
{
bool bVar1;
bVar1 = initialized == '\0';
if (bVar1) {
my_set_error(param_1,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____00167428,
param_2,"not initialized");
}
return bVar1;
}
|
|
1,028 | check_mb_utf8mb3_sequence | eloqsql/libmariadb/libmariadb/ma_charset.c | static unsigned int check_mb_utf8mb3_sequence(const char *start, const char *end)
{
uchar c;
if (start >= end) {
return 0;
}
c = (uchar) start[0];
if (c < 0x80) {
return 1; /* single byte character */
}
if (c < 0xC2) {
return 0; /* invalid mb character */
}
if (c < 0xE0) {
if (start + 2 > end) {
return 0; /* too small */
}
if (!(((uchar)start[1] ^ 0x80) < 0x40)) {
return 0;
}
return 2;
}
if (c < 0xF0) {
if (start + 3 > end) {
return 0; /* too small */
}
if (!(((uchar)start[1] ^ 0x80) < 0x40 && ((uchar)start[2] ^ 0x80) < 0x40 &&
(c >= 0xE1 || (uchar)start[1] >= 0xA0))) {
return 0; /* invalid utf8 character */
}
return 3;
}
return 0;
} | O0 | c | check_mb_utf8mb3_sequence:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x76102
movl $0x0, -0x4(%rbp)
jmp 0x761fe
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x80, %eax
jge 0x76122
movl $0x1, -0x4(%rbp)
jmp 0x761fe
movzbl -0x19(%rbp), %eax
cmpl $0xc2, %eax
jge 0x76139
movl $0x0, -0x4(%rbp)
jmp 0x761fe
movzbl -0x19(%rbp), %eax
cmpl $0xe0, %eax
jge 0x76185
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x18(%rbp), %rax
jbe 0x7615e
movl $0x0, -0x4(%rbp)
jmp 0x761fe
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0x7617c
movl $0x0, -0x4(%rbp)
jmp 0x761fe
movl $0x2, -0x4(%rbp)
jmp 0x761fe
movzbl -0x19(%rbp), %eax
cmpl $0xf0, %eax
jge 0x761f7
movq -0x10(%rbp), %rax
addq $0x3, %rax
cmpq -0x18(%rbp), %rax
jbe 0x761a7
movl $0x0, -0x4(%rbp)
jmp 0x761fe
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x761e5
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x761e5
movzbl -0x19(%rbp), %eax
cmpl $0xe1, %eax
jge 0x761ee
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0x761ee
movl $0x0, -0x4(%rbp)
jmp 0x761fe
movl $0x3, -0x4(%rbp)
jmp 0x761fe
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| check_mb_utf8mb3_sequence:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jb short loc_76102
mov [rbp+var_4], 0
jmp loc_761FE
loc_76102:
mov rax, [rbp+var_10]
mov al, [rax]
mov [rbp+var_19], al
movzx eax, [rbp+var_19]
cmp eax, 80h
jge short loc_76122
mov [rbp+var_4], 1
jmp loc_761FE
loc_76122:
movzx eax, [rbp+var_19]
cmp eax, 0C2h
jge short loc_76139
mov [rbp+var_4], 0
jmp loc_761FE
loc_76139:
movzx eax, [rbp+var_19]
cmp eax, 0E0h
jge short loc_76185
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_18]
jbe short loc_7615E
mov [rbp+var_4], 0
jmp loc_761FE
loc_7615E:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_7617C
mov [rbp+var_4], 0
jmp loc_761FE
loc_7617C:
mov [rbp+var_4], 2
jmp short loc_761FE
loc_76185:
movzx eax, [rbp+var_19]
cmp eax, 0F0h
jge short loc_761F7
mov rax, [rbp+var_10]
add rax, 3
cmp rax, [rbp+var_18]
jbe short loc_761A7
mov [rbp+var_4], 0
jmp short loc_761FE
loc_761A7:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_761E5
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_761E5
movzx eax, [rbp+var_19]
cmp eax, 0E1h
jge short loc_761EE
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_761EE
loc_761E5:
mov [rbp+var_4], 0
jmp short loc_761FE
loc_761EE:
mov [rbp+var_4], 3
jmp short loc_761FE
loc_761F7:
mov [rbp+var_4], 0
loc_761FE:
mov eax, [rbp+var_4]
pop rbp
retn
| long long check_mb_utf8mb3_sequence(unsigned __int8 *a1, unsigned long long a2)
{
unsigned __int8 v3; // [rsp+1h] [rbp-19h]
if ( (unsigned long long)a1 < a2 )
{
v3 = *a1;
if ( *a1 >= 0x80u )
{
if ( v3 >= 0xC2u )
{
if ( v3 >= 0xE0u )
{
if ( v3 >= 0xF0u )
{
return 0;
}
else if ( (unsigned long long)(a1 + 3) <= a2 )
{
if ( (a1[1] ^ 0x80) < 64 && (a1[2] ^ 0x80) < 64 && (v3 >= 0xE1u || a1[1] >= 0xA0u) )
return 3;
else
return 0;
}
else
{
return 0;
}
}
else if ( (unsigned long long)(a1 + 2) <= a2 )
{
if ( (a1[1] ^ 0x80) < 64 )
return 2;
else
return 0;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
else
{
return 1;
}
}
else
{
return 0;
}
}
| check_mb_utf8mb3_sequence:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JC 0x00176102
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001761fe
LAB_00176102:
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x19],AL
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0x80
JGE 0x00176122
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001761fe
LAB_00176122:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xc2
JGE 0x00176139
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001761fe
LAB_00176139:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xe0
JGE 0x00176185
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x0017615e
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001761fe
LAB_0017615e:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x0017617c
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001761fe
LAB_0017617c:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001761fe
LAB_00176185:
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xf0
JGE 0x001761f7
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x001761a7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001761fe
LAB_001761a7:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001761e5
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x001761e5
MOVZX EAX,byte ptr [RBP + -0x19]
CMP EAX,0xe1
JGE 0x001761ee
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x001761ee
LAB_001761e5:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001761fe
LAB_001761ee:
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001761fe
LAB_001761f7:
MOV dword ptr [RBP + -0x4],0x0
LAB_001761fe:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 check_mb_utf8mb3_sequence(byte *param_1,byte *param_2)
{
byte bVar1;
int4 local_c;
if (param_1 < param_2) {
bVar1 = *param_1;
if (bVar1 < 0x80) {
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if (param_2 < param_1 + 2) {
local_c = 0;
}
else if ((param_1[1] ^ 0x80) < 0x40) {
local_c = 2;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf0) {
if (param_2 < param_1 + 3) {
local_c = 0;
}
else if ((((param_1[1] ^ 0x80) < 0x40) && ((param_1[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_1[1])))) {
local_c = 3;
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
1,029 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at(unsigned long) | monkey531[P]llama/common/./json.hpp | reference at(size_type idx)
{
// at only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
JSON_TRY
{
return set_parent(m_data.m_value.array->at(idx));
}
JSON_CATCH (std::out_of_range&)
{
// create better exception explanation
JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this));
}
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at(unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r15
cmpb $0x2, (%rdi)
jne 0xf8fa2
movq %rsi, %r12
movq 0x8(%r15), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
cmpq %rsi, %rdx
jbe 0xf9001
shlq $0x4, %r12
addq %r12, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1f550
movq %rax, %r14
movq %r15, %rdi
callq 0x578fc
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x54e2e(%rip), %rsi # 0x14ddf4
movq %rsp, %rdi
callq 0x77215
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x130, %esi # imm = 0x130
movq %r15, %rcx
callq 0x5ec72
xorl %ebp, %ebp
leaq 0xaf963(%rip), %rsi # 0x1a8950
leaq -0x79f60(%rip), %rdx # 0x7f094
movq %r14, %rdi
callq 0x202e0
jmp 0xf9089
leaq 0x62a01(%rip), %rdi # 0x15ba09
movq %r12, %rsi
xorl %eax, %eax
callq 0x20030
movq %rax, %rbx
cmpl $0x1, %edx
jne 0xf9121
movq %rbx, %rdi
callq 0x1f470
movl $0x20, %edi
callq 0x1f550
movq %rax, %r14
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x416c6
leaq 0x629a4(%rip), %rsi # 0x15b9eb
leaq 0x629aa(%rip), %rcx # 0x15b9f8
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xf9129
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x191, %esi # imm = 0x191
movq %r15, %rcx
callq 0x811e2
xorl %ebp, %ebp
leaq 0xafce6(%rip), %rsi # 0x1a8d60
leaq -0x79fed(%rip), %rdx # 0x7f094
movq %r14, %rdi
callq 0x202e0
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf90af
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0xf90af
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf90d2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0xf90d2
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0xf90df
movq %r14, %rdi
callq 0x1f7e0
callq 0x201d0
jmp 0xf9121
movq %rax, %rdi
callq 0x4029d
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf9114
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1fae0
jmp 0xf9114
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0xf9121
movq %r14, %rdi
callq 0x1f7e0
movq %rbx, %rdi
callq 0x20380
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atEm:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r15, rdi
cmp byte ptr [rdi], 2
jnz short loc_F8FA2
mov r12, rsi
mov rcx, [r15+8]
mov rax, [rcx]
mov rdx, [rcx+8]
sub rdx, rax
sar rdx, 4
cmp rdx, rsi
jbe short loc_F9001
shl r12, 4
add rax, r12
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_F8FA2:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, r14; this
mov esi, 130h; int
mov rcx, r15
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, r14; void *
call ___cxa_throw
jmp loc_F9089
loc_F9001:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
mov rsi, r12
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
mov rbx, rax
cmp edx, 1
jnz loc_F9121
mov rdi, rbx; void *
call ___cxa_begin_catch
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rdi, [rsp+68h+var_48]; this
mov rsi, r12; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rsi, aArrayIndex; "array index "
lea rcx, aIsOutOfRange; " is out of range"
mov rdi, rsp
lea rdx, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA13_KcS8_RA17_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[13],std::string,char const(&)[17]>(char const(&)[13],std::string,char const(&)[17] &&)
mov bpl, 1
mov rdx, rsp
mov rdi, r14; this
mov esi, 191h; int
mov rcx, r15
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_F9089:
mov rbx, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F90AF
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_F90AF
mov rbx, rax
mov bpl, 1
loc_F90AF:
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F90D2
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_F90D2
mov rbx, rax
mov bpl, 1
loc_F90D2:
test bpl, bpl
jz short loc_F90DF
mov rdi, r14; void *
call ___cxa_free_exception
loc_F90DF:
call ___cxa_end_catch
jmp short loc_F9121
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_F9114
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_F9114
mov rbx, rax
mov bpl, 1
loc_F9114:
test bpl, bpl
jz short loc_F9121
mov rdi, r14; void *
call ___cxa_free_exception
loc_F9121:
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::at(
long long a1,
unsigned long long a2)
{
_QWORD *v2; // rcx
unsigned long long v3; // rdx
nlohmann::json_abi_v3_11_3::detail::exception *exception; // r14
_QWORD v6[2]; // [rsp+0h] [rbp-68h] BYREF
const char *v7; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v6,
(long long)"cannot use at() with ",
&v7);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(_QWORD **)(a1 + 8);
v3 = (long long)(v2[1] - *v2) >> 4;
if ( v3 <= a2 )
std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", a2, v3);
return 16 * a2 + *v2;
}
| at:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R15,RDI
CMP byte ptr [RDI],0x2
JNZ 0x001f8fa2
MOV R12,RSI
MOV RCX,qword ptr [R15 + 0x8]
MOV RAX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x8]
SUB RDX,RAX
SAR RDX,0x4
CMP RDX,RSI
JBE 0x001f9001
SHL R12,0x4
ADD RAX,R12
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001f8fa2:
MOV EDI,0x20
CALL 0x0011f550
MOV R14,RAX
MOV RDI,R15
CALL 0x001578fc
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_001f8fbf:
LEA RSI,[0x24ddf4]
MOV RDI,RSP
CALL 0x00177215
MOV BPL,0x1
LAB_001f8fd1:
MOV RDX,RSP
MOV RDI,R14
MOV ESI,0x130
MOV RCX,R15
CALL 0x0015ec72
XOR EBP,EBP
LEA RSI,[0x2a8950]
LEA RDX,[0x17f094]
MOV RDI,R14
CALL 0x001202e0
LAB_001f9001:
LEA RDI,[0x25ba09]
MOV RSI,R12
XOR EAX,EAX
CALL 0x00120030
LAB_001f9012:
MOV RBX,RAX
CMP EDX,0x1
JNZ 0x001f9121
MOV RDI,RBX
CALL 0x0011f470
MOV EDI,0x20
CALL 0x0011f550
MOV R14,RAX
LAB_001f9033:
LEA RDI,[RSP + 0x20]
MOV RSI,R12
CALL 0x001416c6
LAB_001f9040:
LEA RSI,[0x25b9eb]
LEA RCX,[0x25b9f8]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001f9129
MOV BPL,0x1
LAB_001f905e:
MOV RDX,RSP
MOV RDI,R14
MOV ESI,0x191
MOV RCX,R15
CALL 0x001811e2
XOR EBP,EBP
LEA RSI,[0x2a8d60]
LEA RDX,[0x17f094]
MOV RDI,R14
CALL 0x001202e0
LAB_001f9121:
MOV RDI,RBX
CALL 0x00120380
|
/* 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>::at(unsigned long) */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::at(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
long lVar1;
int8 uVar2;
int1 auVar3 [12];
detail adStack_68 [32];
char *local_48 [4];
if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar2 = __cxa_allocate_exception(0x20);
local_48[0] = (char *)type_name(this);
/* try { // try from 001f8fbf to 001f8fcd has its CatchHandler @ 001f910e */
detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(adStack_68,"cannot use at() with ",local_48);
/* try { // try from 001f8fd1 to 001f8ffb has its CatchHandler @ 001f90ee */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x130,adStack_68,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
lVar1 = **(long **)(this + 8);
if (param_1 < (ulong)((*(long **)(this + 8))[1] - lVar1 >> 4)) {
return lVar1 + param_1 * 0x10;
}
/* try { // try from 001f9001 to 001f9011 has its CatchHandler @ 001f9012 */
auVar3 = std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)",
param_1);
/* catch(type#1 @ 003d7ac0) { ... } // from try @ 001f9001 with catch @ 001f9012
*/
if (auVar3._8_4_ == 1) {
__cxa_begin_catch(auVar3._0_8_);
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 001f9033 to 001f903f has its CatchHandler @ 001f90cc */
std::__cxx11::to_string((__cxx11 *)local_48,param_1);
/* try { // try from 001f9040 to 001f905a has its CatchHandler @ 001f90a9 */
detail::concat<std::__cxx11::string,char_const(&)[13],std::__cxx11::string,char_const(&)[17]>
(adStack_68,"array index ",(string *)local_48," is out of range");
/* try { // try from 001f905e to 001f9088 has its CatchHandler @ 001f9089 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x191,adStack_68,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::out_of_range::typeinfo,detail::exception::~exception);
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(auVar3._0_8_);
}
|
|
1,030 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at(unsigned long) | monkey531[P]llama/common/./json.hpp | reference at(size_type idx)
{
// at only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
JSON_TRY
{
return set_parent(m_data.m_value.array->at(idx));
}
JSON_CATCH (std::out_of_range&)
{
// create better exception explanation
JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this));
}
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at(unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
cmpb $0x2, (%rdi)
jne 0xb4613
movq %rsi, %r12
movq 0x8(%rbx), %rdi
callq 0xb477c
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x28580
movq %rax, %r14
movq %rbx, %rdi
callq 0x4f280
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3f747(%rip), %rsi # 0xf3d7c
movq %rsp, %rdi
callq 0x68de3
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x130, %esi # imm = 0x130
movq %rbx, %rcx
callq 0x549ae
xorl %ebp, %ebp
leaq 0xb0354(%rip), %rsi # 0x1649b0
leaq -0x447dd(%rip), %rdx # 0x6fe86
movq %r14, %rdi
callq 0x29320
jmp 0xb46e2
movq %rax, %r15
cmpl $0x1, %edx
jne 0xb473d
movq %r15, %rdi
callq 0x28480
pushq $0x20
popq %rdi
callq 0x28580
movq %rax, %r14
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x3caee
leaq 0x4d17b(%rip), %rsi # 0x10181b
leaq 0x4d181(%rip), %rcx # 0x101828
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xb479d
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x191, %esi # imm = 0x191
movq %rbx, %rcx
callq 0x719de
xorl %ebp, %ebp
leaq 0xb06cd(%rip), %rsi # 0x164da0
leaq -0x44854(%rip), %rdx # 0x6fe86
movq %r14, %rdi
callq 0x29320
movq %rax, %r15
movq %rsp, %rdi
callq 0x29678
jmp 0xb46f5
movq %rax, %r15
movb $0x1, %bpl
leaq 0x20(%rsp), %rdi
callq 0x29678
testb %bpl, %bpl
jne 0xb4709
jmp 0xb4711
movq %rax, %r15
movq %r14, %rdi
callq 0x28830
callq 0x29210
jmp 0xb473d
movq %rax, %rdi
callq 0x3bd35
movq %rax, %r15
movq %rsp, %rdi
callq 0x29678
testb %bpl, %bpl
jne 0xb4735
jmp 0xb473d
movq %rax, %r15
movq %r14, %rdi
callq 0x28830
movq %r15, %rdi
callq 0x293c0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atEm:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov rbx, rdi
cmp byte ptr [rdi], 2
jnz short loc_B4613
mov r12, rsi
mov rdi, [rbx+8]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE2atEm; 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>>::at(ulong)
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_B4613:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rbx
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, r14; this
mov esi, 130h; int
mov rcx, rbx
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, r14; void *
call ___cxa_throw
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::at(
long long a1)
{
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // r14
_BYTE v3[32]; // [rsp+0h] [rbp-68h] BYREF
const char *v4; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(
(long long)v3,
(long long)"cannot use at() with ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
(long long)v3);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::at(*(_QWORD *)(a1 + 8));
}
| at:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
CMP byte ptr [RDI],0x2
JNZ 0x001b4613
MOV R12,RSI
MOV RDI,qword ptr [RBX + 0x8]
LAB_001b4601:
CALL 0x001b477c
LAB_001b4606:
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001b4613:
PUSH 0x20
POP RDI
CALL 0x00128580
MOV R14,RAX
MOV RDI,RBX
CALL 0x0014f280
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_001b462e:
LEA RSI,[0x1f3d7c]
MOV RDI,RSP
CALL 0x00168de3
MOV BPL,0x1
LAB_001b4640:
MOV RDX,RSP
MOV RDI,R14
MOV ESI,0x130
MOV RCX,RBX
CALL 0x001549ae
XOR EBP,EBP
LEA RSI,[0x2649b0]
LEA RDX,[0x16fe86]
MOV RDI,R14
CALL 0x00129320
|
/* 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>::at(unsigned long) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::at(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
int8 uVar1;
detail adStack_68 [32];
char *local_48 [4];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
/* try { // try from 001b4601 to 001b4605 has its CatchHandler @ 001b466d */
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>>>
::at(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8),param_1);
return;
}
uVar1 = __cxa_allocate_exception(0x20);
local_48[0] = (char *)type_name(this);
/* try { // try from 001b462e to 001b463c has its CatchHandler @ 001b4732 */
detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(adStack_68,"cannot use at() with ",local_48);
/* try { // try from 001b4640 to 001b466a has its CatchHandler @ 001b4720 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x130,adStack_68,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
1,031 | flux::parser::Parser::synchronize() | kvthweatt[P]FluxLang/src/parser/parser.cpp | void Parser::synchronize() {
panicMode_ = false;
// Skip until we reach a statement boundary or declaration start
while (!check(lexer::TokenType::END_OF_FILE)) {
if (previous_.is(lexer::TokenType::SEMICOLON)) {
return; // Found a statement boundary
}
// Look for declaration starts
switch (current_.type()) {
case lexer::TokenType::KEYWORD_NAMESPACE:
case lexer::TokenType::KEYWORD_CLASS:
case lexer::TokenType::KEYWORD_OBJECT:
case lexer::TokenType::KEYWORD_DEF:
case lexer::TokenType::KEYWORD_IF:
case lexer::TokenType::KEYWORD_FOR:
case lexer::TokenType::KEYWORD_DO:
case lexer::TokenType::KEYWORD_WHILE:
case lexer::TokenType::KEYWORD_RETURN:
case lexer::TokenType::RIGHT_BRACE: // Stop at closing brace
case lexer::TokenType::KEYWORD_OPERATOR:
return;
default:
// Do nothing
break;
}
advance();
}
} | O0 | cpp | flux::parser::Parser::synchronize():
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movb $0x0, 0xe0(%rax)
movq -0x70(%rbp), %rdi
xorl %esi, %esi
callq 0x417c0
xorb $-0x1, %al
testb $0x1, %al
jne 0x42c21
jmp 0x42c86
movq -0x70(%rbp), %rdi
addq $0x68, %rdi
movl $0x58, %esi
callq 0x58f10
testb $0x1, %al
jne 0x42c39
jmp 0x42c3b
jmp 0x42c86
movq -0x70(%rbp), %rdi
addq $0x8, %rdi
callq 0x8fb0
addl $-0xb, %eax
movl %eax, %ecx
movq %rcx, -0x78(%rbp)
subl $0x55, %eax
ja 0x42c6c
movq -0x78(%rbp), %rax
leaq 0x20a3b(%rip), %rcx # 0x6369c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x42c86
jmp 0x42c6e
movq -0x70(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x417f0
leaq -0x68(%rbp), %rdi
callq 0xa300
jmp 0x42c0e
addq $0x80, %rsp
popq %rbp
retq
nop
| _ZN4flux6parser6Parser11synchronizeEv:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_70], rax
mov byte ptr [rax+0E0h], 0
loc_42C0E:
mov rdi, [rbp+var_70]
xor esi, esi
call _ZNK4flux6parser6Parser5checkENS_5lexer9TokenTypeE; flux::parser::Parser::check(flux::lexer::TokenType)
xor al, 0FFh
test al, 1
jnz short loc_42C21
jmp short loc_42C86
loc_42C21:
mov rdi, [rbp+var_70]
add rdi, 68h ; 'h'
mov esi, 58h ; 'X'
call _ZNK4flux5lexer5Token2isENS0_9TokenTypeE; flux::lexer::Token::is(flux::lexer::TokenType)
test al, 1
jnz short loc_42C39
jmp short loc_42C3B
loc_42C39:
jmp short loc_42C86
loc_42C3B:
mov rdi, [rbp+var_70]
add rdi, 8; this
call _ZNK4flux5lexer5Token4typeEv; flux::lexer::Token::type(void)
add eax, 0FFFFFFF5h; switch 86 cases
mov ecx, eax
mov [rbp+var_78], rcx
sub eax, 55h
ja short def_42C68; jumptable 0000000000042C68 default case, cases 12-14,16,18-20,23,24,26,28,30,32-46,48-95
mov rax, [rbp+var_78]
lea rcx, jpt_42C68
movsxd rax, ds:(jpt_42C68 - 6369Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_42C6A:
jmp short loc_42C86; jumptable 0000000000042C68 cases 11,15,17,21,22,25,27,29,31,47,96
def_42C68:
jmp short $+2; jumptable 0000000000042C68 default case, cases 12-14,16,18-20,23,24,26,28,30,32-46,48-95
loc_42C6E:
mov rsi, [rbp+var_70]
lea rdi, [rbp+var_68]; this
call _ZN4flux6parser6Parser7advanceEv; flux::parser::Parser::advance(void)
lea rdi, [rbp+var_68]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
jmp short loc_42C0E
loc_42C86:
add rsp, 80h
pop rbp
retn
| char flux::parser::Parser::synchronize(flux::parser::Parser *this)
{
char result; // al
int v2; // eax
int v3; // kr00_4
_BYTE v4[96]; // [rsp+18h] [rbp-68h] BYREF
flux::parser::Parser *v5; // [rsp+78h] [rbp-8h]
v5 = this;
*((_BYTE *)this + 224) = 0;
while ( 2 )
{
result = ~flux::parser::Parser::check((long long)this, 0);
if ( (result & 1) != 0 )
{
result = flux::lexer::Token::is((char *)this + 104, 88LL);
if ( (result & 1) == 0 )
{
v2 = flux::lexer::Token::type((flux::parser::Parser *)((char *)this + 8));
v3 = v2 - 11;
result = v2 - 11;
switch ( v3 )
{
case 0:
case 4:
case 6:
case 10:
case 11:
case 14:
case 16:
case 18:
case 20:
case 36:
case 85:
return result;
default:
flux::parser::Parser::advance((flux::parser::Parser *)v4, (long long)this);
flux::lexer::Token::~Token((flux::lexer::Token *)v4);
continue;
}
}
}
break;
}
return result;
}
| synchronize:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x70],RAX
MOV byte ptr [RAX + 0xe0],0x0
LAB_00142c0e:
MOV RDI,qword ptr [RBP + -0x70]
XOR ESI,ESI
CALL 0x001417c0
XOR AL,0xff
TEST AL,0x1
JNZ 0x00142c21
JMP 0x00142c86
LAB_00142c21:
MOV RDI,qword ptr [RBP + -0x70]
ADD RDI,0x68
MOV ESI,0x58
CALL 0x00158f10
TEST AL,0x1
JNZ 0x00142c39
JMP 0x00142c3b
LAB_00142c39:
JMP 0x00142c86
LAB_00142c3b:
MOV RDI,qword ptr [RBP + -0x70]
ADD RDI,0x8
CALL 0x00108fb0
ADD EAX,-0xb
MOV ECX,EAX
MOV qword ptr [RBP + -0x78],RCX
SUB EAX,0x55
JA 0x00142c6c
MOV RAX,qword ptr [RBP + -0x78]
LEA RCX,[0x16369c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_b:
JMP 0x00142c86
caseD_c:
JMP 0x00142c6e
LAB_00142c6e:
MOV RSI,qword ptr [RBP + -0x70]
LEA RDI,[RBP + -0x68]
CALL 0x001417f0
LEA RDI,[RBP + -0x68]
CALL 0x0010a300
JMP 0x00142c0e
LAB_00142c86:
ADD RSP,0x80
POP RBP
RET
|
/* flux::parser::Parser::synchronize() */
void __thiscall flux::parser::Parser::synchronize(Parser *this)
{
byte bVar1;
int4 uVar2;
ulong uVar3;
Token local_70 [96];
Parser *local_10;
this[0xe0] = (Parser)0x0;
local_10 = this;
while( true ) {
bVar1 = check(this,0);
if (((bVar1 ^ 0xff) & 1) == 0) {
return;
}
uVar3 = lexer::Token::is((Token *)(this + 0x68),0x58);
if ((uVar3 & 1) != 0) break;
uVar2 = lexer::Token::type((Token *)(this + 8));
switch(uVar2) {
case 0xb:
case 0xf:
case 0x11:
case 0x15:
case 0x16:
case 0x19:
case 0x1b:
case 0x1d:
case 0x1f:
case 0x2f:
case 0x60:
return;
default:
advance();
lexer::Token::~Token(local_70);
}
}
return;
}
|
|
1,032 | flux::parser::Parser::synchronize() | kvthweatt[P]FluxLang/src/parser/parser.cpp | void Parser::synchronize() {
panicMode_ = false;
// Skip until we reach a statement boundary or declaration start
while (!check(lexer::TokenType::END_OF_FILE)) {
if (previous_.is(lexer::TokenType::SEMICOLON)) {
return; // Found a statement boundary
}
// Look for declaration starts
switch (current_.type()) {
case lexer::TokenType::KEYWORD_NAMESPACE:
case lexer::TokenType::KEYWORD_CLASS:
case lexer::TokenType::KEYWORD_OBJECT:
case lexer::TokenType::KEYWORD_DEF:
case lexer::TokenType::KEYWORD_IF:
case lexer::TokenType::KEYWORD_FOR:
case lexer::TokenType::KEYWORD_DO:
case lexer::TokenType::KEYWORD_WHILE:
case lexer::TokenType::KEYWORD_RETURN:
case lexer::TokenType::RIGHT_BRACE: // Stop at closing brace
case lexer::TokenType::KEYWORD_OPERATOR:
return;
default:
// Do nothing
break;
}
advance();
}
} | O3 | cpp | flux::parser::Parser::synchronize():
movb $0x0, 0xe0(%rdi)
movl 0x8(%rdi), %eax
testl %eax, %eax
je 0x1434e
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
cmpl $0x58, 0x68(%rdi)
je 0x14343
leaq 0x58(%rsp), %r15
leaq 0x8(%rsp), %r14
movabsq $0x8000aa628800, %r12 # imm = 0x8000AA628800
cmpl $0x2f, %eax
ja 0x1430f
movl %eax, %ecx
btq %rcx, %r12
jb 0x14343
cmpl $0x60, %eax
je 0x14343
movq %r14, %rdi
movq %rbx, %rsi
callq 0x13522
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x14336
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x6280
movl 0x8(%rbx), %eax
testl %eax, %eax
je 0x14343
cmpl $0x58, 0x68(%rbx)
jne 0x14302
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| _ZN4flux6parser6Parser11synchronizeEv:
mov byte ptr [rdi+0E0h], 0
mov eax, [rdi+8]
test eax, eax
jz short locret_1434E
push r15
push r14
push r12
push rbx
sub rsp, 68h
mov rbx, rdi
cmp dword ptr [rdi+68h], 58h ; 'X'
jz short loc_14343
lea r15, [rsp+88h+var_30]
lea r14, [rsp+88h+var_80]
mov r12, 8000AA628800h
loc_14302:
cmp eax, 2Fh ; '/'
ja short loc_1430F
mov ecx, eax
bt r12, rcx
jb short loc_14343
loc_1430F:
cmp eax, 60h ; '`'
jz short loc_14343
mov rdi, r14; this
mov rsi, rbx
call _ZN4flux6parser6Parser7advanceEv; flux::parser::Parser::advance(void)
mov rdi, [rsp+88h+var_40]; void *
cmp rdi, r15
jz short loc_14336
mov rsi, [rsp+88h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_14336:
mov eax, [rbx+8]
test eax, eax
jz short loc_14343
cmp dword ptr [rbx+68h], 58h ; 'X'
jnz short loc_14302
loc_14343:
add rsp, 68h
pop rbx
pop r12
pop r14
pop r15
locret_1434E:
retn
| long long flux::parser::Parser::synchronize(flux::parser::Parser *this)
{
long long result; // rax
long long v2; // r12
_BYTE v3[64]; // [rsp+0h] [rbp-80h] BYREF
void *v4; // [rsp+40h] [rbp-40h]
long long v5; // [rsp+50h] [rbp-30h] BYREF
*((_BYTE *)this + 224) = 0;
result = *((unsigned int *)this + 2);
if ( (_DWORD)result && *((_DWORD *)this + 26) != 88 )
{
v2 = 0x8000AA628800LL;
do
{
if ( (unsigned int)result <= 0x2F && _bittest64(&v2, (unsigned int)result) || (_DWORD)result == 96 )
break;
flux::parser::Parser::advance((flux::parser::Parser *)v3);
if ( v4 != &v5 )
operator delete(v4, v5 + 1);
result = *((unsigned int *)this + 2);
if ( !(_DWORD)result )
break;
}
while ( *((_DWORD *)this + 26) != 88 );
}
return result;
}
| synchronize:
MOV byte ptr [RDI + 0xe0],0x0
MOV EAX,dword ptr [RDI + 0x8]
TEST EAX,EAX
JZ 0x0011434e
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBX,RDI
CMP dword ptr [RDI + 0x68],0x58
JZ 0x00114343
LEA R15,[RSP + 0x58]
LEA R14,[RSP + 0x8]
MOV R12,0x8000aa628800
LAB_00114302:
CMP EAX,0x2f
JA 0x0011430f
MOV ECX,EAX
BT R12,RCX
JC 0x00114343
LAB_0011430f:
CMP EAX,0x60
JZ 0x00114343
MOV RDI,R14
MOV RSI,RBX
CALL 0x00113522
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R15
JZ 0x00114336
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x00106280
LAB_00114336:
MOV EAX,dword ptr [RBX + 0x8]
TEST EAX,EAX
JZ 0x00114343
CMP dword ptr [RBX + 0x68],0x58
JNZ 0x00114302
LAB_00114343:
ADD RSP,0x68
POP RBX
POP R12
POP R14
POP R15
LAB_0011434e:
RET
|
/* flux::parser::Parser::synchronize() */
void __thiscall flux::parser::Parser::synchronize(Parser *this)
{
uint uVar1;
long *local_40;
long local_30 [2];
this[0xe0] = (Parser)0x0;
uVar1 = *(uint *)(this + 8);
if ((uVar1 != 0) && (*(int *)(this + 0x68) != 0x58)) {
while (((0x2f < uVar1 || ((0x8000aa628800U >> ((ulong)uVar1 & 0x3f) & 1) == 0)) &&
(uVar1 != 0x60))) {
advance();
if (local_40 != local_30) {
operator_delete(local_40,local_30[0] + 1);
}
uVar1 = *(uint *)(this + 8);
if (uVar1 == 0) {
return;
}
if (*(int *)(this + 0x68) == 0x58) {
return;
}
}
}
return;
}
|
|
1,033 | translog_relative_LSN_encode | eloqsql/storage/maria/ma_loghandler.c | static void translog_relative_LSN_encode(struct st_translog_parts *parts,
LSN base_lsn,
uint lsns, uchar *compressed_LSNs)
{
LEX_CUSTRING *part;
uint lsns_len= lsns * LSN_STORE_SIZE;
uchar buffer_src[MAX_NUMBER_OF_LSNS_PER_RECORD * LSN_STORE_SIZE];
uchar *buffer= buffer_src;
const uchar *cbuffer;
DBUG_ENTER("translog_relative_LSN_encode");
DBUG_ASSERT(parts->current != 0);
part= parts->parts + parts->current;
/* collect all LSN(s) in one chunk if it (they) is (are) divided */
if (part->length < lsns_len)
{
size_t copied= part->length;
LEX_CUSTRING *next_part;
DBUG_PRINT("info", ("Using buffer:%p", compressed_LSNs));
memcpy(buffer, part->str, part->length);
next_part= parts->parts + parts->current + 1;
do
{
DBUG_ASSERT(next_part < parts->parts + parts->elements);
if ((next_part->length + copied) < lsns_len)
{
memcpy(buffer + copied, next_part->str,
next_part->length);
copied+= next_part->length;
next_part->length= 0; next_part->str= 0;
/* delete_dynamic_element(&parts->parts, parts->current + 1); */
next_part++;
parts->current++;
part= parts->parts + parts->current;
}
else
{
size_t len= lsns_len - copied;
memcpy(buffer + copied, next_part->str, len);
copied= lsns_len;
next_part->str+= len;
next_part->length-= len;
}
} while (copied < lsns_len);
cbuffer= buffer;
}
else
{
cbuffer= part->str;
part->str+= lsns_len;
part->length-= lsns_len;
parts->current--;
part= parts->parts + parts->current;
}
{
/* Compress */
LSN ref;
int economy;
const uchar *src_ptr;
uchar *dst_ptr= compressed_LSNs + (MAX_NUMBER_OF_LSNS_PER_RECORD *
COMPRESSED_LSN_MAX_STORE_SIZE);
/*
We write the result in backward direction with no special sense or
tricks both directions are equal in complicity
*/
for (src_ptr= cbuffer + lsns_len - LSN_STORE_SIZE;
src_ptr >= (const uchar*)cbuffer;
src_ptr-= LSN_STORE_SIZE)
{
ref= lsn_korr(src_ptr);
dst_ptr= translog_put_LSN_diff(base_lsn, ref, dst_ptr);
}
part->length= (size_t)((compressed_LSNs +
(MAX_NUMBER_OF_LSNS_PER_RECORD *
COMPRESSED_LSN_MAX_STORE_SIZE)) -
dst_ptr);
economy= lsns_len - (uint)part->length;
parts->record_length-= economy;
DBUG_PRINT("info", ("new length of LSNs: %lu economy: %d",
(ulong)part->length, economy));
parts->total_record_length-= economy;
part->str= dst_ptr;
}
DBUG_VOID_RETURN;
} | O0 | c | translog_relative_LSN_encode:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movl %edx, -0x2c(%rbp)
movq %rcx, -0x38(%rbp)
imull $0x7, -0x2c(%rbp), %eax
movl %eax, -0x44(%rbp)
leaq -0x16(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x59548
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x44(%rbp), %ecx
cmpq %rcx, %rax
jae 0x596b1
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x59584
movq -0x50(%rbp), %rdi
movq -0x40(%rbp), %rax
movq (%rax), %rsi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x2a090
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x10, %rax
movq %rax, -0x68(%rbp)
jmp 0x595bc
jmp 0x595be
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x60(%rbp), %rax
movl -0x44(%rbp), %ecx
cmpq %rcx, %rax
jae 0x5964a
movq -0x50(%rbp), %rdi
addq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rax
movq (%rax), %rsi
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x2a090
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x68(%rbp), %rax
movq $0x0, (%rax)
movq -0x68(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x59695
movl -0x44(%rbp), %eax
subq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x50(%rbp), %rdi
addq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rax
movq (%rax), %rsi
movq -0x70(%rbp), %rdx
callq 0x2a090
movl -0x44(%rbp), %eax
movq %rax, -0x60(%rbp)
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x70(%rbp), %rdx
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x8(%rax)
jmp 0x59697
movq -0x60(%rbp), %rax
movl -0x44(%rbp), %ecx
cmpq %rcx, %rax
jb 0x595ba
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x59709
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movl -0x44(%rbp), %edx
movq -0x40(%rbp), %rax
movq (%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, (%rax)
movl -0x44(%rbp), %eax
movl %eax, %edx
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq $0x12, %rax
movq %rax, -0x90(%rbp)
movq -0x58(%rbp), %rax
movl -0x44(%rbp), %ecx
addq %rcx, %rax
addq $-0x7, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
cmpq -0x58(%rbp), %rax
jb 0x597aa
movq -0x88(%rbp), %rax
movzbl (%rax), %eax
movq -0x88(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x88(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
shlq $0x20, %rax
movq -0x88(%rbp), %rcx
movl 0x3(%rcx), %ecx
orq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x90(%rbp), %rdx
callq 0x5aab0
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rax
addq $-0x7, %rax
movq %rax, -0x88(%rbp)
jmp 0x5972d
movq -0x38(%rbp), %rcx
addq $0x12, %rcx
movq -0x90(%rbp), %rax
subq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x44(%rbp), %eax
movq -0x40(%rbp), %rcx
movq 0x8(%rcx), %rcx
subl %ecx, %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %edx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
jmp 0x597e3
movl -0x7c(%rbp), %edx
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4(%rax)
movq -0x90(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
jmp 0x59802
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5981d
addq $0x90, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| translog_relative_LSN_encode:
push rbp
mov rbp, rsp
sub rsp, 90h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_2C], edx
mov [rbp+var_38], rcx
imul eax, [rbp+var_2C], 7
mov [rbp+var_44], eax
lea rax, [rbp+var_16]
mov [rbp+var_50], rax
jmp short $+2
loc_59548:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_20]
mov ecx, [rcx+8]
shl rcx, 4
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov rax, [rax+8]
mov ecx, [rbp+var_44]
cmp rax, rcx
jnb loc_596B1
mov rax, [rbp+var_40]
mov rax, [rax+8]
mov [rbp+var_60], rax
jmp short $+2
loc_59584:
mov rdi, [rbp+var_50]
mov rax, [rbp+var_40]
mov rsi, [rax]
mov rax, [rbp+var_40]
mov rdx, [rax+8]
call _memcpy
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_20]
mov ecx, [rcx+8]
shl rcx, 4
add rax, rcx
add rax, 10h
mov [rbp+var_68], rax
loc_595BA:
jmp short $+2
loc_595BC:
jmp short $+2
loc_595BE:
mov rax, [rbp+var_68]
mov rax, [rax+8]
add rax, [rbp+var_60]
mov ecx, [rbp+var_44]
cmp rax, rcx
jnb short loc_5964A
mov rdi, [rbp+var_50]
add rdi, [rbp+var_60]
mov rax, [rbp+var_68]
mov rsi, [rax]
mov rax, [rbp+var_68]
mov rdx, [rax+8]
call _memcpy
mov rax, [rbp+var_68]
mov rax, [rax+8]
add rax, [rbp+var_60]
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
mov qword ptr [rax+8], 0
mov rax, [rbp+var_68]
mov qword ptr [rax], 0
mov rax, [rbp+var_68]
add rax, 10h
mov [rbp+var_68], rax
mov rax, [rbp+var_20]
mov ecx, [rax+8]
add ecx, 1
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_20]
mov ecx, [rcx+8]
shl rcx, 4
add rax, rcx
mov [rbp+var_40], rax
jmp short loc_59695
loc_5964A:
mov eax, [rbp+var_44]
sub rax, [rbp+var_60]
mov [rbp+var_70], rax
mov rdi, [rbp+var_50]
add rdi, [rbp+var_60]
mov rax, [rbp+var_68]
mov rsi, [rax]
mov rdx, [rbp+var_70]
call _memcpy
mov eax, [rbp+var_44]
mov [rbp+var_60], rax
mov rcx, [rbp+var_70]
mov rax, [rbp+var_68]
add rcx, [rax]
mov [rax], rcx
mov rdx, [rbp+var_70]
mov rax, [rbp+var_68]
mov rcx, [rax+8]
sub rcx, rdx
mov [rax+8], rcx
loc_59695:
jmp short $+2
loc_59697:
mov rax, [rbp+var_60]
mov ecx, [rbp+var_44]
cmp rax, rcx
jb loc_595BA
mov rax, [rbp+var_50]
mov [rbp+var_58], rax
jmp short loc_59709
loc_596B1:
mov rax, [rbp+var_40]
mov rax, [rax]
mov [rbp+var_58], rax
mov edx, [rbp+var_44]
mov rax, [rbp+var_40]
mov rcx, [rax]
mov edx, edx
add rcx, rdx
mov [rax], rcx
mov eax, [rbp+var_44]
mov edx, eax
mov rax, [rbp+var_40]
mov rcx, [rax+8]
sub rcx, rdx
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov ecx, [rax+8]
add ecx, 0FFFFFFFFh
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_20]
mov ecx, [rcx+8]
shl rcx, 4
add rax, rcx
mov [rbp+var_40], rax
loc_59709:
mov rax, [rbp+var_38]
add rax, 12h
mov [rbp+var_90], rax
mov rax, [rbp+var_58]
mov ecx, [rbp+var_44]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFF9h
mov [rbp+var_88], rax
loc_5972D:
mov rax, [rbp+var_88]
cmp rax, [rbp+var_58]
jb short loc_597AA
mov rax, [rbp+var_88]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_88]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_88]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
shl rax, 20h
mov rcx, [rbp+var_88]
mov ecx, [rcx+3]
or rax, rcx
mov [rbp+var_78], rax
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_78]
mov rdx, [rbp+var_90]
call translog_put_LSN_diff
mov [rbp+var_90], rax
mov rax, [rbp+var_88]
add rax, 0FFFFFFFFFFFFFFF9h
mov [rbp+var_88], rax
jmp short loc_5972D
loc_597AA:
mov rcx, [rbp+var_38]
add rcx, 12h
mov rax, [rbp+var_90]
sub rcx, rax
mov rax, [rbp+var_40]
mov [rax+8], rcx
mov eax, [rbp+var_44]
mov rcx, [rbp+var_40]
mov rcx, [rcx+8]
sub eax, ecx
mov [rbp+var_7C], eax
mov edx, [rbp+var_7C]
mov rax, [rbp+var_20]
mov ecx, [rax]
sub ecx, edx
mov [rax], ecx
jmp short $+2
loc_597E3:
mov edx, [rbp+var_7C]
mov rax, [rbp+var_20]
mov ecx, [rax+4]
sub ecx, edx
mov [rax+4], ecx
mov rcx, [rbp+var_90]
mov rax, [rbp+var_40]
mov [rax], rcx
jmp short $+2
loc_59802:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5981D
add rsp, 90h
pop rbp
retn
loc_5981D:
call ___stack_chk_fail
| unsigned long long translog_relative_LSN_encode(long long a1, long long a2, int a3, long long a4)
{
long long v5; // [rsp+0h] [rbp-90h]
unsigned __int16 *i; // [rsp+8h] [rbp-88h]
int v7; // [rsp+14h] [rbp-7Ch]
unsigned long long v8; // [rsp+20h] [rbp-70h]
_QWORD *v9; // [rsp+28h] [rbp-68h]
unsigned long long v10; // [rsp+30h] [rbp-60h]
unsigned __int16 *v11; // [rsp+38h] [rbp-58h]
unsigned int v12; // [rsp+4Ch] [rbp-44h]
long long *v13; // [rsp+50h] [rbp-40h]
long long v15; // [rsp+70h] [rbp-20h]
_BYTE v16[14]; // [rsp+7Ah] [rbp-16h] BYREF
unsigned long long v17; // [rsp+88h] [rbp-8h]
v17 = __readfsqword(0x28u);
v15 = a1;
v12 = 7 * a3;
v13 = (long long *)(16LL * *(unsigned int *)(v15 + 8) + *(_QWORD *)(v15 + 16));
if ( v13[1] >= (unsigned long long)(unsigned int)(7 * a3) )
{
v11 = (unsigned __int16 *)*v13;
*v13 += v12;
v13[1] -= v12;
v13 = (long long *)(16LL * (unsigned int)--*(_DWORD *)(v15 + 8) + *(_QWORD *)(v15 + 16));
}
else
{
v10 = v13[1];
memcpy(v16, *v13, v10);
v9 = (_QWORD *)(16LL * *(unsigned int *)(v15 + 8) + *(_QWORD *)(v15 + 16) + 16);
do
{
if ( v10 + v9[1] >= v12 )
{
v8 = v12 - v10;
memcpy(&v16[v10], *v9, v8);
v10 = v12;
*v9 += v8;
v9[1] -= v8;
}
else
{
memcpy(&v16[v10], *v9, v9[1]);
v10 += v9[1];
v9[1] = 0LL;
*v9 = 0LL;
v9 += 2;
v13 = (long long *)(16LL * (unsigned int)++*(_DWORD *)(v15 + 8) + *(_QWORD *)(v15 + 16));
}
}
while ( v10 < v12 );
v11 = (unsigned __int16 *)v16;
}
v5 = a4 + 18;
for ( i = (unsigned __int16 *)((char *)v11 + v12 - 7); i >= v11; i = (unsigned __int16 *)((char *)i - 7) )
v5 = translog_put_LSN_diff(
a2,
*(unsigned int *)((char *)i + 3) | ((unsigned long long)((*((unsigned __int8 *)i + 2) << 16) | (unsigned int)*i) << 32),
v5);
v13[1] = a4 + 18 - v5;
v7 = v12 - v13[1];
*(_DWORD *)v15 -= v7;
*(_DWORD *)(v15 + 4) -= v7;
*v13 = v5;
return __readfsqword(0x28u);
}
| translog_relative_LSN_encode:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV dword ptr [RBP + -0x2c],EDX
MOV qword ptr [RBP + -0x38],RCX
IMUL EAX,dword ptr [RBP + -0x2c],0x7
MOV dword ptr [RBP + -0x44],EAX
LEA RAX,[RBP + -0x16]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00159548
LAB_00159548:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x8]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x44]
CMP RAX,RCX
JNC 0x001596b1
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00159584
LAB_00159584:
MOV RDI,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x8]
SHL RCX,0x4
ADD RAX,RCX
ADD RAX,0x10
MOV qword ptr [RBP + -0x68],RAX
LAB_001595ba:
JMP 0x001595bc
LAB_001595bc:
JMP 0x001595be
LAB_001595be:
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RBP + -0x44]
CMP RAX,RCX
JNC 0x0015964a
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x10
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x8]
ADD ECX,0x1
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x8]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00159695
LAB_0015964a:
MOV EAX,dword ptr [RBP + -0x44]
SUB RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x50]
ADD RDI,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x70]
CALL 0x0012a090
MOV EAX,dword ptr [RBP + -0x44]
MOV qword ptr [RBP + -0x60],RAX
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x68]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV RDX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,RDX
MOV qword ptr [RAX + 0x8],RCX
LAB_00159695:
JMP 0x00159697
LAB_00159697:
MOV RAX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RBP + -0x44]
CMP RAX,RCX
JC 0x001595ba
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00159709
LAB_001596b1:
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV EDX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX]
MOV EDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x44]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x8]
SUB RCX,RDX
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x8]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x8]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_00159709:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x12
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV ECX,dword ptr [RBP + -0x44]
ADD RAX,RCX
ADD RAX,-0x7
MOV qword ptr [RBP + -0x88],RAX
LAB_0015972d:
MOV RAX,qword ptr [RBP + -0x88]
CMP RAX,qword ptr [RBP + -0x58]
JC 0x001597aa
MOV RAX,qword ptr [RBP + -0x88]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x88]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x88]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
SHL RAX,0x20
MOV RCX,qword ptr [RBP + -0x88]
MOV ECX,dword ptr [RCX + 0x3]
OR RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x90]
CALL 0x0015aab0
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x88]
ADD RAX,-0x7
MOV qword ptr [RBP + -0x88],RAX
JMP 0x0015972d
LAB_001597aa:
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,0x12
MOV RAX,qword ptr [RBP + -0x90]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RBP + -0x44]
MOV RCX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RCX + 0x8]
SUB EAX,ECX
MOV dword ptr [RBP + -0x7c],EAX
MOV EDX,dword ptr [RBP + -0x7c]
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX]
SUB ECX,EDX
MOV dword ptr [RAX],ECX
JMP 0x001597e3
LAB_001597e3:
MOV EDX,dword ptr [RBP + -0x7c]
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x4]
SUB ECX,EDX
MOV dword ptr [RAX + 0x4],ECX
MOV RCX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
JMP 0x00159802
LAB_00159802:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015981d
ADD RSP,0x90
POP RBP
RET
LAB_0015981d:
CALL 0x0012a270
|
void translog_relative_LSN_encode(int *param_1,int8 param_2,int param_3,long param_4)
{
int3 *puVar1;
uint uVar2;
int iVar3;
size_t __n;
long in_FS_OFFSET;
long local_98;
int3 *local_90;
long *local_70;
ulong local_68;
int3 *local_60;
long *local_48;
int3 local_1e [3];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = param_3 * 7;
local_60 = local_1e;
local_48 = (long *)(*(long *)(param_1 + 4) + (ulong)(uint)param_1[2] * 0x10);
if ((ulong)local_48[1] < (ulong)uVar2) {
local_68 = local_48[1];
memcpy(local_60,(void *)*local_48,local_48[1]);
local_70 = (long *)(*(long *)(param_1 + 4) + (ulong)(uint)param_1[2] * 0x10 + 0x10);
do {
if (local_70[1] + local_68 < (ulong)uVar2) {
memcpy((void *)((long)local_60 + local_68),(void *)*local_70,local_70[1]);
local_68 = local_70[1] + local_68;
local_70[1] = 0;
*local_70 = 0;
local_70 = local_70 + 2;
param_1[2] = param_1[2] + 1;
local_48 = (long *)(*(long *)(param_1 + 4) + (ulong)(uint)param_1[2] * 0x10);
}
else {
__n = uVar2 - local_68;
memcpy((void *)((long)local_60 + local_68),(void *)*local_70,__n);
local_68 = (ulong)uVar2;
*local_70 = __n + *local_70;
local_70[1] = local_70[1] - __n;
}
} while (local_68 < uVar2);
}
else {
local_60 = (int3 *)*local_48;
*local_48 = *local_48 + (ulong)uVar2;
local_48[1] = local_48[1] - (ulong)uVar2;
param_1[2] = param_1[2] + -1;
local_48 = (long *)(*(long *)(param_1 + 4) + (ulong)(uint)param_1[2] * 0x10);
}
local_98 = param_4 + 0x12;
puVar1 = (int3 *)((long)local_60 + (ulong)uVar2);
while (local_90 = (int3 *)((long)puVar1 + -7), local_60 <= local_90) {
local_98 = translog_put_LSN_diff
(param_2,(ulong)CONCAT34(*local_90,*(int4 *)(puVar1 + -1)),local_98);
puVar1 = local_90;
}
local_48[1] = (param_4 + 0x12) - local_98;
iVar3 = uVar2 - (int)local_48[1];
*param_1 = *param_1 - iVar3;
param_1[1] = param_1[1] - iVar3;
*local_48 = local_98;
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
|
|
1,034 | MyCTX::update(unsigned char const*, unsigned int, unsigned char*, unsigned int*) | eloqsql/mysys_ssl/my_crypt.cc | virtual int update(const uchar *src, uint slen, uchar *dst, uint *dlen)
{
#ifdef HAVE_WOLFSSL
// WolfSSL checks parameters and does not like NULL pointers to be passed to function below.
if (!src)
{
static uchar dummy[MY_AES_BLOCK_SIZE];
DBUG_ASSERT(!slen);
src=dummy;
}
#endif
if (EVP_CipherUpdate(ctx, dst, (int*)dlen, src, slen) != 1)
return MY_AES_OPENSSL_ERROR;
return MY_AES_OK;
} | O3 | cpp | MyCTX::update(unsigned char const*, unsigned int, unsigned char*, unsigned int*):
pushq %rbp
movq %rsp, %rbp
movl %edx, %eax
movq %rsi, %r9
movq 0xc8(%rdi), %rdi
movq %rcx, %rsi
movq %r8, %rdx
movq %r9, %rcx
movl %eax, %r8d
callq 0x29870
xorl %ecx, %ecx
cmpl $0x1, %eax
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmovel %ecx, %eax
popq %rbp
retq
| _ZN5MyCTX6updateEPKhjPhPj:
push rbp
mov rbp, rsp
mov eax, edx
mov r9, rsi
mov rdi, [rdi+0C8h]
mov rsi, rcx
mov rdx, r8
mov rcx, r9
mov r8d, eax
call _EVP_CipherUpdate
xor ecx, ecx
cmp eax, 1
mov eax, 0FFFFFF9Bh
cmovz eax, ecx
pop rbp
retn
| long long MyCTX::update(
MyCTX *this,
const unsigned __int8 *a2,
unsigned int a3,
unsigned __int8 *a4,
unsigned int *a5)
{
bool v5; // zf
long long result; // rax
v5 = (unsigned int)EVP_CipherUpdate(*((_QWORD *)this + 25), a4, a5, a2) == 1;
result = 4294967195LL;
if ( v5 )
return 0LL;
return result;
}
| update:
PUSH RBP
MOV RBP,RSP
MOV EAX,EDX
MOV R9,RSI
MOV RDI,qword ptr [RDI + 0xc8]
MOV RSI,RCX
MOV RDX,R8
MOV RCX,R9
MOV R8D,EAX
CALL 0x00129870
XOR ECX,ECX
CMP EAX,0x1
MOV EAX,0xffffff9b
CMOVZ EAX,ECX
POP RBP
RET
|
/* MyCTX::update(unsigned char const*, unsigned int, unsigned char*, unsigned int*) */
int8 __thiscall
MyCTX::update(MyCTX *this,uchar *param_1,uint param_2,uchar *param_3,uint *param_4)
{
int iVar1;
int8 uVar2;
iVar1 = EVP_CipherUpdate(*(EVP_CIPHER_CTX **)(this + 200),param_3,(int *)param_4,param_1,param_2);
uVar2 = 0xffffff9b;
if (iVar1 == 1) {
uVar2 = 0;
}
return uVar2;
}
|
|
1,035 | my_instr_bin | eloqsql/strings/ctype-bin.c | static
uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)),
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch)
{
register const uchar *str, *search, *end, *search_end;
if (s_length <= b_length)
{
if (!s_length)
{
if (nmatch)
{
match->beg= 0;
match->end= 0;
match->mb_len= 0;
}
return 1; /* Empty string is always found */
}
str= (const uchar*) b;
search= (const uchar*) s;
end= (const uchar*) b+b_length-s_length+1;
search_end= (const uchar*) s + s_length;
skip:
while (str != end)
{
if ( (*str++) == (*search))
{
register const uchar *i,*j;
i= str;
j= search+1;
while (j != search_end)
if ((*i++) != (*j++))
goto skip;
if (nmatch > 0)
{
match[0].beg= 0;
match[0].end= (uint) (str- (const uchar*)b-1);
match[0].mb_len= match[0].end;
if (nmatch > 1)
{
match[1].beg= match[0].end;
match[1].end= (uint)(match[0].end+s_length);
match[1].mb_len= match[1].end-match[1].beg;
}
}
return 2;
}
}
}
return 0;
} | O0 | c | my_instr_bin:
pushq %rbp
movq %rsp, %rbp
movl 0x10(%rbp), %eax
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 -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x4612b
cmpq $0x0, -0x30(%rbp)
jne 0x45ff6
cmpl $0x0, 0x10(%rbp)
je 0x45fea
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x8(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x46132
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
xorl %ecx, %ecx
subq -0x30(%rbp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x4602d
movq -0x40(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0x46129
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movzbl (%rax), %eax
movq -0x48(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x46124
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x58(%rbp), %rax
je 0x460a6
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movzbl (%rax), %eax
movq -0x68(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x68(%rbp)
movzbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x460a4
jmp 0x4602b
jmp 0x46070
cmpl $0x0, 0x10(%rbp)
jbe 0x4611b
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
cmpl $0x1, 0x10(%rbp)
jbe 0x46119
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
addq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x38(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x38(%rbp), %rax
subl 0xc(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0x4611b
movl $0x2, -0x4(%rbp)
jmp 0x46132
jmp 0x4602d
jmp 0x4612b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| my_instr_bin:
push rbp
mov rbp, rsp
mov eax, [rbp+arg_0]
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_30]
cmp rax, [rbp+var_20]
ja loc_4612B
cmp [rbp+var_30], 0
jnz short loc_45FF6
cmp [rbp+arg_0], 0
jz short loc_45FEA
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+4], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+8], 0
loc_45FEA:
mov [rbp+var_4], 1
jmp loc_46132
loc_45FF6:
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
xor ecx, ecx
sub rcx, [rbp+var_30]
add rax, rcx
add rax, 1
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
mov [rbp+var_58], rax
loc_4602B:
jmp short $+2
loc_4602D:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_50]
jz loc_46129
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 1
mov [rbp+var_40], rcx
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx]
cmp eax, ecx
jnz loc_46124
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_68], rax
loc_46070:
mov rax, [rbp+var_68]
cmp rax, [rbp+var_58]
jz short loc_460A6
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 1
mov [rbp+var_60], rcx
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_68]
mov rdx, rcx
add rdx, 1
mov [rbp+var_68], rdx
movzx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_460A4
jmp short loc_4602B
loc_460A4:
jmp short loc_46070
loc_460A6:
cmp [rbp+arg_0], 0
jbe short loc_4611B
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_40]
mov rcx, [rbp+var_18]
sub rax, rcx
sub rax, 1
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+4], ecx
mov rax, [rbp+var_38]
mov ecx, [rax+4]
mov rax, [rbp+var_38]
mov [rax+8], ecx
cmp [rbp+arg_0], 1
jbe short loc_46119
mov rax, [rbp+var_38]
mov ecx, [rax+4]
mov rax, [rbp+var_38]
mov [rax+0Ch], ecx
mov rax, [rbp+var_38]
mov eax, [rax+4]
add rax, [rbp+var_30]
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+10h], ecx
mov rax, [rbp+var_38]
mov ecx, [rax+10h]
mov rax, [rbp+var_38]
sub ecx, [rax+0Ch]
mov rax, [rbp+var_38]
mov [rax+14h], ecx
loc_46119:
jmp short $+2
loc_4611B:
mov [rbp+var_4], 2
jmp short loc_46132
loc_46124:
jmp loc_4602D
loc_46129:
jmp short $+2
loc_4612B:
mov [rbp+var_4], 0
loc_46132:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_instr_bin(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5,
_DWORD *a6,
unsigned int a7)
{
unsigned __int8 *v7; // rax
unsigned __int8 *v8; // rax
unsigned __int8 *v9; // rcx
unsigned __int8 *v11; // [rsp+0h] [rbp-68h]
unsigned __int8 *v12; // [rsp+8h] [rbp-60h]
unsigned __int8 *v13; // [rsp+10h] [rbp-58h]
unsigned __int8 *v14; // [rsp+28h] [rbp-40h]
if ( a5 > a3 )
return 0;
if ( a5 )
{
v14 = a2;
v13 = &a4[a5];
LABEL_7:
while ( v14 != &a2[a3 - a5 + 1] )
{
v7 = v14++;
if ( *v7 == *a4 )
{
v12 = v14;
v11 = a4 + 1;
while ( v11 != v13 )
{
v8 = v12++;
v9 = v11++;
if ( *v8 != *v9 )
goto LABEL_7;
}
if ( a7 )
{
*a6 = 0;
a6[1] = (_DWORD)v14 - (_DWORD)a2 - 1;
a6[2] = a6[1];
if ( a7 > 1 )
{
a6[3] = a6[1];
a6[4] = a5 + a6[1];
a6[5] = a6[4] - a6[3];
}
}
return 2;
}
}
return 0;
}
if ( a7 )
{
*a6 = 0;
a6[1] = 0;
a6[2] = 0;
}
return 1;
}
| my_instr_bin:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RBP + 0x10]
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 + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JA 0x0014612b
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00145ff6
CMP dword ptr [RBP + 0x10],0x0
JZ 0x00145fea
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],0x0
LAB_00145fea:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00146132
LAB_00145ff6:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
XOR ECX,ECX
SUB RCX,qword ptr [RBP + -0x30]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
LAB_0014602b:
JMP 0x0014602d
LAB_0014602d:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x50]
JZ 0x00146129
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x40],RCX
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
JNZ 0x00146124
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
LAB_00146070:
MOV RAX,qword ptr [RBP + -0x68]
CMP RAX,qword ptr [RBP + -0x58]
JZ 0x001460a6
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x60],RCX
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x68]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x68],RDX
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x001460a4
JMP 0x0014602b
LAB_001460a4:
JMP 0x00146070
LAB_001460a6:
CMP dword ptr [RBP + 0x10],0x0
JBE 0x0014611b
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
SUB RAX,0x1
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],ECX
CMP dword ptr [RBP + 0x10],0x1
JBE 0x00146119
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x4]
ADD RAX,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x38]
SUB ECX,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x14],ECX
LAB_00146119:
JMP 0x0014611b
LAB_0014611b:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00146132
LAB_00146124:
JMP 0x0014602d
LAB_00146129:
JMP 0x0014612b
LAB_0014612b:
MOV dword ptr [RBP + -0x4],0x0
LAB_00146132:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4
my_instr_bin(int8 param_1,char *param_2,ulong param_3,char *param_4,ulong param_5,
int4 *param_6,uint param_7)
{
char cVar1;
char cVar2;
char *pcVar3;
char *local_70;
char *local_68;
char *local_48;
if (param_5 <= param_3) {
if (param_5 == 0) {
if (param_7 != 0) {
*param_6 = 0;
param_6[1] = 0;
param_6[2] = 0;
}
return 1;
}
local_48 = param_2;
while (local_48 != param_2 + (param_3 - param_5) + 1) {
pcVar3 = local_48 + 1;
cVar1 = *local_48;
local_48 = pcVar3;
if (cVar1 == *param_4) {
local_70 = param_4 + 1;
local_68 = pcVar3;
do {
if (local_70 == param_4 + param_5) {
if (param_7 != 0) {
*param_6 = 0;
param_6[1] = ((int)pcVar3 - (int)param_2) + -1;
param_6[2] = param_6[1];
if (1 < param_7) {
param_6[3] = param_6[1];
param_6[4] = param_6[1] + (int)param_5;
param_6[5] = param_6[4] - param_6[3];
}
}
return 2;
}
cVar1 = *local_68;
cVar2 = *local_70;
local_70 = local_70 + 1;
local_68 = local_68 + 1;
} while (cVar1 == cVar2);
}
}
}
return 0;
}
|
|
1,036 | ma_scan_end_block_record | eloqsql/storage/maria/ma_blockrec.c | void _ma_scan_end_block_record(MARIA_HA *info)
{
DBUG_ENTER("_ma_scan_end_block_record");
my_free(info->scan.bitmap_buff);
info->scan.bitmap_buff= 0;
if (info->scan_save)
{
my_free(info->scan_save);
info->scan_save= 0;
}
DBUG_VOID_RETURN;
} | O3 | c | ma_scan_end_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x220(%rdi), %rdi
callq 0xbf54e
movq $0x0, 0x220(%rbx)
movq 0x280(%rbx), %rdi
testq %rdi, %rdi
je 0x37187
callq 0xbf54e
movq $0x0, 0x280(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _ma_scan_end_block_record:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+220h]
call my_free
mov qword ptr [rbx+220h], 0
mov rdi, [rbx+280h]
test rdi, rdi
jz short loc_37187
call my_free
mov qword ptr [rbx+280h], 0
loc_37187:
add rsp, 8
pop rbx
pop rbp
retn
| long long ma_scan_end_block_record(long long a1)
{
long long result; // rax
long long v3; // rdi
result = my_free(*(_QWORD *)(a1 + 544));
*(_QWORD *)(a1 + 544) = 0LL;
v3 = *(_QWORD *)(a1 + 640);
if ( v3 )
{
result = my_free(v3);
*(_QWORD *)(a1 + 640) = 0LL;
}
return result;
}
| _ma_scan_end_block_record:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x220]
CALL 0x001bf54e
MOV qword ptr [RBX + 0x220],0x0
MOV RDI,qword ptr [RBX + 0x280]
TEST RDI,RDI
JZ 0x00137187
CALL 0x001bf54e
MOV qword ptr [RBX + 0x280],0x0
LAB_00137187:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void _ma_scan_end_block_record(long param_1)
{
my_free(*(int8 *)(param_1 + 0x220));
*(int8 *)(param_1 + 0x220) = 0;
if (*(long *)(param_1 + 0x280) != 0) {
my_free();
*(int8 *)(param_1 + 0x280) = 0;
}
return;
}
|
|
1,037 | table_tiws_by_table::read_row_values(TABLE*, unsigned char*, Field**, bool) | eloqsql/storage/perfschema/table_tiws_by_table.cc | int table_tiws_by_table::read_row_values(TABLE *table,
unsigned char *buf,
Field **fields,
bool read_all)
{
Field *f;
if (unlikely(! m_row_exists))
return HA_ERR_RECORD_DELETED;
/* Set the null bits */
assert(table->s->null_bytes == 1);
buf[0]= 0;
for (; (f= *fields) ; fields++)
{
if (read_all || bitmap_is_set(table->read_set, f->field_index))
{
switch(f->field_index)
{
case 0: /* OBJECT_TYPE */
case 1: /* SCHEMA_NAME */
case 2: /* OBJECT_NAME */
m_row.m_object.set_field(f->field_index, f);
break;
case 3: /* COUNT_STAR */
set_field_ulonglong(f, m_row.m_stat.m_all.m_count);
break;
case 4: /* SUM */
set_field_ulonglong(f, m_row.m_stat.m_all.m_sum);
break;
case 5: /* MIN */
set_field_ulonglong(f, m_row.m_stat.m_all.m_min);
break;
case 6: /* AVG */
set_field_ulonglong(f, m_row.m_stat.m_all.m_avg);
break;
case 7: /* MAX */
set_field_ulonglong(f, m_row.m_stat.m_all.m_max);
break;
case 8: /* COUNT_READ */
set_field_ulonglong(f, m_row.m_stat.m_all_read.m_count);
break;
case 9: /* SUM_READ */
set_field_ulonglong(f, m_row.m_stat.m_all_read.m_sum);
break;
case 10: /* MIN_READ */
set_field_ulonglong(f, m_row.m_stat.m_all_read.m_min);
break;
case 11: /* AVG_READ */
set_field_ulonglong(f, m_row.m_stat.m_all_read.m_avg);
break;
case 12: /* MAX_READ */
set_field_ulonglong(f, m_row.m_stat.m_all_read.m_max);
break;
case 13: /* COUNT_WRITE */
set_field_ulonglong(f, m_row.m_stat.m_all_write.m_count);
break;
case 14: /* SUM_WRITE */
set_field_ulonglong(f, m_row.m_stat.m_all_write.m_sum);
break;
case 15: /* MIN_WRITE */
set_field_ulonglong(f, m_row.m_stat.m_all_write.m_min);
break;
case 16: /* AVG_WRITE */
set_field_ulonglong(f, m_row.m_stat.m_all_write.m_avg);
break;
case 17: /* MAX_WRITE */
set_field_ulonglong(f, m_row.m_stat.m_all_write.m_max);
break;
case 18: /* COUNT_FETCH */
set_field_ulonglong(f, m_row.m_stat.m_fetch.m_count);
break;
case 19: /* SUM_FETCH */
set_field_ulonglong(f, m_row.m_stat.m_fetch.m_sum);
break;
case 20: /* MIN_FETCH */
set_field_ulonglong(f, m_row.m_stat.m_fetch.m_min);
break;
case 21: /* AVG_FETCH */
set_field_ulonglong(f, m_row.m_stat.m_fetch.m_avg);
break;
case 22: /* MAX_FETCH */
set_field_ulonglong(f, m_row.m_stat.m_fetch.m_max);
break;
case 23: /* COUNT_INSERT */
set_field_ulonglong(f, m_row.m_stat.m_insert.m_count);
break;
case 24: /* SUM_INSERT */
set_field_ulonglong(f, m_row.m_stat.m_insert.m_sum);
break;
case 25: /* MIN_INSERT */
set_field_ulonglong(f, m_row.m_stat.m_insert.m_min);
break;
case 26: /* AVG_INSERT */
set_field_ulonglong(f, m_row.m_stat.m_insert.m_avg);
break;
case 27: /* MAX_INSERT */
set_field_ulonglong(f, m_row.m_stat.m_insert.m_max);
break;
case 28: /* COUNT_UPDATE */
set_field_ulonglong(f, m_row.m_stat.m_update.m_count);
break;
case 29: /* SUM_UPDATE */
set_field_ulonglong(f, m_row.m_stat.m_update.m_sum);
break;
case 30: /* MIN_UPDATE */
set_field_ulonglong(f, m_row.m_stat.m_update.m_min);
break;
case 31: /* AVG_UPDATE */
set_field_ulonglong(f, m_row.m_stat.m_update.m_avg);
break;
case 32: /* MAX_UPDATE */
set_field_ulonglong(f, m_row.m_stat.m_update.m_max);
break;
case 33: /* COUNT_DELETE */
set_field_ulonglong(f, m_row.m_stat.m_delete.m_count);
break;
case 34: /* SUM_DELETE */
set_field_ulonglong(f, m_row.m_stat.m_delete.m_sum);
break;
case 35: /* MIN_DELETE */
set_field_ulonglong(f, m_row.m_stat.m_delete.m_min);
break;
case 36: /* AVG_DELETE */
set_field_ulonglong(f, m_row.m_stat.m_delete.m_avg);
break;
case 37: /* MAX_DELETE */
set_field_ulonglong(f, m_row.m_stat.m_delete.m_max);
break;
default:
assert(false);
}
}
}
return 0;
} | O0 | cpp | table_tiws_by_table::read_row_values(TABLE*, unsigned char*, Field**, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movb 0x2d0(%rax), %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xd012e6
movl $0x86, -0x4(%rbp)
jmp 0xd016f1
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xd016ea
testb $0x1, -0x29(%rbp)
jne 0xd0132c
movq -0x18(%rbp), %rax
movq 0x1f0(%rax), %rdi
movq -0x38(%rbp), %rax
movzwl 0x8c(%rax), %esi
callq 0xd01700
cmpl $0x0, %eax
je 0xd016d7
movq -0x38(%rbp), %rax
movzwl 0x8c(%rax), %eax
movq %rax, -0x48(%rbp)
subq $0x25, %rax
ja 0xd016d3
movq -0x48(%rbp), %rax
leaq 0x37e6b4(%rip), %rcx # 0x107fa04
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x40(%rbp), %rdi
addq $0x28, %rdi
movq -0x38(%rbp), %rax
movzwl 0x8c(%rax), %esi
movq -0x38(%rbp), %rdx
callq 0xcf4540
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x1b8(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x1c0(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x1c8(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x1d0(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x1d8(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x1e0(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x1e8(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x1f0(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x1f8(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x200(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x208(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x210(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x218(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x220(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x228(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x230(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x238(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x240(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x248(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x250(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x258(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x260(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x268(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x270(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x278(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x280(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x288(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x290(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x298(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x2a0(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x2a8(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x2b0(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x2b8(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x2c0(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq 0x2c8(%rax), %rsi
callq 0xcb5350
jmp 0xd016d5
jmp 0xd016d5
jmp 0xd016d7
jmp 0xd016d9
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
jmp 0xd012ed
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN19table_tiws_by_table15read_row_valuesEP5TABLEPhPP5Fieldb:
push rbp
mov rbp, rsp
sub rsp, 50h
mov al, r8b
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
and al, 1
mov [rbp+var_29], al
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
mov al, [rax+2D0h]
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_D012E6
mov [rbp+var_4], 86h
jmp loc_D016F1
loc_D012E6:
mov rax, [rbp+var_20]
mov byte ptr [rax], 0
loc_D012ED:
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jz loc_D016EA
test [rbp+var_29], 1
jnz short loc_D0132C
mov rax, [rbp+var_18]
mov rdi, [rax+1F0h]
mov rax, [rbp+var_38]
movzx esi, word ptr [rax+8Ch]
call _ZL13bitmap_is_setPK9st_bitmapj_85; bitmap_is_set(st_bitmap const*,uint)
cmp eax, 0
jz loc_D016D7
loc_D0132C:
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+8Ch]
mov [rbp+var_48], rax
sub rax, 25h; switch 38 cases
ja def_D01357; jumptable 0000000000D01357 default case
mov rax, [rbp+var_48]
lea rcx, jpt_D01357
movsxd rax, ds:(jpt_D01357 - 107FA04h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_D01359:
mov rdi, [rbp+var_40]; jumptable 0000000000D01357 cases 0-2
add rdi, 28h ; '('; this
mov rax, [rbp+var_38]
movzx esi, word ptr [rax+8Ch]; unsigned int
mov rdx, [rbp+var_38]; Field *
call _ZN14PFS_object_row9set_fieldEjP5Field; PFS_object_row::set_field(uint,Field *)
jmp loc_D016D5
loc_D0137A:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 3
mov rdi, [rbp+var_38]; this
mov rsi, [rax+1B8h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D01393:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 4
mov rdi, [rbp+var_38]; this
mov rsi, [rax+1C0h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D013AC:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 5
mov rdi, [rbp+var_38]; this
mov rsi, [rax+1C8h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D013C5:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 6
mov rdi, [rbp+var_38]; this
mov rsi, [rax+1D0h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D013DE:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 7
mov rdi, [rbp+var_38]; this
mov rsi, [rax+1D8h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D013F7:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 8
mov rdi, [rbp+var_38]; this
mov rsi, [rax+1E0h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D01410:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 9
mov rdi, [rbp+var_38]; this
mov rsi, [rax+1E8h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D01429:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 10
mov rdi, [rbp+var_38]; this
mov rsi, [rax+1F0h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D01442:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 11
mov rdi, [rbp+var_38]; this
mov rsi, [rax+1F8h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D0145B:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 12
mov rdi, [rbp+var_38]; this
mov rsi, [rax+200h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D01474:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 13
mov rdi, [rbp+var_38]; this
mov rsi, [rax+208h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D0148D:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 14
mov rdi, [rbp+var_38]; this
mov rsi, [rax+210h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D014A6:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 15
mov rdi, [rbp+var_38]; this
mov rsi, [rax+218h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D014BF:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 16
mov rdi, [rbp+var_38]; this
mov rsi, [rax+220h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D014D8:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 17
mov rdi, [rbp+var_38]; this
mov rsi, [rax+228h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D014F1:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 18
mov rdi, [rbp+var_38]; this
mov rsi, [rax+230h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D0150A:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 19
mov rdi, [rbp+var_38]; this
mov rsi, [rax+238h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D01523:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 20
mov rdi, [rbp+var_38]; this
mov rsi, [rax+240h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D0153C:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 21
mov rdi, [rbp+var_38]; this
mov rsi, [rax+248h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D01555:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 22
mov rdi, [rbp+var_38]; this
mov rsi, [rax+250h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D0156E:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 23
mov rdi, [rbp+var_38]; this
mov rsi, [rax+258h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D01587:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 24
mov rdi, [rbp+var_38]; this
mov rsi, [rax+260h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D015A0:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 25
mov rdi, [rbp+var_38]; this
mov rsi, [rax+268h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D015B9:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 26
mov rdi, [rbp+var_38]; this
mov rsi, [rax+270h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D015D2:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 27
mov rdi, [rbp+var_38]; this
mov rsi, [rax+278h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D015EB:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 28
mov rdi, [rbp+var_38]; this
mov rsi, [rax+280h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D01604:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 29
mov rdi, [rbp+var_38]; this
mov rsi, [rax+288h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D0161D:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 30
mov rdi, [rbp+var_38]; this
mov rsi, [rax+290h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D01636:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 31
mov rdi, [rbp+var_38]; this
mov rsi, [rax+298h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp loc_D016D5
loc_D0164F:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 32
mov rdi, [rbp+var_38]; this
mov rsi, [rax+2A0h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp short loc_D016D5
loc_D01665:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 33
mov rdi, [rbp+var_38]; this
mov rsi, [rax+2A8h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp short loc_D016D5
loc_D0167B:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 34
mov rdi, [rbp+var_38]; this
mov rsi, [rax+2B0h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp short loc_D016D5
loc_D01691:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 35
mov rdi, [rbp+var_38]; this
mov rsi, [rax+2B8h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp short loc_D016D5
loc_D016A7:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 36
mov rdi, [rbp+var_38]; this
mov rsi, [rax+2C0h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp short loc_D016D5
loc_D016BD:
mov rax, [rbp+var_40]; jumptable 0000000000D01357 case 37
mov rdi, [rbp+var_38]; this
mov rsi, [rax+2C8h]; Field *
call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long)
jmp short loc_D016D5
def_D01357:
jmp short $+2; jumptable 0000000000D01357 default case
loc_D016D5:
jmp short $+2
loc_D016D7:
jmp short $+2
loc_D016D9:
mov rax, [rbp+var_28]
add rax, 8
mov [rbp+var_28], rax
jmp loc_D012ED
loc_D016EA:
mov [rbp+var_4], 0
loc_D016F1:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long table_tiws_by_table::read_row_values(
Field **this,
TABLE *a2,
unsigned __int8 *a3,
Field **a4,
char a5)
{
unsigned __int16 *v6; // [rsp+18h] [rbp-38h]
char v7; // [rsp+27h] [rbp-29h]
v7 = a5 & 1;
if ( ((_BYTE)this[90] & 1) != 0 )
{
*a3 = 0;
while ( 1 )
{
v6 = (unsigned __int16 *)*a4;
if ( !*a4 )
break;
if ( (v7 & 1) != 0 || (unsigned int)bitmap_is_set(*((_QWORD *)a2 + 62), v6[70]) )
{
switch ( v6[70] )
{
case 0u:
case 1u:
case 2u:
PFS_object_row::set_field((PFS_object_row *)(this + 5), v6[70], (Field *)v6);
break;
case 3u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[55]);
break;
case 4u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[56]);
break;
case 5u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[57]);
break;
case 6u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[58]);
break;
case 7u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[59]);
break;
case 8u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[60]);
break;
case 9u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[61]);
break;
case 0xAu:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[62]);
break;
case 0xBu:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[63]);
break;
case 0xCu:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[64]);
break;
case 0xDu:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[65]);
break;
case 0xEu:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[66]);
break;
case 0xFu:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[67]);
break;
case 0x10u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[68]);
break;
case 0x11u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[69]);
break;
case 0x12u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[70]);
break;
case 0x13u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[71]);
break;
case 0x14u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[72]);
break;
case 0x15u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[73]);
break;
case 0x16u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[74]);
break;
case 0x17u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[75]);
break;
case 0x18u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[76]);
break;
case 0x19u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[77]);
break;
case 0x1Au:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[78]);
break;
case 0x1Bu:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[79]);
break;
case 0x1Cu:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[80]);
break;
case 0x1Du:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[81]);
break;
case 0x1Eu:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[82]);
break;
case 0x1Fu:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[83]);
break;
case 0x20u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[84]);
break;
case 0x21u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[85]);
break;
case 0x22u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[86]);
break;
case 0x23u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[87]);
break;
case 0x24u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[88]);
break;
case 0x25u:
PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, this[89]);
break;
default:
break;
}
}
++a4;
}
return 0;
}
else
{
return 134;
}
}
| remove_io_thread:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0xc0]
JNZ 0x00d012da
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x1
CALL 0x00d007e0
LAB_00d012da:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0xed84e4]
MOV EDX,0x392
CALL 0x00d013c0
JMP 0x00d012f1
LAB_00d012f1:
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0xdc]
ADD EAX,-0x1
MOV dword ptr [RCX + 0xdc],EAX
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00d01309
LAB_00d01309:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0xc0]
JNZ 0x00d0133c
JMP 0x00d0132b
LAB_00d0132b:
JMP 0x00d0132d
LAB_00d0132d:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xc0],0x0
LAB_00d0133c:
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0xd8]
ADD EAX,-0x1
MOV dword ptr [RCX + 0xd8],EAX
CMP EAX,0x0
JNZ 0x00d01375
JMP 0x00d01356
LAB_00d01356:
JMP 0x00d01358
LAB_00d01358:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x80
CALL 0x00d01430
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x48
CALL 0x00d01490
LAB_00d01375:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00d014f0
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x00d013ae
JMP 0x00d01386
LAB_00d01386:
JMP 0x00d01388
LAB_00d01388:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x80
CALL 0x00d01550
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x48
CALL 0x00d01550
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00d015c0
LAB_00d013ae:
JMP 0x00d013b0
LAB_00d013b0:
JMP 0x00d013b2
LAB_00d013b2:
ADD RSP,0x20
POP RBP
RET
|
void remove_io_thread(long param_1)
{
long lVar1;
int iVar2;
int iVar3;
lVar1 = *(long *)(param_1 + 0x98);
if (param_1 == *(long *)(lVar1 + 0xc0)) {
my_b_flush_io_cache(param_1,1);
}
inline_mysql_mutex_lock(lVar1,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x392)
;
iVar2 = *(int *)(lVar1 + 0xdc) + -1;
*(int *)(lVar1 + 0xdc) = iVar2;
*(int8 *)(param_1 + 0x98) = 0;
if (param_1 == *(long *)(lVar1 + 0xc0)) {
*(int8 *)(lVar1 + 0xc0) = 0;
}
iVar3 = *(int *)(lVar1 + 0xd8) + -1;
*(int *)(lVar1 + 0xd8) = iVar3;
if (iVar3 == 0) {
inline_mysql_cond_signal(lVar1 + 0x80);
inline_mysql_cond_broadcast(lVar1 + 0x48);
}
inline_mysql_mutex_unlock(lVar1);
if (iVar2 == 0) {
inline_mysql_cond_destroy(lVar1 + 0x80);
inline_mysql_cond_destroy(lVar1 + 0x48);
inline_mysql_mutex_destroy(lVar1);
}
return;
}
|
|
1,038 | my_wc_mb_utf8mb4 | eloqsql/strings/ctype-utf8.c | static int
my_wc_mb_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r, uchar *e)
{
int count;
if (r >= e)
return MY_CS_TOOSMALL;
if (wc < 0x80)
count= 1;
else if (wc < 0x800)
count= 2;
else if (wc < 0x10000)
count= 3;
else if (wc < 0x200000)
count= 4;
else return MY_CS_ILUNI;
if (r + count > e)
return MY_CS_TOOSMALLN(count);
switch (count) {
case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000;
/* fall through */
case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0] = (uchar) wc;
}
return count;
} | O3 | c | my_wc_mb_utf8mb4:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x85cdc
movl $0x1, %edi
cmpq $0x80, %rsi
jb 0x85c75
movl $0x2, %edi
cmpq $0x800, %rsi # imm = 0x800
jb 0x85c75
movl $0x3, %edi
cmpq $0x10000, %rsi # imm = 0x10000
jb 0x85c75
xorl %eax, %eax
movl $0x4, %edi
cmpq $0x1fffff, %rsi # imm = 0x1FFFFF
ja 0x85cdc
movl %edi, %eax
addq %rdx, %rax
cmpq %rcx, %rax
jbe 0x85c88
movl $0xffffff9c, %eax # imm = 0xFFFFFF9C
subl %edi, %eax
jmp 0x85cdc
leal -0x1(%rdi), %eax
leaq 0x288c7e(%rip), %rcx # 0x30e910
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x3(%rdx)
shrq $0x6, %rsi
orq $0x10000, %rsi # imm = 0x10000
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x2(%rdx)
shrq $0x6, %rsi
orq $0x800, %rsi # imm = 0x800
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rdx)
shrq $0x6, %rsi
orq $0xc0, %rsi
movb %sil, (%rdx)
movl %edi, %eax
popq %rbp
retq
| my_wc_mb_utf8mb4:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb loc_85CDC
mov edi, 1
cmp rsi, 80h
jb short loc_85C75
mov edi, 2
cmp rsi, 800h
jb short loc_85C75
mov edi, 3
cmp rsi, offset stru_10000
jb short loc_85C75
xor eax, eax
mov edi, 4
cmp rsi, offset unk_1FFFFF
ja short loc_85CDC
loc_85C75:
mov eax, edi
add rax, rdx
cmp rax, rcx
jbe short loc_85C88
mov eax, 0FFFFFF9Ch
sub eax, edi
jmp short loc_85CDC
loc_85C88:
lea eax, [rdi-1]
lea rcx, jpt_85C99
movsxd rax, ds:(jpt_85C99 - 30E910h)[rcx+rax*4]; switch 4 cases
add rax, rcx
jmp rax; switch jump
loc_85C9B:
mov eax, esi; jumptable 0000000000085C99 case 3
and al, 3Fh
or al, 80h
mov [rdx+3], al
shr rsi, 6
or rsi, 10000h
loc_85CAF:
mov eax, esi; jumptable 0000000000085C99 case 2
and al, 3Fh
or al, 80h
mov [rdx+2], al
shr rsi, 6
or rsi, 800h
loc_85CC3:
mov eax, esi; jumptable 0000000000085C99 case 1
and al, 3Fh
or al, 80h
mov [rdx+1], al
shr rsi, 6
or rsi, 0C0h
loc_85CD7:
mov [rdx], sil; jumptable 0000000000085C99 case 0
mov eax, edi
loc_85CDC:
pop rbp
retn
| long long my_wc_mb_utf8mb4(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
unsigned int v5; // edi
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = 1;
if ( a2 < 0x80
|| (v5 = 2, a2 < 0x800)
|| (v5 = 3, a2 < (unsigned long long)&stru_10000)
|| (result = 0LL, v5 = 4, a2 <= (unsigned long long)&unk_1FFFFF) )
{
if ( (unsigned long long)&a3[v5] <= a4 )
{
switch ( v5 )
{
case 1u:
goto LABEL_12;
case 2u:
goto LABEL_11;
case 3u:
goto LABEL_10;
case 4u:
a3[3] = a2 & 0x3F | 0x80;
a2 = (a2 >> 6) | 0x10000;
LABEL_10:
a3[2] = a2 & 0x3F | 0x80;
a2 = (a2 >> 6) | 0x800;
LABEL_11:
a3[1] = a2 & 0x3F | 0x80;
a2 = (a2 >> 6) | 0xC0;
LABEL_12:
*a3 = a2;
result = v5;
break;
}
}
else
{
return -100 - v5;
}
}
}
return result;
}
| my_wc_mb_utf8mb4:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00185cdc
MOV EDI,0x1
CMP RSI,0x80
JC 0x00185c75
MOV EDI,0x2
CMP RSI,0x800
JC 0x00185c75
MOV EDI,0x3
CMP RSI,0x10000
JC 0x00185c75
XOR EAX,EAX
MOV EDI,0x4
CMP RSI,0x1fffff
JA 0x00185cdc
LAB_00185c75:
MOV EAX,EDI
ADD RAX,RDX
CMP RAX,RCX
JBE 0x00185c88
MOV EAX,0xffffff9c
SUB EAX,EDI
JMP 0x00185cdc
LAB_00185c88:
LEA EAX,[RDI + -0x1]
LEA RCX,[0x40e910]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
JMP RAX
LAB_00185cdc:
POP RBP
RET
|
ulong my_wc_mb_utf8mb4(int8 param_1,ulong param_2,ulong param_3,ulong param_4)
{
ulong uVar1;
long lVar2;
uVar1 = 0xffffff9b;
if (param_3 < param_4) {
lVar2 = 1;
if ((((0x7f < param_2) && (lVar2 = 2, 0x7ff < param_2)) && (lVar2 = 3, 0xffff < param_2)) &&
(lVar2 = 4, 0x1fffff < param_2)) {
return 0;
}
if (lVar2 + param_3 <= param_4) {
/* WARNING: Could not recover jumptable at 0x00185c99. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar1 = (*(code *)(&DAT_0040e910 + *(int *)(&DAT_0040e910 + (ulong)((int)lVar2 - 1) * 4)))();
return uVar1;
}
uVar1 = (ulong)(-(int)lVar2 - 100);
}
return uVar1;
}
|
|
1,039 | typed_array_is_oob | bluesky950520[P]quickjs/quickjs.c | static BOOL typed_array_is_oob(JSObject *p)
{
JSArrayBuffer *abuf;
JSTypedArray *ta;
int len, size_elem;
int64_t end;
assert(p->class_id >= JS_CLASS_UINT8C_ARRAY);
assert(p->class_id <= JS_CLASS_FLOAT64_ARRAY);
ta = p->u.typed_array;
abuf = ta->buffer->u.array_buffer;
if (abuf->detached)
return TRUE;
len = abuf->byte_length;
if (ta->offset > len)
return TRUE;
if (ta->track_rab)
return FALSE;
if (len < (int64_t)ta->offset + ta->length)
return TRUE;
size_elem = 1 << typed_array_size_log2(p->class_id);
end = (int64_t)ta->offset + (int64_t)p->u.array.count * size_elem;
return end > len;
} | O0 | c | typed_array_is_oob:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rsp)
movq -0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rax
cmpb $0x0, 0x8(%rax)
je 0x5ecfd
movl $0x1, -0x4(%rsp)
jmp 0x5edc1
movq -0x18(%rsp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rsp)
movq -0x20(%rsp), %rax
movl 0x20(%rax), %eax
cmpl -0x24(%rsp), %eax
jbe 0x5ed23
movl $0x1, -0x4(%rsp)
jmp 0x5edc1
movq -0x20(%rsp), %rax
cmpl $0x0, 0x28(%rax)
je 0x5ed3b
movl $0x0, -0x4(%rsp)
jmp 0x5edc1
movslq -0x24(%rsp), %rax
movq -0x20(%rsp), %rcx
movl 0x20(%rcx), %ecx
movq -0x20(%rsp), %rdx
movl 0x24(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jge 0x5ed62
movl $0x1, -0x4(%rsp)
jmp 0x5edc1
movq -0x10(%rsp), %rax
movzwl 0x6(%rax), %eax
subl $0x15, %eax
movslq %eax, %rcx
leaq 0xb3e77(%rip), %rax # 0x112bef
movzbl (%rax,%rcx), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x28(%rsp)
movq -0x20(%rsp), %rax
movl 0x20(%rax), %eax
movq -0x10(%rsp), %rcx
movl 0x40(%rcx), %ecx
movslq -0x28(%rsp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rsp)
movq -0x30(%rsp), %rax
movslq -0x24(%rsp), %rcx
cmpq %rcx, %rax
setg %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
| typed_array_is_oob:
mov [rsp+var_10], rdi
mov rax, [rsp+var_10]
mov rax, [rax+30h]
mov [rsp+var_20], rax
mov rax, [rsp+var_20]
mov rax, [rax+18h]
mov rax, [rax+30h]
mov [rsp+var_18], rax
mov rax, [rsp+var_18]
cmp byte ptr [rax+8], 0
jz short loc_5ECFD
mov [rsp+var_4], 1
jmp loc_5EDC1
loc_5ECFD:
mov rax, [rsp+var_18]
mov eax, [rax]
mov [rsp+var_24], eax
mov rax, [rsp+var_20]
mov eax, [rax+20h]
cmp eax, [rsp+var_24]
jbe short loc_5ED23
mov [rsp+var_4], 1
jmp loc_5EDC1
loc_5ED23:
mov rax, [rsp+var_20]
cmp dword ptr [rax+28h], 0
jz short loc_5ED3B
mov [rsp+var_4], 0
jmp loc_5EDC1
loc_5ED3B:
movsxd rax, [rsp+var_24]
mov rcx, [rsp+var_20]
mov ecx, [rcx+20h]
mov rdx, [rsp+var_20]
mov edx, [rdx+24h]
add rcx, rdx
cmp rax, rcx
jge short loc_5ED62
mov [rsp+var_4], 1
jmp short loc_5EDC1
loc_5ED62:
mov rax, [rsp+var_10]
movzx eax, word ptr [rax+6]
sub eax, 15h
movsxd rcx, eax
lea rax, typed_array_size_log2
movzx ecx, byte ptr [rax+rcx]
mov eax, 1
shl eax, cl
mov [rsp+var_28], eax
mov rax, [rsp+var_20]
mov eax, [rax+20h]
mov rcx, [rsp+var_10]
mov ecx, [rcx+40h]
movsxd rdx, [rsp+var_28]
imul rcx, rdx
add rax, rcx
mov [rsp+var_30], rax
mov rax, [rsp+var_30]
movsxd rcx, [rsp+var_24]
cmp rax, rcx
setnle al
and al, 1
movzx eax, al
mov [rsp+var_4], eax
loc_5EDC1:
mov eax, [rsp+var_4]
retn
| _BOOL8 typed_array_is_oob(long long a1)
{
unsigned int v2; // [rsp+Ch] [rbp-24h]
long long v3; // [rsp+10h] [rbp-20h]
unsigned int *v4; // [rsp+18h] [rbp-18h]
v3 = *(_QWORD *)(a1 + 48);
v4 = *(unsigned int **)(*(_QWORD *)(v3 + 24) + 48LL);
if ( *((_BYTE *)v4 + 8) )
{
return 1;
}
else
{
v2 = *v4;
if ( *(_DWORD *)(v3 + 32) <= *v4 )
{
if ( *(_DWORD *)(v3 + 40) )
return 0;
else
return (int)v2 < (long long)(*(unsigned int *)(v3 + 36) + (unsigned long long)*(unsigned int *)(v3 + 32))
|| (long long)((1 << typed_array_size_log2[*(unsigned __int16 *)(a1 + 6) - 21])
* (unsigned long long)*(unsigned int *)(a1 + 64)
+ *(unsigned int *)(v3 + 32)) > (int)v2;
}
else
{
return 1;
}
}
}
| typed_array_is_oob:
MOV qword ptr [RSP + -0x10],RDI
MOV RAX,qword ptr [RSP + -0x10]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + -0x20],RAX
MOV RAX,qword ptr [RSP + -0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + -0x18],RAX
MOV RAX,qword ptr [RSP + -0x18]
CMP byte ptr [RAX + 0x8],0x0
JZ 0x0015ecfd
MOV dword ptr [RSP + -0x4],0x1
JMP 0x0015edc1
LAB_0015ecfd:
MOV RAX,qword ptr [RSP + -0x18]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + -0x24],EAX
MOV RAX,qword ptr [RSP + -0x20]
MOV EAX,dword ptr [RAX + 0x20]
CMP EAX,dword ptr [RSP + -0x24]
JBE 0x0015ed23
MOV dword ptr [RSP + -0x4],0x1
JMP 0x0015edc1
LAB_0015ed23:
MOV RAX,qword ptr [RSP + -0x20]
CMP dword ptr [RAX + 0x28],0x0
JZ 0x0015ed3b
MOV dword ptr [RSP + -0x4],0x0
JMP 0x0015edc1
LAB_0015ed3b:
MOVSXD RAX,dword ptr [RSP + -0x24]
MOV RCX,qword ptr [RSP + -0x20]
MOV ECX,dword ptr [RCX + 0x20]
MOV RDX,qword ptr [RSP + -0x20]
MOV EDX,dword ptr [RDX + 0x24]
ADD RCX,RDX
CMP RAX,RCX
JGE 0x0015ed62
MOV dword ptr [RSP + -0x4],0x1
JMP 0x0015edc1
LAB_0015ed62:
MOV RAX,qword ptr [RSP + -0x10]
MOVZX EAX,word ptr [RAX + 0x6]
SUB EAX,0x15
MOVSXD RCX,EAX
LEA RAX,[0x212bef]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
MOV EAX,0x1
SHL EAX,CL
MOV dword ptr [RSP + -0x28],EAX
MOV RAX,qword ptr [RSP + -0x20]
MOV EAX,dword ptr [RAX + 0x20]
MOV RCX,qword ptr [RSP + -0x10]
MOV ECX,dword ptr [RCX + 0x40]
MOVSXD RDX,dword ptr [RSP + -0x28]
IMUL RCX,RDX
ADD RAX,RCX
MOV qword ptr [RSP + -0x30],RAX
MOV RAX,qword ptr [RSP + -0x30]
MOVSXD RCX,dword ptr [RSP + -0x24]
CMP RAX,RCX
SETG AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + -0x4],EAX
LAB_0015edc1:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
bool typed_array_is_oob(long param_1)
{
uint uVar1;
long lVar2;
uint *puVar3;
bool bVar4;
lVar2 = *(long *)(param_1 + 0x30);
puVar3 = *(uint **)(*(long *)(lVar2 + 0x18) + 0x30);
if ((char)puVar3[2] == '\0') {
uVar1 = *puVar3;
if (uVar1 < *(uint *)(lVar2 + 0x20)) {
bVar4 = true;
}
else if (*(int *)(lVar2 + 0x28) == 0) {
if ((long)(int)uVar1 < (long)((ulong)*(uint *)(lVar2 + 0x20) + (ulong)*(uint *)(lVar2 + 0x24))
) {
bVar4 = true;
}
else {
bVar4 = (long)(int)uVar1 <
(long)((ulong)*(uint *)(lVar2 + 0x20) +
(ulong)*(uint *)(param_1 + 0x40) *
(long)(1 << ((&typed_array_size_log2)[(int)(*(ushort *)(param_1 + 6) - 0x15)]
& 0x1f)));
}
}
else {
bVar4 = false;
}
}
else {
bVar4 = true;
}
return bVar4;
}
|
|
1,040 | typed_array_is_oob | bluesky950520[P]quickjs/quickjs.c | static BOOL typed_array_is_oob(JSObject *p)
{
JSArrayBuffer *abuf;
JSTypedArray *ta;
int len, size_elem;
int64_t end;
assert(p->class_id >= JS_CLASS_UINT8C_ARRAY);
assert(p->class_id <= JS_CLASS_FLOAT64_ARRAY);
ta = p->u.typed_array;
abuf = ta->buffer->u.array_buffer;
if (abuf->detached)
return TRUE;
len = abuf->byte_length;
if (ta->offset > len)
return TRUE;
if (ta->track_rab)
return FALSE;
if (len < (int64_t)ta->offset + ta->length)
return TRUE;
size_elem = 1 << typed_array_size_log2(p->class_id);
end = (int64_t)ta->offset + (int64_t)p->u.array.count * size_elem;
return end > len;
} | O2 | c | typed_array_is_oob:
movq 0x30(%rdi), %r8
movq 0x18(%r8), %rax
movq 0x30(%rax), %rax
pushq $0x1
popq %rcx
cmpb $0x0, 0x8(%rax)
jne 0x36406
movslq (%rax), %rdx
movl 0x20(%r8), %esi
cmpl %edx, %esi
jbe 0x36409
movl %ecx, %eax
retq
xorl %eax, %eax
cmpl $0x0, 0x28(%r8)
je 0x36413
retq
movl 0x24(%r8), %r8d
addq %rsi, %r8
movl %ecx, %eax
cmpq %rdx, %r8
jg 0x36412
movzwl 0x6(%rdi), %eax
leaq 0x516c3(%rip), %rcx # 0x87aef
movb -0x15(%rax,%rcx), %cl
pushq $0x1
popq %rax
shll %cl, %eax
movl 0x40(%rdi), %ecx
movslq %eax, %rdi
imulq %rcx, %rdi
addq %rsi, %rdi
xorl %eax, %eax
cmpq %rdx, %rdi
setg %al
retq
| typed_array_is_oob:
mov r8, [rdi+30h]
mov rax, [r8+18h]
mov rax, [rax+30h]
push 1
pop rcx
cmp byte ptr [rax+8], 0
jnz short loc_36406
movsxd rdx, dword ptr [rax]
mov esi, [r8+20h]
cmp esi, edx
jbe short loc_36409
loc_36406:
mov eax, ecx
retn
loc_36409:
xor eax, eax
cmp dword ptr [r8+28h], 0
jz short loc_36413
locret_36412:
retn
loc_36413:
mov r8d, [r8+24h]
add r8, rsi
mov eax, ecx
cmp r8, rdx
jg short locret_36412
movzx eax, word ptr [rdi+6]
lea rcx, typed_array_size_log2
mov cl, [rax+rcx-15h]
push 1
pop rax
shl eax, cl
mov ecx, [rdi+40h]
movsxd rdi, eax
imul rdi, rcx
add rdi, rsi
xor eax, eax
cmp rdi, rdx
setnle al
retn
| _BOOL8 typed_array_is_oob(long long a1)
{
long long v1; // r8
int *v2; // rax
signed long long v3; // rdx
long long v4; // rsi
_BOOL8 result; // rax
v1 = *(_QWORD *)(a1 + 48);
v2 = *(int **)(*(_QWORD *)(v1 + 24) + 48LL);
if ( *((_BYTE *)v2 + 8) )
return 1LL;
v3 = *v2;
v4 = *(unsigned int *)(v1 + 32);
if ( (unsigned int)v4 > (unsigned int)v3 )
return 1LL;
result = 0LL;
if ( !*(_DWORD *)(v1 + 40) )
{
result = 1LL;
if ( v4 + *(unsigned int *)(v1 + 36) <= v3 )
return v4 + *(unsigned int *)(a1 + 64) * (long long)(1 << typed_array_size_log2[*(unsigned __int16 *)(a1 + 6) - 21]) > v3;
}
return result;
}
| typed_array_is_oob:
MOV R8,qword ptr [RDI + 0x30]
MOV RAX,qword ptr [R8 + 0x18]
MOV RAX,qword ptr [RAX + 0x30]
PUSH 0x1
POP RCX
CMP byte ptr [RAX + 0x8],0x0
JNZ 0x00136406
MOVSXD RDX,dword ptr [RAX]
MOV ESI,dword ptr [R8 + 0x20]
CMP ESI,EDX
JBE 0x00136409
LAB_00136406:
MOV EAX,ECX
RET
LAB_00136409:
XOR EAX,EAX
CMP dword ptr [R8 + 0x28],0x0
JZ 0x00136413
LAB_00136412:
RET
LAB_00136413:
MOV R8D,dword ptr [R8 + 0x24]
ADD R8,RSI
MOV EAX,ECX
CMP R8,RDX
JG 0x00136412
MOVZX EAX,word ptr [RDI + 0x6]
LEA RCX,[0x187aef]
MOV CL,byte ptr [RAX + RCX*0x1 + -0x15]
PUSH 0x1
POP RAX
SHL EAX,CL
MOV ECX,dword ptr [RDI + 0x40]
MOVSXD RDI,EAX
IMUL RDI,RCX
ADD RDI,RSI
XOR EAX,EAX
CMP RDI,RDX
SETG AL
RET
|
bool typed_array_is_oob(long param_1)
{
uint uVar1;
uint uVar2;
long lVar3;
uint *puVar4;
bool bVar5;
lVar3 = *(long *)(param_1 + 0x30);
puVar4 = *(uint **)(*(long *)(lVar3 + 0x18) + 0x30);
if ((char)puVar4[2] == '\0') {
uVar1 = *puVar4;
uVar2 = *(uint *)(lVar3 + 0x20);
if (uVar2 <= uVar1) {
bVar5 = false;
if ((*(int *)(lVar3 + 0x28) == 0) &&
(bVar5 = true, (long)((ulong)*(uint *)(lVar3 + 0x24) + (ulong)uVar2) <= (long)(int)uVar1))
{
return (long)(int)uVar1 <
(long)((long)(1 << ("toSorted"[(ulong)*(ushort *)(param_1 + 6) + 6] & 0x1fU)) *
(ulong)*(uint *)(param_1 + 0x40) + (ulong)uVar2);
}
return bVar5;
}
}
return true;
}
|
|
1,041 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long) | hkr04[P]cpp-mcp/common/json.hpp | bool start_object(std::size_t len)
{
// check callback for object start
const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::object_start, discarded);
keep_stack.push_back(keep);
auto val = handle_value(BasicJsonType::value_t::object, true);
ref_stack.push_back(val.second);
// check object limit
if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()))
{
JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back()));
}
return true;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long):
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
addq $0x80, %rax
movq %rax, 0x18(%rsp)
addq $0x8, %rdi
callq 0x3b6b0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rcx
movl %eax, %esi
addq $0xa8, %rcx
xorl %edx, %edx
callq 0x3b650
movq 0x20(%rsp), %rdi
andb $0x1, %al
movb %al, 0x97(%rsp)
addq $0x20, %rdi
movb 0x97(%rsp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x38410
movq 0x20(%rsp), %rdi
movb $0x1, 0x7f(%rsp)
leaq 0x7f(%rsp), %rsi
movl $0x1, %edx
callq 0x3b6d0
movq 0x20(%rsp), %rdi
movb %al, 0x80(%rsp)
movq %rdx, 0x88(%rsp)
addq $0x8, %rdi
leaq 0x80(%rsp), %rsi
addq $0x8, %rsi
callq 0x3bb00
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
callq 0x3bb70
cmpq $0x0, (%rax)
je 0x3a972
xorl %eax, %eax
cmpq $-0x1, 0x98(%rsp)
movb %al, 0x17(%rsp)
je 0x3a888
movq 0x20(%rsp), %rdi
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x8, %rdi
callq 0x3bb70
movq (%rax), %rdi
callq 0x3bbb0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
seta %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x3a899
jmp 0x3a972
movb $0x1, 0x2b(%rsp)
movl $0x20, %edi
callq 0x62b0
movq %rax, (%rsp)
movq 0x98(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x199a0
jmp 0x3a8c0
leaq 0x16a79(%rip), %rsi # 0x51340
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x3bde0
jmp 0x3a8d8
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
callq 0x3bb70
movq (%rsp), %rdi
movq (%rax), %rcx
movl $0x198, %esi # imm = 0x198
leaq 0x58(%rsp), %rdx
callq 0x3bc30
jmp 0x3a8fe
movq (%rsp), %rdi
movb $0x0, 0x2b(%rsp)
leaq 0x3223a(%rip), %rsi # 0x6cb48
leaq 0xa5b(%rip), %rdx # 0x3b370
callq 0x6940
jmp 0x3a988
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0x3a95e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0x3a954
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x6360
leaq 0x38(%rsp), %rdi
callq 0x6360
testb $0x1, 0x2b(%rsp)
jne 0x3a967
jmp 0x3a970
movq (%rsp), %rdi
callq 0x6420
jmp 0x3a97e
movb $0x1, %al
andb $0x1, %al
addq $0xa8, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x6970
nopl (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12start_objectEm:
sub rsp, 0A8h
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov rdi, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_88], rdi
mov rax, rdi
add rax, 80h
mov [rsp+0A8h+var_90], rax
add rdi, 8
call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4sizeEv; 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> *,std::allocator<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> *>>::size(void)
mov rdi, [rsp+0A8h+var_90]
mov rcx, [rsp+0A8h+var_88]
mov esi, eax
add rcx, 0A8h
xor edx, edx
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
mov rdi, [rsp+0A8h+var_88]
and al, 1
mov [rsp+0A8h+var_11], al
add rdi, 20h ; ' '
mov al, [rsp+0A8h+var_11]
and al, 1
movzx esi, al
call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
mov rdi, [rsp+0A8h+var_88]
mov [rsp+0A8h+var_29], 1
lea rsi, [rsp+0A8h+var_29]
mov edx, 1
call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEESt4pairIbPSF_EOT_b; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&,bool)
mov rdi, [rsp+0A8h+var_88]
mov [rsp+0A8h+var_28], al
mov [rsp+0A8h+var_20], rdx
add rdi, 8
lea rsi, [rsp+0A8h+var_28]
add rsi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backERKSE_; 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> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> * const&)
mov rdi, [rsp+0A8h+var_88]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; 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> *,std::allocator<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> *>>::back(void)
cmp qword ptr [rax], 0
jz loc_3A972
xor eax, eax
cmp [rsp+0A8h+var_10], 0FFFFFFFFFFFFFFFFh
mov [rsp+0A8h+var_91], al
jz short loc_3A888
mov rdi, [rsp+0A8h+var_88]
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_A0], rax
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; 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> *,std::allocator<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> *>>::back(void)
mov rdi, [rax]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; 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>::max_size(void)
mov rcx, rax
mov rax, [rsp+0A8h+var_A0]
cmp rax, rcx
setnbe al
mov [rsp+0A8h+var_91], al
loc_3A888:
mov al, [rsp+0A8h+var_91]
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_3A899
jmp loc_3A972
loc_3A899:
mov [rsp+0A8h+var_7D], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+0A8h+var_A8], rax
mov rsi, [rsp+0A8h+var_10]; unsigned __int64
lea rdi, [rsp+0A8h+var_70]; this
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
jmp short $+2
loc_3A8C0:
lea rsi, aExcessiveObjec; "excessive object size: "
lea rdi, [rsp+0A8h+var_50]
lea rdx, [rsp+0A8h+var_70]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA24_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(char const(&)[24],std::string &&)
jmp short $+2
loc_3A8D8:
mov rdi, [rsp+0A8h+var_88]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; 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> *,std::allocator<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> *>>::back(void)
mov rdi, [rsp+0A8h+var_A8]
mov rcx, [rax]
mov esi, 198h
lea rdx, [rsp+0A8h+var_50]
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_3A8FE:
mov rdi, [rsp+0A8h+var_A8]; void *
mov [rsp+0A8h+var_7D], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_3A988
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
jmp short loc_3A95E
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
jmp short loc_3A954
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3A954:
lea rdi, [rsp+arg_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3A95E:
test [rsp+arg_23], 1
jnz short loc_3A967
jmp short loc_3A970
loc_3A967:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_3A970:
jmp short loc_3A97E
loc_3A972:
mov al, 1
and al, 1
add rsp, 0A8h
retn
loc_3A97E:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
loc_3A988:
nop dword ptr [rax+rax+00000000h]
| start_object:
SUB RSP,0xa8
MOV qword ptr [RSP + 0xa0],RDI
MOV qword ptr [RSP + 0x98],RSI
MOV RDI,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,RDI
ADD RAX,0x80
MOV qword ptr [RSP + 0x18],RAX
ADD RDI,0x8
CALL 0x0013b6b0
MOV RDI,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOV ESI,EAX
ADD RCX,0xa8
XOR EDX,EDX
CALL 0x0013b650
MOV RDI,qword ptr [RSP + 0x20]
AND AL,0x1
MOV byte ptr [RSP + 0x97],AL
ADD RDI,0x20
MOV AL,byte ptr [RSP + 0x97]
AND AL,0x1
MOVZX ESI,AL
CALL 0x00138410
MOV RDI,qword ptr [RSP + 0x20]
MOV byte ptr [RSP + 0x7f],0x1
LEA RSI,[RSP + 0x7f]
MOV EDX,0x1
CALL 0x0013b6d0
MOV RDI,qword ptr [RSP + 0x20]
MOV byte ptr [RSP + 0x80],AL
MOV qword ptr [RSP + 0x88],RDX
ADD RDI,0x8
LEA RSI,[RSP + 0x80]
ADD RSI,0x8
CALL 0x0013bb00
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x8
CALL 0x0013bb70
CMP qword ptr [RAX],0x0
JZ 0x0013a972
XOR EAX,EAX
CMP qword ptr [RSP + 0x98],-0x1
MOV byte ptr [RSP + 0x17],AL
JZ 0x0013a888
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x8],RAX
ADD RDI,0x8
CALL 0x0013bb70
MOV RDI,qword ptr [RAX]
CALL 0x0013bbb0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,RCX
SETA AL
MOV byte ptr [RSP + 0x17],AL
LAB_0013a888:
MOV AL,byte ptr [RSP + 0x17]
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x0013a899
JMP 0x0013a972
LAB_0013a899:
MOV byte ptr [RSP + 0x2b],0x1
MOV EDI,0x20
CALL 0x001062b0
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RSP + 0x98]
LAB_0013a8b4:
LEA RDI,[RSP + 0x38]
CALL 0x001199a0
JMP 0x0013a8c0
LAB_0013a8c0:
LEA RSI,[0x151340]
LEA RDI,[RSP + 0x58]
LEA RDX,[RSP + 0x38]
CALL 0x0013bde0
JMP 0x0013a8d8
LAB_0013a8d8:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x8
CALL 0x0013bb70
MOV RDI,qword ptr [RSP]
MOV RCX,qword ptr [RAX]
LAB_0013a8ed:
MOV ESI,0x198
LEA RDX,[RSP + 0x58]
CALL 0x0013bc30
JMP 0x0013a8fe
LAB_0013a8fe:
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x2b],0x0
LEA RSI,[0x16cb48]
LEA RDX,[0x13b370]
CALL 0x00106940
LAB_0013a972:
MOV AL,0x1
AND AL,0x1
ADD RSP,0xa8
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::start_object(unsigned long) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::start_object(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong param_1)
{
bool bVar1;
ulong uVar2;
byte bVar3;
int4 uVar4;
long *plVar5;
int8 *puVar6;
ulong uVar7;
int8 uVar8;
basic_json *extraout_RDX;
__cxx11 local_70 [32];
detail local_50 [39];
value_t local_29;
int1 local_28;
basic_json *local_20;
int1 local_11;
ulong local_10;
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*local_8;
local_10 = param_1;
local_8 = this;
uVar4 = 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>*>>
::size((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
bVar3 = std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
*)(this + 0x80),uVar4,0,this + 0xa8);
local_11 = bVar3 & 1;
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x20),(bool)local_11);
local_29 = 1;
local_28 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,&local_29,true);
local_20 = extraout_RDX;
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::push_back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8),&local_20);
plVar5 = (long *)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>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
uVar2 = local_10;
if (*plVar5 != 0) {
bVar1 = false;
if (local_10 != 0xffffffffffffffff) {
puVar6 = (int8 *)
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>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
uVar7 = 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>
::max_size((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>
*)*puVar6);
bVar1 = uVar7 < uVar2;
}
if (bVar1) {
uVar8 = __cxa_allocate_exception(0x20);
/* try { // try from 0013a8b4 to 0013a8bd has its CatchHandler @ 0013a91c */
std::__cxx11::to_string(local_70,local_10);
/* try { // try from 0013a8c0 to 0013a8d5 has its CatchHandler @ 0013a92c */
concat<std::__cxx11::string,char_const(&)[24],std::__cxx11::string>
(local_50,"excessive object size: ",(string *)local_70);
puVar6 = (int8 *)
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>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
/* try { // try from 0013a8ed to 0013a919 has its CatchHandler @ 0013a93c */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar8,0x198,local_50,*puVar6);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar8,&out_of_range::typeinfo,out_of_range::~out_of_range);
}
}
return 1;
}
|
||
1,042 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long) | hkr04[P]cpp-mcp/common/json.hpp | bool start_object(std::size_t len)
{
// check callback for object start
const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::object_start, discarded);
keep_stack.push_back(keep);
auto val = handle_value(BasicJsonType::value_t::object, true);
ref_stack.push_back(val.second);
// check object limit
if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size()))
{
JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back()));
}
return true;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movq %rdi, %r14
addq $0x80, %rdi
leaq 0x8(%r14), %rbx
movq 0x10(%r14), %rsi
subq 0x8(%r14), %rsi
shrq $0x3, %rsi
leaq 0xa8(%r14), %rcx
xorl %edx, %edx
callq 0x154b4
leaq 0x20(%r14), %rdi
movzbl %al, %esi
callq 0x14780
leaq 0x8(%rsp), %rsi
movb $0x1, (%rsi)
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x154d8
leaq 0x50(%rsp), %rsi
movb %al, -0x8(%rsi)
movq %rdx, (%rsi)
movq %rbx, %rdi
callq 0x15644
movq 0x10(%r14), %rax
movq -0x8(%rax), %rdi
testq %rdi, %rdi
sete %al
cmpq $-0x1, %r15
sete %cl
orb %al, %cl
jne 0x14daa
callq 0x15662
cmpq %r15, %rax
jb 0x14db7
movb $0x1, %al
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x5220
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0xa0bb
leaq 0x8c5e(%rip), %rsi # 0x1da34
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x15777
movq 0x10(%r14), %rax
movq -0x8(%rax), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x198, %esi # imm = 0x198
callq 0x1568a
xorl %ebp, %ebp
leaq 0x16d4d(%rip), %rsi # 0x2bb58
leaq -0xcbd8(%rip), %rdx # 0x823a
movq %rbx, %rdi
callq 0x5730
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x51d0
jmp 0x14e2f
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
callq 0x51d0
testb %bpl, %bpl
jne 0x14e43
jmp 0x14e4b
movq %rax, %r14
movq %rbx, %rdi
callq 0x5330
movq %r14, %rdi
callq 0x5750
nop
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12start_objectEm:
push rbp
push r15
push r14; char
push rbx; int
sub rsp, 58h
mov r15, rsi
mov r14, rdi
add rdi, 80h
lea rbx, [r14+8]
mov rsi, [r14+10h]
sub rsi, [r14+8]
shr rsi, 3
lea rcx, [r14+0A8h]
xor edx, edx
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)
lea rdi, [r14+20h]
movzx esi, al
call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
lea rsi, [rsp+78h+var_70]
mov byte ptr [rsi], 1
push 1
pop rdx
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEESt4pairIbPSF_EOT_b; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&,bool)
lea rsi, [rsp+78h+var_28]
mov [rsi-8], al
mov [rsi], rdx
mov rdi, rbx
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backERKSE_; 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> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> * const&)
mov rax, [r14+10h]
mov rdi, [rax-8]
test rdi, rdi
setz al
cmp r15, 0FFFFFFFFFFFFFFFFh
setz cl
or cl, al
jnz short loc_14DAA
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; 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>::max_size(void)
cmp rax, r15
jb short loc_14DB7
loc_14DAA:
mov al, 1
add rsp, 58h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_14DB7:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+78h+var_50]; this
mov rsi, r15; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rsi, aExcessiveObjec; "excessive object size: "
lea rdi, [rsp+78h+var_70]
lea rdx, [rsp+78h+var_50]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA24_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(char const(&)[24],std::string &&)
mov rax, [r14+10h]
mov rcx, [rax-8]
mov bpl, 1
lea rdx, [rsp+78h+var_70]
mov rdi, rbx; this
mov esi, 198h; int
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+78h+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_14E2F
mov r14, rax
mov bpl, 1
loc_14E2F:
lea rdi, [rsp+78h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_14E43
jmp short loc_14E4B
mov r14, rax
loc_14E43:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_14E4B:
mov rdi, r14
call __Unwind_Resume
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::start_object(
long long a1,
unsigned long long a2)
{
unsigned __int8 v2; // al
long long v3; // rdx
nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // rbx
char v6; // [rsp+0h] [rbp-78h]
int v7[6]; // [rsp+8h] [rbp-70h] BYREF
char v8; // [rsp+20h] [rbp-58h]
int v9[6]; // [rsp+28h] [rbp-50h] BYREF
char v10; // [rsp+40h] [rbp-38h]
int v11; // [rsp+48h] [rbp-30h]
long long v12; // [rsp+50h] [rbp-28h]
int v13; // [rsp+58h] [rbp-20h]
char v14; // [rsp+60h] [rbp-18h]
v2 = std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()(
a1 + 128,
(*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3,
0LL,
a1 + 168);
std::vector<bool>::push_back(a1 + 32, v2);
LOBYTE(v7[0]) = 1;
LOBYTE(v11) = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(
a1,
v7,
1LL);
v12 = v3;
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::push_back(a1 + 8);
if ( *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) != 0LL
&& a2 != -1LL
&& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size() < a2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::to_string((std::__cxx11 *)v9, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(
v7,
"excessive object size: ",
v9);
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
408,
v6,
v7[0],
v7[2],
v7[4],
v8,
v9[0],
v9[2],
v9[4],
v10,
v11,
v12,
v13,
v14);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return 1;
}
| start_object:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x58
MOV R15,RSI
MOV R14,RDI
ADD RDI,0x80
LEA RBX,[R14 + 0x8]
MOV RSI,qword ptr [R14 + 0x10]
SUB RSI,qword ptr [R14 + 0x8]
SHR RSI,0x3
LEA RCX,[R14 + 0xa8]
XOR EDX,EDX
CALL 0x001154b4
LEA RDI,[R14 + 0x20]
MOVZX ESI,AL
CALL 0x00114780
LEA RSI,[RSP + 0x8]
MOV byte ptr [RSI],0x1
PUSH 0x1
POP RDX
MOV RDI,R14
CALL 0x001154d8
LEA RSI,[RSP + 0x50]
MOV byte ptr [RSI + -0x8],AL
MOV qword ptr [RSI],RDX
MOV RDI,RBX
CALL 0x00115644
MOV RAX,qword ptr [R14 + 0x10]
MOV RDI,qword ptr [RAX + -0x8]
TEST RDI,RDI
SETZ AL
CMP R15,-0x1
SETZ CL
OR CL,AL
JNZ 0x00114daa
CALL 0x00115662
CMP RAX,R15
JC 0x00114db7
LAB_00114daa:
MOV AL,0x1
ADD RSP,0x58
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00114db7:
PUSH 0x20
POP RDI
CALL 0x00105220
MOV RBX,RAX
LAB_00114dc2:
LEA RDI,[RSP + 0x28]
MOV RSI,R15
CALL 0x0010a0bb
LAB_00114dcf:
LEA RSI,[0x11da34]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x00115777
MOV RAX,qword ptr [R14 + 0x10]
MOV RCX,qword ptr [RAX + -0x8]
MOV BPL,0x1
LAB_00114df0:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x198
CALL 0x0011568a
XOR EBP,EBP
LEA RSI,[0x12bb58]
LEA RDX,[0x10823a]
MOV RDI,RBX
CALL 0x00105730
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::start_object(unsigned long) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::start_object(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong param_1)
{
bool bVar1;
ulong uVar2;
int8 uVar3;
basic_json *extraout_RDX;
detail local_70 [32];
__cxx11 local_50 [32];
int1 local_30;
basic_json *local_28;
bVar1 = (bool)std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()(this + 0x80,(ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3,
0,this + 0xa8);
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x20),bVar1);
local_70[0] = (detail)0x1;
local_30 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,local_70,true);
local_28 = extraout_RDX;
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::push_back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8),&local_28);
if (param_1 != 0xffffffffffffffff &&
*(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>
**)(*(long *)(this + 0x10) + -8) !=
(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) {
uVar2 = 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>
::max_size(*(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>
**)(*(long *)(this + 0x10) + -8));
if (uVar2 < param_1) {
uVar3 = __cxa_allocate_exception(0x20);
/* try { // try from 00114dc2 to 00114dce has its CatchHandler @ 00114e40 */
std::__cxx11::to_string(local_50,param_1);
/* try { // try from 00114dcf to 00114de4 has its CatchHandler @ 00114e29 */
concat<std::__cxx11::string,char_const(&)[24],std::__cxx11::string>
(local_70,"excessive object size: ",(string *)local_50);
/* try { // try from 00114df0 to 00114e19 has its CatchHandler @ 00114e1a */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0x198,local_70,*(int8 *)(*(long *)(this + 0x10) + -8));
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&out_of_range::typeinfo,exception::~exception);
}
}
return 1;
}
|
|
1,043 | aimrt::runtime::core::logger::LoggerManager::Shutdown() | aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/logger/logger_manager.cc | void LoggerManager::Shutdown() {
if (std::atomic_exchange(&state_, State::kShutdown) == State::kShutdown)
return;
AIMRT_INFO("Logger manager shutdown.");
// logger_proxy_map_ cannot be cleared, some plugins still generate logs
for (auto& backend : logger_backend_vec_) {
backend->Shutdown();
}
// logger_backend cannot be cleared, there may be unfinished log tasks
logger_backend_gen_func_map_.clear();
get_executor_func_ = nullptr;
} | O3 | cpp | aimrt::runtime::core::logger::LoggerManager::Shutdown():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x258, %rsp # imm = 0x258
movl $0x3, %eax
xchgl %eax, 0x20(%rdi)
cmpl $0x3, %eax
je 0xb998e
movq %rdi, %rbx
movq 0x28(%rdi), %r14
cmpq $0x0, 0x10(%r14)
je 0xb999d
movq %r14, %rdi
callq *0x18(%r14)
cmpl $0x2, %eax
ja 0xb9942
leaq 0x60(%rsp), %r12
movq $0x0, -0x10(%r12)
leaq 0x1dd36e(%rip), %rax # 0x296c00
movq %rax, -0x20(%r12)
movq %r12, -0x18(%r12)
movq $0x1f4, -0x8(%r12) # imm = 0x1F4
leaq 0x1398a2(%rip), %rsi # 0x1f314e
leaq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %r8
movl $0x18, %edx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x89ac9
movq 0x48(%rsp), %rsi
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x80c40
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0xb98f9
movq 0x58(%rsp), %rsi
callq 0x82190
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %rax
addq $0x20, %r14
movq %rax, (%rsp)
leaq 0x1396fc(%rip), %rcx # 0x1f300e
leaq 0x137ef4(%rip), %r8 # 0x1f180d
movq %r14, %rdi
movl $0x2, %esi
movl $0x7c, %edx
callq 0x83aa0
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0xb9942
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x82190
movq 0x90(%rbx), %r14
movq 0x98(%rbx), %r15
cmpq %r15, %r14
je 0xb9964
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
addq $0x8, %r14
jmp 0xb9950
leaq 0x58(%rbx), %rdi
callq 0xbdf72
movq 0x48(%rbx), %rax
testq %rax, %rax
je 0xb998e
leaq 0x38(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x48, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x80b20
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0xb99d8
movq 0x20(%rsp), %rsi
incq %rsi
jmp 0xb99d3
movq %rax, %rdi
callq 0x8b40b
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0xb99d8
movq 0x58(%rsp), %rsi
callq 0x82190
movq %rbx, %rdi
callq 0x83b70
| _ZN5aimrt7runtime4core6logger13LoggerManager8ShutdownEv:
push r15
push r14
push r12
push rbx
sub rsp, 258h
mov eax, 3
xchg eax, [rdi+20h]
cmp eax, 3
jz loc_B998E
mov rbx, rdi
mov r14, [rdi+28h]
cmp qword ptr [r14+10h], 0
jz loc_B999D
mov rdi, r14
call qword ptr [r14+18h]
cmp eax, 2
ja loc_B9942
lea r12, [rsp+278h+var_218]
mov qword ptr [r12-10h], 0
lea rax, off_296C00
mov [r12-20h], rax
mov [r12-18h], r12
mov qword ptr [r12-8], 1F4h
lea rsi, aLoggerManagerS_0; "Logger manager shutdown."
lea rdi, [rsp+278h+var_238]; int
lea r8, [rsp+278h+var_248]
mov edx, 18h
xor ecx, ecx
xor r9d, r9d
call _ZN3fmt3v106detail10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS4_EENS1_12vformat_argsIS4_E4typeENS1_10locale_refE; fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref)
mov rsi, [rsp+278h+var_230]
lea r15, [rsp+278h+var_258]
mov [r15-10h], r15
mov rdx, [rsp+278h+var_228]
add rdx, rsi
lea rdi, [rsp+278h+var_268]
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 rdi, [rsp+278h+var_230]; void *
cmp rdi, r12
jz short loc_B98F9
mov rsi, [rsp+278h+var_220]; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B98F9:
mov r9, [rsp+278h+var_268]
mov rax, [rsp+278h+var_260]
add r14, 20h ; ' '
mov [rsp+278h+var_278], rax
lea rcx, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/aimrt_"...
lea r8, aShutdown; "Shutdown"
mov rdi, r14
mov esi, 2
mov edx, 7Ch ; '|'
call __ZNKSt8functionIFvjjPKcS1_S1_mEEclEjjS1_S1_S1_m; std::function<void ()(uint,uint,char const*,char const*,char const*,ulong)>::operator()(uint,uint,char const*,char const*,char const*,ulong)
mov rdi, [rsp+278h+var_268]; void *
cmp rdi, r15
jz short loc_B9942
mov rsi, [rsp+278h+var_258]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B9942:
mov r14, [rbx+90h]
mov r15, [rbx+98h]
loc_B9950:
cmp r14, r15
jz short loc_B9964
mov rdi, [r14]
mov rax, [rdi]
call qword ptr [rax+28h]
add r14, 8
jmp short loc_B9950
loc_B9964:
lea rdi, [rbx+58h]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St8functionIFSt10unique_ptrIN5aimrt7runtime4core6logger17LoggerBackendBaseESt14default_deleteISE_EEvEEESaISK_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSM_18_Mod_range_hashingENSM_20_Default_ranged_hashENSM_20_Prime_rehash_policyENSM_17_Hashtable_traitsILb1ELb0ELb1EEEE5clearEv; std::_Hashtable<std::string,std::pair<std::string const,std::function<std::unique_ptr<aimrt::runtime::core::logger::LoggerBackendBase> ()(void)>>,std::allocator<std::pair<std::string const,std::function<std::unique_ptr<aimrt::runtime::core::logger::LoggerBackendBase> ()(void)>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::clear(void)
mov rax, [rbx+48h]
test rax, rax
jz short loc_B998E
lea rdi, [rbx+38h]
mov rsi, rdi
mov edx, 3
call rax
add rbx, 48h ; 'H'
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_B998E:
add rsp, 258h
pop rbx
pop r12
pop r14
pop r15
retn
loc_B999D:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
mov rbx, rax
mov rdi, [rsp+278h+var_268]
cmp rdi, r15
jz short loc_B99D8
mov rsi, [rsp+278h+var_258]
inc rsi
jmp short loc_B99D3
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, [rsp+278h+var_230]; void *
cmp rdi, r12
jz short loc_B99D8
mov rsi, [rsp+278h+var_220]; unsigned __int64
loc_B99D3:
call __ZdlPvm; operator delete(void *,ulong)
loc_B99D8:
mov rdi, rbx
call __Unwind_Resume
| long long aimrt::runtime::core::logger::LoggerManager::Shutdown(
aimrt::runtime::core::logger::LoggerManager *this)
{
long long result; // rax
long long v2; // r14
_QWORD *v3; // r14
_QWORD *v4; // r15
void *v5; // [rsp+10h] [rbp-268h] BYREF
long long v6; // [rsp+18h] [rbp-260h]
_QWORD v7[2]; // [rsp+20h] [rbp-258h] BYREF
_BYTE v8[16]; // [rsp+30h] [rbp-248h] BYREF
_UNKNOWN **v9; // [rsp+40h] [rbp-238h] BYREF
void *v10; // [rsp+48h] [rbp-230h]
long long v11; // [rsp+50h] [rbp-228h]
unsigned long long v12; // [rsp+58h] [rbp-220h]
_BYTE v13[536]; // [rsp+60h] [rbp-218h] BYREF
result = (unsigned int)_InterlockedExchange((volatile __int32 *)this + 8, 3);
if ( (_DWORD)result != 3 )
{
v2 = *((_QWORD *)this + 5);
if ( !*(_QWORD *)(v2 + 16) )
std::__throw_bad_function_call();
if ( (*(unsigned int ( **)(_QWORD))(v2 + 24))(*((_QWORD *)this + 5)) <= 2 )
{
v11 = 0LL;
v9 = &off_296C00;
v10 = v13;
v12 = 500LL;
fmt::v10::detail::vformat_to<char>((long long)&v9, "Logger manager shutdown.", 24LL, 0LL, (long long)v8, 0LL);
v5 = v7;
std::string::_M_construct<char const*>(&v5, v10, (char *)v10 + v11);
if ( v10 != v13 )
operator delete(v10, v12);
std::function<void ()(unsigned int,unsigned int,char const*,char const*,char const*,unsigned long)>::operator()(
v2 + 32,
2,
124,
(unsigned int)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/logger/logger_manager.cc",
(unsigned int)"Shutdown",
(_DWORD)v5,
v6);
if ( v5 != v7 )
operator delete(v5, v7[0] + 1LL);
}
v3 = (_QWORD *)*((_QWORD *)this + 18);
v4 = (_QWORD *)*((_QWORD *)this + 19);
while ( v3 != v4 )
{
(*(void ( **)(_QWORD))(*(_QWORD *)*v3 + 40LL))(*v3);
++v3;
}
std::_Hashtable<std::string,std::pair<std::string const,std::function<std::unique_ptr<aimrt::runtime::core::logger::LoggerBackendBase> ()(void)>>,std::allocator<std::pair<std::string const,std::function<std::unique_ptr<aimrt::runtime::core::logger::LoggerBackendBase> ()(void)>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::clear((char *)this + 88);
result = *((_QWORD *)this + 9);
if ( result )
{
result = ((long long ( *)(char *, char *, long long))result)((char *)this + 56, (char *)this + 56, 3LL);
*(_OWORD *)((char *)this + 72) = 0LL;
}
}
return result;
}
| Shutdown:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x258
MOV EAX,0x3
XCHG dword ptr [RDI + 0x20],EAX
CMP EAX,0x3
JZ 0x001b998e
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x28]
CMP qword ptr [R14 + 0x10],0x0
JZ 0x001b999d
MOV RDI,R14
CALL qword ptr [R14 + 0x18]
CMP EAX,0x2
JA 0x001b9942
LEA R12,[RSP + 0x60]
MOV qword ptr [R12 + -0x10],0x0
LEA RAX,[0x396c00]
MOV qword ptr [R12 + -0x20],RAX
MOV qword ptr [R12 + -0x18],R12
MOV qword ptr [R12 + -0x8],0x1f4
LAB_001b98a5:
LEA RSI,[0x2f314e]
LEA RDI,[RSP + 0x40]
LEA R8,[RSP + 0x30]
MOV EDX,0x18
XOR ECX,ECX
XOR R9D,R9D
CALL 0x00189ac9
MOV RSI,qword ptr [RSP + 0x48]
LEA R15,[RSP + 0x20]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RSP + 0x50]
ADD RDX,RSI
LEA RDI,[RSP + 0x10]
CALL 0x00180c40
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R12
JZ 0x001b98f9
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00182190
LAB_001b98f9:
MOV R9,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
ADD R14,0x20
LAB_001b9907:
MOV qword ptr [RSP],RAX
LEA RCX,[0x2f300e]
LEA R8,[0x2f180d]
MOV RDI,R14
MOV ESI,0x2
MOV EDX,0x7c
CALL 0x00183aa0
LAB_001b992b:
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R15
JZ 0x001b9942
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00182190
LAB_001b9942:
MOV R14,qword ptr [RBX + 0x90]
MOV R15,qword ptr [RBX + 0x98]
LAB_001b9950:
CMP R14,R15
JZ 0x001b9964
MOV RDI,qword ptr [R14]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x28]
ADD R14,0x8
JMP 0x001b9950
LAB_001b9964:
LEA RDI,[RBX + 0x58]
CALL 0x001bdf72
MOV RAX,qword ptr [RBX + 0x48]
TEST RAX,RAX
JZ 0x001b998e
LEA RDI,[RBX + 0x38]
LAB_001b997a:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001b9984:
ADD RBX,0x48
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_001b998e:
ADD RSP,0x258
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001b999d:
CALL 0x00180b20
|
/* aimrt::runtime::core::logger::LoggerManager::Shutdown() */
void __thiscall aimrt::runtime::core::logger::LoggerManager::Shutdown(LoggerManager *this)
{
int iVar1;
long lVar2;
int8 *puVar3;
uint uVar4;
int8 *puVar5;
long *local_268 [2];
long local_258 [2];
int1 local_248 [16];
int **local_238;
int1 *local_230;
long local_228;
ulong local_220;
int1 local_218 [504];
LOCK();
iVar1 = *(int *)(this + 0x20);
*(int *)(this + 0x20) = 3;
UNLOCK();
if (iVar1 != 3) {
lVar2 = *(long *)(this + 0x28);
if (*(long *)(lVar2 + 0x10) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
uVar4 = (**(code **)(lVar2 + 0x18))(lVar2);
if (uVar4 < 3) {
local_228 = 0;
local_238 = &PTR_grow_00396c00;
local_220 = 500;
/* try { // try from 001b98a5 to 001b98e4 has its CatchHandler @ 001b99c1 */
local_230 = local_218;
fmt::v10::detail::vformat_to<char>(&local_238,"Logger manager shutdown.",0x18,0,local_248,0);
local_268[0] = local_258;
std::__cxx11::string::_M_construct<char_const*>(local_268,local_230,local_230 + local_228);
if (local_230 != local_218) {
operator_delete(local_230,local_220);
}
/* try { // try from 001b9907 to 001b992a has its CatchHandler @ 001b99a2 */
std::
function<void(unsigned_int,unsigned_int,char_const*,char_const*,char_const*,unsigned_long)>::
operator()((int)lVar2 + 0x20,2,(char *)0x7c,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/logger/logger_manager.cc"
,"Shutdown",(ulong)local_268[0]);
if (local_268[0] != local_258) {
operator_delete(local_268[0],local_258[0] + 1);
}
}
puVar3 = *(int8 **)(this + 0x98);
for (puVar5 = *(int8 **)(this + 0x90); puVar5 != puVar3; puVar5 = puVar5 + 1) {
(**(code **)(*(long *)*puVar5 + 0x28))();
}
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::function<std::unique_ptr<aimrt::runtime::core::logger::LoggerBackendBase,std::default_delete<aimrt::runtime::core::logger::LoggerBackendBase>>()>>,std::allocator<std::pair<std::__cxx11::string_const,std::function<std::unique_ptr<aimrt::runtime::core::logger::LoggerBackendBase,std::default_delete<aimrt::runtime::core::logger::LoggerBackendBase>>()>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::clear((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::function<std::unique_ptr<aimrt::runtime::core::logger::LoggerBackendBase,std::default_delete<aimrt::runtime::core::logger::LoggerBackendBase>>()>>,std::allocator<std::pair<std::__cxx11::string_const,std::function<std::unique_ptr<aimrt::runtime::core::logger::LoggerBackendBase,std::default_delete<aimrt::runtime::core::logger::LoggerBackendBase>>()>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)(this + 0x58));
if (*(code **)(this + 0x48) != (code *)0x0) {
/* try { // try from 001b997a to 001b9983 has its CatchHandler @ 001b99b9 */
(**(code **)(this + 0x48))(this + 0x38,this + 0x38,3);
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
}
}
return;
}
|
|
1,044 | test_bug5399 | eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c | static int test_bug5399(MYSQL *mysql)
{
/*
Ascii 97 is 'a', which gets mapped to Ascii 65 'A' unless internal
statement id hash in the server uses binary collation.
*/
#define NUM_OF_USED_STMT 97
MYSQL_STMT *stmt_list[NUM_OF_USED_STMT];
MYSQL_STMT **stmt;
MYSQL_BIND my_bind[1];
char buff[600];
int rc;
int32 no;
memset(my_bind, '\0', sizeof(my_bind)); my_bind[0].buffer_type= MYSQL_TYPE_LONG;
my_bind[0].buffer= &no;
for (stmt= stmt_list; stmt != stmt_list + NUM_OF_USED_STMT; ++stmt)
{
sprintf(buff, "select %d", (int) (stmt - stmt_list));
*stmt= mysql_stmt_init(mysql);
rc= mysql_stmt_prepare(*stmt, SL(buff));
check_stmt_rc(rc, *stmt); mysql_stmt_bind_result(*stmt, my_bind);
}
for (stmt= stmt_list; stmt != stmt_list + NUM_OF_USED_STMT; ++stmt)
{
rc= mysql_stmt_execute(*stmt);
check_stmt_rc(rc, *stmt);
rc= mysql_stmt_store_result(*stmt);
check_stmt_rc(rc, *stmt);
rc= mysql_stmt_fetch(*stmt);
FAIL_UNLESS((int32) (stmt - stmt_list) == no, "");
}
for (stmt= stmt_list; stmt != stmt_list + NUM_OF_USED_STMT; ++stmt)
mysql_stmt_close(*stmt);
#undef NUM_OF_USED_STMT
return OK;
} | O0 | c | test_bug5399:
pushq %rbp
movq %rsp, %rbp
subq $0x620, %rsp # imm = 0x620
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x270(%rbp)
leaq -0x600(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x14260
movl $0x3, -0x5a0(%rbp)
leaq -0x608(%rbp), %rax
movq %rax, -0x5f0(%rbp)
leaq -0x580(%rbp), %rax
movq %rax, -0x588(%rbp)
movq -0x588(%rbp), %rax
leaq -0x580(%rbp), %rcx
addq $0x308, %rcx # imm = 0x308
cmpq %rcx, %rax
je 0x28535
leaq -0x260(%rbp), %rdi
movq -0x588(%rbp), %rax
leaq -0x580(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movl %eax, %edx
leaq 0x416c8(%rip), %rsi # 0x69b23
movb $0x0, %al
callq 0x140f0
movq -0x270(%rbp), %rdi
callq 0x44950
movq %rax, %rcx
movq -0x588(%rbp), %rax
movq %rcx, (%rax)
movq -0x588(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x618(%rbp)
leaq -0x260(%rbp), %rax
movq %rax, -0x610(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x141a0
movq -0x618(%rbp), %rdi
movq -0x610(%rbp), %rsi
movq %rax, %rdx
callq 0x45070
movl %eax, -0x604(%rbp)
cmpl $0x0, -0x604(%rbp)
je 0x28506
movq -0x588(%rbp), %rax
movq (%rax), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x3d0ac(%rip), %rdi # 0x65590
leaq 0x3db82(%rip), %rdx # 0x6606d
movl $0xaf4, %ecx # imm = 0xAF4
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x264(%rbp)
jmp 0x286e6
jmp 0x28508
movq -0x588(%rbp), %rax
movq (%rax), %rdi
leaq -0x600(%rbp), %rsi
callq 0x43940
movq -0x588(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x588(%rbp)
jmp 0x28418
leaq -0x580(%rbp), %rax
movq %rax, -0x588(%rbp)
movq -0x588(%rbp), %rax
leaq -0x580(%rbp), %rcx
addq $0x308, %rcx # imm = 0x308
cmpq %rcx, %rax
je 0x28691
movq -0x588(%rbp), %rax
movq (%rax), %rdi
callq 0x46580
movl %eax, -0x604(%rbp)
cmpl $0x0, -0x604(%rbp)
je 0x285ba
movq -0x588(%rbp), %rax
movq (%rax), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x3cff8(%rip), %rdi # 0x65590
leaq 0x3dace(%rip), %rdx # 0x6606d
movl $0xafa, %ecx # imm = 0xAFA
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x264(%rbp)
jmp 0x286e6
jmp 0x285bc
movq -0x588(%rbp), %rax
movq (%rax), %rdi
callq 0x454d0
movl %eax, -0x604(%rbp)
cmpl $0x0, -0x604(%rbp)
je 0x28615
movq -0x588(%rbp), %rax
movq (%rax), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x3cf9d(%rip), %rdi # 0x65590
leaq 0x3da73(%rip), %rdx # 0x6606d
movl $0xafc, %ecx # imm = 0xAFC
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x264(%rbp)
jmp 0x286e6
jmp 0x28617
movq -0x588(%rbp), %rax
movq (%rax), %rdi
callq 0x44020
movl %eax, -0x604(%rbp)
movq -0x588(%rbp), %rax
leaq -0x580(%rbp), %rcx
subq %rcx, %rax
sarq $0x3, %rax
cmpl -0x608(%rbp), %eax
je 0x28676
leaq 0x3cf40(%rip), %rdi # 0x65590
leaq 0x3dd19(%rip), %rsi # 0x66370
leaq 0x3da0f(%rip), %rdx # 0x6606d
movl $0xafe, %ecx # imm = 0xAFE
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x264(%rbp)
jmp 0x286e6
jmp 0x28678
jmp 0x2867a
movq -0x588(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x588(%rbp)
jmp 0x28543
leaq -0x580(%rbp), %rax
movq %rax, -0x588(%rbp)
movq -0x588(%rbp), %rax
leaq -0x580(%rbp), %rcx
addq $0x308, %rcx # imm = 0x308
cmpq %rcx, %rax
je 0x286dc
movq -0x588(%rbp), %rax
movq (%rax), %rdi
callq 0x43eb0
movq -0x588(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x588(%rbp)
jmp 0x2869f
movl $0x0, -0x264(%rbp)
movl -0x264(%rbp), %eax
movl %eax, -0x61c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x28713
movl -0x61c(%rbp), %eax
addq $0x620, %rsp # imm = 0x620
popq %rbp
retq
callq 0x144c0
nopl (%rax,%rax)
| test_bug5399:
push rbp
mov rbp, rsp
sub rsp, 620h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_270], rdi
lea rdi, [rbp+var_600]
xor esi, esi
mov edx, 70h ; 'p'
call _memset
mov [rbp+var_5A0], 3
lea rax, [rbp+var_608]
mov [rbp+var_5F0], rax
lea rax, [rbp+var_580]
mov [rbp+var_588], rax
loc_28418:
mov rax, [rbp+var_588]
lea rcx, [rbp+var_580]
add rcx, 308h
cmp rax, rcx
jz loc_28535
lea rdi, [rbp+var_260]
mov rax, [rbp+var_588]
lea rcx, [rbp+var_580]
sub rax, rcx
sar rax, 3
mov edx, eax
lea rsi, aSelectD; "select %d"
mov al, 0
call _sprintf
mov rdi, [rbp+var_270]
call mysql_stmt_init
mov rcx, rax
mov rax, [rbp+var_588]
mov [rax], rcx
mov rax, [rbp+var_588]
mov rax, [rax]
mov [rbp+var_618], rax
lea rax, [rbp+var_260]
mov [rbp+var_610], rax
lea rdi, [rbp+var_260]
call _strlen
mov rdi, [rbp+var_618]
mov rsi, [rbp+var_610]
mov rdx, rax
call mysql_stmt_prepare
mov [rbp+var_604], eax
cmp [rbp+var_604], 0
jz short loc_28506
mov rax, [rbp+var_588]
mov rdi, [rax]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0AF4h
mov al, 0
call diag
mov [rbp+var_264], 1
jmp loc_286E6
loc_28506:
jmp short $+2
loc_28508:
mov rax, [rbp+var_588]
mov rdi, [rax]
lea rsi, [rbp+var_600]
call mysql_stmt_bind_result
mov rax, [rbp+var_588]
add rax, 8
mov [rbp+var_588], rax
jmp loc_28418
loc_28535:
lea rax, [rbp+var_580]
mov [rbp+var_588], rax
loc_28543:
mov rax, [rbp+var_588]
lea rcx, [rbp+var_580]
add rcx, 308h
cmp rax, rcx
jz loc_28691
mov rax, [rbp+var_588]
mov rdi, [rax]
call mysql_stmt_execute
mov [rbp+var_604], eax
cmp [rbp+var_604], 0
jz short loc_285BA
mov rax, [rbp+var_588]
mov rdi, [rax]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0AFAh
mov al, 0
call diag
mov [rbp+var_264], 1
jmp loc_286E6
loc_285BA:
jmp short $+2
loc_285BC:
mov rax, [rbp+var_588]
mov rdi, [rax]
call mysql_stmt_store_result
mov [rbp+var_604], eax
cmp [rbp+var_604], 0
jz short loc_28615
mov rax, [rbp+var_588]
mov rdi, [rax]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0AFCh
mov al, 0
call diag
mov [rbp+var_264], 1
jmp loc_286E6
loc_28615:
jmp short $+2
loc_28617:
mov rax, [rbp+var_588]
mov rdi, [rax]
call mysql_stmt_fetch
mov [rbp+var_604], eax
mov rax, [rbp+var_588]
lea rcx, [rbp+var_580]
sub rax, rcx
sar rax, 3
cmp eax, [rbp+var_608]
jz short loc_28676
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, a12+4; ""
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0AFEh
mov al, 0
call diag
mov [rbp+var_264], 1
jmp short loc_286E6
loc_28676:
jmp short $+2
loc_28678:
jmp short $+2
loc_2867A:
mov rax, [rbp+var_588]
add rax, 8
mov [rbp+var_588], rax
jmp loc_28543
loc_28691:
lea rax, [rbp+var_580]
mov [rbp+var_588], rax
loc_2869F:
mov rax, [rbp+var_588]
lea rcx, [rbp+var_580]
add rcx, 308h
cmp rax, rcx
jz short loc_286DC
mov rax, [rbp+var_588]
mov rdi, [rax]
call mysql_stmt_close
mov rax, [rbp+var_588]
add rax, 8
mov [rbp+var_588], rax
jmp short loc_2869F
loc_286DC:
mov [rbp+var_264], 0
loc_286E6:
mov eax, [rbp+var_264]
mov [rbp+var_61C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_28713
mov eax, [rbp+var_61C]
add rsp, 620h
pop rbp
retn
loc_28713:
call ___stack_chk_fail
| long long test_bug5399(long long a1)
{
long long v1; // rax
long long v2; // rax
int v3; // eax
int v4; // r8d
int v5; // r9d
int v6; // eax
int v7; // r8d
int v8; // r9d
int v9; // eax
int v10; // r8d
int v11; // r9d
int v12; // r8d
int v13; // r9d
long long v15; // [rsp+8h] [rbp-618h]
int v16; // [rsp+18h] [rbp-608h] BYREF
int v17; // [rsp+1Ch] [rbp-604h]
_BYTE v18[16]; // [rsp+20h] [rbp-600h] BYREF
int *v19; // [rsp+30h] [rbp-5F0h]
int v20; // [rsp+80h] [rbp-5A0h]
long long *i; // [rsp+98h] [rbp-588h]
_BYTE v22[776]; // [rsp+A0h] [rbp-580h] BYREF
long long v23; // [rsp+3A8h] [rbp-278h] BYREF
long long v24; // [rsp+3B0h] [rbp-270h]
_BYTE v26[600]; // [rsp+3C0h] [rbp-260h] BYREF
unsigned long long v27; // [rsp+618h] [rbp-8h]
v27 = __readfsqword(0x28u);
v24 = a1;
memset(v18, 0LL, 112LL);
v20 = 3;
v19 = &v16;
for ( i = (long long *)v22; i != &v23; ++i )
{
sprintf(v26, "select %d", ((char *)i - v22) >> 3);
v1 = mysql_stmt_init(v24);
*i = v1;
v15 = *i;
v2 = strlen(v26);
v17 = mysql_stmt_prepare(v15, v26, v2);
if ( v17 )
{
v3 = mysql_stmt_error(*i);
diag(
(unsigned int)"Error: %s (%s: %d)",
v3,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2804,
v4,
v5);
return 1;
}
mysql_stmt_bind_result(*i, v18);
}
for ( i = (long long *)v22; i != &v23; ++i )
{
v17 = mysql_stmt_execute(*i);
if ( v17 )
{
v6 = mysql_stmt_error(*i);
diag(
(unsigned int)"Error: %s (%s: %d)",
v6,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2810,
v7,
v8);
return 1;
}
v17 = mysql_stmt_store_result(*i);
if ( v17 )
{
v9 = mysql_stmt_error(*i);
diag(
(unsigned int)"Error: %s (%s: %d)",
v9,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2812,
v10,
v11);
return 1;
}
v17 = mysql_stmt_fetch(*i);
if ( (unsigned int)(((char *)i - v22) >> 3) != v16 )
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2814,
v12,
v13);
return 1;
}
}
for ( i = (long long *)v22; i != &v23; ++i )
mysql_stmt_close(*i);
return 0;
}
| test_bug5399:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x620
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x270],RDI
LEA RDI,[RBP + -0x600]
XOR ESI,ESI
MOV EDX,0x70
CALL 0x00114260
MOV dword ptr [RBP + -0x5a0],0x3
LEA RAX,[RBP + -0x608]
MOV qword ptr [RBP + -0x5f0],RAX
LEA RAX,[RBP + -0x580]
MOV qword ptr [RBP + -0x588],RAX
LAB_00128418:
MOV RAX,qword ptr [RBP + -0x588]
LEA RCX,[RBP + -0x580]
ADD RCX,0x308
CMP RAX,RCX
JZ 0x00128535
LEA RDI,[RBP + -0x260]
MOV RAX,qword ptr [RBP + -0x588]
LEA RCX,[RBP + -0x580]
SUB RAX,RCX
SAR RAX,0x3
MOV EDX,EAX
LEA RSI,[0x169b23]
MOV AL,0x0
CALL 0x001140f0
MOV RDI,qword ptr [RBP + -0x270]
CALL 0x00144950
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x588]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x588]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x618],RAX
LEA RAX,[RBP + -0x260]
MOV qword ptr [RBP + -0x610],RAX
LEA RDI,[RBP + -0x260]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x618]
MOV RSI,qword ptr [RBP + -0x610]
MOV RDX,RAX
CALL 0x00145070
MOV dword ptr [RBP + -0x604],EAX
CMP dword ptr [RBP + -0x604],0x0
JZ 0x00128506
MOV RAX,qword ptr [RBP + -0x588]
MOV RDI,qword ptr [RAX]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0xaf4
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x264],0x1
JMP 0x001286e6
LAB_00128506:
JMP 0x00128508
LAB_00128508:
MOV RAX,qword ptr [RBP + -0x588]
MOV RDI,qword ptr [RAX]
LEA RSI,[RBP + -0x600]
CALL 0x00143940
MOV RAX,qword ptr [RBP + -0x588]
ADD RAX,0x8
MOV qword ptr [RBP + -0x588],RAX
JMP 0x00128418
LAB_00128535:
LEA RAX,[RBP + -0x580]
MOV qword ptr [RBP + -0x588],RAX
LAB_00128543:
MOV RAX,qword ptr [RBP + -0x588]
LEA RCX,[RBP + -0x580]
ADD RCX,0x308
CMP RAX,RCX
JZ 0x00128691
MOV RAX,qword ptr [RBP + -0x588]
MOV RDI,qword ptr [RAX]
CALL 0x00146580
MOV dword ptr [RBP + -0x604],EAX
CMP dword ptr [RBP + -0x604],0x0
JZ 0x001285ba
MOV RAX,qword ptr [RBP + -0x588]
MOV RDI,qword ptr [RAX]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0xafa
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x264],0x1
JMP 0x001286e6
LAB_001285ba:
JMP 0x001285bc
LAB_001285bc:
MOV RAX,qword ptr [RBP + -0x588]
MOV RDI,qword ptr [RAX]
CALL 0x001454d0
MOV dword ptr [RBP + -0x604],EAX
CMP dword ptr [RBP + -0x604],0x0
JZ 0x00128615
MOV RAX,qword ptr [RBP + -0x588]
MOV RDI,qword ptr [RAX]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0xafc
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x264],0x1
JMP 0x001286e6
LAB_00128615:
JMP 0x00128617
LAB_00128617:
MOV RAX,qword ptr [RBP + -0x588]
MOV RDI,qword ptr [RAX]
CALL 0x00144020
MOV dword ptr [RBP + -0x604],EAX
MOV RAX,qword ptr [RBP + -0x588]
LEA RCX,[RBP + -0x580]
SUB RAX,RCX
SAR RAX,0x3
CMP EAX,dword ptr [RBP + -0x608]
JZ 0x00128676
LEA RDI,[0x165590]
LEA RSI,[0x166370]
LEA RDX,[0x16606d]
MOV ECX,0xafe
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x264],0x1
JMP 0x001286e6
LAB_00128676:
JMP 0x00128678
LAB_00128678:
JMP 0x0012867a
LAB_0012867a:
MOV RAX,qword ptr [RBP + -0x588]
ADD RAX,0x8
MOV qword ptr [RBP + -0x588],RAX
JMP 0x00128543
LAB_00128691:
LEA RAX,[RBP + -0x580]
MOV qword ptr [RBP + -0x588],RAX
LAB_0012869f:
MOV RAX,qword ptr [RBP + -0x588]
LEA RCX,[RBP + -0x580]
ADD RCX,0x308
CMP RAX,RCX
JZ 0x001286dc
MOV RAX,qword ptr [RBP + -0x588]
MOV RDI,qword ptr [RAX]
CALL 0x00143eb0
MOV RAX,qword ptr [RBP + -0x588]
ADD RAX,0x8
MOV qword ptr [RBP + -0x588],RAX
JMP 0x0012869f
LAB_001286dc:
MOV dword ptr [RBP + -0x264],0x0
LAB_001286e6:
MOV EAX,dword ptr [RBP + -0x264]
MOV dword ptr [RBP + -0x61c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00128713
MOV EAX,dword ptr [RBP + -0x61c]
ADD RSP,0x620
POP RBP
RET
LAB_00128713:
CALL 0x001144c0
|
int4 test_bug5399(int8 param_1)
{
int8 uVar1;
size_t sVar2;
long in_FS_OFFSET;
int local_610;
int local_60c;
int1 local_608 [16];
int *local_5f8;
int4 local_5a8;
int8 *local_590;
int8 local_588 [97];
int8 uStack_280;
int8 local_278;
int4 local_26c;
char local_268 [600];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_278 = param_1;
memset(local_608,0,0x70);
local_5a8 = 3;
local_5f8 = &local_610;
for (local_590 = local_588; local_590 != &uStack_280; local_590 = local_590 + 1) {
sprintf(local_268,"select %d",(long)local_590 - (long)local_588 >> 3 & 0xffffffff);
uVar1 = mysql_stmt_init(local_278);
*local_590 = uVar1;
uVar1 = *local_590;
sVar2 = strlen(local_268);
local_60c = mysql_stmt_prepare(uVar1,local_268,sVar2);
if (local_60c != 0) {
uVar1 = mysql_stmt_error(*local_590);
diag("Error: %s (%s: %d)",uVar1,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0xaf4
);
local_26c = 1;
goto LAB_001286e6;
}
mysql_stmt_bind_result(*local_590,local_608);
}
local_590 = local_588;
do {
if (local_590 == &uStack_280) {
for (local_590 = local_588; local_590 != &uStack_280; local_590 = local_590 + 1) {
mysql_stmt_close(*local_590);
}
local_26c = 0;
LAB_001286e6:
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_26c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
local_60c = mysql_stmt_execute(*local_590);
if (local_60c != 0) {
uVar1 = mysql_stmt_error(*local_590);
diag("Error: %s (%s: %d)",uVar1,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0xafa
);
local_26c = 1;
goto LAB_001286e6;
}
local_60c = mysql_stmt_store_result(*local_590);
if (local_60c != 0) {
uVar1 = mysql_stmt_error(*local_590);
diag("Error: %s (%s: %d)",uVar1,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0xafc
);
local_26c = 1;
goto LAB_001286e6;
}
local_60c = mysql_stmt_fetch(*local_590);
if ((int)((long)local_590 - (long)local_588 >> 3) != local_610) {
diag("Error: %s (%s: %d)",&DAT_00166370,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0xafe
);
local_26c = 1;
goto LAB_001286e6;
}
local_590 = local_590 + 1;
} while( true );
}
|
|
1,045 | js_get_fast_array | bluesky950520[P]quickjs/quickjs.c | static BOOL js_get_fast_array(JSContext *ctx, JSValue obj,
JSValue **arrpp, uint32_t *countp)
{
/* Try and handle fast arrays explicitly */
if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(obj);
if (p->class_id == JS_CLASS_ARRAY && p->fast_array) {
*countp = p->u.array.count;
*arrpp = p->u.array.u.values;
return TRUE;
}
}
return FALSE;
} | O2 | c | js_get_fast_array:
xorl %eax, %eax
cmpl $-0x1, %esi
jne 0x3a28f
cmpw $0x2, 0x6(%rdi)
jne 0x3a28f
testb $0x8, 0x5(%rdi)
je 0x3a28f
movl 0x40(%rdi), %eax
movl %eax, (%rcx)
movq 0x38(%rdi), %rax
movq %rax, (%rdx)
pushq $0x1
popq %rax
retq
| js_get_fast_array:
xor eax, eax
cmp esi, 0FFFFFFFFh
jnz short locret_3A28F
cmp word ptr [rdi+6], 2
jnz short locret_3A28F
test byte ptr [rdi+5], 8
jz short locret_3A28F
mov eax, [rdi+40h]
mov [rcx], eax
mov rax, [rdi+38h]
mov [rdx], rax
push 1
pop rax
locret_3A28F:
retn
| long long js_get_fast_array(long long a1, int a2, _QWORD *a3, _DWORD *a4)
{
long long result; // rax
result = 0LL;
if ( a2 == -1 && *(_WORD *)(a1 + 6) == 2 && (*(_BYTE *)(a1 + 5) & 8) != 0 )
{
*a4 = *(_DWORD *)(a1 + 64);
*a3 = *(_QWORD *)(a1 + 56);
return 1LL;
}
return result;
}
| js_get_fast_array:
XOR EAX,EAX
CMP ESI,-0x1
JNZ 0x0013a28f
CMP word ptr [RDI + 0x6],0x2
JNZ 0x0013a28f
TEST byte ptr [RDI + 0x5],0x8
JZ 0x0013a28f
MOV EAX,dword ptr [RDI + 0x40]
MOV dword ptr [RCX],EAX
MOV RAX,qword ptr [RDI + 0x38]
MOV qword ptr [RDX],RAX
PUSH 0x1
POP RAX
LAB_0013a28f:
RET
|
int8 js_get_fast_array(long param_1,int param_2,int8 *param_3,int4 *param_4)
{
int8 uVar1;
uVar1 = 0;
if (((param_2 == -1) && (*(short *)(param_1 + 6) == 2)) && ((*(byte *)(param_1 + 5) & 8) != 0)) {
*param_4 = *(int4 *)(param_1 + 0x40);
*param_3 = *(int8 *)(param_1 + 0x38);
uVar1 = 1;
}
return uVar1;
}
|
|
1,046 | my_hash_sort_ucs2_bin | eloqsql/strings/ctype-ucs2.c | static void
my_hash_sort_ucs2_bin(CHARSET_INFO *cs,
const uchar *key, size_t len, ulong *nr1, ulong *nr2)
{
size_t lengthsp= my_lengthsp_mb2(cs, (const char *) key, len);
my_hash_sort_ucs2_nopad_bin(cs, key, lengthsp, nr1, nr2);
} | O3 | c | my_hash_sort_ucs2_bin:
movq %rdx, %rax
cmpq $0x2, %rdx
jl 0x53d3d
cmpb $0x20, -0x1(%rsi,%rax)
jne 0x53d35
leaq -0x2(%rax), %rdx
cmpb $0x0, -0x2(%rsi,%rax)
je 0x53d1a
movq (%rcx), %rdx
movq (%r8), %rdi
jmp 0x53d49
movq (%rcx), %rdx
movq (%r8), %rdi
cmpq $0x1, %rax
jne 0x53d7c
pushq %rbp
movq %rsp, %rbp
addq %rsi, %rax
movl %edx, %r9d
andl $0x3f, %r9d
addq %rdi, %r9
movzbl (%rsi), %r10d
imulq %r9, %r10
movq %rdx, %r9
shlq $0x8, %r9
addq %r10, %r9
xorq %r9, %rdx
addq $0x3, %rdi
incq %rsi
cmpq %rax, %rsi
jb 0x53d50
popq %rbp
movq %rdx, (%rcx)
movq %rdi, (%r8)
retq
| my_hash_sort_ucs2_bin:
mov rax, rdx
cmp rdx, 2
jl short loc_53D3D
cmp byte ptr [rsi+rax-1], 20h ; ' '
jnz short loc_53D35
lea rdx, [rax-2]
cmp byte ptr [rsi+rax-2], 0
jz short my_hash_sort_ucs2_bin
loc_53D35:
mov rdx, [rcx]
mov rdi, [r8]
jmp short loc_53D49
loc_53D3D:
mov rdx, [rcx]
mov rdi, [r8]
cmp rax, 1
jnz short loc_53D7C
loc_53D49:
push rbp
mov rbp, rsp
add rax, rsi
loc_53D50:
mov r9d, edx
and r9d, 3Fh
add r9, rdi
movzx r10d, byte ptr [rsi]
imul r10, r9
mov r9, rdx
shl r9, 8
add r9, r10
xor rdx, r9
add rdi, 3
inc rsi
cmp rsi, rax
jb short loc_53D50
pop rbp
loc_53D7C:
mov [rcx], rdx
mov [r8], rdi
retn
| unsigned long long my_hash_sort_ucs2_bin(
long long a1,
unsigned long long a2,
long long a3,
long long *a4,
long long *a5)
{
unsigned long long result; // rax
long long v6; // rdx
long long v7; // rdi
while ( 1 )
{
result = a3;
if ( a3 < 2 )
break;
if ( *(_BYTE *)(a2 + a3 - 1) == 32 )
{
a3 -= 2LL;
if ( !*(_BYTE *)(a2 + result - 2) )
continue;
}
v6 = *a4;
v7 = *a5;
goto LABEL_6;
}
v6 = *a4;
v7 = *a5;
if ( result != 1 )
goto LABEL_8;
LABEL_6:
result += a2;
do
{
v6 ^= (v7 + (v6 & 0x3F)) * *(unsigned __int8 *)a2 + (v6 << 8);
v7 += 3LL;
++a2;
}
while ( a2 < result );
LABEL_8:
*a4 = v6;
*a5 = v7;
return result;
}
| my_hash_sort_ucs2_bin:
MOV RAX,RDX
CMP RDX,0x2
JL 0x00153d3d
CMP byte ptr [RSI + RAX*0x1 + -0x1],0x20
JNZ 0x00153d35
LEA RDX,[RAX + -0x2]
CMP byte ptr [RSI + RAX*0x1 + -0x2],0x0
JZ 0x00153d1a
LAB_00153d35:
MOV RDX,qword ptr [RCX]
MOV RDI,qword ptr [R8]
JMP 0x00153d49
LAB_00153d3d:
MOV RDX,qword ptr [RCX]
MOV RDI,qword ptr [R8]
CMP RAX,0x1
JNZ 0x00153d7c
LAB_00153d49:
PUSH RBP
MOV RBP,RSP
ADD RAX,RSI
LAB_00153d50:
MOV R9D,EDX
AND R9D,0x3f
ADD R9,RDI
MOVZX R10D,byte ptr [RSI]
IMUL R10,R9
MOV R9,RDX
SHL R9,0x8
ADD R9,R10
XOR RDX,R9
ADD RDI,0x3
INC RSI
CMP RSI,RAX
JC 0x00153d50
POP RBP
LAB_00153d7c:
MOV qword ptr [RCX],RDX
MOV qword ptr [R8],RDI
RET
|
void my_hash_sort_ucs2_bin
(int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
byte *pbVar1;
long lVar2;
ulong uVar3;
long lVar4;
do {
lVar2 = param_3;
if (lVar2 < 2) {
uVar3 = *param_4;
lVar4 = *param_5;
if (lVar2 != 1) goto LAB_00153d7c;
goto LAB_00153d49;
}
} while ((param_2[lVar2 + -1] == 0x20) && (param_3 = lVar2 + -2, param_2[lVar2 + -2] == 0));
uVar3 = *param_4;
lVar4 = *param_5;
LAB_00153d49:
pbVar1 = param_2 + lVar2;
do {
uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar4);
lVar4 = lVar4 + 3;
param_2 = param_2 + 1;
} while (param_2 < pbVar1);
LAB_00153d7c:
*param_4 = uVar3;
*param_5 = lVar4;
return;
}
|
|
1,047 | string_split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | llama.cpp/common/common.cpp | std::vector<std::string> string_split(const std::string & str, const std::string & delimiter) {
std::vector<std::string> parts;
size_t start = 0;
size_t end = str.find(delimiter);
while (end != std::string::npos) {
parts.push_back(str.substr(start, end - start));
start = end + delimiter.length();
end = str.find(delimiter, start);
}
parts.push_back(str.substr(start));
return parts;
} | O3 | cpp | string_split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
xorl %ebp, %ebp
movq %r14, %rdi
xorl %edx, %edx
callq 0x1c410
cmpq $-0x1, %rax
je 0xacde4
movq %rax, %r12
xorl %ebp, %ebp
leaq 0x8(%rsp), %r13
movq %r12, %rcx
subq %rbp, %rcx
movq %r13, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x1cbb0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x68ab4
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xacdc3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1c110
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %r12, %rbp
addq %rcx, %rbp
movq %r14, %rdi
movq %rbp, %rdx
callq 0x1c410
movq %rax, %r12
cmpq $-0x1, %rax
jne 0xacd88
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq $-0x1, %rcx
callq 0x1cbb0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x68ab4
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xace23
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1c110
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0xace57
jmp 0xace45
movq %rax, %r14
jmp 0xace69
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xace69
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1c110
movq %rbx, %rdi
callq 0x2a79a
movq %r14, %rdi
callq 0x1c7d0
| _Z12string_splitRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rsi, [rdx]
mov rcx, [rdx+8]
xor ebp, ebp
mov rdi, r14
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_ACDE4
mov r12, rax
xor ebp, ebp
lea r13, [rsp+58h+var_50]
loc_ACD88:
mov rcx, r12
sub rcx, rbp
mov rdi, r13
mov rsi, r14
mov rdx, rbp
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, rbx
mov rsi, r13
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+58h+var_50]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_ACDC3
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_ACDC3:
mov rsi, [r15]
mov rcx, [r15+8]
mov rbp, r12
add rbp, rcx
mov rdi, r14
mov rdx, rbp
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong)
mov r12, rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_ACD88
loc_ACDE4:
lea rdi, [rsp+58h+var_50]
mov rsi, r14
mov rdx, rbp
mov rcx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_ACE23
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_ACE23:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]
jmp short loc_ACE57
jmp short $+2
loc_ACE45:
mov r14, rax
jmp short loc_ACE69
mov r14, rax
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
loc_ACE57:
cmp rdi, rax
jz short loc_ACE69
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_ACE69:
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
| long long string_split(long long a1, long long a2, _QWORD *a3)
{
long long v4; // rbp
long long v5; // rax
long long v6; // r12
long long v7; // rcx
void *v9[2]; // [rsp+8h] [rbp-50h] BYREF
_QWORD v10[8]; // [rsp+18h] [rbp-40h] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v4 = 0LL;
v5 = std::string::find(a2, *a3, 0LL, a3[1]);
if ( v5 != -1 )
{
v6 = v5;
v4 = 0LL;
do
{
std::string::substr(v9, a2, v4, v6 - v4);
std::vector<std::string>::emplace_back<std::string>(a1, v9);
if ( v9[0] != v10 )
operator delete(v9[0], v10[0] + 1LL);
v7 = a3[1];
v4 = v7 + v6;
v6 = std::string::find(a2, *a3, v7 + v6, v7);
}
while ( v6 != -1 );
}
std::string::substr(v9, a2, v4, -1LL);
std::vector<std::string>::emplace_back<std::string>(a1, v9);
if ( v9[0] != v10 )
operator delete(v9[0], v10[0] + 1LL);
return a1;
}
| string_split:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RSI,qword ptr [RDX]
MOV RCX,qword ptr [RDX + 0x8]
XOR EBP,EBP
MOV RDI,R14
XOR EDX,EDX
CALL 0x0011c410
CMP RAX,-0x1
JZ 0x001acde4
MOV R12,RAX
XOR EBP,EBP
LEA R13,[RSP + 0x8]
LAB_001acd88:
MOV RCX,R12
SUB RCX,RBP
LAB_001acd8e:
MOV RDI,R13
MOV RSI,R14
MOV RDX,RBP
CALL 0x0011cbb0
LAB_001acd9c:
MOV RDI,RBX
MOV RSI,R13
CALL 0x00168ab4
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001acdc3
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011c110
LAB_001acdc3:
MOV RSI,qword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
MOV RBP,R12
ADD RBP,RCX
MOV RDI,R14
MOV RDX,RBP
CALL 0x0011c410
MOV R12,RAX
CMP RAX,-0x1
JNZ 0x001acd88
LAB_001acde4:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV RDX,RBP
MOV RCX,-0x1
CALL 0x0011cbb0
LAB_001acdfb:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00168ab4
LAB_001ace08:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001ace23
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011c110
LAB_001ace23:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_split(std::__cxx11::string const&, std::__cxx11::string const&) */
string * string_split(string *param_1,string *param_2)
{
long lVar1;
ulong *in_RDX;
long *local_50 [2];
long local_40 [2];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
lVar1 = std::__cxx11::string::find((char *)param_2,*in_RDX,0);
if (lVar1 != -1) {
do {
/* try { // try from 001acd8e to 001acd9b has its CatchHandler @ 001ace45 */
std::__cxx11::string::substr((ulong)local_50,(ulong)param_2);
/* try { // try from 001acd9c to 001acda6 has its CatchHandler @ 001ace4a */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,
(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
lVar1 = std::__cxx11::string::find((char *)param_2,*in_RDX,lVar1 + in_RDX[1]);
} while (lVar1 != -1);
}
/* try { // try from 001acde4 to 001acdfa has its CatchHandler @ 001ace43 */
std::__cxx11::string::substr((ulong)local_50,(ulong)param_2);
/* try { // try from 001acdfb to 001ace07 has its CatchHandler @ 001ace35 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,
(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return param_1;
}
|
|
1,048 | run_tool | eloqsql/client/mysql_upgrade.c | static int run_tool(char *tool_path, DYNAMIC_STRING *ds_res, ...)
{
int ret;
const char* arg;
va_list args;
DYNAMIC_STRING ds_cmdline;
DBUG_ENTER("run_tool");
DBUG_PRINT("enter", ("tool_path: %s", tool_path));
if (init_dynamic_string(&ds_cmdline, IF_WIN("\"", ""), FN_REFLEN, FN_REFLEN))
die("Out of memory");
dynstr_append_os_quoted(&ds_cmdline, tool_path, NullS);
dynstr_append(&ds_cmdline, " ");
va_start(args, ds_res);
while ((arg= va_arg(args, char *)))
{
/* Options should already be os quoted */
dynstr_append(&ds_cmdline, arg);
dynstr_append(&ds_cmdline, " ");
}
va_end(args);
#ifdef _WIN32
dynstr_append(&ds_cmdline, "\"");
#endif
DBUG_PRINT("info", ("Running: %s", ds_cmdline.str));
ret= run_command(ds_cmdline.str, ds_res);
DBUG_PRINT("exit", ("ret: %d", ret));
dynstr_free(&ds_cmdline);
DBUG_RETURN(ret);
} | O0 | c | run_tool:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
testb %al, %al
je 0x2b8e1
movaps %xmm0, -0xe0(%rbp)
movaps %xmm1, -0xd0(%rbp)
movaps %xmm2, -0xc0(%rbp)
movaps %xmm3, -0xb0(%rbp)
movaps %xmm4, -0xa0(%rbp)
movaps %xmm5, -0x90(%rbp)
movaps %xmm6, -0x80(%rbp)
movaps %xmm7, -0x70(%rbp)
movq %r9, -0xe8(%rbp)
movq %r8, -0xf0(%rbp)
movq %rcx, -0xf8(%rbp)
movq %rdx, -0x100(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x2b907
leaq -0x60(%rbp), %rdi
leaq 0xc6b56(%rip), %rsi # 0xf2468
movl $0x200, %ecx # imm = 0x200
movq %rcx, %rdx
callq 0x39be0
cmpb $0x0, %al
je 0x2b931
leaq 0xc08d3(%rip), %rdi # 0xec1fd
movb $0x0, %al
callq 0x29c50
movq -0x8(%rbp), %rsi
leaq -0x60(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x3a020
leaq -0x60(%rbp), %rdi
leaq 0xc2ce5(%rip), %rsi # 0xee634
callq 0x39eb0
leaq -0x40(%rbp), %rax
leaq -0x110(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x40(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x114(%rbp)
cmpl $0x28, %eax
ja 0x2b9b3
movq -0x120(%rbp), %rcx
movl -0x114(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x128(%rbp)
jmp 0x2b9d0
movq -0x120(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x2ba06
movq -0x20(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x39eb0
leaq -0x60(%rbp), %rdi
leaq 0xc2c38(%rip), %rsi # 0xee634
callq 0x39eb0
jmp 0x2b978
leaq -0x40(%rbp), %rax
jmp 0x2ba0c
movq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2ba40
movl %eax, -0x14(%rbp)
jmp 0x2ba1e
leaq -0x60(%rbp), %rdi
callq 0x3a3c0
movl -0x14(%rbp), %eax
movl %eax, -0x12c(%rbp)
movl -0x12c(%rbp), %eax
addq $0x130, %rsp # imm = 0x130
popq %rbp
retq
nop
| run_tool:
push rbp
mov rbp, rsp
sub rsp, 130h
test al, al
jz short loc_2B8E1
movaps [rbp+var_E0], xmm0
movaps [rbp+var_D0], xmm1
movaps [rbp+var_C0], xmm2
movaps [rbp+var_B0], xmm3
movaps [rbp+var_A0], xmm4
movaps [rbp+var_90], xmm5
movaps [rbp+var_80], xmm6
movaps [rbp+var_70], xmm7
loc_2B8E1:
mov [rbp+var_E8], r9
mov [rbp+var_F0], r8
mov [rbp+var_F8], rcx
mov [rbp+var_100], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_2B907:
lea rdi, [rbp+var_60]
lea rsi, asc_F2464+4; ""
mov ecx, 200h
mov rdx, rcx
call init_dynamic_string
cmp al, 0
jz short loc_2B931
lea rdi, aOutOfMemory; "Out of memory"
mov al, 0
call die
loc_2B931:
mov rsi, [rbp+var_8]
lea rdi, [rbp+var_60]
xor eax, eax
mov edx, eax
mov al, 0
call dynstr_append_os_quoted
lea rdi, [rbp+var_60]
lea rsi, asc_EE633+1; " "
call dynstr_append
lea rax, [rbp+var_40]
lea rcx, [rbp+var_110]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
loc_2B978:
lea rax, [rbp+var_40]
mov [rbp+var_120], rax
mov eax, [rbp+var_40]
mov [rbp+var_114], eax
cmp eax, 28h ; '('
ja short loc_2B9B3
mov rcx, [rbp+var_120]
mov edx, [rbp+var_114]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_128], rax
jmp short loc_2B9D0
loc_2B9B3:
mov rcx, [rbp+var_120]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_128], rax
loc_2B9D0:
mov rax, [rbp+var_128]
mov rax, [rax]
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_2BA06
mov rsi, [rbp+var_20]
lea rdi, [rbp+var_60]
call dynstr_append
lea rdi, [rbp+var_60]
lea rsi, asc_EE633+1; " "
call dynstr_append
jmp loc_2B978
loc_2BA06:
lea rax, [rbp+var_40]
jmp short $+2
loc_2BA0C:
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_10]
call run_command
mov [rbp+var_14], eax
jmp short $+2
loc_2BA1E:
lea rdi, [rbp+var_60]
call dynstr_free
mov eax, [rbp+var_14]
mov [rbp+var_12C], eax
mov eax, [rbp+var_12C]
add rsp, 130h
pop rbp
retn
| long long run_tool(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long *v21; // rax
char v23; // [rsp+0h] [rbp-130h]
char v24; // [rsp+20h] [rbp-110h] BYREF
long long v25; // [rsp+30h] [rbp-100h]
long long v26; // [rsp+38h] [rbp-F8h]
long long v27; // [rsp+40h] [rbp-F0h]
long long v28; // [rsp+48h] [rbp-E8h]
__m128 v29; // [rsp+50h] [rbp-E0h]
__m128 v30; // [rsp+60h] [rbp-D0h]
__m128 v31; // [rsp+70h] [rbp-C0h]
__m128 v32; // [rsp+80h] [rbp-B0h]
__m128 v33; // [rsp+90h] [rbp-A0h]
__m128 v34; // [rsp+A0h] [rbp-90h]
__m128 v35; // [rsp+B0h] [rbp-80h]
__m128 v36; // [rsp+C0h] [rbp-70h]
_QWORD v37[4]; // [rsp+D0h] [rbp-60h] BYREF
int v38; // [rsp+F0h] [rbp-40h]
int v39; // [rsp+F4h] [rbp-3Ch]
char *v40; // [rsp+F8h] [rbp-38h]
char *v41; // [rsp+100h] [rbp-30h]
long long v42; // [rsp+110h] [rbp-20h]
unsigned int v43; // [rsp+11Ch] [rbp-14h]
long long v44; // [rsp+120h] [rbp-10h]
long long v45; // [rsp+128h] [rbp-8h]
v29 = a7;
v30 = a8;
v31 = a9;
v32 = a10;
v33 = a11;
v34 = a12;
v35 = a13;
v36 = a14;
v28 = a6;
v27 = a5;
v26 = a4;
v25 = a3;
v45 = a1;
v44 = a2;
if ( (unsigned __int8)init_dynamic_string(v37, "", 512LL, 512LL) )
die((long long)"Out of memory", (long long)"", v15, v16, v17, v18, a7, a8, a9, a10, v19, v20, a13, a14, v23);
dynstr_append_os_quoted((unsigned int)v37, v45, 0, v16, v17, v18);
dynstr_append(v37, " ");
v41 = &v24;
v40 = &a15;
v39 = 48;
v38 = 16;
while ( 1 )
{
if ( (unsigned int)v38 > 0x28 )
{
v21 = (long long *)v40;
v40 += 8;
}
else
{
v21 = (long long *)&v41[v38];
v38 += 8;
}
v42 = *v21;
if ( !v42 )
break;
dynstr_append(v37, v42);
dynstr_append(v37, " ");
}
v43 = run_command(v37[0], v44);
dynstr_free(v37);
return v43;
}
| run_tool:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x130
TEST AL,AL
JZ 0x0012b8e1
MOVAPS xmmword ptr [RBP + -0xe0],XMM0
MOVAPS xmmword ptr [RBP + -0xd0],XMM1
MOVAPS xmmword ptr [RBP + -0xc0],XMM2
MOVAPS xmmword ptr [RBP + -0xb0],XMM3
MOVAPS xmmword ptr [RBP + -0xa0],XMM4
MOVAPS xmmword ptr [RBP + -0x90],XMM5
MOVAPS xmmword ptr [RBP + -0x80],XMM6
MOVAPS xmmword ptr [RBP + -0x70],XMM7
LAB_0012b8e1:
MOV qword ptr [RBP + -0xe8],R9
MOV qword ptr [RBP + -0xf0],R8
MOV qword ptr [RBP + -0xf8],RCX
MOV qword ptr [RBP + -0x100],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x0012b907
LAB_0012b907:
LEA RDI,[RBP + -0x60]
LEA RSI,[0x1f2468]
MOV ECX,0x200
MOV RDX,RCX
CALL 0x00139be0
CMP AL,0x0
JZ 0x0012b931
LEA RDI,[0x1ec1fd]
MOV AL,0x0
CALL 0x00129c50
LAB_0012b931:
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x60]
XOR EAX,EAX
MOV EDX,EAX
MOV AL,0x0
CALL 0x0013a020
LEA RDI,[RBP + -0x60]
LEA RSI,[0x1ee634]
CALL 0x00139eb0
LEA RAX,[RBP + -0x40]
LEA RCX,[RBP + -0x110]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
LAB_0012b978:
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0x120],RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x114],EAX
CMP EAX,0x28
JA 0x0012b9b3
MOV RCX,qword ptr [RBP + -0x120]
MOV EDX,dword ptr [RBP + -0x114]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x128],RAX
JMP 0x0012b9d0
LAB_0012b9b3:
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x128],RAX
LAB_0012b9d0:
MOV RAX,qword ptr [RBP + -0x128]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x0012ba06
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x60]
CALL 0x00139eb0
LEA RDI,[RBP + -0x60]
LEA RSI,[0x1ee634]
CALL 0x00139eb0
JMP 0x0012b978
LAB_0012ba06:
LEA RAX,[RBP + -0x40]
JMP 0x0012ba0c
LAB_0012ba0c:
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0012ba40
MOV dword ptr [RBP + -0x14],EAX
JMP 0x0012ba1e
LAB_0012ba1e:
LEA RDI,[RBP + -0x60]
CALL 0x0013a3c0
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x12c],EAX
MOV EAX,dword ptr [RBP + -0x12c]
ADD RSP,0x130
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
int4
run_tool(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;
char cVar1;
long *local_130;
int1 local_118 [16];
int8 local_108;
int8 local_100;
int8 local_f8;
int8 local_f0;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68 [4];
uint local_48;
int4 local_44;
long *local_40;
int1 *local_38;
long local_28;
int4 local_1c;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_e8 = param_1;
local_d8 = param_2;
local_c8 = param_3;
local_b8 = param_4;
local_a8 = param_5;
local_98 = param_6;
local_88 = param_7;
local_78 = param_8;
}
local_108 = param_11;
local_100 = param_12;
local_f8 = param_13;
local_f0 = param_14;
local_18 = param_10;
local_10 = param_9;
cVar1 = init_dynamic_string(local_68,&DAT_001f2468,0x200);
if (cVar1 != '\0') {
die("Out of memory");
}
dynstr_append_os_quoted(local_68,local_10,0);
dynstr_append(local_68,&DAT_001ee634);
local_38 = local_118;
local_40 = (long *)&stack0x00000008;
local_44 = 0x30;
local_48 = 0x10;
while( true ) {
if (local_48 < 0x29) {
local_130 = (long *)(local_38 + (int)local_48);
local_48 = local_48 + 8;
}
else {
local_130 = local_40;
local_40 = local_40 + 1;
}
local_28 = *local_130;
if (local_28 == 0) break;
dynstr_append(local_68,local_28);
dynstr_append(local_68,&DAT_001ee634);
}
local_1c = run_command(local_68[0],local_18);
dynstr_free(local_68);
return local_1c;
}
|
|
1,049 | nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*) | hkr04[P]cpp-mcp/common/json.hpp | static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0xe2cc(%rip), %rsi # 0x4dcc3
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xcab2
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0xd2e4
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0xd35a
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rcx
callq 0xd27a
leaq 0x8(%rsp), %rdi
callq 0xac20
leaq 0x48(%rsp), %rdi
callq 0xac20
leaq 0x28(%rsp), %rdi
callq 0xac20
movq 0x68(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3fac6
leaq 0x68(%rsp), %rdi
callq 0xac20
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x3fab3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xac20
jmp 0x3fa9f
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xac20
jmp 0x3faae
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xac20
jmp 0x3fabd
movq %rax, %rbx
movq %rbx, %rdi
callq 0xaac0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
push rbp
push r15
push r14
push rbx
sub rsp, 88h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea rsi, aInvalidIterato; "invalid_iterator"
lea rdi, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_A1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0A8h+var_60]
lea rsi, [rsp+0A8h+var_80]
mov edx, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea rdi, [rsp+0A8h+var_A0]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*)
lea rdi, [rsp+0A8h+var_40]
lea rsi, [rsp+0A8h+var_60]
lea rdx, [rsp+0A8h+var_A0]
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&)
lea rdi, [rsp+0A8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdx, [rsp+0A8h+var_40]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator(int,char const*)
lea rdi, [rsp+0A8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 88h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_60]
jmp short loc_3FAB3
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_3FA9F
mov rbx, rax
loc_3FA9F:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_3FAAE
mov rbx, rax
loc_3FAAE:
lea rdi, [rsp+arg_20]; void *
loc_3FAB3:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_3FABD
mov rbx, rax
loc_3FABD:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::invalid_iterator * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
nlohmann::json_abi_v3_11_3::detail::invalid_iterator *this,
int a2,
long long a3)
{
_QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF
_QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF
_BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF
char *v8[8]; // [rsp+68h] [rbp-40h] BYREF
std::string::basic_string<std::allocator<char>>(v6, (long long)"invalid_iterator");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v7, (long long)v6, a2);
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(v5);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(
(long long)v8,
(long long)v7,
(long long)v5,
a3);
std::string::~string(v5);
std::string::~string(v7);
std::string::~string(v6);
nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator(this, a2, v8[0]);
std::string::~string(v8);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x88
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
LAB_0013f9f0:
LEA RSI,[0x14dcc3]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
CALL 0x0010cab2
LAB_0013fa06:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x0010d2e4
LAB_0013fa17:
LEA RDI,[RSP + 0x8]
MOV RSI,R15
CALL 0x0010d35a
LAB_0013fa24:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RCX,R14
CALL 0x0010d27a
LEA RDI,[RSP + 0x8]
CALL 0x0010ac20
LEA RDI,[RSP + 0x48]
CALL 0x0010ac20
LEA RDI,[RSP + 0x28]
CALL 0x0010ac20
MOV RDX,qword ptr [RSP + 0x68]
LAB_0013fa5e:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0013fac6
LAB_0013fa68:
LEA RDI,[RSP + 0x68]
CALL 0x0010ac20
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R14
POP R15
POP RBP
RET
|
invalid_iterator *
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(invalid_iterator *param_1,int param_2,string *param_3)
{
allocator local_a1;
basic_json local_a0 [32];
string local_80 [32];
exception local_60 [32];
char *local_40 [4];
/* try { // try from 0013f9f0 to 0013fa05 has its CatchHandler @ 0013faba */
std::__cxx11::string::string<std::allocator<char>>(local_80,"invalid_iterator",&local_a1);
/* try { // try from 0013fa06 to 0013fa16 has its CatchHandler @ 0013faab */
nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,param_2);
/* try { // try from 0013fa17 to 0013fa23 has its CatchHandler @ 0013fa9c */
nlohmann::json_abi_v3_11_3::detail::exception::
diagnostics<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>>
(local_a0);
/* try { // try from 0013fa24 to 0013fa3a has its CatchHandler @ 0013fa8d */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&>
((detail *)local_40,(string *)local_60,(string *)local_a0,param_3);
std::__cxx11::string::~string((string *)local_a0);
std::__cxx11::string::~string((string *)local_60);
std::__cxx11::string::~string(local_80);
/* try { // try from 0013fa5e to 0013fa67 has its CatchHandler @ 0013fa83 */
nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator
(param_1,param_2,local_40[0]);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
|
|
1,050 | type_apply_conversion | tsotchke[P]eshkol/src/core/utils/type_conversion.c | char* type_apply_conversion(Arena* arena, const char* expr, Type* from, Type* to) {
assert(arena != NULL);
assert(expr != NULL);
assert(from != NULL);
assert(to != NULL);
// Same type, no conversion needed
if (type_equals(from, to)) {
char* result = arena_alloc(arena, strlen(expr) + 1);
if (!result) return NULL;
strcpy(result, expr);
return result;
}
// Generate conversion code
char buffer[1024];
// Integer to float
if (from->kind == TYPE_INTEGER && to->kind == TYPE_FLOAT) {
snprintf(buffer, sizeof(buffer), "(float)(%s)", expr);
}
// Float to integer
else if (from->kind == TYPE_FLOAT && to->kind == TYPE_INTEGER) {
snprintf(buffer, sizeof(buffer), "(int)(%s)", expr);
}
// Char to integer
else if (from->kind == TYPE_CHAR && to->kind == TYPE_INTEGER) {
snprintf(buffer, sizeof(buffer), "(int)(%s)", expr);
}
// Integer to char
else if (from->kind == TYPE_INTEGER && to->kind == TYPE_CHAR) {
snprintf(buffer, sizeof(buffer), "(char)(%s)", expr);
}
// String to any
else if (from->kind == TYPE_STRING && to->kind == TYPE_ANY) {
snprintf(buffer, sizeof(buffer), "(void*)(char*)(%s)", expr);
}
// Numeric to any
else if ((from->kind == TYPE_INTEGER || from->kind == TYPE_FLOAT) && to->kind == TYPE_ANY) {
const char* type_str = from->kind == TYPE_INTEGER ? "int" : "float";
snprintf(buffer, sizeof(buffer), "({ %s temp = (%s); (void*)&temp; })", type_str, expr);
}
// Any other conversion
else {
char* to_str = type_to_string(arena, to);
if (!to_str) return NULL;
snprintf(buffer, sizeof(buffer), "(%s)(%s)", to_str, expr);
}
// Allocate memory for the result
char* result = arena_alloc(arena, strlen(buffer) + 1);
if (!result) return NULL;
// Copy the result
strcpy(result, buffer);
return result;
} | O1 | c | type_apply_conversion:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x408, %rsp # imm = 0x408
testq %rdi, %rdi
je 0x45a1
movq %rsi, %r14
testq %rsi, %rsi
je 0x45c0
movq %rdx, %r12
testq %rdx, %rdx
je 0x45df
movq %rcx, %r15
testq %rcx, %rcx
je 0x45fe
movq %rdi, %rbx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2ee0
testb %al, %al
je 0x448c
movq %r14, %rdi
callq 0x1090
leaq 0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x288f
testq %rax, %rax
je 0x458d
movq %rax, %rdi
movq %r14, %rsi
addq $0x408, %rsp # imm = 0x408
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1070
movl (%r12), %eax
cmpl $0x2, %eax
jne 0x44a4
cmpl $0x3, (%r15)
jne 0x44a4
leaq 0x20b9(%rip), %rdx # 0x655b
jmp 0x44ee
cmpl $0x4, %eax
je 0x44b9
cmpl $0x3, %eax
jne 0x44c8
cmpl $0x2, (%r15)
je 0x44bf
cmpl $0x4, %eax
jne 0x44c8
cmpl $0x2, (%r15)
jne 0x44c8
leaq 0x20a1(%rip), %rdx # 0x6567
jmp 0x44ee
cmpl $0x2, %eax
jne 0x44dc
cmpl $0x4, (%r15)
jne 0x44dc
leaq 0x2097(%rip), %rdx # 0x6571
jmp 0x44ee
cmpl $0x5, %eax
jne 0x4502
cmpl $0xc, (%r15)
jne 0x4502
leaq 0x208e(%rip), %rdx # 0x657c
movq %rsp, %rdi
movl $0x400, %esi # imm = 0x400
movq %r14, %rcx
xorl %eax, %eax
callq 0x10c0
jmp 0x4564
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x2, %ecx
jne 0x4538
cmpl $0xc, (%r15)
jne 0x4538
cmpl $0x2, %eax
leaq 0x1ee9(%rip), %rax # 0x6405
leaq 0x1eee(%rip), %rcx # 0x6411
cmoveq %rax, %rcx
leaq 0x2061(%rip), %rdx # 0x658f
movq %rsp, %rdi
movl $0x400, %esi # imm = 0x400
jmp 0x455a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x369c
testq %rax, %rax
je 0x458d
leaq 0x2064(%rip), %rdx # 0x65b3
movq %rsp, %rdi
movl $0x400, %esi # imm = 0x400
movq %rax, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x10c0
movq %rsp, %rdi
callq 0x1090
leaq 0x1(%rax), %rsi
movq %rbx, %rdi
callq 0x288f
testq %rax, %rax
je 0x458d
movq %rax, %rbx
movq %rsp, %rsi
movq %rax, %rdi
callq 0x1070
jmp 0x458f
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x408, %rsp # imm = 0x408
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x18b4(%rip), %rdi # 0x5e5c
leaq 0x1ee9(%rip), %rsi # 0x6498
leaq 0x1f3d(%rip), %rcx # 0x64f3
movl $0x1f5, %edx # imm = 0x1F5
callq 0x10e0
leaq 0x1f6f(%rip), %rdi # 0x6536
leaq 0x1eca(%rip), %rsi # 0x6498
leaq 0x1f1e(%rip), %rcx # 0x64f3
movl $0x1f6, %edx # imm = 0x1F6
callq 0x10e0
leaq 0x1f5d(%rip), %rdi # 0x6543
leaq 0x1eab(%rip), %rsi # 0x6498
leaq 0x1eff(%rip), %rcx # 0x64f3
movl $0x1f7, %edx # imm = 0x1F7
callq 0x10e0
leaq 0x1f4b(%rip), %rdi # 0x6550
leaq 0x1e8c(%rip), %rsi # 0x6498
leaq 0x1ee0(%rip), %rcx # 0x64f3
movl $0x1f8, %edx # imm = 0x1F8
callq 0x10e0
| type_apply_conversion:
push r15
push r14
push r12
push rbx
sub rsp, 408h
test rdi, rdi
jz loc_45A1
mov r14, rsi
test rsi, rsi
jz loc_45C0
mov r12, rdx
test rdx, rdx
jz loc_45DF
mov r15, rcx
test rcx, rcx
jz loc_45FE
mov rbx, rdi
mov rdi, r12
mov rsi, r15
call type_equals
test al, al
jz short loc_448C
mov rdi, r14
call _strlen
lea rsi, [rax+1]
mov rdi, rbx
call arena_alloc
test rax, rax
jz loc_458D
mov rdi, rax
mov rsi, r14
add rsp, 408h
pop rbx
pop r12
pop r14
pop r15
jmp _strcpy
loc_448C:
mov eax, [r12]
cmp eax, 2
jnz short loc_44A4
cmp dword ptr [r15], 3
jnz short loc_44A4
lea rdx, aFloatS; "(float)(%s)"
jmp short loc_44EE
loc_44A4:
cmp eax, 4
jz short loc_44B9
cmp eax, 3
jnz short loc_44C8
cmp dword ptr [r15], 2
jz short loc_44BF
cmp eax, 4
jnz short loc_44C8
loc_44B9:
cmp dword ptr [r15], 2
jnz short loc_44C8
loc_44BF:
lea rdx, aIntS; "(int)(%s)"
jmp short loc_44EE
loc_44C8:
cmp eax, 2
jnz short loc_44DC
cmp dword ptr [r15], 4
jnz short loc_44DC
lea rdx, aCharS; "(char)(%s)"
jmp short loc_44EE
loc_44DC:
cmp eax, 5
jnz short loc_4502
cmp dword ptr [r15], 0Ch
jnz short loc_4502
lea rdx, aVoidCharS; "(void*)(char*)(%s)"
loc_44EE:
mov rdi, rsp
mov esi, 400h
mov rcx, r14
xor eax, eax
call _snprintf
jmp short loc_4564
loc_4502:
mov ecx, eax
and ecx, 0FFFFFFFEh
cmp ecx, 2
jnz short loc_4538
cmp dword ptr [r15], 0Ch
jnz short loc_4538
cmp eax, 2
lea rax, aInt; "int"
lea rcx, aFloat; "float"
cmovz rcx, rax
lea rdx, aSTempSVoidTemp; "({ %s temp = (%s); (void*)&temp; })"
mov rdi, rsp
mov esi, 400h
jmp short loc_455A
loc_4538:
mov rdi, rbx
mov rsi, r15
call type_to_string
test rax, rax
jz short loc_458D
lea rdx, aSS_1; "(%s)(%s)"
mov rdi, rsp
mov esi, 400h
mov rcx, rax
loc_455A:
mov r8, r14
xor eax, eax
call _snprintf
loc_4564:
mov rdi, rsp
call _strlen
lea rsi, [rax+1]
mov rdi, rbx
call arena_alloc
test rax, rax
jz short loc_458D
mov rbx, rax
mov rsi, rsp
mov rdi, rax
call _strcpy
jmp short loc_458F
loc_458D:
xor ebx, ebx
loc_458F:
mov rax, rbx
add rsp, 408h
pop rbx
pop r12
pop r14
pop r15
retn
loc_45A1:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCharTypeApplyC; "char *type_apply_conversion(Arena *, co"...
mov edx, 1F5h
call ___assert_fail
loc_45C0:
lea rdi, aExprNull; "expr != NULL"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCharTypeApplyC; "char *type_apply_conversion(Arena *, co"...
mov edx, 1F6h
call ___assert_fail
loc_45DF:
lea rdi, aFromNull; "from != NULL"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCharTypeApplyC; "char *type_apply_conversion(Arena *, co"...
mov edx, 1F7h
call ___assert_fail
loc_45FE:
lea rdi, aToNull; "to != NULL"
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCharTypeApplyC; "char *type_apply_conversion(Arena *, co"...
mov edx, 1F8h
call ___assert_fail
| long long type_apply_conversion(long long a1, long long a2, int *a3, _DWORD *a4)
{
long long v6; // rax
long long v7; // rax
int v9; // eax
const char *v10; // rcx
long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v14; // rbx
_BYTE v15[1064]; // [rsp+0h] [rbp-428h] BYREF
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c",
501LL,
"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
if ( !a2 )
__assert_fail(
"expr != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c",
502LL,
"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
if ( !a3 )
__assert_fail(
"from != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c",
503LL,
"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
if ( !a4 )
__assert_fail(
"to != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c",
504LL,
"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
if ( (unsigned __int8)type_equals(a3, (long long)a4) )
{
v6 = strlen(a2);
v7 = arena_alloc(a1, v6 + 1);
if ( v7 )
return strcpy(v7, a2);
return 0LL;
}
v9 = *a3;
if ( *a3 == 2 && *a4 == 3 )
{
snprintf(v15, 1024LL, "(float)(%s)", a2);
goto LABEL_31;
}
if ( v9 == 4 )
{
if ( *a4 != 2 )
goto LABEL_17;
LABEL_16:
snprintf(v15, 1024LL, "(int)(%s)", a2);
goto LABEL_31;
}
if ( v9 == 3 && *a4 == 2 )
goto LABEL_16;
LABEL_17:
if ( v9 == 2 && *a4 == 4 )
{
snprintf(v15, 1024LL, "(char)(%s)", a2);
}
else if ( v9 == 5 && *a4 == 12 )
{
snprintf(v15, 1024LL, "(void*)(char*)(%s)", a2);
}
else if ( (v9 & 0xFFFFFFFE) == 2 && *a4 == 12 )
{
v10 = "float";
if ( v9 == 2 )
v10 = "int";
snprintf(v15, 1024LL, "({ %s temp = (%s); (void*)&temp; })", v10, a2);
}
else
{
v11 = type_to_string(a1, (long long)a4);
if ( !v11 )
return 0LL;
snprintf(v15, 1024LL, "(%s)(%s)", v11, a2);
}
LABEL_31:
v12 = strlen(v15);
v13 = arena_alloc(a1, v12 + 1);
if ( !v13 )
return 0LL;
v14 = v13;
strcpy(v13, v15);
return v14;
}
| type_apply_conversion:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x408
TEST RDI,RDI
JZ 0x001045a1
MOV R14,RSI
TEST RSI,RSI
JZ 0x001045c0
MOV R12,RDX
TEST RDX,RDX
JZ 0x001045df
MOV R15,RCX
TEST RCX,RCX
JZ 0x001045fe
MOV RBX,RDI
MOV RDI,R12
MOV RSI,R15
CALL 0x00102ee0
TEST AL,AL
JZ 0x0010448c
MOV RDI,R14
CALL 0x00101090
LEA RSI,[RAX + 0x1]
MOV RDI,RBX
CALL 0x0010288f
TEST RAX,RAX
JZ 0x0010458d
MOV RDI,RAX
MOV RSI,R14
ADD RSP,0x408
POP RBX
POP R12
POP R14
POP R15
JMP 0x00101070
LAB_0010448c:
MOV EAX,dword ptr [R12]
CMP EAX,0x2
JNZ 0x001044a4
CMP dword ptr [R15],0x3
JNZ 0x001044a4
LEA RDX,[0x10655b]
JMP 0x001044ee
LAB_001044a4:
CMP EAX,0x4
JZ 0x001044b9
CMP EAX,0x3
JNZ 0x001044c8
CMP dword ptr [R15],0x2
JZ 0x001044bf
CMP EAX,0x4
JNZ 0x001044c8
LAB_001044b9:
CMP dword ptr [R15],0x2
JNZ 0x001044c8
LAB_001044bf:
LEA RDX,[0x106567]
JMP 0x001044ee
LAB_001044c8:
CMP EAX,0x2
JNZ 0x001044dc
CMP dword ptr [R15],0x4
JNZ 0x001044dc
LEA RDX,[0x106571]
JMP 0x001044ee
LAB_001044dc:
CMP EAX,0x5
JNZ 0x00104502
CMP dword ptr [R15],0xc
JNZ 0x00104502
LEA RDX,[0x10657c]
LAB_001044ee:
MOV RDI,RSP
MOV ESI,0x400
MOV RCX,R14
XOR EAX,EAX
CALL 0x001010c0
JMP 0x00104564
LAB_00104502:
MOV ECX,EAX
AND ECX,0xfffffffe
CMP ECX,0x2
JNZ 0x00104538
CMP dword ptr [R15],0xc
JNZ 0x00104538
CMP EAX,0x2
LEA RAX,[0x106405]
LEA RCX,[0x106411]
CMOVZ RCX,RAX
LEA RDX,[0x10658f]
MOV RDI,RSP
MOV ESI,0x400
JMP 0x0010455a
LAB_00104538:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0010369c
TEST RAX,RAX
JZ 0x0010458d
LEA RDX,[0x1065b3]
MOV RDI,RSP
MOV ESI,0x400
MOV RCX,RAX
LAB_0010455a:
MOV R8,R14
XOR EAX,EAX
CALL 0x001010c0
LAB_00104564:
MOV RDI,RSP
CALL 0x00101090
LEA RSI,[RAX + 0x1]
MOV RDI,RBX
CALL 0x0010288f
TEST RAX,RAX
JZ 0x0010458d
MOV RBX,RAX
MOV RSI,RSP
MOV RDI,RAX
CALL 0x00101070
JMP 0x0010458f
LAB_0010458d:
XOR EBX,EBX
LAB_0010458f:
MOV RAX,RBX
ADD RSP,0x408
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001045a1:
LEA RDI,[0x105e5c]
LEA RSI,[0x106498]
LEA RCX,[0x1064f3]
MOV EDX,0x1f5
CALL 0x001010e0
LAB_001045c0:
LEA RDI,[0x106536]
LEA RSI,[0x106498]
LEA RCX,[0x1064f3]
MOV EDX,0x1f6
CALL 0x001010e0
LAB_001045df:
LEA RDI,[0x106543]
LEA RSI,[0x106498]
LEA RCX,[0x1064f3]
MOV EDX,0x1f7
CALL 0x001010e0
LAB_001045fe:
LEA RDI,[0x106550]
LEA RSI,[0x106498]
LEA RCX,[0x1064f3]
MOV EDX,0x1f8
CALL 0x001010e0
|
char * type_apply_conversion(long param_1,char *param_2,uint *param_3,int *param_4)
{
uint uVar1;
int iVar2;
char cVar3;
size_t sVar4;
char *pcVar5;
char *__format;
char acStack_428 [1032];
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c"
,0x1f5,"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
}
if (param_2 == (char *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("expr != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c"
,0x1f6,"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
}
if (param_3 == (uint *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("from != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c"
,0x1f7,"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
}
if (param_4 == (int *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("to != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/type_conversion.c"
,0x1f8,"char *type_apply_conversion(Arena *, const char *, Type *, Type *)");
}
cVar3 = type_equals(param_3,param_4);
if (cVar3 != '\0') {
sVar4 = strlen(param_2);
pcVar5 = (char *)arena_alloc(param_1,sVar4 + 1);
if (pcVar5 == (char *)0x0) {
return (char *)0x0;
}
pcVar5 = strcpy(pcVar5,param_2);
return pcVar5;
}
uVar1 = *param_3;
if ((uVar1 == 2) && (*param_4 == 3)) {
pcVar5 = "(float)(%s)";
}
else {
if (uVar1 == 4) {
iVar2 = *param_4;
joined_r0x001044bd:
if (iVar2 == 2) {
pcVar5 = "(int)(%s)";
goto LAB_001044ee;
}
}
else if (uVar1 == 3) {
iVar2 = *param_4;
goto joined_r0x001044bd;
}
if ((uVar1 == 2) && (*param_4 == 4)) {
pcVar5 = "(char)(%s)";
}
else {
if ((uVar1 != 5) || (*param_4 != 0xc)) {
if (((uVar1 & 0xfffffffe) == 2) && (*param_4 == 0xc)) {
pcVar5 = "float";
if (uVar1 == 2) {
pcVar5 = "int";
}
__format = "({ %s temp = (%s); (void*)&temp; })";
}
else {
pcVar5 = (char *)type_to_string(param_1,param_4);
if (pcVar5 == (char *)0x0) {
return (char *)0x0;
}
__format = "(%s)(%s)";
}
snprintf(acStack_428,0x400,__format,pcVar5,param_2);
goto LAB_00104564;
}
pcVar5 = "(void*)(char*)(%s)";
}
}
LAB_001044ee:
snprintf(acStack_428,0x400,pcVar5,param_2);
LAB_00104564:
sVar4 = strlen(acStack_428);
pcVar5 = (char *)arena_alloc(param_1,sVar4 + 1);
if (pcVar5 == (char *)0x0) {
return (char *)0x0;
}
strcpy(pcVar5,acStack_428);
return pcVar5;
}
|
|
1,051 | ftxui::(anonymous namespace)::Bold::Render(ftxui::Screen&) | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/bold.cpp | void Render(Screen& screen) override {
for (int y = box_.y_min; y <= box_.y_max; ++y) {
for (int x = box_.x_min; x <= box_.x_max; ++x) {
screen.PixelAt(x, y).bold = true;
}
}
Node::Render(screen);
} | O1 | cpp | ftxui::(anonymous namespace)::Bold::Render(ftxui::Screen&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x54(%rdi), %r15d
cmpl 0x58(%rdi), %r15d
jg 0x38124
movl 0x4c(%r14), %r12d
cmpl 0x50(%r14), %r12d
jg 0x38117
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x3a522
orb $0x2, (%rax)
leal 0x1(%r12), %eax
cmpl 0x50(%r14), %r12d
movl %eax, %r12d
jl 0x380f8
leal 0x1(%r15), %eax
cmpl 0x58(%r14), %r15d
movl %eax, %r15d
jl 0x380ee
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2419e
nop
| _ZN5ftxui12_GLOBAL__N_14Bold6RenderERNS_6ScreenE:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov r15d, [rdi+54h]
cmp r15d, [rdi+58h]
jg short loc_38124
loc_380EE:
mov r12d, [r14+4Ch]
cmp r12d, [r14+50h]
jg short loc_38117
loc_380F8:
mov rdi, rbx; this
mov esi, r12d; int
mov edx, r15d; int
call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int)
or byte ptr [rax], 2
lea eax, [r12+1]
cmp r12d, [r14+50h]
mov r12d, eax
jl short loc_380F8
loc_38117:
lea eax, [r15+1]
cmp r15d, [r14+58h]
mov r15d, eax
jl short loc_380EE
loc_38124:
mov rdi, r14
mov rsi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _ZN5ftxui4Node6RenderERNS_6ScreenE; ftxui::Node::Render(ftxui::Screen &)
| long long ftxui::`anonymous namespace'::Bold::Render(
ftxui::_anonymous_namespace_::Bold *this,
ftxui::Screen *a2)
{
int v2; // r15d
int v3; // r12d
_BYTE *v4; // rax
bool v5; // cc
v2 = *((_DWORD *)this + 21);
if ( v2 <= *((_DWORD *)this + 22) )
{
do
{
v3 = *((_DWORD *)this + 19);
if ( v3 <= *((_DWORD *)this + 20) )
{
do
{
v4 = (_BYTE *)ftxui::Screen::PixelAt(a2, v3, v2);
*v4 |= 2u;
v5 = v3++ < *((_DWORD *)this + 20);
}
while ( v5 );
}
v5 = v2++ < *((_DWORD *)this + 22);
}
while ( v5 );
}
return ftxui::Node::Render(this, a2);
}
| Render:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV R15D,dword ptr [RDI + 0x54]
CMP R15D,dword ptr [RDI + 0x58]
JG 0x00138124
LAB_001380ee:
MOV R12D,dword ptr [R14 + 0x4c]
CMP R12D,dword ptr [R14 + 0x50]
JG 0x00138117
LAB_001380f8:
MOV RDI,RBX
MOV ESI,R12D
MOV EDX,R15D
CALL 0x0013a522
OR byte ptr [RAX],0x2
LEA EAX,[R12 + 0x1]
CMP R12D,dword ptr [R14 + 0x50]
MOV R12D,EAX
JL 0x001380f8
LAB_00138117:
LEA EAX,[R15 + 0x1]
CMP R15D,dword ptr [R14 + 0x58]
MOV R15D,EAX
JL 0x001380ee
LAB_00138124:
MOV RDI,R14
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x0012419e
|
/* ftxui::(anonymous namespace)::Bold::Render(ftxui::Screen&) */
void __thiscall ftxui::(anonymous_namespace)::Bold::Render(Bold *this,Screen *param_1)
{
bool bVar1;
byte *pbVar2;
int iVar3;
int iVar4;
iVar4 = *(int *)(this + 0x54);
if (*(int *)(this + 0x54) <= *(int *)(this + 0x58)) {
do {
iVar3 = *(int *)(this + 0x4c);
if (*(int *)(this + 0x4c) <= *(int *)(this + 0x50)) {
do {
pbVar2 = (byte *)Screen::PixelAt(param_1,iVar3,iVar4);
*pbVar2 = *pbVar2 | 2;
bVar1 = iVar3 < *(int *)(this + 0x50);
iVar3 = iVar3 + 1;
} while (bVar1);
}
bVar1 = iVar4 < *(int *)(this + 0x58);
iVar4 = iVar4 + 1;
} while (bVar1);
}
Node::Render((Node *)this,param_1);
return;
}
|
|
1,052 | ma_get_last_key | eloqsql/storage/maria/ma_search.c | uchar *_ma_get_last_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *endpos)
{
uint page_flag,nod_flag;
uchar *lastpos, *page;
MARIA_KEYDEF *keyinfo= key->keyinfo;
DBUG_ENTER("_ma_get_last_key");
DBUG_PRINT("enter",("page: %p endpos: %p", ma_page->buff,
endpos));
page_flag= ma_page->flag;
nod_flag= ma_page->node;
page= ma_page->buff + keyinfo->share->keypage_header + nod_flag;
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) &&
! (page_flag & KEYPAGE_FLAG_HAS_TRANSID))
{
lastpos= endpos-keyinfo->keylength-nod_flag;
key->ref_length= keyinfo->share->rec_reflength;
key->data_length= keyinfo->keylength - key->ref_length;
key->flag= 0;
if (lastpos >= page)
bmove(key->data, lastpos, keyinfo->keylength + nod_flag);
}
else
{
lastpos= page;
key->data[0]=0; /* safety */
while (page < endpos)
{
lastpos= page;
if (!(*keyinfo->get_key)(key, page_flag, nod_flag, &page))
{
DBUG_PRINT("error",("Couldn't find last key: page: %p",
page));
_ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED);
DBUG_RETURN(0);
}
}
}
DBUG_PRINT("exit",("lastpos: %p length: %u", lastpos,
key->data_length + key->ref_length));
DBUG_RETURN(lastpos);
} | O3 | c | ma_get_last_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rbx
movl 0x28(%rsi), %r8d
movl 0x2c(%rsi), %edi
movq (%rbx), %rcx
movl 0x744(%rcx), %eax
addq 0x10(%rsi), %rax
addq %r8, %rax
movq %rax, -0x38(%rbp)
testb $0x28, 0xa2(%rbx)
sete %dl
movl %edi, -0x2c(%rbp)
testb $0x2, %dil
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x3c1bf
movzwl 0xaa(%rbx), %edx
subq %rdx, %r15
movq %r15, %r12
subq %r8, %r12
movl 0x740(%rcx), %ecx
movl %ecx, 0x14(%r14)
movzwl 0xaa(%rbx), %edx
subl %ecx, %edx
movl %edx, 0x10(%r14)
movl $0x0, 0x18(%r14)
cmpq %rax, %r12
jb 0x3c20a
movq (%r14), %rdi
movzwl 0xaa(%rbx), %edx
addl %r8d, %edx
movq %r12, %rsi
callq 0x2a130
jmp 0x3c20a
movq (%r14), %rcx
movb $0x0, (%rcx)
cmpq %r15, %rax
jae 0x3c1f5
movq %rax, %r12
movq %r14, %rdi
movl -0x2c(%rbp), %esi
movq %r8, %r13
movl %r8d, %edx
leaq -0x38(%rbp), %rcx
callq *0xe0(%rbx)
testl %eax, %eax
je 0x3c1fa
movq -0x38(%rbp), %rax
cmpq %r15, %rax
movq %r13, %r8
jb 0x3c1ca
jmp 0x3c20a
movq %rax, %r12
jmp 0x3c20a
movq (%rbx), %rdi
movl $0x7e, %esi
callq 0x39d32
xorl %r12d, %r12d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_get_last_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov r14, rdi
mov rbx, [rdi+8]
mov r8d, [rsi+28h]
mov edi, [rsi+2Ch]
mov rcx, [rbx]
mov eax, [rcx+744h]
add rax, [rsi+10h]
add rax, r8
mov [rbp+var_38], rax
test byte ptr [rbx+0A2h], 28h
setz dl
mov [rbp+var_2C], edi
test dil, 2
setz sil
and sil, dl
cmp sil, 1
jnz short loc_3C1BF
movzx edx, word ptr [rbx+0AAh]
sub r15, rdx
mov r12, r15
sub r12, r8
mov ecx, [rcx+740h]
mov [r14+14h], ecx
movzx edx, word ptr [rbx+0AAh]
sub edx, ecx
mov [r14+10h], edx
mov dword ptr [r14+18h], 0
cmp r12, rax
jb short loc_3C20A
mov rdi, [r14]
movzx edx, word ptr [rbx+0AAh]
add edx, r8d
mov rsi, r12
call _memmove
jmp short loc_3C20A
loc_3C1BF:
mov rcx, [r14]
mov byte ptr [rcx], 0
cmp rax, r15
jnb short loc_3C1F5
loc_3C1CA:
mov r12, rax
mov rdi, r14
mov esi, [rbp+var_2C]
mov r13, r8
mov edx, r8d
lea rcx, [rbp+var_38]
call qword ptr [rbx+0E0h]
test eax, eax
jz short loc_3C1FA
mov rax, [rbp+var_38]
cmp rax, r15
mov r8, r13
jb short loc_3C1CA
jmp short loc_3C20A
loc_3C1F5:
mov r12, rax
jmp short loc_3C20A
loc_3C1FA:
mov rdi, [rbx]
mov esi, 7Eh ; '~'
call _ma_set_fatal_error_with_share
xor r12d, r12d
loc_3C20A:
mov rax, r12
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long ma_get_last_key(long long a1, long long a2, unsigned long long a3)
{
long long *v5; // rbx
long long v6; // r8
unsigned int v7; // edi
long long v8; // rcx
unsigned long long v9; // rax
bool v10; // dl
unsigned long long v11; // r15
unsigned long long v12; // r12
int v13; // ecx
long long v14; // r13
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
int v18; // r9d
unsigned long long v20; // [rsp+8h] [rbp-38h] BYREF
unsigned int v21; // [rsp+14h] [rbp-2Ch]
v5 = *(long long **)(a1 + 8);
v6 = *(unsigned int *)(a2 + 40);
v7 = *(_DWORD *)(a2 + 44);
v8 = *v5;
v9 = v6 + *(_QWORD *)(a2 + 16) + *(unsigned int *)(*v5 + 1860);
v20 = v9;
v10 = (*((_BYTE *)v5 + 162) & 0x28) == 0;
v21 = v7;
if ( v10 && (v7 & 2) == 0 )
{
v11 = a3 - *((unsigned __int16 *)v5 + 85);
v12 = v11 - v6;
v13 = *(_DWORD *)(v8 + 1856);
*(_DWORD *)(a1 + 20) = v13;
*(_DWORD *)(a1 + 16) = *((unsigned __int16 *)v5 + 85) - v13;
*(_DWORD *)(a1 + 24) = 0;
if ( v11 - v6 >= v9 )
memmove(*(_QWORD *)a1, v11 - v6, (unsigned int)v6 + *((unsigned __int16 *)v5 + 85));
}
else
{
**(_BYTE **)a1 = 0;
if ( v9 >= a3 )
{
return v9;
}
else
{
while ( 1 )
{
v12 = v9;
v14 = v6;
if ( !((unsigned int ( *)(long long, _QWORD, _QWORD, unsigned long long *))v5[28])(
a1,
v21,
(unsigned int)v6,
&v20) )
break;
v9 = v20;
v6 = v14;
if ( v20 >= a3 )
return v12;
}
ma_set_fatal_error_with_share(*v5, 126, v15, v16, v17, v18);
return 0LL;
}
}
return v12;
}
| _ma_get_last_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV R14,RDI
MOV RBX,qword ptr [RDI + 0x8]
MOV R8D,dword ptr [RSI + 0x28]
MOV EDI,dword ptr [RSI + 0x2c]
MOV RCX,qword ptr [RBX]
MOV EAX,dword ptr [RCX + 0x744]
ADD RAX,qword ptr [RSI + 0x10]
ADD RAX,R8
MOV qword ptr [RBP + -0x38],RAX
TEST byte ptr [RBX + 0xa2],0x28
SETZ DL
MOV dword ptr [RBP + -0x2c],EDI
TEST DIL,0x2
SETZ SIL
AND SIL,DL
CMP SIL,0x1
JNZ 0x0013c1bf
MOVZX EDX,word ptr [RBX + 0xaa]
SUB R15,RDX
MOV R12,R15
SUB R12,R8
MOV ECX,dword ptr [RCX + 0x740]
MOV dword ptr [R14 + 0x14],ECX
MOVZX EDX,word ptr [RBX + 0xaa]
SUB EDX,ECX
MOV dword ptr [R14 + 0x10],EDX
MOV dword ptr [R14 + 0x18],0x0
CMP R12,RAX
JC 0x0013c20a
MOV RDI,qword ptr [R14]
MOVZX EDX,word ptr [RBX + 0xaa]
ADD EDX,R8D
MOV RSI,R12
CALL 0x0012a130
JMP 0x0013c20a
LAB_0013c1bf:
MOV RCX,qword ptr [R14]
MOV byte ptr [RCX],0x0
CMP RAX,R15
JNC 0x0013c1f5
LAB_0013c1ca:
MOV R12,RAX
MOV RDI,R14
MOV ESI,dword ptr [RBP + -0x2c]
MOV R13,R8
MOV EDX,R8D
LEA RCX,[RBP + -0x38]
CALL qword ptr [RBX + 0xe0]
TEST EAX,EAX
JZ 0x0013c1fa
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,R15
MOV R8,R13
JC 0x0013c1ca
JMP 0x0013c20a
LAB_0013c1f5:
MOV R12,RAX
JMP 0x0013c20a
LAB_0013c1fa:
MOV RDI,qword ptr [RBX]
MOV ESI,0x7e
CALL 0x00139d32
XOR R12D,R12D
LAB_0013c20a:
MOV RAX,R12
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void * _ma_get_last_key(int8 *param_1,long param_2,void *param_3)
{
uint uVar1;
long *plVar2;
void *pvVar3;
void *pvVar4;
int iVar5;
ulong uVar6;
void *local_40;
uint local_34;
plVar2 = (long *)param_1[1];
uVar1 = *(uint *)(param_2 + 0x28);
uVar6 = (ulong)uVar1;
local_34 = *(uint *)(param_2 + 0x2c);
local_40 = (void *)((ulong)*(uint *)(*plVar2 + 0x744) + *(long *)(param_2 + 0x10) + uVar6);
if ((local_34 & 2) == 0 && (*(byte *)((long)plVar2 + 0xa2) & 0x28) == 0) {
param_3 = (void *)((long)param_3 + (-uVar6 - (ulong)*(ushort *)((long)plVar2 + 0xaa)));
iVar5 = *(int *)(*plVar2 + 0x740);
*(int *)((long)param_1 + 0x14) = iVar5;
*(uint *)(param_1 + 2) = (uint)*(ushort *)((long)plVar2 + 0xaa) - iVar5;
*(int4 *)(param_1 + 3) = 0;
if (local_40 <= param_3) {
memmove((void *)*param_1,param_3,(ulong)(*(ushort *)((long)plVar2 + 0xaa) + uVar1));
}
}
else {
*(int1 *)*param_1 = 0;
pvVar4 = local_40;
do {
pvVar3 = local_40;
if (param_3 <= pvVar3) {
return pvVar4;
}
local_40 = pvVar3;
iVar5 = (*(code *)plVar2[0x1c])(param_1,local_34,uVar6,&local_40);
pvVar4 = pvVar3;
} while (iVar5 != 0);
_ma_set_fatal_error_with_share(*plVar2,0x7e);
param_3 = (void *)0x0;
}
return param_3;
}
|
|
1,053 | Modbus::availableSerialPorts[abi:cxx11]() | serhmarch[P]ModbusBridge/modbus/src/unix/Modbus_unix.cpp | List<String> availableSerialPorts()
{
std::set<String> portSet;
DIR* dir = opendir("/dev");
if (!dir)
return List<String>();
struct dirent* entry;
while ((entry = readdir(dir)))
{
if (MB_DEV_ENTRY_IS_EQ("ttyS" ) || // Standard UART 8250 and etc.
MB_DEV_ENTRY_IS_EQ("ttyO" ) || // OMAP UART 8250 and etc.
MB_DEV_ENTRY_IS_EQ("ttyUSB") || // Usb/serial converters PL2303 and etc.
MB_DEV_ENTRY_IS_EQ("ttyACM") || // CDC_ACM converters (i.e. Mobile Phones).
MB_DEV_ENTRY_IS_EQ("ttyGS" ) || // Gadget serial device (i.e. Mobile Phones with gadget serial driver).
MB_DEV_ENTRY_IS_EQ("ttyMI" ) || // MOXA pci/serial converters.
MB_DEV_ENTRY_IS_EQ("ttymxc") || // Motorola IMX serial ports (i.e. Freescale i.MX).
MB_DEV_ENTRY_IS_EQ("ttyAMA") || // AMBA serial device for embedded platform on ARM (i.e. Raspberry Pi).
MB_DEV_ENTRY_IS_EQ("ttyTHS") || // Serial device for embedded platform on ARM (i.e. Tegra Jetson TK1).
MB_DEV_ENTRY_IS_EQ("rfcomm") || // Bluetooth serial device.
MB_DEV_ENTRY_IS_EQ("ircomm") || // IrDA serial device.
MB_DEV_ENTRY_IS_EQ("tnt" ) ) // Virtual tty0tty serial device.
portSet.insert("/dev/" + String(entry->d_name));
}
closedir(dir);
List<String> ports(portSet.begin(), portSet.end());
return ports;
} | O0 | cpp | Modbus::availableSerialPorts[abi:cxx11]():
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp # imm = 0x120
movq %rdi, -0xe8(%rbp)
movq %rdi, %rax
movq %rax, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x1f570
leaq 0x9964(%rip), %rdi # 0x28714
callq 0x6600
movq %rax, -0xd8(%rbp)
jmp 0x1edbe
movq -0xd8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x1ee0c
movq -0xe8(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x6230
movq -0xe8(%rbp), %rdi
callq 0x1f590
movl $0x1, -0x50(%rbp)
jmp 0x1f17f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1f198
jmp 0x1ee0e
movq -0x40(%rbp), %rdi
callq 0x6620
movq %rax, -0xf0(%rbp)
jmp 0x1ee20
movq -0xf0(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x1f0c0
movq -0x58(%rbp), %rdi
addq $0x13, %rdi
leaq 0x98d5(%rip), %rsi # 0x28719
movl $0x4, %edx
callq 0x6200
cmpl $0x0, %eax
je 0x1efbd
movq -0x58(%rbp), %rdi
addq $0x13, %rdi
leaq 0x98b8(%rip), %rsi # 0x2871e
movl $0x4, %edx
callq 0x6200
cmpl $0x0, %eax
je 0x1efbd
movq -0x58(%rbp), %rdi
addq $0x13, %rdi
leaq 0x989b(%rip), %rsi # 0x28723
movl $0x6, %edx
callq 0x6200
cmpl $0x0, %eax
je 0x1efbd
movq -0x58(%rbp), %rdi
addq $0x13, %rdi
leaq 0x9880(%rip), %rsi # 0x2872a
movl $0x6, %edx
callq 0x6200
cmpl $0x0, %eax
je 0x1efbd
movq -0x58(%rbp), %rdi
addq $0x13, %rdi
leaq 0x9865(%rip), %rsi # 0x28731
movl $0x5, %edx
callq 0x6200
cmpl $0x0, %eax
je 0x1efbd
movq -0x58(%rbp), %rdi
addq $0x13, %rdi
leaq 0x9849(%rip), %rsi # 0x28737
movl $0x5, %edx
callq 0x6200
cmpl $0x0, %eax
je 0x1efbd
movq -0x58(%rbp), %rdi
addq $0x13, %rdi
leaq 0x982d(%rip), %rsi # 0x2873d
movl $0x6, %edx
callq 0x6200
cmpl $0x0, %eax
je 0x1efbd
movq -0x58(%rbp), %rdi
addq $0x13, %rdi
leaq 0x9812(%rip), %rsi # 0x28744
movl $0x6, %edx
callq 0x6200
cmpl $0x0, %eax
je 0x1efbd
movq -0x58(%rbp), %rdi
addq $0x13, %rdi
leaq 0x97fb(%rip), %rsi # 0x2874b
movl $0x6, %edx
callq 0x6200
cmpl $0x0, %eax
je 0x1efbd
movq -0x58(%rbp), %rdi
addq $0x13, %rdi
leaq 0x97e4(%rip), %rsi # 0x28752
movl $0x6, %edx
callq 0x6200
cmpl $0x0, %eax
je 0x1efbd
movq -0x58(%rbp), %rdi
addq $0x13, %rdi
leaq 0x97cd(%rip), %rsi # 0x28759
movl $0x6, %edx
callq 0x6200
cmpl $0x0, %eax
je 0x1efbd
movq -0x58(%rbp), %rdi
addq $0x13, %rdi
leaq 0x97b6(%rip), %rsi # 0x28760
movl $0x3, %edx
callq 0x6200
cmpl $0x0, %eax
jne 0x1f0bb
movq -0x58(%rbp), %rax
addq $0x13, %rax
movq %rax, -0x100(%rbp)
leaq -0x99(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x6720
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
leaq -0x98(%rbp), %rdi
callq 0x11440
jmp 0x1effb
leaq 0x9762(%rip), %rsi # 0x28764
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0x1f600
jmp 0x1f014
leaq -0x38(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x1f5b0
movb %dl, -0x109(%rbp)
movq %rax, -0x108(%rbp)
jmp 0x1f030
movb -0x109(%rbp), %al
movq -0x108(%rbp), %rcx
movq %rcx, -0xb0(%rbp)
movb %al, -0xa8(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x62a0
leaq -0x98(%rbp), %rdi
callq 0x62a0
leaq -0x99(%rbp), %rdi
callq 0x6460
jmp 0x1f0bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1f0aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1f09e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x62a0
leaq -0x98(%rbp), %rdi
callq 0x62a0
leaq -0x99(%rbp), %rdi
callq 0x6460
jmp 0x1f198
jmp 0x1ee0e
movq -0x40(%rbp), %rdi
callq 0x6690
jmp 0x1f0cb
movb $0x0, -0xb1(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x1f650
movq -0x120(%rbp), %rdi
movq %rax, -0xc0(%rbp)
callq 0x1f680
movq %rax, -0xc8(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x1f6b0
movq -0xe8(%rbp), %rdi
movq -0x118(%rbp), %rcx
movq -0xc0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
callq 0x1f6d0
jmp 0x1f132
leaq -0xc9(%rbp), %rdi
callq 0x1f780
movb $0x1, -0xb1(%rbp)
movl $0x1, -0x50(%rbp)
testb $0x1, -0xb1(%rbp)
jne 0x1f17d
jmp 0x1f171
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xc9(%rbp), %rdi
callq 0x1f780
jmp 0x1f198
movq -0xe8(%rbp), %rdi
callq 0x96c0
jmp 0x1f17f
leaq -0x38(%rbp), %rdi
callq 0x1f7a0
movq -0xe0(%rbp), %rax
addq $0x120, %rsp # imm = 0x120
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x1f7a0
movq -0x48(%rbp), %rdi
callq 0x6710
nopw (%rax,%rax)
| _ZN6Modbus20availableSerialPortsB5cxx11Ev:
push rbp
mov rbp, rsp
sub rsp, 120h
mov [rbp+var_E8], rdi
mov rax, rdi
mov [rbp+var_E0], rax
mov [rbp+var_8], rdi
lea rdi, [rbp+var_38]
call _ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EEC2Ev; std::set<std::string>::set(void)
lea rdi, aDev; "/dev"
call _opendir
mov [rbp+var_D8], rax
jmp short $+2
loc_1EDBE:
mov rax, [rbp+var_D8]
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jnz short loc_1EE0C
mov rdi, [rbp+var_E8]
xor esi, esi
mov edx, 18h
call _memset
mov rdi, [rbp+var_E8]
call _ZNSt7__cxx114listINS_12basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::list<std::string>::list(void)
mov [rbp+var_50], 1
jmp loc_1F17F
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp loc_1F198
loc_1EE0C:
jmp short $+2
loc_1EE0E:
mov rdi, [rbp+var_40]
call _readdir
mov [rbp+var_F0], rax
jmp short $+2
loc_1EE20:
mov rax, [rbp+var_F0]
mov [rbp+var_58], rax
cmp rax, 0
jz loc_1F0C0
mov rdi, [rbp+var_58]
add rdi, 13h
lea rsi, aTtys; "ttyS"
mov edx, 4
call _strncmp
cmp eax, 0
jz loc_1EFBD
mov rdi, [rbp+var_58]
add rdi, 13h
lea rsi, aTtyo; "ttyO"
mov edx, 4
call _strncmp
cmp eax, 0
jz loc_1EFBD
mov rdi, [rbp+var_58]
add rdi, 13h
lea rsi, aTtyusb; "ttyUSB"
mov edx, 6
call _strncmp
cmp eax, 0
jz loc_1EFBD
mov rdi, [rbp+var_58]
add rdi, 13h
lea rsi, aTtyacm; "ttyACM"
mov edx, 6
call _strncmp
cmp eax, 0
jz loc_1EFBD
mov rdi, [rbp+var_58]
add rdi, 13h
lea rsi, aTtygs; "ttyGS"
mov edx, 5
call _strncmp
cmp eax, 0
jz loc_1EFBD
mov rdi, [rbp+var_58]
add rdi, 13h
lea rsi, aTtymi; "ttyMI"
mov edx, 5
call _strncmp
cmp eax, 0
jz loc_1EFBD
mov rdi, [rbp+var_58]
add rdi, 13h
lea rsi, aTtymxc; "ttymxc"
mov edx, 6
call _strncmp
cmp eax, 0
jz loc_1EFBD
mov rdi, [rbp+var_58]
add rdi, 13h
lea rsi, aTtyama; "ttyAMA"
mov edx, 6
call _strncmp
cmp eax, 0
jz short loc_1EFBD
mov rdi, [rbp+var_58]
add rdi, 13h
lea rsi, aTtyths; "ttyTHS"
mov edx, 6
call _strncmp
cmp eax, 0
jz short loc_1EFBD
mov rdi, [rbp+var_58]
add rdi, 13h
lea rsi, aRfcomm; "rfcomm"
mov edx, 6
call _strncmp
cmp eax, 0
jz short loc_1EFBD
mov rdi, [rbp+var_58]
add rdi, 13h
lea rsi, aIrcomm; "ircomm"
mov edx, 6
call _strncmp
cmp eax, 0
jz short loc_1EFBD
mov rdi, [rbp+var_58]
add rdi, 13h
lea rsi, aTnt; "tnt"
mov edx, 3
call _strncmp
cmp eax, 0
jnz loc_1F0BB
loc_1EFBD:
mov rax, [rbp+var_58]
add rax, 13h
mov [rbp+var_100], rax
lea rdi, [rbp+var_99]
mov [rbp+var_F8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_100]
mov rdx, [rbp+var_F8]
lea rdi, [rbp+var_98]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_1EFFB:
lea rsi, aDev_0; "/dev/"
lea rdi, [rbp+var_78]
lea rdx, [rbp+var_98]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
jmp short $+2
loc_1F014:
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_78]
call _ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE6insertEOS5_; std::set<std::string>::insert(std::string&&)
mov [rbp+var_109], dl
mov [rbp+var_108], rax
jmp short $+2
loc_1F030:
mov al, [rbp+var_109]
mov rcx, [rbp+var_108]
mov [rbp+var_B0], rcx
mov [rbp+var_A8], al
lea rdi, [rbp+var_78]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_99]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_1F0BB
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp short loc_1F0AA
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp short loc_1F09E
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_78]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1F09E:
lea rdi, [rbp+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1F0AA:
lea rdi, [rbp+var_99]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_1F198
loc_1F0BB:
jmp loc_1EE0E
loc_1F0C0:
mov rdi, [rbp+var_40]
call _closedir
jmp short $+2
loc_1F0CB:
mov [rbp+var_B1], 0
lea rdi, [rbp+var_38]
mov [rbp+var_120], rdi
call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE5beginEv; std::set<std::string>::begin(void)
mov rdi, [rbp+var_120]
mov [rbp+var_C0], rax
call _ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE3endEv; std::set<std::string>::end(void)
mov [rbp+var_C8], rax
lea rdi, [rbp+var_C9]
mov [rbp+var_118], rdi
call _ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev; std::allocator<std::string>::allocator(void)
mov rdi, [rbp+var_E8]
mov rcx, [rbp+var_118]
mov rsi, [rbp+var_C0]
mov rdx, [rbp+var_C8]
call _ZNSt7__cxx114listINS_12basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ISt23_Rb_tree_const_iteratorIS5_EvEET_SB_RKS6_; std::list<std::string>::list<std::_Rb_tree_const_iterator<std::string>,void>(std::_Rb_tree_const_iterator<std::string>,std::_Rb_tree_const_iterator<std::string>,std::allocator<std::string> const&)
jmp short $+2
loc_1F132:
lea rdi, [rbp+var_C9]
call _ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; std::allocator<std::string>::~allocator()
mov [rbp+var_B1], 1
mov [rbp+var_50], 1
test [rbp+var_B1], 1
jnz short loc_1F17D
jmp short loc_1F171
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_C9]
call _ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; std::allocator<std::string>::~allocator()
jmp short loc_1F198
loc_1F171:
mov rdi, [rbp+var_E8]
call _ZNSt7__cxx114listINS_12basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::list<std::string>::~list()
loc_1F17D:
jmp short $+2
loc_1F17F:
lea rdi, [rbp+var_38]
call _ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EED2Ev; std::set<std::string>::~set()
mov rax, [rbp+var_E0]
add rsp, 120h
pop rbp
retn
loc_1F198:
lea rdi, [rbp+var_38]
call _ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EED2Ev; std::set<std::string>::~set()
mov rdi, [rbp+var_48]
call __Unwind_Resume
| long long Modbus::availableSerialPorts[abi:cxx11](long long a1)
{
const char *v1; // rsi
long long v2; // rdx
char v3; // dl
long long v5; // [rsp+20h] [rbp-100h]
char v6; // [rsp+57h] [rbp-C9h] BYREF
long long v7; // [rsp+58h] [rbp-C8h]
long long v8; // [rsp+60h] [rbp-C0h]
char v9; // [rsp+6Fh] [rbp-B1h]
long long v10; // [rsp+70h] [rbp-B0h]
char v11; // [rsp+78h] [rbp-A8h]
char v12; // [rsp+87h] [rbp-99h] BYREF
_BYTE v13[32]; // [rsp+88h] [rbp-98h] BYREF
_BYTE v14[32]; // [rsp+A8h] [rbp-78h] BYREF
long long v15; // [rsp+C8h] [rbp-58h]
int v16; // [rsp+D0h] [rbp-50h]
long long v17; // [rsp+E0h] [rbp-40h]
_BYTE v18[48]; // [rsp+E8h] [rbp-38h] BYREF
long long v19; // [rsp+118h] [rbp-8h]
v19 = a1;
std::set<std::string>::set(v18);
v17 = opendir("/dev");
if ( v17 )
{
while ( 1 )
{
v15 = readdir(v17);
if ( !v15 )
break;
v1 = "ttyS";
if ( (unsigned int)strncmp(v15 + 19, "ttyS", 4LL) )
{
v1 = "ttyO";
if ( (unsigned int)strncmp(v15 + 19, "ttyO", 4LL) )
{
v1 = "ttyUSB";
if ( (unsigned int)strncmp(v15 + 19, "ttyUSB", 6LL) )
{
v1 = "ttyACM";
if ( (unsigned int)strncmp(v15 + 19, "ttyACM", 6LL) )
{
v1 = "ttyGS";
if ( (unsigned int)strncmp(v15 + 19, "ttyGS", 5LL) )
{
v1 = "ttyMI";
if ( (unsigned int)strncmp(v15 + 19, "ttyMI", 5LL) )
{
v1 = "ttymxc";
if ( (unsigned int)strncmp(v15 + 19, "ttymxc", 6LL) )
{
v1 = "ttyAMA";
if ( (unsigned int)strncmp(v15 + 19, "ttyAMA", 6LL) )
{
v1 = "ttyTHS";
if ( (unsigned int)strncmp(v15 + 19, "ttyTHS", 6LL) )
{
v1 = "rfcomm";
if ( (unsigned int)strncmp(v15 + 19, "rfcomm", 6LL) )
{
v1 = "ircomm";
if ( (unsigned int)strncmp(v15 + 19, "ircomm", 6LL) )
{
v1 = "tnt";
if ( (unsigned int)strncmp(v15 + 19, "tnt", 3LL) )
continue;
}
}
}
}
}
}
}
}
}
}
}
v5 = v15 + 19;
std::allocator<char>::allocator(&v12, v1, v2);
std::string::basic_string<std::allocator<char>>((long long)v13, v5, (long long)&v12);
std::operator+<char>(v14, "/dev/", v13);
v10 = std::set<std::string>::insert(v18, v14);
v11 = v3;
std::string::~string(v14);
std::string::~string(v13);
std::allocator<char>::~allocator(&v12);
}
closedir(v17);
v9 = 0;
v8 = std::set<std::string>::begin();
v7 = std::set<std::string>::end(v18);
std::allocator<std::string>::allocator();
std::list<std::string>::list<std::_Rb_tree_const_iterator<std::string>,void>(a1, v8, v7, &v6);
std::allocator<std::string>::~allocator(&v6);
v9 = 1;
v16 = 1;
}
else
{
memset(a1, 0LL, 24LL);
std::list<std::string>::list(a1);
v16 = 1;
}
std::set<std::string>::~set(v18);
return a1;
}
| availableSerialPorts[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x120
MOV qword ptr [RBP + -0xe8],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xe0],RAX
MOV qword ptr [RBP + -0x8],RDI
LEA RDI,[RBP + -0x38]
CALL 0x0011f570
LAB_0011eda9:
LEA RDI,[0x128714]
CALL 0x00106600
LAB_0011edb5:
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x0011edbe
LAB_0011edbe:
MOV RAX,qword ptr [RBP + -0xd8]
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x0011ee0c
MOV RDI,qword ptr [RBP + -0xe8]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00106230
MOV RDI,qword ptr [RBP + -0xe8]
CALL 0x0011f590
MOV dword ptr [RBP + -0x50],0x1
JMP 0x0011f17f
LAB_0011ee0c:
JMP 0x0011ee0e
LAB_0011ee0e:
MOV RDI,qword ptr [RBP + -0x40]
LAB_0011ee12:
CALL 0x00106620
MOV qword ptr [RBP + -0xf0],RAX
JMP 0x0011ee20
LAB_0011ee20:
MOV RAX,qword ptr [RBP + -0xf0]
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,0x0
JZ 0x0011f0c0
MOV RDI,qword ptr [RBP + -0x58]
ADD RDI,0x13
LEA RSI,[0x128719]
MOV EDX,0x4
CALL 0x00106200
CMP EAX,0x0
JZ 0x0011efbd
MOV RDI,qword ptr [RBP + -0x58]
ADD RDI,0x13
LEA RSI,[0x12871e]
MOV EDX,0x4
CALL 0x00106200
CMP EAX,0x0
JZ 0x0011efbd
MOV RDI,qword ptr [RBP + -0x58]
ADD RDI,0x13
LEA RSI,[0x128723]
MOV EDX,0x6
CALL 0x00106200
CMP EAX,0x0
JZ 0x0011efbd
MOV RDI,qword ptr [RBP + -0x58]
ADD RDI,0x13
LEA RSI,[0x12872a]
MOV EDX,0x6
CALL 0x00106200
CMP EAX,0x0
JZ 0x0011efbd
MOV RDI,qword ptr [RBP + -0x58]
ADD RDI,0x13
LEA RSI,[0x128731]
MOV EDX,0x5
CALL 0x00106200
CMP EAX,0x0
JZ 0x0011efbd
MOV RDI,qword ptr [RBP + -0x58]
ADD RDI,0x13
LEA RSI,[0x128737]
MOV EDX,0x5
CALL 0x00106200
CMP EAX,0x0
JZ 0x0011efbd
MOV RDI,qword ptr [RBP + -0x58]
ADD RDI,0x13
LEA RSI,[0x12873d]
MOV EDX,0x6
CALL 0x00106200
CMP EAX,0x0
JZ 0x0011efbd
MOV RDI,qword ptr [RBP + -0x58]
ADD RDI,0x13
LEA RSI,[0x128744]
MOV EDX,0x6
CALL 0x00106200
CMP EAX,0x0
JZ 0x0011efbd
MOV RDI,qword ptr [RBP + -0x58]
ADD RDI,0x13
LEA RSI,[0x12874b]
MOV EDX,0x6
CALL 0x00106200
CMP EAX,0x0
JZ 0x0011efbd
MOV RDI,qword ptr [RBP + -0x58]
ADD RDI,0x13
LEA RSI,[0x128752]
MOV EDX,0x6
CALL 0x00106200
CMP EAX,0x0
JZ 0x0011efbd
MOV RDI,qword ptr [RBP + -0x58]
ADD RDI,0x13
LEA RSI,[0x128759]
MOV EDX,0x6
CALL 0x00106200
CMP EAX,0x0
JZ 0x0011efbd
MOV RDI,qword ptr [RBP + -0x58]
ADD RDI,0x13
LEA RSI,[0x128760]
MOV EDX,0x3
CALL 0x00106200
CMP EAX,0x0
JNZ 0x0011f0bb
LAB_0011efbd:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x13
MOV qword ptr [RBP + -0x100],RAX
LEA RDI,[RBP + -0x99]
MOV qword ptr [RBP + -0xf8],RDI
CALL 0x00106720
MOV RSI,qword ptr [RBP + -0x100]
MOV RDX,qword ptr [RBP + -0xf8]
LAB_0011efed:
LEA RDI,[RBP + -0x98]
CALL 0x00111440
JMP 0x0011effb
LAB_0011effb:
LEA RSI,[0x128764]
LEA RDI,[RBP + -0x78]
LEA RDX,[RBP + -0x98]
CALL 0x0011f600
JMP 0x0011f014
LAB_0011f014:
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x78]
CALL 0x0011f5b0
MOV byte ptr [RBP + -0x109],DL
MOV qword ptr [RBP + -0x108],RAX
JMP 0x0011f030
LAB_0011f030:
MOV AL,byte ptr [RBP + -0x109]
MOV RCX,qword ptr [RBP + -0x108]
MOV qword ptr [RBP + -0xb0],RCX
MOV byte ptr [RBP + -0xa8],AL
LEA RDI,[RBP + -0x78]
CALL 0x001062a0
LEA RDI,[RBP + -0x98]
CALL 0x001062a0
LEA RDI,[RBP + -0x99]
CALL 0x00106460
JMP 0x0011f0bb
LAB_0011f0bb:
JMP 0x0011ee0e
LAB_0011f0c0:
MOV RDI,qword ptr [RBP + -0x40]
LAB_0011f0c4:
CALL 0x00106690
JMP 0x0011f0cb
LAB_0011f0cb:
MOV byte ptr [RBP + -0xb1],0x0
LEA RDI,[RBP + -0x38]
MOV qword ptr [RBP + -0x120],RDI
CALL 0x0011f650
MOV RDI,qword ptr [RBP + -0x120]
MOV qword ptr [RBP + -0xc0],RAX
CALL 0x0011f680
MOV qword ptr [RBP + -0xc8],RAX
LEA RDI,[RBP + -0xc9]
MOV qword ptr [RBP + -0x118],RDI
CALL 0x0011f6b0
MOV RDI,qword ptr [RBP + -0xe8]
MOV RCX,qword ptr [RBP + -0x118]
MOV RSI,qword ptr [RBP + -0xc0]
MOV RDX,qword ptr [RBP + -0xc8]
LAB_0011f12b:
CALL 0x0011f6d0
LAB_0011f130:
JMP 0x0011f132
LAB_0011f132:
LEA RDI,[RBP + -0xc9]
CALL 0x0011f780
MOV byte ptr [RBP + -0xb1],0x1
MOV dword ptr [RBP + -0x50],0x1
TEST byte ptr [RBP + -0xb1],0x1
JNZ 0x0011f17d
JMP 0x0011f171
LAB_0011f171:
MOV RDI,qword ptr [RBP + -0xe8]
CALL 0x001096c0
LAB_0011f17d:
JMP 0x0011f17f
LAB_0011f17f:
LEA RDI,[RBP + -0x38]
CALL 0x0011f7a0
MOV RAX,qword ptr [RBP + -0xe0]
ADD RSP,0x120
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0011f155) */
/* Modbus::availableSerialPorts[abi:cxx11]() */
Modbus * __thiscall Modbus::availableSerialPorts_abi_cxx11_(Modbus *this)
{
int iVar1;
char *pcVar2;
int1 extraout_DL;
allocator<std::__cxx11::string> local_d1;
int8 local_d0;
int8 local_c8;
int1 local_b9;
int8 local_b8;
int1 local_b0;
allocator local_a1;
string local_a0 [32];
string local_80 [32];
dirent *local_60;
int4 local_58;
DIR *local_48;
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
local_40 [48];
Modbus *local_10;
local_10 = this;
std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>::
set(local_40);
/* try { // try from 0011eda9 to 0011edb4 has its CatchHandler @ 0011edfb */
local_48 = opendir("/dev");
if (local_48 == (DIR *)0x0) {
memset(this,0,0x18);
std::__cxx11::list<std::__cxx11::string,std::allocator<std::__cxx11::string>>::list
((list<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this);
}
else {
/* try { // try from 0011ee12 to 0011ee16 has its CatchHandler @ 0011edfb */
while (local_60 = readdir(local_48), local_60 != (dirent *)0x0) {
iVar1 = strncmp(local_60->d_name,"ttyS",4);
if (((((iVar1 == 0) || (iVar1 = strncmp(local_60->d_name,"ttyO",4), iVar1 == 0)) ||
(iVar1 = strncmp(local_60->d_name,"ttyUSB",6), iVar1 == 0)) ||
((((iVar1 = strncmp(local_60->d_name,"ttyACM",6), iVar1 == 0 ||
(iVar1 = strncmp(local_60->d_name,"ttyGS",5), iVar1 == 0)) ||
((iVar1 = strncmp(local_60->d_name,"ttyMI",5), iVar1 == 0 ||
((iVar1 = strncmp(local_60->d_name,"ttymxc",6), iVar1 == 0 ||
(iVar1 = strncmp(local_60->d_name,"ttyAMA",6), iVar1 == 0)))))) ||
(iVar1 = strncmp(local_60->d_name,"ttyTHS",6), iVar1 == 0)))) ||
(((iVar1 = strncmp(local_60->d_name,"rfcomm",6), iVar1 == 0 ||
(iVar1 = strncmp(local_60->d_name,"ircomm",6), iVar1 == 0)) ||
(iVar1 = strncmp(local_60->d_name,"tnt",3), iVar1 == 0)))) {
pcVar2 = local_60->d_name;
std::allocator<char>::allocator();
/* try { // try from 0011efed to 0011eff8 has its CatchHandler @ 0011f06d */
std::__cxx11::string::string<std::allocator<char>>(local_a0,pcVar2,&local_a1);
/* try { // try from 0011effb to 0011f011 has its CatchHandler @ 0011f07b */
std::operator+((char *)local_80,(string *)"/dev/");
/* try { // try from 0011f014 to 0011f020 has its CatchHandler @ 0011f089 */
local_b8 = std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::insert(local_40,local_80);
local_b0 = extraout_DL;
std::__cxx11::string::~string(local_80);
std::__cxx11::string::~string(local_a0);
std::allocator<char>::~allocator((allocator<char> *)&local_a1);
}
}
/* try { // try from 0011f0c4 to 0011f0c8 has its CatchHandler @ 0011edfb */
closedir(local_48);
local_b9 = 0;
local_c8 = std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::begin(local_40);
local_d0 = std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::end(local_40);
std::allocator<std::__cxx11::string>::allocator();
/* try { // try from 0011f12b to 0011f12f has its CatchHandler @ 0011f157 */
std::__cxx11::list<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
list<std::_Rb_tree_const_iterator<std::__cxx11::string>,void>
((list<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this,local_c8,
local_d0,&local_d1);
std::allocator<std::__cxx11::string>::~allocator(&local_d1);
local_b9 = 1;
}
local_58 = 1;
std::
set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>::
~set(local_40);
return this;
}
|
|
1,054 | Modbus::availableSerialPorts[abi:cxx11]() | serhmarch[P]ModbusBridge/modbus/src/unix/Modbus_unix.cpp | List<String> availableSerialPorts()
{
std::set<String> portSet;
DIR* dir = opendir("/dev");
if (!dir)
return List<String>();
struct dirent* entry;
while ((entry = readdir(dir)))
{
if (MB_DEV_ENTRY_IS_EQ("ttyS" ) || // Standard UART 8250 and etc.
MB_DEV_ENTRY_IS_EQ("ttyO" ) || // OMAP UART 8250 and etc.
MB_DEV_ENTRY_IS_EQ("ttyUSB") || // Usb/serial converters PL2303 and etc.
MB_DEV_ENTRY_IS_EQ("ttyACM") || // CDC_ACM converters (i.e. Mobile Phones).
MB_DEV_ENTRY_IS_EQ("ttyGS" ) || // Gadget serial device (i.e. Mobile Phones with gadget serial driver).
MB_DEV_ENTRY_IS_EQ("ttyMI" ) || // MOXA pci/serial converters.
MB_DEV_ENTRY_IS_EQ("ttymxc") || // Motorola IMX serial ports (i.e. Freescale i.MX).
MB_DEV_ENTRY_IS_EQ("ttyAMA") || // AMBA serial device for embedded platform on ARM (i.e. Raspberry Pi).
MB_DEV_ENTRY_IS_EQ("ttyTHS") || // Serial device for embedded platform on ARM (i.e. Tegra Jetson TK1).
MB_DEV_ENTRY_IS_EQ("rfcomm") || // Bluetooth serial device.
MB_DEV_ENTRY_IS_EQ("ircomm") || // IrDA serial device.
MB_DEV_ENTRY_IS_EQ("tnt" ) ) // Virtual tty0tty serial device.
portSet.insert("/dev/" + String(entry->d_name));
}
closedir(dir);
List<String> ports(portSet.begin(), portSet.end());
return ports;
} | O1 | cpp | Modbus::availableSerialPorts[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
leaq 0x50(%rsp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq 0xaa1b(%rip), %rdi # 0x1a712
callq 0x5460
testq %rax, %rax
je 0xff4f
movq %rax, %r15
movq %rbx, 0x20(%rsp)
leaq 0x38(%rsp), %rbp
leaq 0x10(%rsp), %r14
leaq 0x28(%rsp), %r13
movq %rsp, %rbx
movq %r15, %rdi
callq 0x5480
movq %rax, %r12
testq %rax, %rax
je 0xff2b
addq $0x13, %r12
movl $0x4, %edx
movq %r12, %rdi
leaq 0xa9d1(%rip), %rsi # 0x1a717
callq 0x5190
testl %eax, %eax
je 0xfe73
movl $0x4, %edx
movq %r12, %rdi
leaq 0xa9ba(%rip), %rsi # 0x1a71c
callq 0x5190
testl %eax, %eax
je 0xfe73
movl $0x6, %edx
movq %r12, %rdi
leaq 0xa9a3(%rip), %rsi # 0x1a721
callq 0x5190
testl %eax, %eax
je 0xfe73
movl $0x6, %edx
movq %r12, %rdi
leaq 0xa98e(%rip), %rsi # 0x1a728
callq 0x5190
testl %eax, %eax
je 0xfe73
movl $0x5, %edx
movq %r12, %rdi
leaq 0xa979(%rip), %rsi # 0x1a72f
callq 0x5190
testl %eax, %eax
je 0xfe73
movl $0x5, %edx
movq %r12, %rdi
leaq 0xa963(%rip), %rsi # 0x1a735
callq 0x5190
testl %eax, %eax
je 0xfe73
movl $0x6, %edx
movq %r12, %rdi
leaq 0xa94d(%rip), %rsi # 0x1a73b
callq 0x5190
testl %eax, %eax
je 0xfe73
movl $0x6, %edx
movq %r12, %rdi
leaq 0xa93c(%rip), %rsi # 0x1a742
callq 0x5190
testl %eax, %eax
je 0xfe73
movl $0x6, %edx
movq %r12, %rdi
leaq 0xa92b(%rip), %rsi # 0x1a749
callq 0x5190
testl %eax, %eax
je 0xfe73
movl $0x6, %edx
movq %r12, %rdi
leaq 0xa91a(%rip), %rsi # 0x1a750
callq 0x5190
testl %eax, %eax
je 0xfe73
movl $0x6, %edx
movq %r12, %rdi
leaq 0xa909(%rip), %rsi # 0x1a757
callq 0x5190
testl %eax, %eax
je 0xfe73
movl $0x3, %edx
movq %r12, %rdi
leaq 0xa8f8(%rip), %rsi # 0x1a75e
callq 0x5190
testl %eax, %eax
jne 0xfd1f
movq %rbp, 0x28(%rsp)
movq %r12, %rdi
callq 0x5180
leaq (%rax,%r12), %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x91b8
movl $0x5, %r8d
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xa8bf(%rip), %rcx # 0x1a762
callq 0x5360
movq %r14, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xfec9
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xfed0
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x48(%rsp), %rdi
movq %rbx, %rsi
callq 0x1007e
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0xff0b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5310
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0xfd1f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5310
jmp 0xfd1f
movq %r15, %rdi
callq 0x54f0
movq 0x60(%rsp), %rsi
movq %rsp, %rcx
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
leaq 0x50(%rsp), %rdx
callq 0xffd0
jmp 0xff64
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %rbx, 0x8(%rbx)
movq %rbx, (%rbx)
leaq 0x48(%rsp), %rdi
callq 0x10006
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xffbb
jmp 0xffbb
movq %rax, %rbx
jmp 0xffa2
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0xffa2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5310
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0xffbe
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5310
jmp 0xffbe
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x10006
movq %rbx, %rdi
callq 0x5550
| _ZN6Modbus20availableSerialPortsB5cxx11Ev:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov rbx, rdi
lea rcx, [rsp+0A8h+var_58]
mov dword ptr [rcx], 0
xor eax, eax
mov [rcx+8], rax
mov [rcx+10h], rcx
mov [rcx+18h], rcx
mov [rcx+20h], rax
lea rdi, aDev; "/dev"
call _opendir
test rax, rax
jz loc_FF4F
mov r15, rax
mov [rsp+0A8h+var_88], rbx
lea rbp, [rsp+0A8h+var_70]
lea r14, [rsp+0A8h+var_98]
lea r13, [rsp+0A8h+var_80]
mov rbx, rsp
loc_FD1F:
mov rdi, r15
call _readdir
mov r12, rax
test rax, rax
jz loc_FF2B
add r12, 13h
mov edx, 4
mov rdi, r12
lea rsi, aTtys; "ttyS"
call _strncmp
test eax, eax
jz loc_FE73
mov edx, 4
mov rdi, r12
lea rsi, aTtyo; "ttyO"
call _strncmp
test eax, eax
jz loc_FE73
mov edx, 6
mov rdi, r12
lea rsi, aTtyusb; "ttyUSB"
call _strncmp
test eax, eax
jz loc_FE73
mov edx, 6
mov rdi, r12
lea rsi, aTtyacm; "ttyACM"
call _strncmp
test eax, eax
jz loc_FE73
mov edx, 5
mov rdi, r12
lea rsi, aTtygs; "ttyGS"
call _strncmp
test eax, eax
jz loc_FE73
mov edx, 5
mov rdi, r12
lea rsi, aTtymi; "ttyMI"
call _strncmp
test eax, eax
jz loc_FE73
mov edx, 6
mov rdi, r12
lea rsi, aTtymxc; "ttymxc"
call _strncmp
test eax, eax
jz short loc_FE73
mov edx, 6
mov rdi, r12
lea rsi, aTtyama; "ttyAMA"
call _strncmp
test eax, eax
jz short loc_FE73
mov edx, 6
mov rdi, r12
lea rsi, aTtyths; "ttyTHS"
call _strncmp
test eax, eax
jz short loc_FE73
mov edx, 6
mov rdi, r12
lea rsi, aRfcomm; "rfcomm"
call _strncmp
test eax, eax
jz short loc_FE73
mov edx, 6
mov rdi, r12
lea rsi, aIrcomm; "ircomm"
call _strncmp
test eax, eax
jz short loc_FE73
mov edx, 3
mov rdi, r12
lea rsi, aTnt; "tnt"
call _strncmp
test eax, eax
jnz loc_FD1F
loc_FE73:
mov [rsp+0A8h+var_80], rbp
mov rdi, r12
call _strlen
lea rdx, [rax+r12]
mov rdi, r13
mov rsi, r12
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 r8d, 5
mov rdi, r13
xor esi, esi
xor edx, edx
lea rcx, aDev_0; "/dev/"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
mov [rsp+0A8h+var_A8], r14
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_FEC9
mov [rsp+0A8h+var_A8], rdx
mov rdx, [rcx]
mov [rsp+0A8h+var_98], rdx
jmp short loc_FED0
loc_FEC9:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r14], xmm0
loc_FED0:
mov rdx, [rax+8]
mov [rsp+0A8h+var_A0], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+0A8h+var_60]
mov rsi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE16_M_insert_uniqueIS5_EESt4pairISt17_Rb_tree_iteratorIS5_EbEOT_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string>(std::string &&)
mov rdi, [rsp+0A8h+var_A8]; void *
cmp rdi, r14
jz short loc_FF0B
mov rsi, [rsp+0A8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_FF0B:
mov rdi, [rsp+0A8h+var_80]; void *
cmp rdi, rbp
jz loc_FD1F
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_FD1F
loc_FF2B:
mov rdi, r15
call _closedir
mov rsi, [rsp+0A8h+var_48]
mov rcx, rsp
mov rbx, [rsp+0A8h+var_88]
mov rdi, rbx
lea rdx, [rsp+0A8h+var_58]
call _ZNSt7__cxx114listINS_12basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ISt23_Rb_tree_const_iteratorIS5_EvEET_SB_RKS6_; std::list<std::string>::list<std::_Rb_tree_const_iterator<std::string>,void>(std::_Rb_tree_const_iterator<std::string>,std::_Rb_tree_const_iterator<std::string>,std::allocator<std::string> const&)
jmp short loc_FF64
loc_FF4F:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
mov [rbx+8], rbx
mov [rbx], rbx
loc_FF64:
lea rdi, [rsp+0A8h+var_60]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
mov rax, rbx
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_FFBB
jmp short loc_FFBB
mov rbx, rax
jmp short loc_FFA2
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r14
jz short loc_FFA2
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_FFA2:
mov rdi, [rsp+arg_20]; void *
cmp rdi, rbp
jz short loc_FFBE
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_FFBE
loc_FFBB:
mov rbx, rax
loc_FFBE:
lea rdi, [rsp+arg_40]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
mov rdi, rbx
call __Unwind_Resume
| long long Modbus::availableSerialPorts[abi:cxx11](long long a1, long long a2, long long a3)
{
long long v3; // rbx
long long v4; // rax
long long v5; // r15
long long v6; // rax
_BYTE *v7; // r12
long long v8; // rax
long long v9; // rax
__int128 *v10; // rcx
void *v12[2]; // [rsp+0h] [rbp-A8h] BYREF
__int128 v13; // [rsp+10h] [rbp-98h] BYREF
long long v14; // [rsp+20h] [rbp-88h]
void *v15[2]; // [rsp+28h] [rbp-80h] BYREF
_QWORD v16[2]; // [rsp+38h] [rbp-70h] BYREF
_BYTE v17[8]; // [rsp+48h] [rbp-60h] BYREF
int v18; // [rsp+50h] [rbp-58h] BYREF
long long v19; // [rsp+58h] [rbp-50h]
int *v20; // [rsp+60h] [rbp-48h]
int *v21; // [rsp+68h] [rbp-40h]
long long v22; // [rsp+70h] [rbp-38h]
v3 = a1;
v18 = 0;
v19 = 0LL;
v20 = &v18;
v21 = &v18;
v22 = 0LL;
v4 = opendir("/dev", a2, a3, &v18);
if ( v4 )
{
v5 = v4;
v14 = a1;
while ( 1 )
{
v6 = readdir(v5);
if ( !v6 )
break;
v7 = (_BYTE *)(v6 + 19);
if ( !(unsigned int)strncmp(v6 + 19, "ttyS", 4LL)
|| !(unsigned int)strncmp(v7, "ttyO", 4LL)
|| !(unsigned int)strncmp(v7, "ttyUSB", 6LL)
|| !(unsigned int)strncmp(v7, "ttyACM", 6LL)
|| !(unsigned int)strncmp(v7, "ttyGS", 5LL)
|| !(unsigned int)strncmp(v7, "ttyMI", 5LL)
|| !(unsigned int)strncmp(v7, "ttymxc", 6LL)
|| !(unsigned int)strncmp(v7, "ttyAMA", 6LL)
|| !(unsigned int)strncmp(v7, "ttyTHS", 6LL)
|| !(unsigned int)strncmp(v7, "rfcomm", 6LL)
|| !(unsigned int)strncmp(v7, "ircomm", 6LL)
|| !(unsigned int)strncmp(v7, "tnt", 3LL) )
{
v15[0] = v16;
v8 = strlen(v7);
std::string::_M_construct<char const*>(v15, v7, (long long)&v7[v8]);
v9 = std::string::replace(v15, 0LL, 0LL);
v12[0] = &v13;
v10 = (__int128 *)(v9 + 16);
if ( *(_QWORD *)v9 == v9 + 16 )
{
v13 = *v10;
}
else
{
v12[0] = *(void **)v9;
*(_QWORD *)&v13 = *(_QWORD *)v10;
}
v12[1] = *(void **)(v9 + 8);
*(_QWORD *)v9 = v10;
*(_QWORD *)(v9 + 8) = 0LL;
*(_BYTE *)(v9 + 16) = 0;
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string>(
v17,
v12);
if ( v12[0] != &v13 )
operator delete(v12[0], v13 + 1);
if ( v15[0] != v16 )
operator delete(v15[0], v16[0] + 1LL);
}
}
closedir(v5);
v3 = v14;
std::list<std::string>::list<std::_Rb_tree_const_iterator<std::string>,void>(v14, v20, &v18, v12);
}
else
{
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = a1;
*(_QWORD *)a1 = a1;
}
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree(v17);
return v3;
}
| availableSerialPorts[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV RBX,RDI
LEA RCX,[RSP + 0x50]
MOV dword ptr [RCX],0x0
XOR EAX,EAX
MOV qword ptr [RCX + 0x8],RAX
MOV qword ptr [RCX + 0x10],RCX
MOV qword ptr [RCX + 0x18],RCX
MOV qword ptr [RCX + 0x20],RAX
LEA RDI,[0x11a712]
CALL 0x00105460
TEST RAX,RAX
JZ 0x0010ff4f
MOV R15,RAX
MOV qword ptr [RSP + 0x20],RBX
LEA RBP,[RSP + 0x38]
LEA R14,[RSP + 0x10]
LEA R13,[RSP + 0x28]
MOV RBX,RSP
LAB_0010fd1f:
MOV RDI,R15
CALL 0x00105480
MOV R12,RAX
TEST RAX,RAX
JZ 0x0010ff2b
ADD R12,0x13
MOV EDX,0x4
MOV RDI,R12
LEA RSI,[0x11a717]
CALL 0x00105190
TEST EAX,EAX
JZ 0x0010fe73
MOV EDX,0x4
MOV RDI,R12
LEA RSI,[0x11a71c]
CALL 0x00105190
TEST EAX,EAX
JZ 0x0010fe73
MOV EDX,0x6
MOV RDI,R12
LEA RSI,[0x11a721]
CALL 0x00105190
TEST EAX,EAX
JZ 0x0010fe73
MOV EDX,0x6
MOV RDI,R12
LEA RSI,[0x11a728]
CALL 0x00105190
TEST EAX,EAX
JZ 0x0010fe73
MOV EDX,0x5
MOV RDI,R12
LEA RSI,[0x11a72f]
CALL 0x00105190
TEST EAX,EAX
JZ 0x0010fe73
MOV EDX,0x5
MOV RDI,R12
LEA RSI,[0x11a735]
CALL 0x00105190
TEST EAX,EAX
JZ 0x0010fe73
MOV EDX,0x6
MOV RDI,R12
LEA RSI,[0x11a73b]
CALL 0x00105190
TEST EAX,EAX
JZ 0x0010fe73
MOV EDX,0x6
MOV RDI,R12
LEA RSI,[0x11a742]
CALL 0x00105190
TEST EAX,EAX
JZ 0x0010fe73
MOV EDX,0x6
MOV RDI,R12
LEA RSI,[0x11a749]
CALL 0x00105190
TEST EAX,EAX
JZ 0x0010fe73
MOV EDX,0x6
MOV RDI,R12
LEA RSI,[0x11a750]
CALL 0x00105190
TEST EAX,EAX
JZ 0x0010fe73
MOV EDX,0x6
MOV RDI,R12
LEA RSI,[0x11a757]
CALL 0x00105190
TEST EAX,EAX
JZ 0x0010fe73
MOV EDX,0x3
MOV RDI,R12
LEA RSI,[0x11a75e]
CALL 0x00105190
TEST EAX,EAX
JNZ 0x0010fd1f
LAB_0010fe73:
MOV qword ptr [RSP + 0x28],RBP
MOV RDI,R12
CALL 0x00105180
LEA RDX,[RAX + R12*0x1]
LAB_0010fe84:
MOV RDI,R13
MOV RSI,R12
CALL 0x001091b8
LAB_0010fe8f:
MOV R8D,0x5
MOV RDI,R13
XOR ESI,ESI
XOR EDX,EDX
LEA RCX,[0x11a762]
CALL 0x00105360
MOV qword ptr [RSP],R14
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0010fec9
MOV qword ptr [RSP],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x10],RDX
JMP 0x0010fed0
LAB_0010fec9:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R14],XMM0
LAB_0010fed0:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_0010fee8:
LEA RDI,[RSP + 0x48]
MOV RSI,RBX
CALL 0x0011007e
MOV RDI,qword ptr [RSP]
CMP RDI,R14
JZ 0x0010ff0b
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00105310
LAB_0010ff0b:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,RBP
JZ 0x0010fd1f
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00105310
JMP 0x0010fd1f
LAB_0010ff2b:
MOV RDI,R15
CALL 0x001054f0
MOV RSI,qword ptr [RSP + 0x60]
LAB_0010ff38:
MOV RCX,RSP
MOV RBX,qword ptr [RSP + 0x20]
MOV RDI,RBX
LEA RDX,[RSP + 0x50]
CALL 0x0010ffd0
LAB_0010ff4d:
JMP 0x0010ff64
LAB_0010ff4f:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
MOV qword ptr [RBX + 0x8],RBX
MOV qword ptr [RBX],RBX
LAB_0010ff64:
LEA RDI,[RSP + 0x48]
CALL 0x00110006
MOV RAX,RBX
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Modbus::availableSerialPorts[abi:cxx11]() */
Modbus * __thiscall Modbus::availableSerialPorts_abi_cxx11_(Modbus *this)
{
int iVar1;
DIR *__dirp;
dirent *pdVar2;
size_t sVar3;
long *plVar4;
long *plVar5;
char *__s1;
long *local_a8;
long local_a0;
long local_98;
long lStack_90;
Modbus *local_88;
long *local_80 [2];
long local_70 [2];
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
local_60 [8];
int4 local_58 [2];
int8 local_50;
int4 *local_48;
int4 *local_40;
int8 local_38;
local_48 = local_58;
local_58[0] = 0;
local_50 = 0;
local_38 = 0;
local_40 = local_48;
__dirp = opendir("/dev");
if (__dirp == (DIR *)0x0) {
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(Modbus **)(this + 8) = this;
*(Modbus **)this = this;
}
else {
local_88 = this;
while( true ) {
/* try { // try from 0010fd1f to 0010fd26 has its CatchHandler @ 0010ffbb */
pdVar2 = readdir(__dirp);
if (pdVar2 == (dirent *)0x0) break;
__s1 = pdVar2->d_name;
iVar1 = strncmp(__s1,"ttyS",4);
if (iVar1 == 0) goto LAB_0010fe73;
iVar1 = strncmp(__s1,"ttyO",4);
if (iVar1 == 0) goto LAB_0010fe73;
iVar1 = strncmp(__s1,"ttyUSB",6);
if (iVar1 == 0) goto LAB_0010fe73;
iVar1 = strncmp(__s1,"ttyACM",6);
if (iVar1 == 0) goto LAB_0010fe73;
iVar1 = strncmp(__s1,"ttyGS",5);
if (iVar1 == 0) goto LAB_0010fe73;
iVar1 = strncmp(__s1,"ttyMI",5);
if (iVar1 == 0) goto LAB_0010fe73;
iVar1 = strncmp(__s1,"ttymxc",6);
if (iVar1 == 0) goto LAB_0010fe73;
iVar1 = strncmp(__s1,"ttyAMA",6);
if (iVar1 == 0) goto LAB_0010fe73;
iVar1 = strncmp(__s1,"ttyTHS",6);
if (iVar1 == 0) goto LAB_0010fe73;
iVar1 = strncmp(__s1,"rfcomm",6);
if (iVar1 == 0) goto LAB_0010fe73;
iVar1 = strncmp(__s1,"ircomm",6);
if (iVar1 == 0) goto LAB_0010fe73;
iVar1 = strncmp(__s1,"tnt",3);
if (iVar1 == 0) {
LAB_0010fe73:
local_80[0] = local_70;
sVar3 = strlen(__s1);
/* try { // try from 0010fe84 to 0010fe8e has its CatchHandler @ 0010ff82 */
std::__cxx11::string::_M_construct<char_const*>(local_80,__s1,__s1 + sVar3);
/* try { // try from 0010fe8f to 0010fea7 has its CatchHandler @ 0010ff84 */
plVar4 = (long *)std::__cxx11::string::replace((ulong)local_80,0,(char *)0x0,0x11a762);
plVar5 = plVar4 + 2;
if ((long *)*plVar4 == plVar5) {
local_98 = *plVar5;
lStack_90 = plVar4[3];
local_a8 = &local_98;
}
else {
local_98 = *plVar5;
local_a8 = (long *)*plVar4;
}
local_a0 = plVar4[1];
*plVar4 = (long)plVar5;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
/* try { // try from 0010fee8 to 0010fef4 has its CatchHandler @ 0010ff89 */
std::
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::_M_insert_unique<std::__cxx11::string>(local_60,(string *)&local_a8);
if (local_a8 != &local_98) {
operator_delete(local_a8,local_98 + 1);
}
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
}
}
closedir(__dirp);
this = local_88;
/* try { // try from 0010ff38 to 0010ff4c has its CatchHandler @ 0010ff80 */
std::__cxx11::list<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
list<std::_Rb_tree_const_iterator<std::__cxx11::string>,void>
(local_88,local_48,local_58,&local_a8);
}
std::
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::~_Rb_tree(local_60);
return this;
}
|
|
1,055 | js_parse_block | bluesky950520[P]quickjs/quickjs.c | static __exception int js_parse_block(JSParseState *s)
{
if (js_parse_expect(s, '{'))
return -1;
if (s->token.val != '}') {
push_scope(s);
for(;;) {
if (js_parse_statement_or_decl(s, DECL_MASK_ALL))
return -1;
if (s->token.val == '}')
break;
}
pop_scope(s);
}
if (next_token(s))
return -1;
return 0;
} | O0 | c | js_parse_block:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movl $0x7b, %esi
callq 0xab860
cmpl $0x0, %eax
je 0xb80d7
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0xb8144
movq 0x8(%rsp), %rax
cmpl $0x7d, 0x20(%rax)
je 0xb8123
movq 0x8(%rsp), %rdi
callq 0xa1b20
movq 0x8(%rsp), %rdi
movl $0x7, %esi
callq 0xa6970
cmpl $0x0, %eax
je 0xb810a
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0xb8144
movq 0x8(%rsp), %rax
cmpl $0x7d, 0x20(%rax)
jne 0xb8117
jmp 0xb8119
jmp 0xb80ec
movq 0x8(%rsp), %rdi
callq 0xb44b0
movq 0x8(%rsp), %rdi
callq 0xa32b0
cmpl $0x0, %eax
je 0xb813c
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0xb8144
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)
| js_parse_block:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
mov rdi, [rsp+18h+var_10]
mov esi, 7Bh ; '{'
call js_parse_expect
cmp eax, 0
jz short loc_B80D7
mov [rsp+18h+var_4], 0FFFFFFFFh
jmp short loc_B8144
loc_B80D7:
mov rax, [rsp+18h+var_10]
cmp dword ptr [rax+20h], 7Dh ; '}'
jz short loc_B8123
mov rdi, [rsp+18h+var_10]
call push_scope
loc_B80EC:
mov rdi, [rsp+18h+var_10]
mov esi, 7
call js_parse_statement_or_decl
cmp eax, 0
jz short loc_B810A
mov [rsp+18h+var_4], 0FFFFFFFFh
jmp short loc_B8144
loc_B810A:
mov rax, [rsp+18h+var_10]
cmp dword ptr [rax+20h], 7Dh ; '}'
jnz short loc_B8117
jmp short loc_B8119
loc_B8117:
jmp short loc_B80EC
loc_B8119:
mov rdi, [rsp+18h+var_10]
call pop_scope
loc_B8123:
mov rdi, [rsp+18h+var_10]
call next_token
cmp eax, 0
jz short loc_B813C
mov [rsp+18h+var_4], 0FFFFFFFFh
jmp short loc_B8144
loc_B813C:
mov [rsp+18h+var_4], 0
loc_B8144:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| long long js_parse_block(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
double v14; // xmm4_8
double v15; // xmm5_8
double v16; // xmm4_8
double v17; // xmm5_8
if ( (unsigned int)js_parse_expect(a1, 123, a11, a2, a3, a4, a5, a6, a7, a8, a9, a12, a13, a14) )
{
return (unsigned int)-1;
}
else
{
if ( *(_DWORD *)(a1 + 32) != 125 )
{
push_scope((long long *)a1);
do
{
if ( (unsigned int)js_parse_statement_or_decl((long long *)a1, 7u, a2, a3, a4, a5, v16, v17, a8, a9) )
return (unsigned int)-1;
}
while ( *(_DWORD *)(a1 + 32) != 125 );
pop_scope(a1);
}
if ( (unsigned int)next_token((long long *)a1, a2, a3, a4, a5, v14, v15, a8, a9) )
return (unsigned int)-1;
else
return 0;
}
}
| js_parse_block:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x7b
CALL 0x001ab860
CMP EAX,0x0
JZ 0x001b80d7
MOV dword ptr [RSP + 0x14],0xffffffff
JMP 0x001b8144
LAB_001b80d7:
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x20],0x7d
JZ 0x001b8123
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001a1b20
LAB_001b80ec:
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x7
CALL 0x001a6970
CMP EAX,0x0
JZ 0x001b810a
MOV dword ptr [RSP + 0x14],0xffffffff
JMP 0x001b8144
LAB_001b810a:
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x20],0x7d
JNZ 0x001b8117
JMP 0x001b8119
LAB_001b8117:
JMP 0x001b80ec
LAB_001b8119:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001b44b0
LAB_001b8123:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001a32b0
CMP EAX,0x0
JZ 0x001b813c
MOV dword ptr [RSP + 0x14],0xffffffff
JMP 0x001b8144
LAB_001b813c:
MOV dword ptr [RSP + 0x14],0x0
LAB_001b8144:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
int4 js_parse_block(long param_1)
{
int iVar1;
int4 local_4;
iVar1 = js_parse_expect(param_1,0x7b);
if (iVar1 == 0) {
if (*(int *)(param_1 + 0x20) != 0x7d) {
push_scope(param_1);
do {
iVar1 = js_parse_statement_or_decl(param_1,7);
if (iVar1 != 0) {
return 0xffffffff;
}
} while (*(int *)(param_1 + 0x20) != 0x7d);
pop_scope(param_1);
}
iVar1 = next_token(param_1);
if (iVar1 == 0) {
local_4 = 0;
}
else {
local_4 = 0xffffffff;
}
}
else {
local_4 = 0xffffffff;
}
return local_4;
}
|
|
1,056 | testing::operator<<(std::ostream&, testing::TestPartResult const&) | AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest-test-part.cc | std::ostream& operator<<(std::ostream& os, const TestPartResult& result) {
return os << internal::FormatFileLocation(result.file_name(),
result.line_number())
<< " "
<< (result.type() == TestPartResult::kSuccess ? "Success"
: result.type() == TestPartResult::kSkip ? "Skipped"
: result.type() == TestPartResult::kFatalFailure
? "Fatal failure"
: "Non-fatal failure")
<< ":\n"
<< result.message() << std::endl;
} | O3 | cpp | testing::operator<<(std::ostream&, testing::TestPartResult const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rsi
testq %rsi, %rsi
je 0x59b54
movq 0x8(%r14), %rsi
movl 0x28(%r14), %edx
movq %rsp, %r15
movq %r15, %rdi
callq 0x57e42
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x11b90
movq %rax, %rbx
leaq 0x2d23b(%rip), %rsi # 0x86db7
movl $0x1, %edx
movq %rax, %rdi
callq 0x11b90
movl (%r14), %eax
testl %eax, %eax
je 0x59b9e
cmpl $0x3, %eax
jne 0x59ba7
leaq 0x2cc1d(%rip), %r15 # 0x867b9
jmp 0x59bbc
leaq 0x2cc0c(%rip), %r15 # 0x867b1
jmp 0x59bbc
cmpl $0x2, %eax
leaq 0x2cc10(%rip), %rax # 0x867c1
leaq 0x2cc17(%rip), %r15 # 0x867cf
cmoveq %rax, %r15
movq %r15, %rdi
callq 0x114d0
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x11b90
leaq 0x2c894(%rip), %rsi # 0x8646d
movl $0x2, %edx
movq %rbx, %rdi
callq 0x11b90
movq 0x50(%r14), %r14
testq %r14, %r14
je 0x59c07
movq %r14, %rdi
callq 0x114d0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x11b90
jmp 0x59c20
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %rbx, %rdi
addq %rax, %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x11d40
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x11c80
movsbl %al, %esi
movq %rbx, %rdi
callq 0x11670
movq %rax, %rdi
callq 0x11600
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59c65
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x11120
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59c90
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x11120
movq %rbx, %rdi
callq 0x11760
| _ZN7testinglsERSoRKNS_14TestPartResultE:
push r15; __int64
push r14; int
push rbx; int
sub rsp, 20h
mov r14, rsi
mov rbx, rdi
mov rsi, [rsi+10h]
test rsi, rsi
jz short loc_59B54
mov rsi, [r14+8]; int
loc_59B54:
mov edx, [r14+28h]; int
mov r15, rsp
mov rdi, r15; int
call _ZN7testing8internal18FormatFileLocationB5cxx11EPKci; testing::internal::FormatFileLocation(char const*,int)
mov rsi, [r15]
mov rdx, [r15+8]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, rax
lea rsi, asc_86DB5+2; " "
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov eax, [r14]
test eax, eax
jz short loc_59B9E
cmp eax, 3
jnz short loc_59BA7
lea r15, aSkipped; "Skipped"
jmp short loc_59BBC
loc_59B9E:
lea r15, aSuccess; "Success"
jmp short loc_59BBC
loc_59BA7:
cmp eax, 2
lea rax, aFatalFailure; "Fatal failure"
lea r15, aNonFatalFailur; "Non-fatal failure"
cmovz r15, rax
loc_59BBC:
mov rdi, r15
call _strlen
mov rdi, rbx
mov rsi, r15
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aResultDiedButN_0+30h; ":\n"
mov edx, 2
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r14, [r14+50h]
test r14, r14
jz short loc_59C07
mov rdi, r14
call _strlen
mov rdi, rbx
mov rsi, r14
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_59C20
loc_59C07:
mov rax, [rbx]
mov rax, [rax-18h]
mov rdi, rbx
add rdi, rax
mov esi, [rbx+rax+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_59C20:
mov rax, [rbx]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, rbx; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
mov rbx, rax
lea rax, [rsp+38h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_59C65
mov rsi, [rsp+38h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_59C65:
mov rax, rbx
add rsp, 20h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_59C90
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_59C90:
mov rdi, rbx
call __Unwind_Resume
| long long testing::operator<<(long long a1, int *a2)
{
char *v3; // rsi
std::ostream *v4; // rbx
int v5; // eax
const char *v6; // r15
long long v7; // rax
long long v8; // r14
long long v9; // rax
char v10; // al
std::ostream *v11; // rax
long long v12; // rbx
void *v14[2]; // [rsp+0h] [rbp-38h] BYREF
long long v15; // [rsp+10h] [rbp-28h] BYREF
v3 = (char *)*((_QWORD *)a2 + 2);
if ( v3 )
v3 = (char *)*((_QWORD *)a2 + 1);
testing::internal::FormatFileLocation[abi:cxx11]((long long)v14, v3, a2[10]);
v4 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(a1, v14[0], v14[1]);
std::__ostream_insert<char,std::char_traits<char>>(v4, " ", 1LL);
v5 = *a2;
if ( *a2 )
{
if ( v5 == 3 )
{
v6 = "Skipped";
}
else
{
v6 = "Non-fatal failure";
if ( v5 == 2 )
v6 = "Fatal failure";
}
}
else
{
v6 = "Success";
}
v7 = strlen(v6);
std::__ostream_insert<char,std::char_traits<char>>(v4, v6, v7);
std::__ostream_insert<char,std::char_traits<char>>(v4, ":\n", 2LL);
v8 = *((_QWORD *)a2 + 10);
if ( v8 )
{
v9 = strlen(v8);
std::__ostream_insert<char,std::char_traits<char>>(v4, v8, v9);
}
else
{
std::ios::clear(
(char *)v4 + *(_QWORD *)(*(_QWORD *)v4 - 24LL),
*(_DWORD *)((char *)v4 + *(_QWORD *)(*(_QWORD *)v4 - 24LL) + 32) | 1u);
}
v10 = std::ios::widen((char *)v4 + *(_QWORD *)(*(_QWORD *)v4 - 24LL), 10LL);
v11 = (std::ostream *)std::ostream::put(v4, v10);
v12 = std::ostream::flush(v11);
if ( v14[0] != &v15 )
operator delete(v14[0], v15 + 1);
return v12;
}
| operator<<:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV R14,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RSI + 0x10]
TEST RSI,RSI
JZ 0x00159b54
MOV RSI,qword ptr [R14 + 0x8]
LAB_00159b54:
MOV EDX,dword ptr [R14 + 0x28]
MOV R15,RSP
MOV RDI,R15
CALL 0x00157e42
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LAB_00159b6a:
MOV RDI,RBX
CALL 0x00111b90
MOV RBX,RAX
LEA RSI,[0x186db7]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00111b90
MOV EAX,dword ptr [R14]
TEST EAX,EAX
JZ 0x00159b9e
CMP EAX,0x3
JNZ 0x00159ba7
LEA R15,[0x1867b9]
JMP 0x00159bbc
LAB_00159b9e:
LEA R15,[0x1867b1]
JMP 0x00159bbc
LAB_00159ba7:
CMP EAX,0x2
LEA RAX,[0x1867c1]
LEA R15,[0x1867cf]
CMOVZ R15,RAX
LAB_00159bbc:
MOV RDI,R15
CALL 0x001114d0
MOV RDI,RBX
MOV RSI,R15
MOV RDX,RAX
CALL 0x00111b90
LEA RSI,[0x18646d]
MOV EDX,0x2
MOV RDI,RBX
CALL 0x00111b90
MOV R14,qword ptr [R14 + 0x50]
TEST R14,R14
JZ 0x00159c07
MOV RDI,R14
CALL 0x001114d0
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RAX
CALL 0x00111b90
JMP 0x00159c20
LAB_00159c07:
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
MOV RDI,RBX
ADD RDI,RAX
MOV ESI,dword ptr [RBX + RAX*0x1 + 0x20]
OR ESI,0x1
CALL 0x00111d40
LAB_00159c20:
MOV RAX,qword ptr [RBX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,RBX
MOV ESI,0xa
CALL 0x00111c80
MOVSX ESI,AL
MOV RDI,RBX
CALL 0x00111670
MOV RDI,RAX
CALL 0x00111600
LAB_00159c47:
MOV RBX,RAX
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00159c65
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00111120
LAB_00159c65:
MOV RAX,RBX
ADD RSP,0x20
POP RBX
POP R14
POP R15
RET
|
/* testing::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, testing::TestPartResult const&) */
int8 testing::operator<<(ostream *param_1,TestPartResult *param_2)
{
int iVar1;
ostream *poVar2;
size_t sVar3;
int8 uVar4;
char *pcVar5;
long *local_38;
long local_30;
long local_28 [2];
pcVar5 = *(char **)(param_2 + 0x10);
if (pcVar5 != (char *)0x0) {
pcVar5 = *(char **)(param_2 + 8);
}
internal::FormatFileLocation_abi_cxx11_((internal *)&local_38,pcVar5,*(int *)(param_2 + 0x28));
/* try { // try from 00159b6a to 00159c46 has its CatchHandler @ 00159c72 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)local_38,local_30);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," ",1);
iVar1 = *(int *)param_2;
if (iVar1 == 0) {
pcVar5 = "Success";
}
else if (iVar1 == 3) {
pcVar5 = "Skipped";
}
else {
pcVar5 = "Non-fatal failure";
if (iVar1 == 2) {
pcVar5 = "Fatal failure";
}
}
sVar3 = strlen(pcVar5);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,pcVar5,sVar3);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,":\n",2);
pcVar5 = *(char **)(param_2 + 0x50);
if (pcVar5 == (char *)0x0) {
std::ios::clear(poVar2 + *(long *)(*(long *)poVar2 + -0x18),
*(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x20) | 1);
}
else {
sVar3 = strlen(pcVar5);
std::__ostream_insert<char,std::char_traits<char>>(poVar2,pcVar5,sVar3);
}
std::ios::widen((char)*(int8 *)(*(long *)poVar2 + -0x18) + (char)poVar2);
std::ostream::put((char)poVar2);
uVar4 = std::ostream::flush();
if (local_38 != local_28) {
operator_delete(local_38,local_28[0] + 1);
}
return uVar4;
}
|
|
1,057 | getProcAddressGLX | untodesu[P]riteg/build_O3/_deps/glfw-src/src/glx_context.c | static GLFWglproc getProcAddressGLX(const char* procname)
{
if (_glfw.glx.GetProcAddress)
return _glfw.glx.GetProcAddress((const GLubyte*) procname);
else if (_glfw.glx.GetProcAddressARB)
return _glfw.glx.GetProcAddressARB((const GLubyte*) procname);
else
return _glfw_dlsym(_glfw.glx.handle, procname);
} | O3 | c | getProcAddressGLX:
movq %rdi, %rsi
leaq 0x8208c(%rip), %rax # 0xa8638
movq 0x207f0(%rax), %rcx
testq %rcx, %rcx
jne 0x265c4
movq 0x207f8(%rax), %rcx
testq %rcx, %rcx
je 0x265c9
movq %rsi, %rdi
jmpq *%rcx
movq 0x20780(%rax), %rdi
jmp 0xc820
| getProcAddressGLX:
mov rsi, rdi
lea rax, _glfw
mov rcx, [rax+207F0h]
test rcx, rcx
jnz short loc_265C4
mov rcx, [rax+207F8h]
test rcx, rcx
jz short loc_265C9
loc_265C4:
mov rdi, rsi
jmp rcx
loc_265C9:
mov rdi, [rax+20780h]
jmp _dlsym
| long long getProcAddressGLX(long long a1)
{
long long ( *v1)(long long); // rcx
v1 = *(long long ( **)(long long))&glfw[33276];
if ( v1 )
return v1(a1);
v1 = *(long long ( **)(long long))&glfw[33278];
if ( v1 )
return v1(a1);
else
return dlsym(*(_QWORD *)&glfw[33248], a1);
}
| getProcAddressGLX:
MOV RSI,RDI
LEA RAX,[0x1a8638]
MOV RCX,qword ptr [RAX + 0x207f0]
TEST RCX,RCX
JNZ 0x001265c4
MOV RCX,qword ptr [RAX + 0x207f8]
TEST RCX,RCX
JZ 0x001265c9
LAB_001265c4:
MOV RDI,RSI
JMP RCX
LAB_001265c9:
MOV RDI,qword ptr [RAX + 0x20780]
JMP 0x0010c820
|
void getProcAddressGLX(int8 param_1)
{
code *UNRECOVERED_JUMPTABLE;
UNRECOVERED_JUMPTABLE = DAT_001c8e28;
if ((DAT_001c8e28 == (code *)0x0) &&
(UNRECOVERED_JUMPTABLE = DAT_001c8e30, DAT_001c8e30 == (code *)0x0)) {
dlsym(DAT_001c8db8);
return;
}
/* WARNING: Could not recover jumptable at 0x001265c7. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(param_1);
return;
}
|
|
1,058 | pagecache_unpin | eloqsql/storage/maria/ma_pagecache.c | void pagecache_unpin(PAGECACHE *pagecache,
PAGECACHE_FILE *file,
pgcache_page_no_t pageno,
LSN lsn)
{
PAGECACHE_BLOCK_LINK *block;
int page_st;
DBUG_ENTER("pagecache_unpin");
DBUG_PRINT("enter", ("fd: %u page: %lu",
(uint) file->file, (ulong) pageno));
pagecache_pthread_mutex_lock(&pagecache->cache_lock);
/*
As soon as we keep lock cache can be used, and we have lock bacause want
aunlock.
*/
DBUG_ASSERT(pagecache->can_be_used);
inc_counter_for_resize_op(pagecache);
/* See NOTE for pagecache_unlock about registering requests */
block= find_block(pagecache, file, pageno, 0, 0, 0, 0, FALSE, &page_st);
DBUG_ASSERT(block != 0);
DBUG_ASSERT(page_st == PAGE_READ);
/* we can't unpin such page without unlock */
DBUG_ASSERT((block->status & PCBLOCK_DIRECT_W) == 0);
if (lsn != LSN_IMPOSSIBLE)
check_and_set_lsn(pagecache, lsn, block);
/*
we can just unpin only with keeping read lock because:
a) we can't pin without any lock
b) we can't unpin keeping write lock
*/
if (make_lock_and_pin(pagecache, block,
PAGECACHE_LOCK_LEFT_READLOCKED,
PAGECACHE_UNPIN, FALSE))
DBUG_ASSERT(0); /* should not happend */
remove_reader(block);
/*
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
*/
unreg_request(pagecache, block, 1);
dec_counter_for_resize_op(pagecache);
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
DBUG_VOID_RETURN;
} | O3 | c | pagecache_unpin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
leaq 0xc8(%rdi), %rbx
cmpq $0x0, 0x108(%rdi)
jne 0x3322f
movq %rbx, %rdi
callq 0x29220
incq 0x68(%r14)
subq $0x8, %rsp
leaq -0x2c(%rbp), %rax
xorl %r10d, %r10d
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %r10
pushq %r10
callq 0x327ac
addq $0x20, %rsp
movq %rax, %r12
testq %r15, %r15
je 0x331a1
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x32df6
decl 0x64(%r12)
movq 0x20(%r12), %rax
decl 0x68(%rax)
jne 0x331cf
movq 0x28(%r12), %r15
testq %r15, %r15
je 0x331cf
movq 0x30(%r15), %rdi
testq %rdi, %rdi
jne 0x3325a
movq %r15, %rdi
callq 0x295c0
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x33023
decq 0x68(%r14)
jne 0x3320d
movq 0x110(%r14), %rax
testq %rax, %rax
je 0x3320d
movq 0x88(%rax), %r15
movq 0x38(%r15), %rdi
addq $0x8, %r15
testq %rdi, %rdi
jne 0x3326f
movq %r15, %rdi
callq 0x295c0
movq 0x108(%r14), %rdi
testq %rdi, %rdi
jne 0x33248
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x291e0
leaq 0xa765e(%rip), %rsi # 0xda894
movq %rbx, %rdi
movl $0xcef, %edx # imm = 0xCEF
callq 0x2eb8f
jmp 0x3315d
leaq 0x354e71(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x33219
leaq 0x354e5f(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x331c7
leaq 0x354e4a(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x33205
| pagecache_unpin:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov r14, rdi
lea rbx, [rdi+0C8h]
cmp qword ptr [rdi+108h], 0
jnz loc_3322F
mov rdi, rbx
call _pthread_mutex_lock
loc_3315D:
inc qword ptr [r14+68h]
sub rsp, 8
lea rax, [rbp+var_2C]
xor r10d, r10d
mov rdi, r14
mov rsi, r13
mov rdx, r12
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
push rax
push r10
push r10
call find_block
add rsp, 20h
mov r12, rax
test r15, r15
jz short loc_331A1
mov rdi, r14
mov rsi, r15
mov rdx, r12
call check_and_set_lsn
loc_331A1:
dec dword ptr [r12+64h]
mov rax, [r12+20h]
dec dword ptr [rax+68h]
jnz short loc_331CF
mov r15, [r12+28h]
test r15, r15
jz short loc_331CF
mov rdi, [r15+30h]
test rdi, rdi
jnz loc_3325A
loc_331C7:
mov rdi, r15
call _pthread_cond_signal
loc_331CF:
mov rdi, r14
mov rsi, r12
mov edx, 1
call unreg_request
dec qword ptr [r14+68h]
jnz short loc_3320D
mov rax, [r14+110h]
test rax, rax
jz short loc_3320D
mov r15, [rax+88h]
mov rdi, [r15+38h]
add r15, 8
test rdi, rdi
jnz short loc_3326F
loc_33205:
mov rdi, r15
call _pthread_cond_signal
loc_3320D:
mov rdi, [r14+108h]
test rdi, rdi
jnz short loc_33248
loc_33219:
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_3322F:
lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 0CEFh
call psi_mutex_lock
jmp loc_3315D
loc_33248:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_33219
loc_3325A:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp loc_331C7
loc_3326F:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_33205
| long long pagecache_unpin(_QWORD *a1, int *a2, long long a3, signed long long a4)
{
long long v4; // rax
_QWORD *v8; // rbx
long long block; // rax
long long v10; // r12
long long v11; // rax
bool v12; // zf
long long v13; // r15
long long v14; // rdi
long long v15; // rax
long long v16; // r15
long long v17; // rdi
long long v18; // r15
long long v19; // rdi
_DWORD v21[11]; // [rsp+0h] [rbp-2Ch] BYREF
v21[0] = HIDWORD(v4);
v8 = a1 + 25;
if ( a1[33] )
psi_mutex_lock(
(long long)(a1 + 25),
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0xCEFu);
else
pthread_mutex_lock(a1 + 25);
++a1[13];
block = find_block((long long)a1, a2, a3, 0, 0, 0, 0, 0, v21);
v10 = block;
if ( a4 )
check_and_set_lsn((long long)a1, a4, block);
--*(_DWORD *)(v10 + 100);
v11 = *(_QWORD *)(v10 + 32);
v12 = (*(_DWORD *)(v11 + 104))-- == 1;
if ( v12 )
{
v13 = *(_QWORD *)(v10 + 40);
if ( v13 )
{
v14 = *(_QWORD *)(v13 + 48);
if ( v14 )
((void ( *)(long long))PSI_server[46])(v14);
pthread_cond_signal(v13);
}
}
unreg_request(a1, v10, 1);
v12 = a1[13]-- == 1LL;
if ( v12 )
{
v15 = a1[34];
if ( v15 )
{
v16 = *(_QWORD *)(v15 + 136);
v17 = *(_QWORD *)(v16 + 56);
v18 = v16 + 8;
if ( v17 )
((void ( *)(long long))PSI_server[46])(v17);
pthread_cond_signal(v18);
}
}
v19 = a1[33];
if ( v19 )
((void ( *)(long long))PSI_server[44])(v19);
return pthread_mutex_unlock(v8);
}
| pagecache_unpin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV R14,RDI
LEA RBX,[RDI + 0xc8]
CMP qword ptr [RDI + 0x108],0x0
JNZ 0x0013322f
MOV RDI,RBX
CALL 0x00129220
LAB_0013315d:
INC qword ptr [R14 + 0x68]
SUB RSP,0x8
LEA RAX,[RBP + -0x2c]
XOR R10D,R10D
MOV RDI,R14
MOV RSI,R13
MOV RDX,R12
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
PUSH RAX
PUSH R10
PUSH R10
CALL 0x001327ac
ADD RSP,0x20
MOV R12,RAX
TEST R15,R15
JZ 0x001331a1
MOV RDI,R14
MOV RSI,R15
MOV RDX,R12
CALL 0x00132df6
LAB_001331a1:
DEC dword ptr [R12 + 0x64]
MOV RAX,qword ptr [R12 + 0x20]
DEC dword ptr [RAX + 0x68]
JNZ 0x001331cf
MOV R15,qword ptr [R12 + 0x28]
TEST R15,R15
JZ 0x001331cf
MOV RDI,qword ptr [R15 + 0x30]
TEST RDI,RDI
JNZ 0x0013325a
LAB_001331c7:
MOV RDI,R15
CALL 0x001295c0
LAB_001331cf:
MOV RDI,R14
MOV RSI,R12
MOV EDX,0x1
CALL 0x00133023
DEC qword ptr [R14 + 0x68]
JNZ 0x0013320d
MOV RAX,qword ptr [R14 + 0x110]
TEST RAX,RAX
JZ 0x0013320d
MOV R15,qword ptr [RAX + 0x88]
MOV RDI,qword ptr [R15 + 0x38]
ADD R15,0x8
TEST RDI,RDI
JNZ 0x0013326f
LAB_00133205:
MOV RDI,R15
CALL 0x001295c0
LAB_0013320d:
MOV RDI,qword ptr [R14 + 0x108]
TEST RDI,RDI
JNZ 0x00133248
LAB_00133219:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001291e0
LAB_0013322f:
LEA RSI,[0x1da894]
MOV RDI,RBX
MOV EDX,0xcef
CALL 0x0012eb8f
JMP 0x0013315d
LAB_00133248:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00133219
LAB_0013325a:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001331c7
LAB_0013326f:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x00133205
|
void pagecache_unpin(long param_1,int8 param_2,int8 param_3,long param_4)
{
int *piVar1;
long *plVar2;
pthread_mutex_t *__mutex;
pthread_cond_t *__cond;
long lVar3;
int1 local_34 [4];
__mutex = (pthread_mutex_t *)(param_1 + 200);
if (*(long *)(param_1 + 0x108) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0xcef);
}
*(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + 1;
lVar3 = find_block(param_1,param_2,param_3,0,0,0,0,0,local_34);
if (param_4 != 0) {
check_and_set_lsn(param_1,param_4,lVar3);
}
*(int *)(lVar3 + 100) = *(int *)(lVar3 + 100) + -1;
piVar1 = (int *)(*(long *)(lVar3 + 0x20) + 0x68);
*piVar1 = *piVar1 + -1;
if ((*piVar1 == 0) &&
(__cond = *(pthread_cond_t **)(lVar3 + 0x28), __cond != (pthread_cond_t *)0x0)) {
if (__cond[1].__align != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal(__cond);
}
unreg_request(param_1,lVar3,1);
plVar2 = (long *)(param_1 + 0x68);
*plVar2 = *plVar2 + -1;
if ((*plVar2 == 0) && (*(long *)(param_1 + 0x110) != 0)) {
lVar3 = *(long *)(*(long *)(param_1 + 0x110) + 0x88);
if (*(long *)(lVar3 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar3 + 8));
}
if (*(long *)(param_1 + 0x108) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return;
}
|
|
1,059 | my_wc_mb_filename | eloqsql/strings/ctype-utf8.c | static int
my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
static const char hex[]= "0123456789abcdef";
if (s >= e)
return MY_CS_TOOSMALL;
if (wc < 128 && filename_safe_char[wc])
{
*s= (uchar) wc;
return 1;
}
if (s + 3 > e)
return MY_CS_TOOSMALL3;
*s++= MY_FILENAME_ESCAPE;
if ((wc >= 0x00C0 && wc <= 0x05FF && (code= uni_0C00_05FF[wc - 0x00C0])) ||
(wc >= 0x1E00 && wc <= 0x1FFF && (code= uni_1E00_1FFF[wc - 0x1E00])) ||
(wc >= 0x2160 && wc <= 0x217F && (code= uni_2160_217F[wc - 0x2160])) ||
(wc >= 0x24B0 && wc <= 0x24EF && (code= uni_24B0_24EF[wc - 0x24B0])) ||
(wc >= 0xFF20 && wc <= 0xFF5F && (code= uni_FF20_FF5F[wc - 0xFF20])))
{
*s++= (code / 80) + 0x30;
*s++= (code % 80) + 0x30;
return 3;
}
/* Non letter */
if (s + 4 > e)
return MY_CS_TOOSMALL5;
*s++= hex[(wc >> 12) & 15];
*s++= hex[(wc >> 8) & 15];
*s++= hex[(wc >> 4) & 15];
*s++= hex[(wc) & 15];
return 5;
} | O0 | c | my_wc_mb_filename:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0xd2dda
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0xd3045
cmpq $0x80, -0x18(%rbp)
jae 0xd2e10
movq -0x18(%rbp), %rcx
leaq 0x14d5d1(%rip), %rax # 0x2203c0
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0xd2e10
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xd3045
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0xd2e2a
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0xd3045
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x40, (%rax)
cmpq $0xc0, -0x18(%rbp)
jb 0xd2e72
cmpq $0x5ff, -0x18(%rbp) # imm = 0x5FF
ja 0xd2e72
movq -0x18(%rbp), %rcx
subq $0xc0, %rcx
leaq 0x15071e(%rip), %rax # 0x223580
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0xd2f3e
cmpq $0x1e00, -0x18(%rbp) # imm = 0x1E00
jb 0xd2ea8
cmpq $0x1fff, -0x18(%rbp) # imm = 0x1FFF
ja 0xd2ea8
movq -0x18(%rbp), %rcx
subq $0x1e00, %rcx # imm = 0x1E00
leaq 0x3299e8(%rip), %rax # 0x3fc880
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0xd2f3e
cmpq $0x2160, -0x18(%rbp) # imm = 0x2160
jb 0xd2eda
cmpq $0x217f, -0x18(%rbp) # imm = 0x217F
ja 0xd2eda
movq -0x18(%rbp), %rcx
subq $0x2160, %rcx # imm = 0x2160
leaq 0x150572(%rip), %rax # 0x223440
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0xd2f3e
cmpq $0x24b0, -0x18(%rbp) # imm = 0x24B0
jb 0xd2f0c
cmpq $0x24ef, -0x18(%rbp) # imm = 0x24EF
ja 0xd2f0c
movq -0x18(%rbp), %rcx
subq $0x24b0, %rcx # imm = 0x24B0
leaq 0x150580(%rip), %rax # 0x223480
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0xd2f3e
cmpq $0xff20, -0x18(%rbp) # imm = 0xFF20
jb 0xd2f8c
cmpq $0xff5f, -0x18(%rbp) # imm = 0xFF5F
ja 0xd2f8c
movq -0x18(%rbp), %rcx
subq $0xff20, %rcx # imm = 0xFF20
leaq 0x1505ce(%rip), %rax # 0x223500
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0xd2f8c
movl -0x2c(%rbp), %eax
movl $0x50, %ecx
cltd
idivl %ecx
addl $0x30, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
movl $0x50, %ecx
cltd
idivl %ecx
addl $0x30, %edx
movb %dl, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0xd3045
movq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x28(%rbp), %rax
jbe 0xd2fa6
movl $0xffffff97, -0x4(%rbp) # imm = 0xFFFFFF97
jmp 0xd3045
movq -0x18(%rbp), %rcx
shrq $0xc, %rcx
andq $0xf, %rcx
leaq 0x150467(%rip), %rax # 0x223420
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rcx
shrq $0x8, %rcx
andq $0xf, %rcx
leaq 0x150440(%rip), %rax # 0x223420
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rcx
shrq $0x4, %rcx
andq $0xf, %rcx
leaq 0x150419(%rip), %rax # 0x223420
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rcx
andq $0xf, %rcx
leaq 0x1503f6(%rip), %rax # 0x223420
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl $0x5, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| my_wc_mb_filename:
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_20]
cmp rax, [rbp+var_28]
jb short loc_D2DDA
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_D3045
loc_D2DDA:
cmp [rbp+var_18], 80h
jnb short loc_D2E10
mov rcx, [rbp+var_18]
lea rax, filename_safe_char
movsx eax, byte ptr [rax+rcx]
cmp eax, 0
jz short loc_D2E10
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp loc_D3045
loc_D2E10:
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_D2E2A
mov [rbp+var_4], 0FFFFFF99h
jmp loc_D3045
loc_D2E2A:
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov byte ptr [rax], 40h ; '@'
cmp [rbp+var_18], 0C0h
jb short loc_D2E72
cmp [rbp+var_18], 5FFh
ja short loc_D2E72
mov rcx, [rbp+var_18]
sub rcx, 0C0h
lea rax, uni_0C00_05FF
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz loc_D2F3E
loc_D2E72:
cmp [rbp+var_18], 1E00h
jb short loc_D2EA8
cmp [rbp+var_18], 1FFFh
ja short loc_D2EA8
mov rcx, [rbp+var_18]
sub rcx, 1E00h
lea rax, uni_1E00_1FFF
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz loc_D2F3E
loc_D2EA8:
cmp [rbp+var_18], 2160h
jb short loc_D2EDA
cmp [rbp+var_18], 217Fh
ja short loc_D2EDA
mov rcx, [rbp+var_18]
sub rcx, 2160h
lea rax, uni_2160_217F
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_D2F3E
loc_D2EDA:
cmp [rbp+var_18], 24B0h
jb short loc_D2F0C
cmp [rbp+var_18], 24EFh
ja short loc_D2F0C
mov rcx, [rbp+var_18]
sub rcx, 24B0h
lea rax, uni_24B0_24EF
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_D2F3E
loc_D2F0C:
cmp [rbp+var_18], 0FF20h
jb short loc_D2F8C
cmp [rbp+var_18], 0FF5Fh
ja short loc_D2F8C
mov rcx, [rbp+var_18]
sub rcx, 0FF20h
lea rax, uni_FF20_FF5F
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jz short loc_D2F8C
loc_D2F3E:
mov eax, [rbp+var_2C]
mov ecx, 50h ; 'P'
cdq
idiv ecx
add eax, 30h ; '0'
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov eax, [rbp+var_2C]
mov ecx, 50h ; 'P'
cdq
idiv ecx
add edx, 30h ; '0'
mov cl, dl
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov [rbp+var_4], 3
jmp loc_D3045
loc_D2F8C:
mov rax, [rbp+var_20]
add rax, 4
cmp rax, [rbp+var_28]
jbe short loc_D2FA6
mov [rbp+var_4], 0FFFFFF97h
jmp loc_D3045
loc_D2FA6:
mov rcx, [rbp+var_18]
shr rcx, 0Ch
and rcx, 0Fh
lea rax, my_wc_mb_filename_hex; "0123456789abcdef"
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rcx, [rbp+var_18]
shr rcx, 8
and rcx, 0Fh
lea rax, my_wc_mb_filename_hex; "0123456789abcdef"
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rcx, [rbp+var_18]
shr rcx, 4
and rcx, 0Fh
lea rax, my_wc_mb_filename_hex; "0123456789abcdef"
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rcx, [rbp+var_18]
and rcx, 0Fh
lea rax, my_wc_mb_filename_hex; "0123456789abcdef"
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov [rbp+var_4], 5
loc_D3045:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_filename(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+0h] [rbp-2Ch]
_BYTE *v6; // [rsp+Ch] [rbp-20h]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 < 0x80 && filename_safe_char[a2] )
{
*a3 = a2;
return 1;
}
else if ( (unsigned long long)(a3 + 3) <= a4 )
{
v6 = a3 + 1;
*a3 = 64;
if ( a2 >= 0xC0 && a2 <= 0x5FF && (v5 = uni_0C00_05FF[a2 - 192]) != 0
|| a2 >= 0x1E00 && a2 <= 0x1FFF && (v5 = uni_1E00_1FFF[a2 - 7680]) != 0
|| a2 >= 0x2160 && a2 <= 0x217F && (v5 = uni_2160_217F[a2 - 8544]) != 0
|| a2 >= 0x24B0 && a2 <= 0x24EF && (v5 = uni_24B0_24EF[a2 - 9392]) != 0
|| a2 >= 0xFF20 && a2 <= 0xFF5F && (v5 = uni_FF20_FF5F[a2 - 65312]) != 0 )
{
*v6 = v5 / 80 + 48;
a3[2] = v5 % 80 + 48;
return 3;
}
else if ( (unsigned long long)(a3 + 5) <= a4 )
{
*v6 = my_wc_mb_filename_hex[(unsigned __int16)a2 >> 12];
a3[2] = my_wc_mb_filename_hex[(a2 >> 8) & 0xF];
a3[3] = my_wc_mb_filename_hex[(unsigned __int8)a2 >> 4];
a3[4] = my_wc_mb_filename_hex[a2 & 0xF];
return 5;
}
else
{
return (unsigned int)-105;
}
}
else
{
return (unsigned int)-103;
}
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_filename:
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 + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x001d2dda
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001d3045
LAB_001d2dda:
CMP qword ptr [RBP + -0x18],0x80
JNC 0x001d2e10
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x3203c0]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x0
JZ 0x001d2e10
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 0x001d3045
LAB_001d2e10:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001d2e2a
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x001d3045
LAB_001d2e2a:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV byte ptr [RAX],0x40
CMP qword ptr [RBP + -0x18],0xc0
JC 0x001d2e72
CMP qword ptr [RBP + -0x18],0x5ff
JA 0x001d2e72
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0xc0
LEA RAX,[0x323580]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001d2f3e
LAB_001d2e72:
CMP qword ptr [RBP + -0x18],0x1e00
JC 0x001d2ea8
CMP qword ptr [RBP + -0x18],0x1fff
JA 0x001d2ea8
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0x1e00
LEA RAX,[0x4fc880]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001d2f3e
LAB_001d2ea8:
CMP qword ptr [RBP + -0x18],0x2160
JC 0x001d2eda
CMP qword ptr [RBP + -0x18],0x217f
JA 0x001d2eda
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0x2160
LEA RAX,[0x323440]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001d2f3e
LAB_001d2eda:
CMP qword ptr [RBP + -0x18],0x24b0
JC 0x001d2f0c
CMP qword ptr [RBP + -0x18],0x24ef
JA 0x001d2f0c
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0x24b0
LEA RAX,[0x323480]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001d2f3e
LAB_001d2f0c:
CMP qword ptr [RBP + -0x18],0xff20
JC 0x001d2f8c
CMP qword ptr [RBP + -0x18],0xff5f
JA 0x001d2f8c
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0xff20
LEA RAX,[0x323500]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JZ 0x001d2f8c
LAB_001d2f3e:
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,0x50
CDQ
IDIV ECX
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,0x50
CDQ
IDIV ECX
ADD EDX,0x30
MOV CL,DL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001d3045
LAB_001d2f8c:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001d2fa6
MOV dword ptr [RBP + -0x4],0xffffff97
JMP 0x001d3045
LAB_001d2fa6:
MOV RCX,qword ptr [RBP + -0x18]
SHR RCX,0xc
AND RCX,0xf
LEA RAX,[0x323420]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x18]
SHR RCX,0x8
AND RCX,0xf
LEA RAX,[0x323420]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x18]
SHR RCX,0x4
AND RCX,0xf
LEA RAX,[0x323420]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x18]
AND RCX,0xf
LEA RAX,[0x323420]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x5
LAB_001d3045:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4
my_wc_mb_filename(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
uint local_34;
int4 local_c;
if (param_3 < param_4) {
if ((param_2 < 0x80) && (filename_safe_char[param_2] != '\0')) {
*param_3 = (char)param_2;
local_c = 1;
}
else if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
*param_3 = 0x40;
if ((((((param_2 < 0xc0) || (0x5ff < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_0C00_05FF + (param_2 - 0xc0) * 2), local_34 == 0)) &&
(((param_2 < 0x1e00 || (0x1fff < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_1E00_1FFF + (param_2 - 0x1e00) * 2), local_34 == 0))))
&& (((param_2 < 0x2160 || (0x217f < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_2160_217F + (param_2 - 0x2160) * 2), local_34 == 0))
)) && ((((param_2 < 0x24b0 || (0x24ef < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_24B0_24EF + (param_2 - 0x24b0) * 2),
local_34 == 0)) &&
(((param_2 < 0xff20 || (0xff5f < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_FF20_FF5F + (param_2 - 0xff20) * 2),
local_34 == 0)))))) {
if (param_4 < param_3 + 5) {
local_c = 0xffffff97;
}
else {
param_3[1] = "0123456789abcdef"[param_2 >> 0xc & 0xf];
param_3[2] = "0123456789abcdef"[param_2 >> 8 & 0xf];
param_3[3] = "0123456789abcdef"[param_2 >> 4 & 0xf];
param_3[4] = "0123456789abcdef"[param_2 & 0xf];
local_c = 5;
}
}
else {
param_3[1] = (char)(local_34 / 0x50) + '0';
param_3[2] = (char)(local_34 % 0x50) + '0';
local_c = 3;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
1,060 | CombineCRC(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long const*) | eloqsql/mysys/crc32/crc32c_amd64.cc | static inline uint64_t CombineCRC(
size_t block_size,
uint64_t crc0,
uint64_t crc1,
uint64_t crc2,
const uint64_t* next2) {
const auto multiplier =
*(reinterpret_cast<const __m128i*>(clmul_constants) + block_size - 1);
const auto crc0_xmm = _mm_set_epi64x(0, crc0);
const auto res0 = _mm_clmulepi64_si128(crc0_xmm, multiplier, 0x00);
const auto crc1_xmm = _mm_set_epi64x(0, crc1);
const auto res1 = _mm_clmulepi64_si128(crc1_xmm, multiplier, 0x10);
const auto res = _mm_xor_si128(res0, res1);
crc0 = _mm_cvtsi128_si64(res);
crc0 = crc0 ^ *((uint64_t*)next2 - 1);
crc2 = _mm_crc32_u64(crc2, crc0);
return crc2;
} | O0 | cpp | CombineCRC(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long const*):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x88(%rbp)
movq %rsi, -0x90(%rbp)
movq %rdx, -0x98(%rbp)
movq %rcx, -0xa0(%rbp)
movq %r8, -0xa8(%rbp)
movq -0x88(%rbp), %rax
shlq $0x4, %rax
leaq 0x4d7c0(%rip), %rcx # 0xdfe40
movaps -0x10(%rax,%rcx), %xmm0
movaps %xmm0, -0xc0(%rbp)
movq -0x90(%rbp), %rax
movq $0x0, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %xmm1
movq -0x40(%rbp), %xmm0
punpcklqdq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x50(%rbp)
movaps -0x50(%rbp), %xmm0
movaps %xmm0, -0xd0(%rbp)
movaps -0xd0(%rbp), %xmm0
movaps -0xc0(%rbp), %xmm1
pclmulqdq $0x0, %xmm1, %xmm0
movaps %xmm0, -0xe0(%rbp)
movq -0x98(%rbp), %rax
movq $0x0, -0x58(%rbp)
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %xmm1
movq -0x60(%rbp), %xmm0
punpcklqdq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x70(%rbp)
movaps -0x70(%rbp), %xmm0
movaps %xmm0, -0xf0(%rbp)
movaps -0xf0(%rbp), %xmm0
movaps -0xc0(%rbp), %xmm1
pclmulqdq $0x10, %xmm1, %xmm0
movaps %xmm0, -0x100(%rbp)
movaps -0xe0(%rbp), %xmm1
movaps -0x100(%rbp), %xmm0
movaps %xmm1, -0x20(%rbp)
movaps %xmm0, -0x30(%rbp)
movaps -0x20(%rbp), %xmm0
movaps -0x30(%rbp), %xmm1
pxor %xmm1, %xmm0
movaps %xmm0, -0x110(%rbp)
movaps -0x110(%rbp), %xmm0
movaps %xmm0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq -0xa8(%rbp), %rcx
xorq -0x8(%rcx), %rax
movq %rax, -0x90(%rbp)
movq -0xa0(%rbp), %rcx
movq -0x90(%rbp), %rax
movq %rcx, -0x78(%rbp)
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rax
crc32q -0x80(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZL10CombineCRCmmmmPKm:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_88], rdi
mov [rbp+var_90], rsi
mov [rbp+var_98], rdx
mov [rbp+var_A0], rcx
mov [rbp+var_A8], r8
mov rax, [rbp+var_88]
shl rax, 4
lea rcx, _ZL15clmul_constants; clmul_constants
movaps xmm0, xmmword ptr [rax+rcx-10h]
movaps [rbp+var_C0], xmm0
mov rax, [rbp+var_90]
mov [rbp+var_38], 0
mov [rbp+var_40], rax
movq xmm1, [rbp+var_38]
movq xmm0, [rbp+var_40]
punpcklqdq xmm0, xmm1
movaps [rbp+var_50], xmm0
movaps xmm0, [rbp+var_50]
movaps [rbp+var_D0], xmm0
movaps xmm0, [rbp+var_D0]
movaps xmm1, [rbp+var_C0]
pclmulqdq xmm0, xmm1, 0
movaps [rbp+var_E0], xmm0
mov rax, [rbp+var_98]
mov [rbp+var_58], 0
mov [rbp+var_60], rax
movq xmm1, [rbp+var_58]
movq xmm0, [rbp+var_60]
punpcklqdq xmm0, xmm1
movaps [rbp+var_70], xmm0
movaps xmm0, [rbp+var_70]
movaps [rbp+var_F0], xmm0
movaps xmm0, [rbp+var_F0]
movaps xmm1, [rbp+var_C0]
pclmulqdq xmm0, xmm1, 10h
movaps [rbp+var_100], xmm0
movaps xmm1, [rbp+var_E0]
movaps xmm0, [rbp+var_100]
movaps [rbp+var_20], xmm1
movaps [rbp+var_30], xmm0
movaps xmm0, [rbp+var_20]
movaps xmm1, [rbp+var_30]
pxor xmm0, xmm1
movaps [rbp+var_110], xmm0
movaps xmm0, [rbp+var_110]
movaps [rbp+var_10], xmm0
mov rax, qword ptr [rbp+var_10]
mov [rbp+var_90], rax
mov rax, [rbp+var_90]
mov rcx, [rbp+var_A8]
xor rax, [rcx-8]
mov [rbp+var_90], rax
mov rcx, [rbp+var_A0]
mov rax, [rbp+var_90]
mov [rbp+var_78], rcx
mov [rbp+var_80], rax
mov rax, [rbp+var_78]
crc32 rax, [rbp+var_80]
mov [rbp+var_A0], rax
mov rax, [rbp+var_A0]
add rsp, 90h
pop rbp
retn
| long long CombineCRC(
long long a1,
unsigned long long a2,
unsigned long long a3,
unsigned long long a4,
const unsigned long long *a5)
{
__m128i v10; // [rsp+20h] [rbp-F0h]
__m128i v11; // [rsp+30h] [rbp-E0h]
__int128 v12; // [rsp+50h] [rbp-C0h]
__m128i v13; // [rsp+B0h] [rbp-60h] BYREF
__m128i v14; // [rsp+C0h] [rbp-50h]
__m128i v15[3]; // [rsp+D0h] [rbp-40h] BYREF
__m128i v16; // [rsp+100h] [rbp-10h]
v12 = clmul_constants[a1 - 1];
v15[0] = (__m128i)a2;
v14 = _mm_unpacklo_epi64(_mm_loadl_epi64(v15), _mm_loadl_epi64((const __m128i *)&v15[0].m128i_u64[1]));
_XMM1 = v12;
__asm { pclmulqdq xmm0, xmm1, 0 }
v11 = _XMM0;
v13 = (__m128i)a3;
v10 = _mm_unpacklo_epi64(_mm_loadl_epi64(&v13), _mm_loadl_epi64((const __m128i *)&v13.m128i_u64[1]));
_XMM1 = v12;
__asm { pclmulqdq xmm0, xmm1, 10h }
v15[2] = v11;
v15[1] = _XMM0;
v16 = _mm_xor_si128(v11, _XMM0);
return _mm_crc32_u64(a4, *(a5 - 1) ^ v16.m128i_i64[0]);
}
| CombineCRC:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x88],RDI
MOV qword ptr [RBP + -0x90],RSI
MOV qword ptr [RBP + -0x98],RDX
MOV qword ptr [RBP + -0xa0],RCX
MOV qword ptr [RBP + -0xa8],R8
MOV RAX,qword ptr [RBP + -0x88]
SHL RAX,0x4
LEA RCX,[0x1dfe40]
MOVAPS XMM0,xmmword ptr [RAX + RCX*0x1 + -0x10]
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x38],0x0
MOV qword ptr [RBP + -0x40],RAX
MOVQ XMM1,qword ptr [RBP + -0x38]
MOVQ XMM0,qword ptr [RBP + -0x40]
PUNPCKLQDQ XMM0,XMM1
MOVAPS xmmword ptr [RBP + -0x50],XMM0
MOVAPS XMM0,xmmword ptr [RBP + -0x50]
MOVAPS xmmword ptr [RBP + -0xd0],XMM0
MOVAPS XMM0,xmmword ptr [RBP + -0xd0]
MOVAPS XMM1,xmmword ptr [RBP + -0xc0]
PCLMULLQLQDQ XMM0,XMM1
MOVAPS xmmword ptr [RBP + -0xe0],XMM0
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x58],0x0
MOV qword ptr [RBP + -0x60],RAX
MOVQ XMM1,qword ptr [RBP + -0x58]
MOVQ XMM0,qword ptr [RBP + -0x60]
PUNPCKLQDQ XMM0,XMM1
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOVAPS XMM0,xmmword ptr [RBP + -0x70]
MOVAPS xmmword ptr [RBP + -0xf0],XMM0
MOVAPS XMM0,xmmword ptr [RBP + -0xf0]
MOVAPS XMM1,xmmword ptr [RBP + -0xc0]
PCLMULLQHQDQ XMM0,XMM1
MOVAPS xmmword ptr [RBP + -0x100],XMM0
MOVAPS XMM1,xmmword ptr [RBP + -0xe0]
MOVAPS XMM0,xmmword ptr [RBP + -0x100]
MOVAPS xmmword ptr [RBP + -0x20],XMM1
MOVAPS xmmword ptr [RBP + -0x30],XMM0
MOVAPS XMM0,xmmword ptr [RBP + -0x20]
MOVAPS XMM1,xmmword ptr [RBP + -0x30]
PXOR XMM0,XMM1
MOVAPS xmmword ptr [RBP + -0x110],XMM0
MOVAPS XMM0,xmmword ptr [RBP + -0x110]
MOVAPS xmmword ptr [RBP + -0x10],XMM0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RBP + -0xa8]
XOR RAX,qword ptr [RCX + -0x8]
MOV qword ptr [RBP + -0x90],RAX
MOV RCX,qword ptr [RBP + -0xa0]
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x78],RCX
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x78]
CRC32 RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0xa0]
ADD RSP,0x90
POP RBP
RET
|
/* CombineCRC(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long const*) */
int8 CombineCRC(ulong param_1,ulong param_2,ulong param_3,ulong param_4,ulong *param_5)
{
uint uVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
int1 auVar5 [16];
int1 auVar6 [16];
int8 uVar7;
ulong uStack_108;
ulong uStack_e8;
auVar3._8_8_ = 0;
auVar3._0_8_ = param_2;
auVar4._8_8_ = 0;
auVar4._0_8_ = *(ulong *)(&UINT_001dfe30 + param_1 * 4);
auVar2 = (int1 [16])0x0;
for (uVar1 = 0; uVar1 < 0x40; uVar1 = uVar1 + 1) {
if ((auVar3 & (int1 [16])0x1 << uVar1) != (int1 [16])0x0) {
auVar2 = auVar2 ^ auVar4 << uVar1;
}
}
auVar5._8_8_ = 0;
auVar5._0_8_ = param_3;
auVar6._8_8_ = 0;
auVar6._0_8_ = *(ulong *)(&UNK_001dfe38 + param_1 * 0x10);
auVar3 = (int1 [16])0x0;
for (uVar1 = 0; uVar1 < 0x40; uVar1 = uVar1 + 1) {
if ((auVar5 & (int1 [16])0x1 << uVar1) != (int1 [16])0x0) {
auVar3 = auVar3 ^ auVar6 << uVar1;
}
}
uStack_e8 = auVar2._0_8_;
uStack_108 = auVar3._0_8_;
uVar7 = crc32(param_4,uStack_e8 ^ uStack_108 ^ param_5[-1]);
return uVar7;
}
|
|
1,061 | get_upgrade_info_file_name | eloqsql/client/mysql_upgrade.c | static int get_upgrade_info_file_name(char* name)
{
DYNAMIC_STRING ds_datadir;
DBUG_ENTER("get_upgrade_info_file_name");
if (init_dynamic_string(&ds_datadir, NULL, 32, 32))
die("Out of memory");
if (run_query("show variables like 'datadir'",
&ds_datadir, FALSE) ||
extract_variable_from_show(&ds_datadir, name))
{
print_error("Reading datadir from the MariaDB server failed. Got the "
"following error when executing the 'mysql' command line client",
&ds_datadir);
dynstr_free(&ds_datadir);
DBUG_RETURN(1); /* Query failed */
}
dynstr_free(&ds_datadir);
fn_format(name, "mysql_upgrade_info", name, "", MYF(0));
DBUG_PRINT("exit", ("name: %s", name));
DBUG_RETURN(0);
} | O0 | c | get_upgrade_info_file_name:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x20, %ecx
movq %rcx, %rdx
callq 0x39be0
cmpb $0x0, %al
je 0x2bde3
leaq 0xc0421(%rip), %rdi # 0xec1fd
movb $0x0, %al
callq 0x29c50
leaq 0xc11f3(%rip), %rdi # 0xecfdd
leaq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x2b3c0
cmpl $0x0, %eax
jne 0x2be0c
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2be70
cmpl $0x0, %eax
je 0x2be2e
leaq 0xc11e8(%rip), %rdi # 0xecffb
leaq -0x30(%rbp), %rsi
callq 0x2bf40
leaq -0x30(%rbp), %rdi
callq 0x3a3c0
movl $0x1, -0x4(%rbp)
jmp 0x2be60
leaq -0x30(%rbp), %rdi
callq 0x3a3c0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0xc122c(%rip), %rsi # 0xed072
leaq 0xc661b(%rip), %rcx # 0xf2468
xorl %r8d, %r8d
callq 0x2eb70
jmp 0x2be57
jmp 0x2be59
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| get_upgrade_info_file_name:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
lea rdi, [rbp+var_30]
xor eax, eax
mov esi, eax
mov ecx, 20h ; ' '
mov rdx, rcx
call init_dynamic_string
cmp al, 0
jz short loc_2BDE3
lea rdi, aOutOfMemory; "Out of memory"
mov al, 0
call die
loc_2BDE3:
lea rdi, aShowVariablesL_0; "show variables like 'datadir'"
lea rsi, [rbp+var_30]
xor edx, edx
call run_query
cmp eax, 0
jnz short loc_2BE0C
mov rsi, [rbp+var_10]
lea rdi, [rbp+var_30]
call extract_variable_from_show
cmp eax, 0
jz short loc_2BE2E
loc_2BE0C:
lea rdi, aReadingDatadir; "Reading datadir from the MariaDB server"...
lea rsi, [rbp+var_30]
call print_error
lea rdi, [rbp+var_30]
call dynstr_free
mov [rbp+var_4], 1
jmp short loc_2BE60
loc_2BE2E:
lea rdi, [rbp+var_30]
call dynstr_free
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_10]
lea rsi, aMysqlUpgradeIn; "mysql_upgrade_info"
lea rcx, asc_F2464+4; ""
xor r8d, r8d
call fn_format
jmp short $+2
loc_2BE57:
jmp short $+2
loc_2BE59:
mov [rbp+var_4], 0
loc_2BE60:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long get_upgrade_info_file_name(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9)
{
long long v9; // rdx
long long v10; // rcx
long long v11; // r8
long long v12; // r9
__m128 v13; // xmm4
__m128 v14; // xmm5
char v16[32]; // [rsp+0h] [rbp-30h] BYREF
long long v17; // [rsp+20h] [rbp-10h]
v17 = a1;
if ( (unsigned __int8)init_dynamic_string(v16, 0LL, 32LL, 32LL) )
die((long long)"Out of memory", 0LL, v9, v10, v11, v12, a2, a3, a4, a5, v13, v14, a8, a9, v16[0]);
if ( (unsigned int)run_query(
"show variables like 'datadir'",
(long long)v16,
0,
a2,
a3,
a4,
a5,
*(double *)v13.m128_u64,
*(double *)v14.m128_u64,
a8,
a9)
|| (unsigned int)extract_variable_from_show(v16, v17) )
{
print_error(
"Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client",
v16);
dynstr_free(v16);
return 1;
}
else
{
dynstr_free(v16);
fn_format(v17, "mysql_upgrade_info", v17, "", 0LL);
return 0;
}
}
| get_upgrade_info_file_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
LEA RDI,[RBP + -0x30]
XOR EAX,EAX
MOV ESI,EAX
MOV ECX,0x20
MOV RDX,RCX
CALL 0x00139be0
CMP AL,0x0
JZ 0x0012bde3
LEA RDI,[0x1ec1fd]
MOV AL,0x0
CALL 0x00129c50
LAB_0012bde3:
LEA RDI,[0x1ecfdd]
LEA RSI,[RBP + -0x30]
XOR EDX,EDX
CALL 0x0012b3c0
CMP EAX,0x0
JNZ 0x0012be0c
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[RBP + -0x30]
CALL 0x0012be70
CMP EAX,0x0
JZ 0x0012be2e
LAB_0012be0c:
LEA RDI,[0x1ecffb]
LEA RSI,[RBP + -0x30]
CALL 0x0012bf40
LEA RDI,[RBP + -0x30]
CALL 0x0013a3c0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0012be60
LAB_0012be2e:
LEA RDI,[RBP + -0x30]
CALL 0x0013a3c0
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
LEA RSI,[0x1ed072]
LEA RCX,[0x1f2468]
XOR R8D,R8D
CALL 0x0012eb70
JMP 0x0012be57
LAB_0012be57:
JMP 0x0012be59
LAB_0012be59:
MOV dword ptr [RBP + -0x4],0x0
LAB_0012be60:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 get_upgrade_info_file_name(int8 param_1)
{
char cVar1;
int iVar2;
int1 local_38 [32];
int8 local_18;
local_18 = param_1;
cVar1 = init_dynamic_string(local_38,0,0x20);
if (cVar1 != '\0') {
die("Out of memory");
}
iVar2 = run_query("show variables like \'datadir\'",local_38,0);
if ((iVar2 == 0) && (iVar2 = extract_variable_from_show(local_38,local_18), iVar2 == 0)) {
dynstr_free(local_38);
fn_format(local_18,"mysql_upgrade_info",local_18,&DAT_001f2468,0);
return 0;
}
print_error("Reading datadir from the MariaDB server failed. Got the following error when executing the \'mysql\' command line client"
,local_38);
dynstr_free(local_38);
return 1;
}
|
|
1,062 | minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
auto result = Value::object();
for (const auto& [key, value] : elements) {
if (!key) throw std::runtime_error("Dict key is null");
if (!value) throw std::runtime_error("Dict value is null");
result.set(key->evaluate(context), value->evaluate(context));
}
return result;
} | O2 | cpp | minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x68288
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6a5b8
leaq 0x10(%rsp), %rdi
callq 0x503de
movq 0x20(%r15), %r13
movq 0x28(%r15), %rbp
leaq 0x68(%rsp), %r15
leaq 0x18(%rsp), %r12
cmpq %rbp, %r13
je 0x6a395
movq (%r13), %rsi
testq %rsi, %rsi
je 0x6a3aa
cmpq $0x0, 0x10(%r13)
je 0x6a3c6
movq %r15, %rdi
movq %r14, %rdx
callq 0x635ba
movq 0x10(%r13), %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0x635ba
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6a472
movq %r12, %rdi
callq 0x6384a
movq %r15, %rdi
callq 0x6384a
addq $0x20, %r13
jmp 0x6a342
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r15
leaq 0x49d65(%rip), %rsi # 0xb4121
movq %rax, %rdi
callq 0x23310
jmp 0x6a3e0
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r15
leaq 0x49d5a(%rip), %rsi # 0xb4132
movq %rax, %rdi
callq 0x23310
movq 0x93c09(%rip), %rsi # 0xfdff0
movq 0x93b6a(%rip), %rdx # 0xfdf58
movq %r15, %rdi
callq 0x23f20
jmp 0x6a3f8
movq %rax, %r14
movq %r15, %rdi
callq 0x23690
jmp 0x6a428
movq %rax, %r14
jmp 0x6a417
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x6384a
leaq 0x68(%rsp), %rdi
callq 0x6384a
jmp 0x6a428
jmp 0x6a425
movq %rax, %r14
movq %rbx, %rdi
callq 0x6384a
movq %r14, %rdi
callq 0x23fb0
| _ZNK5minja8DictExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r12, [rsp+0E8h+var_E0]
mov rdi, r12
call _ZSt11make_sharedIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEEJEESt10shared_ptrIT_EDpOT0_; std::make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>()
mov rdi, rbx
mov rsi, r12
call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>> const&)
lea rdi, [rsp+0E8h+var_D8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov r13, [r15+20h]
mov rbp, [r15+28h]
lea r15, [rsp+0E8h+var_80]
lea r12, [rsp+0E8h+var_D0]
loc_6A342:
cmp r13, rbp
jz short loc_6A395
mov rsi, [r13+0]
test rsi, rsi
jz short loc_6A3AA
cmp qword ptr [r13+10h], 0
jz short loc_6A3C6
mov rdi, r15
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rsi, [r13+10h]
mov rdi, r12
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, rbx; this
mov rsi, r15; minja::Value *
mov rdx, r12; minja::Value *
call _ZN5minja5Value3setERKS0_S2_; minja::Value::set(minja::Value const&,minja::Value const&)
mov rdi, r12; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, r15; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
add r13, 20h ; ' '
jmp short loc_6A342
loc_6A395:
mov rax, rbx
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6A3AA:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aDictKeyIsNull; "Dict key is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_6A3E0
loc_6A3C6:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aDictValueIsNul; "Dict value is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_6A3E0:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short $+2
loc_6A3F8:
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_6A428
mov r14, rax
jmp short loc_6A417
mov r14, rax
lea rdi, [rsp+0E8h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_6A417:
lea rdi, [rsp+0E8h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_6A428
jmp short $+2
loc_6A425:
mov r14, rax
loc_6A428:
mov rdi, rbx; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, r14
call __Unwind_Resume
| minja::Value * minja::DictExpr::do_evaluate(minja::Value *this, long long a2)
{
void (****v2)(void); // r13
void (****v3)(void); // rbp
std::runtime_error *exception; // r15
_BYTE v6[8]; // [rsp+8h] [rbp-E0h] BYREF
long long v7; // [rsp+10h] [rbp-D8h] BYREF
_BYTE v8[80]; // [rsp+18h] [rbp-D0h] BYREF
_BYTE v9[128]; // [rsp+68h] [rbp-80h] BYREF
std::make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>((long long)v6);
minja::Value::Value(this, v6);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7);
v2 = *(void (*****)(void))(a2 + 32);
v3 = *(void (*****)(void))(a2 + 40);
while ( v2 != v3 )
{
if ( !*v2 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Dict key is null");
goto LABEL_9;
}
if ( !v2[2] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Dict value is null");
LABEL_9:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v9, *v2);
minja::Expression::evaluate((long long)v8, v2[2]);
minja::Value::set(this, (const minja::Value *)v9, (const minja::Value *)v8);
minja::Value::~Value((minja::Value *)v8);
minja::Value::~Value((minja::Value *)v9);
v2 += 4;
}
return this;
}
| do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00168288
MOV RDI,RBX
MOV RSI,R12
CALL 0x0016a5b8
LEA RDI,[RSP + 0x10]
CALL 0x001503de
MOV R13,qword ptr [R15 + 0x20]
MOV RBP,qword ptr [R15 + 0x28]
LEA R15,[RSP + 0x68]
LEA R12,[RSP + 0x18]
LAB_0016a342:
CMP R13,RBP
JZ 0x0016a395
MOV RSI,qword ptr [R13]
TEST RSI,RSI
JZ 0x0016a3aa
CMP qword ptr [R13 + 0x10],0x0
JZ 0x0016a3c6
LAB_0016a357:
MOV RDI,R15
MOV RDX,R14
CALL 0x001635ba
MOV RSI,qword ptr [R13 + 0x10]
LAB_0016a366:
MOV RDI,R12
MOV RDX,R14
CALL 0x001635ba
LAB_0016a371:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0016a472
LAB_0016a37f:
MOV RDI,R12
CALL 0x0016384a
MOV RDI,R15
CALL 0x0016384a
ADD R13,0x20
JMP 0x0016a342
LAB_0016a395:
MOV RAX,RBX
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016a3aa:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R15,RAX
LAB_0016a3b5:
LEA RSI,[0x1b4121]
MOV RDI,RAX
CALL 0x00123310
LAB_0016a3c4:
JMP 0x0016a3e0
LAB_0016a3c6:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R15,RAX
LAB_0016a3d1:
LEA RSI,[0x1b4132]
MOV RDI,RAX
CALL 0x00123310
LAB_0016a3e0:
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,R15
CALL 0x00123f20
|
/* minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
DictExpr * __thiscall minja::DictExpr::do_evaluate(DictExpr *this,shared_ptr *param_1)
{
int8 *puVar1;
runtime_error *this_00;
int8 *puVar2;
shared_ptr local_e0 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_d8 [8];
Expression local_d0 [80];
Expression local_80 [80];
std::
make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>>
();
Value::Value((Value *)this,local_e0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_d8);
puVar2 = *(int8 **)(param_1 + 0x20);
puVar1 = *(int8 **)(param_1 + 0x28);
while( true ) {
if (puVar2 == puVar1) {
return this;
}
if ((shared_ptr *)*puVar2 == (shared_ptr *)0x0) break;
if (puVar2[2] == 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016a3d1 to 0016a3df has its CatchHandler @ 0016a3f6 */
std::runtime_error::runtime_error(this_00,"Dict value is null");
goto LAB_0016a3e0;
}
/* try { // try from 0016a357 to 0016a361 has its CatchHandler @ 0016a425 */
Expression::evaluate(local_80,(shared_ptr *)*puVar2);
/* try { // try from 0016a366 to 0016a370 has its CatchHandler @ 0016a405 */
Expression::evaluate(local_d0,(shared_ptr *)puVar2[2]);
/* try { // try from 0016a371 to 0016a37e has its CatchHandler @ 0016a40a */
Value::set((Value *)this,(Value *)local_80,(Value *)local_d0);
Value::~Value((Value *)local_d0);
Value::~Value((Value *)local_80);
puVar2 = puVar2 + 4;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016a3b5 to 0016a3c3 has its CatchHandler @ 0016a3f8 */
std::runtime_error::runtime_error(this_00,"Dict key is null");
LAB_0016a3e0:
/* try { // try from 0016a3e0 to 0016a3f5 has its CatchHandler @ 0016a423 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
|
|
1,063 | read_row_extent_info | eloqsql/storage/maria/ma_blockrec.c | static my_bool read_row_extent_info(MARIA_HA *info, uchar *buff,
uint record_number)
{
MARIA_SHARE *share= info->s;
MARIA_EXTENT_CURSOR extent;
MARIA_RECORD_POS *tail_pos;
uchar *data, *end_of_data;
uint flag, row_extents, row_extents_size;
uint field_lengths __attribute__ ((unused));
uchar *extents, *end;
myf myflag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
DBUG_ENTER("read_row_extent_info");
if (!(data= get_record_position(share, buff,
record_number, &end_of_data)))
DBUG_RETURN(1); /* Wrong in record */
flag= (uint) (uchar) data[0];
/* Skip trans header */
data+= total_header_size[(flag & PRECALC_HEADER_BITMASK)];
row_extents= 0;
row_extents_size= 0;
if (flag & ROW_FLAG_EXTENTS)
{
/*
Record is split over many data pages.
Get number of extents and first extent
*/
get_key_length(row_extents, data);
row_extents_size= row_extents * ROW_EXTENT_SIZE;
if (info->cur_row.extents_buffer_length < row_extents_size &&
_ma_alloc_buffer(&info->cur_row.extents,
&info->cur_row.extents_buffer_length,
row_extents_size, myflag))
DBUG_RETURN(1);
memcpy(info->cur_row.extents, data, ROW_EXTENT_SIZE);
data+= ROW_EXTENT_SIZE;
init_extent(&extent, info->cur_row.extents, row_extents,
info->cur_row.tail_positions);
extent.first_extent= 1;
}
info->cur_row.extents_count= row_extents;
/*
field_lengths looks unused but get_key_length will
increment data, which is required as data it's used later.
*/
if (share->base.max_field_lengths)
get_key_length(field_lengths, data);
if (share->calc_checksum)
info->cur_row.checksum= (uint) (uchar) *data++;
if (row_extents > 1)
{
data+= share->base.null_bytes;
data+= share->base.pack_bytes;
data+= share->base.field_offsets * FIELD_OFFSET_SIZE;
/*
Read row extents (note that first extent was already read into
info->cur_row.extents above)
Lock tails with write lock as we will delete them later.
*/
extent.lock_for_tail_pages= PAGECACHE_LOCK_LEFT_WRITELOCKED;
if (read_long_data(info, info->cur_row.extents + ROW_EXTENT_SIZE,
row_extents_size - ROW_EXTENT_SIZE,
&extent, &data, &end_of_data))
DBUG_RETURN(1);
}
/* Update tail_positions with pointer to tails */
tail_pos= info->cur_row.tail_positions;
for (extents= info->cur_row.extents, end= extents + row_extents_size;
extents < end;
extents+= ROW_EXTENT_SIZE)
{
pgcache_page_no_t page= uint5korr(extents);
uint page_count= uint2korr(extents + ROW_EXTENT_PAGE_SIZE);
if (page_count & TAIL_BIT)
*(tail_pos++)= ma_recordpos(page, (page_count & ~ (TAIL_BIT |
START_EXTENT_BIT)));
}
*tail_pos= 0; /* End marker */
DBUG_RETURN(0);
} | O0 | c | read_row_extent_info:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movsbl 0x7d9(%rax), %edx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpl $0x0, %edx
cmovnel %ecx, %eax
orl $0x10, %eax
movl %eax, %eax
movq %rax, -0xa0(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
leaq -0x78(%rbp), %rcx
callq 0x58ce0
movq %rax, -0x70(%rbp)
cmpq $0x0, %rax
jne 0x5c0ce
jmp 0x5c0c5
movb $0x1, -0x1(%rbp)
jmp 0x5c433
movq -0x70(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
andl $0xf, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0xc1dbe7(%rip), %rax # 0xc79cd0
movzbl (%rax,%rcx), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movl $0x0, -0x80(%rbp)
movl $0x0, -0x84(%rbp)
movl -0x7c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x5c22a
movq -0x70(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0x5c142
movq -0x70(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x70(%rbp)
movzbl (%rax), %eax
movl %eax, -0x80(%rbp)
jmp 0x5c16f
movq -0x70(%rbp), %rax
movzbl 0x2(%rax), %eax
movzwl %ax, %eax
movq -0x70(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x80(%rbp)
movq -0x70(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x70(%rbp)
imull $0x7, -0x80(%rbp), %eax
movl %eax, -0x84(%rbp)
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rax
movl -0x84(%rbp), %ecx
cmpq %rcx, %rax
jae 0x5c1d7
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rsi
addq $0x80, %rsi
addq $0x98, %rsi
movl -0x84(%rbp), %eax
movl %eax, %edx
movq -0xa0(%rbp), %rcx
callq 0x8fd90
movsbl %al, %eax
cmpl $0x0, %eax
je 0x5c1d7
jmp 0x5c1ce
movb $0x1, -0x1(%rbp)
jmp 0x5c433
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movq -0x70(%rbp), %rcx
movl (%rcx), %edx
movl %edx, (%rax)
movw 0x4(%rcx), %dx
movw %dx, 0x4(%rax)
movb 0x6(%rcx), %cl
movb %cl, 0x6(%rax)
movq -0x70(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rsi
movl -0x80(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rcx
leaq -0x60(%rbp), %rdi
callq 0x58760
movb $0x1, -0x2c(%rbp)
movl -0x80(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x12c(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x3d4(%rax)
je 0x5c29e
movq -0x70(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0x5c26c
movq -0x70(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x70(%rbp)
movzbl (%rax), %eax
movl %eax, -0x88(%rbp)
jmp 0x5c29c
movq -0x70(%rbp), %rax
movzbl 0x2(%rax), %eax
movzwl %ax, %eax
movq -0x70(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x88(%rbp)
movq -0x70(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x70(%rbp)
jmp 0x5c29e
movq -0x28(%rbp), %rax
cmpq $0x0, 0x6a8(%rax)
je 0x5c2c8
movq -0x70(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x70(%rbp)
movzbl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xb0(%rax)
cmpl $0x1, -0x80(%rbp)
jbe 0x5c362
movq -0x28(%rbp), %rax
movl 0x3fc(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rax
movl 0x3f4(%rax), %ecx
movq -0x70(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rax
movl 0x400(%rax), %ecx
shll %ecx
movq -0x70(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movl $0x2, -0x3c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rsi
addq $0x7, %rsi
movl -0x84(%rbp), %eax
subl $0x7, %eax
movl %eax, %eax
movl %eax, %edx
leaq -0x60(%rbp), %rcx
leaq -0x70(%rbp), %r8
leaq -0x78(%rbp), %r9
callq 0x58810
cmpb $0x0, %al
je 0x5c360
jmp 0x5c357
movb $0x1, -0x1(%rbp)
jmp 0x5c433
jmp 0x5c362
movq -0x10(%rbp), %rax
movq 0xa8(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movl -0x84(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rax
cmpq -0x98(%rbp), %rax
jae 0x5c424
movq -0x90(%rbp), %rdi
callq 0x5a6b0
movq %rax, -0xa8(%rbp)
movq -0x90(%rbp), %rax
movzwl 0x5(%rax), %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
je 0x5c40b
movq -0xa8(%rbp), %rdi
movl -0xac(%rbp), %esi
andl $0xffff3fff, %esi # imm = 0xFFFF3FFF
callq 0x59aa0
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x68(%rbp)
movq %rcx, (%rax)
jmp 0x5c40d
movq -0x90(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x90(%rbp)
jmp 0x5c39a
movq -0x68(%rbp), %rax
movq $0x0, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0xb0, %rsp
popq %rbp
retq
nop
| read_row_extent_info:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
movsx edx, byte ptr [rax+7D9h]
xor eax, eax
mov ecx, 10000h
cmp edx, 0
cmovnz eax, ecx
or eax, 10h
mov eax, eax
mov [rbp+var_A0], rax
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
lea rcx, [rbp+var_78]
call get_record_position
mov [rbp+var_70], rax
cmp rax, 0
jnz short loc_5C0CE
jmp short $+2
loc_5C0C5:
mov [rbp+var_1], 1
jmp loc_5C433
loc_5C0CE:
mov rax, [rbp+var_70]
movzx eax, byte ptr [rax]
mov [rbp+var_7C], eax
mov eax, [rbp+var_7C]
and eax, 0Fh
mov eax, eax
mov ecx, eax
lea rax, total_header_size
movzx ecx, byte ptr [rax+rcx]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
mov [rbp+var_80], 0
mov [rbp+var_84], 0
mov eax, [rbp+var_7C]
and eax, 80h
cmp eax, 0
jz loc_5C22A
mov rax, [rbp+var_70]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_5C142
mov rax, [rbp+var_70]
mov rcx, rax
add rcx, 1
mov [rbp+var_70], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_80], eax
jmp short loc_5C16F
loc_5C142:
mov rax, [rbp+var_70]
movzx eax, byte ptr [rax+2]
movzx eax, ax
mov rcx, [rbp+var_70]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_80], eax
mov rax, [rbp+var_70]
add rax, 3
mov [rbp+var_70], rax
loc_5C16F:
imul eax, [rbp+var_80], 7
mov [rbp+var_84], eax
mov rax, [rbp+var_10]
mov rax, [rax+118h]
mov ecx, [rbp+var_84]
cmp rax, rcx
jnb short loc_5C1D7
mov rdi, [rbp+var_10]
add rdi, 80h
add rdi, 10h
mov rsi, [rbp+var_10]
add rsi, 80h
add rsi, 98h
mov eax, [rbp+var_84]
mov edx, eax
mov rcx, [rbp+var_A0]
call _ma_alloc_buffer
movsx eax, al
cmp eax, 0
jz short loc_5C1D7
jmp short $+2
loc_5C1CE:
mov [rbp+var_1], 1
jmp loc_5C433
loc_5C1D7:
mov rax, [rbp+var_10]
mov rax, [rax+90h]
mov rcx, [rbp+var_70]
mov edx, [rcx]
mov [rax], edx
mov dx, [rcx+4]
mov [rax+4], dx
mov cl, [rcx+6]
mov [rax+6], cl
mov rax, [rbp+var_70]
add rax, 7
mov [rbp+var_70], rax
mov rax, [rbp+var_10]
mov rsi, [rax+90h]
mov edx, [rbp+var_80]
mov rax, [rbp+var_10]
mov rcx, [rax+0A8h]
lea rdi, [rbp+var_60]
call init_extent
mov [rbp+var_2C], 1
loc_5C22A:
mov ecx, [rbp+var_80]
mov rax, [rbp+var_10]
mov [rax+12Ch], ecx
mov rax, [rbp+var_28]
cmp dword ptr [rax+3D4h], 0
jz short loc_5C29E
mov rax, [rbp+var_70]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_5C26C
mov rax, [rbp+var_70]
mov rcx, rax
add rcx, 1
mov [rbp+var_70], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_88], eax
jmp short loc_5C29C
loc_5C26C:
mov rax, [rbp+var_70]
movzx eax, byte ptr [rax+2]
movzx eax, ax
mov rcx, [rbp+var_70]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_88], eax
mov rax, [rbp+var_70]
add rax, 3
mov [rbp+var_70], rax
loc_5C29C:
jmp short $+2
loc_5C29E:
mov rax, [rbp+var_28]
cmp qword ptr [rax+6A8h], 0
jz short loc_5C2C8
mov rax, [rbp+var_70]
mov rcx, rax
add rcx, 1
mov [rbp+var_70], rcx
movzx ecx, byte ptr [rax]
mov rax, [rbp+var_10]
mov [rax+0B0h], ecx
loc_5C2C8:
cmp [rbp+var_80], 1
jbe loc_5C362
mov rax, [rbp+var_28]
mov ecx, [rax+3FCh]
mov rax, [rbp+var_70]
mov ecx, ecx
add rax, rcx
mov [rbp+var_70], rax
mov rax, [rbp+var_28]
mov ecx, [rax+3F4h]
mov rax, [rbp+var_70]
mov ecx, ecx
add rax, rcx
mov [rbp+var_70], rax
mov rax, [rbp+var_28]
mov ecx, [rax+400h]
shl ecx, 1
mov rax, [rbp+var_70]
mov ecx, ecx
add rax, rcx
mov [rbp+var_70], rax
mov [rbp+var_3C], 2
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax+90h]
add rsi, 7
mov eax, [rbp+var_84]
sub eax, 7
mov eax, eax
mov edx, eax
lea rcx, [rbp+var_60]
lea r8, [rbp+var_70]
lea r9, [rbp+var_78]
call read_long_data
cmp al, 0
jz short loc_5C360
jmp short $+2
loc_5C357:
mov [rbp+var_1], 1
jmp loc_5C433
loc_5C360:
jmp short $+2
loc_5C362:
mov rax, [rbp+var_10]
mov rax, [rax+0A8h]
mov [rbp+var_68], rax
mov rax, [rbp+var_10]
mov rax, [rax+90h]
mov [rbp+var_90], rax
mov rax, [rbp+var_90]
mov ecx, [rbp+var_84]
add rax, rcx
mov [rbp+var_98], rax
loc_5C39A:
mov rax, [rbp+var_90]
cmp rax, [rbp+var_98]
jnb short loc_5C424
mov rdi, [rbp+var_90]
call uint5korr_0
mov [rbp+var_A8], rax
mov rax, [rbp+var_90]
movzx eax, word ptr [rax+5]
mov [rbp+var_AC], eax
mov eax, [rbp+var_AC]
and eax, 8000h
cmp eax, 0
jz short loc_5C40B
mov rdi, [rbp+var_A8]
mov esi, [rbp+var_AC]
and esi, 0FFFF3FFFh
call ma_recordpos
mov rcx, rax
mov rax, [rbp+var_68]
mov rdx, rax
add rdx, 8
mov [rbp+var_68], rdx
mov [rax], rcx
loc_5C40B:
jmp short $+2
loc_5C40D:
mov rax, [rbp+var_90]
add rax, 7
mov [rbp+var_90], rax
jmp loc_5C39A
loc_5C424:
mov rax, [rbp+var_68]
mov qword ptr [rax], 0
mov [rbp+var_1], 0
loc_5C433:
mov al, [rbp+var_1]
add rsp, 0B0h
pop rbp
retn
| char read_row_extent_info(long long *a1, long long a2, unsigned int a3)
{
int v3; // eax
unsigned __int8 *v4; // rax
long long v5; // rax
unsigned __int8 *v6; // rcx
unsigned __int8 *v7; // rax
unsigned long long v8; // rcx
unsigned long long *v9; // rax
int v11; // [rsp+4h] [rbp-ACh]
unsigned long long v12; // [rsp+8h] [rbp-A8h]
long long v13; // [rsp+10h] [rbp-A0h]
unsigned long long v14; // [rsp+18h] [rbp-98h]
unsigned long long v15; // [rsp+20h] [rbp-90h]
unsigned int v16; // [rsp+2Ch] [rbp-84h]
unsigned int v17; // [rsp+30h] [rbp-80h]
unsigned __int8 v18; // [rsp+34h] [rbp-7Ch]
long long v19; // [rsp+38h] [rbp-78h] BYREF
unsigned __int8 *record_position; // [rsp+40h] [rbp-70h] BYREF
unsigned long long *v21; // [rsp+48h] [rbp-68h]
_BYTE v22[36]; // [rsp+50h] [rbp-60h] BYREF
int v23; // [rsp+74h] [rbp-3Ch]
char v24; // [rsp+84h] [rbp-2Ch]
long long v25; // [rsp+88h] [rbp-28h]
unsigned int v26; // [rsp+94h] [rbp-1Ch]
long long v27; // [rsp+98h] [rbp-18h]
long long *v28; // [rsp+A0h] [rbp-10h]
v28 = a1;
v27 = a2;
v26 = a3;
v25 = *a1;
v3 = 0;
if ( *(_BYTE *)(v25 + 2009) )
v3 = 0x10000;
v13 = v3 | 0x10u;
record_position = (unsigned __int8 *)get_record_position(v25, v27, v26, &v19);
if ( !record_position )
return 1;
v18 = *record_position;
record_position += (unsigned __int8)total_header_size[*record_position & 0xF];
v17 = 0;
v16 = 0;
if ( (v18 & 0x80) != 0 )
{
if ( *record_position == 255 )
{
v17 = _byteswap_ushort(*(_WORD *)(record_position + 1));
record_position += 3;
}
else
{
v4 = record_position++;
v17 = *v4;
}
v16 = 7 * v17;
if ( v28[35] < (unsigned long long)(7 * v17) && (unsigned __int8)ma_alloc_buffer(v28 + 18, v28 + 35, v16, v13) )
return 1;
v5 = v28[18];
v6 = record_position;
*(_DWORD *)v5 = *(_DWORD *)record_position;
*(_WORD *)(v5 + 4) = *((_WORD *)v6 + 2);
*(_BYTE *)(v5 + 6) = v6[6];
record_position += 7;
init_extent((long long)v22, v28[18], v17, v28[21]);
v24 = 1;
}
*((_DWORD *)v28 + 75) = v17;
if ( *(_DWORD *)(v25 + 980) )
{
if ( *record_position == 255 )
record_position += 3;
else
++record_position;
}
if ( *(_QWORD *)(v25 + 1704) )
{
v7 = record_position++;
*((_DWORD *)v28 + 44) = *v7;
}
if ( v17 > 1 )
{
record_position += *(unsigned int *)(v25 + 1020);
record_position += *(unsigned int *)(v25 + 1012);
record_position += (unsigned int)(2 * *(_DWORD *)(v25 + 1024));
v23 = 2;
if ( read_long_data((long long)v28, v28[18] + 7, v16 - 7, (long long)v22, &record_position, &v19) )
return 1;
}
v21 = (unsigned long long *)v28[21];
v15 = v28[18];
v14 = v16 + v15;
while ( v15 < v14 )
{
v12 = uint5korr_0((unsigned int *)v15);
v11 = *(unsigned __int16 *)(v15 + 5);
if ( (v11 & 0x8000) != 0 )
{
v8 = ma_recordpos(v12, v11 & 0xFFFF3FFF);
v9 = v21++;
*v9 = v8;
}
v15 += 7LL;
}
*v21 = 0LL;
return 0;
}
| read_row_extent_info:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EDX,byte ptr [RAX + 0x7d9]
XOR EAX,EAX
MOV ECX,0x10000
CMP EDX,0x0
CMOVNZ EAX,ECX
OR EAX,0x10
MOV EAX,EAX
MOV qword ptr [RBP + -0xa0],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
LEA RCX,[RBP + -0x78]
CALL 0x00158ce0
MOV qword ptr [RBP + -0x70],RAX
CMP RAX,0x0
JNZ 0x0015c0ce
JMP 0x0015c0c5
LAB_0015c0c5:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015c433
LAB_0015c0ce:
MOV RAX,qword ptr [RBP + -0x70]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x7c],EAX
MOV EAX,dword ptr [RBP + -0x7c]
AND EAX,0xf
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0xd79cd0]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x70]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV dword ptr [RBP + -0x80],0x0
MOV dword ptr [RBP + -0x84],0x0
MOV EAX,dword ptr [RBP + -0x7c]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0015c22a
MOV RAX,qword ptr [RBP + -0x70]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x0015c142
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x70],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x80],EAX
JMP 0x0015c16f
LAB_0015c142:
MOV RAX,qword ptr [RBP + -0x70]
MOVZX EAX,byte ptr [RAX + 0x2]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x70]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x80],EAX
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,0x3
MOV qword ptr [RBP + -0x70],RAX
LAB_0015c16f:
IMUL EAX,dword ptr [RBP + -0x80],0x7
MOV dword ptr [RBP + -0x84],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x118]
MOV ECX,dword ptr [RBP + -0x84]
CMP RAX,RCX
JNC 0x0015c1d7
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x80
ADD RDI,0x10
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x80
ADD RSI,0x98
MOV EAX,dword ptr [RBP + -0x84]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0xa0]
CALL 0x0018fd90
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0015c1d7
JMP 0x0015c1ce
LAB_0015c1ce:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015c433
LAB_0015c1d7:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x90]
MOV RCX,qword ptr [RBP + -0x70]
MOV EDX,dword ptr [RCX]
MOV dword ptr [RAX],EDX
MOV DX,word ptr [RCX + 0x4]
MOV word ptr [RAX + 0x4],DX
MOV CL,byte ptr [RCX + 0x6]
MOV byte ptr [RAX + 0x6],CL
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,0x7
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x90]
MOV EDX,dword ptr [RBP + -0x80]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0xa8]
LEA RDI,[RBP + -0x60]
CALL 0x00158760
MOV byte ptr [RBP + -0x2c],0x1
LAB_0015c22a:
MOV ECX,dword ptr [RBP + -0x80]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x12c],ECX
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x3d4],0x0
JZ 0x0015c29e
MOV RAX,qword ptr [RBP + -0x70]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x0015c26c
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x70],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x88],EAX
JMP 0x0015c29c
LAB_0015c26c:
MOV RAX,qword ptr [RBP + -0x70]
MOVZX EAX,byte ptr [RAX + 0x2]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x70]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x88],EAX
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,0x3
MOV qword ptr [RBP + -0x70],RAX
LAB_0015c29c:
JMP 0x0015c29e
LAB_0015c29e:
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x6a8],0x0
JZ 0x0015c2c8
MOV RAX,qword ptr [RBP + -0x70]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x70],RCX
MOVZX ECX,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xb0],ECX
LAB_0015c2c8:
CMP dword ptr [RBP + -0x80],0x1
JBE 0x0015c362
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x3fc]
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x3f4]
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x400]
SHL ECX,0x1
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV dword ptr [RBP + -0x3c],0x2
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x90]
ADD RSI,0x7
MOV EAX,dword ptr [RBP + -0x84]
SUB EAX,0x7
MOV EAX,EAX
MOV EDX,EAX
LEA RCX,[RBP + -0x60]
LEA R8,[RBP + -0x70]
LEA R9,[RBP + -0x78]
CALL 0x00158810
CMP AL,0x0
JZ 0x0015c360
JMP 0x0015c357
LAB_0015c357:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015c433
LAB_0015c360:
JMP 0x0015c362
LAB_0015c362:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xa8]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x90]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV ECX,dword ptr [RBP + -0x84]
ADD RAX,RCX
MOV qword ptr [RBP + -0x98],RAX
LAB_0015c39a:
MOV RAX,qword ptr [RBP + -0x90]
CMP RAX,qword ptr [RBP + -0x98]
JNC 0x0015c424
MOV RDI,qword ptr [RBP + -0x90]
CALL 0x0015a6b0
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0x90]
MOVZX EAX,word ptr [RAX + 0x5]
MOV dword ptr [RBP + -0xac],EAX
MOV EAX,dword ptr [RBP + -0xac]
AND EAX,0x8000
CMP EAX,0x0
JZ 0x0015c40b
MOV RDI,qword ptr [RBP + -0xa8]
MOV ESI,dword ptr [RBP + -0xac]
AND ESI,0xffff3fff
CALL 0x00159aa0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RBP + -0x68],RDX
MOV qword ptr [RAX],RCX
LAB_0015c40b:
JMP 0x0015c40d
LAB_0015c40d:
MOV RAX,qword ptr [RBP + -0x90]
ADD RAX,0x7
MOV qword ptr [RBP + -0x90],RAX
JMP 0x0015c39a
LAB_0015c424:
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX],0x0
MOV byte ptr [RBP + -0x1],0x0
LAB_0015c433:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0xb0
POP RBP
RET
|
int1 read_row_extent_info(long *param_1,int8 param_2,int4 param_3)
{
int4 *puVar1;
char cVar2;
uint uVar3;
byte *pbVar4;
ulong uVar5;
int8 uVar6;
ulong local_98;
uint local_8c;
uint local_88;
int1 local_80 [8];
byte *local_78;
int8 *local_70;
int1 local_68 [36];
int4 local_44;
int1 local_34;
long local_30;
int4 local_24;
int8 local_20;
long *local_18;
int1 local_9;
local_30 = *param_1;
uVar3 = 0;
if (*(char *)(local_30 + 0x7d9) != '\0') {
uVar3 = 0x10000;
}
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
pbVar4 = (byte *)get_record_position(local_30,param_2,param_3,local_80);
if (pbVar4 == (byte *)0x0) {
local_9 = 1;
}
else {
local_78 = pbVar4 + (int)(uint)(byte)total_header_size[*pbVar4 & 0xf];
local_88 = 0;
local_8c = 0;
if ((*pbVar4 & 0x80) != 0) {
if (*local_78 == 0xff) {
local_88 = (uint)CONCAT11(local_78[1],local_78[2]);
local_78 = local_78 + 3;
}
else {
local_88 = (uint)*local_78;
local_78 = local_78 + 1;
}
local_8c = local_88 * 7;
if (((ulong)local_18[0x23] < (ulong)local_8c) &&
(cVar2 = _ma_alloc_buffer(local_18 + 0x12,local_18 + 0x23,local_8c,uVar3 | 0x10),
cVar2 != '\0')) {
return 1;
}
puVar1 = (int4 *)local_18[0x12];
*puVar1 = *(int4 *)local_78;
*(int2 *)(puVar1 + 1) = *(int2 *)(local_78 + 4);
*(byte *)((long)puVar1 + 6) = local_78[6];
local_78 = local_78 + 7;
init_extent(local_68,local_18[0x12],local_88,local_18[0x15]);
local_34 = 1;
}
*(uint *)((long)local_18 + 300) = local_88;
if (*(int *)(local_30 + 0x3d4) != 0) {
if (*local_78 == 0xff) {
local_78 = local_78 + 3;
}
else {
local_78 = local_78 + 1;
}
}
if (*(long *)(local_30 + 0x6a8) != 0) {
*(uint *)(local_18 + 0x16) = (uint)*local_78;
local_78 = local_78 + 1;
}
if (1 < local_88) {
local_78 = local_78 +
(ulong)(uint)(*(int *)(local_30 + 0x400) << 1) +
(ulong)*(uint *)(local_30 + 0x3f4) + (ulong)*(uint *)(local_30 + 0x3fc);
local_44 = 2;
cVar2 = read_long_data(local_18,local_18[0x12] + 7,local_8c - 7,local_68,&local_78,local_80);
if (cVar2 != '\0') {
return 1;
}
}
local_70 = (int8 *)local_18[0x15];
local_98 = local_18[0x12];
uVar5 = local_98 + local_8c;
for (; local_98 < uVar5; local_98 = local_98 + 7) {
uVar6 = uint5korr(local_98);
if ((*(ushort *)(local_98 + 5) & 0x8000) != 0) {
uVar6 = ma_recordpos(uVar6,*(ushort *)(local_98 + 5) & 0x3fff);
*local_70 = uVar6;
local_70 = local_70 + 1;
}
}
*local_70 = 0;
local_9 = 0;
}
return local_9;
}
|
|
1,064 | ma_bitmap_reset_full_page_bits | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_bitmap_reset_full_page_bits(MARIA_HA *info,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page,
uint page_count)
{
ulonglong bitmap_page;
uint offset, bit_start, bit_count, tmp, byte_offset;
uchar *data;
DBUG_ENTER("_ma_bitmap_reset_full_page_bits");
DBUG_PRINT("enter", ("page: %lu page_count: %u", (ulong) page, page_count));
mysql_mutex_assert_owner(&info->s->bitmap.bitmap_lock);
bitmap_page= page - page % bitmap->pages_covered;
DBUG_ASSERT(page != bitmap_page);
if (bitmap_page != bitmap->page &&
_ma_change_bitmap_page(info, bitmap, bitmap_page))
DBUG_RETURN(1);
/* Find page number from start of bitmap */
offset= (uint) (page - bitmap->page - 1);
/* Clear bits from 'page * 3' -> '(page + page_count) * 3' */
bit_start= offset * 3;
bit_count= page_count * 3;
byte_offset= bit_start/8;
data= bitmap->map + byte_offset;
offset= bit_start & 7;
tmp= (255 << offset); /* Bits to keep */
if (bit_count + offset < 8)
{
/* Only clear bits between 'offset' and 'offset+bit_count-1' */
tmp^= (255 << (offset + bit_count));
}
*data&= ~tmp;
set_if_smaller(bitmap->full_head_size, byte_offset);
set_if_smaller(bitmap->full_tail_size, byte_offset);
if ((int) (bit_count-= (8 - offset)) > 0)
{
uint fill;
data++;
/*
-1 is here to avoid one 'if' statement and to let the following code
handle the last byte
*/
if ((fill= (bit_count - 1) / 8))
{
bzero(data, fill);
data+= fill;
}
bit_count-= fill * 8; /* Bits left to clear */
tmp= (1 << bit_count) - 1;
*data&= ~tmp;
}
set_if_smaller(info->s->state.first_bitmap_with_space, bitmap_page);
bitmap->changed= 1;
DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap););
DBUG_RETURN(0);
} | O3 | c | ma_bitmap_reset_full_page_bits:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r13d
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r8
xorl %r14d, %r14d
movq %rdx, %rax
xorl %edx, %edx
divq 0x138(%rsi)
movq %r12, %r15
subq %rdx, %r15
movq %r15, %rax
cmpq 0x10(%rsi), %r15
je 0x414ff
movq %r8, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r8, -0x30(%rbp)
callq 0x41065
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x415bd
movq 0x10(%rbx), %rax
movq -0x30(%rbp), %r8
notl %eax
addl %eax, %r12d
leal (%r12,%r12,2), %r12d
leal (%r13,%r13,2), %edx
movl %r12d, %eax
shrl $0x3, %eax
movq 0x8(%rbx), %r13
movl %r12d, %ecx
andl $0x7, %ecx
movl $0xff, %esi
movl $0xff, %edi
shll %cl, %edi
addl %edx, %ecx
shll %cl, %esi
cmpl $0x8, %ecx
cmovbl %esi, %r14d
xorl %edi, %r14d
notb %r14b
andb %r14b, (%r13,%rax)
cmpl %eax, 0x28(%rbx)
jbe 0x41547
movl %eax, 0x28(%rbx)
cmpl %eax, 0x2c(%rbx)
jbe 0x4154f
movl %eax, 0x2c(%rbx)
orl $-0x8, %r12d
addl %edx, %r12d
testl %r12d, %r12d
jle 0x415a4
addq %rax, %r13
incq %r13
leal -0x1(%r12), %r14d
cmpl $0x9, %r12d
jb 0x4158c
movl %r14d, %edx
shrl $0x3, %edx
movq %rdx, -0x38(%rbp)
movq %r13, %rdi
xorl %esi, %esi
movq %r8, -0x30(%rbp)
callq 0x292c0
movq -0x30(%rbp), %r8
addq -0x38(%rbp), %r13
andl $0xf8, %r14d
subl %r14d, %r12d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %r12d, %ecx
shll %cl, %eax
andb %al, (%r13)
movq (%r8), %rax
cmpq %r15, 0xd0(%rax)
jbe 0x415b7
movq %r15, 0xd0(%rax)
movb $0x1, 0x20(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_bitmap_reset_full_page_bits:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13d, ecx
mov r12, rdx
mov rbx, rsi
mov r8, rdi
xor r14d, r14d
mov rax, rdx
xor edx, edx
div qword ptr [rsi+138h]
mov r15, r12
sub r15, rdx
mov rax, r15
cmp r15, [rsi+10h]
jz short loc_414FF
mov rdi, r8
mov rsi, rbx
mov rdx, r15
mov [rbp+var_30], r8
call _ma_change_bitmap_page
mov ecx, eax
mov al, 1
test cl, cl
jnz loc_415BD
mov rax, [rbx+10h]
mov r8, [rbp+var_30]
loc_414FF:
not eax
add r12d, eax
lea r12d, [r12+r12*2]
lea edx, [r13+r13*2+0]
mov eax, r12d
shr eax, 3
mov r13, [rbx+8]
mov ecx, r12d
and ecx, 7
mov esi, 0FFh
mov edi, 0FFh
shl edi, cl
add ecx, edx
shl esi, cl
cmp ecx, 8
cmovb r14d, esi
xor r14d, edi
not r14b
and [r13+rax+0], r14b
cmp [rbx+28h], eax
jbe short loc_41547
mov [rbx+28h], eax
loc_41547:
cmp [rbx+2Ch], eax
jbe short loc_4154F
mov [rbx+2Ch], eax
loc_4154F:
or r12d, 0FFFFFFF8h
add r12d, edx
test r12d, r12d
jle short loc_415A4
add r13, rax
inc r13
lea r14d, [r12-1]
cmp r12d, 9
jb short loc_4158C
mov edx, r14d
shr edx, 3
mov [rbp+var_38], rdx
mov rdi, r13
xor esi, esi
mov [rbp+var_30], r8
call _memset
mov r8, [rbp+var_30]
add r13, [rbp+var_38]
loc_4158C:
and r14d, 0F8h
sub r12d, r14d
mov eax, 0FFFFFFFFh
mov ecx, r12d
shl eax, cl
and [r13+0], al
loc_415A4:
mov rax, [r8]
cmp [rax+0D0h], r15
jbe short loc_415B7
mov [rax+0D0h], r15
loc_415B7:
mov byte ptr [rbx+20h], 1
xor eax, eax
loc_415BD:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char ma_bitmap_reset_full_page_bits(long long *a1, long long a2, unsigned long long a3, long long a4)
{
int v4; // r13d
int v5; // r12d
long long *v6; // r8
char v7; // r14
unsigned long long v8; // r15
long long v9; // rax
char v10; // cl
char result; // al
unsigned int v12; // r12d
int v13; // edx
long long v14; // rax
long long v15; // r13
int v16; // ecx
int v17; // edi
unsigned int v18; // ecx
int v19; // r12d
_BYTE *v20; // r13
unsigned int v21; // r14d
long long *v22; // [rsp+10h] [rbp-30h]
v4 = a4;
v5 = a3;
v6 = a1;
v7 = 0;
v8 = a3 - a3 % *(_QWORD *)(a2 + 312);
LODWORD(v9) = a3 - a3 % *(_QWORD *)(a2 + 312);
if ( v8 != *(_QWORD *)(a2 + 16) )
{
v10 = ma_change_bitmap_page(a1, a2, a3 - a3 % *(_QWORD *)(a2 + 312), a4, (long long)a1);
result = 1;
if ( v10 )
return result;
v9 = *(_QWORD *)(a2 + 16);
v6 = a1;
}
v12 = 3 * (~(_DWORD)v9 + v5);
v13 = 3 * v4;
v14 = v12 >> 3;
v15 = *(_QWORD *)(a2 + 8);
v16 = v12 & 7;
v17 = 255 << v16;
v18 = v13 + v16;
if ( v18 < 8 )
v7 = 255 << v18;
*(_BYTE *)(v15 + v14) &= ~(v17 ^ v7);
if ( *(_DWORD *)(a2 + 40) > (unsigned int)v14 )
*(_DWORD *)(a2 + 40) = v14;
if ( *(_DWORD *)(a2 + 44) > (unsigned int)v14 )
*(_DWORD *)(a2 + 44) = v14;
v19 = v13 + (v12 | 0xFFFFFFF8);
if ( v19 > 0 )
{
v20 = (_BYTE *)(v14 + v15 + 1);
v21 = v19 - 1;
if ( (unsigned int)v19 >= 9 )
{
v22 = v6;
memset(v20, 0LL, v21 >> 3);
v6 = v22;
v20 += v21 >> 3;
}
*v20 &= -1 << (v19 - (v21 & 0xF8));
}
if ( *(_QWORD *)(*v6 + 208) > v8 )
*(_QWORD *)(*v6 + 208) = v8;
*(_BYTE *)(a2 + 32) = 1;
return 0;
}
| _ma_bitmap_reset_full_page_bits:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13D,ECX
MOV R12,RDX
MOV RBX,RSI
MOV R8,RDI
XOR R14D,R14D
MOV RAX,RDX
XOR EDX,EDX
DIV qword ptr [RSI + 0x138]
MOV R15,R12
SUB R15,RDX
MOV RAX,R15
CMP R15,qword ptr [RSI + 0x10]
JZ 0x001414ff
MOV RDI,R8
MOV RSI,RBX
MOV RDX,R15
MOV qword ptr [RBP + -0x30],R8
CALL 0x00141065
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x001415bd
MOV RAX,qword ptr [RBX + 0x10]
MOV R8,qword ptr [RBP + -0x30]
LAB_001414ff:
NOT EAX
ADD R12D,EAX
LEA R12D,[R12 + R12*0x2]
LEA EDX,[R13 + R13*0x2]
MOV EAX,R12D
SHR EAX,0x3
MOV R13,qword ptr [RBX + 0x8]
MOV ECX,R12D
AND ECX,0x7
MOV ESI,0xff
MOV EDI,0xff
SHL EDI,CL
ADD ECX,EDX
SHL ESI,CL
CMP ECX,0x8
CMOVC R14D,ESI
XOR R14D,EDI
NOT R14B
AND byte ptr [R13 + RAX*0x1],R14B
CMP dword ptr [RBX + 0x28],EAX
JBE 0x00141547
MOV dword ptr [RBX + 0x28],EAX
LAB_00141547:
CMP dword ptr [RBX + 0x2c],EAX
JBE 0x0014154f
MOV dword ptr [RBX + 0x2c],EAX
LAB_0014154f:
OR R12D,0xfffffff8
ADD R12D,EDX
TEST R12D,R12D
JLE 0x001415a4
ADD R13,RAX
INC R13
LEA R14D,[R12 + -0x1]
CMP R12D,0x9
JC 0x0014158c
MOV EDX,R14D
SHR EDX,0x3
MOV qword ptr [RBP + -0x38],RDX
MOV RDI,R13
XOR ESI,ESI
MOV qword ptr [RBP + -0x30],R8
CALL 0x001292c0
MOV R8,qword ptr [RBP + -0x30]
ADD R13,qword ptr [RBP + -0x38]
LAB_0014158c:
AND R14D,0xf8
SUB R12D,R14D
MOV EAX,0xffffffff
MOV ECX,R12D
SHL EAX,CL
AND byte ptr [R13],AL
LAB_001415a4:
MOV RAX,qword ptr [R8]
CMP qword ptr [RAX + 0xd0],R15
JBE 0x001415b7
MOV qword ptr [RAX + 0xd0],R15
LAB_001415b7:
MOV byte ptr [RBX + 0x20],0x1
XOR EAX,EAX
LAB_001415bd:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 _ma_bitmap_reset_full_page_bits(long *param_1,long param_2,ulong param_3,int param_4)
{
long lVar1;
ulong __n;
uint uVar2;
char cVar3;
uint uVar4;
uint uVar5;
byte *pbVar6;
byte bVar7;
ulong uVar8;
uVar8 = param_3 - param_3 % *(ulong *)(param_2 + 0x138);
uVar5 = (uint)uVar8;
if (uVar8 != *(ulong *)(param_2 + 0x10)) {
cVar3 = _ma_change_bitmap_page(param_1,param_2,uVar8);
if (cVar3 != '\0') {
return 1;
}
uVar5 = (uint)*(int8 *)(param_2 + 0x10);
}
uVar5 = ((int)param_3 + ~uVar5) * 3;
uVar2 = uVar5 >> 3;
lVar1 = *(long *)(param_2 + 8);
uVar4 = (uVar5 & 7) + param_4 * 3;
bVar7 = 0;
if (uVar4 < 8) {
bVar7 = (byte)(0xff << ((byte)uVar4 & 0x1f));
}
pbVar6 = (byte *)(lVar1 + (ulong)uVar2);
*pbVar6 = *pbVar6 & ~(bVar7 ^ (byte)(0xff << (sbyte)(uVar5 & 7)));
if (uVar2 < *(uint *)(param_2 + 0x28)) {
*(uint *)(param_2 + 0x28) = uVar2;
}
if (uVar2 < *(uint *)(param_2 + 0x2c)) {
*(uint *)(param_2 + 0x2c) = uVar2;
}
uVar5 = (uVar5 | 0xfffffff8) + param_4 * 3;
if (0 < (int)uVar5) {
pbVar6 = (byte *)(lVar1 + (ulong)uVar2 + 1);
if (8 < uVar5) {
__n = (ulong)(uVar5 - 1 >> 3);
memset(pbVar6,0,__n);
pbVar6 = pbVar6 + __n;
}
*pbVar6 = *pbVar6 & (byte)(-1 << ((char)uVar5 - ((byte)(uVar5 - 1) & 0xf8) & 0x1f));
}
if (uVar8 < *(ulong *)(*param_1 + 0xd0)) {
*(ulong *)(*param_1 + 0xd0) = uVar8;
}
*(int1 *)(param_2 + 0x20) = 1;
return 0;
}
|
|
1,065 | crc32_pclmul | eloqsql/mysys/crc32/crc32_x86.c | unsigned int crc32_pclmul(unsigned int crc32, const void *buf, size_t len)
{
return ~crcr32_calc_pclmulqdq(buf, (uint32_t)len, ~crc32, ðer_crc32_clmul);
} | O3 | c | crc32_pclmul:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
testl %ebx, %ebx
je 0x2fe09
notl %edi
movd %edi, %xmm2
cmpl $0x1f, %ebx
jbe 0x2fe23
movdqu (%rsi), %xmm1
pxor %xmm2, %xmm1
pushq $0x10
popq %rax
movl $0xccaa009e, %ecx # imm = 0xCCAA009E
movq %rcx, %xmm0
movdqa 0xaa43b(%rip), %xmm2 # 0xda150
movl %eax, %ecx
movdqu (%rsi,%rcx), %xmm3
movdqa %xmm1, %xmm4
pclmulqdq $0x1, %xmm0, %xmm4
pxor %xmm3, %xmm4
pclmulqdq $0x10, %xmm2, %xmm1
pxor %xmm4, %xmm1
leal 0x10(%rax), %ecx
addl $0x20, %eax
cmpl %ebx, %eax
movl %ecx, %eax
jbe 0x2fd15
cmpl %ebx, %ecx
jae 0x2fd9c
leal -0x10(%rbx), %eax
movdqu (%rsi,%rax), %xmm2
andl $0xf, %ebx
leaq 0xb244a(%rip), %rax # 0xe21a0
movdqu (%rbx,%rax), %xmm0
movdqa %xmm1, %xmm3
pshufb %xmm0, %xmm3
pxor 0xaa3f4(%rip), %xmm0 # 0xda160
pshufb %xmm0, %xmm1
pblendvb %xmm0, %xmm2, %xmm1
movl $0xccaa009e, %eax # imm = 0xCCAA009E
movq %rax, %xmm0
pclmulqdq $0x10, %xmm3, %xmm0
pxor %xmm1, %xmm0
pclmulqdq $0x10, 0xaa3bc(%rip), %xmm3 # 0xda150
pxor %xmm0, %xmm3
movdqa %xmm3, %xmm1
movl $0xccaa009e, %eax # imm = 0xCCAA009E
movq %rax, %xmm0
pclmulqdq $0x0, %xmm1, %xmm0
psrldq $0x8, %xmm1 # xmm1 = xmm1[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
pxor %xmm0, %xmm1
movdqa %xmm1, %xmm2
psllq $0x20, %xmm2
pclmulqdq $0x10, 0xaa3a8(%rip), %xmm2 # 0xda170
pxor %xmm1, %xmm2
pxor %xmm0, %xmm0
pblendw $0xfc, %xmm2, %xmm0 # xmm0 = xmm0[0,1],xmm2[2,3,4,5,6,7]
movabsq $0x1f7011640, %rax # imm = 0x1F7011640
movq %rax, %xmm1
pclmulqdq $0x0, %xmm0, %xmm1
pxor %xmm0, %xmm1
movq %xmm1, %xmm0 # xmm0 = xmm1[0],zero
pclmulqdq $0x10, 0xaa383(%rip), %xmm0 # 0xda180
pxor %xmm2, %xmm0
pextrd $0x2, %xmm0, %edi
notl %edi
movq %fs:0x28, %rax
cmpq -0x18(%rbp), %rax
jne 0x2fe3a
movl %edi, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x10, %ebx
je 0x2fe3f
jb 0x2fe4c
movdqu (%rsi), %xmm1
pxor %xmm2, %xmm1
pushq $0x10
popq %rcx
jmp 0x2fd40
callq 0x29270
movdqu (%rsi), %xmm1
pxor %xmm2, %xmm1
jmp 0x2fd9c
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %r14
movaps %xmm0, (%r14)
movl %ebx, %edx
andl $0xf, %edx
pushq $0x10
popq %rcx
movq %r14, %rdi
movdqa %xmm2, -0x40(%rbp)
callq 0x29420
movdqa -0x40(%rbp), %xmm1
pxor (%r14), %xmm1
cmpl $0x4, %ebx
jae 0x2fea0
pushq $0x8
popq %rax
subl %ebx, %eax
andl $0xf, %eax
leaq 0xb43c6(%rip), %rcx # 0xe4250
subq %rax, %rcx
movdqu 0x10(%rcx), %xmm0
movdqa %xmm1, %xmm2
pshufb %xmm0, %xmm2
jmp 0x2fdcc
pushq $0x10
popq %rax
subl %ebx, %eax
andl $0x1f, %eax
leaq 0xb43a1(%rip), %rcx # 0xe4250
subq %rax, %rcx
movdqu 0x10(%rcx), %xmm0
pshufb %xmm0, %xmm1
jmp 0x2fd9c
nop
| crc32_pclmul:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 30h
mov rbx, rdx
mov rax, fs:28h
mov [rbp+var_18], rax
test ebx, ebx
jz loc_2FE09
not edi
movd xmm2, edi
cmp ebx, 1Fh
jbe loc_2FE23
movdqu xmm1, xmmword ptr [rsi]
pxor xmm1, xmm2
push 10h
pop rax
mov ecx, 0CCAA009Eh
movq xmm0, rcx
movdqa xmm2, cs:xmmword_DA150
loc_2FD15:
mov ecx, eax
movdqu xmm3, xmmword ptr [rsi+rcx]
movdqa xmm4, xmm1
pclmulqdq xmm4, xmm0, 1
pxor xmm4, xmm3
pclmulqdq xmm1, xmm2, 10h
pxor xmm1, xmm4
lea ecx, [rax+10h]
add eax, 20h ; ' '
cmp eax, ebx
mov eax, ecx
jbe short loc_2FD15
loc_2FD40:
cmp ecx, ebx
jnb short loc_2FD9C
lea eax, [rbx-10h]
movdqu xmm2, xmmword ptr [rsi+rax]
and ebx, 0Fh
lea rax, crcr32_calc_pclmulqdq_shf_table
movdqu xmm0, xmmword ptr [rbx+rax]
movdqa xmm3, xmm1
pshufb xmm3, xmm0
pxor xmm0, cs:xmmword_DA160
pshufb xmm1, xmm0
pblendvb xmm1, xmm2
mov eax, 0CCAA009Eh
movq xmm0, rax
pclmulqdq xmm0, xmm3, 10h
pxor xmm0, xmm1
pclmulqdq xmm3, cs:xmmword_DA150, 10h
pxor xmm3, xmm0
movdqa xmm1, xmm3
loc_2FD9C:
mov eax, 0CCAA009Eh
movq xmm0, rax
pclmulqdq xmm0, xmm1, 0
psrldq xmm1, 8
pxor xmm1, xmm0
movdqa xmm2, xmm1
psllq xmm2, 20h ; ' '
pclmulqdq xmm2, cs:xmmword_DA170, 10h
pxor xmm2, xmm1
loc_2FDCC:
pxor xmm0, xmm0
pblendw xmm0, xmm2, 0FCh
mov rax, 1F7011640h
movq xmm1, rax
pclmulqdq xmm1, xmm0, 0
pxor xmm1, xmm0
movq xmm0, xmm1
pclmulqdq xmm0, cs:xmmword_DA180, 10h
pxor xmm0, xmm2
pextrd edi, xmm0, 2
not edi
loc_2FE09:
mov rax, fs:28h
cmp rax, [rbp+var_18]
jnz short loc_2FE3A
mov eax, edi
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_2FE23:
cmp ebx, 10h
jz short loc_2FE3F
jb short loc_2FE4C
movdqu xmm1, xmmword ptr [rsi]
pxor xmm1, xmm2
push 10h
pop rcx
jmp loc_2FD40
loc_2FE3A:
call ___stack_chk_fail
loc_2FE3F:
movdqu xmm1, xmmword ptr [rsi]
pxor xmm1, xmm2
jmp loc_2FD9C
loc_2FE4C:
xorps xmm0, xmm0
lea r14, [rbp+var_30]
movaps xmmword ptr [r14], xmm0
mov edx, ebx
and edx, 0Fh
push 10h
pop rcx
mov rdi, r14
movdqa [rbp+var_40], xmm2
call ___memcpy_chk
movdqa xmm1, [rbp+var_40]
pxor xmm1, xmmword ptr [r14]
cmp ebx, 4
jnb short loc_2FEA0
push 8
pop rax
sub eax, ebx
and eax, 0Fh
lea rcx, xmm_shift_left_crc_xmm_shift_tab
sub rcx, rax
movdqu xmm0, xmmword ptr [rcx+10h]
movdqa xmm2, xmm1
pshufb xmm2, xmm0
jmp loc_2FDCC
loc_2FEA0:
push 10h
pop rax
sub eax, ebx
and eax, 1Fh
lea rcx, xmm_shift_left_crc_xmm_shift_tab
sub rcx, rax
movdqu xmm0, xmmword ptr [rcx+10h]
pshufb xmm1, xmm0
jmp loc_2FD9C
| long long crc32_pclmul(unsigned int a1, const __m128i *a2, unsigned int a3)
{
__m128i v4; // xmm2
unsigned int v6; // eax
unsigned int v12; // ecx
bool v13; // cc
__m128i v14; // xmm0
__m128i v16; // xmm0
__m128i v17; // xmm1
__m128i v23; // xmm1
__m128i v26; // xmm2
__m128i v33; // xmm1
__m128i v34; // [rsp+0h] [rbp-40h] BYREF
__m128i v35; // [rsp+10h] [rbp-30h] BYREF
unsigned long long v36; // [rsp+28h] [rbp-18h]
v36 = __readfsqword(0x28u);
if ( a3 )
{
v4 = _mm_cvtsi32_si128(~a1);
if ( a3 > 0x1F )
{
_XMM1 = _mm_xor_si128(_mm_loadu_si128(a2), v4);
v6 = 1;
_XMM0 = 0xCCAA009EuLL;
_XMM2 = _mm_load_si128((const __m128i *)&xmmword_DA150);
do
{
_XMM4 = _XMM1;
__asm
{
pclmulqdq xmm4, xmm0, 1
pclmulqdq xmm1, xmm2, 10h
}
_XMM1 = _mm_xor_si128(_XMM1, _mm_xor_si128(_XMM4, _mm_loadu_si128(&a2[v6])));
v12 = v6 * 16 + 16;
v13 = v6 * 16 + 32 <= a3;
++v6;
}
while ( v13 );
LABEL_5:
if ( v12 < a3 )
{
v14 = _mm_loadu_si128((const __m128i *)((char *)&crcr32_calc_pclmulqdq_shf_table + (a3 & 0xF)));
_XMM3 = _mm_shuffle_epi8(_XMM1, v14);
v16 = _mm_xor_si128(v14, (__m128i)xmmword_DA160);
v17 = _mm_blendv_epi8(
_mm_shuffle_epi8(_XMM1, v16),
_mm_loadu_si128((const __m128i *)((char *)a2 + a3 - 16)),
v16);
_XMM0 = 0xCCAA009EuLL;
__asm
{
pclmulqdq xmm0, xmm3, 10h
pclmulqdq xmm3, cs:xmmword_DA150, 10h
}
_XMM1 = _mm_xor_si128(_XMM3, _mm_xor_si128(_XMM0, v17));
}
goto LABEL_7;
}
if ( a3 == 16 )
{
_XMM1 = _mm_xor_si128(_mm_loadu_si128(a2), v4);
}
else
{
if ( a3 >= 0x10 )
{
_XMM1 = _mm_xor_si128(_mm_loadu_si128(a2), v4);
v12 = 16;
goto LABEL_5;
}
v35 = 0LL;
v34 = v4;
__memcpy_chk(&v35, a2, a3 & 0xF, 16LL);
v33 = _mm_xor_si128(_mm_load_si128(&v34), v35);
if ( a3 < 4 )
{
v26 = _mm_shuffle_epi8(
v33,
_mm_loadu_si128((const __m128i *)((char *)&xmm_shift_left_crc_xmm_shift_tab
- ((8 - (_BYTE)a3) & 0xF)
+ 16)));
goto LABEL_8;
}
_XMM1 = _mm_shuffle_epi8(
v33,
_mm_loadu_si128((const __m128i *)((char *)&xmm_shift_left_crc_xmm_shift_tab
- ((16 - (_BYTE)a3) & 0x1F)
+ 16)));
}
LABEL_7:
_XMM0 = 0xCCAA009EuLL;
__asm { pclmulqdq xmm0, xmm1, 0 }
v23 = _mm_xor_si128(_mm_srli_si128(_XMM1, 8), _XMM0);
_XMM2 = _mm_slli_epi64(v23, 0x20u);
__asm { pclmulqdq xmm2, cs:xmmword_DA170, 10h }
v26 = _mm_xor_si128(_XMM2, v23);
LABEL_8:
_XMM0 = _mm_blend_epi16((__m128i)0LL, v26, 252);
_XMM1 = 0x1F7011640uLL;
__asm { pclmulqdq xmm1, xmm0, 0 }
_XMM0 = _mm_move_epi64(_mm_xor_si128(_XMM1, _XMM0));
__asm { pclmulqdq xmm0, cs:xmmword_DA180, 10h }
return (unsigned int)~_mm_extract_epi32(_mm_xor_si128(_XMM0, v26), 2);
}
return a1;
}
| crc32_pclmul:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
TEST EBX,EBX
JZ 0x0012fe09
NOT EDI
MOVD XMM2,EDI
CMP EBX,0x1f
JBE 0x0012fe23
MOVDQU XMM1,xmmword ptr [RSI]
PXOR XMM1,XMM2
PUSH 0x10
POP RAX
MOV ECX,0xccaa009e
MOVQ XMM0,RCX
MOVDQA XMM2,xmmword ptr [0x001da150]
LAB_0012fd15:
MOV ECX,EAX
MOVDQU XMM3,xmmword ptr [RSI + RCX*0x1]
MOVDQA XMM4,XMM1
PCLMULHQLQDQ XMM4,XMM0
PXOR XMM4,XMM3
PCLMULLQHQDQ XMM1,XMM2
PXOR XMM1,XMM4
LEA ECX,[RAX + 0x10]
ADD EAX,0x20
CMP EAX,EBX
MOV EAX,ECX
JBE 0x0012fd15
LAB_0012fd40:
CMP ECX,EBX
JNC 0x0012fd9c
LEA EAX,[RBX + -0x10]
MOVDQU XMM2,xmmword ptr [RSI + RAX*0x1]
AND EBX,0xf
LEA RAX,[0x1e21a0]
MOVDQU XMM0,xmmword ptr [RBX + RAX*0x1]
MOVDQA XMM3,XMM1
PSHUFB XMM3,XMM0
PXOR XMM0,xmmword ptr [0x001da160]
PSHUFB XMM1,XMM0
PBLENDVB XMM1,XMM2
MOV EAX,0xccaa009e
MOVQ XMM0,RAX
PCLMULLQHQDQ XMM0,XMM3
PXOR XMM0,XMM1
PCLMULQDQ XMM3,xmmword ptr [0x001da150],0x10
PXOR XMM3,XMM0
MOVDQA XMM1,XMM3
LAB_0012fd9c:
MOV EAX,0xccaa009e
MOVQ XMM0,RAX
PCLMULLQLQDQ XMM0,XMM1
PSRLDQ XMM1,0x8
PXOR XMM1,XMM0
MOVDQA XMM2,XMM1
PSLLQ XMM2,0x20
PCLMULQDQ XMM2,xmmword ptr [0x001da170],0x10
PXOR XMM2,XMM1
LAB_0012fdcc:
PXOR XMM0,XMM0
PBLENDW XMM0,XMM2,0xfc
MOV RAX,0x1f7011640
MOVQ XMM1,RAX
PCLMULLQLQDQ XMM1,XMM0
PXOR XMM1,XMM0
MOVQ XMM0,XMM1
PCLMULQDQ XMM0,xmmword ptr [0x001da180],0x10
PXOR XMM0,XMM2
PEXTRD EDI,XMM0,0x2
NOT EDI
LAB_0012fe09:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x0012fe3a
MOV EAX,EDI
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0012fe23:
CMP EBX,0x10
JZ 0x0012fe3f
JC 0x0012fe4c
MOVDQU XMM1,xmmword ptr [RSI]
PXOR XMM1,XMM2
PUSH 0x10
POP RCX
JMP 0x0012fd40
LAB_0012fe3a:
CALL 0x00129270
LAB_0012fe3f:
MOVDQU XMM1,xmmword ptr [RSI]
PXOR XMM1,XMM2
JMP 0x0012fd9c
LAB_0012fe4c:
XORPS XMM0,XMM0
LEA R14,[RBP + -0x30]
MOVAPS xmmword ptr [R14],XMM0
MOV EDX,EBX
AND EDX,0xf
PUSH 0x10
POP RCX
MOV RDI,R14
MOVDQA xmmword ptr [RBP + -0x40],XMM2
CALL 0x00129420
MOVDQA XMM1,xmmword ptr [RBP + -0x40]
PXOR XMM1,xmmword ptr [R14]
CMP EBX,0x4
JNC 0x0012fea0
PUSH 0x8
POP RAX
SUB EAX,EBX
AND EAX,0xf
LEA RCX,[0x1e4250]
SUB RCX,RAX
MOVDQU XMM0,xmmword ptr [RCX + 0x10]
MOVDQA XMM2,XMM1
PSHUFB XMM2,XMM0
JMP 0x0012fdcc
LAB_0012fea0:
PUSH 0x10
POP RAX
SUB EAX,EBX
AND EAX,0x1f
LEA RCX,[0x1e4250]
SUB RCX,RAX
MOVDQU XMM0,xmmword ptr [RCX + 0x10]
PSHUFB XMM1,XMM0
JMP 0x0012fd9c
|
/* WARNING: Removing unreachable block (ram,0x0012fdf3) */
/* WARNING: Removing unreachable block (ram,0x0012fdbe) */
/* WARNING: Removing unreachable block (ram,0x0012fd8a) */
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
uint crc32_pclmul(uint param_1,int1 (*param_2) [16],uint param_3)
{
int1 auVar1 [16];
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
int1 auVar5 [16];
int1 auVar6 [16];
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [16];
uint uVar10;
uint uVar11;
uint uVar12;
long in_FS_OFFSET;
int1 auVar13 [16];
int1 auVar14 [16];
int1 auVar15 [16];
int1 auVar16 [16];
int8 local_38;
int8 uStack_30;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
if (param_3 == 0) goto LAB_0012fe09;
auVar15 = ZEXT416(~param_1);
if (param_3 < 0x20) {
if (param_3 == 0x10) {
auVar15 = *param_2 ^ auVar15;
goto LAB_0012fd9c;
}
if (0xf < param_3) {
auVar15 = *param_2 ^ auVar15;
uVar12 = 0x10;
goto LAB_0012fd40;
}
local_38 = 0;
uStack_30 = 0;
__memcpy_chk(&local_38,param_2,param_3 & 0xf,0x10);
auVar13._8_8_ = uStack_30;
auVar13._0_8_ = local_38;
if (3 < param_3) {
auVar15 = pshufb(auVar15 ^ auVar13,
*(int1 (*) [16])
(xmm_shift_left_crc_xmm_shift_tab + (0x10 - (ulong)(0x10 - param_3 & 0x1f)))
);
goto LAB_0012fd9c;
}
auVar15 = pshufb(auVar15 ^ auVar13,
*(int1 (*) [16])
(xmm_shift_left_crc_xmm_shift_tab + (0x10 - (ulong)(8 - param_3 & 0xf))));
}
else {
auVar15 = *param_2 ^ auVar15;
uVar10 = 0x10;
do {
auVar14._8_8_ = 0;
auVar14._0_8_ = auVar15._8_8_;
auVar13 = (int1 [16])0x0;
for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) {
if ((auVar14 & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) {
auVar13 = auVar13 ^ ZEXT816(0xccaa009e) << uVar12;
}
}
auVar16._8_8_ = 0;
auVar16._0_8_ = auVar15._0_8_;
auVar3._8_8_ = 0;
auVar3._0_8_ = _UNK_001da158;
auVar15 = (int1 [16])0x0;
for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) {
if ((auVar16 & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) {
auVar15 = auVar15 ^ auVar3 << uVar12;
}
}
auVar15 = auVar15 ^ auVar13 ^ *(int1 (*) [16])(*param_2 + uVar10);
uVar12 = uVar10 + 0x10;
uVar11 = uVar10 + 0x20;
uVar10 = uVar12;
} while (uVar11 <= param_3);
LAB_0012fd40:
if (uVar12 < param_3) {
auVar16 = pshufb(auVar15,*(int1 (*) [16])
(crcr32_calc_pclmulqdq_shf_table + (param_3 & 0xf)));
auVar13 = *(int1 (*) [16])(crcr32_calc_pclmulqdq_shf_table + (param_3 & 0xf)) ^
_DAT_001da160;
auVar15 = pshufb(auVar15,auVar13);
auVar14 = pblendvb(auVar15,*(int1 (*) [16])(*param_2 + (param_3 - 0x10)),auVar13);
auVar15._8_8_ = 0;
auVar15._0_8_ = auVar16._8_8_;
auVar13 = (int1 [16])0x0;
for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) {
if ((ZEXT816(0xccaa009e) & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) {
auVar13 = auVar13 ^ auVar15 << uVar12;
}
}
auVar4._8_8_ = 0;
auVar4._0_8_ = auVar16._0_8_;
auVar7._8_8_ = 0;
auVar7._0_8_ = _UNK_001da158;
auVar15 = (int1 [16])0x0;
for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) {
if ((auVar4 & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) {
auVar15 = auVar15 ^ auVar7 << uVar12;
}
}
auVar15 = auVar15 ^ auVar13 ^ auVar14;
}
LAB_0012fd9c:
auVar1._8_8_ = 0;
auVar1._0_8_ = auVar15._0_8_;
auVar13 = (int1 [16])0x0;
for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) {
if ((ZEXT816(0xccaa009e) & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) {
auVar13 = auVar13 ^ auVar1 << uVar12;
}
}
auVar13 = auVar15 >> 0x40 ^ auVar13;
auVar5._8_8_ = 0;
auVar5._0_8_ = auVar13._0_8_ << 0x20;
auVar8._8_8_ = 0;
auVar8._0_8_ = _UNK_001da178;
auVar15 = (int1 [16])0x0;
for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) {
if ((auVar5 & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) {
auVar15 = auVar15 ^ auVar8 << uVar12;
}
}
auVar15 = auVar15 ^ auVar13;
}
auVar14 = pblendw((int1 [16])0x0,auVar15,0xfc);
auVar2._8_8_ = 0;
auVar2._0_8_ = auVar14._0_8_;
auVar13 = (int1 [16])0x0;
for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) {
if ((ZEXT816(0x1f7011640) & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) {
auVar13 = auVar13 ^ auVar2 << uVar12;
}
}
auVar6._8_8_ = 0;
auVar6._0_8_ = auVar13._0_8_ ^ auVar14._0_8_;
auVar9._8_8_ = 0;
auVar9._0_8_ = _UNK_001da188;
auVar13 = (int1 [16])0x0;
for (uVar12 = 0; uVar12 < 0x40; uVar12 = uVar12 + 1) {
if ((auVar6 & (int1 [16])0x1 << uVar12) != (int1 [16])0x0) {
auVar13 = auVar13 ^ auVar9 << uVar12;
}
}
param_1 = ~(auVar13._8_4_ ^ auVar15._8_4_);
LAB_0012fe09:
if (*(long *)(in_FS_OFFSET + 0x28) != local_20) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
}
|
|
1,066 | parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long) | monkey531[P]llama/common/chat.cpp | static common_chat_msg parse_prefixed_json_tool_call_array(const std::string& input, const std::string & prefix, size_t rstrip_prefix = 0) {
auto content_end = input.find(prefix);
size_t tc_start = std::string::npos;
common_chat_msg result;
result.role = "assistant";
const auto process_tool_calls = [&](const json & tool_calls) {
for (const auto & tool_call : tool_calls) {
const auto & arguments = tool_call["arguments"];
result.tool_calls.push_back({
tool_call["name"],
arguments.is_string() ? arguments.get<std::string>() : arguments.dump(),
tool_call.contains("id") ? tool_call["id"] : "",
});
}
};
if (content_end == std::string::npos) {
result.content = input;
} else {
tc_start = content_end + prefix.size() - rstrip_prefix;
result.content = input.substr(0, content_end);
auto tool_calls = json::parse(input.substr(tc_start));
process_tool_calls(tool_calls);
}
return result;
} | O2 | cpp | parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r13
movq %rsi, %rdi
movq %rdx, %rsi
xorl %edx, %edx
callq 0x25430
movq %rax, %r14
movq %r13, %rdi
callq 0xab7dc
leaq 0xc048(%rip), %rsi # 0xb558f
movq %r13, 0x8(%rsp)
movq %r13, %rdi
callq 0x253a0
cmpq $-0x1, %r14
je 0xa9749
movq 0x8(%r12), %r12
leaq 0x50(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x24ab0
subq %r15, %r14
addq %r12, %r14
movq 0x8(%rsp), %rax
leaq 0x20(%rax), %rdi
leaq 0x50(%rsp), %r15
movq %r15, %rsi
callq 0x24c70
movq %r15, %rdi
callq 0x25478
leaq 0x50(%rsp), %rdi
pushq $-0x1
popq %rcx
movq %rbx, %rsi
movq %r14, %rdx
callq 0x24ab0
xorps %xmm0, %xmm0
leaq 0xb0(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rcx
xorl %r8d, %r8d
callq 0x7d446
leaq 0xb0(%rsp), %rdi
callq 0x4a6e6
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x25478
leaq 0x20(%rsp), %r12
leaq 0x10(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x6a946
leaq 0xd8(%rsp), %rdi
movq %rbx, %rsi
callq 0x6abb2
movq 0x8(%rsp), %rax
leaq 0x40(%rax), %rbx
leaq 0x40(%rsp), %rbp
movq %r12, %rdi
leaq 0xd8(%rsp), %rsi
callq 0x6a3ea
testb %al, %al
je 0xa9738
movq %r12, %rdi
callq 0x6a5e4
movq %rax, %r13
movq %rax, %rdi
leaq 0xd2f7(%rip), %rsi # 0xb6944
callq 0x7da80
movq %rax, %r14
movq %r13, %rdi
leaq 0xd881(%rip), %rsi # 0xb6ee0
callq 0x7da80
movq %r15, %rdi
movq %rax, %rsi
callq 0x66848
cmpb $0x3, (%r14)
jne 0xa9684
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x66848
jmp 0xa969d
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
pushq $-0x1
popq %rdx
pushq $0x20
popq %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5fd62
movq %r13, %rdi
leaq 0xc347(%rip), %rsi # 0xb59ee
callq 0x7da5e
testb %al, %al
je 0xa96cc
movq %r13, %rdi
leaq 0xc334(%rip), %rsi # 0xb59ee
callq 0x7da80
movq %rbp, %rdi
movq %rax, %rsi
callq 0x44a72
jmp 0xa96db
movq %rbp, %rdi
leaq 0x86d9(%rip), %rsi # 0xb1daf
callq 0x8b10a
leaq 0x90(%rsp), %rdi
movq %rbp, %rsi
callq 0x66848
movq %rbx, %rdi
movq %r15, %rsi
callq 0xab860
movq %r15, %rdi
callq 0x8d0ce
movq %rbp, %rdi
callq 0x44ed6
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0xa9723
cmpl $0x1, %eax
jne 0xa972e
addq $0x30, 0x28(%rsp)
jmp 0xa9620
addq $0x10, 0x30(%rsp)
jmp 0xa9620
incq 0x38(%rsp)
jmp 0xa9620
leaq 0x10(%rsp), %rdi
callq 0x44ed6
movq 0x8(%rsp), %r14
jmp 0xa975a
movq 0x8(%rsp), %r14
leaq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x245a0
movq %r14, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa9791
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x4a6e6
leaq 0x50(%rsp), %rdi
callq 0x25478
jmp 0xa97e9
jmp 0xa9791
jmp 0xa9791
movq %rax, %rbx
jmp 0xa97e9
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x8d0ce
xorl %ebp, %ebp
jmp 0xa97ad
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x40(%rsp), %rdi
callq 0x44ed6
testb %bpl, %bpl
jne 0xa97c6
jmp 0xa97df
movq %rax, %rbx
jmp 0xa97d0
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x25478
leaq 0x50(%rsp), %rdi
callq 0x25478
jmp 0xa97df
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x44ed6
movq 0x8(%rsp), %rdi
callq 0x5efea
movq %rbx, %rdi
callq 0x251e0
| _ZL35parse_prefixed_json_tool_call_arrayRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_m:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r15, rcx
mov r12, rdx
mov rbx, rsi
mov r13, rdi
mov rdi, rsi
mov rsi, rdx
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m; std::string::find(std::string const&,ulong)
mov r14, rax
mov rdi, r13; this
call _ZN15common_chat_msgC2Ev; common_chat_msg::common_chat_msg(void)
lea rsi, aYouAreAHelpful+12h; "assistant"
mov [rsp+128h+var_120], r13
mov rdi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
cmp r14, 0FFFFFFFFFFFFFFFFh
jz loc_A9749
mov r12, [r12+8]
lea rdi, [rsp+128h+var_D8]
mov rsi, rbx
xor edx, edx
mov rcx, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
sub r14, r15
add r14, r12
mov rax, [rsp+128h+var_120]
lea rdi, [rax+20h]
lea r15, [rsp+128h+var_D8]
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+128h+var_D8]
push 0FFFFFFFFFFFFFFFFh
pop rcx
mov rsi, rbx
mov rdx, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
xorps xmm0, xmm0
lea rdx, [rsp+128h+var_78]
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
lea rdi, [rsp+128h+var_118]
lea rsi, [rsp+128h+var_D8]
push 1
pop rcx
xor r8d, r8d
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; 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>::parse<std::string>(std::string &&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool)
lea rdi, [rsp+128h+var_78]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea r15, [rsp+128h+var_D8]
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea r12, [rsp+128h+var_108]
lea rbx, [rsp+128h+var_118]
mov rdi, r12
mov rsi, rbx
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6cbeginEv; 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>::cbegin(void)
lea rdi, [rsp+128h+var_50]
mov rsi, rbx
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv; 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>::cend(void)
mov rax, [rsp+128h+var_120]
lea rbx, [rax+40h]
lea rbp, [rsp+128h+var_E8]
loc_A9620:
mov rdi, r12
lea rsi, [rsp+128h+var_50]
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jz loc_A9738
mov rdi, r12
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void)
mov r13, rax
mov rdi, rax
lea rsi, aKeywordArgumen+9; "arguments"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; 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>::operator[]<char const>(char const *)
mov r14, rax
mov rdi, r13
lea rsi, aNamespacedSetO+2Fh; "name"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; 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>::operator[]<char const>(char const *)
mov rdi, r15
mov rsi, rax
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
cmp byte ptr [r14], 3
jnz short loc_A9684
lea rdi, [rsp+128h+var_B8]
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
jmp short loc_A969D
loc_A9684:
lea rdi, [rsp+128h+var_B8]
mov rsi, r14
push 0FFFFFFFFFFFFFFFFh
pop rdx
push 20h ; ' '
pop rcx
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
loc_A969D:
mov rdi, r13
lea rsi, aToolCallId+0Ah; "id"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, al
jz short loc_A96CC
mov rdi, r13
lea rsi, aToolCallId+0Ah; "id"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; 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>::operator[]<char const>(char const *)
mov rdi, rbp
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_A96DB
loc_A96CC:
mov rdi, rbp
lea rsi, aErrorWhileHand_0+34h; ""
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
loc_A96DB:
lea rdi, [rsp+128h+var_98]
mov rsi, rbp
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
mov rdi, rbx
mov rsi, r15
call _ZNSt6vectorI16common_tool_callSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_tool_call>::emplace_back<common_tool_call>(common_tool_call &&)
mov rdi, r15; this
call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call()
mov rdi, rbp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rax, [rsp+128h+var_108]
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_A9723
cmp eax, 1
jnz short loc_A972E
add [rsp+128h+var_100], 30h ; '0'
jmp loc_A9620
loc_A9723:
add [rsp+128h+var_F8], 10h
jmp loc_A9620
loc_A972E:
inc [rsp+128h+var_F0]
jmp loc_A9620
loc_A9738:
lea rdi, [rsp+128h+var_118]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rsp+128h+var_120]
jmp short loc_A975A
loc_A9749:
mov r14, [rsp+128h+var_120]
lea rdi, [r14+20h]
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_A975A:
mov rax, r14
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_A9791
mov rbx, rax
lea rdi, [rsp+arg_A8]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_A97E9
jmp short loc_A9791
jmp short $+2
loc_A9791:
mov rbx, rax
jmp short loc_A97E9
mov rbx, rax
lea rdi, [rsp+arg_48]; this
call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call()
xor ebp, ebp
jmp short loc_A97AD
mov rbx, rax
mov bpl, 1
loc_A97AD:
lea rdi, [rsp+arg_38]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
test bpl, bpl
jnz short loc_A97C6
jmp short loc_A97DF
mov rbx, rax
jmp short loc_A97D0
mov rbx, rax
loc_A97C6:
lea rdi, [rsp+arg_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_A97D0:
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_A97DF
mov rbx, rax
loc_A97DF:
lea rdi, [rsp+arg_8]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_A97E9:
mov rdi, [rsp+arg_0]; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
mov rdi, rbx
call __Unwind_Resume
| common_chat_msg * parse_prefixed_json_tool_call_array(
common_chat_msg *this,
long long a2,
long long a3,
long long a4)
{
long long v6; // r14
long long v7; // r12
long long v8; // r13
_BYTE *v9; // r14
long long v10; // rax
unsigned __int8 *v11; // rax
int v12; // eax
common_chat_msg *v13; // r14
_BYTE v15[16]; // [rsp+10h] [rbp-118h] BYREF
unsigned __int8 *v16; // [rsp+20h] [rbp-108h] BYREF
long long v17; // [rsp+28h] [rbp-100h]
long long v18; // [rsp+30h] [rbp-F8h]
long long v19; // [rsp+38h] [rbp-F0h]
unsigned __int8 v20[16]; // [rsp+40h] [rbp-E8h] BYREF
long long v21[4]; // [rsp+50h] [rbp-D8h] BYREF
_BYTE v22[32]; // [rsp+70h] [rbp-B8h] BYREF
_BYTE v23[32]; // [rsp+90h] [rbp-98h] BYREF
_BYTE v24[40]; // [rsp+B0h] [rbp-78h] BYREF
_BYTE v25[80]; // [rsp+D8h] [rbp-50h] BYREF
v6 = std::string::find(a2, a3, 0LL);
common_chat_msg::common_chat_msg(this);
std::string::assign(this, "assistant");
if ( v6 == -1 )
{
v13 = this;
std::string::_M_assign((char *)this + 32, a2);
}
else
{
v7 = *(_QWORD *)(a3 + 8);
std::string::substr(v21, a2, 0LL, v6);
std::string::operator=((char *)this + 32, v21);
std::string::~string(v21);
std::string::substr(v21, a2, v7 + v6 - a4, -1LL);
memset(v24, 0, 32);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string>(
v15,
v21,
(long long)v24,
1u,
0);
std::_Function_base::~_Function_base((std::_Function_base *)v24);
std::string::~string(v21);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cbegin(
(long long)&v16,
(long long)v15);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cend(
(long long)v25,
(long long)v15);
while ( ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_((long long)&v16) )
{
v8 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v16);
v9 = (_BYTE *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
v8,
(long long)"arguments");
v10 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
v8,
(long long)"name");
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v21,
v10);
if ( *v9 == 3 )
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v22,
(long long)v9);
else
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
(long long)v22,
(long long)v9,
-1,
32,
0,
0);
if ( ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(v8) )
{
v11 = (unsigned __int8 *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>(
v8,
(long long)"id");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v20,
v11);
}
else
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_((char *)v20);
}
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)v23,
(long long)v20);
std::vector<common_tool_call>::emplace_back<common_tool_call>((char *)this + 64, v21);
common_tool_call::~common_tool_call((common_tool_call *)v21);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20);
v12 = *v16;
if ( v12 == 2 )
{
v18 += 16LL;
}
else if ( v12 == 1 )
{
v17 += 48LL;
}
else
{
++v19;
}
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v15);
return this;
}
return v13;
}
| parse_prefixed_json_tool_call_array:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R15,RCX
MOV R12,RDX
MOV RBX,RSI
MOV R13,RDI
MOV RDI,RSI
MOV RSI,RDX
XOR EDX,EDX
CALL 0x00125430
MOV R14,RAX
MOV RDI,R13
CALL 0x001ab7dc
LAB_001a9540:
LEA RSI,[0x1b558f]
MOV qword ptr [RSP + 0x8],R13
MOV RDI,R13
CALL 0x001253a0
CMP R14,-0x1
JZ 0x001a9749
MOV R12,qword ptr [R12 + 0x8]
LAB_001a9563:
LEA RDI,[RSP + 0x50]
MOV RSI,RBX
XOR EDX,EDX
MOV RCX,R14
CALL 0x00124ab0
SUB R14,R15
ADD R14,R12
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RAX + 0x20]
LEA R15,[RSP + 0x50]
MOV RSI,R15
CALL 0x00124c70
MOV RDI,R15
CALL 0x00125478
LAB_001a9599:
LEA RDI,[RSP + 0x50]
PUSH -0x1
POP RCX
MOV RSI,RBX
MOV RDX,R14
CALL 0x00124ab0
XORPS XMM0,XMM0
LEA RDX,[RSP + 0xb0]
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
LAB_001a95be:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x50]
PUSH 0x1
POP RCX
XOR R8D,R8D
CALL 0x0017d446
LEA RDI,[RSP + 0xb0]
CALL 0x0014a6e6
LEA R15,[RSP + 0x50]
MOV RDI,R15
CALL 0x00125478
LEA R12,[RSP + 0x20]
LEA RBX,[RSP + 0x10]
MOV RDI,R12
MOV RSI,RBX
CALL 0x0016a946
LEA RDI,[RSP + 0xd8]
MOV RSI,RBX
CALL 0x0016abb2
MOV RAX,qword ptr [RSP + 0x8]
LEA RBX,[RAX + 0x40]
LEA RBP,[RSP + 0x40]
LAB_001a9620:
MOV RDI,R12
LEA RSI,[RSP + 0xd8]
CALL 0x0016a3ea
TEST AL,AL
JZ 0x001a9738
MOV RDI,R12
CALL 0x0016a5e4
MOV R13,RAX
MOV RDI,RAX
LEA RSI,[0x1b6944]
CALL 0x0017da80
MOV R14,RAX
MOV RDI,R13
LEA RSI,[0x1b6ee0]
CALL 0x0017da80
MOV RDI,R15
MOV RSI,RAX
CALL 0x00166848
CMP byte ptr [R14],0x3
JNZ 0x001a9684
LAB_001a9675:
LEA RDI,[RSP + 0x70]
MOV RSI,R14
CALL 0x00166848
JMP 0x001a969d
LAB_001a9684:
LEA RDI,[RSP + 0x70]
MOV RSI,R14
PUSH -0x1
POP RDX
PUSH 0x20
POP RCX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0015fd62
LAB_001a969d:
MOV RDI,R13
LEA RSI,[0x1b59ee]
CALL 0x0017da5e
TEST AL,AL
JZ 0x001a96cc
MOV RDI,R13
LEA RSI,[0x1b59ee]
CALL 0x0017da80
MOV RDI,RBP
MOV RSI,RAX
CALL 0x00144a72
JMP 0x001a96db
LAB_001a96cc:
MOV RDI,RBP
LEA RSI,[0x1b1daf]
CALL 0x0018b10a
LAB_001a96db:
LEA RDI,[RSP + 0x90]
MOV RSI,RBP
CALL 0x00166848
LAB_001a96eb:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001ab860
MOV RDI,R15
CALL 0x0018d0ce
MOV RDI,RBP
CALL 0x00144ed6
MOV RAX,qword ptr [RSP + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x001a9723
CMP EAX,0x1
JNZ 0x001a972e
ADD qword ptr [RSP + 0x28],0x30
JMP 0x001a9620
LAB_001a9723:
ADD qword ptr [RSP + 0x30],0x10
JMP 0x001a9620
LAB_001a972e:
INC qword ptr [RSP + 0x38]
JMP 0x001a9620
LAB_001a9738:
LEA RDI,[RSP + 0x10]
CALL 0x00144ed6
MOV R14,qword ptr [RSP + 0x8]
JMP 0x001a975a
LAB_001a9749:
MOV R14,qword ptr [RSP + 0x8]
LEA RDI,[R14 + 0x20]
LAB_001a9752:
MOV RSI,RBX
CALL 0x001245a0
LAB_001a975a:
MOV RAX,R14
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* parse_prefixed_json_tool_call_array(std::__cxx11::string const&, std::__cxx11::string const&,
unsigned long) */
string * parse_prefixed_json_tool_call_array(string *param_1,string *param_2,ulong param_3)
{
char cVar1;
long lVar2;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this;
char *pcVar3;
basic_json *pbVar4;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_118 [16];
char *local_108;
long local_100;
long local_f8;
long local_f0;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_e8 [16];
string local_d8 [32];
int1 local_b8 [32];
int1 local_98 [32];
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 uStack_60;
int1 local_50 [32];
lVar2 = std::__cxx11::string::find(param_2,param_3);
common_chat_msg::common_chat_msg((common_chat_msg *)param_1);
/* try { // try from 001a9540 to 001a9553 has its CatchHandler @ 001a9791 */
std::__cxx11::string::assign((char *)param_1);
if (lVar2 == -1) {
/* try { // try from 001a9752 to 001a9759 has its CatchHandler @ 001a976f */
std::__cxx11::string::_M_assign(param_1 + 0x20);
}
else {
/* try { // try from 001a9563 to 001a9574 has its CatchHandler @ 001a978f */
std::__cxx11::string::substr((ulong)local_d8,(ulong)param_2);
std::__cxx11::string::operator=(param_1 + 0x20,local_d8);
std::__cxx11::string::~string(local_d8);
/* try { // try from 001a9599 to 001a95ab has its CatchHandler @ 001a978d */
std::__cxx11::string::substr((ulong)local_d8,(ulong)param_2);
local_68 = 0;
uStack_60 = 0;
local_78 = 0;
uStack_70 = 0;
/* try { // try from 001a95be to 001a95d2 has its CatchHandler @ 001a9771 */
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>
::parse<std::__cxx11::string>(local_118,local_d8,&local_78,1,0);
std::_Function_base::~_Function_base((_Function_base *)&local_78);
std::__cxx11::string::~string(local_d8);
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>
::cbegin();
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>
::cend();
while( true ) {
/* try { // try from 001a9620 to 001a966e has its CatchHandler @ 001a97dc */
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_108,local_50);
if (cVar1 == '\0') break;
this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_108);
pcVar3 = nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[]<char_const>(this,"arguments");
pbVar4 = nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[]<char_const>(this,"name");
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_d8,pbVar4);
if (*pcVar3 == '\x03') {
/* try { // try from 001a9675 to 001a969c has its CatchHandler @ 001a97be */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_b8,pcVar3);
}
else {
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>
::dump(local_b8,pcVar3,0xffffffffffffffff,0x20,0,0);
}
/* try { // try from 001a969d to 001a96da has its CatchHandler @ 001a97c3 */
cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(this,"id");
if (cVar1 == '\0') {
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
(local_e8,"");
}
else {
pbVar4 = nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[]<char_const>(this,"id");
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_e8,pbVar4);
}
/* try { // try from 001a96db to 001a96ea has its CatchHandler @ 001a97a7 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(local_98,local_e8);
/* try { // try from 001a96eb to 001a96f5 has its CatchHandler @ 001a9796 */
std::vector<common_tool_call,std::allocator<common_tool_call>>::emplace_back<common_tool_call>
((vector<common_tool_call,std::allocator<common_tool_call>> *)(param_1 + 0x40),
(common_tool_call *)local_d8);
common_tool_call::~common_tool_call((common_tool_call *)local_d8);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_e8);
if (*local_108 == '\x02') {
local_f8 = local_f8 + 0x10;
}
else if (*local_108 == '\x01') {
local_100 = local_100 + 0x30;
}
else {
local_f0 = local_f0 + 1;
}
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_118);
}
return param_1;
}
|
|
1,067 | link_block | eloqsql/storage/maria/ma_pagecache.c | static void link_block(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block,
my_bool hot, my_bool at_end)
{
PAGECACHE_BLOCK_LINK *ins;
PAGECACHE_BLOCK_LINK **ptr_ins;
DBUG_ENTER("link_block");
PCBLOCK_INFO(block);
KEYCACHE_DBUG_ASSERT(! (block->hash_link && block->hash_link->requests));
if (!hot && pagecache->waiting_for_block.last_thread)
{
/* Signal that in the LRU warm sub-chain an available block has appeared */
struct st_my_thread_var *last_thread=
pagecache->waiting_for_block.last_thread;
struct st_my_thread_var *first_thread= last_thread->next;
struct st_my_thread_var *next_thread= first_thread;
PAGECACHE_HASH_LINK *hash_link=
(PAGECACHE_HASH_LINK *) first_thread->keycache_link;
struct st_my_thread_var *thread;
DBUG_ASSERT(block->requests + block->wlocks + block->rlocks +
block->pins == 0);
DBUG_ASSERT(block->next_used == NULL);
do
{
thread= next_thread;
next_thread= thread->next;
/*
We notify about the event all threads that ask
for the same page as the first thread in the queue
*/
if ((PAGECACHE_HASH_LINK *) thread->keycache_link == hash_link)
{
DBUG_PRINT("signal", ("thread: %s %ld", thread->name,
(ulong) thread->id));
pagecache_pthread_cond_signal(&thread->suspend);
wqueue_unlink_from_queue(&pagecache->waiting_for_block, thread);
block->requests++;
}
}
while (thread != last_thread);
DBUG_PRINT("hash", ("hash_link (link block): %p, hash_link: %p -> %p",
hash_link, hash_link->block, block));
hash_link->block= block;
/* Ensure that no other thread tries to use this block */
block->status|= PCBLOCK_REASSIGNED;
DBUG_PRINT("signal", ("after signal"));
#if defined(PAGECACHE_DEBUG)
KEYCACHE_DBUG_PRINT("link_block",
("linked,unlinked block: %u status: %x #requests: %u #available: %u",
PCBLOCK_NUMBER(pagecache, block), block->status,
block->requests, pagecache->blocks_available));
#endif
DBUG_VOID_RETURN;
}
ptr_ins= hot ? &pagecache->used_ins : &pagecache->used_last;
ins= *ptr_ins;
if (ins)
{
ins->next_used->prev_used= &block->next_used;
block->next_used= ins->next_used;
block->prev_used= &ins->next_used;
ins->next_used= block;
if (at_end)
*ptr_ins= block;
}
else
{
/* The LRU chain is empty */
pagecache->used_last= pagecache->used_ins= block->next_used= block;
block->prev_used= &block->next_used;
}
KEYCACHE_THREAD_TRACE("link_block");
#if defined(PAGECACHE_DEBUG)
pagecache->blocks_available++;
KEYCACHE_DBUG_PRINT("link_block",
("linked block: %u:%1u status: %x #requests: %u #available: %u",
PCBLOCK_NUMBER(pagecache, block), at_end, block->status,
block->requests, pagecache->blocks_available));
KEYCACHE_DBUG_ASSERT(pagecache->blocks_available <=
pagecache->blocks_used);
#endif
DBUG_VOID_RETURN;
} | O3 | c | link_block:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
testb %dl, %dl
je 0x3512d
leaq 0xc0(%rdi), %r9
leaq 0xb8(%rdi), %r10
xorl %r8d, %r8d
testb %dl, %dl
setne %r8b
movq %r9, %rax
cmoveq %r10, %rax
movq 0xb8(%rdi,%r8,8), %rdx
testq %rdx, %rdx
je 0x351a1
movq (%rdx), %rdi
movq %r14, 0x8(%rdi)
movq (%rdx), %rdi
movq %rdi, (%r14)
movq %rdx, 0x8(%r14)
movq %r14, (%rdx)
testb %cl, %cl
je 0x351b9
movq %r14, (%rax)
jmp 0x351b9
movq 0x120(%rdi), %r12
testq %r12, %r12
je 0x350da
addq $0x120, %rdi # imm = 0x120
movq %rdi, -0x30(%rbp)
movq 0x88(%r12), %r15
movq 0xa8(%r15), %r13
movq 0x88(%r15), %rbx
cmpq %r13, 0xa8(%r15)
jne 0x35185
movq 0x38(%r15), %rdi
testq %rdi, %rdi
jne 0x3518f
leaq 0x8(%r15), %rdi
callq 0x295c0
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0xa6700
incl 0x60(%r14)
cmpq %r12, %r15
movq %rbx, %r15
jne 0x35153
jmp 0x351b0
leaq 0x350e7a(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x3516c
movq %r14, (%r14)
movq %r14, (%r9)
movq %r14, (%r10)
movq %r14, 0x8(%r14)
jmp 0x351b9
movq %r14, 0x10(%r13)
orb $0x8, 0x74(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| link_block:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
test dl, dl
jz short loc_3512D
loc_350DA:
lea r9, [rdi+0C0h]
lea r10, [rdi+0B8h]
xor r8d, r8d
test dl, dl
setnz r8b
mov rax, r9
cmovz rax, r10
mov rdx, [rdi+r8*8+0B8h]
test rdx, rdx
jz loc_351A1
mov rdi, [rdx]
mov [rdi+8], r14
mov rdi, [rdx]
mov [r14], rdi
mov [r14+8], rdx
mov [rdx], r14
test cl, cl
jz loc_351B9
mov [rax], r14
jmp loc_351B9
loc_3512D:
mov r12, [rdi+120h]
test r12, r12
jz short loc_350DA
add rdi, 120h
mov [rbp+var_30], rdi
mov r15, [r12+88h]
mov r13, [r15+0A8h]
loc_35153:
mov rbx, [r15+88h]
cmp [r15+0A8h], r13
jnz short loc_35185
mov rdi, [r15+38h]
test rdi, rdi
jnz short loc_3518F
loc_3516C:
lea rdi, [r15+8]
call _pthread_cond_signal
mov rdi, [rbp+var_30]
mov rsi, r15
call wqueue_unlink_from_queue
inc dword ptr [r14+60h]
loc_35185:
cmp r15, r12
mov r15, rbx
jnz short loc_35153
jmp short loc_351B0
loc_3518F:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_3516C
loc_351A1:
mov [r14], r14
mov [r9], r14
mov [r10], r14
mov [r14+8], r14
jmp short loc_351B9
loc_351B0:
mov [r13+10h], r14
or byte ptr [r14+74h], 8
loc_351B9:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * link_block(_QWORD *a1, long long a2, char a3, char a4)
{
_QWORD *result; // rax
long long v5; // rdx
_QWORD *v6; // r12
_QWORD *v7; // r15
long long v8; // r13
_QWORD *v9; // rbx
bool v10; // zf
if ( a3 || (v6 = (_QWORD *)a1[36]) == 0LL )
{
result = a1 + 24;
if ( !a3 )
result = a1 + 23;
v5 = a1[(a3 != 0) + 23];
if ( v5 )
{
*(_QWORD *)(*(_QWORD *)v5 + 8LL) = a2;
*(_QWORD *)a2 = *(_QWORD *)v5;
*(_QWORD *)(a2 + 8) = v5;
*(_QWORD *)v5 = a2;
if ( a4 )
*result = a2;
}
else
{
*(_QWORD *)a2 = a2;
a1[24] = a2;
a1[23] = a2;
*(_QWORD *)(a2 + 8) = a2;
}
}
else
{
v7 = (_QWORD *)v6[17];
v8 = v7[21];
do
{
v9 = (_QWORD *)v7[17];
if ( v7[21] == v8 )
{
if ( v7[7] )
PSI_server[46]();
pthread_cond_signal(v7 + 1);
result = (_QWORD *)wqueue_unlink_from_queue(a1 + 36, v7);
++*(_DWORD *)(a2 + 96);
}
v10 = v7 == v6;
v7 = v9;
}
while ( !v10 );
*(_QWORD *)(v8 + 16) = a2;
*(_BYTE *)(a2 + 116) |= 8u;
}
return result;
}
| link_block:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
TEST DL,DL
JZ 0x0013512d
LAB_001350da:
LEA R9,[RDI + 0xc0]
LEA R10,[RDI + 0xb8]
XOR R8D,R8D
TEST DL,DL
SETNZ R8B
MOV RAX,R9
CMOVZ RAX,R10
MOV RDX,qword ptr [RDI + R8*0x8 + 0xb8]
TEST RDX,RDX
JZ 0x001351a1
MOV RDI,qword ptr [RDX]
MOV qword ptr [RDI + 0x8],R14
MOV RDI,qword ptr [RDX]
MOV qword ptr [R14],RDI
MOV qword ptr [R14 + 0x8],RDX
MOV qword ptr [RDX],R14
TEST CL,CL
JZ 0x001351b9
MOV qword ptr [RAX],R14
JMP 0x001351b9
LAB_0013512d:
MOV R12,qword ptr [RDI + 0x120]
TEST R12,R12
JZ 0x001350da
ADD RDI,0x120
MOV qword ptr [RBP + -0x30],RDI
MOV R15,qword ptr [R12 + 0x88]
MOV R13,qword ptr [R15 + 0xa8]
LAB_00135153:
MOV RBX,qword ptr [R15 + 0x88]
CMP qword ptr [R15 + 0xa8],R13
JNZ 0x00135185
MOV RDI,qword ptr [R15 + 0x38]
TEST RDI,RDI
JNZ 0x0013518f
LAB_0013516c:
LEA RDI,[R15 + 0x8]
CALL 0x001295c0
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R15
CALL 0x001a6700
INC dword ptr [R14 + 0x60]
LAB_00135185:
CMP R15,R12
MOV R15,RBX
JNZ 0x00135153
JMP 0x001351b0
LAB_0013518f:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x0013516c
LAB_001351a1:
MOV qword ptr [R14],R14
MOV qword ptr [R9],R14
MOV qword ptr [R10],R14
MOV qword ptr [R14 + 0x8],R14
JMP 0x001351b9
LAB_001351b0:
MOV qword ptr [R13 + 0x10],R14
OR byte ptr [R14 + 0x74],0x8
LAB_001351b9:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void link_block(long param_1,long *param_2,char param_3,char param_4)
{
long *plVar1;
long lVar2;
long lVar3;
long lVar4;
int8 *puVar5;
long lVar6;
bool bVar7;
if ((param_3 == '\0') && (lVar2 = *(long *)(param_1 + 0x120), lVar2 != 0)) {
lVar3 = *(long *)(*(long *)(lVar2 + 0x88) + 0xa8);
lVar6 = *(long *)(lVar2 + 0x88);
do {
lVar4 = *(long *)(lVar6 + 0x88);
if (*(long *)(lVar6 + 0xa8) == lVar3) {
if (*(long *)(lVar6 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar6 + 8));
wqueue_unlink_from_queue(param_1 + 0x120,lVar6);
*(int *)(param_2 + 0xc) = (int)param_2[0xc] + 1;
}
bVar7 = lVar6 != lVar2;
lVar6 = lVar4;
} while (bVar7);
*(long **)(lVar3 + 0x10) = param_2;
*(byte *)((long)param_2 + 0x74) = *(byte *)((long)param_2 + 0x74) | 8;
}
else {
puVar5 = (int8 *)(param_1 + 0xc0);
if (param_3 == '\0') {
puVar5 = (int8 *)(param_1 + 0xb8);
}
plVar1 = *(long **)(param_1 + 0xb8 + (ulong)(param_3 != '\0') * 8);
if (plVar1 == (long *)0x0) {
*param_2 = (long)param_2;
*(int8 *)(param_1 + 0xc0) = param_2;
*(int8 *)(param_1 + 0xb8) = param_2;
param_2[1] = (long)param_2;
}
else {
*(long **)(*plVar1 + 8) = param_2;
*param_2 = *plVar1;
param_2[1] = (long)plVar1;
*plVar1 = (long)param_2;
if (param_4 != '\0') {
*puVar5 = param_2;
}
}
}
return;
}
|
|
1,068 | my_load_path | eloqsql/mysys/mf_loadpath.c | char * my_load_path(char * to, const char *path,
const char *own_path_prefix)
{
char buff[FN_REFLEN+1];
const char *from= buff;
int is_cur;
DBUG_ENTER("my_load_path");
DBUG_PRINT("enter",("path: %s prefix: %s",path,
own_path_prefix ? own_path_prefix : ""));
if ((path[0] == FN_HOMELIB && path[1] == FN_LIBCHAR) ||
test_if_hard_path(path))
from= path;
else if ((is_cur=(path[0] == FN_CURLIB && path[1] == FN_LIBCHAR)) ||
(is_prefix(path,FN_PARENTDIR)) ||
! own_path_prefix)
{
if (is_cur)
is_cur=2; /* Remove current dir */
if (! my_getwd(buff,(uint) (FN_REFLEN-strlen(path)+is_cur),MYF(0)))
{
size_t length= strlen(buff);
(void) strmake(buff + length, path+is_cur, FN_REFLEN - length);
}
else
from= path; /* Return org file name */
}
else
(void) strxnmov(buff, FN_REFLEN, own_path_prefix, path, NullS);
strmake(to, from, FN_REFLEN-1);
DBUG_PRINT("exit",("to: %s",to));
DBUG_RETURN(to);
} | O3 | c | my_load_path:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpb $0x7e, (%rsi)
jne 0x2d1fa
cmpb $0x2f, 0x1(%r14)
je 0x2d206
movq %r14, %rdi
callq 0x2eb5e
testl %eax, %eax
je 0x2d241
movq %r14, %r12
movl $0x1ff, %edx # imm = 0x1FF
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5bb1c
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x2d2e8
movq %rbx, %rax
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x2e, (%r14)
jne 0x2d254
movl $0x2, %r13d
cmpb $0x2f, 0x1(%r14)
je 0x2d293
leaq 0x306b6(%rip), %rsi # 0x5d911
movq %r14, %rdi
callq 0x5a238
xorl %r13d, %r13d
testq %r15, %r15
je 0x2d293
testl %eax, %eax
jne 0x2d293
leaq -0x240(%rbp), %r12
movl $0x200, %esi # imm = 0x200
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x5bc3c
jmp 0x2d209
movq %r14, %rdi
callq 0x24110
leal 0x200(%r13), %esi
subl %eax, %esi
leaq -0x240(%rbp), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0x2e9c8
testl %eax, %eax
jne 0x2d206
movq %r12, %rdi
callq 0x24110
leaq (%rax,%rbp), %rdi
addq $-0x240, %rdi # imm = 0xFDC0
addq %r13, %r14
movl $0x200, %edx # imm = 0x200
subq %rax, %rdx
movq %r14, %rsi
callq 0x5bb1c
jmp 0x2d209
callq 0x243b0
nopl (%rax)
| my_load_path:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 218h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
cmp byte ptr [rsi], 7Eh ; '~'
jnz short loc_2D1FA
cmp byte ptr [r14+1], 2Fh ; '/'
jz short loc_2D206
loc_2D1FA:
mov rdi, r14
call test_if_hard_path
test eax, eax
jz short loc_2D241
loc_2D206:
mov r12, r14
loc_2D209:
mov edx, 1FFh
mov rdi, rbx
mov rsi, r12
call strmake
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_2D2E8
mov rax, rbx
add rsp, 218h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2D241:
cmp byte ptr [r14], 2Eh ; '.'
jnz short loc_2D254
mov r13d, 2
cmp byte ptr [r14+1], 2Fh ; '/'
jz short loc_2D293
loc_2D254:
lea rsi, asc_5D911; ".."
mov rdi, r14
call is_prefix
xor r13d, r13d
test r15, r15
jz short loc_2D293
test eax, eax
jnz short loc_2D293
lea r12, [rbp+var_240]
mov esi, 200h
mov rdi, r12
mov rdx, r15
mov rcx, r14
xor r8d, r8d
xor eax, eax
call strxnmov
jmp loc_2D209
loc_2D293:
mov rdi, r14
call _strlen
lea esi, [r13+200h]
sub esi, eax
lea r12, [rbp+var_240]
mov rdi, r12
xor edx, edx
call my_getwd
test eax, eax
jnz loc_2D206
mov rdi, r12
call _strlen
lea rdi, [rax+rbp]
add rdi, 0FFFFFFFFFFFFFDC0h
add r14, r13
mov edx, 200h
sub rdx, rax
mov rsi, r14
call strmake
jmp loc_2D209
loc_2D2E8:
call ___stack_chk_fail
| long long my_load_path(long long a1, const char *a2, long long a3)
{
char *v4; // r14
char *v5; // r12
long long v7; // r13
int v8; // eax
int v9; // r9d
long long v10; // rsi
long long v11; // rax
char v12[528]; // [rsp+0h] [rbp-240h] BYREF
unsigned long long v13; // [rsp+210h] [rbp-30h]
v4 = (char *)a2;
v13 = __readfsqword(0x28u);
if ( (*a2 != 126 || a2[1] != 47) && !(unsigned int)test_if_hard_path(a2) )
{
if ( *a2 != 46 || (v7 = 2LL, a2[1] != 47) )
{
a2 = "..";
v8 = is_prefix(v4, "..");
v7 = 0LL;
if ( a3 )
{
if ( !v8 )
{
v5 = v12;
strxnmov((unsigned int)v12, 512, a3, (_DWORD)v4, 0, v9, v12[0]);
goto LABEL_5;
}
}
}
v10 = (_DWORD)v7 + 512 - (unsigned int)strlen(v4, a2);
v5 = v12;
if ( !(unsigned int)my_getwd(v12, v10, 0LL) )
{
v11 = strlen(v12, v10);
strmake(&v12[v11], &v4[v7], 512 - v11);
goto LABEL_5;
}
}
v5 = v4;
LABEL_5:
strmake(a1, v5, 511LL);
return a1;
}
| my_load_path:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x218
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP byte ptr [RSI],0x7e
JNZ 0x0012d1fa
CMP byte ptr [R14 + 0x1],0x2f
JZ 0x0012d206
LAB_0012d1fa:
MOV RDI,R14
CALL 0x0012eb5e
TEST EAX,EAX
JZ 0x0012d241
LAB_0012d206:
MOV R12,R14
LAB_0012d209:
MOV EDX,0x1ff
MOV RDI,RBX
MOV RSI,R12
CALL 0x0015bb1c
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0012d2e8
MOV RAX,RBX
ADD RSP,0x218
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012d241:
CMP byte ptr [R14],0x2e
JNZ 0x0012d254
MOV R13D,0x2
CMP byte ptr [R14 + 0x1],0x2f
JZ 0x0012d293
LAB_0012d254:
LEA RSI,[0x15d911]
MOV RDI,R14
CALL 0x0015a238
XOR R13D,R13D
TEST R15,R15
JZ 0x0012d293
TEST EAX,EAX
JNZ 0x0012d293
LEA R12,[RBP + -0x240]
MOV ESI,0x200
MOV RDI,R12
MOV RDX,R15
MOV RCX,R14
XOR R8D,R8D
XOR EAX,EAX
CALL 0x0015bc3c
JMP 0x0012d209
LAB_0012d293:
MOV RDI,R14
CALL 0x00124110
LEA ESI,[R13 + 0x200]
SUB ESI,EAX
LEA R12,[RBP + -0x240]
MOV RDI,R12
XOR EDX,EDX
CALL 0x0012e9c8
TEST EAX,EAX
JNZ 0x0012d206
MOV RDI,R12
CALL 0x00124110
LEA RDI,[RAX + RBP*0x1]
ADD RDI,-0x240
ADD R14,R13
MOV EDX,0x200
SUB RDX,RAX
MOV RSI,R14
CALL 0x0015bb1c
JMP 0x0012d209
LAB_0012d2e8:
CALL 0x001243b0
|
int8 my_load_path(int8 param_1,char *param_2,long param_3)
{
int iVar1;
size_t sVar2;
long lVar3;
long in_FS_OFFSET;
char local_248 [528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (((*param_2 != '~') || (param_2[1] != '/')) && (iVar1 = test_if_hard_path(param_2), iVar1 == 0)
) {
if ((*param_2 != '.') || (lVar3 = 2, param_2[1] != '/')) {
iVar1 = is_prefix(param_2,&DAT_0015d911);
lVar3 = 0;
if ((param_3 != 0) && (iVar1 == 0)) {
strxnmov(local_248,0x200,param_3,param_2,0);
param_2 = local_248;
goto LAB_0012d209;
}
}
sVar2 = strlen(param_2);
iVar1 = my_getwd(local_248,((int)lVar3 + 0x200) - (int)sVar2,0);
if (iVar1 == 0) {
sVar2 = strlen(local_248);
strmake(local_248 + sVar2,param_2 + lVar3,0x200 - sVar2);
param_2 = local_248;
}
}
LAB_0012d209:
strmake(param_1,param_2,0x1ff);
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
}
|
|
1,069 | unsigned long nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/json.hpp | constexpr value_t type() const noexcept
{
return m_data.m_type;
} | O3 | cpp | unsigned long nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movzbl (%rdi), %r12d
cmpq $0x9, %r12
ja 0x93ce1
movq %rdi, %r14
leaq 0x263a8(%rip), %rax # 0xb9cc8
movslq (%rax,%r12,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl %r12d, %eax
shll $0x6, %eax
movl %r12d, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
jmp 0x93c1b
movq %r14, %rdi
callq 0x93e0c
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x36d1a
jmp 0x93bdb
movl $0x9e3779b9, %r15d # imm = 0x9E3779B9
movq %r14, %rdi
callq 0x93d58
movl %r12d, %ecx
shll $0x6, %ecx
movl %r12d, %ebx
shrl $0x2, %ebx
orl %ecx, %ebx
addq 0x8(%rax), %rbx
addq %r15, %rbx
subq (%rax), %rbx
xorq %r12, %rbx
movq %r14, %rdi
callq 0x93d58
movzbl 0x20(%rax), %eax
movq %rbx, %rcx
shlq $0x6, %rcx
orq %rax, %rcx
movq %rbx, %r12
shrq $0x2, %r12
addq %r15, %r12
addq %rcx, %r12
xorq %rbx, %r12
movq %r14, %rdi
callq 0x93d58
movq 0x18(%rax), %rcx
addq %r15, %rcx
leaq -0x1(%r15), %rdx
cmpb $0x0, 0x20(%rax)
cmovneq %rcx, %rdx
movq %r12, %rax
shlq $0x6, %rax
addq %rdx, %rax
movq %r12, %rbx
shrq $0x2, %rbx
addq %rax, %rbx
xorq %r12, %rbx
movq %r14, %rdi
callq 0x93d58
movq (%rax), %rcx
movq 0x8(%rax), %rax
cmpq %rax, %rcx
je 0x93c66
movzbl (%rcx), %edx
movq %rbx, %rsi
shlq $0x6, %rsi
movq %rbx, %rdi
shrq $0x2, %rdi
addq %r15, %rsi
addq %rdi, %rsi
addq %rdx, %rsi
xorq %rsi, %rbx
incq %rcx
jmp 0x939e6
movl $0x9e3779b9, %r15d # imm = 0x9E3779B9
movq %r14, %rdi
callq 0x2d3d4
movq %rax, %rbx
movl %r12d, %eax
shll $0x6, %eax
movl %r12d, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
addq %r15, %rbx
addq %rcx, %rbx
xorq %r12, %rbx
leaq 0x78(%rsp), %r13
movq %r14, (%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r13)
movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000
movq %rbp, 0x18(%r13)
movq %r13, %rdi
callq 0x4cc14
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x4d714
leaq 0xe8(%rsp), %r13
movq %r14, (%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r13)
movq %rbp, 0x18(%r13)
movq %r13, %rdi
callq 0x4cc86
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x4d714
movq %r12, %rdi
leaq 0x78(%rsp), %rsi
callq 0x4ccec
testb %al, %al
jne 0x93c7b
movq %r12, %rdi
callq 0x49554
movq %r13, %rdi
movq %rax, %rsi
callq 0x36d1a
movq %rax, %r14
movq %r12, %rdi
callq 0x490a2
movq %rax, %rdi
callq 0x938f7
movq %rax, %rbp
movq %r12, %rdi
callq 0x49264
movq %rbx, %rax
shlq $0x6, %rax
movq %rbx, %rcx
shrq $0x2, %rcx
addq %r15, %rax
addq %rcx, %rax
addq %r14, %rax
xorq %rbx, %rax
movq %rax, %rcx
shlq $0x6, %rcx
movq %rax, %rbx
shrq $0x2, %rbx
addq %r15, %rcx
addq %rbp, %rbx
addq %rcx, %rbx
xorq %rax, %rbx
incq 0x28(%rsp)
jmp 0x93aa1
movl $0x9e3779b9, %r13d # imm = 0x9E3779B9
movq %r14, %rdi
callq 0x2d3d4
movq %rax, %r15
movl %r12d, %eax
shll $0x6, %eax
movl %r12d, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
addq %r13, %r15
addq %rcx, %r15
xorq %r12, %r15
leaq 0x8(%rsp), %rbx
movq %r14, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000
movq %rbp, 0x18(%rbx)
movq %rbx, %rdi
callq 0x4cc14
leaq 0x78(%rsp), %r12
movq %r14, (%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r12)
movq %rbp, 0x18(%r12)
movq %r12, %rdi
callq 0x4cc86
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4ccec
testb %al, %al
je 0x93c91
movq %r15, %rbx
jmp 0x93c66
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x93f4c
jmp 0x93c0a
leaq 0x8(%rsp), %rbx
movb $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4e4d2
movzbl (%rbx), %eax
movl %r12d, %ecx
shll $0x6, %ecx
movl %r12d, %edx
shrl $0x2, %edx
orl %ecx, %edx
movl $0x9e3779b9, %ebx # imm = 0x9E3779B9
addq %rax, %rbx
jmp 0x93c60
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6aca1
movl %r12d, %eax
shll $0x6, %eax
movl %r12d, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
addq (%rbx), %rcx
movl $0x9e3779b9, %ebx # imm = 0x9E3779B9
addq %rcx, %rbx
jmp 0x93c63
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6b5fb
movsd (%rbx), %xmm0
leaq 0x8(%rsp), %rdi
callq 0x93d26
movl %r12d, %ecx
shll $0x6, %ecx
movl %r12d, %edx
shrl $0x2, %edx
orl %ecx, %edx
addq %rax, %rdx
movl $0x9e3779b9, %ebx # imm = 0x9E3779B9
addq %rdx, %rbx
xorq %r12, %rbx
movq %rbx, %rax
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x78(%rsp), %rdi
callq 0x495c2
leaq 0x8(%rsp), %rdi
callq 0x495c2
jmp 0x93c66
leaq 0x8(%rsp), %r14
leaq 0x78(%rsp), %r12
movq %r15, %rbx
movq %r14, %rdi
callq 0x490a2
movq %rax, %rdi
callq 0x938f7
shlq $0x6, %rbx
movq %r15, %rcx
shrq $0x2, %rcx
addq %r13, %rbx
addq %rcx, %rbx
addq %rax, %rbx
xorq %r15, %rbx
movq %r14, %rdi
callq 0x49264
movq %r14, %rdi
movq %r12, %rsi
callq 0x4ccec
movq %rbx, %r15
testb %al, %al
je 0x93c9e
jmp 0x93c66
leaq 0x2374a(%rip), %rdi # 0xb7432
leaq 0x1f0eb(%rip), %rdx # 0xb2dda
leaq 0x1fe5c(%rip), %rcx # 0xb3b52
movl $0x17d9, %esi # imm = 0x17D9
xorl %eax, %eax
callq 0x19b10
jmp 0x93d06
jmp 0x93d06
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x495c2
leaq 0x8(%rsp), %rdi
callq 0x495c2
movq %rbx, %rdi
callq 0x19be0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 108h
movzx r12d, byte ptr [rdi]
cmp r12, 9; switch 10 cases
ja def_93927; jumptable 0000000000093927 default case
mov r14, rdi
lea rax, jpt_93927
movsxd rcx, ds:(jpt_93927 - 0B9CC8h)[rax+r12*4]
add rcx, rax
jmp rcx; switch jump
loc_93929:
mov eax, r12d; jumptable 0000000000093927 cases 0,9
shl eax, 6
mov ecx, r12d
shr ecx, 2
or ecx, eax
jmp loc_93C1B
loc_9393C:
mov rdi, r14; jumptable 0000000000093927 case 3
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRKS9_KSD_EET_RT0_; 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>::get_ref_impl<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> const>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const &)
lea rdi, [rsp+138h+var_130]
mov rsi, rax
call _ZNKSt4hashINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclERKS5_; std::hash<std::string>::operator()(std::string const&)
jmp loc_93BDB
loc_93956:
mov r15d, 9E3779B9h; jumptable 0000000000093927 case 8
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv; 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>::get_binary(void)
mov ecx, r12d
shl ecx, 6
mov ebx, r12d
shr ebx, 2
or ebx, ecx
add rbx, [rax+8]
add rbx, r15
sub rbx, [rax]
xor rbx, r12
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv; 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>::get_binary(void)
movzx eax, byte ptr [rax+20h]
mov rcx, rbx
shl rcx, 6
or rcx, rax
mov r12, rbx
shr r12, 2
add r12, r15
add r12, rcx
xor r12, rbx
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv; 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>::get_binary(void)
mov rcx, [rax+18h]
add rcx, r15
lea rdx, [r15-1]
cmp byte ptr [rax+20h], 0
cmovnz rdx, rcx
mov rax, r12
shl rax, 6
add rax, rdx
mov rbx, r12
shr rbx, 2
add rbx, rax
xor rbx, r12
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv; 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>::get_binary(void)
mov rcx, [rax]
mov rax, [rax+8]
loc_939E6:
cmp rcx, rax
jz loc_93C66
movzx edx, byte ptr [rcx]
mov rsi, rbx
shl rsi, 6
mov rdi, rbx
shr rdi, 2
add rsi, r15
add rsi, rdi
add rsi, rdx
xor rbx, rsi
inc rcx
jmp short loc_939E6
loc_93A11:
mov r15d, 9E3779B9h; jumptable 0000000000093927 case 1
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; 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>::size(void)
mov rbx, rax
mov eax, r12d
shl eax, 6
mov ecx, r12d
shr ecx, 2
or ecx, eax
add rbx, r15
add rbx, rcx
xor rbx, r12
lea r13, [rsp+138h+var_C0]
mov [r13+0], r14
xorps xmm0, xmm0
movups xmmword ptr [r13+8], xmm0
mov rbp, 8000000000000000h
mov [r13+18h], rbp
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_begin(void)
lea r12, [rsp+138h+var_130]
mov rdi, r12
mov rsi, r13
xor edx, edx
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,ulong)
lea r13, [rsp+138h+var_50]
mov [r13+0], r14
xorps xmm0, xmm0
movups xmmword ptr [r13+8], xmm0
mov [r13+18h], rbp
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_end(void)
lea rdi, [rsp+138h+var_C0]
mov rsi, r13
xor edx, edx
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,ulong)
loc_93AA1:
mov rdi, r12
lea rsi, [rsp+138h+var_C0]
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jnz loc_93C7B
mov rdi, r12
call _ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::key(void)
mov rdi, r13
mov rsi, rax
call _ZNKSt4hashINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclERKS5_; std::hash<std::string>::operator()(std::string const&)
mov r14, rax
mov rdi, r12
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void)
mov rdi, rax
call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rbp, rax
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator++(void)
mov rax, rbx
shl rax, 6
mov rcx, rbx
shr rcx, 2
add rax, r15
add rax, rcx
add rax, r14
xor rax, rbx
mov rcx, rax
shl rcx, 6
mov rbx, rax
shr rbx, 2
add rcx, r15
add rbx, rbp
add rbx, rcx
xor rbx, rax
inc [rsp+138h+var_110]
jmp loc_93AA1
loc_93B25:
mov r13d, 9E3779B9h; jumptable 0000000000093927 case 2
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; 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>::size(void)
mov r15, rax
mov eax, r12d
shl eax, 6
mov ecx, r12d
shr ecx, 2
or ecx, eax
add r15, r13
add r15, rcx
xor r15, r12
lea rbx, [rsp+138h+var_130]
mov [rbx], r14
xorps xmm0, xmm0
movups xmmword ptr [rbx+8], xmm0
mov rbp, 8000000000000000h
mov [rbx+18h], rbp
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_begin(void)
lea r12, [rsp+138h+var_C0]
mov [r12], r14
xorps xmm0, xmm0
movups xmmword ptr [r12+8], xmm0
mov [r12+18h], rbp
mov rdi, r12
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_end(void)
mov rdi, rbx
mov rsi, r12
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jz loc_93C91
mov rbx, r15
jmp loc_93C66
loc_93BAC:
lea rbx, [rsp+138h+var_130]; jumptable 0000000000093927 case 6
mov qword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
jmp short loc_93C0A
loc_93BC5:
lea rbx, [rsp+138h+var_130]; jumptable 0000000000093927 case 4
mov byte ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE; nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,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>::boolean_t &)
movzx eax, byte ptr [rbx]
loc_93BDB:
mov ecx, r12d
shl ecx, 6
mov edx, r12d
shr edx, 2
or edx, ecx
mov ebx, 9E3779B9h
add rbx, rax
jmp short loc_93C60
loc_93BF3:
lea rbx, [rsp+138h+var_130]; jumptable 0000000000093927 case 5
mov qword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
loc_93C0A:
mov eax, r12d
shl eax, 6
mov ecx, r12d
shr ecx, 2
or ecx, eax
add rcx, [rbx]
loc_93C1B:
mov ebx, 9E3779B9h
add rbx, rcx
jmp short loc_93C63
loc_93C25:
lea rbx, [rsp+138h+var_130]; jumptable 0000000000093927 case 7
mov qword ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
movsd xmm0, qword ptr [rbx]
lea rdi, [rsp+138h+var_130]
call _ZNKSt4hashIdEclEd; std::hash<double>::operator()(double)
mov ecx, r12d
shl ecx, 6
mov edx, r12d
shr edx, 2
or edx, ecx
add rdx, rax
mov ebx, 9E3779B9h
loc_93C60:
add rbx, rdx
loc_93C63:
xor rbx, r12
loc_93C66:
mov rax, rbx
add rsp, 108h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_93C7B:
lea rdi, [rsp+138h+var_C0]
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::~iteration_proxy_value()
lea rdi, [rsp+138h+var_130]
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::~iteration_proxy_value()
jmp short loc_93C66
loc_93C91:
lea r14, [rsp+138h+var_130]
lea r12, [rsp+138h+var_C0]
mov rbx, r15
loc_93C9E:
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator*(void)
mov rdi, rax
call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
shl rbx, 6
mov rcx, r15
shr rcx, 2
add rbx, r13
add rbx, rcx
add rbx, rax
xor rbx, r15
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::operator++(void)
mov rdi, r14
mov rsi, r12
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
mov r15, rbx
test al, al
jz short loc_93C9E
jmp short loc_93C66
def_93927:
lea rdi, aWorkspaceLlm4b_2; jumptable 0000000000093927 default case
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFalse; "false"
mov esi, 17D9h
xor eax, eax
call _ggml_abort
jmp short loc_93D06
jmp short $+2
loc_93D06:
mov rbx, rax
lea rdi, [rsp+138h+var_C0]
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::~iteration_proxy_value()
lea rdi, [rsp+138h+var_130]
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::~iteration_proxy_value()
mov rdi, rbx
call __Unwind_Resume
| unsigned long long nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
unsigned __int8 *a1)
{
long long v1; // r12
unsigned __int8 *v2; // rcx
long long v3; // rax
long long v4; // rax
_QWORD *binary; // rax
unsigned long long v6; // rbx
unsigned long long v7; // r12
long long v8; // rax
long long v9; // rdx
unsigned long long v10; // rbx
unsigned __int8 **v11; // rax
unsigned __int8 *v12; // rcx
unsigned __int8 *v13; // rax
long long v14; // rax
long long v15; // r14
long long v16; // rax
long long v17; // rbp
unsigned long long v18; // r15
long long v19; // rdx
long long v20; // rbx
long long v21; // rbx
long long v23; // rax
long long v24; // rax
long long v25; // rbx
unsigned __int8 *v26; // [rsp+8h] [rbp-130h] BYREF
__int128 v27; // [rsp+10h] [rbp-128h]
unsigned long long v28; // [rsp+20h] [rbp-118h]
long long v29; // [rsp+28h] [rbp-110h]
unsigned __int8 *v30; // [rsp+78h] [rbp-C0h] BYREF
__int128 v31; // [rsp+80h] [rbp-B8h]
unsigned long long v32; // [rsp+90h] [rbp-A8h]
unsigned __int8 *v33; // [rsp+E8h] [rbp-50h] BYREF
__int128 v34; // [rsp+F0h] [rbp-48h]
unsigned long long v35; // [rsp+100h] [rbp-38h]
v1 = *a1;
switch ( *a1 )
{
case 0u:
case 9u:
v2 = (unsigned __int8 *)(((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2));
goto LABEL_19;
case 1u:
v10 = v1 ^ ((((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2))
+ nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size(a1)
+ 2654435769LL);
v30 = a1;
v31 = 0LL;
v32 = 0x8000000000000000LL;
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_begin(&v30);
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value(
(long long)&v26,
(__int128 *)&v30,
0LL);
v33 = a1;
v34 = 0LL;
v35 = 0x8000000000000000LL;
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_end(&v33);
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value(
(long long)&v30,
(__int128 *)&v33,
0LL);
while ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v26,
&v30) )
{
v14 = nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::key(&v26);
v15 = std::hash<std::string>::operator()((long long)&v33, v14);
v16 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v26);
v17 = nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(v16);
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++(&v26);
v10 ^= (v15 + (v10 >> 2) + (v10 << 6) + 2654435769u) ^ (((v10 ^ (v15 + (v10 >> 2) + (v10 << 6) + 2654435769u)) << 6)
+ 2654435769u
+ v17
+ ((v10 ^ (v15 + (v10 >> 2) + (v10 << 6) + 2654435769u)) >> 2));
++v29;
}
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::~iteration_proxy_value(&v30);
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::~iteration_proxy_value(&v26);
return v10;
case 2u:
v18 = v1 ^ ((((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2))
+ nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size(a1)
+ 2654435769LL);
v26 = a1;
v27 = 0LL;
v28 = 0x8000000000000000LL;
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_begin(&v26);
v30 = a1;
v31 = 0LL;
v32 = 0x8000000000000000LL;
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_end(&v30);
if ( (unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v26,
&v30) )
return v18;
v10 = v18;
do
{
v23 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v26);
v10 = v18 ^ (nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(v23)
+ (v18 >> 2)
+ (v10 << 6)
+ 2654435769u);
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++(&v26);
v18 = v10;
}
while ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v26,
&v30) );
return v10;
case 3u:
v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>(a1);
v4 = std::hash<std::string>::operator()((long long)&v26, v3);
goto LABEL_16;
case 4u:
LOBYTE(v26) = 0;
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
a1,
(unsigned __int8 *)&v26);
v4 = (unsigned __int8)v26;
LABEL_16:
v19 = ((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2);
v20 = v4 + 2654435769LL;
goto LABEL_21;
case 5u:
v26 = 0LL;
ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
(double *)a1,
&v26);
goto LABEL_18;
case 6u:
v26 = 0LL;
ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
a1,
&v26);
LABEL_18:
v2 = &v26[((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2)];
LABEL_19:
v21 = (long long)(v2 + 2654435769LL);
goto LABEL_22;
case 7u:
v26 = 0LL;
ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
a1,
(double *)&v26);
v19 = std::hash<double>::operator()(&v26, *(double *)&v26) + (((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2));
v20 = 2654435769LL;
LABEL_21:
v21 = v19 + v20;
LABEL_22:
v10 = v1 ^ v21;
break;
case 8u:
binary = (_QWORD *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_binary(a1);
v6 = v1 ^ (binary[1] + (((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2)) + 2654435769LL - *binary);
v7 = v6 ^ ((*(unsigned __int8 *)(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_binary(a1)
+ 32) | (v6 << 6))
+ (v6 >> 2)
+ 2654435769u);
v8 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_binary(a1);
v9 = 2654435768LL;
if ( *(_BYTE *)(v8 + 32) )
v9 = *(_QWORD *)(v8 + 24) + 2654435769LL;
v10 = v7 ^ (v9 + (v7 << 6) + (v7 >> 2));
v11 = (unsigned __int8 **)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_binary(a1);
v12 = *v11;
v13 = v11[1];
while ( v12 != v13 )
v10 ^= *v12++ + (v10 >> 2) + (v10 << 6) + 2654435769u;
break;
default:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
6105LL,
"GGML_ASSERT(%s) failed",
"false");
v25 = v24;
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::~iteration_proxy_value(&v30);
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::~iteration_proxy_value(&v26);
_Unwind_Resume(v25);
}
return v10;
}
| hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x108
MOVZX R12D,byte ptr [RDI]
CMP R12,0x9
JA 0x00193ce1
MOV R14,RDI
LEA RAX,[0x1b9cc8]
MOVSXD RCX,dword ptr [RAX + R12*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_0:
MOV EAX,R12D
SHL EAX,0x6
MOV ECX,R12D
SHR ECX,0x2
OR ECX,EAX
JMP 0x00193c1b
caseD_3:
MOV RDI,R14
CALL 0x00193e0c
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
CALL 0x00136d1a
JMP 0x00193bdb
caseD_8:
MOV R15D,0x9e3779b9
MOV RDI,R14
CALL 0x00193d58
MOV ECX,R12D
SHL ECX,0x6
MOV EBX,R12D
SHR EBX,0x2
OR EBX,ECX
ADD RBX,qword ptr [RAX + 0x8]
ADD RBX,R15
SUB RBX,qword ptr [RAX]
XOR RBX,R12
MOV RDI,R14
CALL 0x00193d58
MOVZX EAX,byte ptr [RAX + 0x20]
MOV RCX,RBX
SHL RCX,0x6
OR RCX,RAX
MOV R12,RBX
SHR R12,0x2
ADD R12,R15
ADD R12,RCX
XOR R12,RBX
MOV RDI,R14
CALL 0x00193d58
MOV RCX,qword ptr [RAX + 0x18]
ADD RCX,R15
LEA RDX,[R15 + -0x1]
CMP byte ptr [RAX + 0x20],0x0
CMOVNZ RDX,RCX
MOV RAX,R12
SHL RAX,0x6
ADD RAX,RDX
MOV RBX,R12
SHR RBX,0x2
ADD RBX,RAX
XOR RBX,R12
MOV RDI,R14
CALL 0x00193d58
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
LAB_001939e6:
CMP RCX,RAX
JZ 0x00193c66
MOVZX EDX,byte ptr [RCX]
MOV RSI,RBX
SHL RSI,0x6
MOV RDI,RBX
SHR RDI,0x2
ADD RSI,R15
ADD RSI,RDI
ADD RSI,RDX
XOR RBX,RSI
INC RCX
JMP 0x001939e6
caseD_1:
MOV R15D,0x9e3779b9
MOV RDI,R14
CALL 0x0012d3d4
MOV RBX,RAX
MOV EAX,R12D
SHL EAX,0x6
MOV ECX,R12D
SHR ECX,0x2
OR ECX,EAX
ADD RBX,R15
ADD RBX,RCX
XOR RBX,R12
LEA R13,[RSP + 0x78]
MOV qword ptr [R13],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x8],XMM0
MOV RBP,-0x8000000000000000
MOV qword ptr [R13 + 0x18],RBP
MOV RDI,R13
CALL 0x0014cc14
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R13
XOR EDX,EDX
CALL 0x0014d714
LEA R13,[RSP + 0xe8]
MOV qword ptr [R13],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x8],XMM0
MOV qword ptr [R13 + 0x18],RBP
MOV RDI,R13
CALL 0x0014cc86
LEA RDI,[RSP + 0x78]
MOV RSI,R13
XOR EDX,EDX
CALL 0x0014d714
LAB_00193aa1:
MOV RDI,R12
LEA RSI,[RSP + 0x78]
CALL 0x0014ccec
TEST AL,AL
JNZ 0x00193c7b
LAB_00193ab6:
MOV RDI,R12
CALL 0x00149554
MOV RDI,R13
MOV RSI,RAX
CALL 0x00136d1a
MOV R14,RAX
LAB_00193acc:
MOV RDI,R12
CALL 0x001490a2
MOV RDI,RAX
CALL 0x001938f7
LAB_00193adc:
MOV RBP,RAX
MOV RDI,R12
CALL 0x00149264
LAB_00193ae7:
MOV RAX,RBX
SHL RAX,0x6
MOV RCX,RBX
SHR RCX,0x2
ADD RAX,R15
ADD RAX,RCX
ADD RAX,R14
XOR RAX,RBX
MOV RCX,RAX
SHL RCX,0x6
MOV RBX,RAX
SHR RBX,0x2
ADD RCX,R15
ADD RBX,RBP
ADD RBX,RCX
XOR RBX,RAX
INC qword ptr [RSP + 0x28]
JMP 0x00193aa1
caseD_2:
MOV R13D,0x9e3779b9
MOV RDI,R14
CALL 0x0012d3d4
MOV R15,RAX
MOV EAX,R12D
SHL EAX,0x6
MOV ECX,R12D
SHR ECX,0x2
OR ECX,EAX
ADD R15,R13
ADD R15,RCX
XOR R15,R12
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x8],XMM0
MOV RBP,-0x8000000000000000
MOV qword ptr [RBX + 0x18],RBP
MOV RDI,RBX
CALL 0x0014cc14
LEA R12,[RSP + 0x78]
MOV qword ptr [R12],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12 + 0x8],XMM0
MOV qword ptr [R12 + 0x18],RBP
MOV RDI,R12
CALL 0x0014cc86
MOV RDI,RBX
MOV RSI,R12
CALL 0x0014ccec
TEST AL,AL
JZ 0x00193c91
MOV RBX,R15
JMP 0x00193c66
caseD_6:
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x00193f4c
JMP 0x00193c0a
caseD_4:
LEA RBX,[RSP + 0x8]
MOV byte ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x0014e4d2
MOVZX EAX,byte ptr [RBX]
LAB_00193bdb:
MOV ECX,R12D
SHL ECX,0x6
MOV EDX,R12D
SHR EDX,0x2
OR EDX,ECX
MOV EBX,0x9e3779b9
ADD RBX,RAX
JMP 0x00193c60
caseD_5:
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x0016aca1
LAB_00193c0a:
MOV EAX,R12D
SHL EAX,0x6
MOV ECX,R12D
SHR ECX,0x2
OR ECX,EAX
ADD RCX,qword ptr [RBX]
LAB_00193c1b:
MOV EBX,0x9e3779b9
ADD RBX,RCX
JMP 0x00193c63
caseD_7:
LEA RBX,[RSP + 0x8]
MOV qword ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x0016b5fb
MOVSD XMM0,qword ptr [RBX]
LEA RDI,[RSP + 0x8]
CALL 0x00193d26
MOV ECX,R12D
SHL ECX,0x6
MOV EDX,R12D
SHR EDX,0x2
OR EDX,ECX
ADD RDX,RAX
MOV EBX,0x9e3779b9
LAB_00193c60:
ADD RBX,RDX
LAB_00193c63:
XOR RBX,R12
LAB_00193c66:
MOV RAX,RBX
ADD RSP,0x108
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00193c7b:
LEA RDI,[RSP + 0x78]
CALL 0x001495c2
LEA RDI,[RSP + 0x8]
CALL 0x001495c2
JMP 0x00193c66
LAB_00193c91:
LEA R14,[RSP + 0x8]
LEA R12,[RSP + 0x78]
MOV RBX,R15
LAB_00193c9e:
MOV RDI,R14
CALL 0x001490a2
MOV RDI,RAX
CALL 0x001938f7
SHL RBX,0x6
MOV RCX,R15
SHR RCX,0x2
ADD RBX,R13
ADD RBX,RCX
ADD RBX,RAX
XOR RBX,R15
MOV RDI,R14
CALL 0x00149264
MOV RDI,R14
MOV RSI,R12
CALL 0x0014ccec
MOV R15,RBX
TEST AL,AL
JZ 0x00193c9e
JMP 0x00193c66
default:
LEA RDI,[0x1b7432]
LEA RDX,[0x1b2dda]
LEA RCX,[0x1b3b52]
MOV ESI,0x17d9
XOR EAX,EAX
CALL 0x00119b10
|
/* unsigned long
nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
ulong nlohmann::json_abi_v3_11_3::detail::
hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1)
{
basic_json bVar1;
char cVar2;
string *psVar3;
ulong uVar4;
long *plVar5;
long lVar6;
long lVar7;
int8 *puVar8;
byte *pbVar9;
ulong uVar10;
basic_json *pbVar11;
ulong uVar12;
basic_json *local_130;
int8 local_128;
int8 uStack_120;
int8 local_118;
long local_110;
basic_json *local_c0;
int8 local_b8;
int8 uStack_b0;
int8 local_a8;
basic_json *local_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
bVar1 = *param_1;
uVar12 = (ulong)(byte)bVar1;
local_c0 = param_1;
switch(uVar12) {
case 0:
case 9:
pbVar11 = (basic_json *)(ulong)((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6);
goto LAB_00193c1b;
case 1:
lVar6 = 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>
::size((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
uVar12 = lVar6 + 0x9e3779b9 + (ulong)((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6) ^
uVar12;
local_b8 = 0;
uStack_b0 = 0;
local_a8 = 0x8000000000000000;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::set_begin((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_c0);
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::iteration_proxy_value
((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)&local_130,
(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_c0,0);
local_48 = 0;
uStack_40 = 0;
local_38 = 0x8000000000000000;
local_50 = param_1;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::set_end((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_50);
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::iteration_proxy_value
((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)&local_c0,
(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_50,0);
/* try { // try from 00193aa1 to 00193aad has its CatchHandler @ 00193d06 */
while (cVar2 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)&local_130,&local_c0), cVar2 == '\0') {
/* try { // try from 00193ab6 to 00193abd has its CatchHandler @ 00193d02 */
psVar3 = (string *)
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::key((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)&local_130);
lVar6 = std::hash<std::__cxx11::string>::operator()
((hash<std::__cxx11::string> *)&local_50,psVar3);
/* try { // try from 00193acc to 00193adb has its CatchHandler @ 00193d04 */
pbVar11 = (basic_json *)
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_130);
uVar10 = hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(pbVar11);
/* try { // try from 00193adc to 00193ae6 has its CatchHandler @ 00193d06 */
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator++((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_130);
uVar12 = uVar12 * 0x40 + 0x9e3779b9 + (uVar12 >> 2) + lVar6 ^ uVar12;
uVar12 = (uVar12 >> 2) + uVar10 + uVar12 * 0x40 + 0x9e3779b9 ^ uVar12;
local_110 = local_110 + 1;
}
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::~iteration_proxy_value
((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)&local_c0);
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
::~iteration_proxy_value
((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>>
*)&local_130);
break;
case 2:
lVar6 = 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>
::size((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
uVar12 = lVar6 + 0x9e3779b9 + (ulong)((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6) ^
uVar12;
local_128 = 0;
uStack_120 = 0;
local_118 = 0x8000000000000000;
local_130 = param_1;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::set_begin((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_130);
local_b8 = 0;
uStack_b0 = 0;
local_a8 = 0x8000000000000000;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::set_end((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_c0);
cVar2 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_130,
(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_c0);
if (cVar2 == '\0') {
do {
pbVar11 = (basic_json *)
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_130);
uVar10 = hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(pbVar11);
uVar12 = uVar12 * 0x40 + 0x9e3779b9 + (uVar12 >> 2) + uVar10 ^ uVar12;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator++((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_130);
cVar2 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_130,&local_c0);
} while (cVar2 == '\0');
}
break;
case 3:
psVar3 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
get_ref_impl<std::__cxx11::string_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>const>
(param_1);
uVar4 = std::hash<std::__cxx11::string>::operator()
((hash<std::__cxx11::string> *)&local_130,psVar3);
goto LAB_00193bdb;
case 4:
local_130 = (basic_json *)((ulong)local_130 & 0xffffffffffffff00);
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(param_1,(boolean_t *)&local_130);
uVar4 = (ulong)local_130 & 0xff;
LAB_00193bdb:
uVar10 = (ulong)((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6);
lVar6 = uVar4 + 0x9e3779b9;
LAB_00193c60:
pbVar11 = (basic_json *)(lVar6 + uVar10);
LAB_00193c63:
uVar12 = (ulong)pbVar11 ^ uVar12;
break;
case 5:
local_130 = (basic_json *)0x0;
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(param_1,&local_130);
goto LAB_00193c0a;
case 6:
local_130 = (basic_json *)0x0;
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(param_1,&local_130);
LAB_00193c0a:
pbVar11 = local_130 + ((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6);
LAB_00193c1b:
pbVar11 = pbVar11 + 0x9e3779b9;
goto LAB_00193c63;
case 7:
local_130 = (basic_json *)0x0;
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(param_1,&local_130);
lVar6 = std::hash<double>::operator()((hash<double> *)&local_130,(double)local_130);
uVar10 = (ulong)((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6) + lVar6;
lVar6 = 0x9e3779b9;
goto LAB_00193c60;
case 8:
plVar5 = (long *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::get_binary((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
uVar12 = ((ulong)((uint)((byte)bVar1 >> 2) | (uint)(byte)bVar1 << 6) + plVar5[1] + 0x9e3779b9) -
*plVar5 ^ uVar12;
lVar6 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::get_binary((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
uVar12 = (uVar12 >> 2) + 0x9e3779b9 + (uVar12 << 6 | (ulong)*(byte *)(lVar6 + 0x20)) ^ uVar12;
lVar7 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::get_binary((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
lVar6 = 0x9e3779b8;
if (*(char *)(lVar7 + 0x20) != '\0') {
lVar6 = *(long *)(lVar7 + 0x18) + 0x9e3779b9;
}
uVar12 = (uVar12 >> 2) + uVar12 * 0x40 + lVar6 ^ uVar12;
puVar8 = (int8 *)
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::get_binary((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
for (pbVar9 = (byte *)*puVar8; pbVar9 != (byte *)puVar8[1]; pbVar9 = pbVar9 + 1) {
uVar12 = uVar12 ^ uVar12 * 0x40 + 0x9e3779b9 + (uVar12 >> 2) + (ulong)*pbVar9;
}
break;
default:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x17d9,
"GGML_ASSERT(%s) failed","false");
}
return uVar12;
}
|
|
1,070 | LoadSoundAlias | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c | Sound LoadSoundAlias(Sound source)
{
Sound sound = { 0 };
if (source.stream.buffer->data != NULL)
{
AudioBuffer *audioBuffer = LoadAudioBuffer(AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, 0, AUDIO_BUFFER_USAGE_STATIC);
if (audioBuffer == NULL)
{
TRACELOG(LOG_WARNING, "SOUND: Failed to create buffer");
return sound; // Early return to avoid dereferencing the audioBuffer null pointer
}
audioBuffer->sizeInFrames = source.stream.buffer->sizeInFrames;
audioBuffer->volume = source.stream.buffer->volume;
audioBuffer->data = source.stream.buffer->data;
sound.frameCount = source.frameCount;
sound.stream.sampleRate = AUDIO.System.device.sampleRate;
sound.stream.sampleSize = 32;
sound.stream.channels = AUDIO_DEVICE_CHANNELS;
sound.stream.buffer = audioBuffer;
}
return sound;
} | O0 | c | LoadSoundAlias:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x20(%rbp)
movq %rdi, %rax
movq %rax, -0x18(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
xorl %esi, %esi
movl $0x28, %edx
callq 0xa2d0
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x170(%rax)
je 0x7adf2
movl 0x19bfe2(%rip), %edx # 0x216d34
movl $0x5, %edi
movl $0x2, %esi
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x79e50
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x7ad87
movl $0x4, %edi
leaq 0x12f929(%rip), %rsi # 0x1aa6a7
movb $0x0, %al
callq 0x182c40
jmp 0x7adf4
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rdx
movl 0x160(%rdx), %esi
movq -0x8(%rbp), %rdx
movl %esi, 0x160(%rdx)
movq (%rcx), %rdx
movss 0x148(%rdx), %xmm0
movq -0x8(%rbp), %rdx
movss %xmm0, 0x148(%rdx)
movq (%rcx), %rdx
movq 0x170(%rdx), %rsi
movq -0x8(%rbp), %rdx
movq %rsi, 0x170(%rdx)
movl 0x20(%rcx), %ecx
movl %ecx, 0x20(%rax)
movl 0x19bf5a(%rip), %ecx # 0x216d34
movl %ecx, 0x10(%rax)
movl $0x20, 0x14(%rax)
movl $0x2, 0x18(%rax)
movq -0x8(%rbp), %rcx
movq %rcx, (%rax)
jmp 0x7adf4
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
| LoadSoundAlias:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_20], rdi
mov rax, rdi
mov [rbp+var_18], rax
lea rax, [rbp+arg_0]
mov [rbp+var_10], rax
xor esi, esi
mov edx, 28h ; '('
call _memset
mov rax, [rbp+var_10]
mov rax, [rax]
cmp qword ptr [rax+170h], 0
jz loc_7ADF2
mov edx, cs:dword_216D34
mov edi, 5
mov esi, 2
xor r8d, r8d
mov ecx, r8d
call LoadAudioBuffer
mov [rbp+var_8], rax
cmp [rbp+var_8], 0
jnz short loc_7AD87
mov edi, 4
lea rsi, aSoundFailedToC; "SOUND: Failed to create buffer"
mov al, 0
call TraceLog
jmp short loc_7ADF4
loc_7AD87:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov rdx, [rcx]
mov esi, [rdx+160h]
mov rdx, [rbp+var_8]
mov [rdx+160h], esi
mov rdx, [rcx]
movss xmm0, dword ptr [rdx+148h]
mov rdx, [rbp+var_8]
movss dword ptr [rdx+148h], xmm0
mov rdx, [rcx]
mov rsi, [rdx+170h]
mov rdx, [rbp+var_8]
mov [rdx+170h], rsi
mov ecx, [rcx+20h]
mov [rax+20h], ecx
mov ecx, cs:dword_216D34
mov [rax+10h], ecx
mov dword ptr [rax+14h], 20h ; ' '
mov dword ptr [rax+18h], 2
mov rcx, [rbp+var_8]
mov [rax], rcx
loc_7ADF2:
jmp short $+2
loc_7ADF4:
mov rax, [rbp+var_18]
add rsp, 20h
pop rbp
retn
| long long LoadSoundAlias(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
int a11)
{
int v11; // edx
int v12; // ecx
int v13; // r8d
int v14; // r9d
long long AudioBuffer; // [rsp+18h] [rbp-8h]
memset(a1, 0LL, 40LL);
if ( *(_QWORD *)(a7 + 368) )
{
AudioBuffer = LoadAudioBuffer(5u, 2, dword_216D34, 0, 0);
if ( AudioBuffer )
{
*(_DWORD *)(AudioBuffer + 352) = *(_DWORD *)(a7 + 352);
*(_DWORD *)(AudioBuffer + 328) = *(_DWORD *)(a7 + 328);
*(_QWORD *)(AudioBuffer + 368) = *(_QWORD *)(a7 + 368);
*(_DWORD *)(a1 + 32) = a11;
*(_DWORD *)(a1 + 16) = dword_216D34;
*(_DWORD *)(a1 + 20) = 32;
*(_DWORD *)(a1 + 24) = 2;
*(_QWORD *)a1 = AudioBuffer;
}
else
{
TraceLog(4, (unsigned int)"SOUND: Failed to create buffer", v11, v12, v13, v14);
}
}
return a1;
}
| LoadSoundAlias:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x20],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x18],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x10],RAX
XOR ESI,ESI
MOV EDX,0x28
CALL 0x0010a2d0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x170],0x0
JZ 0x0017adf2
MOV EDX,dword ptr [0x00316d34]
MOV EDI,0x5
MOV ESI,0x2
XOR R8D,R8D
MOV ECX,R8D
CALL 0x00179e50
MOV qword ptr [RBP + -0x8],RAX
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x0017ad87
MOV EDI,0x4
LEA RSI,[0x2aa6a7]
MOV AL,0x0
CALL 0x00282c40
JMP 0x0017adf4
LAB_0017ad87:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX]
MOV ESI,dword ptr [RDX + 0x160]
MOV RDX,qword ptr [RBP + -0x8]
MOV dword ptr [RDX + 0x160],ESI
MOV RDX,qword ptr [RCX]
MOVSS XMM0,dword ptr [RDX + 0x148]
MOV RDX,qword ptr [RBP + -0x8]
MOVSS dword ptr [RDX + 0x148],XMM0
MOV RDX,qword ptr [RCX]
MOV RSI,qword ptr [RDX + 0x170]
MOV RDX,qword ptr [RBP + -0x8]
MOV qword ptr [RDX + 0x170],RSI
MOV ECX,dword ptr [RCX + 0x20]
MOV dword ptr [RAX + 0x20],ECX
MOV ECX,dword ptr [0x00316d34]
MOV dword ptr [RAX + 0x10],ECX
MOV dword ptr [RAX + 0x14],0x20
MOV dword ptr [RAX + 0x18],0x2
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
LAB_0017adf2:
JMP 0x0017adf4
LAB_0017adf4:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x20
POP RBP
RET
|
long * LoadSoundAlias(long *param_1)
{
long lVar1;
long in_stack_00000008;
int4 in_stack_00000028;
memset(param_1,0,0x28);
if (*(long *)(in_stack_00000008 + 0x170) != 0) {
lVar1 = LoadAudioBuffer(5,2,AUDIO._1028_4_,0);
if (lVar1 == 0) {
TraceLog(4,"SOUND: Failed to create buffer");
}
else {
*(int4 *)(lVar1 + 0x160) = *(int4 *)(in_stack_00000008 + 0x160);
*(int4 *)(lVar1 + 0x148) = *(int4 *)(in_stack_00000008 + 0x148);
*(int8 *)(lVar1 + 0x170) = *(int8 *)(in_stack_00000008 + 0x170);
*(int4 *)(param_1 + 4) = in_stack_00000028;
*(int4 *)(param_1 + 2) = AUDIO._1028_4_;
*(int4 *)((long)param_1 + 0x14) = 0x20;
*(int4 *)(param_1 + 3) = 2;
*param_1 = lVar1;
}
}
return param_1;
}
|
|
1,071 | LoadSoundAlias | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c | Sound LoadSoundAlias(Sound source)
{
Sound sound = { 0 };
if (source.stream.buffer->data != NULL)
{
AudioBuffer *audioBuffer = LoadAudioBuffer(AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, 0, AUDIO_BUFFER_USAGE_STATIC);
if (audioBuffer == NULL)
{
TRACELOG(LOG_WARNING, "SOUND: Failed to create buffer");
return sound; // Early return to avoid dereferencing the audioBuffer null pointer
}
audioBuffer->sizeInFrames = source.stream.buffer->sizeInFrames;
audioBuffer->volume = source.stream.buffer->volume;
audioBuffer->data = source.stream.buffer->data;
sound.frameCount = source.frameCount;
sound.stream.sampleRate = AUDIO.System.device.sampleRate;
sound.stream.sampleSize = 32;
sound.stream.channels = AUDIO_DEVICE_CHANNELS;
sound.stream.buffer = audioBuffer;
}
return sound;
} | O2 | c | LoadSoundAlias:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
andq $0x0, 0x20(%rdi)
movups %xmm0, (%rdi)
movq 0x20(%rsp), %r14
cmpq $0x0, 0x170(%r14)
je 0x3b36d
movl 0xe89a0(%rip), %edx # 0x123c94
pushq $0x5
popq %rdi
pushq $0x2
popq %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3a92c
testq %rax, %rax
je 0x3b35c
leaq 0x20(%rsp), %rcx
movl 0x160(%r14), %edx
movl %edx, 0x160(%rax)
movss 0x148(%r14), %xmm0
movss %xmm0, 0x148(%rax)
movq 0x170(%r14), %rdx
movq %rdx, 0x170(%rax)
movl 0x20(%rcx), %ecx
movl %ecx, 0x20(%rbx)
movl 0xe894e(%rip), %ecx # 0x123c94
movl %ecx, 0x10(%rbx)
movabsq $0x200000020, %rcx # imm = 0x200000020
movq %rcx, 0x14(%rbx)
movq %rax, (%rbx)
jmp 0x3b36d
leaq 0x80a8c(%rip), %rsi # 0xbbdef
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0xa128b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| LoadSoundAlias:
push r14
push rbx
push rax
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
and qword ptr [rdi+20h], 0
movups xmmword ptr [rdi], xmm0
mov r14, [rsp+18h+arg_0]
cmp qword ptr [r14+170h], 0
jz short loc_3B36D
mov edx, cs:dword_123C94
push 5
pop rdi
push 2
pop rsi
xor ecx, ecx
xor r8d, r8d
call LoadAudioBuffer
test rax, rax
jz short loc_3B35C
lea rcx, [rsp+18h+arg_0]
mov edx, [r14+160h]
mov [rax+160h], edx
movss xmm0, dword ptr [r14+148h]
movss dword ptr [rax+148h], xmm0
mov rdx, [r14+170h]
mov [rax+170h], rdx
mov ecx, [rcx+20h]
mov [rbx+20h], ecx
mov ecx, cs:dword_123C94
mov [rbx+10h], ecx
mov rcx, 200000020h
mov [rbx+14h], rcx
mov [rbx], rax
jmp short loc_3B36D
loc_3B35C:
lea rsi, aSoundFailedToC; "SOUND: Failed to create buffer"
push 4
pop rdi
xor eax, eax
call TraceLog
loc_3B36D:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| long long LoadSoundAlias(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
int a11)
{
long long AudioBuffer; // rax
int v12; // edx
int v13; // ecx
int v14; // r8d
int v15; // r9d
*(_OWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
*(_OWORD *)a1 = 0LL;
if ( *(_QWORD *)(a7 + 368) )
{
AudioBuffer = LoadAudioBuffer(5, 2, dword_123C94, 0, 0);
if ( AudioBuffer )
{
*(_DWORD *)(AudioBuffer + 352) = *(_DWORD *)(a7 + 352);
*(_DWORD *)(AudioBuffer + 328) = *(_DWORD *)(a7 + 328);
*(_QWORD *)(AudioBuffer + 368) = *(_QWORD *)(a7 + 368);
*(_DWORD *)(a1 + 32) = a11;
*(_DWORD *)(a1 + 16) = dword_123C94;
*(_QWORD *)(a1 + 20) = 0x200000020LL;
*(_QWORD *)a1 = AudioBuffer;
}
else
{
TraceLog(4, (unsigned int)"SOUND: Failed to create buffer", v12, v13, v14, v15);
}
}
return a1;
}
| LoadSoundAlias:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
AND qword ptr [RDI + 0x20],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOV R14,qword ptr [RSP + 0x20]
CMP qword ptr [R14 + 0x170],0x0
JZ 0x0013b36d
MOV EDX,dword ptr [0x00223c94]
PUSH 0x5
POP RDI
PUSH 0x2
POP RSI
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0013a92c
TEST RAX,RAX
JZ 0x0013b35c
LEA RCX,[RSP + 0x20]
MOV EDX,dword ptr [R14 + 0x160]
MOV dword ptr [RAX + 0x160],EDX
MOVSS XMM0,dword ptr [R14 + 0x148]
MOVSS dword ptr [RAX + 0x148],XMM0
MOV RDX,qword ptr [R14 + 0x170]
MOV qword ptr [RAX + 0x170],RDX
MOV ECX,dword ptr [RCX + 0x20]
MOV dword ptr [RBX + 0x20],ECX
MOV ECX,dword ptr [0x00223c94]
MOV dword ptr [RBX + 0x10],ECX
MOV RCX,0x200000020
MOV qword ptr [RBX + 0x14],RCX
MOV qword ptr [RBX],RAX
JMP 0x0013b36d
LAB_0013b35c:
LEA RSI,[0x1bbdef]
PUSH 0x4
POP RDI
XOR EAX,EAX
CALL 0x001a128b
LAB_0013b36d:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
long * LoadSoundAlias(long *param_1)
{
long lVar1;
long in_stack_00000008;
int4 in_stack_00000028;
param_1[2] = 0;
param_1[3] = 0;
param_1[4] = 0;
*param_1 = 0;
param_1[1] = 0;
if (*(long *)(in_stack_00000008 + 0x170) != 0) {
lVar1 = LoadAudioBuffer(5,2,AUDIO._1028_4_,0,0);
if (lVar1 == 0) {
TraceLog(4,"SOUND: Failed to create buffer");
}
else {
*(int4 *)(lVar1 + 0x160) = *(int4 *)(in_stack_00000008 + 0x160);
*(int4 *)(lVar1 + 0x148) = *(int4 *)(in_stack_00000008 + 0x148);
*(int8 *)(lVar1 + 0x170) = *(int8 *)(in_stack_00000008 + 0x170);
*(int4 *)(param_1 + 4) = in_stack_00000028;
*(int4 *)(param_1 + 2) = AUDIO._1028_4_;
*(int8 *)((long)param_1 + 0x14) = 0x200000020;
*param_1 = lVar1;
}
}
return param_1;
}
|
|
1,072 | LoadSoundAlias | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c | Sound LoadSoundAlias(Sound source)
{
Sound sound = { 0 };
if (source.stream.buffer->data != NULL)
{
AudioBuffer *audioBuffer = LoadAudioBuffer(AUDIO_DEVICE_FORMAT, AUDIO_DEVICE_CHANNELS, AUDIO.System.device.sampleRate, 0, AUDIO_BUFFER_USAGE_STATIC);
if (audioBuffer == NULL)
{
TRACELOG(LOG_WARNING, "SOUND: Failed to create buffer");
return sound; // Early return to avoid dereferencing the audioBuffer null pointer
}
audioBuffer->sizeInFrames = source.stream.buffer->sizeInFrames;
audioBuffer->volume = source.stream.buffer->volume;
audioBuffer->data = source.stream.buffer->data;
sound.frameCount = source.frameCount;
sound.stream.sampleRate = AUDIO.System.device.sampleRate;
sound.stream.sampleSize = 32;
sound.stream.channels = AUDIO_DEVICE_CHANNELS;
sound.stream.buffer = audioBuffer;
}
return sound;
} | O3 | c | LoadSoundAlias:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
movq 0x20(%rsp), %r14
cmpq $0x0, 0x170(%r14)
je 0x4348a
movl 0xf4869(%rip), %edx # 0x137c74
movl $0x5, %edi
movl $0x2, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x42961
testq %rax, %rax
je 0x43477
leaq 0x20(%rsp), %rcx
movl 0x160(%r14), %edx
movl %edx, 0x160(%rax)
movss 0x148(%r14), %xmm0
movss %xmm0, 0x148(%rax)
movq 0x170(%r14), %rdx
movq %rdx, 0x170(%rax)
movl 0x20(%rcx), %ecx
movl %ecx, 0x20(%rbx)
movl 0xf4813(%rip), %ecx # 0x137c74
movl %ecx, 0x10(%rbx)
movabsq $0x200000020, %rcx # imm = 0x200000020
movq %rcx, 0x14(%rbx)
movq %rax, (%rbx)
jmp 0x4348a
leaq 0x92b41(%rip), %rsi # 0xd5fbf
movl $0x4, %edi
xorl %eax, %eax
callq 0xb9db7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| LoadSoundAlias:
push r14
push rbx
push rax
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+20h], 0
mov r14, [rsp+18h+arg_0]
cmp qword ptr [r14+170h], 0
jz loc_4348A
mov edx, cs:dword_137C74
mov edi, 5
mov esi, 2
xor ecx, ecx
xor r8d, r8d
call LoadAudioBuffer
test rax, rax
jz short loc_43477
lea rcx, [rsp+18h+arg_0]
mov edx, [r14+160h]
mov [rax+160h], edx
movss xmm0, dword ptr [r14+148h]
movss dword ptr [rax+148h], xmm0
mov rdx, [r14+170h]
mov [rax+170h], rdx
mov ecx, [rcx+20h]
mov [rbx+20h], ecx
mov ecx, cs:dword_137C74
mov [rbx+10h], ecx
mov rcx, 200000020h
mov [rbx+14h], rcx
mov [rbx], rax
jmp short loc_4348A
loc_43477:
lea rsi, aSoundFailedToC; "SOUND: Failed to create buffer"
mov edi, 4
xor eax, eax
call TraceLog
loc_4348A:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| long long LoadSoundAlias(
long long a1,
double a2,
double a3,
double a4,
double a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14,
int a15)
{
long long AudioBuffer; // rax
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
if ( *(_QWORD *)(a11 + 368) )
{
AudioBuffer = LoadAudioBuffer(5, 2, dword_137C74, 0, 0, 0.0, a3, a4, a5);
if ( AudioBuffer )
{
*(_DWORD *)(AudioBuffer + 352) = *(_DWORD *)(a11 + 352);
*(_DWORD *)(AudioBuffer + 328) = *(_DWORD *)(a11 + 328);
*(_QWORD *)(AudioBuffer + 368) = *(_QWORD *)(a11 + 368);
*(_DWORD *)(a1 + 32) = a15;
*(_DWORD *)(a1 + 16) = dword_137C74;
*(_QWORD *)(a1 + 20) = 0x200000020LL;
*(_QWORD *)a1 = AudioBuffer;
}
else
{
TraceLog(4, (unsigned int)"SOUND: Failed to create buffer", v16, v17, v18, v19);
}
}
return a1;
}
| LoadSoundAlias:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x20],0x0
MOV R14,qword ptr [RSP + 0x20]
CMP qword ptr [R14 + 0x170],0x0
JZ 0x0014348a
MOV EDX,dword ptr [0x00237c74]
MOV EDI,0x5
MOV ESI,0x2
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00142961
TEST RAX,RAX
JZ 0x00143477
LEA RCX,[RSP + 0x20]
MOV EDX,dword ptr [R14 + 0x160]
MOV dword ptr [RAX + 0x160],EDX
MOVSS XMM0,dword ptr [R14 + 0x148]
MOVSS dword ptr [RAX + 0x148],XMM0
MOV RDX,qword ptr [R14 + 0x170]
MOV qword ptr [RAX + 0x170],RDX
MOV ECX,dword ptr [RCX + 0x20]
MOV dword ptr [RBX + 0x20],ECX
MOV ECX,dword ptr [0x00237c74]
MOV dword ptr [RBX + 0x10],ECX
MOV RCX,0x200000020
MOV qword ptr [RBX + 0x14],RCX
MOV qword ptr [RBX],RAX
JMP 0x0014348a
LAB_00143477:
LEA RSI,[0x1d5fbf]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001b9db7
LAB_0014348a:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
long * LoadSoundAlias(long *param_1)
{
long lVar1;
long in_stack_00000008;
int4 in_stack_00000028;
param_1[2] = 0;
param_1[3] = 0;
*param_1 = 0;
param_1[1] = 0;
param_1[4] = 0;
if (*(long *)(in_stack_00000008 + 0x170) != 0) {
lVar1 = LoadAudioBuffer(5,2,AUDIO._1028_4_,0,0);
if (lVar1 == 0) {
TraceLog(4,"SOUND: Failed to create buffer");
}
else {
*(int4 *)(lVar1 + 0x160) = *(int4 *)(in_stack_00000008 + 0x160);
*(int4 *)(lVar1 + 0x148) = *(int4 *)(in_stack_00000008 + 0x148);
*(int8 *)(lVar1 + 0x170) = *(int8 *)(in_stack_00000008 + 0x170);
*(int4 *)(param_1 + 4) = in_stack_00000028;
*(int4 *)(param_1 + 2) = AUDIO._1028_4_;
*(int8 *)((long)param_1 + 0x14) = 0x200000020;
*param_1 = lVar1;
}
}
return param_1;
}
|
|
1,073 | inline_mysql_start_table_lock_wait | eloqsql/include/mysql/psi/mysql_table.h | static inline struct PSI_table_locker *
inline_mysql_start_table_lock_wait(PSI_table_locker_state *state,
struct PSI_table *psi,
enum PSI_table_lock_operation op,
ulong flags, const char *src_file, uint src_line)
{
if (psi_likely(psi != NULL))
{
struct PSI_table_locker *locker;
locker= PSI_TABLE_CALL(start_table_lock_wait)
(state, psi, op, flags, src_file, src_line);
return locker;
}
return NULL;
} | O0 | c | inline_mysql_start_table_lock_wait:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
cmpq $0x0, -0x18(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xf9ca7
leaq 0x1c65c2(%rip), %rax # 0x2c0238
movq (%rax), %rax
movq 0x1e0(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movl -0x34(%rbp), %r9d
callq *%rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xf9caf
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| inline_mysql_start_table_lock_wait:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
cmp [rbp+var_18], 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_F9CA7
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1E0h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9d, [rbp+var_34]
call rax
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
jmp short loc_F9CAF
loc_F9CA7:
mov [rbp+var_8], 0
loc_F9CAF:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long inline_mysql_start_table_lock_wait(
long long a1,
long long a2,
unsigned int a3,
long long a4,
long long a5,
unsigned int a6)
{
if ( a2 )
return ((long long ( *)(long long, long long, _QWORD, long long, long long, _QWORD))PSI_server[60])(
a1,
a2,
a3,
a4,
a5,
a6);
else
return 0LL;
}
| inline_mysql_start_table_lock_wait:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
CMP qword ptr [RBP + -0x18],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 0x001f9ca7
LEA RAX,[0x3c0238]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1e0]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9D,dword ptr [RBP + -0x34]
CALL RAX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f9caf
LAB_001f9ca7:
MOV qword ptr [RBP + -0x8],0x0
LAB_001f9caf:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8
inline_mysql_start_table_lock_wait
(int8 param_1,long param_2,int4 param_3,int8 param_4,int8 param_5,
int4 param_6)
{
int8 local_10;
if (param_2 == 0) {
local_10 = 0;
}
else {
local_10 = (**(code **)(PSI_server + 0x1e0))(param_1,param_2,param_3,param_4,param_5,param_6);
}
return local_10;
}
|
|
1,074 | llava_validate_embed_size | monkey531[P]llama/examples/llava/llava.cpp | bool llava_validate_embed_size(const llama_context * ctx_llama, const clip_ctx * ctx_clip) {
// make sure that the correct mmproj was used, i.e., compare apples to apples
int n_llama_embd = llama_model_n_embd(llama_get_model(ctx_llama));
auto n_image_embd = clip_n_mmproj_embd(ctx_clip);
if (n_image_embd != n_llama_embd) {
LOG_ERR("%s: embedding dim of the multimodal projector (%d) is not equal to that of LLaMA (%d). Make sure that you use the correct mmproj file.\n", __func__, n_image_embd, n_llama_embd);
return false;
}
return true;
} | O0 | cpp | llava_validate_embed_size:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x622d0
movq %rax, %rdi
callq 0x62950
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
callq 0x87820
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
je 0x6ebdd
jmp 0x6ebae
movq 0x28737b(%rip), %rax # 0x2f5f30
movq (%rax), %rdi
movl 0x8(%rsp), %ecx
movl 0xc(%rsp), %r8d
leaq 0x1df9b8(%rip), %rsi # 0x24e580
leaq 0x1dfa39(%rip), %rdx # 0x24e608
movb $0x0, %al
callq 0x61420
movb $0x0, 0x27(%rsp)
jmp 0x6ebe2
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax)
| llava_validate_embed_size:
sub rsp, 28h
mov [rsp+28h+var_10], rdi; __int64
mov qword ptr [rsp+28h+var_18], rsi; __int16
mov rdi, [rsp+28h+var_10]
call _llama_get_model
mov rdi, rax
call _llama_model_n_embd
mov [rsp+28h+var_1C], eax
mov rdi, qword ptr [rsp+28h+var_18]; int
call clip_n_mmproj_embd
mov [rsp+28h+var_20], eax
mov eax, [rsp+28h+var_20]
cmp eax, [rsp+28h+var_1C]
jz short loc_6EBDD
jmp short $+2
loc_6EBAE:
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov ecx, [rsp+28h+var_20]
mov r8d, [rsp+28h+var_1C]
lea rsi, aSEmbeddingDimO; "%s: embedding dim of the multimodal pro"...
lea rdx, aLlavaValidateE; "llava_validate_embed_size"
mov al, 0
call _fprintf
mov [rsp+28h+var_1], 0
jmp short loc_6EBE2
loc_6EBDD:
mov [rsp+28h+var_1], 1
loc_6EBE2:
mov al, [rsp+28h+var_1]
and al, 1
add rsp, 28h
retn
| llava_validate_embed_size:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001622d0
MOV RDI,RAX
CALL 0x00162950
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00187820
MOV dword ptr [RSP + 0x8],EAX
MOV EAX,dword ptr [RSP + 0x8]
CMP EAX,dword ptr [RSP + 0xc]
JZ 0x0016ebdd
JMP 0x0016ebae
LAB_0016ebae:
MOV RAX,qword ptr [0x003f5f30]
MOV RDI,qword ptr [RAX]
MOV ECX,dword ptr [RSP + 0x8]
MOV R8D,dword ptr [RSP + 0xc]
LEA RSI,[0x34e580]
LEA RDX,[0x34e608]
MOV AL,0x0
CALL 0x00161420
MOV byte ptr [RSP + 0x27],0x0
JMP 0x0016ebe2
LAB_0016ebdd:
MOV byte ptr [RSP + 0x27],0x1
LAB_0016ebe2:
MOV AL,byte ptr [RSP + 0x27]
AND AL,0x1
ADD RSP,0x28
RET
|
int8 llava_validate_embed_size(int8 param_1,int8 param_2)
{
uint uVar1;
uint uVar2;
int iVar3;
int8 uVar4;
ulong uVar5;
int4 extraout_var;
uVar4 = llama_get_model(param_1);
uVar1 = llama_model_n_embd(uVar4);
uVar2 = clip_n_mmproj_embd(param_2);
uVar5 = (ulong)uVar2;
if (uVar2 != uVar1) {
iVar3 = fprintf(*(FILE **)PTR_stderr_003f5f30,
"%s: embedding dim of the multimodal projector (%d) is not equal to that of LLaMA (%d). Make sure that you use the correct mmproj file.\n"
,"llava_validate_embed_size",(ulong)uVar2,(ulong)uVar1);
uVar5 = CONCAT44(extraout_var,iVar3);
}
return CONCAT71((int7)(uVar5 >> 8),uVar2 == uVar1);
}
|
||
1,075 | cpu_get_num_physical_cores() | monkey531[P]llama/common/common.cpp | std::string string_from(bool value) {
return value ? "true" : "false";
} | O1 | cpp | cpu_get_num_physical_cores():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp # imm = 0x2A8
leaq 0x98(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq 0x58(%rsp), %r13
leaq 0x38(%rsp), %r12
leaq 0x18(%rsp), %r15
xorl %r14d, %r14d
leaq 0x48(%rsp), %rbx
movl $0xd1b71759, %esi # imm = 0xD1B71759
movl $0x1, %eax
cmpl $0xa, %r14d
jb 0x7671e
movl $0x4, %eax
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x76717
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x7671c
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x7671e
movl %ecx, %edx
imulq %rsi, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x766e6
addl $-0x3, %eax
jmp 0x7671e
addl $-0x2, %eax
jmp 0x7671e
decl %eax
movl %eax, %esi
movq %r13, 0x48(%rsp)
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1ba60
movq 0x48(%rsp), %rdi
movl 0x50(%rsp), %esi
movl %r14d, %edx
callq 0x6b115
movl $0x1b, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x80494(%rip), %rcx # 0xf6be8
callq 0x1ba10
movq %r12, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7677c
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x76784
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)
leaq 0x28(%rsp), %rdi
leaq 0x8045c(%rip), %rsi # 0xf6c04
callq 0x1c160
movq %r15, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x767d0
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x767d7
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
callq 0x1be60
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7681d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
movq 0x28(%rsp), %rdi
movq %r12, %rbp
cmpq %r12, %rdi
je 0x76837
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b910
movq 0x48(%rsp), %rdi
movq %r13, %r12
cmpq %r13, %rdi
je 0x76851
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1b910
leaq 0x118(%rsp), %rdi
callq 0x1b1d0
testb %al, %al
je 0x7691d
movl %eax, %r13d
movq %r15, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq 0xa0(%rsp), %rax
movq -0x18(%rax), %rdi
leaq 0xa0(%rsp), %rax
addq %rax, %rdi
movl $0xa, %esi
callq 0x1b8a0
movsbl %al, %edx
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1c0c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x768d9
leaq 0x68(%rsp), %rdi
movq %rdi, 0x28(%rsp)
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0xbe934
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x768f0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
leaq 0xa0(%rsp), %rdi
callq 0x1b1f0
incl %r14d
cmpl $-0x1, %r14d
setne %al
testb %al, %r13b
movq %r12, %r13
movq %rbp, %r12
movl $0xd1b71759, %esi # imm = 0xD1B71759
jne 0x766d3
jmp 0x7692a
leaq 0xa0(%rsp), %rdi
callq 0x1b1f0
movq 0x80(%rsp), %rbx
testq %rbx, %rbx
jne 0x76950
callq 0x1bc20
cmpl $0x5, %eax
setae %cl
movl %eax, %edx
shrl %cl, %edx
testl %eax, %eax
movl $0x4, %ebx
cmovnel %edx, %ebx
leaq 0x68(%rsp), %rdi
callq 0x847ba
movl %ebx, %eax
addq $0x2a8, %rsp # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x76992
movq %rax, %rbx
jmp 0x769ee
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x76992
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x769ae
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0x769ae
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x769ee
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0x769ee
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x769e1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b910
leaq 0xa0(%rsp), %rdi
callq 0x1b1f0
leaq 0x68(%rsp), %rdi
callq 0x847ba
movq %rbx, %rdi
callq 0x1bff0
| _Z26cpu_get_num_physical_coresv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2A8h
lea rax, [rsp+2D8h+var_240]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
lea r13, [rsp+2D8h+var_280]
lea r12, [rsp+2D8h+var_2A0]
lea r15, [rsp+2D8h+var_2C0]
xor r14d, r14d
lea rbx, [rsp+2D8h+var_290]
mov esi, 0D1B71759h
loc_766D3:
mov eax, 1
cmp r14d, 0Ah
jb short loc_7671E
mov eax, 4
mov ecx, r14d
loc_766E6:
cmp ecx, 63h ; 'c'
jbe short loc_76717
cmp ecx, 3E7h
jbe short loc_7671C
cmp ecx, 2710h
jb short loc_7671E
mov edx, ecx
imul rdx, rsi
shr rdx, 2Dh
add eax, 4
cmp ecx, 1869Fh
mov ecx, edx
ja short loc_766E6
add eax, 0FFFFFFFDh
jmp short loc_7671E
loc_76717:
add eax, 0FFFFFFFEh
jmp short loc_7671E
loc_7671C:
dec eax
loc_7671E:
mov esi, eax
mov [rsp+2D8h+var_290], r13
mov rdi, rbx
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [rsp+2D8h+var_290]
mov esi, [rsp+2D8h+var_288]
mov edx, r14d
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
mov r8d, 1Bh
mov rdi, rbx
xor esi, esi
xor edx, edx
lea rcx, aSysDevicesSyst; "/sys/devices/system/cpu/cpu"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
mov [rsp+2D8h+var_2B0], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_7677C
mov [rsp+2D8h+var_2B0], rdx
mov rdx, [rcx]
mov [rsp+2D8h+var_2A0], rdx
jmp short loc_76784
loc_7677C:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_76784:
mov rdx, [rax+8]
mov [rsp+2D8h+var_2A8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+2D8h+var_2B0]
lea rsi, aTopologyThread; "/topology/thread_siblings"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov [rsp+2D8h+var_2D0], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_767D0
mov [rsp+2D8h+var_2D0], rdx
mov rdx, [rcx]
mov [rsp+2D8h+var_2C0], rdx
jmp short loc_767D7
loc_767D0:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_767D7:
mov rdx, [rax+8]
mov [rsp+2D8h+var_2C8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+2D8h+var_238]
lea rsi, [rsp+2D8h+var_2D0]
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode)
mov rdi, [rsp+2D8h+var_2D0]; void *
cmp rdi, r15
jz short loc_7681D
mov rsi, [rsp+2D8h+var_2C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7681D:
mov rdi, [rsp+2D8h+var_2B0]; void *
mov rbp, r12
cmp rdi, r12
jz short loc_76837
mov rsi, [rsp+2D8h+var_2A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_76837:
mov rdi, [rsp+2D8h+var_290]; void *
mov r12, r13
cmp rdi, r13
jz short loc_76851
mov rsi, [rsp+2D8h+var_280]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_76851:
lea rdi, [rsp+2D8h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz loc_7691D
mov r13d, eax
mov [rsp+2D8h+var_2D0], r15
mov [rsp+2D8h+var_2C8], 0
mov byte ptr [rsp+2D8h+var_2C0], 0
mov rax, [rsp+2D8h+var_238]
mov rdi, [rax-18h]
lea rax, [rsp+2D8h+var_238]
add rdi, rax
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx edx, al
lea rdi, [rsp+2D8h+var_238]
lea rsi, [rsp+2D8h+var_2D0]
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_768D9
lea rdi, [rsp+2D8h+var_270]
mov [rsp+2D8h+var_2B0], rdi
lea rsi, [rsp+2D8h+var_2D0]
lea rdx, [rsp+2D8h+var_2B0]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE9_M_insertIRKS5_NS7_10_AllocNodeISaINS7_10_Hash_nodeIS5_Lb1EEEEEEEESt4pairINS7_14_Node_iteratorIS5_Lb1ELb1EEEbEOT_RKT0_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>(std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>> const&,std::integral_constant<bool,true>)
loc_768D9:
mov rdi, [rsp+2D8h+var_2D0]; void *
cmp rdi, r15
jz short loc_768F0
mov rsi, [rsp+2D8h+var_2C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_768F0:
lea rdi, [rsp+2D8h+var_238]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
inc r14d
cmp r14d, 0FFFFFFFFh
setnz al
test r13b, al
mov r13, r12
mov r12, rbp
mov esi, 0D1B71759h
jnz loc_766D3
jmp short loc_7692A
loc_7691D:
lea rdi, [rsp+2D8h+var_238]; this
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_7692A:
mov rbx, [rsp+2D8h+var_258]
test rbx, rbx
jnz short loc_76950
call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void)
cmp eax, 5
setnb cl
mov edx, eax
shr edx, cl
test eax, eax
mov ebx, 4
cmovnz ebx, edx
loc_76950:
lea rdi, [rsp+2D8h+var_270]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
mov eax, ebx
add rsp, 2A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
jmp short loc_76992
mov rbx, rax
jmp short loc_769EE
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r15
jz short loc_76992
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_76992:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_769AE
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_769AE
mov rbx, rax
loc_769AE:
mov rdi, [rsp+arg_40]; void *
cmp rdi, r13
jz short loc_769EE
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_769EE
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r15
jz short loc_769E1
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_769E1:
lea rdi, [rsp+arg_98]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_769EE:
lea rdi, [rsp+arg_60]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
| long long cpu_get_num_physical_cores(void)
{
long long *v0; // r13
long long *v1; // r12
unsigned int v2; // r14d
unsigned int v3; // eax
unsigned int v4; // ecx
bool v5; // cc
long long v6; // rax
_OWORD *v7; // rcx
long long v8; // rax
__int128 *v9; // rcx
long long v10; // rsi
long long *v11; // rbp
long long *v12; // r12
unsigned __int8 is_open; // al
unsigned __int8 v14; // r13
char v15; // al
_QWORD *v16; // rax
int v17; // r8d
int v18; // r9d
long long v19; // rcx
bool v20; // zf
unsigned int v21; // ebx
unsigned int v22; // eax
char v24; // [rsp+0h] [rbp-2D8h]
void *v25; // [rsp+8h] [rbp-2D0h] BYREF
long long v26; // [rsp+10h] [rbp-2C8h]
__int128 v27; // [rsp+18h] [rbp-2C0h] BYREF
void *v28[2]; // [rsp+28h] [rbp-2B0h] BYREF
long long v29; // [rsp+38h] [rbp-2A0h] BYREF
void *v30; // [rsp+48h] [rbp-290h] BYREF
int v31; // [rsp+50h] [rbp-288h]
long long v32; // [rsp+58h] [rbp-280h] BYREF
_QWORD v33[2]; // [rsp+68h] [rbp-270h] BYREF
__int128 v34; // [rsp+78h] [rbp-260h]
int v35; // [rsp+88h] [rbp-250h]
__int128 v36; // [rsp+90h] [rbp-248h] BYREF
_QWORD v37[15]; // [rsp+A0h] [rbp-238h] BYREF
_BYTE v38[448]; // [rsp+118h] [rbp-1C0h] BYREF
v33[0] = (char *)&v36 + 8;
v33[1] = 1LL;
v34 = 0LL;
v35 = 1065353216;
v36 = 0LL;
v0 = &v32;
v1 = &v29;
v2 = 0;
while ( 1 )
{
v3 = 1;
if ( v2 >= 0xA )
{
v3 = 4;
v4 = v2;
while ( 1 )
{
if ( v4 <= 0x63 )
{
v3 -= 2;
goto LABEL_11;
}
if ( v4 <= 0x3E7 )
break;
if ( v4 < 0x2710 )
goto LABEL_11;
v3 += 4;
v5 = v4 <= 0x1869F;
v4 /= 0x2710u;
if ( v5 )
{
v3 -= 3;
goto LABEL_11;
}
}
--v3;
}
LABEL_11:
v30 = v0;
std::string::_M_construct(&v30, v3, 0LL);
std::__detail::__to_chars_10_impl<unsigned int>((char *)v30, v31, v2);
v6 = std::string::replace(&v30, 0LL, 0LL, "/sys/devices/system/cpu/cpu", 27LL);
v28[0] = v1;
v7 = (_OWORD *)(v6 + 16);
if ( *(_QWORD *)v6 == v6 + 16 )
{
*(_OWORD *)v1 = *v7;
}
else
{
v28[0] = *(void **)v6;
v29 = *(_QWORD *)v7;
}
v28[1] = *(void **)(v6 + 8);
*(_QWORD *)v6 = v7;
*(_QWORD *)(v6 + 8) = 0LL;
*(_BYTE *)(v6 + 16) = 0;
v8 = std::string::append(v28, "/topology/thread_siblings");
v25 = &v27;
v9 = (__int128 *)(v8 + 16);
if ( *(_QWORD *)v8 == v8 + 16 )
{
v27 = *v9;
}
else
{
v25 = *(void **)v8;
*(_QWORD *)&v27 = *(_QWORD *)v9;
}
v26 = *(_QWORD *)(v8 + 8);
*(_QWORD *)v8 = v9;
*(_QWORD *)(v8 + 8) = 0LL;
*(_BYTE *)(v8 + 16) = 0;
v10 = (long long)&v25;
std::ifstream::basic_ifstream(v37, &v25, 8LL);
if ( v25 != &v27 )
{
v10 = v27 + 1;
operator delete(v25, v27 + 1);
}
v11 = v1;
if ( v28[0] != v1 )
{
v10 = v29 + 1;
operator delete(v28[0], v29 + 1);
}
v12 = v0;
if ( v30 != v0 )
{
v10 = v32 + 1;
operator delete(v30, v32 + 1);
}
is_open = std::__basic_file<char>::is_open(v38);
if ( !is_open )
break;
v14 = is_open;
v25 = &v27;
v26 = 0LL;
LOBYTE(v27) = 0;
v15 = std::ios::widen((char *)v37 + *(_QWORD *)(v37[0] - 24LL), 10LL);
v16 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v37, &v25, (unsigned int)v15);
v19 = *(_QWORD *)(*v16 - 24LL);
if ( (*((_BYTE *)v16 + v19 + 32) & 5) == 0 )
{
v28[0] = v33;
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>(
(unsigned int)v33,
(unsigned int)&v25,
(unsigned int)v28,
v19,
v17,
v18,
v24);
}
if ( v25 != &v27 )
operator delete(v25, v27 + 1);
std::ifstream::~ifstream(v37);
v20 = ((++v2 != -1) & v14) == 0;
v0 = v12;
v1 = v11;
v10 = 3518437209LL;
if ( v20 )
goto LABEL_31;
}
std::ifstream::~ifstream(v37);
LABEL_31:
v21 = DWORD2(v34);
if ( !*((_QWORD *)&v34 + 1) )
{
v22 = std::thread::hardware_concurrency((std::thread *)v37);
v21 = 4;
if ( v22 )
v21 = v22 >> (v22 >= 5);
}
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable(
v33,
v10);
return v21;
}
| cpu_get_num_physical_cores:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2a8
LEA RAX,[RSP + 0x98]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],0x3f800000
MOVUPS xmmword ptr [RAX + -0x8],XMM0
LEA R13,[RSP + 0x58]
LEA R12,[RSP + 0x38]
LEA R15,[RSP + 0x18]
XOR R14D,R14D
LEA RBX,[RSP + 0x48]
MOV ESI,0xd1b71759
LAB_001766d3:
MOV EAX,0x1
CMP R14D,0xa
JC 0x0017671e
MOV EAX,0x4
MOV ECX,R14D
LAB_001766e6:
CMP ECX,0x63
JBE 0x00176717
CMP ECX,0x3e7
JBE 0x0017671c
CMP ECX,0x2710
JC 0x0017671e
MOV EDX,ECX
IMUL RDX,RSI
SHR RDX,0x2d
ADD EAX,0x4
CMP ECX,0x1869f
MOV ECX,EDX
JA 0x001766e6
ADD EAX,-0x3
JMP 0x0017671e
LAB_00176717:
ADD EAX,-0x2
JMP 0x0017671e
LAB_0017671c:
DEC EAX
LAB_0017671e:
MOV ESI,EAX
MOV qword ptr [RSP + 0x48],R13
LAB_00176725:
MOV RDI,RBX
XOR EDX,EDX
CALL 0x0011ba60
MOV RDI,qword ptr [RSP + 0x48]
MOV ESI,dword ptr [RSP + 0x50]
MOV EDX,R14D
CALL 0x0016b115
LAB_00176740:
MOV R8D,0x1b
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
LEA RCX,[0x1f6be8]
CALL 0x0011ba10
MOV qword ptr [RSP + 0x28],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0017677c
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x00176784
LAB_0017677c:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_00176784:
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
LAB_0017679c:
LEA RDI,[RSP + 0x28]
LEA RSI,[0x1f6c04]
CALL 0x0011c160
MOV qword ptr [RSP + 0x8],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001767d0
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x001767d7
LAB_001767d0:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_001767d7:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001767ef:
LEA RDI,[RSP + 0xa0]
LEA RSI,[RSP + 0x8]
MOV EDX,0x8
CALL 0x0011be60
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0017681d
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b910
LAB_0017681d:
MOV RDI,qword ptr [RSP + 0x28]
MOV RBP,R12
CMP RDI,R12
JZ 0x00176837
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011b910
LAB_00176837:
MOV RDI,qword ptr [RSP + 0x48]
MOV R12,R13
CMP RDI,R13
JZ 0x00176851
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011b910
LAB_00176851:
LEA RDI,[RSP + 0x118]
CALL 0x0011b1d0
TEST AL,AL
JZ 0x0017691d
MOV R13D,EAX
MOV qword ptr [RSP + 0x8],R15
MOV qword ptr [RSP + 0x10],0x0
MOV byte ptr [RSP + 0x18],0x0
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + -0x18]
LEA RAX,[RSP + 0xa0]
ADD RDI,RAX
LAB_00176893:
MOV ESI,0xa
CALL 0x0011b8a0
MOVSX EDX,AL
LEA RDI,[RSP + 0xa0]
LEA RSI,[RSP + 0x8]
CALL 0x0011c0c0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x001768d9
LEA RDI,[RSP + 0x68]
MOV qword ptr [RSP + 0x28],RDI
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x001be934
LAB_001768d9:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x001768f0
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b910
LAB_001768f0:
LEA RDI,[RSP + 0xa0]
CALL 0x0011b1f0
INC R14D
CMP R14D,-0x1
SETNZ AL
TEST R13B,AL
MOV R13,R12
MOV R12,RBP
MOV ESI,0xd1b71759
JNZ 0x001766d3
JMP 0x0017692a
LAB_0017691d:
LEA RDI,[RSP + 0xa0]
CALL 0x0011b1f0
LAB_0017692a:
MOV RBX,qword ptr [RSP + 0x80]
TEST RBX,RBX
JNZ 0x00176950
CALL 0x0011bc20
CMP EAX,0x5
SETNC CL
MOV EDX,EAX
SHR EDX,CL
TEST EAX,EAX
MOV EBX,0x4
CMOVNZ EBX,EDX
LAB_00176950:
LEA RDI,[RSP + 0x68]
CALL 0x001847ba
MOV EAX,EBX
ADD RSP,0x2a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* cpu_get_num_physical_cores() */
ulong cpu_get_num_physical_cores(void)
{
char cVar1;
byte bVar2;
char cVar3;
long *plVar4;
istream *piVar5;
uint uVar6;
int8 **ppuVar7;
ulong *puVar8;
ulong uVar9;
uint uVar10;
ulong *local_2d0;
long local_2c8;
ulong local_2c0;
int4 uStack_2b8;
int4 uStack_2b4;
int8 **local_2b0;
long local_2a8;
int8 *local_2a0;
long lStack_298;
long *local_290;
uint local_288;
long local_280 [2];
int8 *local_270;
int8 local_268;
int8 local_260;
ulong uStack_258;
int4 local_250;
int8 local_248;
int8 uStack_240;
long local_238 [65];
local_270 = &uStack_240;
local_268 = 1;
local_260 = 0;
uStack_258 = 0;
local_250 = 0x3f800000;
local_248 = 0;
uStack_240 = 0;
uVar10 = 0;
do {
cVar3 = '\x01';
if (9 < uVar10) {
uVar9 = (ulong)uVar10;
cVar1 = '\x04';
do {
cVar3 = cVar1;
uVar6 = (uint)uVar9;
if (uVar6 < 100) {
cVar3 = cVar3 + -2;
goto LAB_0017671e;
}
if (uVar6 < 1000) {
cVar3 = cVar3 + -1;
goto LAB_0017671e;
}
if (uVar6 < 10000) goto LAB_0017671e;
uVar9 = uVar9 / 10000;
cVar1 = cVar3 + '\x04';
} while (99999 < uVar6);
cVar3 = cVar3 + '\x01';
}
LAB_0017671e:
local_290 = local_280;
/* try { // try from 00176725 to 0017672e has its CatchHandler @ 00176973 */
std::__cxx11::string::_M_construct((ulong)&local_290,cVar3);
std::__detail::__to_chars_10_impl<unsigned_int>((char *)local_290,local_288,uVar10);
/* try { // try from 00176740 to 00176758 has its CatchHandler @ 001769ab */
plVar4 = (long *)std::__cxx11::string::replace((ulong)&local_290,0,(char *)0x0,0x1f6be8);
ppuVar7 = (int8 **)(plVar4 + 2);
if ((int8 **)*plVar4 == ppuVar7) {
local_2a0 = *ppuVar7;
lStack_298 = plVar4[3];
local_2b0 = &local_2a0;
}
else {
local_2a0 = *ppuVar7;
local_2b0 = (int8 **)*plVar4;
}
local_2a8 = plVar4[1];
*plVar4 = (long)ppuVar7;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
/* try { // try from 0017679c to 001767ac has its CatchHandler @ 0017696e */
plVar4 = (long *)std::__cxx11::string::append((char *)&local_2b0);
puVar8 = (ulong *)(plVar4 + 2);
if ((ulong *)*plVar4 == puVar8) {
local_2c0 = *puVar8;
uStack_2b8 = (int4)plVar4[3];
uStack_2b4 = *(int4 *)((long)plVar4 + 0x1c);
local_2d0 = &local_2c0;
}
else {
local_2c0 = *puVar8;
local_2d0 = (ulong *)*plVar4;
}
local_2c8 = plVar4[1];
*plVar4 = (long)puVar8;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
/* try { // try from 001767ef to 00176805 has its CatchHandler @ 00176978 */
std::ifstream::ifstream((ifstream *)local_238,&local_2d0,8);
if (local_2d0 != &local_2c0) {
operator_delete(local_2d0,local_2c0 + 1);
}
if (local_2b0 != &local_2a0) {
operator_delete(local_2b0,(long)local_2a0 + 1);
}
if (local_290 != local_280) {
operator_delete(local_290,local_280[0] + 1);
}
bVar2 = std::__basic_file<char>::is_open();
if (bVar2 == 0) {
std::ifstream::~ifstream((ifstream *)local_238);
goto LAB_0017692a;
}
local_2c8 = 0;
local_2c0 = local_2c0 & 0xffffffffffffff00;
local_2d0 = &local_2c0;
/* try { // try from 00176893 to 001768d8 has its CatchHandler @ 001769c7 */
cVar3 = std::ios::widen((char)*(int8 *)(local_238[0] + -0x18) + (char)local_238);
piVar5 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)local_238,(string *)&local_2d0,cVar3);
if (((byte)piVar5[*(long *)(*(long *)piVar5 + -0x18) + 0x20] & 5) == 0) {
local_2b0 = &local_270;
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::
_M_insert<std::__cxx11::string_const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::__cxx11::string,true>>>>
(local_2b0,&local_2d0,&local_2b0);
}
if (local_2d0 != &local_2c0) {
operator_delete(local_2d0,local_2c0 + 1);
}
std::ifstream::~ifstream((ifstream *)local_238);
uVar10 = uVar10 + 1;
if ((bVar2 & uVar10 != 0xffffffff) == 0) {
LAB_0017692a:
uVar9 = uStack_258;
if (uStack_258 == 0) {
uVar10 = std::thread::hardware_concurrency();
uVar9 = 4;
if (uVar10 != 0) {
uVar9 = (ulong)(uVar10 >> (4 < uVar10));
}
}
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)&local_270);
return uVar9 & 0xffffffff;
}
} while( true );
}
|
|
1,076 | minja::Parser::parseVarNames[abi:cxx11]() | llama.cpp/common/minja/minja.hpp | std::vector<std::string> parseVarNames() {
static std::regex varnames_regex(R"(((?:\w+)(?:\s*,\s*(?:\w+))*)\s*)");
std::vector<std::string> group;
if ((group = consumeTokenGroups(varnames_regex)).empty()) throw std::runtime_error("Expected variable names");
std::vector<std::string> varnames;
std::istringstream iss(group[1]);
std::string varname;
while (std::getline(iss, varname, ',')) {
varnames.push_back(strip(varname));
}
return varnames;
} | O3 | cpp | minja::Parser::parseVarNames[abi:cxx11]():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x6d3d0(%rip), %rax # 0x101e90
movb (%rax), %al
testb %al, %al
je 0x94cbb
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x6d38e(%rip), %rdx # 0x101e70
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x9448a
movq 0x20(%rsp), %rax
leaq 0x30(%rsp), %r14
movaps (%r14), %xmm0
movq 0x10(%r14), %rcx
movq %rcx, 0x20(%rsp)
movaps 0x10(%rsp), %xmm1
movaps %xmm0, 0x10(%rsp)
leaq 0x90(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
callq 0x2a79a
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r15
movq %r14, %rdi
callq 0x2a79a
cmpq %r15, %rbx
je 0x94d12
xorps %xmm0, %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq 0x10(%rsp), %rsi
addq $0x20, %rsi
leaq 0x90(%rsp), %rdi
movl $0x8, %edx
callq 0x1c580
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x60(%rsp), %rbx
leaq 0x90(%rsp), %r14
leaq 0x30(%rsp), %r15
leaq 0x3356b(%rip), %r12 # 0xc8119
leaq 0x50(%rsp), %r13
leaq 0x70(%rsp), %rbp
movq %r14, %rdi
movq %r15, %rsi
movl $0x2c, %edx
callq 0x1c030
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x94c5d
movq %rbx, 0x50(%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x3fe82
movq 0x50(%rsp), %rdx
movq 0x58(%rsp), %rcx
movq %rbp, %rdi
movq %r15, %rsi
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x557c1
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x68ab4
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x94c3d
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x1c110
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x94bb8
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1c110
jmp 0x94bb8
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x94c79
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1c110
movq 0x6b348(%rip), %rsi # 0xfffc8
leaq 0x90(%rsp), %rdi
callq 0x1cb20
leaq 0x108(%rsp), %rdi
callq 0x1c8c0
leaq 0x10(%rsp), %rdi
callq 0x2a79a
movq 0x8(%rsp), %rax
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6d1ce(%rip), %rdi # 0x101e90
callq 0x1c3e0
testl %eax, %eax
je 0x94aca
leaq 0x6d19a(%rip), %rdi # 0x101e70
leaq 0x39c2c(%rip), %rsi # 0xce909
movl $0x10, %edx
callq 0x68a34
leaq -0x2c254(%rip), %rdi # 0x68a9a
leaq 0x6d17b(%rip), %rsi # 0x101e70
leaq 0x6ba1c(%rip), %rdx # 0x100718
callq 0x1ca80
leaq 0x6d188(%rip), %rdi # 0x101e90
callq 0x1c710
jmp 0x94aca
movl $0x10, %edi
callq 0x1c460
movq %rax, %rbx
leaq 0x39c03(%rip), %rsi # 0xce929
movq %rax, %rdi
callq 0x1c280
movq 0x6b283(%rip), %rsi # 0xfffb8
movq 0x6b23c(%rip), %rdx # 0xfff78
movq %rbx, %rdi
callq 0x1c7b0
movq %rax, %r14
leaq 0x6d142(%rip), %rdi # 0x101e90
callq 0x1c4f0
jmp 0x94e13
jmp 0x94d72
movq %rax, %r14
movq %rbx, %rdi
callq 0x1caa0
jmp 0x94e09
movq %rax, %r14
jmp 0x94dff
movq %rax, %r14
jmp 0x94e09
movq %rax, %r14
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x94da4
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x1c110
jmp 0x94da4
movq %rax, %r14
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x94dc2
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1c110
jmp 0x94dc2
jmp 0x94dbf
movq %rax, %r14
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x94dde
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1c110
movq 0x6b1e3(%rip), %rsi # 0xfffc8
leaq 0x90(%rsp), %rdi
callq 0x1cb20
leaq 0x108(%rsp), %rdi
callq 0x1c8c0
movq 0x8(%rsp), %rdi
callq 0x2a79a
leaq 0x10(%rsp), %rdi
callq 0x2a79a
movq %r14, %rdi
callq 0x1c7d0
nop
| _ZN5minja6Parser13parseVarNamesB5cxx11Ev:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 218h
mov r14, rsi
mov [rsp+248h+var_240], rdi; void *
lea rax, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; `guard variable for'minja::Parser::parseVarNames(void)::varnames_regex
mov al, [rax]
test al, al
jz loc_94CBB
loc_94ACA:
xorps xmm0, xmm0
movaps xmmword ptr [rsp+248h+var_238], xmm0; int
mov qword ptr [rsp+248h+var_228], 0; int
lea rdx, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; int
lea rdi, [rsp+248h+var_218]; int
mov rsi, r14; int
mov ecx, 1; int
call _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeTokenGroups(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
mov rax, qword ptr [rsp+248h+var_228]
lea r14, [rsp+248h+var_218]
movaps xmm0, xmmword ptr [r14]
mov rcx, [r14+10h]
mov qword ptr [rsp+248h+var_228], rcx
movaps xmm1, xmmword ptr [rsp+248h+var_238]
movaps xmmword ptr [rsp+248h+var_238], xmm0
lea rdi, [rsp+248h+var_1B8]
movaps xmmword ptr [rdi], xmm1
mov [rdi+10h], rax
xorps xmm0, xmm0
movaps xmmword ptr [r14], xmm0
mov qword ptr [r14+10h], 0
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rbx, qword ptr [rsp+248h+var_238]
mov r15, qword ptr [rsp+248h+var_238+8]
mov rdi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
cmp rbx, r15
jz loc_94D12
xorps xmm0, xmm0
mov rax, [rsp+248h+var_240]
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov rsi, qword ptr [rsp+248h+var_238]
add rsi, 20h ; ' '
lea rdi, [rsp+248h+var_1B8]
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea rax, [rsp+248h+var_208]
mov [rax-10h], rax
mov qword ptr [rax-8], 0
mov byte ptr [rax], 0
lea rbx, [rsp+248h+var_1E8]
lea r14, [rsp+248h+var_1B8]
lea r15, [rsp+248h+var_218]
lea r12, aFailedToMatchD+28h; ""
lea r13, [rsp+248h+var_1F8]
lea rbp, [rsp+248h+var_1D8]
loc_94BB8:
mov rdi, r14
mov rsi, r15
mov edx, 2Ch ; ','
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz loc_94C5D
mov [rsp+248h+var_1F8], rbx
mov rdi, r13
mov rsi, r12
mov rdx, r12
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 rdx, [rsp+248h+var_1F8]
mov rcx, [rsp+248h+var_1F0]
mov rdi, rbp
mov rsi, r15
mov r8d, 1
mov r9d, 1
call _ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_bb; minja::strip(std::string const&,std::string const&,bool,bool)
mov rdi, [rsp+248h+var_240]
mov rsi, rbp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+248h+var_1D8]; void *
lea rax, [rsp+248h+var_1C8]
cmp rdi, rax
jz short loc_94C3D
mov rsi, [rsp+248h+var_1C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_94C3D:
mov rdi, [rsp+248h+var_1F8]; void *
cmp rdi, rbx
jz loc_94BB8
mov rsi, [rsp+248h+var_1E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_94BB8
loc_94C5D:
mov rdi, [rsp+248h+var_218]; void *
lea rax, [rsp+248h+var_208]
cmp rdi, rax
jz short loc_94C79
mov rsi, [rsp+248h+var_208]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_94C79:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+248h+var_1B8]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+248h+var_140]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
lea rdi, [rsp+248h+var_238]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, [rsp+248h+var_240]
add rsp, 218h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_94CBB:
lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_94ACA
lea rdi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; minja::Parser::parseVarNames(void)::varnames_regex
lea rsi, aWSSWS; "((?:\\w+)(?:\\s*,\\s*(?:\\w+))*)\\s*"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_94ACA
loc_94D12:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aExpectedVariab; "Expected variable names"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp loc_94E13
jmp short loc_94D72
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp loc_94E09
mov r14, rax
jmp loc_94DFF
loc_94D72:
mov r14, rax
jmp loc_94E09
mov r14, rax
mov rdi, [rsp+248h+var_1D8]; void *
lea rax, [rsp+248h+var_1C8]
cmp rdi, rax
jz short loc_94DA4
mov rsi, [rsp+248h+var_1C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_94DA4
mov r14, rax
loc_94DA4:
mov rdi, [rsp+248h+var_1F8]; void *
cmp rdi, rbx
jz short loc_94DC2
mov rsi, [rsp+248h+var_1E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_94DC2
jmp short $+2
loc_94DBF:
mov r14, rax
loc_94DC2:
mov rdi, [rsp+248h+var_218]; void *
lea rax, [rsp+248h+var_208]
cmp rdi, rax
jz short loc_94DDE
mov rsi, [rsp+248h+var_208]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_94DDE:
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+248h+var_1B8]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+248h+var_140]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_94DFF:
mov rdi, [rsp+248h+var_240]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_94E09:
lea rdi, [rsp+248h+var_238]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_94E13:
mov rdi, r14
call __Unwind_Resume
| _QWORD * minja::Parser::parseVarNames[abi:cxx11](_QWORD *a1, long long a2)
{
_QWORD *v2; // rax
std::runtime_error *exception; // rbx
int v5[4]; // [rsp+10h] [rbp-238h] BYREF
int v6[2]; // [rsp+20h] [rbp-228h]
__int128 v7; // [rsp+30h] [rbp-218h] BYREF
_QWORD v8[2]; // [rsp+40h] [rbp-208h] BYREF
void *v9[2]; // [rsp+50h] [rbp-1F8h] BYREF
_QWORD v10[2]; // [rsp+60h] [rbp-1E8h] BYREF
void *v11[2]; // [rsp+70h] [rbp-1D8h] BYREF
long long v12; // [rsp+80h] [rbp-1C8h] BYREF
__int128 v13; // [rsp+90h] [rbp-1B8h] BYREF
long long v14; // [rsp+A0h] [rbp-1A8h]
_BYTE v15[320]; // [rsp+108h] [rbp-140h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11],
(long long)"((?:\\w+)(?:\\s*,\\s*(?:\\w+))*)\\s*",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]);
}
minja::Parser::consumeTokenGroups(
(long long)&v7,
a2,
(long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11],
1u);
*(_QWORD *)v6 = v8[0];
*(_OWORD *)v5 = v7;
v13 = 0LL;
v14 = 0LL;
v7 = 0LL;
v8[0] = 0LL;
std::vector<std::string>::~vector((long long)&v13);
std::vector<std::string>::~vector((long long)&v7);
if ( *(_QWORD *)v5 == *(_QWORD *)&v5[2] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected variable names");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
*(_OWORD *)a1 = 0LL;
a1[2] = 0LL;
std::istringstream::basic_istringstream(&v13, *(_QWORD *)v5 + 32LL, 8LL);
*(_QWORD *)&v7 = v8;
*((_QWORD *)&v7 + 1) = 0LL;
LOBYTE(v8[0]) = 0;
while ( 1 )
{
v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(&v13, &v7, 44LL);
if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 )
break;
v9[0] = v10;
std::string::_M_construct<char const*>((long long)v9, "", (long long)"");
minja::strip(v11, (long long)&v7, (_BYTE *)v9[0], (long long)v9[1], 1, 1);
std::vector<std::string>::emplace_back<std::string>((long long)a1, v11);
if ( v11[0] != &v12 )
operator delete(v11[0], v12 + 1);
if ( v9[0] != v10 )
operator delete(v9[0], v10[0] + 1LL);
}
if ( (_QWORD *)v7 != v8 )
operator delete((void *)v7, v8[0] + 1LL);
std::istringstream::~istringstream(&v13, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v15);
std::vector<std::string>::~vector((long long)v5);
return a1;
}
| parseVarNames[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x218
MOV R14,RSI
MOV qword ptr [RSP + 0x8],RDI
LEA RAX,[0x201e90]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00194cbb
LAB_00194aca:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
LAB_00194adb:
LEA RDX,[0x201e70]
LEA RDI,[RSP + 0x30]
MOV RSI,R14
MOV ECX,0x1
CALL 0x0019448a
MOV RAX,qword ptr [RSP + 0x20]
LEA R14,[RSP + 0x30]
MOVAPS XMM0,xmmword ptr [R14]
MOV RCX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x20],RCX
MOVAPS XMM1,xmmword ptr [RSP + 0x10]
MOVAPS xmmword ptr [RSP + 0x10],XMM0
LEA RDI,[RSP + 0x90]
MOVAPS xmmword ptr [RDI],XMM1
MOV qword ptr [RDI + 0x10],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14],XMM0
MOV qword ptr [R14 + 0x10],0x0
CALL 0x0012a79a
MOV RBX,qword ptr [RSP + 0x10]
MOV R15,qword ptr [RSP + 0x18]
MOV RDI,R14
CALL 0x0012a79a
CMP RBX,R15
JZ 0x00194d12
XORPS XMM0,XMM0
MOV RAX,qword ptr [RSP + 0x8]
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x20
LAB_00194b6f:
LEA RDI,[RSP + 0x90]
MOV EDX,0x8
CALL 0x0011c580
LEA RAX,[RSP + 0x40]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
LEA RBX,[RSP + 0x60]
LEA R14,[RSP + 0x90]
LEA R15,[RSP + 0x30]
LEA R12,[0x1c8119]
LEA R13,[RSP + 0x50]
LEA RBP,[RSP + 0x70]
LAB_00194bb8:
MOV RDI,R14
MOV RSI,R15
MOV EDX,0x2c
CALL 0x0011c030
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00194c5d
MOV qword ptr [RSP + 0x50],RBX
LAB_00194bdf:
MOV RDI,R13
MOV RSI,R12
MOV RDX,R12
CALL 0x0013fe82
MOV RDX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x58]
LAB_00194bf7:
MOV RDI,RBP
MOV RSI,R15
MOV R8D,0x1
MOV R9D,0x1
CALL 0x001557c1
LAB_00194c0e:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RBP
CALL 0x00168ab4
MOV RDI,qword ptr [RSP + 0x70]
LEA RAX,[RSP + 0x80]
CMP RDI,RAX
JZ 0x00194c3d
MOV RSI,qword ptr [RSP + 0x80]
INC RSI
CALL 0x0011c110
LAB_00194c3d:
MOV RDI,qword ptr [RSP + 0x50]
CMP RDI,RBX
JZ 0x00194bb8
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x0011c110
JMP 0x00194bb8
LAB_00194c5d:
MOV RDI,qword ptr [RSP + 0x30]
LEA RAX,[RSP + 0x40]
CMP RDI,RAX
JZ 0x00194c79
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0011c110
LAB_00194c79:
MOV RSI,qword ptr [0x001fffc8]
LEA RDI,[RSP + 0x90]
CALL 0x0011cb20
LEA RDI,[RSP + 0x108]
CALL 0x0011c8c0
LEA RDI,[RSP + 0x10]
CALL 0x0012a79a
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x218
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00194cbb:
LEA RDI,[0x201e90]
CALL 0x0011c3e0
TEST EAX,EAX
JZ 0x00194aca
LAB_00194ccf:
LEA RDI,[0x201e70]
LEA RSI,[0x1ce909]
MOV EDX,0x10
CALL 0x00168a34
LAB_00194ce7:
LEA RDI,[0x168a9a]
LEA RSI,[0x201e70]
LEA RDX,[0x200718]
CALL 0x0011ca80
LEA RDI,[0x201e90]
CALL 0x0011c710
JMP 0x00194aca
LAB_00194d12:
MOV EDI,0x10
CALL 0x0011c460
MOV RBX,RAX
LAB_00194d1f:
LEA RSI,[0x1ce929]
MOV RDI,RAX
CALL 0x0011c280
LAB_00194d2e:
MOV RSI,qword ptr [0x001fffb8]
MOV RDX,qword ptr [0x001fff78]
MOV RDI,RBX
CALL 0x0011c7b0
|
/* minja::Parser::parseVarNames[abi:cxx11]() */
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *
minja::Parser::parseVarNames_abi_cxx11_(void)
{
ulong *puVar1;
ulong *puVar2;
int iVar3;
istream *piVar4;
runtime_error *this;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *in_RDI;
ulong *local_238;
ulong *puStack_230;
ulong local_228;
ulong *local_218;
ulong *puStack_210;
ulong local_208 [2];
long *local_1f8 [2];
long local_1e8 [2];
long *local_1d8 [2];
long local_1c8 [2];
int8 local_1b8;
int8 uStack_1b0;
int8 local_1a8;
ios_base local_140 [272];
if (parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_ == '\0') {
iVar3 = __cxa_guard_acquire(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_);
if (iVar3 != 0) {
/* try { // try from 00194ccf to 00194ce6 has its CatchHandler @ 00194d44 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_,
"((?:\\w+)(?:\\s*,\\s*(?:\\w+))*)\\s*",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_);
}
}
local_238 = (ulong *)0x0;
puStack_230 = (ulong *)0x0;
local_228 = 0;
/* try { // try from 00194adb to 00194af3 has its CatchHandler @ 00194d72 */
consumeTokenGroups(&local_218);
local_1a8 = local_228;
uStack_1b0 = puStack_230;
local_1b8 = local_238;
local_228 = local_208[0];
local_238 = local_218;
puStack_230 = puStack_210;
local_218 = (ulong *)0x0;
puStack_210 = (ulong *)0x0;
local_208[0] = 0;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_1b8);
puVar2 = puStack_230;
puVar1 = local_238;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_218);
if (puVar1 != puVar2) {
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
*(int8 *)(in_RDI + 0x10) = 0;
/* try { // try from 00194b6f to 00194b80 has its CatchHandler @ 00194d6a */
std::__cxx11::istringstream::istringstream((istringstream *)&local_1b8,local_238 + 4,8);
local_218 = local_208;
puStack_210 = (ulong *)0x0;
local_208[0] = local_208[0] & 0xffffffffffffff00;
while( true ) {
/* try { // try from 00194bb8 to 00194bc7 has its CatchHandler @ 00194dbf */
piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)&local_1b8,(string *)&local_218,',');
if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) break;
local_1f8[0] = local_1e8;
/* try { // try from 00194bdf to 00194bec has its CatchHandler @ 00194dbd */
std::__cxx11::string::_M_construct<char_const*>(local_1f8,"","");
/* try { // try from 00194bf7 to 00194c0d has its CatchHandler @ 00194da1 */
strip((string *)local_1d8,(string *)&local_218,SUB81(local_1f8[0],0),SUB81(local_1f8[1],0));
/* try { // try from 00194c0e to 00194c1a has its CatchHandler @ 00194d7a */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>(in_RDI,(string *)local_1d8);
if (local_1d8[0] != local_1c8) {
operator_delete(local_1d8[0],local_1c8[0] + 1);
}
if (local_1f8[0] != local_1e8) {
operator_delete(local_1f8[0],local_1e8[0] + 1);
}
}
if (local_218 != local_208) {
operator_delete(local_218,local_208[0] + 1);
}
std::__cxx11::istringstream::~istringstream((istringstream *)&local_1b8);
std::ios_base::~ios_base(local_140);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_238);
return in_RDI;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00194d1f to 00194d2d has its CatchHandler @ 00194d5a */
std::runtime_error::runtime_error(this,"Expected variable names");
/* try { // try from 00194d2e to 00194d43 has its CatchHandler @ 00194d58 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001fffb8,PTR__runtime_error_001fff78);
}
|
|
1,077 | ggml_add_cast | llama.cpp/ggml/src/ggml.c | struct ggml_tensor * ggml_add_cast(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
enum ggml_type type) {
return ggml_add_cast_impl(ctx, a, b, type);
} | O3 | c | ggml_add_cast:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x10(%rdx), %rax
cmpq 0x10(%rsi), %rax
jne 0x1a393
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0x175a0
testb %al, %al
je 0x1a393
movl (%r14), %eax
imulq $0x38, %rax, %rcx
leaq 0x4ea77(%rip), %rdx # 0x68dc0
cmpb $0x0, 0x20(%rcx,%rdx)
jne 0x1a35a
cmpl $0x1, %eax
je 0x1a35a
cmpl $0x1e, %eax
jne 0x1a3b4
leaq 0x10(%r14), %rcx
movq %r15, %rdi
movl %ebp, %esi
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x19be7
movl $0x2, 0x50(%rax)
movq %r14, 0x98(%rax)
movq %rbx, 0xa0(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30279(%rip), %rdi # 0x4a613
leaq 0x302ad(%rip), %rdx # 0x4a64e
leaq 0x32305(%rip), %rcx # 0x4c6ad
movl $0x75c, %esi # imm = 0x75C
xorl %eax, %eax
callq 0x17c80
leaq 0x30258(%rip), %rdi # 0x4a613
leaq 0x3028c(%rip), %rdx # 0x4a64e
leaq 0x322ff(%rip), %rcx # 0x4c6c8
movl $0x761, %esi # imm = 0x761
jmp 0x1a3ad
| ggml_add_cast:
push rbp
push r15
push r14
push rbx
push rax
mov rax, [rdx+10h]
cmp rax, [rsi+10h]
jnz short loc_1A393
mov ebp, ecx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rdi, rdx
call _ggml_can_repeat
test al, al
jz short loc_1A393
mov eax, [r14]
imul rcx, rax, 38h ; '8'
lea rdx, type_traits
cmp byte ptr [rcx+rdx+20h], 0
jnz short loc_1A35A
cmp eax, 1
jz short loc_1A35A
cmp eax, 1Eh
jnz short loc_1A3B4
loc_1A35A:
lea rcx, [r14+10h]
mov rdi, r15
mov esi, ebp
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov dword ptr [rax+50h], 2
mov [rax+98h], r14
mov [rax+0A0h], rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_1A393:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlCanRepeatR; "ggml_can_repeat_rows(b, a)"
mov esi, 75Ch
loc_1A3AD:
xor eax, eax
call _ggml_abort
loc_1A3B4:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsQuantize_0; "ggml_is_quantized(a->type) || a->type ="...
mov esi, 761h
jmp short loc_1A3AD
| long long ggml_add_cast(long long a1, long long *a2, _QWORD *a3, unsigned int a4, int a5, int a6)
{
long long v8; // rax
long long result; // rax
const char *v10; // rcx
int v11; // esi
if ( a3[2] != a2[2] || !ggml_can_repeat(a3, a2) )
{
v10 = "ggml_can_repeat_rows(b, a)";
v11 = 1884;
goto LABEL_8;
}
v8 = *(unsigned int *)a2;
if ( !LOBYTE((&type_traits)[7 * v8 + 4]) && (_DWORD)v8 != 1 && (_DWORD)v8 != 30 )
{
v10 = "ggml_is_quantized(a->type) || a->type == GGML_TYPE_F16 || a->type == GGML_TYPE_BF16";
v11 = 1889;
LABEL_8:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c",
v11,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v10,
a5,
a6);
}
result = ggml_new_tensor_impl(a1, a4, 4u, a2 + 2, 0LL, 0LL);
*(_DWORD *)(result + 80) = 2;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
return result;
}
| ggml_add_cast:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDX + 0x10]
CMP RAX,qword ptr [RSI + 0x10]
JNZ 0x0011a393
MOV EBP,ECX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RDI,RDX
CALL 0x001175a0
TEST AL,AL
JZ 0x0011a393
MOV EAX,dword ptr [R14]
IMUL RCX,RAX,0x38
LEA RDX,[0x168dc0]
CMP byte ptr [RCX + RDX*0x1 + 0x20],0x0
JNZ 0x0011a35a
CMP EAX,0x1
JZ 0x0011a35a
CMP EAX,0x1e
JNZ 0x0011a3b4
LAB_0011a35a:
LEA RCX,[R14 + 0x10]
MOV RDI,R15
MOV ESI,EBP
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00119be7
MOV dword ptr [RAX + 0x50],0x2
MOV qword ptr [RAX + 0x98],R14
MOV qword ptr [RAX + 0xa0],RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0011a393:
LEA RDI,[0x14a613]
LEA RDX,[0x14a64e]
LEA RCX,[0x14c6ad]
MOV ESI,0x75c
LAB_0011a3ad:
XOR EAX,EAX
CALL 0x00117c80
LAB_0011a3b4:
LEA RDI,[0x14a613]
LEA RDX,[0x14a64e]
LEA RCX,[0x14c6c8]
MOV ESI,0x761
JMP 0x0011a3ad
|
void ggml_add_cast(int8 param_1,uint *param_2,long param_3,int4 param_4)
{
uint uVar1;
char cVar2;
long lVar3;
char *pcVar4;
int8 uVar5;
if (*(long *)(param_3 + 0x10) == *(long *)(param_2 + 4)) {
cVar2 = ggml_can_repeat(param_3);
if (cVar2 != '\0') {
uVar1 = *param_2;
if (((type_traits[(ulong)uVar1 * 0x38 + 0x20] != '\0') || (uVar1 == 1)) || (uVar1 == 0x1e)) {
lVar3 = ggml_new_tensor_impl(param_1,param_4,4,param_2 + 4,0,0);
*(int4 *)(lVar3 + 0x50) = 2;
*(uint **)(lVar3 + 0x98) = param_2;
*(long *)(lVar3 + 0xa0) = param_3;
return;
}
pcVar4 = "ggml_is_quantized(a->type) || a->type == GGML_TYPE_F16 || a->type == GGML_TYPE_BF16"
;
uVar5 = 0x761;
goto LAB_0011a3ad;
}
}
pcVar4 = "ggml_can_repeat_rows(b, a)";
uVar5 = 0x75c;
LAB_0011a3ad:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c",uVar5,
"GGML_ASSERT(%s) failed",pcVar4);
}
|
|
1,078 | my_readlink | eloqsql/mysys/my_symlink.c | int my_readlink(char *to, const char *filename, myf MyFlags)
{
#ifndef HAVE_READLINK
strmov(to,filename);
return 1;
#else
int result=0;
int length;
DBUG_ENTER("my_readlink");
if ((length=readlink(filename, to, FN_REFLEN-1)) < 0)
{
/* Don't give an error if this wasn't a symlink */
if ((my_errno=errno) == EINVAL)
{
result= 1;
strmov(to,filename);
}
else
{
if (MyFlags & MY_WME)
my_error(EE_CANT_READLINK, MYF(0), filename, errno);
result= -1;
}
}
else
to[length]=0;
DBUG_PRINT("exit" ,("result: %d", result));
DBUG_RETURN(result);
#endif /* HAVE_READLINK */
} | O0 | c | my_readlink:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x242b0
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jge 0x30571
callq 0x24050
movl (%rax), %eax
movl %eax, -0x24(%rbp)
callq 0x27670
movq %rax, %rcx
movl -0x24(%rbp), %eax
movl %eax, (%rcx)
cmpl $0x16, %eax
jne 0x30537
movl $0x1, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x242a0
jmp 0x3056f
movq -0x18(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x30568
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x24050
movq -0x30(%rbp), %rdx
movl (%rax), %ecx
movl $0x18, %edi
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0x2e9e0
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
jmp 0x3057d
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x3057f
jmp 0x30581
jmp 0x30583
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_readlink:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], 0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_8]
mov edx, 1FFh
call _readlink
mov [rbp+var_20], eax
cmp eax, 0
jge short loc_30571
call ___errno_location
mov eax, [rax]
mov [rbp+var_24], eax
call _my_thread_var
mov rcx, rax
mov eax, [rbp+var_24]
mov [rcx], eax
cmp eax, 16h
jnz short loc_30537
mov [rbp+var_1C], 1
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _stpcpy
jmp short loc_3056F
loc_30537:
mov rax, [rbp+var_18]
and rax, 10h
cmp rax, 0
jz short loc_30568
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
call ___errno_location
mov rdx, [rbp+var_30]
mov ecx, [rax]
mov edi, 18h
xor eax, eax
mov esi, eax
mov al, 0
call my_error
loc_30568:
mov [rbp+var_1C], 0FFFFFFFFh
loc_3056F:
jmp short loc_3057D
loc_30571:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_20]
mov byte ptr [rax+rcx], 0
loc_3057D:
jmp short $+2
loc_3057F:
jmp short $+2
loc_30581:
jmp short $+2
loc_30583:
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
add rsp, 40h
pop rbp
retn
| long long my_readlink(long long a1, long long a2, char a3)
{
unsigned int *v3; // rax
int v5; // [rsp+1Ch] [rbp-24h]
int v6; // [rsp+20h] [rbp-20h]
unsigned int v7; // [rsp+24h] [rbp-1Ch]
v7 = 0;
v6 = readlink(a2, a1, 511LL);
if ( v6 >= 0 )
{
*(_BYTE *)(a1 + v6) = 0;
}
else
{
v5 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var() = v5;
if ( v5 == 22 )
{
v7 = 1;
stpcpy(a1, a2);
}
else
{
if ( (a3 & 0x10) != 0 )
{
v3 = (unsigned int *)__errno_location();
my_error(0x18u, 0LL, a2, *v3);
}
return (unsigned int)-1;
}
}
return v7;
}
| my_readlink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x8]
MOV EDX,0x1ff
CALL 0x001242b0
MOV dword ptr [RBP + -0x20],EAX
CMP EAX,0x0
JGE 0x00130571
CALL 0x00124050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
CALL 0x00127670
MOV RCX,RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RCX],EAX
CMP EAX,0x16
JNZ 0x00130537
MOV dword ptr [RBP + -0x1c],0x1
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001242a0
JMP 0x0013056f
LAB_00130537:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x10
CMP RAX,0x0
JZ 0x00130568
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x00124050
MOV RDX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX]
MOV EDI,0x18
XOR EAX,EAX
MOV ESI,EAX
MOV AL,0x0
CALL 0x0012e9e0
LAB_00130568:
MOV dword ptr [RBP + -0x1c],0xffffffff
LAB_0013056f:
JMP 0x0013057d
LAB_00130571:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x20]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_0013057d:
JMP 0x0013057f
LAB_0013057f:
JMP 0x00130581
LAB_00130581:
JMP 0x00130583
LAB_00130583:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
ADD RSP,0x40
POP RBP
RET
|
int4 my_readlink(char *param_1,char *param_2,ulong param_3)
{
int iVar1;
ssize_t sVar2;
int *piVar3;
int4 local_24;
local_24 = 0;
sVar2 = readlink(param_2,param_1,0x1ff);
if ((int)sVar2 < 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if (iVar1 == 0x16) {
local_24 = 1;
stpcpy(param_1,param_2);
}
else {
if ((param_3 & 0x10) != 0) {
piVar3 = __errno_location();
my_error(0x18,0,param_2,*piVar3);
}
local_24 = 0xffffffff;
}
}
else {
param_1[(int)sVar2] = '\0';
}
return local_24;
}
|
|
1,079 | 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>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&) | monkey531[P]llama/common/./json.hpp | reference emplace_back(Args&& ... args)
{
// emplace_back only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
{
JSON_THROW(type_error::create(311, detail::concat("cannot use emplace_back() with ", type_name()), this));
}
// transform null object into an array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value = value_t::array;
assert_invariant();
}
// add element to array (perfect forwarding)
const auto old_capacity = m_data.m_value.array->capacity();
m_data.m_value.array->emplace_back(std::forward<Args>(args)...);
return set_parent(m_data.m_value.array->back(), old_capacity);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
jne 0x98a9a
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x186d0
movq %rax, %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
jmp 0x98aa3
cmpl $0x2, %eax
jne 0x98ac0
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x98bde
movq 0x8(%r14), %rax
movq 0x8(%rax), %rax
addq $-0x10, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x18380
movq %rax, %rbx
movq %r14, %rdi
callq 0x412e6
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x1c220(%rip), %rsi # 0xb4d04
leaq 0x10(%rsp), %rdi
callq 0x98b56
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x137, %esi # imm = 0x137
movq %r14, %rcx
callq 0x4cf10
xorl %ebp, %ebp
leaq 0x467b9(%rip), %rsi # 0xdf2c8
leaq -0x4956a(%rip), %rdx # 0x4f5ac
movq %rbx, %rdi
callq 0x18bb0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x98b3c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x186e0
testb %bpl, %bpl
jne 0x98b46
jmp 0x98b4e
movq %rax, %r14
movq %rbx, %rdi
callq 0x18520
movq %r14, %rdi
callq 0x18c10
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12emplace_backIJRSD_EEESF_DpOT_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jnz short loc_98A9A
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
jmp short loc_98AA3
loc_98A9A:
cmp eax, 2
jnz short loc_98AC0
mov rdi, [r14+8]
loc_98AA3:
mov rsi, rbx
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJRSD_EEESH_DpOT_; 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>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&>(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 rax, [r14+8]
mov rax, [rax+8]
add rax, 0FFFFFFFFFFFFFFF0h
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_98AC0:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUseEmpla; "cannot use emplace_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(char const(&)[32],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 137h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_98B3C
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_98B3C:
test bpl, bpl
jnz short loc_98B46
jmp short loc_98B4E
mov r14, rax
loc_98B46:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_98B4E:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&>(
long long a1,
long long a2)
{
long long v3; // rdi
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(
v6,
"cannot use emplace_back() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
311,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v3 = *(_QWORD *)(a1 + 8);
}
else
{
*(_BYTE *)a1 = 2;
v3 = operator new(0x18uLL);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v3;
}
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&>(
v3,
a2);
return *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) - 16LL;
}
| emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JNZ 0x00198a9a
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x001186d0
MOV RDI,RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
JMP 0x00198aa3
LAB_00198a9a:
CMP EAX,0x2
JNZ 0x00198ac0
MOV RDI,qword ptr [R14 + 0x8]
LAB_00198aa3:
MOV RSI,RBX
CALL 0x00198bde
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX + 0x8]
ADD RAX,-0x10
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00198ac0:
MOV EDI,0x20
CALL 0x00118380
MOV RBX,RAX
MOV RDI,R14
CALL 0x001412e6
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00198add:
LEA RSI,[0x1b4d04]
LEA RDI,[RSP + 0x10]
CALL 0x00198b56
MOV BPL,0x1
LAB_00198af1:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x137
MOV RCX,R14
CALL 0x0014cf10
XOR EBP,EBP
LEA RSI,[0x1df2c8]
LEA RDX,[0x14f5ac]
MOV RDI,RBX
CALL 0x00118bb0
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&) */
basic_json * __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*this_00;
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
this_00 = (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>>>
*)operator_new(0x18);
*(int8 *)this_00 = 0;
*(int8 *)(this_00 + 8) = 0;
*(int8 *)(this_00 + 0x10) = 0;
*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8) = this_00;
}
else {
if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 00198add to 00198aed has its CatchHandler @ 00198b43 */
detail::concat<std::__cxx11::string,char_const(&)[32],char_const*>
(local_38,"cannot use emplace_back() with ",&local_40);
/* try { // try from 00198af1 to 00198b1d has its CatchHandler @ 00198b1e */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x137,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8);
}
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>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>
(this_00,param_1);
return (basic_json *)(*(long *)(*(long *)(this + 8) + 8) + -0x10);
}
|
|
1,080 | ggml_backend_cpu_graph_plan_create(ggml_backend*, ggml_cgraph const*) | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.cpp | static ggml_backend_graph_plan_t ggml_backend_cpu_graph_plan_create(ggml_backend_t backend, const struct ggml_cgraph * cgraph) {
struct ggml_backend_cpu_context * cpu_ctx = (struct ggml_backend_cpu_context *)backend->context;
struct ggml_backend_plan_cpu * cpu_plan = new ggml_backend_plan_cpu;
cpu_plan->cplan = ggml_graph_plan(cgraph, cpu_ctx->n_threads, cpu_ctx->threadpool);
cpu_plan->cgraph = *cgraph; // FIXME: deep copy
if (cpu_plan->cplan.work_size > 0) {
cpu_plan->cplan.work_data = new uint8_t[cpu_plan->cplan.work_size];
if (cpu_plan->cplan.work_data == NULL) {
delete cpu_plan;
return NULL;
}
}
cpu_plan->cplan.abort_callback = cpu_ctx->abort_callback;
cpu_plan->cplan.abort_callback_data = cpu_ctx->abort_callback_data;
return cpu_plan;
} | O1 | cpp | ggml_backend_cpu_graph_plan_create(ggml_backend*, ggml_cgraph const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq 0x78(%rdi), %r12
movl $0x80, %edi
callq 0xa8d0
movq %rax, %rbx
movl (%r12), %edx
movq 0x8(%r12), %rcx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xb140
vmovups (%r15), %ymm0
vmovups 0x10(%r15), %ymm1
vmovups %ymm1, 0x10(%rbx)
vmovups %ymm0, (%rbx)
vmovups (%r14), %ymm0
vmovups 0x20(%r14), %ymm1
vmovups 0x30(%r14), %ymm2
vmovups %ymm2, 0x60(%rbx)
vmovups %ymm1, 0x50(%rbx)
vmovups %ymm0, 0x30(%rbx)
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x10b29
vzeroupper
callq 0xa040
movq %rax, 0x8(%rbx)
vmovups 0x20(%r12), %xmm0
vmovups %xmm0, 0x20(%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
vzeroupper
retq
| _ZL34ggml_backend_cpu_graph_plan_createP12ggml_backendPK11ggml_cgraph:
push r15
push r14
push r12
push rbx
sub rsp, 38h
mov r14, rsi
mov r12, [rdi+78h]
mov edi, 80h; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov edx, [r12]
mov rcx, [r12+8]
lea r15, [rsp+58h+var_50]
mov rdi, r15
mov rsi, r14
call _ggml_graph_plan
vmovups ymm0, ymmword ptr [r15]
vmovups ymm1, ymmword ptr [r15+10h]
vmovups ymmword ptr [rbx+10h], ymm1
vmovups ymmword ptr [rbx], ymm0
vmovups ymm0, ymmword ptr [r14]
vmovups ymm1, ymmword ptr [r14+20h]
vmovups ymm2, ymmword ptr [r14+30h]
vmovups ymmword ptr [rbx+60h], ymm2
vmovups ymmword ptr [rbx+50h], ymm1
vmovups ymmword ptr [rbx+30h], ymm0
mov rdi, [rbx]; unsigned __int64
test rdi, rdi
jz short loc_10B29
vzeroupper
call __Znam; operator new[](ulong)
mov [rbx+8], rax
loc_10B29:
vmovups xmm0, xmmword ptr [r12+20h]
vmovups xmmword ptr [rbx+20h], xmm0
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
vzeroupper
retn
| unsigned long long * ggml_backend_cpu_graph_plan_create(long long a1, long long a2, __m128 a3)
{
unsigned long long *result; // rax
_BYTE v14[80]; // [rsp+8h] [rbp-50h] BYREF
_R14 = a2;
_R12 = *(_QWORD *)(a1 + 120);
_RBX = (unsigned long long *)operator new(0x80uLL);
_R15 = v14;
ggml_graph_plan((long long)v14, a2, *(_DWORD *)_R12, *(_QWORD *)(_R12 + 8), a3);
__asm
{
vmovups ymm0, ymmword ptr [r15]
vmovups ymm1, ymmword ptr [r15+10h]
vmovups ymmword ptr [rbx+10h], ymm1
vmovups ymmword ptr [rbx], ymm0
vmovups ymm0, ymmword ptr [r14]
vmovups ymm1, ymmword ptr [r14+20h]
vmovups ymm2, ymmword ptr [r14+30h]
vmovups ymmword ptr [rbx+60h], ymm2
vmovups ymmword ptr [rbx+50h], ymm1
vmovups ymmword ptr [rbx+30h], ymm0
}
if ( *_RBX )
{
__asm { vzeroupper }
_RBX[1] = operator new[](*_RBX);
}
__asm
{
vmovups xmm0, xmmword ptr [r12+20h]
vmovups xmmword ptr [rbx+20h], xmm0
}
result = _RBX;
__asm { vzeroupper }
return result;
}
| ggml_backend_cpu_graph_plan_create:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV R12,qword ptr [RDI + 0x78]
MOV EDI,0x80
CALL 0x0010a8d0
MOV RBX,RAX
MOV EDX,dword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
LEA R15,[RSP + 0x8]
MOV RDI,R15
MOV RSI,R14
CALL 0x0010b140
VMOVUPS YMM0,ymmword ptr [R15]
VMOVUPS YMM1,ymmword ptr [R15 + 0x10]
VMOVUPS ymmword ptr [RBX + 0x10],YMM1
VMOVUPS ymmword ptr [RBX],YMM0
VMOVUPS YMM0,ymmword ptr [R14]
VMOVUPS YMM1,ymmword ptr [R14 + 0x20]
VMOVUPS YMM2,ymmword ptr [R14 + 0x30]
VMOVUPS ymmword ptr [RBX + 0x60],YMM2
VMOVUPS ymmword ptr [RBX + 0x50],YMM1
VMOVUPS ymmword ptr [RBX + 0x30],YMM0
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x00110b29
VZEROUPPER
CALL 0x0010a040
MOV qword ptr [RBX + 0x8],RAX
LAB_00110b29:
VMOVUPS XMM0,xmmword ptr [R12 + 0x20]
VMOVUPS xmmword ptr [RBX + 0x20],XMM0
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
VZEROUPPER
RET
|
/* ggml_backend_cpu_graph_plan_create(ggml_backend*, ggml_cgraph const*) */
ulong * ggml_backend_cpu_graph_plan_create(ggml_backend *param_1,ggml_cgraph *param_2)
{
int4 *puVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
ulong uVar8;
ulong uVar9;
ulong uVar10;
ulong uVar11;
ulong uVar12;
ulong *puVar13;
void *pvVar14;
ulong local_50;
ulong uStack_48;
ulong uStack_40;
ulong uStack_38;
ulong uStack_30;
ulong uStack_28;
puVar1 = *(int4 **)(param_1 + 0x78);
puVar13 = (ulong *)operator_new(0x80);
ggml_graph_plan(&local_50,param_2,*puVar1,*(int8 *)(puVar1 + 2));
puVar13[2] = uStack_40;
puVar13[3] = uStack_38;
puVar13[4] = uStack_30;
puVar13[5] = uStack_28;
*puVar13 = local_50;
puVar13[1] = uStack_48;
puVar13[2] = uStack_40;
puVar13[3] = uStack_38;
uVar2 = *(ulong *)param_2;
uVar3 = *(ulong *)(param_2 + 8);
uVar4 = *(ulong *)(param_2 + 0x10);
uVar5 = *(ulong *)(param_2 + 0x18);
uVar6 = *(ulong *)(param_2 + 0x20);
uVar7 = *(ulong *)(param_2 + 0x28);
uVar8 = *(ulong *)(param_2 + 0x30);
uVar9 = *(ulong *)(param_2 + 0x38);
uVar10 = *(ulong *)(param_2 + 0x38);
uVar11 = *(ulong *)(param_2 + 0x40);
uVar12 = *(ulong *)(param_2 + 0x48);
puVar13[0xc] = *(ulong *)(param_2 + 0x30);
puVar13[0xd] = uVar10;
puVar13[0xe] = uVar11;
puVar13[0xf] = uVar12;
puVar13[10] = uVar6;
puVar13[0xb] = uVar7;
puVar13[0xc] = uVar8;
puVar13[0xd] = uVar9;
puVar13[6] = uVar2;
puVar13[7] = uVar3;
puVar13[8] = uVar4;
puVar13[9] = uVar5;
if (*puVar13 != 0) {
pvVar14 = operator_new__(*puVar13);
puVar13[1] = (ulong)pvVar14;
}
uVar2 = *(ulong *)(puVar1 + 10);
puVar13[4] = *(ulong *)(puVar1 + 8);
puVar13[5] = uVar2;
return puVar13;
}
|
|
1,081 | my_rw_wrlock | eloqsql/mysys/thr_rwlock.c | int my_rw_wrlock(my_rw_lock_t *rwp)
{
pthread_mutex_lock(&rwp->lock);
rwp->waiters++; /* another writer queued */
my_rw_lock_assert_not_write_owner(rwp);
while (rwp->state)
pthread_cond_wait(&rwp->writers, &rwp->lock);
rwp->state = -1;
rwp->waiters--;
#ifdef SAFE_MUTEX
rwp->write_thread= pthread_self();
#endif
pthread_mutex_unlock(&rwp->lock);
return(0);
} | O3 | c | my_rw_wrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x24470
movl 0x8c(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x8c(%rbx)
cmpl $0x0, 0x88(%rbx)
je 0x27adc
leaq 0x58(%rbx), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x244f0
cmpl $0x0, 0x88(%rbx)
jne 0x27ac0
movl 0x8c(%rbx), %eax
decl %eax
movl $0xffffffff, 0x88(%rbx) # imm = 0xFFFFFFFF
movl %eax, 0x8c(%rbx)
movq %rbx, %rdi
callq 0x24210
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| my_rw_wrlock:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call _pthread_mutex_lock
mov eax, [rbx+8Ch]
lea ecx, [rax+1]
mov [rbx+8Ch], ecx
cmp dword ptr [rbx+88h], 0
jz short loc_27ADC
lea r14, [rbx+58h]
loc_27AC0:
mov rdi, r14
mov rsi, rbx
call _pthread_cond_wait
cmp dword ptr [rbx+88h], 0
jnz short loc_27AC0
mov eax, [rbx+8Ch]
dec eax
loc_27ADC:
mov dword ptr [rbx+88h], 0FFFFFFFFh
mov [rbx+8Ch], eax
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
pop rbx
pop r14
pop rbp
retn
| long long my_rw_wrlock(long long a1)
{
int v1; // eax
pthread_mutex_lock(a1);
v1 = *(_DWORD *)(a1 + 140);
*(_DWORD *)(a1 + 140) = v1 + 1;
if ( *(_DWORD *)(a1 + 136) )
{
do
pthread_cond_wait(a1 + 88, a1);
while ( *(_DWORD *)(a1 + 136) );
v1 = *(_DWORD *)(a1 + 140) - 1;
}
*(_DWORD *)(a1 + 136) = -1;
*(_DWORD *)(a1 + 140) = v1;
pthread_mutex_unlock(a1);
return 0LL;
}
| my_rw_wrlock:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x00124470
MOV EAX,dword ptr [RBX + 0x8c]
LEA ECX,[RAX + 0x1]
MOV dword ptr [RBX + 0x8c],ECX
CMP dword ptr [RBX + 0x88],0x0
JZ 0x00127adc
LEA R14,[RBX + 0x58]
LAB_00127ac0:
MOV RDI,R14
MOV RSI,RBX
CALL 0x001244f0
CMP dword ptr [RBX + 0x88],0x0
JNZ 0x00127ac0
MOV EAX,dword ptr [RBX + 0x8c]
DEC EAX
LAB_00127adc:
MOV dword ptr [RBX + 0x88],0xffffffff
MOV dword ptr [RBX + 0x8c],EAX
MOV RDI,RBX
CALL 0x00124210
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 my_rw_wrlock(pthread_mutex_t *param_1)
{
int iVar1;
pthread_mutex_lock(param_1);
iVar1 = *(int *)((long)param_1 + 0x8c);
*(int *)((long)param_1 + 0x8c) = iVar1 + 1;
if (*(int *)((long)param_1 + 0x88) != 0) {
do {
pthread_cond_wait((pthread_cond_t *)((long)param_1 + 0x58),param_1);
} while (*(int *)((long)param_1 + 0x88) != 0);
iVar1 = *(int *)((long)param_1 + 0x8c) + -1;
}
*(int4 *)((long)param_1 + 0x88) = 0xffffffff;
*(int *)((long)param_1 + 0x8c) = iVar1;
pthread_mutex_unlock(param_1);
return 0;
}
|
|
1,082 | str2int | eloqsql/strings/str2int.c | char *str2int(register const char *src, register int radix, long int lower,
long int upper, long int *val)
{
int sign; /* is number negative (+1) or positive (-1) */
int n; /* number of digits yet to be converted */
long limit; /* "largest" possible valid input */
long scale; /* the amount to multiply next digit by */
long sofar; /* the running value */
register int d; /* (negative of) next digit */
char *start;
int digits[32]; /* Room for numbers */
/* Make sure *val is sensible in case of error */
*val = 0;
/* Check that the radix is in the range 2..36 */
#ifndef DBUG_OFF
if (radix < 2 || radix > 36) {
errno=EDOM;
return NullS;
}
#endif
/* The basic problem is: how do we handle the conversion of
a number without resorting to machine-specific code to
check for overflow? Obviously, we have to ensure that
no calculation can overflow. We are guaranteed that the
"lower" and "upper" arguments are valid machine integers.
On sign-and-magnitude, twos-complement, and ones-complement
machines all, if +|n| is representable, so is -|n|, but on
twos complement machines the converse is not true. So the
"maximum" representable number has a negative representative.
Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest"
number we are concerned with. */
/* Calculate Limit using Scale as a scratch variable */
if ((limit = lower) > 0) limit = -limit;
if ((scale = upper) > 0) scale = -scale;
if (scale < limit) limit = scale;
/* Skip leading spaces and check for a sign.
Note: because on a 2s complement machine MinLong is a valid
integer but |MinLong| is not, we have to keep the current
converted value (and the scale!) as *negative* numbers,
so the sign is the opposite of what you might expect.
*/
while (my_isspace(&my_charset_latin1,*src)) src++;
sign = -1;
if (*src == '+') src++; else
if (*src == '-') src++, sign = 1;
/* Skip leading zeros so that we never compute a power of radix
in scale that we won't have a need for. Otherwise sticking
enough 0s in front of a number could cause the multiplication
to overflow when it neededn't.
*/
start=(char*) src;
while (*src == '0') src++;
/* Move over the remaining digits. We have to convert from left
to left in order to avoid overflow. Answer is after last digit.
*/
for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ;
/* Check that there is at least one digit */
if (start == src) {
errno=EDOM;
return NullS;
}
/* The invariant we want to maintain is that src is just
to the right of n digits, we've converted k digits to
sofar, scale = -radix**k, and scale < sofar < 0. Now
if the final number is to be within the original
Limit, we must have (to the left)*scale+sofar >= Limit,
or (to the left)*scale >= Limit-sofar, i.e. the digits
to the left of src must form an integer <= (Limit-sofar)/(scale).
In particular, this is true of the next digit. In our
incremental calculation of Limit,
IT IS VITAL that (-|N|)/(-|D|) = |N|/|D|
*/
for (sofar = 0, scale = -1; --n >= 1;)
{
if ((long) -(d=digits[n]) < limit) {
errno=ERANGE;
return NullS;
}
limit = (limit+d)/radix, sofar += d*scale; scale *= radix;
}
if (n == 0)
{
if ((long) -(d=digits[n]) < limit) /* get last digit */
{
errno=ERANGE;
return NullS;
}
sofar+=d*scale;
}
/* Now it might still happen that sofar = -32768 or its equivalent,
so we can't just multiply by the sign and check that the result
is in the range lower..upper. All of this caution is a right
pain in the neck. If only there were a standard routine which
says generate thus and such a signal on integer overflow...
But not enough machines can do it *SIGH*.
*/
if (sign < 0)
{
if (sofar < -LONG_MAX || (sofar= -sofar) > upper)
{
errno=ERANGE;
return NullS;
}
}
else if (sofar < lower)
{
errno=ERANGE;
return NullS;
}
*val = sofar;
errno=0; /* indicate that all went well */
return (char*) src;
} | O0 | c | str2int:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jle 0x79901
xorl %eax, %eax
subq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
jle 0x79919
xorl %eax, %eax
subq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jge 0x7992b
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x7992d
leaq 0x1fde3c(%rip), %rax # 0x277770
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x7995a
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x7992d
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x7997b
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x7999c
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x7999a
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl $0x1, -0x34(%rbp)
jmp 0x7999c
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0x799be
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x799a4
movl $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x799ef
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0x799ef
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
movl %eax, -0xe4(%rbp)
jmp 0x79a6e
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x41, %eax
jl 0x79a1c
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5a, %eax
jg 0x79a1c
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
subl $0x41, %eax
addl $0xa, %eax
movl %eax, -0xe8(%rbp)
jmp 0x79a62
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x61, %eax
jl 0x79a49
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7a, %eax
jg 0x79a49
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
subl $0x61, %eax
addl $0xa, %eax
movl %eax, -0xec(%rbp)
jmp 0x79a56
movl $0x7f, %eax
movl %eax, -0xec(%rbp)
jmp 0x79a56
movl -0xec(%rbp), %eax
movl %eax, -0xe8(%rbp)
movl -0xe8(%rbp), %eax
movl %eax, -0xe4(%rbp)
movl -0xe4(%rbp), %ecx
movslq -0x38(%rbp), %rax
movl %ecx, -0xe0(%rbp,%rax,4)
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0xed(%rbp)
jge 0x79a99
cmpl $0x14, -0x38(%rbp)
setl %al
movb %al, -0xed(%rbp)
movb -0xed(%rbp), %al
testb $0x1, %al
jne 0x79aa5
jmp 0x79ac1
jmp 0x79aa7
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x799c5
movq -0x60(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x79ae3
callq 0x24040
movl $0x21, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x79c30
movq $0x0, -0x50(%rbp)
movq $-0x1, -0x48(%rbp)
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
cmpl $0x1, %eax
jl 0x79b6b
movslq -0x38(%rbp), %rax
movl -0xe0(%rbp,%rax,4), %ecx
movl %ecx, -0x54(%rbp)
xorl %eax, %eax
subl %ecx, %eax
cltq
cmpq -0x40(%rbp), %rax
jge 0x79b33
callq 0x24040
movl $0x22, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x79c30
movq -0x40(%rbp), %rax
movslq -0x54(%rbp), %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
cqto
idivq %rcx
movq %rax, -0x40(%rbp)
movslq -0x54(%rbp), %rax
imulq -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movslq -0x14(%rbp), %rax
imulq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x79af3
cmpl $0x0, -0x38(%rbp)
jne 0x79bb4
movslq -0x38(%rbp), %rax
movl -0xe0(%rbp,%rax,4), %ecx
movl %ecx, -0x54(%rbp)
xorl %eax, %eax
subl %ecx, %eax
cltq
cmpq -0x40(%rbp), %rax
jge 0x79ba3
callq 0x24040
movl $0x22, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x79c30
movslq -0x54(%rbp), %rax
imulq -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x79bf1
movabsq $-0x7fffffffffffffff, %rax # imm = 0x8000000000000001
cmpq %rax, -0x50(%rbp)
jl 0x79bda
xorl %eax, %eax
subq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq -0x28(%rbp), %rax
jle 0x79bef
callq 0x24040
movl $0x22, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x79c30
jmp 0x79c12
movq -0x50(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x79c10
callq 0x24040
movl $0x22, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x79c30
jmp 0x79c12
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
callq 0x24040
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax)
| str2int:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
cmp rax, 0
jle short loc_79901
xor eax, eax
sub rax, [rbp+var_40]
mov [rbp+var_40], rax
loc_79901:
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
cmp rax, 0
jle short loc_79919
xor eax, eax
sub rax, [rbp+var_48]
mov [rbp+var_48], rax
loc_79919:
mov rax, [rbp+var_48]
cmp rax, [rbp+var_40]
jge short loc_7992B
mov rax, [rbp+var_48]
mov [rbp+var_40], rax
loc_7992B:
jmp short $+2
loc_7992D:
lea rax, my_charset_latin1
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jz short loc_7995A
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_7992D
loc_7995A:
mov [rbp+var_34], 0FFFFFFFFh
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 2Bh ; '+'
jnz short loc_7997B
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_7999C
loc_7997B:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
jnz short loc_7999A
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov [rbp+var_34], 1
loc_7999A:
jmp short $+2
loc_7999C:
mov rax, [rbp+var_10]
mov [rbp+var_60], rax
loc_799A4:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jnz short loc_799BE
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_799A4
loc_799BE:
mov [rbp+var_38], 0
loc_799C5:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jl short loc_799EF
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 39h ; '9'
jg short loc_799EF
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
sub eax, 30h ; '0'
mov [rbp+var_E4], eax
jmp short loc_79A6E
loc_799EF:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 41h ; 'A'
jl short loc_79A1C
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Ah ; 'Z'
jg short loc_79A1C
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
sub eax, 41h ; 'A'
add eax, 0Ah
mov [rbp+var_E8], eax
jmp short loc_79A62
loc_79A1C:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 61h ; 'a'
jl short loc_79A49
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 7Ah ; 'z'
jg short loc_79A49
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
sub eax, 61h ; 'a'
add eax, 0Ah
mov [rbp+var_EC], eax
jmp short loc_79A56
loc_79A49:
mov eax, 7Fh
mov [rbp+var_EC], eax
jmp short $+2
loc_79A56:
mov eax, [rbp+var_EC]
mov [rbp+var_E8], eax
loc_79A62:
mov eax, [rbp+var_E8]
mov [rbp+var_E4], eax
loc_79A6E:
mov ecx, [rbp+var_E4]
movsxd rax, [rbp+var_38]
mov [rbp+rax*4+var_E0], ecx
xor eax, eax
cmp ecx, [rbp+var_14]
mov [rbp+var_ED], al
jge short loc_79A99
cmp [rbp+var_38], 14h
setl al
mov [rbp+var_ED], al
loc_79A99:
mov al, [rbp+var_ED]
test al, 1
jnz short loc_79AA5
jmp short loc_79AC1
loc_79AA5:
jmp short $+2
loc_79AA7:
mov eax, [rbp+var_38]
add eax, 1
mov [rbp+var_38], eax
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp loc_799C5
loc_79AC1:
mov rax, [rbp+var_60]
cmp rax, [rbp+var_10]
jnz short loc_79AE3
call ___errno_location
mov dword ptr [rax], 21h ; '!'
mov [rbp+var_8], 0
jmp loc_79C30
loc_79AE3:
mov [rbp+var_50], 0
mov [rbp+var_48], 0FFFFFFFFFFFFFFFFh
loc_79AF3:
mov eax, [rbp+var_38]
add eax, 0FFFFFFFFh
mov [rbp+var_38], eax
cmp eax, 1
jl short loc_79B6B
movsxd rax, [rbp+var_38]
mov ecx, [rbp+rax*4+var_E0]
mov [rbp+var_54], ecx
xor eax, eax
sub eax, ecx
cdqe
cmp rax, [rbp+var_40]
jge short loc_79B33
call ___errno_location
mov dword ptr [rax], 22h ; '"'
mov [rbp+var_8], 0
jmp loc_79C30
loc_79B33:
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_54]
add rax, rcx
movsxd rcx, [rbp+var_14]
cqo
idiv rcx
mov [rbp+var_40], rax
movsxd rax, [rbp+var_54]
imul rax, [rbp+var_48]
add rax, [rbp+var_50]
mov [rbp+var_50], rax
movsxd rax, [rbp+var_14]
imul rax, [rbp+var_48]
mov [rbp+var_48], rax
jmp short loc_79AF3
loc_79B6B:
cmp [rbp+var_38], 0
jnz short loc_79BB4
movsxd rax, [rbp+var_38]
mov ecx, [rbp+rax*4+var_E0]
mov [rbp+var_54], ecx
xor eax, eax
sub eax, ecx
cdqe
cmp rax, [rbp+var_40]
jge short loc_79BA3
call ___errno_location
mov dword ptr [rax], 22h ; '"'
mov [rbp+var_8], 0
jmp loc_79C30
loc_79BA3:
movsxd rax, [rbp+var_54]
imul rax, [rbp+var_48]
add rax, [rbp+var_50]
mov [rbp+var_50], rax
loc_79BB4:
cmp [rbp+var_34], 0
jge short loc_79BF1
mov rax, 8000000000000001h
cmp [rbp+var_50], rax
jl short loc_79BDA
xor eax, eax
sub rax, [rbp+var_50]
mov [rbp+var_50], rax
cmp rax, [rbp+var_28]
jle short loc_79BEF
loc_79BDA:
call ___errno_location
mov dword ptr [rax], 22h ; '"'
mov [rbp+var_8], 0
jmp short loc_79C30
loc_79BEF:
jmp short loc_79C12
loc_79BF1:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_20]
jge short loc_79C10
call ___errno_location
mov dword ptr [rax], 22h ; '"'
mov [rbp+var_8], 0
jmp short loc_79C30
loc_79C10:
jmp short $+2
loc_79C12:
mov rcx, [rbp+var_50]
mov rax, [rbp+var_30]
mov [rax], rcx
call ___errno_location
mov dword ptr [rax], 0
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_79C30:
mov rax, [rbp+var_8]
add rsp, 0F0h
pop rbp
retn
| _BYTE * str2int(_BYTE *a1, int a2, long long a3, long long a4, long long *a5)
{
bool v6; // [rsp+3h] [rbp-EDh]
int v7; // [rsp+4h] [rbp-ECh]
int v8; // [rsp+8h] [rbp-E8h]
int v9; // [rsp+Ch] [rbp-E4h]
_DWORD v10[32]; // [rsp+10h] [rbp-E0h]
_BYTE *v11; // [rsp+90h] [rbp-60h]
int v12; // [rsp+9Ch] [rbp-54h]
long long v13; // [rsp+A0h] [rbp-50h]
long long i; // [rsp+A8h] [rbp-48h]
long long v15; // [rsp+B0h] [rbp-40h]
int v16; // [rsp+B8h] [rbp-38h]
int v17; // [rsp+BCh] [rbp-34h]
long long *v18; // [rsp+C0h] [rbp-30h]
long long v19; // [rsp+C8h] [rbp-28h]
long long v20; // [rsp+D0h] [rbp-20h]
int v21; // [rsp+DCh] [rbp-14h]
_BYTE *v22; // [rsp+E0h] [rbp-10h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
*a5 = 0LL;
v15 = v20;
if ( v20 > 0 )
v15 = -v15;
i = v19;
if ( v19 > 0 )
i = -i;
if ( i < v15 )
v15 = i;
while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + (unsigned __int8)*v22 + 1LL) & 8) != 0 )
++v22;
v17 = -1;
if ( *v22 == 43 )
{
++v22;
}
else if ( *v22 == 45 )
{
++v22;
v17 = 1;
}
v11 = v22;
while ( *v22 == 48 )
++v22;
v16 = 0;
while ( 1 )
{
if ( (char)*v22 < 48 || (char)*v22 > 57 )
{
if ( (char)*v22 < 65 || (char)*v22 > 90 )
{
v7 = (char)*v22 < 97 || (char)*v22 > 122 ? 127 : (char)*v22 - 97 + 10;
v8 = v7;
}
else
{
v8 = (char)*v22 - 65 + 10;
}
v9 = v8;
}
else
{
v9 = (char)*v22 - 48;
}
v10[v16] = v9;
v6 = 0;
if ( v9 < v21 )
v6 = v16 < 20;
if ( !v6 )
break;
++v16;
++v22;
}
if ( v11 != v22 )
{
v13 = 0LL;
for ( i = -1LL; --v16 >= 1; i *= v21 )
{
v12 = v10[v16];
if ( -v12 < v15 )
goto LABEL_49;
v15 = (v12 + v15) / v21;
v13 += i * v12;
}
if ( !v16 )
{
v12 = v10[0];
if ( -v10[0] < v15 )
goto LABEL_49;
v13 += i * v12;
}
if ( v17 < 0 )
{
if ( v13 == 0x8000000000000000LL )
goto LABEL_49;
v13 = -v13;
if ( v13 > v19 )
goto LABEL_49;
LABEL_50:
*v18 = v13;
*(_DWORD *)__errno_location() = 0;
return v22;
}
if ( v13 >= v20 )
goto LABEL_50;
LABEL_49:
*(_DWORD *)__errno_location() = 34;
return 0LL;
}
*(_DWORD *)__errno_location() = 33;
return 0LL;
}
| str2int:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
CMP RAX,0x0
JLE 0x00179901
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
LAB_00179901:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
CMP RAX,0x0
JLE 0x00179919
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
LAB_00179919:
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x40]
JGE 0x0017992b
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
LAB_0017992b:
JMP 0x0017992d
LAB_0017992d:
LEA RAX,[0x377770]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0017995a
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0017992d
LAB_0017995a:
MOV dword ptr [RBP + -0x34],0xffffffff
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2b
JNZ 0x0017997b
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0017999c
LAB_0017997b:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
JNZ 0x0017999a
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV dword ptr [RBP + -0x34],0x1
LAB_0017999a:
JMP 0x0017999c
LAB_0017999c:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x60],RAX
LAB_001799a4:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JNZ 0x001799be
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001799a4
LAB_001799be:
MOV dword ptr [RBP + -0x38],0x0
LAB_001799c5:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JL 0x001799ef
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x39
JG 0x001799ef
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
SUB EAX,0x30
MOV dword ptr [RBP + -0xe4],EAX
JMP 0x00179a6e
LAB_001799ef:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x41
JL 0x00179a1c
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5a
JG 0x00179a1c
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
SUB EAX,0x41
ADD EAX,0xa
MOV dword ptr [RBP + -0xe8],EAX
JMP 0x00179a62
LAB_00179a1c:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x61
JL 0x00179a49
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7a
JG 0x00179a49
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
SUB EAX,0x61
ADD EAX,0xa
MOV dword ptr [RBP + -0xec],EAX
JMP 0x00179a56
LAB_00179a49:
MOV EAX,0x7f
MOV dword ptr [RBP + -0xec],EAX
JMP 0x00179a56
LAB_00179a56:
MOV EAX,dword ptr [RBP + -0xec]
MOV dword ptr [RBP + -0xe8],EAX
LAB_00179a62:
MOV EAX,dword ptr [RBP + -0xe8]
MOV dword ptr [RBP + -0xe4],EAX
LAB_00179a6e:
MOV ECX,dword ptr [RBP + -0xe4]
MOVSXD RAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + RAX*0x4 + -0xe0],ECX
XOR EAX,EAX
CMP ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RBP + -0xed],AL
JGE 0x00179a99
CMP dword ptr [RBP + -0x38],0x14
SETL AL
MOV byte ptr [RBP + -0xed],AL
LAB_00179a99:
MOV AL,byte ptr [RBP + -0xed]
TEST AL,0x1
JNZ 0x00179aa5
JMP 0x00179ac1
LAB_00179aa5:
JMP 0x00179aa7
LAB_00179aa7:
MOV EAX,dword ptr [RBP + -0x38]
ADD EAX,0x1
MOV dword ptr [RBP + -0x38],EAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001799c5
LAB_00179ac1:
MOV RAX,qword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x00179ae3
CALL 0x00124040
MOV dword ptr [RAX],0x21
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00179c30
LAB_00179ae3:
MOV qword ptr [RBP + -0x50],0x0
MOV qword ptr [RBP + -0x48],-0x1
LAB_00179af3:
MOV EAX,dword ptr [RBP + -0x38]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x38],EAX
CMP EAX,0x1
JL 0x00179b6b
MOVSXD RAX,dword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + RAX*0x4 + -0xe0]
MOV dword ptr [RBP + -0x54],ECX
XOR EAX,EAX
SUB EAX,ECX
CDQE
CMP RAX,qword ptr [RBP + -0x40]
JGE 0x00179b33
CALL 0x00124040
MOV dword ptr [RAX],0x22
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00179c30
LAB_00179b33:
MOV RAX,qword ptr [RBP + -0x40]
MOVSXD RCX,dword ptr [RBP + -0x54]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RBP + -0x14]
CQO
IDIV RCX
MOV qword ptr [RBP + -0x40],RAX
MOVSXD RAX,dword ptr [RBP + -0x54]
IMUL RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOVSXD RAX,dword ptr [RBP + -0x14]
IMUL RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00179af3
LAB_00179b6b:
CMP dword ptr [RBP + -0x38],0x0
JNZ 0x00179bb4
MOVSXD RAX,dword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + RAX*0x4 + -0xe0]
MOV dword ptr [RBP + -0x54],ECX
XOR EAX,EAX
SUB EAX,ECX
CDQE
CMP RAX,qword ptr [RBP + -0x40]
JGE 0x00179ba3
CALL 0x00124040
MOV dword ptr [RAX],0x22
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00179c30
LAB_00179ba3:
MOVSXD RAX,dword ptr [RBP + -0x54]
IMUL RAX,qword ptr [RBP + -0x48]
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
LAB_00179bb4:
CMP dword ptr [RBP + -0x34],0x0
JGE 0x00179bf1
MOV RAX,-0x7fffffffffffffff
CMP qword ptr [RBP + -0x50],RAX
JL 0x00179bda
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,qword ptr [RBP + -0x28]
JLE 0x00179bef
LAB_00179bda:
CALL 0x00124040
MOV dword ptr [RAX],0x22
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00179c30
LAB_00179bef:
JMP 0x00179c12
LAB_00179bf1:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x20]
JGE 0x00179c10
CALL 0x00124040
MOV dword ptr [RAX],0x22
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00179c30
LAB_00179c10:
JMP 0x00179c12
LAB_00179c12:
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
CALL 0x00124040
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_00179c30:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xf0
POP RBP
RET
|
byte * str2int(byte *param_1,int param_2,long param_3,long param_4,long *param_5)
{
int *piVar1;
int local_f4;
int local_f0;
int local_ec;
int aiStack_e8 [32];
byte *local_68;
int local_5c;
long local_58;
long local_50;
long local_48;
int local_40;
int local_3c;
long *local_38;
long local_30;
long local_28;
int local_1c;
byte *local_18;
byte *local_10;
*param_5 = 0;
local_48 = param_3;
if (0 < param_3) {
local_48 = -param_3;
}
local_50 = param_4;
if (0 < param_4) {
local_50 = -param_4;
}
local_18 = param_1;
if (local_50 < local_48) {
local_48 = local_50;
}
while ((PTR_ctype_latin1_003777b0[(ulong)*local_18 + 1] & 8) != 0) {
local_18 = local_18 + 1;
}
local_3c = -1;
if (*local_18 == 0x2b) {
local_18 = local_18 + 1;
}
else if (*local_18 == 0x2d) {
local_18 = local_18 + 1;
local_3c = 1;
}
local_68 = local_18;
for (; *local_18 == 0x30; local_18 = local_18 + 1) {
}
local_40 = 0;
local_38 = param_5;
local_30 = param_4;
local_28 = param_3;
local_1c = param_2;
while( true ) {
if (((char)*local_18 < '0') || ('9' < (char)*local_18)) {
if (((char)*local_18 < 'A') || ('Z' < (char)*local_18)) {
if (((char)*local_18 < 'a') || ('z' < (char)*local_18)) {
local_f4 = 0x7f;
}
else {
local_f4 = (char)*local_18 + -0x57;
}
local_f0 = local_f4;
}
else {
local_f0 = (char)*local_18 + -0x37;
}
local_ec = local_f0;
}
else {
local_ec = (char)*local_18 + -0x30;
}
aiStack_e8[local_40] = local_ec;
if (local_1c <= local_ec || 0x13 < local_40) break;
local_40 = local_40 + 1;
local_18 = local_18 + 1;
}
if (local_68 == local_18) {
piVar1 = __errno_location();
*piVar1 = 0x21;
local_10 = (byte *)0x0;
}
else {
local_58 = 0;
local_50 = -1;
while (local_40 = local_40 + -1, 0 < local_40) {
local_5c = aiStack_e8[local_40];
if (-local_5c < local_48) {
piVar1 = __errno_location();
*piVar1 = 0x22;
return (byte *)0x0;
}
local_48 = (local_48 + local_5c) / (long)local_1c;
local_58 = local_5c * local_50 + local_58;
local_50 = local_1c * local_50;
}
if (local_40 == 0) {
local_5c = aiStack_e8[0];
if (-aiStack_e8[0] < local_48) {
piVar1 = __errno_location();
*piVar1 = 0x22;
return (byte *)0x0;
}
local_58 = aiStack_e8[0] * local_50 + local_58;
}
if (local_3c < 0) {
if ((local_58 < -0x7fffffffffffffff) || (local_58 = -local_58, local_30 < local_58)) {
piVar1 = __errno_location();
*piVar1 = 0x22;
return (byte *)0x0;
}
}
else if (local_58 < local_28) {
piVar1 = __errno_location();
*piVar1 = 0x22;
return (byte *)0x0;
}
*local_38 = local_58;
piVar1 = __errno_location();
*piVar1 = 0;
local_10 = local_18;
}
return local_10;
}
|
|
1,083 | str2int | eloqsql/strings/str2int.c | char *str2int(register const char *src, register int radix, long int lower,
long int upper, long int *val)
{
int sign; /* is number negative (+1) or positive (-1) */
int n; /* number of digits yet to be converted */
long limit; /* "largest" possible valid input */
long scale; /* the amount to multiply next digit by */
long sofar; /* the running value */
register int d; /* (negative of) next digit */
char *start;
int digits[32]; /* Room for numbers */
/* Make sure *val is sensible in case of error */
*val = 0;
/* Check that the radix is in the range 2..36 */
#ifndef DBUG_OFF
if (radix < 2 || radix > 36) {
errno=EDOM;
return NullS;
}
#endif
/* The basic problem is: how do we handle the conversion of
a number without resorting to machine-specific code to
check for overflow? Obviously, we have to ensure that
no calculation can overflow. We are guaranteed that the
"lower" and "upper" arguments are valid machine integers.
On sign-and-magnitude, twos-complement, and ones-complement
machines all, if +|n| is representable, so is -|n|, but on
twos complement machines the converse is not true. So the
"maximum" representable number has a negative representative.
Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest"
number we are concerned with. */
/* Calculate Limit using Scale as a scratch variable */
if ((limit = lower) > 0) limit = -limit;
if ((scale = upper) > 0) scale = -scale;
if (scale < limit) limit = scale;
/* Skip leading spaces and check for a sign.
Note: because on a 2s complement machine MinLong is a valid
integer but |MinLong| is not, we have to keep the current
converted value (and the scale!) as *negative* numbers,
so the sign is the opposite of what you might expect.
*/
while (my_isspace(&my_charset_latin1,*src)) src++;
sign = -1;
if (*src == '+') src++; else
if (*src == '-') src++, sign = 1;
/* Skip leading zeros so that we never compute a power of radix
in scale that we won't have a need for. Otherwise sticking
enough 0s in front of a number could cause the multiplication
to overflow when it neededn't.
*/
start=(char*) src;
while (*src == '0') src++;
/* Move over the remaining digits. We have to convert from left
to left in order to avoid overflow. Answer is after last digit.
*/
for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ;
/* Check that there is at least one digit */
if (start == src) {
errno=EDOM;
return NullS;
}
/* The invariant we want to maintain is that src is just
to the right of n digits, we've converted k digits to
sofar, scale = -radix**k, and scale < sofar < 0. Now
if the final number is to be within the original
Limit, we must have (to the left)*scale+sofar >= Limit,
or (to the left)*scale >= Limit-sofar, i.e. the digits
to the left of src must form an integer <= (Limit-sofar)/(scale).
In particular, this is true of the next digit. In our
incremental calculation of Limit,
IT IS VITAL that (-|N|)/(-|D|) = |N|/|D|
*/
for (sofar = 0, scale = -1; --n >= 1;)
{
if ((long) -(d=digits[n]) < limit) {
errno=ERANGE;
return NullS;
}
limit = (limit+d)/radix, sofar += d*scale; scale *= radix;
}
if (n == 0)
{
if ((long) -(d=digits[n]) < limit) /* get last digit */
{
errno=ERANGE;
return NullS;
}
sofar+=d*scale;
}
/* Now it might still happen that sofar = -32768 or its equivalent,
so we can't just multiply by the sign and check that the result
is in the range lower..upper. All of this caution is a right
pain in the neck. If only there were a standard routine which
says generate thus and such a signal on integer overflow...
But not enough machines can do it *SIGH*.
*/
if (sign < 0)
{
if (sofar < -LONG_MAX || (sofar= -sofar) > upper)
{
errno=ERANGE;
return NullS;
}
}
else if (sofar < lower)
{
errno=ERANGE;
return NullS;
}
*val = sofar;
errno=0; /* indicate that all went well */
return (char*) src;
} | O3 | c | str2int:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r9
movq $0x0, (%r8)
movq %rdx, %rax
negq %rax
cmovsq %rdx, %rax
movq %rcx, %rdx
negq %rdx
cmovnsq %rcx, %rdx
leaq 0x2badf1(%rip), %r10 # 0x316760
movq 0x40(%r10), %r11
movzbl (%rdi), %r10d
incq %rdi
testb $0x8, 0x1(%r11,%r10)
jne 0x5b973
negq %rax
cmpq %rax, %rdx
cmovlq %rdx, %rax
cmpl $0x2b, %r10d
je 0x5b9a0
cmpl $0x2d, %r10d
jne 0x5b99d
xorl %r10d, %r10d
jmp 0x5b9a3
decq %rdi
movb $0x1, %r10b
leaq -0x1(%rdi), %rbx
movb 0x1(%rbx), %r14b
incq %rbx
cmpb $0x30, %r14b
je 0x5b9a7
xorl %r11d, %r11d
xorl %edx, %edx
leal -0x30(%r14), %r15d
cmpb $0x9, %r15b
ja 0x5b9c9
movzbl %r15b, %r15d
jmp 0x5b9f5
leal -0x41(%r14), %r15d
cmpb $0x19, %r15b
ja 0x5b9dd
movzbl %r14b, %r15d
addl $-0x37, %r15d
jmp 0x5b9f5
leal -0x61(%r14), %r12d
movl $0x7f, %r15d
cmpb $0x19, %r12b
ja 0x5b9f5
movzbl %r14b, %r15d
addl $-0x57, %r15d
movl %r15d, -0xa0(%rbp,%rdx,4)
cmpl %esi, %r15d
jge 0x5ba17
cmpq $0x13, %rdx
ja 0x5ba17
incq %rdx
movb 0x1(%rbx), %r14b
incq %rbx
incl %r11d
jmp 0x5b9b9
cmpq %rdi, %rbx
je 0x5ba5f
cmpq $0x2, %rdx
jb 0x5ba67
movslq %esi, %r14
movq $-0x1, %rdi
xorl %esi, %esi
decl %r11d
movslq -0xa0(%rbp,%r11,4), %r15
movq %r15, %rdx
negq %rdx
cmpq %rdx, %rax
jg 0x5baa2
addq %r15, %rax
cqto
idivq %r14
imulq %rdi, %r15
addq %r15, %rsi
imulq %r14, %rdi
cmpl $0x1, %r11d
jg 0x5ba2e
jmp 0x5ba74
movl $0x21, %r14d
jmp 0x5baa8
xorl %esi, %esi
decl %edx
jne 0x5ba8d
movq $-0x1, %rdi
movslq -0xa0(%rbp), %rdx
movq %rdx, %r11
negq %r11
cmpq %r11, %rax
jg 0x5baa2
imulq %rdx, %rdi
addq %rdi, %rsi
testb %r10b, %r10b
je 0x5bac5
negq %rsi
seto %al
cmpq %rcx, %rsi
setg %cl
orb %al, %cl
je 0x5baca
movl $0x22, %r14d
xorl %ebx, %ebx
callq 0x24050
movl %r14d, (%rax)
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpq %r9, %rsi
jl 0x5baa2
movq %rsi, (%r8)
xorl %r14d, %r14d
jmp 0x5baaa
nop
| str2int:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 80h
mov r9, rdx
mov qword ptr [r8], 0
mov rax, rdx
neg rax
cmovs rax, rdx
mov rdx, rcx
neg rdx
cmovns rdx, rcx
lea r10, my_charset_latin1
mov r11, [r10+40h]
loc_5B973:
movzx r10d, byte ptr [rdi]
inc rdi
test byte ptr [r11+r10+1], 8
jnz short loc_5B973
neg rax
cmp rdx, rax
cmovl rax, rdx
cmp r10d, 2Bh ; '+'
jz short loc_5B9A0
cmp r10d, 2Dh ; '-'
jnz short loc_5B99D
xor r10d, r10d
jmp short loc_5B9A3
loc_5B99D:
dec rdi
loc_5B9A0:
mov r10b, 1
loc_5B9A3:
lea rbx, [rdi-1]
loc_5B9A7:
mov r14b, [rbx+1]
inc rbx
cmp r14b, 30h ; '0'
jz short loc_5B9A7
xor r11d, r11d
xor edx, edx
loc_5B9B9:
lea r15d, [r14-30h]
cmp r15b, 9
ja short loc_5B9C9
movzx r15d, r15b
jmp short loc_5B9F5
loc_5B9C9:
lea r15d, [r14-41h]
cmp r15b, 19h
ja short loc_5B9DD
movzx r15d, r14b
add r15d, 0FFFFFFC9h
jmp short loc_5B9F5
loc_5B9DD:
lea r12d, [r14-61h]
mov r15d, 7Fh
cmp r12b, 19h
ja short loc_5B9F5
movzx r15d, r14b
add r15d, 0FFFFFFA9h
loc_5B9F5:
mov [rbp+rdx*4+var_A0], r15d
cmp r15d, esi
jge short loc_5BA17
cmp rdx, 13h
ja short loc_5BA17
inc rdx
mov r14b, [rbx+1]
inc rbx
inc r11d
jmp short loc_5B9B9
loc_5BA17:
cmp rbx, rdi
jz short loc_5BA5F
cmp rdx, 2
jb short loc_5BA67
movsxd r14, esi
mov rdi, 0FFFFFFFFFFFFFFFFh
xor esi, esi
loc_5BA2E:
dec r11d
movsxd r15, [rbp+r11*4+var_A0]
mov rdx, r15
neg rdx
cmp rax, rdx
jg short loc_5BAA2
add rax, r15
cqo
idiv r14
imul r15, rdi
add rsi, r15
imul rdi, r14
cmp r11d, 1
jg short loc_5BA2E
jmp short loc_5BA74
loc_5BA5F:
mov r14d, 21h ; '!'
jmp short loc_5BAA8
loc_5BA67:
xor esi, esi
dec edx
jnz short loc_5BA8D
mov rdi, 0FFFFFFFFFFFFFFFFh
loc_5BA74:
movsxd rdx, [rbp+var_A0]
mov r11, rdx
neg r11
cmp rax, r11
jg short loc_5BAA2
imul rdi, rdx
add rsi, rdi
loc_5BA8D:
test r10b, r10b
jz short loc_5BAC5
neg rsi
seto al
cmp rsi, rcx
setnle cl
or cl, al
jz short loc_5BACA
loc_5BAA2:
mov r14d, 22h ; '"'
loc_5BAA8:
xor ebx, ebx
loc_5BAAA:
call ___errno_location
mov [rax], r14d
mov rax, rbx
add rsp, 80h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_5BAC5:
cmp rsi, r9
jl short loc_5BAA2
loc_5BACA:
mov [r8], rsi
xor r14d, r14d
jmp short loc_5BAAA
| long long str2int(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
long long v6; // rax
long long v7; // rdx
long long v8; // r10
long long v9; // rax
char v10; // r10
long long v11; // rbx
unsigned __int8 v12; // r14
long long v13; // r11
unsigned long long i; // rdx
int v15; // r15d
long long v16; // r14
long long v17; // r15
int v18; // r14d
_DWORD v20[40]; // [rsp+0h] [rbp-A0h]
*a5 = 0LL;
v6 = -a3;
if ( a3 > 0 )
v6 = a3;
v7 = -a4;
if ( a4 <= 0 )
v7 = a4;
do
v8 = *(unsigned __int8 *)a1++;
while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v8 + 1) & 8) != 0 );
v9 = -v6;
if ( v7 < v9 )
v9 = v7;
if ( (_DWORD)v8 != 43 )
{
if ( (_DWORD)v8 == 45 )
{
v10 = 0;
goto LABEL_13;
}
--a1;
}
v10 = 1;
LABEL_13:
v11 = a1 - 1;
do
v12 = *(_BYTE *)++v11;
while ( v12 == 48 );
LODWORD(v13) = 0;
for ( i = 0LL; ; ++i )
{
LOBYTE(v15) = v12 - 48;
if ( (unsigned __int8)(v12 - 48) > 9u )
{
if ( (unsigned __int8)(v12 - 65) > 0x19u )
{
v15 = 127;
if ( (unsigned __int8)(v12 - 97) <= 0x19u )
v15 = v12 - 87;
}
else
{
v15 = v12 - 55;
}
}
else
{
v15 = (unsigned __int8)v15;
}
v20[i] = v15;
if ( v15 >= (int)a2 || i > 0x13 )
break;
v12 = *(_BYTE *)++v11;
LODWORD(v13) = v13 + 1;
}
if ( v11 != a1 )
{
if ( i >= 2 )
{
v16 = (int)a2;
a1 = -1LL;
a2 = 0LL;
while ( 1 )
{
v13 = (unsigned int)(v13 - 1);
v17 = (int)v20[v13];
i = -v17;
if ( v9 > -v17 )
goto LABEL_38;
v9 = (v17 + v9) / v16;
a2 += a1 * v17;
a1 *= v16;
if ( (int)v13 <= 1 )
goto LABEL_34;
}
}
a2 = 0LL;
i = (unsigned int)(i - 1);
if ( !(_DWORD)i )
{
a1 = -1LL;
LABEL_34:
i = v20[0];
if ( v9 > -(long long)v20[0] )
goto LABEL_38;
a1 *= v20[0];
a2 += a1;
}
if ( v10 )
{
a2 = -a2;
if ( __OFSUB__(a2, 1LL) || a2 > a4 )
{
LABEL_38:
v18 = 34;
goto LABEL_39;
}
}
else if ( a2 < a3 )
{
goto LABEL_38;
}
*a5 = a2;
v18 = 0;
goto LABEL_40;
}
v18 = 33;
LABEL_39:
v11 = 0LL;
LABEL_40:
*(_DWORD *)__errno_location(a1, a2, i) = v18;
return v11;
}
| str2int:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x80
MOV R9,RDX
MOV qword ptr [R8],0x0
MOV RAX,RDX
NEG RAX
CMOVS RAX,RDX
MOV RDX,RCX
NEG RDX
CMOVNS RDX,RCX
LEA R10,[0x416760]
MOV R11,qword ptr [R10 + 0x40]
LAB_0015b973:
MOVZX R10D,byte ptr [RDI]
INC RDI
TEST byte ptr [R11 + R10*0x1 + 0x1],0x8
JNZ 0x0015b973
NEG RAX
CMP RDX,RAX
CMOVL RAX,RDX
CMP R10D,0x2b
JZ 0x0015b9a0
CMP R10D,0x2d
JNZ 0x0015b99d
XOR R10D,R10D
JMP 0x0015b9a3
LAB_0015b99d:
DEC RDI
LAB_0015b9a0:
MOV R10B,0x1
LAB_0015b9a3:
LEA RBX,[RDI + -0x1]
LAB_0015b9a7:
MOV R14B,byte ptr [RBX + 0x1]
INC RBX
CMP R14B,0x30
JZ 0x0015b9a7
XOR R11D,R11D
XOR EDX,EDX
LAB_0015b9b9:
LEA R15D,[R14 + -0x30]
CMP R15B,0x9
JA 0x0015b9c9
MOVZX R15D,R15B
JMP 0x0015b9f5
LAB_0015b9c9:
LEA R15D,[R14 + -0x41]
CMP R15B,0x19
JA 0x0015b9dd
MOVZX R15D,R14B
ADD R15D,-0x37
JMP 0x0015b9f5
LAB_0015b9dd:
LEA R12D,[R14 + -0x61]
MOV R15D,0x7f
CMP R12B,0x19
JA 0x0015b9f5
MOVZX R15D,R14B
ADD R15D,-0x57
LAB_0015b9f5:
MOV dword ptr [RBP + RDX*0x4 + -0xa0],R15D
CMP R15D,ESI
JGE 0x0015ba17
CMP RDX,0x13
JA 0x0015ba17
INC RDX
MOV R14B,byte ptr [RBX + 0x1]
INC RBX
INC R11D
JMP 0x0015b9b9
LAB_0015ba17:
CMP RBX,RDI
JZ 0x0015ba5f
CMP RDX,0x2
JC 0x0015ba67
MOVSXD R14,ESI
MOV RDI,-0x1
XOR ESI,ESI
LAB_0015ba2e:
DEC R11D
MOVSXD R15,dword ptr [RBP + R11*0x4 + -0xa0]
MOV RDX,R15
NEG RDX
CMP RAX,RDX
JG 0x0015baa2
ADD RAX,R15
CQO
IDIV R14
IMUL R15,RDI
ADD RSI,R15
IMUL RDI,R14
CMP R11D,0x1
JG 0x0015ba2e
JMP 0x0015ba74
LAB_0015ba5f:
MOV R14D,0x21
JMP 0x0015baa8
LAB_0015ba67:
XOR ESI,ESI
DEC EDX
JNZ 0x0015ba8d
MOV RDI,-0x1
LAB_0015ba74:
MOVSXD RDX,dword ptr [RBP + -0xa0]
MOV R11,RDX
NEG R11
CMP RAX,R11
JG 0x0015baa2
IMUL RDI,RDX
ADD RSI,RDI
LAB_0015ba8d:
TEST R10B,R10B
JZ 0x0015bac5
NEG RSI
SETO AL
CMP RSI,RCX
SETG CL
OR CL,AL
JZ 0x0015baca
LAB_0015baa2:
MOV R14D,0x22
LAB_0015baa8:
XOR EBX,EBX
LAB_0015baaa:
CALL 0x00124050
MOV dword ptr [RAX],R14D
MOV RAX,RBX
ADD RSP,0x80
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0015bac5:
CMP RSI,R9
JL 0x0015baa2
LAB_0015baca:
MOV qword ptr [R8],RSI
XOR R14D,R14D
JMP 0x0015baaa
|
byte * str2int(byte *param_1,int param_2,long param_3,long param_4,long *param_5)
{
long lVar1;
int *piVar2;
ulong uVar3;
byte *pbVar4;
long lVar5;
byte *pbVar6;
long lVar7;
ulong uVar8;
byte bVar9;
int iVar10;
uint uVar11;
long lVar12;
bool bVar13;
uint local_a8 [32];
*param_5 = 0;
lVar5 = -param_3;
if (0 < param_3) {
lVar5 = param_3;
}
lVar7 = -param_4;
if (param_4 < 1) {
lVar7 = param_4;
}
do {
pbVar4 = param_1;
bVar9 = *pbVar4;
param_1 = pbVar4 + 1;
} while ((PTR_ctype_latin1_004167a0[(ulong)bVar9 + 1] & 8) != 0);
lVar1 = -lVar5;
if (SBORROW8(lVar7,-lVar5) != lVar7 + lVar5 < 0) {
lVar1 = lVar7;
}
pbVar6 = param_1;
if ((bVar9 == 0x2b) || (pbVar6 = pbVar4, bVar9 != 0x2d)) {
bVar13 = true;
}
else {
bVar13 = false;
pbVar6 = param_1;
}
pbVar4 = pbVar6 + -1;
do {
bVar9 = pbVar4[1];
pbVar4 = pbVar4 + 1;
} while (bVar9 == 0x30);
uVar8 = 0;
uVar3 = 0;
while( true ) {
if ((byte)(bVar9 - 0x30) < 10) {
uVar11 = (uint)(byte)(bVar9 - 0x30);
}
else if ((byte)(bVar9 + 0xbf) < 0x1a) {
uVar11 = bVar9 - 0x37;
}
else {
uVar11 = 0x7f;
if ((byte)(bVar9 + 0x9f) < 0x1a) {
uVar11 = bVar9 - 0x57;
}
}
local_a8[uVar3] = uVar11;
if ((param_2 <= (int)uVar11) || (0x13 < uVar3)) break;
uVar3 = uVar3 + 1;
bVar9 = pbVar4[1];
pbVar4 = pbVar4 + 1;
uVar8 = (ulong)((int)uVar8 + 1);
}
if (pbVar4 == pbVar6) {
iVar10 = 0x21;
}
else {
if (uVar3 < 2) {
lVar5 = 0;
if ((int)uVar3 == 1) {
lVar7 = -1;
goto LAB_0015ba74;
}
LAB_0015ba8d:
if (bVar13) {
lVar7 = -lVar5;
bVar13 = -param_4 == lVar5;
lVar5 = lVar7;
if (bVar13 || lVar7 < param_4) {
LAB_0015baca:
*param_5 = lVar5;
iVar10 = 0;
goto LAB_0015baaa;
}
}
else if (param_3 <= lVar5) goto LAB_0015baca;
}
else {
lVar7 = -1;
lVar5 = 0;
do {
uVar11 = (int)uVar8 - 1;
uVar8 = (ulong)uVar11;
lVar12 = (long)(int)local_a8[uVar8];
if (lVar1 != -lVar12 && SBORROW8(lVar1,-lVar12) == lVar1 + lVar12 < 0) goto LAB_0015baa2;
lVar1 = (lVar1 + lVar12) / (long)param_2;
lVar5 = lVar5 + lVar12 * lVar7;
lVar7 = lVar7 * param_2;
} while (1 < (int)uVar11);
LAB_0015ba74:
lVar12 = (long)(int)local_a8[0];
if (lVar1 == -lVar12 || SBORROW8(lVar1,-lVar12) != lVar1 + lVar12 < 0) {
lVar5 = lVar5 + lVar7 * lVar12;
goto LAB_0015ba8d;
}
}
LAB_0015baa2:
iVar10 = 0x22;
}
pbVar4 = (byte *)0x0;
LAB_0015baaa:
piVar2 = __errno_location();
*piVar2 = iVar10;
return pbVar4;
}
|
|
1,084 | FixedBinTypeBundle<Inet6>::Field_fbt::can_optimize_keypart_ref(Item_bool_func const*, Item const*) const | eloqsql/sql/sql_type_fixedbin.h | bool can_optimize_keypart_ref(const Item_bool_func *cond,
const Item *item) const override
{
/*
Mixing of two different non-traditional types is currently prevented.
This may change in the future.
*/
DBUG_ASSERT(item->type_handler()->type_handler_base_or_self()->
is_traditional_scalar_type() ||
item->type_handler() == type_handler());
return true;
} | O0 | c | FixedBinTypeBundle<Inet6>::Field_fbt::can_optimize_keypart_ref(Item_bool_func const*, Item const*) const:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x13abc72
movb $0x1, %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax,%rax)
| _ZNK18FixedBinTypeBundleI5Inet6E9Field_fbt24can_optimize_keypart_refEPK14Item_bool_funcPK4Item:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_13ABC72:
mov al, 1
and al, 1
pop rbp
retn
| char FixedBinTypeBundle<Inet6>::Field_fbt::can_optimize_keypart_ref()
{
return 1;
}
| enable_indexes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x013abc79
LAB_013abc79:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x4e8]
MOV RCX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0xc0]
MOV qword ptr [RBP + -0x48],RCX
MOV RAX,qword ptr [RAX + 0x4e8]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x180],0x40
JNC 0x013abccd
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x4e8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x180]
MOV ECX,EAX
MOV EAX,0x1
SHL RAX,CL
SUB RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x013abcda
LAB_013abccd:
MOV RAX,-0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x013abcda
LAB_013abcda:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x50]
CMP RAX,RCX
JNZ 0x013abcf5
JMP 0x013abce9
LAB_013abce9:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x013abfcd
LAB_013abcf5:
CMP dword ptr [RBP + -0x14],0x1
JNZ 0x013abd13
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x4e8]
CALL 0x013d8bc0
MOV dword ptr [RBP + -0x18],EAX
JMP 0x013abfc5
LAB_013abd13:
CMP dword ptr [RBP + -0x14],0x2
JNZ 0x013abfbc
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00953f20
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x18
MOV ESI,0x20d40
CALL 0x009615c0
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x2578]
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x013abd78
JMP 0x013abd6c
LAB_013abd6c:
MOV dword ptr [RBP + -0x4],0xfffffffc
JMP 0x013abfcd
LAB_013abd78:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x1546827]
LEA RDX,[0x1508b9f]
LEA RCX,[0x15a00de]
MOV R8D,0x65f
CALL 0x00a66020
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x013aed00
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x30]
LEA RDX,[0x1546836]
MOV qword ptr [RCX + 0x28],RDX
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RCX + 0xb10],0x448040
MOV RAX,qword ptr [RAX + 0x4e8]
CMP dword ptr [RAX + 0x1f4],0x2
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x013abdfe
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,0x800000000
OR RCX,qword ptr [RAX + 0xb10]
MOV qword ptr [RAX + 0xb10],RCX
LAB_013abdfe:
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x4e8]
CMP byte ptr [RAX + 0x33e],0x0
JZ 0x013abe2e
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,0x1000000000
OR RCX,qword ptr [RAX + 0xb10]
MOV qword ptr [RAX + 0xb10],RCX
LAB_013abe2e:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,0xffffffdf
AND RCX,qword ptr [RAX + 0x20998]
MOV qword ptr [RAX + 0x20998],RCX
MOV RAX,qword ptr [0x01c87618]
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [0x01c875f0]
CALL RAX
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0xb30],RCX
MOV RAX,qword ptr [0x01c875b8]
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [0x01c875a8]
CALL RAX
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x20cc0],ECX
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x1e4a2a8]
MOV qword ptr [RAX + 0x8],RCX
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x013a9a10
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x30]
XOR ECX,ECX
CALL 0x013aa9b0
CMP EAX,0x0
SETNZ AL
MOV CL,AL
AND CL,0x1
MOVZX ECX,CL
MOV dword ptr [RBP + -0x18],ECX
TEST AL,0x1
JNZ 0x013abed6
JMP 0x013abf82
LAB_013abed6:
MOV RAX,qword ptr [RBP + -0x30]
CMP byte ptr [RAX + 0x209a8],0x0
JZ 0x013abf82
CALL 0x01427140
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOV R8,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RAX + 0x20]
LEA RDI,[0x15a00de]
MOV ESI,0x678
LEA RDX,[0x1546847]
MOV AL,0x0
CALL 0x0094cd00
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0xb10]
AND RAX,0x100000
CMP RAX,0x0
JNZ 0x013abf69
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX + 0xb10]
AND RCX,-0x40001
MOV qword ptr [RAX + 0xb10],RCX
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x30]
XOR ECX,ECX
CALL 0x013aa9b0
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x18],EAX
LAB_013abf69:
CMP dword ptr [RBP + -0x18],0x0
JNZ 0x013abf80
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x013abf80
MOV RDI,qword ptr [RBP + -0x20]
XOR ESI,ESI
CALL 0x0097e550
LAB_013abf80:
JMP 0x013abf82
LAB_013abf82:
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,0x8
CALL 0x013a9630
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x38]
LEA RDX,[0x1508b9f]
LEA RCX,[0x15a00de]
MOV R8D,0x68d
CALL 0x00a66020
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x013a9d40
JMP 0x013abfc3
LAB_013abfbc:
MOV dword ptr [RBP + -0x18],0x83
LAB_013abfc3:
JMP 0x013abfc5
LAB_013abfc5:
JMP 0x013abfc7
LAB_013abfc7:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x4],EAX
LAB_013abfcd:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
/* ha_myisam::enable_indexes(unsigned int) */
uint __thiscall ha_myisam::enable_indexes(ha_myisam *this,uint param_1)
{
THD *this_00;
int8 uVar1;
byte bVar2;
int iVar3;
st_handler_check_param *psVar4;
int8 *puVar5;
uint *puVar6;
long local_58;
uint local_20;
uint local_c;
if (*(uint *)(**(long **)(this + 0x4e8) + 0x180) < 0x40) {
local_58 = (1L << ((byte)*(int4 *)(**(long **)(this + 0x4e8) + 0x180) & 0x3f)) + -1;
}
else {
local_58 = -1;
}
if (*(long *)(**(long **)(this + 0x4e8) + 0xc0) == local_58) {
local_c = 0;
}
else {
if (param_1 == 1) {
local_20 = mi_enable_indexes(*(int8 *)(this + 0x4e8));
}
else if (param_1 == 2) {
this_00 = *(THD **)(*(long *)(this + 0x10) + 0x48);
bVar2 = THD::is_error(this_00);
psVar4 = (st_handler_check_param *)Query_arena::alloc((Query_arena *)(this_00 + 0x18),0x20d40)
;
uVar1 = *(int8 *)(this_00 + 0x2578);
if (psVar4 == (st_handler_check_param *)0x0) {
return 0xfffffffc;
}
set_thd_proc_info(this_00,"Creating index","<unknown>",
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/ha_myisam.cc",0x65f
);
myisamchk_init(psVar4);
*(char **)(psVar4 + 0x28) = "recreating_index";
*(int8 *)(psVar4 + 0xb10) = 0x448040;
if (*(int *)(*(long *)(this + 0x4e8) + 500) != 2) {
*(ulong *)(psVar4 + 0xb10) = *(ulong *)(psVar4 + 0xb10) | 0x800000000;
}
if (*(char *)(*(long *)(this + 0x4e8) + 0x33e) != '\0') {
*(ulong *)(psVar4 + 0xb10) = *(ulong *)(psVar4 + 0xb10) | 0x1000000000;
}
*(ulong *)(psVar4 + 0x20998) = *(ulong *)(psVar4 + 0x20998) & 0xffffffdf;
puVar5 = (int8 *)
(*(code *)mysql_sysvar_sort_buffer_size._80_8_)
(this_00,mysql_sysvar_sort_buffer_size._40_4_);
*(int8 *)(psVar4 + 0xb30) = *puVar5;
puVar5 = (int8 *)
(*(code *)mysql_sysvar_stats_method._56_8_)(this_00,mysql_sysvar_stats_method._40_4_)
;
*(int *)(psVar4 + 0x20cc0) = (int)*puVar5;
*(int1 **)(psVar4 + 8) = mysql_tmpdir_list;
setup_vcols_for_repair(this,psVar4);
iVar3 = repair(this,this_00,psVar4,false);
local_20 = (uint)(iVar3 != 0);
if ((iVar3 != 0) && (psVar4[0x209a8] != (st_handler_check_param)0x0)) {
puVar6 = (uint *)_my_thread_var();
glog_print_warning("/workspace/llm4binary/github2025/eloqsql/storage/myisam/ha_myisam.cc",
0x678,"Warning: Enabling keys got errno %d on %s.%s, retrying",
(ulong)*puVar6,*(int8 *)(psVar4 + 0x18),
*(int8 *)(psVar4 + 0x20));
if ((*(ulong *)(psVar4 + 0xb10) & 0x100000) == 0) {
*(ulong *)(psVar4 + 0xb10) = *(ulong *)(psVar4 + 0xb10) & 0xfffffffffffbffff;
iVar3 = repair(this,this_00,psVar4,false);
local_20 = (uint)(iVar3 != 0);
}
if ((local_20 == 0) && ((bVar2 & 1) == 0)) {
THD::clear_error(this_00,false);
}
}
info(this,8);
set_thd_proc_info(this_00,uVar1,"<unknown>",
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/ha_myisam.cc",0x68d
);
restore_vcos_after_repair(this);
}
else {
local_20 = 0x83;
}
local_c = local_20;
}
return local_c;
}
|
|
1,085 | mi_ft_convert_to_ft2 | eloqsql/storage/myisam/ft_update.c | uint _mi_ft_convert_to_ft2(MI_INFO *info, uint keynr, uchar *key)
{
my_off_t root;
DYNAMIC_ARRAY *da=info->ft1_to_ft2;
MI_KEYDEF *keyinfo=&info->s->ft2_keyinfo;
uchar *key_ptr= (uchar*) dynamic_array_ptr(da, 0), *end;
uint length, key_length;
DBUG_ENTER("_mi_ft_convert_to_ft2");
/* we'll generate one pageful at once, and insert the rest one-by-one */
/* calculating the length of this page ...*/
length=(keyinfo->block_length-2) / keyinfo->keylength;
set_if_smaller(length, da->elements);
length=length * keyinfo->keylength;
get_key_full_length_rdonly(key_length, key);
while (_mi_ck_delete(info, keynr, key, key_length) == 0)
{
/*
nothing to do here.
_mi_ck_delete() will populate info->ft1_to_ft2 with deleted keys
*/
}
/* creating pageful of keys */
mi_putint(info->buff,length+2,0);
memcpy(info->buff+2, key_ptr, length);
info->buff_used=info->page_changed=1; /* info->buff is used */
if ((root= _mi_new(info,keyinfo,DFLT_INIT_HITS)) == HA_OFFSET_ERROR ||
_mi_write_keypage(info,keyinfo,root,DFLT_INIT_HITS,info->buff))
DBUG_RETURN(-1);
/* inserting the rest of key values */
end= (uchar*) dynamic_array_ptr(da, da->elements);
for (key_ptr+=length; key_ptr < end; key_ptr+=keyinfo->keylength)
if(_mi_ck_real_write_btree(info, keyinfo, key_ptr, 0, &root, SEARCH_SAME))
DBUG_RETURN(-1);
/* now, writing the word key entry */
ft_intXstore(key+key_length, - (int) da->elements);
_mi_dpointer(info, key+key_length+HA_FT_WLEN, root);
DBUG_RETURN(_mi_ck_real_write_btree(info,
info->s->keyinfo+keynr,
key, 0,
&info->s->state.key_root[keynr],
SEARCH_SAME));
} | O3 | c | mi_ft_convert_to_ft2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
movq (%rdi), %rcx
movq 0x88(%rdi), %rsi
movzwl 0x1b6(%rcx), %eax
addl $-0x2, %eax
movq %rcx, -0x48(%rbp)
movzwl 0x1ba(%rcx), %ecx
cltd
idivl %ecx
movl 0x8(%rsi), %edx
cmpl %edx, %eax
cmovbl %eax, %edx
movzbl (%rbx), %r12d
cmpl $0xff, %r12d
je 0x8f72d
incl %r12d
jmp 0x8f73d
movzwl 0x1(%rbx), %eax
rolw $0x8, %ax
movzwl %ax, %r12d
addl $0x3, %r12d
movq -0x48(%rbp), %rax
addq $0x1a8, %rax # imm = 0x1A8
movq %rax, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq (%rsi), %r13
imull %ecx, %edx
movq %rdx, -0x30(%rbp)
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x8fbbd
testl %eax, %eax
je 0x8f759
movq -0x30(%rbp), %rdx
leal 0x2(%rdx), %eax
movq 0x100(%r14), %rcx
movb %al, 0x1(%rcx)
movq 0x100(%r14), %rcx
movb %ah, (%rcx)
movq 0x100(%r14), %rdi
addq $0x2, %rdi
movl %edx, %edx
movq %r13, %rsi
movq %rdx, -0x30(%rbp)
callq 0x2a0b0
movw $0x101, 0x33c(%r14) # imm = 0x101
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movl $0x3, %edx
callq 0x9ede2
movq %rax, %rcx
movq %rax, -0x50(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq $-0x1, %rcx
je 0x8f8a7
movq 0x100(%r14), %r8
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movq %rcx, -0x58(%rbp)
movq %rcx, %rdx
movl $0x3, %ecx
callq 0x9ec30
testl %eax, %eax
je 0x8f7ff
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x8f8a7
movq -0x58(%rbp), %rdx
movq -0x40(%rbp), %rcx
movl 0x8(%rcx), %eax
movl 0x14(%rcx), %esi
imull %eax, %esi
addq (%rcx), %rsi
addq -0x30(%rbp), %r13
movq %rsi, -0x30(%rbp)
cmpq %rsi, %r13
jae 0x8f85e
movq %r14, %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
xorl %ecx, %ecx
leaq -0x50(%rbp), %r8
movl $0x4, %r9d
callq 0xa322b
testl %eax, %eax
jne 0x8f7f5
movq -0x48(%rbp), %rax
movzwl 0x1ba(%rax), %eax
addq %rax, %r13
cmpq -0x30(%rbp), %r13
jb 0x8f820
movq -0x40(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x50(%rbp), %rdx
negl %eax
movl %r12d, %ecx
bswapl %eax
leaq (%rbx,%rcx), %rsi
addq $0x4, %rsi
movl %eax, -0x4(%rsi)
movq %r14, %rdi
callq 0xa02a3
movq (%r14), %rax
movl %r15d, %r8d
imulq $0x70, %r8, %rsi
addq 0x218(%rax), %rsi
shlq $0x3, %r8
addq 0x98(%rax), %r8
movq %r14, %rdi
movq %rbx, %rdx
xorl %ecx, %ecx
movl $0x4, %r9d
callq 0xa322b
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _mi_ft_convert_to_ft2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdx
mov r15d, esi
mov r14, rdi
mov rcx, [rdi]
mov rsi, [rdi+88h]
movzx eax, word ptr [rcx+1B6h]
add eax, 0FFFFFFFEh
mov [rbp+var_48], rcx
movzx ecx, word ptr [rcx+1BAh]
cdq
idiv ecx
mov edx, [rsi+8]
cmp eax, edx
cmovb edx, eax
movzx r12d, byte ptr [rbx]
cmp r12d, 0FFh
jz short loc_8F72D
inc r12d
jmp short loc_8F73D
loc_8F72D:
movzx eax, word ptr [rbx+1]
rol ax, 8
movzx r12d, ax
add r12d, 3
loc_8F73D:
mov rax, [rbp+var_48]
add rax, 1A8h
mov [rbp+var_38], rax
mov [rbp+var_40], rsi
mov r13, [rsi]
imul edx, ecx
mov [rbp+var_30], rdx
loc_8F759:
mov rdi, r14
mov esi, r15d
mov rdx, rbx
mov ecx, r12d
call _mi_ck_delete
test eax, eax
jz short loc_8F759
mov rdx, [rbp+var_30]
lea eax, [rdx+2]
mov rcx, [r14+100h]
mov [rcx+1], al
mov rcx, [r14+100h]
mov [rcx], ah
mov rdi, [r14+100h]
add rdi, 2
mov edx, edx
mov rsi, r13
mov [rbp+var_30], rdx
call _memcpy
mov word ptr [r14+33Ch], 101h
mov rdi, r14
mov rsi, [rbp+var_38]
mov edx, 3
call _mi_new
mov rcx, rax
mov [rbp+var_50], rax
mov eax, 0FFFFFFFFh
cmp rcx, 0FFFFFFFFFFFFFFFFh
jz loc_8F8A7
mov r8, [r14+100h]
mov rdi, r14
mov rsi, [rbp+var_38]
mov [rbp+var_58], rcx
mov rdx, rcx
mov ecx, 3
call _mi_write_keypage
test eax, eax
jz short loc_8F7FF
loc_8F7F5:
mov eax, 0FFFFFFFFh
jmp loc_8F8A7
loc_8F7FF:
mov rdx, [rbp+var_58]
mov rcx, [rbp+var_40]
mov eax, [rcx+8]
mov esi, [rcx+14h]
imul esi, eax
add rsi, [rcx]
add r13, [rbp+var_30]
mov [rbp+var_30], rsi
cmp r13, rsi
jnb short loc_8F85E
loc_8F820:
mov rdi, r14
mov rsi, [rbp+var_38]
mov rdx, r13
xor ecx, ecx
lea r8, [rbp+var_50]
mov r9d, 4
call _mi_ck_real_write_btree
test eax, eax
jnz short loc_8F7F5
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+1BAh]
add r13, rax
cmp r13, [rbp+var_30]
jb short loc_8F820
mov rax, [rbp+var_40]
mov eax, [rax+8]
mov rdx, [rbp+var_50]
loc_8F85E:
neg eax
mov ecx, r12d
bswap eax
lea rsi, [rbx+rcx]
add rsi, 4
mov [rsi-4], eax
mov rdi, r14
call _mi_dpointer
mov rax, [r14]
mov r8d, r15d
imul rsi, r8, 70h ; 'p'
add rsi, [rax+218h]
shl r8, 3
add r8, [rax+98h]
mov rdi, r14
mov rdx, rbx
xor ecx, ecx
mov r9d, 4
call _mi_ck_real_write_btree
loc_8F8A7:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_ft_convert_to_ft2(long long *a1, unsigned int a2, unsigned __int8 *a3)
{
long long *v6; // rsi
int v7; // eax
int v8; // ecx
unsigned int v9; // eax
unsigned int v10; // edx
int v11; // r12d
unsigned int v12; // r12d
long long v13; // r13
unsigned int v14; // edx
__int16 v15; // ax
long long v16; // rdi
long long v17; // rcx
long long result; // rax
long long v19; // r8
long long v20; // rdx
int v21; // eax
unsigned long long v22; // r13
long long v23; // rsi
long long v24; // [rsp+8h] [rbp-58h]
long long v25; // [rsp+10h] [rbp-50h] BYREF
long long v26; // [rsp+18h] [rbp-48h]
long long *v27; // [rsp+20h] [rbp-40h]
long long v28; // [rsp+28h] [rbp-38h]
unsigned long long v29; // [rsp+30h] [rbp-30h]
v6 = (long long *)a1[17];
v7 = *(unsigned __int16 *)(*a1 + 438) - 2;
v26 = *a1;
v8 = *(unsigned __int16 *)(v26 + 442);
v9 = v7 / v8;
v10 = *((_DWORD *)v6 + 2);
if ( v9 < v10 )
v10 = v9;
v11 = *a3;
if ( v11 == 255 )
v12 = (unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8) + 3;
else
v12 = v11 + 1;
v28 = v26 + 424;
v27 = v6;
v13 = *v6;
v29 = v8 * v10;
while ( !(unsigned int)mi_ck_delete(a1, a2, a3, v12) )
;
v14 = v29;
v15 = v29 + 2;
*(_BYTE *)(a1[32] + 1) = v29 + 2;
*(_BYTE *)a1[32] = HIBYTE(v15);
v16 = a1[32] + 2;
v29 = v14;
memcpy(v16, v13, v14);
*((_WORD *)a1 + 414) = 257;
v17 = mi_new(a1, v28, 3LL);
v25 = v17;
result = 0xFFFFFFFFLL;
if ( v17 != -1 )
{
v24 = v17;
if ( (unsigned int)mi_write_keypage(a1, v28, v17, 3LL, a1[32]) )
return 0xFFFFFFFFLL;
v20 = v24;
v21 = *((_DWORD *)v27 + 2);
v22 = v29 + v13;
v29 = *v27 + (unsigned int)(v21 * *((_DWORD *)v27 + 5));
if ( v22 < v29 )
{
while ( !(unsigned int)mi_ck_real_write_btree(a1, v28, v22, 0LL, &v25, 4LL) )
{
v22 += *(unsigned __int16 *)(v26 + 442);
if ( v22 >= v29 )
{
v21 = *((_DWORD *)v27 + 2);
v20 = v25;
goto LABEL_15;
}
}
return 0xFFFFFFFFLL;
}
LABEL_15:
v23 = (long long)&a3[v12 + 4];
*(_DWORD *)(v23 - 4) = _byteswap_ulong(-v21);
mi_dpointer(a1, v23, v20, v12, v19);
return mi_ck_real_write_btree(
a1,
*(_QWORD *)(*a1 + 536) + 112LL * a2,
a3,
0LL,
*(_QWORD *)(*a1 + 152) + 8LL * a2,
4LL);
}
return result;
}
| _mi_ft_convert_to_ft2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDX
MOV R15D,ESI
MOV R14,RDI
MOV RCX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x88]
MOVZX EAX,word ptr [RCX + 0x1b6]
ADD EAX,-0x2
MOV qword ptr [RBP + -0x48],RCX
MOVZX ECX,word ptr [RCX + 0x1ba]
CDQ
IDIV ECX
MOV EDX,dword ptr [RSI + 0x8]
CMP EAX,EDX
CMOVC EDX,EAX
MOVZX R12D,byte ptr [RBX]
CMP R12D,0xff
JZ 0x0018f72d
INC R12D
JMP 0x0018f73d
LAB_0018f72d:
MOVZX EAX,word ptr [RBX + 0x1]
ROL AX,0x8
MOVZX R12D,AX
ADD R12D,0x3
LAB_0018f73d:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1a8
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x40],RSI
MOV R13,qword ptr [RSI]
IMUL EDX,ECX
MOV qword ptr [RBP + -0x30],RDX
LAB_0018f759:
MOV RDI,R14
MOV ESI,R15D
MOV RDX,RBX
MOV ECX,R12D
CALL 0x0018fbbd
TEST EAX,EAX
JZ 0x0018f759
MOV RDX,qword ptr [RBP + -0x30]
LEA EAX,[RDX + 0x2]
MOV RCX,qword ptr [R14 + 0x100]
MOV byte ptr [RCX + 0x1],AL
MOV RCX,qword ptr [R14 + 0x100]
MOV byte ptr [RCX],AH
MOV RDI,qword ptr [R14 + 0x100]
ADD RDI,0x2
MOV EDX,EDX
MOV RSI,R13
MOV qword ptr [RBP + -0x30],RDX
CALL 0x0012a0b0
MOV word ptr [R14 + 0x33c],0x101
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
MOV EDX,0x3
CALL 0x0019ede2
MOV RCX,RAX
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,0xffffffff
CMP RCX,-0x1
JZ 0x0018f8a7
MOV R8,qword ptr [R14 + 0x100]
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RCX
MOV RDX,RCX
MOV ECX,0x3
CALL 0x0019ec30
TEST EAX,EAX
JZ 0x0018f7ff
LAB_0018f7f5:
MOV EAX,0xffffffff
JMP 0x0018f8a7
LAB_0018f7ff:
MOV RDX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RCX + 0x8]
MOV ESI,dword ptr [RCX + 0x14]
IMUL ESI,EAX
ADD RSI,qword ptr [RCX]
ADD R13,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RSI
CMP R13,RSI
JNC 0x0018f85e
LAB_0018f820:
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,R13
XOR ECX,ECX
LEA R8,[RBP + -0x50]
MOV R9D,0x4
CALL 0x001a322b
TEST EAX,EAX
JNZ 0x0018f7f5
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x1ba]
ADD R13,RAX
CMP R13,qword ptr [RBP + -0x30]
JC 0x0018f820
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x50]
LAB_0018f85e:
NEG EAX
MOV ECX,R12D
BSWAP EAX
LEA RSI,[RBX + RCX*0x1]
ADD RSI,0x4
MOV dword ptr [RSI + -0x4],EAX
MOV RDI,R14
CALL 0x001a02a3
MOV RAX,qword ptr [R14]
MOV R8D,R15D
IMUL RSI,R8,0x70
ADD RSI,qword ptr [RAX + 0x218]
SHL R8,0x3
ADD R8,qword ptr [RAX + 0x98]
MOV RDI,R14
MOV RDX,RBX
XOR ECX,ECX
MOV R9D,0x4
CALL 0x001a322b
LAB_0018f8a7:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 _mi_ft_convert_to_ft2(long *param_1,uint param_2,byte *param_3)
{
void *__src;
uint uVar1;
int iVar2;
uint uVar3;
long lVar4;
int8 uVar5;
ulong uVar6;
ulong uVar7;
long local_58;
long local_50;
long *local_48;
long local_40;
ulong local_38;
local_50 = *param_1;
local_48 = (long *)param_1[0x11];
uVar1 = (int)(*(ushort *)(local_50 + 0x1b6) - 2) / (int)(uint)*(ushort *)(local_50 + 0x1ba);
uVar3 = *(uint *)(local_48 + 1);
if (uVar1 < *(uint *)(local_48 + 1)) {
uVar3 = uVar1;
}
if (*param_3 == 0xff) {
uVar1 = (ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) + 3;
}
else {
uVar1 = *param_3 + 1;
}
local_40 = local_50 + 0x1a8;
__src = (void *)*local_48;
local_38 = (ulong)(uVar3 * *(ushort *)(local_50 + 0x1ba));
do {
iVar2 = _mi_ck_delete(param_1,param_2,param_3,uVar1);
} while (iVar2 == 0);
iVar2 = (int)local_38 + 2;
*(char *)(param_1[0x20] + 1) = (char)iVar2;
*(char *)param_1[0x20] = (char)((uint)iVar2 >> 8);
local_38 = local_38 & 0xffffffff;
memcpy((void *)(param_1[0x20] + 2),__src,local_38);
*(int2 *)((long)param_1 + 0x33c) = 0x101;
lVar4 = _mi_new(param_1,local_40,3);
uVar5 = 0xffffffff;
if (lVar4 != -1) {
local_58 = lVar4;
iVar2 = _mi_write_keypage(param_1,local_40,lVar4,3,param_1[0x20]);
if (iVar2 == 0) {
iVar2 = (int)local_48[1];
uVar6 = (ulong)(uint)(*(int *)((long)local_48 + 0x14) * iVar2) + *local_48;
uVar7 = (long)__src + local_38;
local_38 = uVar6;
if (uVar7 < uVar6) {
do {
iVar2 = _mi_ck_real_write_btree(param_1,local_40,uVar7,0,&local_58,4);
if (iVar2 != 0) goto LAB_0018f7f5;
uVar7 = uVar7 + *(ushort *)(local_50 + 0x1ba);
} while (uVar7 < local_38);
iVar2 = (int)local_48[1];
lVar4 = local_58;
}
uVar3 = -iVar2;
*(uint *)(param_3 + uVar1) =
uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | iVar2 * -0x1000000;
_mi_dpointer(param_1,(uint *)((long)(param_3 + uVar1) + 4),lVar4);
uVar5 = _mi_ck_real_write_btree
(param_1,(ulong)param_2 * 0x70 + *(long *)(*param_1 + 0x218),param_3,0,
(ulong)param_2 * 8 + *(long *)(*param_1 + 0x98),4);
}
else {
LAB_0018f7f5:
uVar5 = 0xffffffff;
}
}
return uVar5;
}
|
|
1,086 | mp_sub_dec | bluesky950520[P]quickjs/libbf.c | limb_t mp_sub_dec(limb_t *res, const limb_t *op1, const limb_t *op2,
mp_size_t n, limb_t carry)
{
limb_t base = BF_DEC_BASE;
mp_size_t i;
limb_t k, v, a;
k=carry;
for(i=0;i<n;i++) {
v = op1[i];
a = v - op2[i] - k;
k = a > v;
if (k)
a += base;
res[i] = a;
}
return k;
} | O2 | c | mp_sub_dec:
movq %r8, %rax
xorl %r8d, %r8d
testq %rcx, %rcx
cmovleq %r8, %rcx
movabsq $-0x7538dcfb76180000, %r9 # imm = 0x8AC7230489E80000
cmpq %r8, %rcx
je 0x79f67
movq (%rsi,%r8,8), %r10
addq (%rdx,%r8,8), %rax
xorl %r11d, %r11d
subq %rax, %r10
leaq (%r10,%r9), %rax
cmovaeq %r10, %rax
setb %r11b
movq %rax, (%rdi,%r8,8)
incq %r8
movq %r11, %rax
jmp 0x79f3c
retq
| mp_sub_dec:
mov rax, r8
xor r8d, r8d
test rcx, rcx
cmovle rcx, r8
mov r9, 8AC7230489E80000h
loc_79F3C:
cmp rcx, r8
jz short locret_79F67
mov r10, [rsi+r8*8]
add rax, [rdx+r8*8]
xor r11d, r11d
sub r10, rax
lea rax, [r10+r9]
cmovnb rax, r10
setb r11b
mov [rdi+r8*8], rax
inc r8
mov rax, r11
jmp short loc_79F3C
locret_79F67:
retn
| long long mp_sub_dec(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long result; // rax
long long v6; // r8
unsigned long long v7; // r10
unsigned long long v8; // rax
long long v9; // r11
bool v10; // cf
unsigned long long v11; // r10
unsigned long long v12; // rax
result = a5;
v6 = 0LL;
if ( a4 <= 0 )
a4 = 0LL;
while ( a4 != v6 )
{
v7 = *(_QWORD *)(a2 + 8 * v6);
v8 = *(_QWORD *)(a3 + 8 * v6) + result;
v9 = 0LL;
v10 = v7 < v8;
v11 = v7 - v8;
v12 = v11 - 0x7538DCFB76180000LL;
if ( !v10 )
v12 = v11;
LOBYTE(v9) = v10;
*(_QWORD *)(a1 + 8 * v6++) = v12;
result = v9;
}
return result;
}
| mp_sub_dec:
MOV RAX,R8
XOR R8D,R8D
TEST RCX,RCX
CMOVLE RCX,R8
MOV R9,-0x7538dcfb76180000
LAB_00179f3c:
CMP RCX,R8
JZ 0x00179f67
MOV R10,qword ptr [RSI + R8*0x8]
ADD RAX,qword ptr [RDX + R8*0x8]
XOR R11D,R11D
SUB R10,RAX
LEA RAX,[R10 + R9*0x1]
CMOVNC RAX,R10
SETC R11B
MOV qword ptr [RDI + R8*0x8],RAX
INC R8
MOV RAX,R11
JMP 0x00179f3c
LAB_00179f67:
RET
|
void mp_sub_dec(long param_1,long param_2,long param_3,long param_4,ulong param_5)
{
ulong uVar1;
long lVar2;
long lVar3;
lVar3 = 0;
if (param_4 < 1) {
param_4 = lVar3;
}
for (; param_4 != lVar3; lVar3 = lVar3 + 1) {
uVar1 = *(ulong *)(param_2 + lVar3 * 8);
param_5 = param_5 + *(long *)(param_3 + lVar3 * 8);
lVar2 = (uVar1 - param_5) + -0x7538dcfb76180000;
if (uVar1 >= param_5) {
lVar2 = uVar1 - param_5;
}
param_5 = (ulong)(uVar1 < param_5);
*(long *)(param_1 + lVar3 * 8) = lVar2;
}
return;
}
|
|
1,087 | ftxui::separatorHeavy() | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/separator.cpp | Element separatorHeavy() {
return std::make_shared<SeparatorAuto>(HEAVY);
} | O1 | cpp | ftxui::separatorHeavy():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x70, %edi
callq 0xb3e0
movq %rax, %rbx
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%rbx)
leaq 0x340ad(%rip), %rax # 0x585f8
movq %rax, (%rbx)
movq %rbx, %r15
addq $0x10, %r15
movq %r15, %rdi
callq 0x240c8
leaq 0x340e4(%rip), %rax # 0x58648
movq %rax, 0x10(%rbx)
movl $0x2, 0x6c(%rbx)
movq %r15, (%r14)
movq %rbx, 0x8(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x70, %esi
movq %rbx, %rdi
callq 0xb400
movq %r14, %rdi
callq 0xb780
| _ZN5ftxui14separatorHeavyEv:
push r15
push r14
push rbx
mov r14, rdi
mov edi, 70h ; 'p'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov rax, 100000001h
mov [rbx+8], rax
lea rax, off_585F8
mov [rbx], rax
mov r15, rbx
add r15, 10h
mov rdi, r15; this
call _ZN5ftxui4NodeC2Ev; ftxui::Node::Node(void)
lea rax, off_58648
mov [rbx+10h], rax
mov dword ptr [rbx+6Ch], 2
mov [r14], r15
mov [r14+8], rbx
mov rax, r14
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov esi, 70h ; 'p'; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, r14
call __Unwind_Resume
| ftxui * ftxui::separatorHeavy(ftxui *this)
{
long long v1; // rbx
v1 = operator new(0x70uLL);
*(_QWORD *)(v1 + 8) = 0x100000001LL;
*(_QWORD *)v1 = off_585F8;
ftxui::Node::Node((ftxui::Node *)(v1 + 16));
*(_QWORD *)(v1 + 16) = off_58648;
*(_DWORD *)(v1 + 108) = 2;
*(_QWORD *)this = v1 + 16;
*((_QWORD *)this + 1) = v1;
return this;
}
| separatorHeavy:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDI
MOV EDI,0x70
CALL 0x0010b3e0
MOV RBX,RAX
MOV RAX,0x100000001
MOV qword ptr [RBX + 0x8],RAX
LEA RAX,[0x1585f8]
MOV qword ptr [RBX],RAX
MOV R15,RBX
ADD R15,0x10
LAB_00124555:
MOV RDI,R15
CALL 0x001240c8
LAB_0012455d:
LEA RAX,[0x158648]
MOV qword ptr [RBX + 0x10],RAX
MOV dword ptr [RBX + 0x6c],0x2
MOV qword ptr [R14],R15
MOV qword ptr [R14 + 0x8],RBX
MOV RAX,R14
POP RBX
POP R14
POP R15
RET
|
/* ftxui::separatorHeavy() */
ftxui * __thiscall ftxui::separatorHeavy(ftxui *this)
{
int8 *puVar1;
puVar1 = (int8 *)operator_new(0x70);
puVar1[1] = 0x100000001;
*puVar1 = &PTR___Sp_counted_ptr_inplace_001585f8;
/* try { // try from 00124555 to 0012455c has its CatchHandler @ 0012457f */
Node::Node((Node *)(puVar1 + 2));
puVar1[2] = &PTR__Node_00158648;
*(int4 *)((long)puVar1 + 0x6c) = 2;
*(Node **)this = (Node *)(puVar1 + 2);
*(int8 **)(this + 8) = puVar1;
return this;
}
|
|
1,088 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&) | monkey531[P]llama/common/json.hpp | static ReferenceType get_ref_impl(ThisType& obj)
{
// delegate the call to get_ptr<>()
auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
if (JSON_HEDLEY_LIKELY(ptr != nullptr))
{
return *ptr;
}
JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj));
} | O2 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0x88c6e
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x88c6e
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23480
movq %rax, %rbx
movq %r14, %rdi
callq 0x4320e
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x2c4e4(%rip), %rsi # 0xb5174
leaq 0x10(%rsp), %rdi
callq 0x82e93
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12f, %esi # imm = 0x12F
movq %r14, %rcx
callq 0x430c2
xorl %ebp, %ebp
leaq 0x7328d(%rip), %rsi # 0xfbf48
leaq -0x48f24(%rip), %rdx # 0x3fd9e
movq %rbx, %rdi
callq 0x23f30
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x24208
testb %bpl, %bpl
jne 0x88ce1
jmp 0x88ce9
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23fd0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRS9_SD_EET_RT0_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_88C6E
mov rax, [r14+8]
test rax, rax
jz short loc_88C6E
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_88C6E:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aIncompatibleRe; "incompatible ReferenceType for get_ref,"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Fh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_88CE1
jmp short loc_88CE9
mov r14, rax
loc_88CE1:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_88CE9:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<std::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v3; // [rsp+8h] [rbp-40h] BYREF
_BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(
(long long)v4,
(long long)"incompatible ReferenceType for get_ref, actual type is ",
&v3);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
303,
(long long)v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return result;
}
| get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x00188c6e
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x00188c6e
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00188c6e:
PUSH 0x20
POP RDI
CALL 0x00123480
MOV RBX,RAX
MOV RDI,R14
CALL 0x0014320e
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00188c89:
LEA RSI,[0x1b5174]
LEA RDI,[RSP + 0x10]
CALL 0x00182e93
MOV BPL,0x1
LAB_00188c9d:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12f
MOV RCX,R14
CALL 0x001430c2
XOR EBP,EBP
LEA RSI,[0x1fbf48]
LEA RDX,[0x13fd9e]
MOV RDI,RBX
CALL 0x00123f30
|
/* std::__cxx11::string&
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::get_ref_impl<std::__cxx11::string&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&) */
string * nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if ((*param_1 == '\x03') && (*(string **)(param_1 + 8) != (string *)0x0)) {
return *(string **)(param_1 + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 00188c89 to 00188c99 has its CatchHandler @ 00188cde */
detail::concat<std::__cxx11::string,char_const(&)[56],char_const*>
(local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40);
/* try { // try from 00188c9d to 00188cc9 has its CatchHandler @ 00188cca */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x12f,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
1,089 | my_b_cache_write_r | eloqsql/mysys/mf_iocache.c | static int _my_b_cache_write_r(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
my_off_t old_pos_in_file= info->pos_in_file;
int res= _my_b_cache_write(info, Buffer, Count);
if (res)
return res;
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
DBUG_ASSERT(info->share);
copy_to_read_buffer(info, Buffer, old_pos_in_file);
return 0;
} | O0 | c | my_b_cache_write_r:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x314a0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x2ffd1
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2fff1
jmp 0x2ffd3
jmp 0x2ffd5
jmp 0x2ffd7
jmp 0x2ffd9
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x31a60
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _my_b_cache_write_r:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _my_b_cache_write
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jz short loc_2FFD1
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
jmp short loc_2FFF1
loc_2FFD1:
jmp short $+2
loc_2FFD3:
jmp short $+2
loc_2FFD5:
jmp short $+2
loc_2FFD7:
jmp short $+2
loc_2FFD9:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call copy_to_read_buffer
mov [rbp+var_4], 0
loc_2FFF1:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_b_cache_write_r(long long *a1, long long a2, long long a3)
{
unsigned int v4; // [rsp+4h] [rbp-2Ch]
long long v5; // [rsp+8h] [rbp-28h]
v5 = *a1;
v4 = my_b_cache_write(a1, a2, a3);
if ( v4 )
{
return v4;
}
else
{
copy_to_read_buffer(a1, a2, v5);
return 0;
}
}
| _my_b_cache_write_r:
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 RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001314a0
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x0012ffd1
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012fff1
LAB_0012ffd1:
JMP 0x0012ffd3
LAB_0012ffd3:
JMP 0x0012ffd5
LAB_0012ffd5:
JMP 0x0012ffd7
LAB_0012ffd7:
JMP 0x0012ffd9
LAB_0012ffd9:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x00131a60
MOV dword ptr [RBP + -0x4],0x0
LAB_0012fff1:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int _my_b_cache_write_r(int8 *param_1,int8 param_2,int8 param_3)
{
int8 uVar1;
int4 local_c;
uVar1 = *param_1;
local_c = _my_b_cache_write(param_1,param_2,param_3);
if (local_c == 0) {
copy_to_read_buffer(param_1,param_2,uVar1);
local_c = 0;
}
return local_c;
}
|
|
1,090 | my_b_cache_write_r | eloqsql/mysys/mf_iocache.c | static int _my_b_cache_write_r(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
my_off_t old_pos_in_file= info->pos_in_file;
int res= _my_b_cache_write(info, Buffer, Count);
if (res)
return res;
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
DBUG_ASSERT(info->share);
copy_to_read_buffer(info, Buffer, old_pos_in_file);
return 0;
} | O3 | c | my_b_cache_write_r:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq (%rdi), %r15
movq %rdi, -0x30(%rbp)
callq 0x2c865
testl %eax, %eax
jne 0x2b812
movq -0x30(%rbp), %rax
movq (%rax), %r12
xorl %eax, %eax
subq %r15, %r12
je 0x2b812
movq %r15, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x98(%rax), %r15
movq -0x30(%rbp), %r14
movq 0xe8(%r14), %r13
cmpq %r13, %r12
cmovbq %r12, %r13
movq %r14, %rdi
movq -0x38(%rbp), %rsi
callq 0x2ca36
movq 0xc8(%r15), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x24290
movl $0x0, 0xe0(%r15)
movq 0xc8(%r15), %rax
addq %r13, %rax
movq %rax, 0xd0(%r15)
movq -0x38(%rbp), %rax
movq %rax, 0xb8(%r15)
movq 0x98(%r14), %rdi
callq 0x2cc37
addq %r13, %rbx
subq %r13, %r12
jne 0x2b7a9
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _my_b_cache_write_r:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rsi
mov r15, [rdi]
mov [rbp+var_30], rdi
call _my_b_cache_write
test eax, eax
jnz loc_2B812
mov rax, [rbp+var_30]
mov r12, [rax]
xor eax, eax
sub r12, r15
jz short loc_2B812
mov [rbp+var_38], r15
mov rax, [rbp+var_30]
mov r15, [rax+98h]
mov r14, [rbp+var_30]
loc_2B7A9:
mov r13, [r14+0E8h]
cmp r12, r13
cmovb r13, r12
mov rdi, r14
mov rsi, [rbp+var_38]
call lock_io_cache
mov rdi, [r15+0C8h]
mov rsi, rbx
mov rdx, r13
call _memcpy
mov dword ptr [r15+0E0h], 0
mov rax, [r15+0C8h]
add rax, r13
mov [r15+0D0h], rax
mov rax, [rbp+var_38]
mov [r15+0B8h], rax
mov rdi, [r14+98h]
call unlock_io_cache
add rbx, r13
sub r12, r13
jnz short loc_2B7A9
xor eax, eax
loc_2B812:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_b_cache_write_r(long long *a1, long long a2)
{
long long v3; // r15
long long result; // rax
unsigned long long v5; // r12
long long v6; // r15
unsigned long long v7; // r13
long long v8; // [rsp+8h] [rbp-38h]
v3 = *a1;
result = my_b_cache_write();
if ( !(_DWORD)result )
{
result = 0LL;
v5 = *a1 - v3;
if ( *a1 != v3 )
{
v8 = v3;
v6 = a1[19];
do
{
v7 = a1[29];
if ( v5 < v7 )
v7 = v5;
lock_io_cache(a1, v8);
memcpy(*(_QWORD *)(v6 + 200), a2);
*(_DWORD *)(v6 + 224) = 0;
*(_QWORD *)(v6 + 208) = v7 + *(_QWORD *)(v6 + 200);
*(_QWORD *)(v6 + 184) = v8;
unlock_io_cache(a1[19]);
a2 += v7;
v5 -= v7;
}
while ( v5 );
return 0LL;
}
}
return result;
}
| _my_b_cache_write_r:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV R15,qword ptr [RDI]
MOV qword ptr [RBP + -0x30],RDI
CALL 0x0012c865
TEST EAX,EAX
JNZ 0x0012b812
MOV RAX,qword ptr [RBP + -0x30]
MOV R12,qword ptr [RAX]
XOR EAX,EAX
SUB R12,R15
JZ 0x0012b812
MOV qword ptr [RBP + -0x38],R15
MOV RAX,qword ptr [RBP + -0x30]
MOV R15,qword ptr [RAX + 0x98]
MOV R14,qword ptr [RBP + -0x30]
LAB_0012b7a9:
MOV R13,qword ptr [R14 + 0xe8]
CMP R12,R13
CMOVC R13,R12
MOV RDI,R14
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x0012ca36
MOV RDI,qword ptr [R15 + 0xc8]
MOV RSI,RBX
MOV RDX,R13
CALL 0x00124290
MOV dword ptr [R15 + 0xe0],0x0
MOV RAX,qword ptr [R15 + 0xc8]
ADD RAX,R13
MOV qword ptr [R15 + 0xd0],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [R15 + 0xb8],RAX
MOV RDI,qword ptr [R14 + 0x98]
CALL 0x0012cc37
ADD RBX,R13
SUB R12,R13
JNZ 0x0012b7a9
XOR EAX,EAX
LAB_0012b812:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 _my_b_cache_write_r(long *param_1,void *param_2)
{
long lVar1;
long lVar2;
int8 uVar3;
ulong uVar4;
ulong __n;
lVar1 = *param_1;
uVar3 = _my_b_cache_write();
if ((int)uVar3 == 0) {
uVar3 = 0;
uVar4 = *param_1 - lVar1;
if (uVar4 != 0) {
lVar2 = param_1[0x13];
do {
__n = param_1[0x1d];
if (uVar4 < (ulong)param_1[0x1d]) {
__n = uVar4;
}
lock_io_cache(param_1,lVar1);
memcpy(*(void **)(lVar2 + 200),param_2,__n);
*(int4 *)(lVar2 + 0xe0) = 0;
*(ulong *)(lVar2 + 0xd0) = *(long *)(lVar2 + 200) + __n;
*(long *)(lVar2 + 0xb8) = lVar1;
unlock_io_cache(param_1[0x13]);
param_2 = (void *)((long)param_2 + __n);
uVar4 = uVar4 - __n;
} while (uVar4 != 0);
uVar3 = 0;
}
}
return uVar3;
}
|
|
1,091 | translog_get_last_page_addr | eloqsql/storage/maria/ma_loghandler.c | static my_bool translog_get_last_page_addr(TRANSLOG_ADDRESS *addr,
my_bool *last_page_ok,
my_bool no_errors)
{
char path[FN_REFLEN];
uint32 rec_offset;
my_off_t file_size;
uint32 file_no= LSN_FILE_NO(*addr);
TRANSLOG_FILE *file;
#ifndef DBUG_OFF
char buff[21];
#endif
DBUG_ENTER("translog_get_last_page_addr");
if (likely((file= get_logfile_by_number(file_no)) != NULL))
{
/*
This function used only during initialization of loghandler or in
scanner (which mean we need read that part of the log), so the
requested log file have to be opened and can't be freed after
returning pointer on it (file_size).
*/
file_size= mysql_file_seek(file->handler.file, 0, SEEK_END, MYF(0));
}
else
{
/*
This branch is used only during very early initialization
when files are not opened.
*/
File fd;
if ((fd= mysql_file_open(key_file_translog,
translog_filename_by_fileno(file_no, path),
O_RDONLY | O_CLOEXEC, (no_errors ? MYF(0) : MYF(MY_WME)))) < 0)
{
my_errno= errno;
DBUG_PRINT("error", ("Error %d during opening file #%d",
errno, file_no));
DBUG_RETURN(1);
}
file_size= mysql_file_seek(fd, 0, SEEK_END, MYF(0));
mysql_file_close(fd, MYF(0));
}
DBUG_PRINT("info", ("File size: %s", llstr(file_size, buff)));
if (file_size == MY_FILEPOS_ERROR)
DBUG_RETURN(1);
DBUG_ASSERT(file_size < 0xffffffffULL);
if (((uint32)file_size) > TRANSLOG_PAGE_SIZE)
{
rec_offset= (((((uint32)file_size) / TRANSLOG_PAGE_SIZE) - 1) *
TRANSLOG_PAGE_SIZE);
*last_page_ok= (((uint32)file_size) == rec_offset + TRANSLOG_PAGE_SIZE);
}
else
{
*last_page_ok= 0;
rec_offset= 0;
}
*addr= MAKE_LSN(file_no, rec_offset);
DBUG_PRINT("info", ("Last page: 0x%lx ok: %d", (ulong) rec_offset,
*last_page_ok));
DBUG_RETURN(0);
} | O3 | c | translog_get_last_page_addr:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %r13
movq %r13, %r12
shrq $0x20, %r12
movl %r12d, %edi
callq 0x4e982
testq %rax, %rax
je 0x49f76
movl 0x18(%rax), %r15d
leaq 0x33c132(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x230(%rbp), %rdi
movl %r15d, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x49fa5
movl %r15d, %edi
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0xa076c
movq %rax, %rcx
cmpq $-0x1, %rcx
je 0x49f53
movl $0xffffe000, %edx # imm = 0xFFFFE000
movl %ecx, %eax
andl %edx, %eax
addl %eax, %edx
cmpl %ecx, %eax
sete %sil
xorl %eax, %eax
cmpl $0x2001, %ecx # imm = 0x2001
setae %cl
cmovbl %eax, %edx
andb %sil, %cl
movb %cl, (%r14)
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rcx, %r13
orq %rdx, %r13
movq %r13, (%rbx)
jmp 0x49f55
movb $0x1, %al
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x49fc3
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl %r15b, %edx
leaq -0x230(%rbp), %rsi
leaq -0x238(%rbp), %rcx
movl %r12d, %edi
callq 0x2c4fc
movl %eax, %ecx
movb $0x1, %al
testb $0x1, %cl
je 0x49f55
movq -0x238(%rbp), %rcx
jmp 0x49f13
leaq -0x238(%rbp), %r12
movq %rax, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x2c49f
movq (%r12), %rcx
jmp 0x49f13
callq 0x29270
| translog_get_last_page_addr:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 218h
mov r15d, edx
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r13, [rdi]
mov r12, r13
shr r12, 20h
mov edi, r12d
call get_logfile_by_number
test rax, rax
jz loc_49F76
mov r15d, [rax+18h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_230]
mov esi, r15d
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz loc_49FA5
mov edi, r15d
xor esi, esi
mov edx, 2
xor ecx, ecx
call my_seek
mov rcx, rax
loc_49F13:
cmp rcx, 0FFFFFFFFFFFFFFFFh
jz short loc_49F53
mov edx, 0FFFFE000h
mov eax, ecx
and eax, edx
add edx, eax
cmp eax, ecx
setz sil
xor eax, eax
cmp ecx, 2001h
setnb cl
cmovb edx, eax
and cl, sil
mov [r14], cl
mov rcx, 0FFFFFFFF00000000h
and r13, rcx
or r13, rdx
mov [rbx], r13
jmp short loc_49F55
loc_49F53:
mov al, 1
loc_49F55:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_49FC3
add rsp, 218h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_49F76:
movzx edx, r15b
lea rsi, [rbp+var_230]
lea rcx, [rbp+var_238]
mov edi, r12d
call translog_get_last_page_addr_cold_2
mov ecx, eax
mov al, 1
test cl, 1
jz short loc_49F55
mov rcx, [rbp+var_238]
jmp loc_49F13
loc_49FA5:
lea r12, [rbp+var_238]
mov rdi, rax
mov esi, r15d
mov rdx, r12
call translog_get_last_page_addr_cold_1
mov rcx, [r12]
jmp loc_49F13
loc_49FC3:
call ___stack_chk_fail
| char translog_get_last_page_addr(unsigned long long *a1, bool *a2, char a3)
{
unsigned long long v4; // r13
unsigned long long v5; // r12
long long logfile_by_number; // rax
unsigned int v7; // r15d
long long v8; // rax
long long v9; // rcx
long long v10; // rdx
char result; // al
char last_page_addr_cold_2; // cl
long long v13; // [rsp+8h] [rbp-238h] BYREF
_BYTE v14[512]; // [rsp+10h] [rbp-230h] BYREF
unsigned long long v15; // [rsp+210h] [rbp-30h]
v15 = __readfsqword(0x28u);
v4 = *a1;
v5 = HIDWORD(*a1);
logfile_by_number = get_logfile_by_number(HIDWORD(*a1));
if ( logfile_by_number )
{
v7 = *(_DWORD *)(logfile_by_number + 24);
v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v14, v7, 8LL);
if ( v8 )
{
translog_get_last_page_addr_cold_1(v8, v7, &v13);
v9 = v13;
}
else
{
v9 = my_seek(v7, 0LL, 2LL, 0LL);
}
}
else
{
last_page_addr_cold_2 = translog_get_last_page_addr_cold_2((unsigned int)v5, (long long)v14, a3, &v13);
result = 1;
if ( (last_page_addr_cold_2 & 1) == 0 )
return result;
v9 = v13;
}
if ( v9 == -1 )
return 1;
v10 = ((unsigned int)v9 & 0xFFFFE000) - 0x2000;
result = 0;
if ( (unsigned int)v9 < 0x2001 )
v10 = 0LL;
*a2 = (v9 & 0xFFFFE000) == (_DWORD)v9 && (unsigned int)v9 >= 0x2001;
*a1 = v10 | v4 & 0xFFFFFFFF00000000LL;
return result;
}
| translog_get_last_page_addr:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x218
MOV R15D,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R13,qword ptr [RDI]
MOV R12,R13
SHR R12,0x20
MOV EDI,R12D
CALL 0x0014e982
TEST RAX,RAX
JZ 0x00149f76
MOV R15D,dword ptr [RAX + 0x18]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x230]
MOV ESI,R15D
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00149fa5
MOV EDI,R15D
XOR ESI,ESI
MOV EDX,0x2
XOR ECX,ECX
CALL 0x001a076c
MOV RCX,RAX
LAB_00149f13:
CMP RCX,-0x1
JZ 0x00149f53
MOV EDX,0xffffe000
MOV EAX,ECX
AND EAX,EDX
ADD EDX,EAX
CMP EAX,ECX
SETZ SIL
XOR EAX,EAX
CMP ECX,0x2001
SETNC CL
CMOVC EDX,EAX
AND CL,SIL
MOV byte ptr [R14],CL
MOV RCX,-0x100000000
AND R13,RCX
OR R13,RDX
MOV qword ptr [RBX],R13
JMP 0x00149f55
LAB_00149f53:
MOV AL,0x1
LAB_00149f55:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00149fc3
ADD RSP,0x218
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00149f76:
MOVZX EDX,R15B
LEA RSI,[RBP + -0x230]
LEA RCX,[RBP + -0x238]
MOV EDI,R12D
CALL 0x0012c4fc
MOV ECX,EAX
MOV AL,0x1
TEST CL,0x1
JZ 0x00149f55
MOV RCX,qword ptr [RBP + -0x238]
JMP 0x00149f13
LAB_00149fa5:
LEA R12,[RBP + -0x238]
MOV RDI,RAX
MOV ESI,R15D
MOV RDX,R12
CALL 0x0012c49f
MOV RCX,qword ptr [R12]
JMP 0x00149f13
LAB_00149fc3:
CALL 0x00129270
|
int8 translog_get_last_page_addr(ulong *param_1,int8 param_2,int1 param_3)
{
int4 uVar1;
ulong uVar2;
uint uVar3;
long lVar4;
int8 uVar5;
uint uVar6;
ulong uVar7;
long in_FS_OFFSET;
long local_240;
int1 local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar2 = *param_1;
uVar7 = uVar2 >> 0x20;
lVar4 = get_logfile_by_number(uVar7);
if (lVar4 == 0) {
uVar7 = translog_get_last_page_addr_cold_2(uVar7,local_238,param_3,&local_240);
uVar5 = 1;
if ((uVar7 & 1) == 0) goto LAB_00149f55;
}
else {
uVar1 = *(int4 *)(lVar4 + 0x18);
lVar4 = (**(code **)(PSI_server + 0x158))(local_238,uVar1,8);
if (lVar4 == 0) {
local_240 = my_seek(uVar1,0,2,0);
}
else {
translog_get_last_page_addr_cold_1(lVar4,uVar1,&local_240);
}
}
if (local_240 == -1) {
uVar5 = 1;
}
else {
uVar6 = (uint)local_240;
uVar5 = 0;
uVar3 = (uVar6 & 0xffffe000) - 0x2000;
if (0x2000 >= uVar6) {
uVar3 = 0;
}
*(bool *)param_2 = 0x2000 < uVar6 && (uVar6 & 0xffffe000) == uVar6;
*param_1 = uVar2 & 0xffffffff00000000 | (ulong)uVar3;
}
LAB_00149f55:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar5;
}
|
|
1,092 | my_mb_wc_cp932 | eloqsql/strings/ctype-cp932.c | static int
my_mb_wc_cp932(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: [00-7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
/* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */
if (hi >= 0xA1 && hi <= 0xDF)
{
*pwc= cp932_to_unicode[hi];
return 1;
}
if (s + 2 > e)
return MY_CS_TOOSMALL2;
/* JIS-X-0208-MS [81..9F,E0..FC][40..7E,80..FC] */
if (!(pwc[0]= cp932_to_unicode[(hi << 8) + s[1]]))
return (iscp932head(hi) && iscp932tail(s[1])) ? -2 : MY_CS_ILSEQ;
return 2;
} | O3 | c | my_mb_wc_cp932:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x34e1f
movzbl (%rdx), %edi
testb %dil, %dil
js 0x34e05
movq %rdi, (%rsi)
jmp 0x34e1a
leal 0x5f(%rdi), %eax
cmpb $0x3e, %al
ja 0x34e21
leaq 0x48f5d(%rip), %rax # 0x7dd70
movzwl (%rax,%rdi,2), %eax
movq %rax, (%rsi)
movl $0x1, %eax
popq %rbp
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x34e1f
movzbl 0x1(%rdx), %eax
movl %edi, %ecx
shll $0x9, %ecx
leal (%rcx,%rax,2), %eax
leaq 0x48f2e(%rip), %rcx # 0x7dd70
movzwl (%rax,%rcx), %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testq %rcx, %rcx
jne 0x34e1f
cmpb $-0x80, %dil
setne %al
cmpb $-0x60, %dil
setb %cl
andb %al, %cl
addb $0x20, %dil
cmpb $0x1d, %dil
setb %sil
orb %cl, %sil
xorl %eax, %eax
cmpb $0x1, %sil
jne 0x34e1f
movb 0x1(%rdx), %cl
leal -0x40(%rcx), %edx
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
cmpb $0x3f, %dl
jb 0x34e1f
movl $0x0, %eax
testb %cl, %cl
jns 0x34e1f
xorl %eax, %eax
cmpb $-0x3, %cl
setae %al
leal -0x2(,%rax,2), %eax
jmp 0x34e1f
| my_mb_wc_cp932:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_34E1F
movzx edi, byte ptr [rdx]
test dil, dil
js short loc_34E05
mov [rsi], rdi
jmp short loc_34E1A
loc_34E05:
lea eax, [rdi+5Fh]
cmp al, 3Eh ; '>'
ja short loc_34E21
lea rax, cp932_to_unicode
movzx eax, word ptr [rax+rdi*2]
mov [rsi], rax
loc_34E1A:
mov eax, 1
loc_34E1F:
pop rbp
retn
loc_34E21:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_34E1F
movzx eax, byte ptr [rdx+1]
mov ecx, edi
shl ecx, 9
lea eax, [rcx+rax*2]
lea rcx, cp932_to_unicode
movzx ecx, word ptr [rax+rcx]
mov [rsi], rcx
mov eax, 2
test rcx, rcx
jnz short loc_34E1F
cmp dil, 80h
setnz al
cmp dil, 0A0h
setb cl
and cl, al
add dil, 20h ; ' '
cmp dil, 1Dh
setb sil
or sil, cl
xor eax, eax
cmp sil, 1
jnz short loc_34E1F
mov cl, [rdx+1]
lea edx, [rcx-40h]
mov eax, 0FFFFFFFEh
cmp dl, 3Fh ; '?'
jb short loc_34E1F
mov eax, 0
test cl, cl
jns short loc_34E1F
xor eax, eax
cmp cl, 0FDh
setnb al
lea eax, ds:0FFFFFFFFFFFFFFFEh[rax*2]
jmp loc_34E1F
| long long my_mb_wc_cp932(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
long long v6; // rcx
char v7; // cl
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( (v5 & 0x80u) == 0LL )
{
*a2 = v5;
return 1LL;
}
if ( (unsigned __int8)(v5 + 95) <= 0x3Eu )
{
*a2 = cp932_to_unicode[v5];
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = cp932_to_unicode[256 * (_DWORD)v5 + a3[1]];
*a2 = v6;
result = 2LL;
if ( !v6 )
{
result = 0LL;
if ( (_BYTE)v5 != 0x80 && (unsigned __int8)v5 < 0xA0u || (unsigned __int8)(v5 + 32) < 0x1Du )
{
v7 = a3[1];
result = 4294967294LL;
if ( (unsigned __int8)(v7 - 64) >= 0x3Fu )
{
result = 0LL;
if ( v7 < 0 )
return 2 * (unsigned int)((unsigned __int8)v7 >= 0xFDu) - 2;
}
}
}
}
}
return result;
}
| my_mb_wc_cp932:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00134e1f
MOVZX EDI,byte ptr [RDX]
TEST DIL,DIL
JS 0x00134e05
MOV qword ptr [RSI],RDI
JMP 0x00134e1a
LAB_00134e05:
LEA EAX,[RDI + 0x5f]
CMP AL,0x3e
JA 0x00134e21
LEA RAX,[0x17dd70]
MOVZX EAX,word ptr [RAX + RDI*0x2]
MOV qword ptr [RSI],RAX
LAB_00134e1a:
MOV EAX,0x1
LAB_00134e1f:
POP RBP
RET
LAB_00134e21:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x00134e1f
MOVZX EAX,byte ptr [RDX + 0x1]
MOV ECX,EDI
SHL ECX,0x9
LEA EAX,[RCX + RAX*0x2]
LEA RCX,[0x17dd70]
MOVZX ECX,word ptr [RAX + RCX*0x1]
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST RCX,RCX
JNZ 0x00134e1f
CMP DIL,0x80
SETNZ AL
CMP DIL,0xa0
SETC CL
AND CL,AL
ADD DIL,0x20
CMP DIL,0x1d
SETC SIL
OR SIL,CL
XOR EAX,EAX
CMP SIL,0x1
JNZ 0x00134e1f
MOV CL,byte ptr [RDX + 0x1]
LEA EDX,[RCX + -0x40]
MOV EAX,0xfffffffe
CMP DL,0x3f
JC 0x00134e1f
MOV EAX,0x0
TEST CL,CL
JNS 0x00134e1f
XOR EAX,EAX
CMP CL,0xfd
SETNC AL
LEA EAX,[-0x2 + RAX*0x2]
JMP 0x00134e1f
|
int my_mb_wc_cp932(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 (0x3e < (byte)(bVar1 + 0x5f)) {
if (param_4 < param_3 + 2) {
return -0x66;
}
uVar2 = *(ushort *)(cp932_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2));
*param_2 = (ulong)uVar2;
if ((ulong)uVar2 != 0) {
return 2;
}
if (0x1c < (byte)(bVar1 + 0x20) && (0x9f < bVar1 || bVar1 == 0x80)) {
return 0;
}
bVar1 = param_3[1];
if ((byte)(bVar1 - 0x40) < 0x3f) {
return -2;
}
if (-1 < (char)bVar1) {
return 0;
}
return (uint)(0xfc < bVar1) * 2 + -2;
}
*param_2 = (ulong)*(ushort *)(cp932_to_unicode + (ulong)bVar1 * 2);
}
else {
*param_2 = (ulong)bVar1;
}
iVar3 = 1;
}
return iVar3;
}
|
|
1,093 | ma_duplicate_resultset_metadata | eloqsql/libmariadb/libmariadb/mariadb_lib.c | MYSQL_FIELD *ma_duplicate_resultset_metadata(MYSQL_FIELD *fields, size_t count,
MA_MEM_ROOT *memroot)
{
size_t i;
MYSQL_FIELD *result=
(MYSQL_FIELD *) ma_alloc_root(memroot, sizeof(MYSQL_FIELD) * count);
if (!result)
return NULL;
for (i= 0; i < count; i++)
{
if (ma_deep_copy_field(&fields[i], &result[i], memroot))
return NULL;
}
return result;
} | O0 | c | ma_duplicate_resultset_metadata:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
shlq $0x7, %rsi
callq 0x565c0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x50c1a
movq $0x0, -0x8(%rbp)
jmp 0x50c7a
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x50c72
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
shlq $0x7, %rax
addq %rax, %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rax
shlq $0x7, %rax
addq %rax, %rsi
movq -0x20(%rbp), %rdx
callq 0x50c90
cmpl $0x0, %eax
je 0x50c62
movq $0x0, -0x8(%rbp)
jmp 0x50c7a
jmp 0x50c64
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x50c22
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_duplicate_resultset_metadata:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_18]
shl rsi, 7
call ma_alloc_root
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_50C1A
mov [rbp+var_8], 0
jmp short loc_50C7A
loc_50C1A:
mov [rbp+var_28], 0
loc_50C22:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
jnb short loc_50C72
mov rdi, [rbp+var_10]
mov rax, [rbp+var_28]
shl rax, 7
add rdi, rax
mov rsi, [rbp+var_30]
mov rax, [rbp+var_28]
shl rax, 7
add rsi, rax
mov rdx, [rbp+var_20]
call ma_deep_copy_field
cmp eax, 0
jz short loc_50C62
mov [rbp+var_8], 0
jmp short loc_50C7A
loc_50C62:
jmp short $+2
loc_50C64:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_50C22
loc_50C72:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_50C7A:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long ma_duplicate_resultset_metadata(long long a1, unsigned long long a2, long long a3)
{
long long v4; // [rsp+0h] [rbp-30h]
unsigned long long i; // [rsp+8h] [rbp-28h]
v4 = ma_alloc_root(a3, a2 << 7);
if ( !v4 )
return 0LL;
for ( i = 0LL; i < a2; ++i )
{
if ( (unsigned int)ma_deep_copy_field((i << 7) + a1, (i << 7) + v4, a3) )
return 0LL;
}
return v4;
}
| ma_duplicate_resultset_metadata:
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 RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x18]
SHL RSI,0x7
CALL 0x001565c0
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00150c1a
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00150c7a
LAB_00150c1a:
MOV qword ptr [RBP + -0x28],0x0
LAB_00150c22:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x00150c72
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x7
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x7
ADD RSI,RAX
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00150c90
CMP EAX,0x0
JZ 0x00150c62
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00150c7a
LAB_00150c62:
JMP 0x00150c64
LAB_00150c64:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00150c22
LAB_00150c72:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_00150c7a:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long ma_duplicate_resultset_metadata(long param_1,ulong param_2,int8 param_3)
{
int iVar1;
ulong local_30;
long local_10;
local_10 = ma_alloc_root(param_3,param_2 << 7);
if (local_10 == 0) {
local_10 = 0;
}
else {
for (local_30 = 0; local_30 < param_2; local_30 = local_30 + 1) {
iVar1 = ma_deep_copy_field(param_1 + local_30 * 0x80,local_10 + local_30 * 0x80,param_3);
if (iVar1 != 0) {
return 0;
}
}
}
return local_10;
}
|
|
1,094 | minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type) | monkey531[P]llama/common/minja.hpp | static std::string typeToString(Type t) {
switch (t) {
case Type::Text: return "text";
case Type::Expression: return "expression";
case Type::If: return "if";
case Type::Else: return "else";
case Type::Elif: return "elif";
case Type::EndIf: return "endif";
case Type::For: return "for";
case Type::EndFor: return "endfor";
case Type::Set: return "set";
case Type::EndSet: return "endset";
case Type::Comment: return "comment";
case Type::Macro: return "macro";
case Type::EndMacro: return "endmacro";
case Type::Filter: return "filter";
case Type::EndFilter: return "endfilter";
case Type::Generation: return "generation";
case Type::EndGeneration: return "endgeneration";
case Type::Break: return "break";
case Type::Continue: return "continue";
}
return "Unknown";
} | O1 | cpp | minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type):
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
cmpl $0x12, %esi
ja 0x9a85f
movl %esi, %eax
leaq 0x561e7(%rip), %rcx # 0xf08ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x56f70(%rip), %rsi # 0xf1685
leaq 0x56f6d(%rip), %rdx # 0xf1689
jmp 0x9a86d
leaq 0x572e7(%rip), %rsi # 0xf1a0f
leaq 0x572e9(%rip), %rdx # 0xf1a18
jmp 0x9a86d
leaq 0x572a7(%rip), %rsi # 0xf19e2
leaq 0x572a8(%rip), %rdx # 0xf19ea
jmp 0x9a86d
leaq 0x5726a(%rip), %rsi # 0xf19b8
leaq 0x57269(%rip), %rdx # 0xf19be
jmp 0x9a86d
leaq 0x57161(%rip), %rsi # 0xf18c2
leaq 0x5715e(%rip), %rdx # 0xf18c6
jmp 0x9a86d
leaq 0x582d0(%rip), %rsi # 0xf2a44
leaq 0x582d0(%rip), %rdx # 0xf2a4b
jmp 0x9a86d
leaq 0x571c6(%rip), %rsi # 0xf194d
leaq 0x571cc(%rip), %rdx # 0xf195a
jmp 0x9a86d
leaq 0x4f13f(%rip), %rsi # 0xe98d9
leaq 0x4f13a(%rip), %rdx # 0xe98db
jmp 0x9a86d
leaq 0x57265(%rip), %rsi # 0xf1a12
leaq 0x57264(%rip), %rdx # 0xf1a18
jmp 0x9a86d
leaq 0x57128(%rip), %rsi # 0xf18e8
leaq 0x57125(%rip), %rdx # 0xf18ec
jmp 0x9a86d
leaq 0x57173(%rip), %rsi # 0xf1946
leaq 0x57172(%rip), %rdx # 0xf194c
jmp 0x9a86d
leaq 0x572d3(%rip), %rsi # 0xf1ab9
leaq 0x572d6(%rip), %rdx # 0xf1ac3
jmp 0x9a86d
leaq 0x57223(%rip), %rsi # 0xf1a19
leaq 0x57221(%rip), %rdx # 0xf1a1e
jmp 0x9a86d
leaq 0x570e7(%rip), %rsi # 0xf18ed
leaq 0x570e5(%rip), %rdx # 0xf18f2
jmp 0x9a86d
leaq 0x571cf(%rip), %rsi # 0xf19e5
leaq 0x571cd(%rip), %rdx # 0xf19ea
jmp 0x9a86d
leaq 0x57123(%rip), %rsi # 0xf1949
leaq 0x5711f(%rip), %rdx # 0xf194c
jmp 0x9a86d
leaq 0x571e9(%rip), %rsi # 0xf1a1f
leaq 0x571ea(%rip), %rdx # 0xf1a27
jmp 0x9a86d
leaq 0x5c2b0(%rip), %rsi # 0xf6af6
leaq 0x5c2ac(%rip), %rdx # 0xf6af9
jmp 0x9a86d
leaq 0x570fa(%rip), %rsi # 0xf1950
leaq 0x570fd(%rip), %rdx # 0xf195a
jmp 0x9a86d
leaq 0x581e6(%rip), %rsi # 0xf2a4c
leaq 0x581e6(%rip), %rdx # 0xf2a53
movq %rbx, %rdi
callq 0x224a0
movq %rbx, %rax
popq %rbx
retq
| _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE:
push rbx
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
cmp esi, 12h; switch 19 cases
ja def_9A70C; jumptable 000000000009A70C default case
mov eax, esi
lea rcx, jpt_9A70C
movsxd rax, ds:(jpt_9A70C - 0F08ECh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_9A70E:
lea rsi, aText; jumptable 000000000009A70C case 0
lea rdx, aText+4; ""
jmp loc_9A86D
loc_9A721:
lea rsi, aEndfilter; jumptable 000000000009A70C case 16
lea rdx, aEndfilter+9; ""
jmp loc_9A86D
loc_9A734:
lea rsi, aEndmacro; jumptable 000000000009A70C case 14
lea rdx, aEndmacro+8; ""
jmp loc_9A86D
loc_9A747:
lea rsi, aEndset; jumptable 000000000009A70C case 11
lea rdx, aEndset+6; ""
jmp loc_9A86D
loc_9A75A:
lea rsi, aElif; jumptable 000000000009A70C case 4
lea rdx, aElif+4; ""
jmp loc_9A86D
loc_9A76D:
lea rsi, aComment; jumptable 000000000009A70C case 12
lea rdx, aComment+7; ""
jmp loc_9A86D
loc_9A780:
lea rsi, aEndgeneration; jumptable 000000000009A70C case 9
lea rdx, aEndgeneration+0Dh; ""
jmp loc_9A86D
loc_9A793:
lea rsi, aIf+1; jumptable 000000000009A70C case 2
lea rdx, aIf+3; ""
jmp loc_9A86D
loc_9A7A6:
lea rsi, aEndfilter+3; jumptable 000000000009A70C case 15
lea rdx, aEndfilter+9; ""
jmp loc_9A86D
loc_9A7B9:
lea rsi, aElse; jumptable 000000000009A70C case 3
lea rdx, aElse+4; ""
jmp loc_9A86D
loc_9A7CC:
lea rsi, aEndfor; jumptable 000000000009A70C case 7
lea rdx, aEndfor+6; ""
jmp loc_9A86D
loc_9A7DF:
lea rsi, aExpectedLeftSi_0+24h; jumptable 000000000009A70C case 1
lea rdx, aExpectedLeftSi_0+2Eh; ""
jmp short loc_9A86D
loc_9A7EF:
lea rsi, aBreak; jumptable 000000000009A70C case 17
lea rdx, aBreak+5; ""
jmp short loc_9A86D
loc_9A7FF:
lea rsi, aEndif; jumptable 000000000009A70C case 5
lea rdx, aEndif+5; ""
jmp short loc_9A86D
loc_9A80F:
lea rsi, aEndmacro+3; jumptable 000000000009A70C case 13
lea rdx, aEndmacro+8; ""
jmp short loc_9A86D
loc_9A81F:
lea rsi, aEndfor+3; jumptable 000000000009A70C case 6
lea rdx, aEndfor+6; ""
jmp short loc_9A86D
loc_9A82F:
lea rsi, aContinue; jumptable 000000000009A70C case 18
lea rdx, aContinue+8; ""
jmp short loc_9A86D
loc_9A83F:
lea rsi, aAtLeastOneOfMi+2Fh; jumptable 000000000009A70C case 10
lea rdx, aAtLeastOneOfMi+32h; ""
jmp short loc_9A86D
loc_9A84F:
lea rsi, aEndgeneration+3; jumptable 000000000009A70C case 8
lea rdx, aEndgeneration+0Dh; ""
jmp short loc_9A86D
def_9A70C:
lea rsi, aUnknown; jumptable 000000000009A70C default case
lea rdx, aUnknown+7; ""
loc_9A86D:
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
| _QWORD * minja::TemplateToken::typeToString[abi:cxx11](_QWORD *a1, int a2)
{
char *v2; // rsi
char *v3; // rdx
*a1 = a1 + 2;
switch ( a2 )
{
case 0:
v2 = "text";
v3 = (char *)"";
break;
case 1:
v2 = (char *)"expression";
v3 = (char *)"";
break;
case 2:
v2 = "if";
v3 = "";
break;
case 3:
v2 = "else";
v3 = "";
break;
case 4:
v2 = "elif";
v3 = "";
break;
case 5:
v2 = "endif";
v3 = "";
break;
case 6:
v2 = "for";
v3 = "";
break;
case 7:
v2 = "endfor";
v3 = "";
break;
case 8:
v2 = "generation";
v3 = "";
break;
case 9:
v2 = "endgeneration";
v3 = "";
break;
case 10:
v2 = (char *)"set";
v3 = (char *)"";
break;
case 11:
v2 = "endset";
v3 = "";
break;
case 12:
v2 = "comment";
v3 = "";
break;
case 13:
v2 = "macro";
v3 = "";
break;
case 14:
v2 = "endmacro";
v3 = "";
break;
case 15:
v2 = "filter";
v3 = "";
break;
case 16:
v2 = "endfilter";
v3 = "";
break;
case 17:
v2 = "break";
v3 = "";
break;
case 18:
v2 = "continue";
v3 = "";
break;
default:
v2 = "Unknown";
v3 = "";
break;
}
std::string::_M_construct<char const*>(a1, v2, (long long)v3);
return a1;
}
| typeToString[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
CMP ESI,0x12
JA 0x0019a85f
MOV EAX,ESI
LEA RCX,[0x1f08ec]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RSI,[0x1f1685]
LEA RDX,[0x1f1689]
JMP 0x0019a86d
caseD_10:
LEA RSI,[0x1f1a0f]
LEA RDX,[0x1f1a18]
JMP 0x0019a86d
caseD_e:
LEA RSI,[0x1f19e2]
LEA RDX,[0x1f19ea]
JMP 0x0019a86d
caseD_b:
LEA RSI,[0x1f19b8]
LEA RDX,[0x1f19be]
JMP 0x0019a86d
caseD_4:
LEA RSI,[0x1f18c2]
LEA RDX,[0x1f18c6]
JMP 0x0019a86d
caseD_c:
LEA RSI,[0x1f2a44]
LEA RDX,[0x1f2a4b]
JMP 0x0019a86d
caseD_9:
LEA RSI,[0x1f194d]
LEA RDX,[0x1f195a]
JMP 0x0019a86d
caseD_2:
LEA RSI,[0x1e98d9]
LEA RDX,[0x1e98db]
JMP 0x0019a86d
caseD_f:
LEA RSI,[0x1f1a12]
LEA RDX,[0x1f1a18]
JMP 0x0019a86d
caseD_3:
LEA RSI,[0x1f18e8]
LEA RDX,[0x1f18ec]
JMP 0x0019a86d
caseD_7:
LEA RSI,[0x1f1946]
LEA RDX,[0x1f194c]
JMP 0x0019a86d
caseD_1:
LEA RSI,[0x1f1ab9]
LEA RDX,[0x1f1ac3]
JMP 0x0019a86d
caseD_11:
LEA RSI,[0x1f1a19]
LEA RDX,[0x1f1a1e]
JMP 0x0019a86d
caseD_5:
LEA RSI,[0x1f18ed]
LEA RDX,[0x1f18f2]
JMP 0x0019a86d
caseD_d:
LEA RSI,[0x1f19e5]
LEA RDX,[0x1f19ea]
JMP 0x0019a86d
caseD_6:
LEA RSI,[0x1f1949]
LEA RDX,[0x1f194c]
JMP 0x0019a86d
caseD_12:
LEA RSI,[0x1f1a1f]
LEA RDX,[0x1f1a27]
JMP 0x0019a86d
caseD_a:
LEA RSI,[0x1f6af6]
LEA RDX,[0x1f6af9]
JMP 0x0019a86d
caseD_8:
LEA RSI,[0x1f1950]
LEA RDX,[0x1f195a]
JMP 0x0019a86d
default:
LEA RSI,[0x1f2a4c]
LEA RDX,[0x1f2a53]
LAB_0019a86d:
MOV RDI,RBX
CALL 0x001224a0
MOV RAX,RBX
POP RBX
RET
|
/* minja::TemplateToken::typeToString[abi:cxx11](minja::TemplateToken::Type) */
TemplateToken * __thiscall
minja::TemplateToken::typeToString_abi_cxx11_(TemplateToken *this,int4 param_2)
{
char *pcVar1;
char *pcVar2;
*(TemplateToken **)this = this + 0x10;
switch(param_2) {
case 0:
pcVar2 = "text";
pcVar1 = "";
break;
case 1:
pcVar2 = "expression";
pcVar1 = "";
break;
case 2:
pcVar2 = "if";
pcVar1 = "";
break;
case 3:
pcVar2 = "else";
pcVar1 = "";
break;
case 4:
pcVar2 = "elif";
pcVar1 = "";
break;
case 5:
pcVar2 = "endif";
pcVar1 = "";
break;
case 6:
pcVar2 = "for";
pcVar1 = "";
break;
case 7:
pcVar2 = "endfor";
pcVar1 = "";
break;
case 8:
pcVar2 = "generation";
pcVar1 = "";
break;
case 9:
pcVar2 = "endgeneration";
pcVar1 = "";
break;
case 10:
pcVar2 = "set";
pcVar1 = "";
break;
case 0xb:
pcVar2 = "endset";
pcVar1 = "";
break;
case 0xc:
pcVar2 = "comment";
pcVar1 = "";
break;
case 0xd:
pcVar2 = "macro";
pcVar1 = "";
break;
case 0xe:
pcVar2 = "endmacro";
pcVar1 = "";
break;
case 0xf:
pcVar2 = "filter";
pcVar1 = "";
break;
case 0x10:
pcVar2 = "endfilter";
pcVar1 = "";
break;
case 0x11:
pcVar2 = "break";
pcVar1 = "";
break;
case 0x12:
pcVar2 = "continue";
pcVar1 = "";
break;
default:
pcVar2 = "Unknown";
pcVar1 = "";
}
std::__cxx11::string::_M_construct<char_const*>(this,pcVar2,pcVar1);
return this;
}
|
|
1,095 | js_fcvt | bluesky950520[P]quickjs/quickjs.c | static size_t js_fcvt(double d, int n_digits,
char dest[minimum_length(JS_FCVT_BUF_SIZE)], size_t size)
{
#if defined(FE_DOWNWARD) && defined(FE_TONEAREST)
int i, n1;
/* generate 2 extra digits: 99% chances to avoid 2 calls */
n1 = snprintf(dest, size, "%.*f", n_digits + 2, d) - 2;
if (dest[n1] >= '5') {
if (dest[n1] == '5' && dest[n1 + 1] == '0') {
/* close to half-way: try rounding toward 0 */
fesetround(FE_DOWNWARD);
n1 = snprintf(dest, size, "%.*f", n_digits + 2, d) - 2;
fesetround(FE_TONEAREST);
}
if (dest[n1] >= '5') { /* number should be rounded up */
/* d is either exactly half way or greater: round the string manually */
for (i = n1 - 1;; i--) {
/* ignore the locale specific decimal point */
if (is_digit(dest[i])) {
if (dest[i]++ < '9')
break;
dest[i] = '0';
if (i == 0) {
dest[0] = '1';
dest[n1] = '0';
dest[n1 - n_digits - 1] = '0';
dest[n1 - n_digits] = '.';
n1++;
break;
}
}
}
}
}
/* truncate the extra 2 digits and the decimal point if !n_digits */
n1 -= !n_digits;
//dest[n1] = '\0'; // optional
return n1;
#else
/* No disambiguation available, eg: __wasi__ targets */
return snprintf(dest, size, "%.*f", n_digits, d);
#endif
} | O0 | c | js_fcvt:
subq $0x28, %rsp
movsd %xmm0, 0x20(%rsp)
movl %edi, 0x1c(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl 0x1c(%rsp), %ecx
addl $0x2, %ecx
movsd 0x20(%rsp), %xmm0
leaq 0xab947(%rip), %rdx # 0x10cabd
movb $0x1, %al
callq 0xe2d0
subl $0x2, %eax
movl %eax, (%rsp)
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x35, %eax
jl 0x612d2
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x35, %eax
jne 0x611fe
movq 0x10(%rsp), %rax
movl (%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jne 0x611fe
movl $0x400, %edi # imm = 0x400
callq 0xe030
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl 0x1c(%rsp), %ecx
addl $0x2, %ecx
movsd 0x20(%rsp), %xmm0
leaq 0xab8d3(%rip), %rdx # 0x10cabd
movb $0x1, %al
callq 0xe2d0
subl $0x2, %eax
movl %eax, (%rsp)
xorl %edi, %edi
callq 0xe030
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x35, %eax
jl 0x612d0
movl (%rsp), %eax
subl $0x1, %eax
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %rax
movslq 0x4(%rsp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x26e30
cmpl $0x0, %eax
je 0x612bc
movq 0x10(%rsp), %rcx
movslq 0x4(%rsp), %rdx
movb (%rcx,%rdx), %al
movb %al, %sil
addb $0x1, %sil
movb %sil, (%rcx,%rdx)
movzbl %al, %eax
cmpl $0x39, %eax
jge 0x6125c
jmp 0x612ce
movq 0x10(%rsp), %rax
movslq 0x4(%rsp), %rcx
movb $0x30, (%rax,%rcx)
cmpl $0x0, 0x4(%rsp)
jne 0x612ba
movq 0x10(%rsp), %rax
movb $0x31, (%rax)
movq 0x10(%rsp), %rax
movslq (%rsp), %rcx
movb $0x30, (%rax,%rcx)
movq 0x10(%rsp), %rax
movl (%rsp), %ecx
subl 0x1c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x30, (%rax,%rcx)
movq 0x10(%rsp), %rax
movl (%rsp), %ecx
subl 0x1c(%rsp), %ecx
movslq %ecx, %rcx
movb $0x2e, (%rax,%rcx)
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x612ce
jmp 0x612bc
jmp 0x612be
movl 0x4(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x6121e
jmp 0x612d0
jmp 0x612d2
cmpl $0x0, 0x1c(%rsp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %ecx
movl (%rsp), %eax
subl %ecx, %eax
movl %eax, (%rsp)
movslq (%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| js_fcvt:
sub rsp, 28h
movsd [rsp+28h+var_8], xmm0
mov [rsp+28h+var_C], edi
mov [rsp+28h+var_18], rsi
mov [rsp+28h+var_20], rdx
mov rdi, [rsp+28h+var_18]
mov rsi, [rsp+28h+var_20]
mov ecx, [rsp+28h+var_C]
add ecx, 2
movsd xmm0, [rsp+28h+var_8]
lea rdx, asc_10CABD; "%.*f"
mov al, 1
call _snprintf
sub eax, 2
mov [rsp+28h+var_28], eax
mov rax, [rsp+28h+var_18]
movsxd rcx, [rsp+28h+var_28]
movzx eax, byte ptr [rax+rcx]
cmp eax, 35h ; '5'
jl loc_612D2
mov rax, [rsp+28h+var_18]
movsxd rcx, [rsp+28h+var_28]
movzx eax, byte ptr [rax+rcx]
cmp eax, 35h ; '5'
jnz short loc_611FE
mov rax, [rsp+28h+var_18]
mov ecx, [rsp+28h+var_28]
add ecx, 1
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
cmp eax, 30h ; '0'
jnz short loc_611FE
mov edi, 400h
call _fesetround
mov rdi, [rsp+28h+var_18]
mov rsi, [rsp+28h+var_20]
mov ecx, [rsp+28h+var_C]
add ecx, 2
movsd xmm0, [rsp+28h+var_8]
lea rdx, asc_10CABD; "%.*f"
mov al, 1
call _snprintf
sub eax, 2
mov [rsp+28h+var_28], eax
xor edi, edi
call _fesetround
loc_611FE:
mov rax, [rsp+28h+var_18]
movsxd rcx, [rsp+28h+var_28]
movzx eax, byte ptr [rax+rcx]
cmp eax, 35h ; '5'
jl loc_612D0
mov eax, [rsp+28h+var_28]
sub eax, 1
mov [rsp+28h+var_24], eax
loc_6121E:
mov rax, [rsp+28h+var_18]
movsxd rcx, [rsp+28h+var_24]
movzx edi, byte ptr [rax+rcx]
call is_digit
cmp eax, 0
jz loc_612BC
mov rcx, [rsp+28h+var_18]
movsxd rdx, [rsp+28h+var_24]
mov al, [rcx+rdx]
mov sil, al
add sil, 1
mov [rcx+rdx], sil
movzx eax, al
cmp eax, 39h ; '9'
jge short loc_6125C
jmp short loc_612CE
loc_6125C:
mov rax, [rsp+28h+var_18]
movsxd rcx, [rsp+28h+var_24]
mov byte ptr [rax+rcx], 30h ; '0'
cmp [rsp+28h+var_24], 0
jnz short loc_612BA
mov rax, [rsp+28h+var_18]
mov byte ptr [rax], 31h ; '1'
mov rax, [rsp+28h+var_18]
movsxd rcx, [rsp+28h+var_28]
mov byte ptr [rax+rcx], 30h ; '0'
mov rax, [rsp+28h+var_18]
mov ecx, [rsp+28h+var_28]
sub ecx, [rsp+28h+var_C]
sub ecx, 1
movsxd rcx, ecx
mov byte ptr [rax+rcx], 30h ; '0'
mov rax, [rsp+28h+var_18]
mov ecx, [rsp+28h+var_28]
sub ecx, [rsp+28h+var_C]
movsxd rcx, ecx
mov byte ptr [rax+rcx], 2Eh ; '.'
mov eax, [rsp+28h+var_28]
add eax, 1
mov [rsp+28h+var_28], eax
jmp short loc_612CE
loc_612BA:
jmp short $+2
loc_612BC:
jmp short $+2
loc_612BE:
mov eax, [rsp+28h+var_24]
add eax, 0FFFFFFFFh
mov [rsp+28h+var_24], eax
jmp loc_6121E
loc_612CE:
jmp short $+2
loc_612D0:
jmp short $+2
loc_612D2:
cmp [rsp+28h+var_C], 0
setnz al
xor al, 0FFh
and al, 1
movzx ecx, al
mov eax, [rsp+28h+var_28]
sub eax, ecx
mov [rsp+28h+var_28], eax
movsxd rax, [rsp+28h+var_28]
add rsp, 28h
retn
| long long js_fcvt(unsigned int a1, _BYTE *a2, long long a3, double a4)
{
unsigned __int8 v4; // al
unsigned int v6; // [rsp+0h] [rbp-28h]
unsigned int i; // [rsp+4h] [rbp-24h]
v6 = snprintf(a2, a3, "%.*f", a1 + 2, a4) - 2;
if ( (unsigned __int8)a2[v6] >= 0x35u )
{
if ( a2[v6] == 53 && a2[v6 + 1] == 48 )
{
fesetround(1024LL);
v6 = snprintf(a2, a3, "%.*f", a1 + 2, a4) - 2;
fesetround(0LL);
}
if ( (unsigned __int8)a2[v6] >= 0x35u )
{
for ( i = v6 - 1; ; --i )
{
if ( is_digit((unsigned __int8)a2[i]) )
{
v4 = a2[i];
a2[i] = v4 + 1;
if ( v4 < 0x39u )
return (int)((__PAIR64__(v6, a1) - 1) >> 32);
a2[i] = 48;
if ( !i )
break;
}
}
*a2 = 49;
a2[v6] = 48;
a2[v6 - a1 - 1] = 48;
a2[v6 - a1] = 46;
++v6;
}
}
return (int)((__PAIR64__(v6, a1) - 1) >> 32);
}
| js_fcvt:
SUB RSP,0x28
MOVSD qword ptr [RSP + 0x20],XMM0
MOV dword ptr [RSP + 0x1c],EDI
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x1c]
ADD ECX,0x2
MOVSD XMM0,qword ptr [RSP + 0x20]
LEA RDX,[0x20cabd]
MOV AL,0x1
CALL 0x0010e2d0
SUB EAX,0x2
MOV dword ptr [RSP],EAX
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x35
JL 0x001612d2
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x35
JNZ 0x001611fe
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP]
ADD ECX,0x1
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x30
JNZ 0x001611fe
MOV EDI,0x400
CALL 0x0010e030
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x1c]
ADD ECX,0x2
MOVSD XMM0,qword ptr [RSP + 0x20]
LEA RDX,[0x20cabd]
MOV AL,0x1
CALL 0x0010e2d0
SUB EAX,0x2
MOV dword ptr [RSP],EAX
XOR EDI,EDI
CALL 0x0010e030
LAB_001611fe:
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x35
JL 0x001612d0
MOV EAX,dword ptr [RSP]
SUB EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
LAB_0016121e:
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x4]
MOVZX EDI,byte ptr [RAX + RCX*0x1]
CALL 0x00126e30
CMP EAX,0x0
JZ 0x001612bc
MOV RCX,qword ptr [RSP + 0x10]
MOVSXD RDX,dword ptr [RSP + 0x4]
MOV AL,byte ptr [RCX + RDX*0x1]
MOV SIL,AL
ADD SIL,0x1
MOV byte ptr [RCX + RDX*0x1],SIL
MOVZX EAX,AL
CMP EAX,0x39
JGE 0x0016125c
JMP 0x001612ce
LAB_0016125c:
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x4]
MOV byte ptr [RAX + RCX*0x1],0x30
CMP dword ptr [RSP + 0x4],0x0
JNZ 0x001612ba
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX],0x31
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP]
MOV byte ptr [RAX + RCX*0x1],0x30
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP]
SUB ECX,dword ptr [RSP + 0x1c]
SUB ECX,0x1
MOVSXD RCX,ECX
MOV byte ptr [RAX + RCX*0x1],0x30
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP]
SUB ECX,dword ptr [RSP + 0x1c]
MOVSXD RCX,ECX
MOV byte ptr [RAX + RCX*0x1],0x2e
MOV EAX,dword ptr [RSP]
ADD EAX,0x1
MOV dword ptr [RSP],EAX
JMP 0x001612ce
LAB_001612ba:
JMP 0x001612bc
LAB_001612bc:
JMP 0x001612be
LAB_001612be:
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,-0x1
MOV dword ptr [RSP + 0x4],EAX
JMP 0x0016121e
LAB_001612ce:
JMP 0x001612d0
LAB_001612d0:
JMP 0x001612d2
LAB_001612d2:
CMP dword ptr [RSP + 0x1c],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX ECX,AL
MOV EAX,dword ptr [RSP]
SUB EAX,ECX
MOV dword ptr [RSP],EAX
MOVSXD RAX,dword ptr [RSP]
ADD RSP,0x28
RET
|
long js_fcvt(int8 param_1,int param_2,char *param_3,size_t param_4)
{
byte bVar1;
int iVar2;
int local_28;
int local_24;
iVar2 = snprintf(param_3,param_4,"%.*f",param_1,(ulong)(param_2 + 2));
local_28 = iVar2 + -2;
if (0x34 < (byte)param_3[local_28]) {
if ((param_3[local_28] == '5') && (param_3[iVar2 + -1] == '0')) {
fesetround(0x400);
local_28 = snprintf(param_3,param_4,"%.*f",param_1,(ulong)(param_2 + 2));
local_28 = local_28 + -2;
fesetround(0);
}
local_24 = local_28;
if (0x34 < (byte)param_3[local_28]) {
do {
do {
local_24 = local_24 + -1;
iVar2 = is_digit(param_3[local_24]);
} while (iVar2 == 0);
bVar1 = param_3[local_24];
param_3[local_24] = bVar1 + 1;
if (bVar1 < 0x39) goto LAB_001612d2;
param_3[local_24] = '0';
} while (local_24 != 0);
*param_3 = '1';
param_3[local_28] = '0';
param_3[(local_28 - param_2) + -1] = '0';
param_3[local_28 - param_2] = '.';
local_28 = local_28 + 1;
}
}
LAB_001612d2:
return (long)(int)(local_28 - (uint)((param_2 != 0 ^ 0xffU) & 1));
}
|
|
1,096 | exec_REDO_LOGREC_UNDO_ROW_DELETE | eloqsql/storage/maria/ma_recovery.c | prototype_redo_exec_hook(UNDO_ROW_DELETE)
{
MARIA_HA *info= get_MARIA_HA_from_UNDO_record(rec);
MARIA_SHARE *share;
set_undo_lsn_for_active_trans(rec->short_trid, rec->lsn);
if (info == NULL)
return 0;
share= info->s;
if (cmp_translog_addr(rec->lsn, share->state.is_of_horizon) >= 0)
{
tprint(tracef, " state older than record\n");
share->state.state.records--;
if (share->calc_checksum)
{
uchar buff[HA_CHECKSUM_STORE_SIZE];
if (translog_read_record(rec->lsn, LSN_STORE_SIZE + FILEID_STORE_SIZE +
PAGE_STORE_SIZE + DIRPOS_STORE_SIZE + 2 +
PAGERANGE_STORE_SIZE,
HA_CHECKSUM_STORE_SIZE, buff, NULL) !=
HA_CHECKSUM_STORE_SIZE)
{
eprint(tracef, "Failed to read record");
return 1;
}
share->state.state.checksum+= ha_checksum_korr(buff);
}
share->state.changed|= (STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_ROWS | STATE_NOT_ZEROFILLED |
STATE_NOT_MOVABLE);
}
tprint(tracef, " row count: %lu\n", (ulong)share->state.state.records);
_ma_unpin_all_pages(info, rec->lsn);
return 0;
} | O3 | c | exec_REDO_LOGREC_UNDO_ROW_DELETE:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
callq 0x5596f
movq %rax, %r14
movzwl 0x10(%rbx), %eax
movq 0xbd41f5(%rip), %rcx # 0xc27c40
movl %eax, %esi
shll $0x5, %esi
cmpq $0x0, 0x18(%rcx,%rsi)
je 0x53a77
movq (%rbx), %rdx
addq %rcx, %rsi
movq %rdx, 0x8(%rsi)
shll $0x5, %eax
cmpq $0x0, 0x10(%rcx,%rax)
jne 0x53a77
addq %rcx, %rax
addq $0x10, %rax
movq %rdx, (%rax)
testq %r14, %r14
je 0x53b12
movq (%r14), %r15
movq (%rbx), %rax
cmpq 0x180(%r15), %rax
jl 0x53ae6
leaq 0xbd430a(%rip), %r12 # 0xc27da0
movq (%r12), %rdi
leaq 0xa7633(%rip), %rsi # 0xfb0d4
xorl %eax, %eax
callq 0x55d08
decq 0x18(%r15)
cmpq $0x0, 0x6a8(%r15)
je 0x53adb
movq (%rbx), %rdi
leaq -0x2c(%rbp), %rcx
movl $0x13, %esi
movl $0x4, %edx
xorl %r8d, %r8d
callq 0x45a2a
cmpl $0x4, %eax
jne 0x53b17
movl -0x2c(%rbp), %eax
addl %eax, 0x48(%r15)
orl $0x1c9, 0x170(%r15) # imm = 0x1C9
leaq 0xbd42b3(%rip), %rax # 0xc27da0
movq (%rax), %rdi
movq 0x18(%r15), %rdx
leaq 0xa75b2(%rip), %rsi # 0xfb0ad
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x55d08
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x604f8
jmp 0x53b2f
xorl %r15d, %r15d
jmp 0x53b2f
movq (%r12), %rdi
leaq 0xa6a12(%rip), %rsi # 0xfa534
xorl %eax, %eax
callq 0x55d90
movl $0x1, %r15d
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x53b4e
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a280
| exec_REDO_LOGREC_UNDO_ROW_DELETE:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
call get_MARIA_HA_from_UNDO_record
mov r14, rax
movzx eax, word ptr [rbx+10h]
mov rcx, cs:all_active_trans
mov esi, eax
shl esi, 5
cmp qword ptr [rcx+rsi+18h], 0
jz short loc_53A77
mov rdx, [rbx]
add rsi, rcx
mov [rsi+8], rdx
shl eax, 5
cmp qword ptr [rcx+rax+10h], 0
jnz short loc_53A77
add rax, rcx
add rax, 10h
mov [rax], rdx
loc_53A77:
test r14, r14
jz loc_53B12
mov r15, [r14]
mov rax, [rbx]
cmp rax, [r15+180h]
jl short loc_53AE6
lea r12, tracef
mov rdi, [r12]
lea rsi, aStateOlderThan; " state older than record\n"
xor eax, eax
call tprint
dec qword ptr [r15+18h]
cmp qword ptr [r15+6A8h], 0
jz short loc_53ADB
mov rdi, [rbx]
lea rcx, [rbp+var_2C]
mov esi, 13h
mov edx, 4
xor r8d, r8d
call translog_read_record
cmp eax, 4
jnz short loc_53B17
mov eax, [rbp+var_2C]
add [r15+48h], eax
loc_53ADB:
or dword ptr [r15+170h], 1C9h
loc_53AE6:
lea rax, tracef
mov rdi, [rax]
mov rdx, [r15+18h]
lea rsi, aRowCountLu; " row count: %lu\n"
xor r15d, r15d
xor eax, eax
call tprint
mov rsi, [rbx]
mov rdi, r14
call _ma_unpin_all_pages
jmp short loc_53B2F
loc_53B12:
xor r15d, r15d
jmp short loc_53B2F
loc_53B17:
mov rdi, [r12]
lea rsi, aFailedToReadRe; "Failed to read record"
xor eax, eax
call eprint
mov r15d, 1
loc_53B2F:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_53B4E
mov eax, r15d
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_53B4E:
call ___stack_chk_fail
| long long exec_REDO_LOGREC_UNDO_ROW_DELETE(long long *a1)
{
long long v1; // rdx
int v2; // r8d
int v3; // r9d
long long MARIA_HA_from_UNDO_record; // r14
int v5; // eax
long long v6; // rcx
long long v7; // rsi
long long v8; // rax
long long v9; // r15
int v10; // edx
long long v11; // rdx
unsigned int v12; // r15d
int v14; // [rsp+4h] [rbp-2Ch] BYREF
unsigned long long v15; // [rsp+8h] [rbp-28h]
v15 = __readfsqword(0x28u);
MARIA_HA_from_UNDO_record = get_MARIA_HA_from_UNDO_record();
v5 = *((unsigned __int16 *)a1 + 8);
v6 = all_active_trans;
v7 = (unsigned int)(32 * v5);
if ( *(_QWORD *)(all_active_trans + v7 + 24) )
{
v1 = *a1;
*(_QWORD *)(all_active_trans + v7 + 8) = *a1;
v8 = (unsigned int)(32 * v5);
if ( !*(_QWORD *)(v6 + v8 + 16) )
*(_QWORD *)(v6 + v8 + 16) = v1;
}
if ( MARIA_HA_from_UNDO_record )
{
v9 = *(_QWORD *)MARIA_HA_from_UNDO_record;
if ( *a1 >= *(_QWORD *)(*(_QWORD *)MARIA_HA_from_UNDO_record + 384LL) )
{
tprint(tracef, (unsigned int)" state older than record\n", v1, v6, v2, v3);
--*(_QWORD *)(v9 + 24);
if ( *(_QWORD *)(v9 + 1704) )
{
if ( (unsigned int)translog_read_record(*a1, 0x13u, 4LL, (long long)&v14, 0LL) != 4 )
{
eprint(tracef, (unsigned int)"Failed to read record", v10, v6, v2, v3);
return 1;
}
*(_DWORD *)(v9 + 72) += v14;
}
*(_DWORD *)(v9 + 368) |= 0x1C9u;
}
v11 = *(_QWORD *)(v9 + 24);
v12 = 0;
tprint(tracef, (unsigned int)" row count: %lu\n", v11, v6, v2, v3);
ma_unpin_all_pages(MARIA_HA_from_UNDO_record, *a1);
}
else
{
return 0;
}
return v12;
}
| exec_REDO_LOGREC_UNDO_ROW_DELETE:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
CALL 0x0015596f
MOV R14,RAX
MOVZX EAX,word ptr [RBX + 0x10]
MOV RCX,qword ptr [0x00d27c40]
MOV ESI,EAX
SHL ESI,0x5
CMP qword ptr [RCX + RSI*0x1 + 0x18],0x0
JZ 0x00153a77
MOV RDX,qword ptr [RBX]
ADD RSI,RCX
MOV qword ptr [RSI + 0x8],RDX
SHL EAX,0x5
CMP qword ptr [RCX + RAX*0x1 + 0x10],0x0
JNZ 0x00153a77
ADD RAX,RCX
ADD RAX,0x10
MOV qword ptr [RAX],RDX
LAB_00153a77:
TEST R14,R14
JZ 0x00153b12
MOV R15,qword ptr [R14]
MOV RAX,qword ptr [RBX]
CMP RAX,qword ptr [R15 + 0x180]
JL 0x00153ae6
LEA R12,[0xd27da0]
MOV RDI,qword ptr [R12]
LEA RSI,[0x1fb0d4]
XOR EAX,EAX
CALL 0x00155d08
DEC qword ptr [R15 + 0x18]
CMP qword ptr [R15 + 0x6a8],0x0
JZ 0x00153adb
MOV RDI,qword ptr [RBX]
LEA RCX,[RBP + -0x2c]
MOV ESI,0x13
MOV EDX,0x4
XOR R8D,R8D
CALL 0x00145a2a
CMP EAX,0x4
JNZ 0x00153b17
MOV EAX,dword ptr [RBP + -0x2c]
ADD dword ptr [R15 + 0x48],EAX
LAB_00153adb:
OR dword ptr [R15 + 0x170],0x1c9
LAB_00153ae6:
LEA RAX,[0xd27da0]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [R15 + 0x18]
LEA RSI,[0x1fb0ad]
XOR R15D,R15D
XOR EAX,EAX
CALL 0x00155d08
MOV RSI,qword ptr [RBX]
MOV RDI,R14
CALL 0x001604f8
JMP 0x00153b2f
LAB_00153b12:
XOR R15D,R15D
JMP 0x00153b2f
LAB_00153b17:
MOV RDI,qword ptr [R12]
LEA RSI,[0x1fa534]
XOR EAX,EAX
CALL 0x00155d90
MOV R15D,0x1
LAB_00153b2f:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00153b4e
MOV EAX,R15D
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00153b4e:
CALL 0x0012a280
|
int8 exec_REDO_LOGREC_UNDO_ROW_DELETE(long *param_1)
{
ushort uVar1;
long lVar2;
long lVar3;
int iVar4;
long *plVar5;
long lVar6;
int8 uVar7;
long in_FS_OFFSET;
int local_34;
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
plVar5 = (long *)get_MARIA_HA_from_UNDO_record();
lVar3 = all_active_trans;
uVar1 = *(ushort *)(param_1 + 2);
lVar6 = (ulong)uVar1 * 0x20;
if (*(long *)(all_active_trans + 0x18 + lVar6) != 0) {
lVar2 = *param_1;
*(long *)(lVar6 + all_active_trans + 8) = lVar2;
lVar6 = (ulong)uVar1 * 0x20;
if (*(long *)(lVar3 + 0x10 + lVar6) == 0) {
*(long *)(lVar6 + lVar3 + 0x10) = lVar2;
}
}
if (plVar5 == (long *)0x0) {
uVar7 = 0;
}
else {
lVar3 = *plVar5;
if (*(long *)(lVar3 + 0x180) <= *param_1) {
tprint(tracef," state older than record\n");
*(long *)(lVar3 + 0x18) = *(long *)(lVar3 + 0x18) + -1;
if (*(long *)(lVar3 + 0x6a8) != 0) {
iVar4 = translog_read_record(*param_1,0x13,4,&local_34,0);
if (iVar4 != 4) {
eprint(tracef,"Failed to read record");
uVar7 = 1;
goto LAB_00153b2f;
}
*(int *)(lVar3 + 0x48) = *(int *)(lVar3 + 0x48) + local_34;
}
*(uint *)(lVar3 + 0x170) = *(uint *)(lVar3 + 0x170) | 0x1c9;
}
uVar7 = 0;
tprint(tracef," row count: %lu\n",*(int8 *)(lVar3 + 0x18));
_ma_unpin_all_pages(plVar5,*param_1);
}
LAB_00153b2f:
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return uVar7;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
1,097 | my_caseup_utf16 | eloqsql/strings/ctype-ucs2.c | static size_t
my_caseup_utf16(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0)
{
my_toupper_utf16(uni_plane, &wc);
if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O3 | c | my_caseup_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
testq %rdx, %rdx
jle 0x6605d
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x78(%rdi), %rax
movq %rax, -0x50(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
leaq (%rsi,%rax), %r14
addq %r15, -0x38(%rbp)
movq %r13, %rdi
leaq -0x40(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *-0x58(%rbp)
testl %eax, %eax
jle 0x6605d
movl %eax, %ebx
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rax
cmpq (%rax), %rsi
ja 0x6603f
movq 0x8(%rax), %rax
movq %rsi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x6603f
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rax,%rcx,4), %esi
movq %rsi, -0x40(%rbp)
movq %r13, %rdi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq *-0x48(%rbp)
cmpl %eax, %ebx
jne 0x6605d
movl %ebx, %eax
addq %rax, %r12
addq %rax, %r15
cmpq %r14, %r12
jb 0x65ff9
movq -0x30(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_caseup_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_38], r8
mov [rbp+var_30], rdx
test rdx, rdx
jle loc_6605D
mov r15, rcx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+78h]
mov [rbp+var_50], rax
mov rax, [rdi+0B8h]
mov rcx, [rax+28h]
mov [rbp+var_58], rcx
mov rax, [rax+30h]
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
lea r14, [rsi+rax]
add [rbp+var_38], r15
loc_65FF9:
mov rdi, r13
lea rsi, [rbp+var_40]
mov rdx, r12
mov rcx, r14
call [rbp+var_58]
test eax, eax
jle short loc_6605D
mov ebx, eax
mov rsi, [rbp+var_40]
mov rax, [rbp+var_50]
cmp rsi, [rax]
ja short loc_6603F
mov rax, [rax+8]
mov rcx, rsi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_6603F
movzx ecx, sil
lea rcx, [rcx+rcx*2]
mov esi, [rax+rcx*4]
mov [rbp+var_40], rsi
loc_6603F:
mov rdi, r13
mov rdx, r15
mov rcx, [rbp+var_38]
call [rbp+var_48]
cmp ebx, eax
jnz short loc_6605D
mov eax, ebx
add r12, rax
add r15, rax
cmp r12, r14
jb short loc_65FF9
loc_6605D:
mov rax, [rbp+var_30]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_caseup_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5)
{
long long v5; // r15
unsigned long long v6; // r12
long long v7; // rax
unsigned long long v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rsi
long long v12; // rax
long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h]
unsigned long long *v15; // [rsp+10h] [rbp-50h]
unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h]
unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF
long long v18; // [rsp+28h] [rbp-38h]
long long v19; // [rsp+30h] [rbp-30h]
v18 = a5;
v19 = a3;
if ( a3 > 0 )
{
v5 = a4;
v6 = a2;
v15 = *(unsigned long long **)(a1 + 120);
v7 = *(_QWORD *)(a1 + 184);
v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40);
v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48);
v8 = a2 + v19;
v18 += a4;
do
{
v9 = v14(a1, &v17, v6, v8);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v17;
if ( v17 <= *v15 )
{
v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17);
v17 = v11;
}
}
if ( v10 != v16(a1, v11, v5, v18) )
break;
v6 += v10;
v5 += v10;
}
while ( v6 < v8 );
}
return v19;
}
| my_caseup_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x30],RDX
TEST RDX,RDX
JLE 0x0016605d
MOV R15,RCX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RCX
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
LEA R14,[RSI + RAX*0x1]
ADD qword ptr [RBP + -0x38],R15
LAB_00165ff9:
MOV RDI,R13
LEA RSI,[RBP + -0x40]
MOV RDX,R12
MOV RCX,R14
CALL qword ptr [RBP + -0x58]
TEST EAX,EAX
JLE 0x0016605d
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x50]
CMP RSI,qword ptr [RAX]
JA 0x0016603f
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,RSI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x0016603f
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RBP + -0x40],RSI
LAB_0016603f:
MOV RDI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RBP + -0x48]
CMP EBX,EAX
JNZ 0x0016605d
MOV EAX,EBX
ADD R12,RAX
ADD R15,RAX
CMP R12,R14
JC 0x00165ff9
LAB_0016605d:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_caseup_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
ulong uVar1;
ulong *puVar2;
code *pcVar3;
code *pcVar4;
long lVar5;
uint uVar6;
uint uVar7;
ulong local_48;
long local_40;
long local_38;
local_38 = param_3;
if (0 < param_3) {
puVar2 = *(ulong **)(param_1 + 0x78);
pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
uVar1 = param_2 + param_3;
local_40 = param_5 + param_4;
do {
uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1);
if ((int)uVar6 < 1) {
return local_38;
}
if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0))
{
local_48 = (ulong)*(uint *)(lVar5 + (local_48 & 0xff) * 0xc);
}
uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40);
if (uVar6 != uVar7) {
return local_38;
}
param_2 = param_2 + uVar6;
param_4 = param_4 + (ulong)uVar6;
} while (param_2 < uVar1);
}
return local_38;
}
|
|
1,098 | JS_NewBigInt | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_NewBigInt(JSContext *ctx)
{
JSBigInt *p;
p = js_malloc(ctx, sizeof(*p));
if (!p)
return JS_EXCEPTION;
p->header.ref_count = 1;
bf_init(ctx->bf_ctx, &p->num);
return JS_MKPTR(JS_TAG_BIG_INT, p);
} | O0 | c | JS_NewBigInt:
subq $0x28, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl $0x30, %esi
callq 0x27fa0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x400f8
movl $0x0, 0x18(%rsp)
movq $0x6, 0x20(%rsp)
jmp 0x40130
movq 0x8(%rsp), %rax
movl $0x1, (%rax)
movq 0x10(%rsp), %rax
movq 0x1d0(%rax), %rdi
movq 0x8(%rsp), %rsi
addq $0x8, %rsi
callq 0xec260
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $-0x9, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rdx
addq $0x28, %rsp
retq
nop
| JS_NewBigInt:
sub rsp, 28h
mov [rsp+28h+var_18], rdi
mov rdi, [rsp+28h+var_18]
mov esi, 30h ; '0'
call js_malloc
mov [rsp+28h+var_20], rax
cmp [rsp+28h+var_20], 0
jnz short loc_400F8
mov dword ptr [rsp+28h+var_10], 0
mov [rsp+28h+var_8], 6
jmp short loc_40130
loc_400F8:
mov rax, [rsp+28h+var_20]
mov dword ptr [rax], 1
mov rax, [rsp+28h+var_18]
mov rdi, [rax+1D0h]
mov rsi, [rsp+28h+var_20]
add rsi, 8
call bf_init
mov rax, [rsp+28h+var_20]
mov [rsp+28h+var_10], rax
mov [rsp+28h+var_8], 0FFFFFFFFFFFFFFF7h
loc_40130:
mov rax, [rsp+28h+var_10]
mov rdx, [rsp+28h+var_8]
add rsp, 28h
retn
| _DWORD * JS_NewBigInt(long long a1)
{
_DWORD *v2; // [rsp+8h] [rbp-20h]
long long v3; // [rsp+18h] [rbp-10h]
v2 = (_DWORD *)js_malloc(a1, 48LL);
if ( v2 )
{
*v2 = 1;
bf_init(*(_QWORD *)(a1 + 464), v2 + 2);
return v2;
}
else
{
LODWORD(v3) = 0;
}
return (_DWORD *)v3;
}
| JS_NewBigInt:
SUB RSP,0x28
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,0x30
CALL 0x00127fa0
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x001400f8
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x6
JMP 0x00140130
LAB_001400f8:
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX],0x1
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x1d0]
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,0x8
CALL 0x001ec260
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],-0x9
LAB_00140130:
MOV RAX,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
int1 [16] JS_NewBigInt(long param_1)
{
int1 auVar1 [16];
int4 *puVar2;
int4 local_10;
int4 uStack_c;
int8 local_8;
puVar2 = (int4 *)js_malloc(param_1,0x30);
if (puVar2 == (int4 *)0x0) {
local_10 = 0;
local_8 = 6;
}
else {
*puVar2 = 1;
bf_init(*(int8 *)(param_1 + 0x1d0),puVar2 + 2);
local_10 = SUB84(puVar2,0);
uStack_c = (int4)((ulong)puVar2 >> 0x20);
local_8 = 0xfffffffffffffff7;
}
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
|
|
1,099 | JS_NewBigInt | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_NewBigInt(JSContext *ctx)
{
JSBigInt *p;
p = js_malloc(ctx, sizeof(*p));
if (!p)
return JS_EXCEPTION;
p->header.ref_count = 1;
bf_init(ctx->bf_ctx, &p->num);
return JS_MKPTR(JS_TAG_BIG_INT, p);
} | O2 | c | JS_NewBigInt:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x30
popq %rsi
callq 0x1adc4
testq %rax, %rax
je 0x2599a
movq %rax, %rbx
movl $0x1, (%rax)
movq 0x1d0(%r14), %rdi
movq %rax, %rsi
addq $0x8, %rsi
callq 0x730a2
pushq $-0x9
popq %rdx
jmp 0x2599f
pushq $0x6
popq %rdx
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| JS_NewBigInt:
push r14
push rbx
push rax
mov r14, rdi
push 30h ; '0'
pop rsi
call js_malloc
test rax, rax
jz short loc_2599A
mov rbx, rax
mov dword ptr [rax], 1
mov rdi, [r14+1D0h]
mov rsi, rax
add rsi, 8
call bf_init
push 0FFFFFFFFFFFFFFF7h
pop rdx
jmp short loc_2599F
loc_2599A:
push 6
pop rdx
xor ebx, ebx
loc_2599F:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| _DWORD * JS_NewBigInt(long long a1)
{
_DWORD *v1; // rax
_DWORD *v2; // rbx
v1 = (_DWORD *)js_malloc(a1, 48LL);
if ( !v1 )
return 0LL;
v2 = v1;
*v1 = 1;
bf_init(*(_QWORD *)(a1 + 464), v1 + 2);
return v2;
}
| JS_NewBigInt:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
PUSH 0x30
POP RSI
CALL 0x0011adc4
TEST RAX,RAX
JZ 0x0012599a
MOV RBX,RAX
MOV dword ptr [RAX],0x1
MOV RDI,qword ptr [R14 + 0x1d0]
MOV RSI,RAX
ADD RSI,0x8
CALL 0x001730a2
PUSH -0x9
POP RDX
JMP 0x0012599f
LAB_0012599a:
PUSH 0x6
POP RDX
XOR EBX,EBX
LAB_0012599f:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
int1 [16] JS_NewBigInt(long param_1)
{
int4 *puVar1;
int8 uVar2;
int1 auVar3 [16];
puVar1 = (int4 *)js_malloc(param_1,0x30);
if (puVar1 == (int4 *)0x0) {
uVar2 = 6;
puVar1 = (int4 *)0x0;
}
else {
*puVar1 = 1;
bf_init(*(int8 *)(param_1 + 0x1d0),puVar1 + 2);
uVar2 = 0xfffffffffffffff7;
}
auVar3._8_8_ = uVar2;
auVar3._0_8_ = puVar1;
return auVar3;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.